Browse Source

Merge branch 'master' of http://121.42.8.157:13000/zengminguo/D-MAP

deepsea 1 year ago
parent
commit
29318f600a
1 changed files with 47 additions and 8 deletions
  1. 47 8
      src/views/ordinaryPage/index.vue

+ 47 - 8
src/views/ordinaryPage/index.vue

@@ -67,7 +67,46 @@
           <div class="ordinary-map" id="ordinary-map">
             <!-- <img src="../../images/map.png" /> -->
             <div class="vr-bg" id="vr-bg-container"></div>
-            <div id="playersmall"></div>
+            <div id="playersmall">
+              <div
+                  v-for="(item, key) in benchList"
+                  :key="key"
+                  class="bmMapItem el-icon-location"
+                  :style="{
+                    left: item.left + 'px',
+                    top: item.top + 'px', 
+                  }"
+                  :class="item.status"
+                  @click="bmMapItemSelect(key)"
+                >
+                <Transition v-if="item.selected">
+                    <template>
+                      <div
+                        class="bmMapItemInfo"
+                        :class="{
+                          bmMapItemInfoSelected: item.selected,
+                        }"
+                      >
+                        <span>
+                          {{ item.name }}
+                        </span>
+                        <span style="display: flex; align-items: center">
+                          {{ item.Project }}
+                        </span>
+                        <div style="width: 100%">
+                          <span
+                            class="bmInfoMsSlideNameStatus"
+                            :class="{
+                              ['bmInfoMsSlideNameStatus ' + item.status]: true,
+                            }"
+                          ></span>
+                        </div>
+                        <!-- <div class="bmMapItemInfoAfter"></div> -->
+                      </div>
+                    </template>
+                  </Transition>
+                </div>
+            </div>
             <div class="ordinary-map-ex">
               <div class="square-count">
                 <status-bar
@@ -1212,8 +1251,8 @@ export default {
         var currentBench = this.benchList.find((b) => b.id == item.benchId);
         if (currentBench) {
           //console.log('currentBench',currentBench);
-          currentBench.left = item.x - 548;
-          currentBench.top = item.y - 137 - 150;
+          currentBench.left = item.x - 548 + 59;
+          currentBench.top = item.y - 137 - 150 + 11;
           currentBench.benchId = item.benchId;
           currentBench.benchType = item.benchType;
           console.log('item.benchImg',item.benchImg);
@@ -3488,8 +3527,8 @@ export default {
 
 .bmMapItem {
   position: absolute;
-  height: 70px;
-  width: 70px;
+  height: 30px;
+  width: 30px;
   cursor: pointer;
 }
 
@@ -3505,7 +3544,7 @@ export default {
 
 .bmMapItemInfo {
   position: absolute;
-  height: 100%;
+  height: 233%;
   width: 120px;
   box-sizing: border-box;
   padding: 3px;
@@ -4147,7 +4186,7 @@ export default {
   width: 100%;
 }
 .ready {
-  color: #65c94c !important;
+  color: #65c94c00 !important;
   font-size: 30px;
 }
 .occupied {
@@ -4229,7 +4268,7 @@ export default {
   border-radius: 100%;
 }
 .ready {
-  background-color: #65c94c !important;
+  background-color: #65c94c00 !important;
 }
 .occupied {
   background-color: #478bc3 !important;