guoxiaohuan 4 năm trước cách đây
mục cha
commit
ffb346aa85

+ 10 - 7
src/components/floorList.vue

@@ -12,11 +12,11 @@
                 <div class='floor-center'>
                     <div
                         class='floor-item'
-                        :class='item==floorId?"isActive":""'
+                        :class='item.code==floorId?"isActive":""'
                         @click='tabFloor(item,index)'
                         v-for='(item,index) in floorsArr'
                         :key='index'
-                    >{{item}}</div>
+                    >{{item.code}}</div>
                 </div>
             </div>
             <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='removeBottom(num)'></i>
@@ -33,7 +33,8 @@ export default {
             floorId: '',
             showT: true,
             showB: true,
-            num: 0
+            num: 0,
+            floorMapIdName: ''
         }
     },
     mounted() {
@@ -44,12 +45,14 @@ export default {
         ...mapGetters(['floorsArr'])
     },
     methods: {
-        tabFloor(item = '1F', index) {
+        tabFloor(item = 'F1', index) {
+            console.log(item)
             this.showT = true
             this.showB = true
-            this.$cookie.set('floorNow', item, 3)
-            this.floorId = this.$cookie.get('floorNow') || item
-            console.log(index)
+            this.$cookie.set('floorNow', item.code, 3)
+            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])
         },
         removeTop(num) {

+ 13 - 12
src/components/floorMap/index.vue

@@ -31,31 +31,32 @@ export default {
             fParser: null,
             loading: true,
             view: null,
-            isQuerying: false, // 限制重复查询
+            isQuerying: false // 限制重复查询
         }
     },
     components: { RoomBox, canvasFun },
     methods: {
         init(floorid) {
             if (this.isQuerying) {
-                console.log("正在查询");
+                console.log('正在查询')
                 // this.$message.warning('正在查询')
                 return
             }
-            this.isQuerying = true;
+            this.isQuerying = true
             this.clearGraphy()
             this.scene = new FloorScene()
             this.scene.selectContainer.connect('listChange', this, this.listChange)
             this.fmap = new SFengParser('fengMap', `${this.mapServerURL}/${this.fmapID}`, this.key, this.appName, null)
-            if (isNaN(Number(floorid))) {
-                console.log('楼层id错误')
-                // this.$message.warning("楼层id错误");
-                floorid = 1;
-            }
-            this.fmap.parseData(this.fmapID, Number(floorid), res => {
+            // if (isNaN(Number(floorid))) {
+            //     console.log('楼层id错误')
+            //     // this.$message.warning("楼层id错误");
+            //     floorid = 1
+            // }
+            console.log(floorid)
+            this.fmap.parseData(this.fmapID, 'f1', res => {
                 if (res.err) {
-                    console.log(res.err);
-                    return;
+                    console.log(res.err)
+                    return
                 }
                 this.fParser = new SFloorParser(null)
                 this.fParser.parseData(res)
@@ -71,7 +72,7 @@ export default {
                 this.view.scene = this.scene
                 this.view.fitSceneToView()
                 this.loading = false
-                this.isQuerying = false;
+                this.isQuerying = false
                 console.log('success')
             })
         },

+ 3 - 3
src/store/index.js

@@ -12,7 +12,7 @@ export default new Vuex.Store({
             orgCode: '',
             username: 'aiyu6', //账户名称
         },
-        plazaId: '1001145',
+        plazaId: '1000423',
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
     },
@@ -38,8 +38,8 @@ export default new Vuex.Store({
             if (data.length > 0) {
                 data.forEach((e) => {
                     let obj = {
-                        id: e,
-                        name: e,
+                        id: e.code,
+                        name: e.code,
                     }
                     state.floorSelect.push(obj)
                 })

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

@@ -76,7 +76,7 @@ export default {
             this.smsxt = item.smsxt
         },
         emitFloor(item) {
-            console.log(item)
+            console.log('item', item)
             this.floorInfo.floorId = item[0]
             this.$refs.floorMap.init(item[0])
             this.floorInfo.floorName = item[1]

+ 5 - 5
src/views/floorFunc/index.vue

@@ -29,22 +29,22 @@ export default {
             show: false,
             floorInfo: {
                 floorName: 'F1',
-                floorId: '1'
+                floorMapIdName: 'f1'
             }
         }
     },
     methods: {
         emitFloor(item) {
-            console.log(item)
-            this.floorInfo.floorId = item
-            this.$refs.floorMap.init(item)
+            this.floorInfo.floorName = item[1].code
+            this.floorInfo.floorMapIdName = item[1].gname
+            this.$refs.floorMap.init(this.floorInfo.floorMapIdName)
         },
         additionalColl() {
             this.show = !this.show
         }
     },
     mounted() {
-        this.$refs.floorMap.init(1)
+        this.$refs.floorMap.init(this.floorInfo.floorMapIdName)
     }
 }
 </script>

+ 3 - 2
src/views/other/gcfz2.vue

@@ -4,7 +4,7 @@
             <div class='picker-box'>
                 <span class='picker-span'>记录日期:</span>
                 <el-date-picker
-                    v-model='dateVal'
+                    v-model='cg.dateVal'
                     value-format='yyyyMMdd'
                     type='daterange'
                     size='mini'
@@ -12,6 +12,7 @@
                     range-separator='-'
                     start-placeholder
                     end-placeholder
+                    @change='changelc'
                 ></el-date-picker>
             </div>
 
@@ -86,6 +87,7 @@ export default {
             dateVal: '',
             searVal: '',
             cg: {
+                dateVal: '',
                 floors: '',
                 searVal: ''
             }
@@ -102,7 +104,6 @@ export default {
             this.$emit('queryChange')
         },
         changelc() {
-            console.log(this.cg)
             this.$emit('changeEmit', this.cg)
         }
     }

+ 9 - 1
src/views/other/gcfzDialog.vue

@@ -41,7 +41,8 @@ export default {
             floor: '',
             bgjlTable: [],
             floors: '',
-            searVal: ''
+            searVal: '',
+            dateVal: ''
         }
     },
     mounted() {
@@ -71,6 +72,9 @@ export default {
             if (val.searVal) {
                 this.searVal = val.searVal
             }
+            if (val.dateVal) {
+                this.dateVal = val.dateVal
+            }
             this.queryChange()
         },
         // 变更记录
@@ -86,6 +90,10 @@ export default {
             if (this.searVal) {
                 getParams.keyword = `${this.searVal}:region`
             }
+            if (this.dateVal) {
+                getParams.changedateStartDate = this.dateVal[0] + '000000'
+                getParams.changedateEndDate = this.dateVal[1] + '000000'
+            }
             queryfzyfchange({ getParams }).then(res => {
                 if (res.result == 'success') {
                     console.log('变更记录', res)

+ 5 - 1
src/views/other/zhsxOtherTable1.vue

@@ -2,7 +2,7 @@
     <div class='tableZh'>
         <div class='tab-top' style='display:flex;'>
             <div class='picker-box'>
-                <span class='picker-span'>结束日期:</span>
+                <span class='picker-span'>日期:</span>
                 <el-date-picker
                     style='width:190px'
                     v-model='dateVal'
@@ -117,6 +117,10 @@ export default {
             if (this.ssjlsx) {
                 getParams.keyword = `${this.ssjlsx}:recordsx`
             }
+            if (this.dateVal) {
+                getParams.createdateStartDate = this.dateVal[0] + '000000'
+                getParams.createdateEndDate = this.dateVal[1] + '000000'
+            }
             queryGlams({ getParams }).then(res => {
                 if (res.result == 'success') {
                     this.loading = false