Jelajahi Sumber

默认楼层

zhulizhen1111 4 tahun lalu
induk
melakukan
56590aa8ac

+ 11 - 4
src/components/floorList.vue

@@ -30,11 +30,18 @@ import { mapGetters } from 'vuex'
 export default {
     data() {
         return {
-            floorId: '',
+            floorId: 'F1',
             showT: true,
             showB: true,
             num: 0,
-            floorMapIdName: ''
+            floorMapIdName: '',
+            floor: {
+                code: 'F1',
+                gcode: '1F',
+                gname: 'f1',
+                name: '第1层',
+                seq: 100
+            }
         }
     },
     mounted() {
@@ -45,7 +52,7 @@ export default {
         ...mapGetters(['floorsArr'])
     },
     methods: {
-        tabFloor(item = 'F1', index) {
+        tabFloor(item = this.floor, index) {
             console.log(item)
             this.showT = true
             this.showB = true
@@ -53,7 +60,7 @@ export default {
             this.$cookie.set('floorMapId', item.gname, 3)
             this.floorId = this.$cookie.get('floorNow') || item.code
             this.floorMapIdName = this.$cookie.get('floorMapIdName') || item.gname
-            this.$emit('emitFloor', [index + 1, item])
+            this.$emit('emitFloor', item)
         },
         removeTop(num) {
             this.num = num

+ 1 - 1
src/components/floorMap/index.vue

@@ -29,7 +29,7 @@ export default {
             canvasWidth: 1100,
             canvasHeight: 800,
             fParser: null,
-            loading: true,
+            loading: false,
             view: null,
             isQuerying: false // 限制重复查询
         }

+ 6 - 7
src/views/equipment/index.vue

@@ -27,7 +27,7 @@
                     <div class='title-box'>
                         <!-- <img src='@/assets/imgs/mainIcon.png' /> -->
                         <div class='eq-title'>
-                            <span>{{floorInfo.floorName}}</span>
+                            <span>{{floorInfo.code}}</span>
                         </div>
                     </div>
                     <div class='eq-content'>
@@ -68,8 +68,8 @@ export default {
             systemId: 1,
             systemName: '供电系统',
             floorInfo: {
-                floorName: 'F1',
-                floorId: '1'
+                gname: 'f1',
+                code: 'F1'
             },
             smsxt: '1001',
             dialogInfo: {},
@@ -89,9 +89,8 @@ export default {
         },
         emitFloor(item) {
             console.log('item', item)
-            this.floorInfo.floorId = item[0]
-            this.$refs.floorMap.init(item[0])
-            this.floorInfo.floorName = item[1]
+            this.floorInfo = item
+            // this.$refs.floorMap.init(this.floorInfo.gname)
         },
         dialogVisible(eve) {
             console.log(eve)
@@ -103,7 +102,7 @@ export default {
     },
     mounted() {
         this.everySystem = this.system[0].children
-        this.$refs.floorMap.init(1)
+        // this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>

+ 6 - 7
src/views/floorFunc/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class='floorFunc-box'>
         <div class='eq-title'>
-            <span>{{floorInfo.floorName}}</span>
+            <span>{{floorInfo.code}}</span>
         </div>
         <!-- 图例 -->
         <div class='legend-boxs'>
@@ -28,23 +28,22 @@ export default {
         return {
             show: false,
             floorInfo: {
-                floorName: 'F1',
-                floorMapIdName: 'f1'
+                gname: 'f1',
+                code: 'F1'
             }
         }
     },
     methods: {
         emitFloor(item) {
-            this.floorInfo.floorName = item[1].code
-            this.floorInfo.floorMapIdName = item[1].gname
-            this.$refs.floorMap.init(this.floorInfo.floorMapIdName)
+            this.floorInfo = item
+            //this.$refs.floorMap.init(this.floorInfo.gname)
         },
         additionalColl() {
             this.show = !this.show
         }
     },
     mounted() {
-        this.$refs.floorMap.init(this.floorInfo.floorMapIdName)
+        // this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>

+ 1 - 1
src/views/other/index.vue

@@ -70,9 +70,9 @@ export default {
         },
         emitFloor(item) {
             console.log(item)
-            this.picFloor = item[1]
             this.queryPicter()
             this.floorInfo = item
+            this.picFloor = this.floorInfo.gname
         },
         dialogVisible(item) {
             this.$refs.gcfzDialog.showModal(item)