浏览代码

'代码合并'

zhangyu 4 年之前
父节点
当前提交
aef272a807

+ 5 - 5
package.json

@@ -11,11 +11,11 @@
     },
     "dependencies": {
         "@mapbox/geojson-merge": "^1.1.1",
-        "@saga-web/base": "2.1.25",
-        "@saga-web/big": "1.0.107",
-        "@saga-web/draw": "2.1.106",
-        "@saga-web/feng-map": "1.0.37",
-        "@saga-web/graph": "2.1.123",
+        "@saga-web/base": "2.1.27",
+        "@saga-web/big": "1.0.111",
+        "@saga-web/draw": "2.1.107",
+        "@saga-web/feng-map": "1.0.44",
+        "@saga-web/graph": "2.1.124",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",

+ 16 - 18
src/api/httputils.js

@@ -1,9 +1,7 @@
 import axios from 'axios'
 import store from '@/store'
 import router from '@/router'
-import {
-    MessageBox
-} from 'element-ui'
+import { MessageBox } from 'element-ui'
 
 var CancelToken = axios.CancelToken
 var cancel
@@ -24,8 +22,8 @@ axiosservice.interceptors.request.use(
     (config) => {
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
         let isPreview = null
-        let token = store.getters['ssoToken'];
-        if (store.getters['isPreview'] == "null" || store.getters['isPreview'] == "" || store.getters['isPreview'] == null) {
+        let token = store.getters['ssoToken']
+        if (store.getters['isPreview'] == 'null' || store.getters['isPreview'] == '' || store.getters['isPreview'] == null) {
             isPreview = false
         } else {
             isPreview = store.getters['isPreview']
@@ -44,16 +42,16 @@ axiosservice.interceptors.request.use(
 )
 
 axiosservice.interceptors.response.use(
-    function (res) {
+    function(res) {
         //在这里对返回的数据进行处理
-        let resp = res.data;
+        let resp = res.data
         if (resp.result === 'unauthc') {
             store.commit('logined', false)
             MessageBox.confirm('未登陆或登陆信息已失效, 是否重新登陆?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'error',
-                })
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'error',
+            })
                 .then((resp) => {
                     window.location.reload()
                 })
@@ -63,14 +61,14 @@ axiosservice.interceptors.response.use(
         } else if (resp.error == 'Unauthorized') {
             MessageBox.alert('无权操作', {
                 title: '警告',
-                type: 'error'
+                type: 'error',
             })
         }
         return res
     },
-    function (err) {
+    function(err) {
         if (err.response.status == 401) {
-            store.commit('SETISREQUESTtAUTH', 'err');
+            store.commit('SETISREQUESTtAUTH', 'err')
             router.push({
                 path: '404',
             })
@@ -166,7 +164,7 @@ export default {
         // 响应类型:arraybuffer, blob
         axiosservice
             .post(url, requestData, {
-                responseType: 'blob'
+                responseType: 'blob',
             })
             .then((resp) => {
                 let headers = resp.headers
@@ -177,7 +175,7 @@ export default {
                 } else {
                     //console.log("下载文件:", resp)
                     const blob = new Blob([resp.data], {
-                        type: contentType
+                        type: contentType,
                     })
                     const contentDisposition = resp.headers['content-disposition']
                     let fileName = 'unknown'
@@ -187,7 +185,7 @@ export default {
                     downFile(blob, fileName)
                 }
             })
-            .catch(function (error) {})
+            .catch(function(error) {})
     },
     axios: axiosservice,
-}
+}

+ 3 - 3
src/components/Legend/src/legend.vue

@@ -69,7 +69,7 @@
                 effect='dark'
                 content='新增分布图1'
                 placement='left'
-                v-if='floorSelect.length!=floors.length && type==0'
+                v-if='floorSelect2.length!=floors.length && type==0'
             >
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
@@ -143,7 +143,7 @@ export default {
             'remarksText',
             'plazaId',
             'fmapID',
-            'floorSelect',
+            'floorSelect2',
             'isMessage',
             'ssoToken',
             'showView',
@@ -273,7 +273,7 @@ export default {
         },
         formatFloor() {
             this.floorSelectAble = []
-            this.floorSelectAble = this.floorSelect.filter((item) => {
+            this.floorSelectAble = this.floorSelect2.filter((item) => {
                 const hit = this.floors.find((i) => i.gname == item.id)
                 return !hit
             })

+ 12 - 12
src/components/floorListOther.vue

@@ -55,20 +55,20 @@ export default {
             floor: {
                 code: 'F1',
                 gcode: '1F',
-                gname: 'f1',
+                gcname: 'f1',
                 name: '第1层',
-                seq: 100
+                seq: 100,
             },
             currentFloorId: null,
             marginTop: 0,
             startTime: '',
-            endTime: ''
+            endTime: '',
         }
     },
     props: {
         floorsArr: {
-            type: Array
-        }
+            type: Array,
+        },
     },
     mounted() {
         this.init()
@@ -88,7 +88,7 @@ export default {
                 return false
             }
             this.floorIdArr = []
-            this.floorsArr.map(item => {
+            this.floorsArr.map((item) => {
                 this.floorIdArr.push(item.seq)
             })
             this.currentFloorId = this.floorsArr[0].seq
@@ -101,7 +101,7 @@ export default {
          */
         changeFloor(flag) {
             const len = this.floorIdArr.length
-            let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
+            let index = this.floorIdArr.findIndex((item) => item === this.currentFloorId)
             // 点击上箭头
             if (flag === 1) {
                 index--
@@ -152,12 +152,12 @@ export default {
          */
         handleCookie() {
             // return true
-            let currentFloor = this.floorsArr.filter(item => item.seq == this.currentFloorId)[0]
+            let currentFloor = this.floorsArr.filter((item) => item.seq == this.currentFloorId)[0]
             // this.$cookie.set('floorNow', currentFloor.code, 3)
-            // this.$cookie.set('floorMapId', currentFloor.gname, 3)
+            // this.$cookie.set('floorMapId', currentFloor.gcname, 3)
             // this.$cookie.set('currentFloorId', currentFloor.seq, 3)
             // this.floorId = this.$cookie.get('floorNow') || currentFloor.code
-            // this.floorMapIdName = this.$cookie.get('floorMapId') || currentFloor.gname
+            // this.floorMapIdName = this.$cookie.get('floorMapId') || currentFloor.gcname
             this.$emit('emitFloor', currentFloor)
         },
         /**
@@ -197,8 +197,8 @@ export default {
                 // 前 showNumber 条的margin-top设置为0
                 this.marginTop = 0
             }
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less" scoped>

+ 35 - 30
src/components/floorMap/index.vue

@@ -88,7 +88,7 @@
 </template>
 <script>
 import { SFengParser, ProjectRf } from '@saga-web/feng-map'
-import { SFloorParser, ItemOrder, ItemColor, SPolygonItem } from '@saga-web/big'
+import { SFloorParser, ItemOrder, ItemColor, SPolygonItem, SBoardItem } from '@saga-web/big'
 import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
@@ -290,9 +290,9 @@ export default {
             if (floor == 'g80') {
                 // 屋顶
                 if (window.fengmapData.frImg) {
-                    // const pj = this.urlMsg.fmapID.split('_')[0]
-                    // // 单张图片
-                    // if (!ProjectRf[pj]) {
+                    const pj = this.fmapID.split('_')[0]
+                    // 单张图片
+                    if (!ProjectRf[pj]) {
                         let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
                         imgItem.showType = SImageShowType.AutoFit
                         imgItem.connect('imgLoadOver', this, () => {
@@ -300,30 +300,27 @@ export default {
                         })
                         this.scene.addItem(imgItem)
                         this.view.scene = this.scene
-                    // this.view.fitSceneToView()
-                    // } else {
-                    //   // 多张图
-                    //   try {
-                    //     // 初始化0
-                    //     this.count = 0;
-                    //     ProjectRf[pj].forEach(t => {
-                    //       const item = new SImageItem(
-                    //         null,
-                    //         `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${t.name}`
-                    //       );
-                    //       item.width = t.width
-                    //       item.height = t.height
-                    //       item.moveTo(t.x, t.y)
-                    //       item.connect("imgLoadOver", this, () => {
-                    //         this.countRf(ProjectRf[pj].length);
-                    //       });
-                    //       this.scene.addItem(item);
-                    //     })
-                    //     this.view.scene = this.scene;
-                    //   } catch(e) {
-                    //     console.log(e);
-                    //   }
-                    // }
+                        // this.view.fitSceneToView()
+                    } else {
+                        // 多张图
+                        try {
+                            // 初始化0
+                            this.count = 0
+                            ProjectRf[pj].forEach((t) => {
+                                const item = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${t.name}`)
+                                item.width = t.width
+                                item.height = t.height
+                                item.moveTo(t.x, t.y)
+                                item.connect('imgLoadOver', this, () => {
+                                    this.countRf(ProjectRf[pj].length)
+                                })
+                                this.scene.addItem(item)
+                            })
+                            this.view.scene = this.scene
+                        } catch (e) {
+                            console.log(e)
+                        }
+                    }
                 } else {
                     // 屋顶图不为图片
                     this.readBaseMap(floor)
@@ -336,7 +333,15 @@ export default {
                 }
             }
         }, // 解析底图
+        // 解析楼地板
+        loadBoard(floor) {
+            window.fengmapData.loadFloor(floor, (res) => {
+                const zone = new SBoardItem(null, res)
+                this.scene.addItem(zone)
+            })
+        },
         readBaseMap(floor) {
+            this.loadBoard(window.fengmapData.gnameToGid[floor])
             window.fengmapData.parseData(window.fengmapData.gnameToGid[floor], (res) => {
                 if (res.err) {
                     console.log('errr', res.err)
@@ -484,9 +489,9 @@ export default {
         countRf(len) {
             this.count++
             if (len == this.count) {
-                this.readGraph();
+                this.readGraph()
             } else {
-                console.log('所有图片未加载完成');
+                console.log('所有图片未加载完成')
             }
         },
         clearGraphy() {

+ 23 - 29
src/store/index.js

@@ -1,13 +1,7 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import {
-    login,
-    queryFloor,
-    queryfmapID
-} from '@/api/login.js'
-import {
-    queryBrand
-} from '@/api/public.js'
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
+import { queryBrand } from '@/api/public.js'
 import axios from 'axios'
 import router from '../router'
 
@@ -32,6 +26,7 @@ export default new Vuex.Store({
         projectName: '', //全局项目名称
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
+        floorSelect2: [], //分布图楼层下拉框
         fmapID: '',
         haveFengMap: -1, //是否有蜂鸟地图的数据 -1为等待 0 为失败 1 为成功
         isMessage: true, //是否有发布的图
@@ -57,6 +52,7 @@ export default new Vuex.Store({
         lastRoute: (state) => state.lastRoute,
         floorsArr: (state) => state.floorsArr,
         floorSelect: (state) => state.floorSelect,
+        floorSelect2: (state) => state.floorSelect2,
         plazaId: (state) => state.plazaId,
         plazas: (state) => state.plazas,
         fmapID: (state) => state.fmapID,
@@ -106,20 +102,23 @@ export default new Vuex.Store({
             state.isMessage = data
         },
         SETFLOORS(state, data) {
-            console.log(data)
-            let numArr = [],
-                minNum = '',
-                floor = {}
+            let numArr = []
             state.floorSelect = []
+            state.floorSelect2 = []
             state.floorsArr = data
             if (data.length > 0) {
                 data.forEach((e) => {
                     let obj = {
+                        id: e.gcname,
+                        name: e.code,
+                    }
+                    let obj2 = {
                         id: e.gname,
                         name: e.code,
                     }
                     // 下拉框的楼层数组
                     state.floorSelect.push(obj)
+                    state.floorSelect2.push(obj2)
                     // 获取默认展示楼层
                     if (e.seq > 0) {
                         numArr.push(e.seq)
@@ -183,17 +182,15 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({
-            commit
-        }, palyload) {
+        async getUserInfo({ commit }, palyload) {
             await login({
-                    returnTree: true,
-                })
+                returnTree: true,
+            })
                 .then((res) => {
                     // 获取用户当前权限
                     if (res.result === 'success') {
                         // 如果用户没有权限则跳入404
-                        if(!res.permissions || !res.permissions.includes('GLSMS_VIEW')){
+                        if (!res.permissions || !res.permissions.includes('GLSMS_VIEW')) {
                             router.push({
                                 path: '/404',
                             })
@@ -232,8 +229,8 @@ export default new Vuex.Store({
                         }
                         //   给oA头添加名称
                         // 指定条问题
-                        document.getElementById("wd-fm-id-fm-switch-profile").style.display= 'inline-block';
-                        document.getElementById("wd-fm-id-fm-switch-profile").innerText ='您好,'+ res.username;
+                        document.getElementById('wd-fm-id-fm-switch-profile').style.display = 'inline-block'
+                        document.getElementById('wd-fm-id-fm-switch-profile').innerText = '您好,' + res.username
                     }
                 })
                 .catch((err) => {
@@ -243,21 +240,18 @@ export default new Vuex.Store({
                             path: './home/homepage',
                         })
                     }
-
                 })
         },
-        async getUserInfoNoPath({
-            commit
-        }, palyload) {
+        async getUserInfoNoPath({ commit }, palyload) {
             await login({
-                    returnTree: true,
-                })
+                returnTree: true,
+            })
                 .then((res) => {
                     if (res.result === 'success') {
                         // commit('STOREACCESSLEVEL', res.level)
                         commit('SETAUTHMSG', res)
-                        document.getElementById("wd-fm-id-fm-switch-profile").style.display= 'inline-block';
-                        document.getElementById("wd-fm-id-fm-switch-profile").innerText ='您好,'+ res.username;
+                        document.getElementById('wd-fm-id-fm-switch-profile').style.display = 'inline-block'
+                        document.getElementById('wd-fm-id-fm-switch-profile').innerText = '您好,' + res.username
                     }
                 })
                 .catch((err) => {
@@ -299,4 +293,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 16 - 12
src/utils/ganttChart/GanttChart_day.js

@@ -499,20 +499,24 @@ GanttChartDay.prototype.drawTasks = function() {
                         tempTaskContainerEl.setZIndex(1)
                         tempTaskContainerEl._pdata = taskP
                         tempTaskContainerEl.on('mouseenter', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#F5F6F7' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#F5F6F7' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         tempTaskContainerEl.on('mouseleave', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#fff' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#fff' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         taskP._containerEl = tempTaskContainerEl
                     }

+ 20 - 16
src/utils/ganttChart/GanttChart_month.js

@@ -357,10 +357,10 @@ GanttChartMonth.prototype.handleClick = function(task, flag, ev) {
         // document.getElementById('detailTaskStatus').textContent = task._pdata.status
         // document.getElementById('detailTaskStartDate').textContent = task._pdata.startDate
         // document.getElementById('detailTaskEndDate').textContent = task._pdata.endDate
-        console.log('show:', task)
+        // console.log('show:', task)
     } else if (flag === 'leave') {
         // detailDiv.style.display = 'none'
-        console.log('hide:', task)
+        // console.log('hide:', task)
     } else {
         this.callback(task)
         console.log('click:', task)
@@ -507,20 +507,24 @@ GanttChartMonth.prototype.drawTasks = function() {
                         tempTaskContainerEl.setZIndex(1)
                         tempTaskContainerEl._pdata = taskP
                         tempTaskContainerEl.on('mouseenter', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#F5F6F7' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#F5F6F7' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         tempTaskContainerEl.on('mouseleave', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#fff' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#fff' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         taskP._containerEl = tempTaskContainerEl
                     }
@@ -546,10 +550,10 @@ GanttChartMonth.prototype.drawTasks = function() {
                             rectEl._pdata = _taskItem
                             _taskItem._rectEl = rectEl
                             rectEl.on('mouseover', (ev) => {
-                                this.handleClick(ev.target, 'enter', ev)
+                                // this.handleClick(ev.target, 'enter', ev)
                             })
                             rectEl.on('mouseleave', (ev) => {
-                                this.handleClick(ev.target, 'leave', ev)
+                                // this.handleClick(ev.target, 'leave', ev)
                             })
                             rectEl.on('click', (ev) => {
                                 this.handleClick(ev.target, 'click', ev)

+ 2 - 2
src/views/analysis/CoreDeviceReport.vue

@@ -109,7 +109,7 @@
               <span
                 style="color: #025BAA"
                 @click="showPicturesDetail(scope.row, 'his')"
-              >{{ scope.row.photosNum || scope.row.photosNum === 0?(scope.row.photosNum + '张') : '—' }}</span>
+              >{{ scope.row.photosNum?(scope.row.photosNum + '张') : '—' }}</span>
               <!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
             </template>
           </el-table-column>
@@ -537,7 +537,7 @@ export default {
      */
     getDetailData(val, type) {
       let param = {
-        // assetnum: this.assetnum,
+        assetnum: this.assetnum,
         plazaId: this.plazaId,
         file_type: type === 'equip'?val.file_type : val.type,
         // file_type: 0,

+ 9 - 4
src/views/analysis/GanttChart.vue

@@ -153,6 +153,7 @@ export default {
   data() {
     return {
       plazaId: 1000423, // 广场id
+      // assetnum: null, // 设备台账编码
       systemList: [], // 系统列表
       systemId: "", // 系统名称
       legends: [
@@ -356,18 +357,21 @@ export default {
           this.treeData = newData;
 
           let taskData = _.map(_.cloneDeep(newData), item => {
-            return {
+            let parentNode = {
               id: item.id,
               type: item.name,
               open: item.open,
+            };
+            return Object.assign(parentNode, {
               dataList: _.map(item.children, _item => {
                 return {
+                  parentNode,
                   id: _item.id,
                   title: _item.name,
                   tasks: _item.originData
                 };
               })
-            };
+            })
           });
           console.log("taskData", taskData);
           if (!window.gc) {
@@ -516,6 +520,7 @@ export default {
         file_type_id: id,
         // file_type_id: 9886,
         type: type,
+        // assetnum: this.assetnum,
       };
       queryDetailData("/data/base/queryFileDetails", param).then(res => {
         console.log("photo", res);
@@ -668,9 +673,9 @@ export default {
       padding-right: 8px;
       // width: 58px;
       height: 24px;
-      background: rgba(91, 143, 249, 0.2);
+      // background: rgba(91, 143, 249, 0.2);
       border-radius: 2px;
-      color: #5b8ff9;
+      // color: #5b8ff9;
       line-height: 24px;
       text-align: center;
     }

+ 12 - 11
src/views/equipment/fenbuPic.vue

@@ -2,7 +2,7 @@
     <div class='fenbu-box'>
         <!-- 图例 -->
         <div class='legend-boxs'>
-            <Legend :innerLeng='1' :floorInfo="floorInfo"  :floors='floors' type='0' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`'></Legend>
+            <Legend :innerLeng='1' :floorInfo='floorInfo' :floors='floors' type='0' :categoryId='`${typecode=="FBT1"?"FZQZL":"XFBFYCFL"}`'></Legend>
             <floor-list v-if='floors.length>0' :changeDataFlag='false' :floorsArr='floors' @emitFloor='emitFloor' :id='"floor"'></floor-list>
         </div>
         <div v-show='floors.length>0' class='canvas-box'>
@@ -26,17 +26,17 @@ export default {
             show: false,
             floorInfo: {
                 gname: 'f1',
-                code: 'F1'
+                code: 'F1',
             },
             loadName: '',
             type: '',
             floors: [],
-            modalHeight: 500 //适配底图
+            modalHeight: 500, //适配底图
         }
     },
     props: ['typecode'],
     computed: {
-        ...mapGetters(['floorsArr'])
+        ...mapGetters(['floorsArr']),
     },
     mounted() {
         if (window.screen.width > 1366) {
@@ -61,7 +61,7 @@ export default {
                 Distinct: true,
                 PageNumber: 1,
                 PageSize: 500,
-                Projection: ['floorId']
+                Projection: ['floorId'],
             }
             if (this.typecode == 'FBT1') {
                 postParams.Filters = `projectId =${this.$store.state.plazaId};categoryId='FZQZL';isPub=true`
@@ -71,20 +71,20 @@ export default {
             }
             let floor = []
             this.floors = []
-            queryPics({ postParams }).then(res => {
+            queryPics({ postParams }).then((res) => {
                 if (res.Total == 0) {
                     this.floors = []
                 } else {
                     floor = res.Content
-                    this.floorsArr.forEach(el => {
-                        floor.forEach(ele => {
+                    this.floorsArr.forEach((el) => {
+                        floor.forEach((ele) => {
                             if (ele.FloorId == el.gname) {
                                 this.floors.push({
                                     gname: el.gname,
                                     gcode: el.gcode,
                                     name: el.name,
                                     code: el.code,
-                                    seq: el.seq
+                                    seq: el.seq,
                                 })
                             }
                         })
@@ -92,6 +92,7 @@ export default {
                 }
                 this.floorInfo = this.floors[0]
                 // this.init()
+                console.log(this.floors)
             })
         },
         init() {
@@ -102,8 +103,8 @@ export default {
             this.getFloorData()
             // 注释掉 floorMap init ,由楼层中的emitFloor方法去执行floorMap
             // this.$refs.floorMap.init(this.floorInfo.gname)
-        }
-    }
+        },
+    },
 }
 </script>
 <style lang="less">

+ 20 - 20
src/views/equipment/table/djspTable.vue

@@ -56,11 +56,11 @@ export default {
             innerVisible: false, //详情弹框
             shopsnum: '',
             welldes: '',
-            floorAllSelect: []
+            floorAllSelect: [],
         }
     },
     computed: {
-        ...mapGetters(['floorSelect', 'plazaId'])
+        ...mapGetters(['floorSelect', 'plazaId']),
     },
     props: ['param'],
     methods: {
@@ -69,12 +69,12 @@ export default {
                 if (row.col0count > 0) {
                     return {
                         rowspan: row.col0count,
-                        colspan: 1
+                        colspan: 1,
                     }
                 } else {
                     return {
                         rowspan: 0,
-                        colspan: 0
+                        colspan: 0,
                     }
                 }
             }
@@ -86,7 +86,7 @@ export default {
         getList() {
             let getParams = {
                 orderBy: `floor,0;welldesm,1;meterbox,1;`,
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
             if (this.floor && this.floor != 1) {
                 getParams.floor = this.floor
@@ -101,25 +101,25 @@ export default {
             if (getParams.keyword == '') {
                 delete getParams.keyword
             }
-            queryShops({ getParams }).then(res => {
+            queryShops({ getParams }).then((res) => {
                 console.log(res)
                 this.tableData = []
                 let floor = {}
                 res.data &&
-                    res.data.forEach(i => {
+                    res.data.forEach((i) => {
                         console.log(i)
-                        Object.keys(i).forEach(key => (floor[key] = 0)) // 初始化每一楼层个数为0
-                        Object.values(i).forEach(j => {
-                            Object.values(j).forEach(k => {
+                        Object.keys(i).forEach((key) => (floor[key] = 0)) // 初始化每一楼层个数为0
+                        Object.values(i).forEach((j) => {
+                            Object.values(j).forEach((k) => {
                                 console.log(k)
                                 this.tableData.push(k)
                             })
                         })
                     })
 
-                this.tableData.map(n => {
+                this.tableData.map((n) => {
                     if (floor[n.floor] === 0) {
-                        const count = this.tableData.filter(m => m.floor === n.floor).length
+                        const count = this.tableData.filter((m) => m.floor === n.floor).length
                         floor[n.floor] = count
                         n.col0count = count
                     } else {
@@ -133,12 +133,12 @@ export default {
             this.floorAllSelect = []
             this.floorAllSelect.push({
                 name: '全部',
-                id: '1'
+                id: '1',
             })
-            this.floorSelect.forEach(el => {
+            this.floorSelect.forEach((el) => {
                 this.floorAllSelect.push(el)
             })
-        }
+        },
     },
     watch: {
         param(newV, oldV) {
@@ -153,19 +153,19 @@ export default {
         // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
         '$store.state.currentFloor': {
             handler(newV, oldV) {
-                if (newV.gname !== oldV.gname) {
-                    this.floor = newV.gname
+                if (newV.gcname !== oldV.gcname) {
+                    this.floor = newV.gcname
                     this.getList()
                 }
             },
-            deep: true
-        }
+            deep: true,
+        },
     },
     mounted() {
         // this.floor = this.$cookie.get('floorMapId')
         this.getList()
         this.getFloorAllSelect()
-    }
+    },
 }
 </script>
 <style lang="less" scoped>

+ 1 - 1
src/views/equipment/table/eqDetaileDialog.vue

@@ -102,7 +102,7 @@
                 background
                 layout='prev, pager, next'
                 :total='total'
-                :current-page.sync="sonpage"
+                :current-page.sync='sonpage'
                 :page-size='size'
                 @prev-click='pageChanged'
                 @next-click='pageChanged'

+ 3 - 3
src/views/equipment/table/eqListTable.vue

@@ -106,7 +106,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            sonpage:1,
+            sonpage: 1,
             size: 10,
             innerVisible: false, //详情弹框
             keyword: '',
@@ -201,8 +201,8 @@ export default {
         // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
         '$store.state.currentFloor': {
             handler(newV, oldV) {
-                if (newV.gname !== oldV.gname) {
-                    this.floor = newV.gname
+                if (newV.gcname !== oldV.gcname) {
+                    this.floor = newV.gcname
                     this.getList()
                 }
             },

+ 3 - 3
src/views/equipment/table/standTable.vue

@@ -99,7 +99,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
-            sonpage:1,
+            sonpage: 1,
             size: 10,
             keyword: '',
             floor: '1',
@@ -205,8 +205,8 @@ export default {
         // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
         '$store.state.currentFloor': {
             handler(newV, oldV) {
-                if (newV.gname !== oldV.gname) {
-                    this.floor = newV.gname
+                if (newV.gcname !== oldV.gcname) {
+                    this.floor = newV.gcname
                     this.getList()
                 }
             },

+ 4 - 0
src/views/floorFunc/index.vue

@@ -41,14 +41,18 @@ export default {
         },
         init() {
             this.loadName = `楼层功能-${this.floorInfo.code}`
+            console.log(this.floorsArr.length)
+            console.log(this.$cookie.get('currentFloorId'))
             if (this.floorsArr.length > 0 && this.$cookie.get('currentFloorId')) {
                 this.floorInfo = this.floorsArr.find((item) => {
                     return this.$cookie.get('currentFloorId') == item.seq
                 })
+            } else {
             }
         },
     },
     mounted() {
+        console.log(this.floorInfo)
         this.init()
         this.$refs.floorMap.init(this.floorInfo.gname)
     },

+ 4 - 1
src/views/legendLibrary/index.vue

@@ -54,7 +54,7 @@
                         :returnParentNode='false'
                         :choseArea='true'
                         :data='deviceList'
-                        :lastStage='true'
+                        :lastStage='false'
                         @change='treeConfirmDevice'
                     />
                 </span>
@@ -652,6 +652,9 @@ export default {
 }
 </style>
 <style lang="less">
+.p-tree-svg {
+    margin-top: 3px !important;
+}
 @media screen and (max-height: 800px) {
     .legend-library-bottom {
         overflow-y: auto;

+ 19 - 63
src/views/other/index.vue

@@ -55,14 +55,14 @@ export default {
             systemName: '供电系统',
             floorInfo: {
                 floorName: 'F1',
-                floorId: 'f1'
+                floorId: 'f1',
             },
             picFloor: '',
             picFloorImg: [],
             picFloorArr: [],
             dialogInfo: {},
             floorData: [],
-            module: ''
+            module: '',
         }
     },
     components: { floorListOther, OtherDialog, ZhsxOther, GcfzDialog },
@@ -73,9 +73,9 @@ export default {
             this.systemName = item.name
         },
         emitFloor(item) {
-            this.queryPicter(item.gname)
+            this.queryPicter(item.gcname)
             this.floorInfo = item
-            this.picFloor = this.floorInfo.gname
+            this.picFloor = this.floorInfo.gcname
         },
         dialogVisible(item) {
             this.$refs.gcfzDialog.showModal(item)
@@ -85,9 +85,9 @@ export default {
             let getParams = {
                 module: '1004',
                 floor: floor,
-                plazaId: this.plazaId
+                plazaId: this.plazaId,
             }
-            queryPic({ getParams }).then(res => {
+            queryPic({ getParams }).then((res) => {
                 // console.log('库房管理图', res)
                 this.picFloorImg = res.data || []
             })
@@ -97,79 +97,35 @@ export default {
             let data = { plazaId: this.plazaId }
             let postParams = []
             if (this.floorsArr.length > 0) {
-                this.floorsArr.forEach(e => {
+                this.floorsArr.forEach((e) => {
                     let obj = {
                         tableName: 'glsms_proimgup',
                         params: {
                             module: '1004',
-                            floor: e.gname
-                        }
+                            floor: e.gcname,
+                        },
                     }
                     postParams.push(obj)
                 })
             }
-            // [
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f6' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f5' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f4' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f3' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f2' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'f1' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'b1' }
-            //     },
-            //     {
-            //         tableName: 'glsms_proimgup',
-            //         params: { module: '1004', floor: 'b2' }
-            //     }
-            // ]
-            queryTab({ data, postParams }).then(res => {
+            queryTab({ data, postParams }).then((res) => {
                 //console.log('查询哪几层楼有图', res)
                 this.floorData = []
                 let data = res.data.data || []
-                data.forEach(el => {
+                data.forEach((el) => {
                     if (el.count > 0) {
-                        let obj = {
-                            gname: el.params.floor,
-                            code: el.params.floor.toUpperCase(),
-                            gcode: el.params.floor
-                                .toUpperCase()
-                                .split('')
-                                .reverse()
-                                .join(''),
-                            seq:
-                                el.params.floor.substring(0, 1) == 'b'
-                                    ? -Number(el.params.floor.substring(1, 2)) + '00'
-                                    : Number(el.params.floor.substring(1, 2)) + '00'
-                        }
-                        this.floorData.push(obj)
+                        this.floorsArr.forEach((item) => {
+                            if (item.gcname == el.params.floor) {
+                                this.floorData.push(item)
+                            }
+                        })
                     }
-                    console.log(this.floorData)
                 })
             })
-        }
+        },
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId'])
+        ...mapGetters(['floorsArr', 'plazaId', 'floorObj']),
     },
     mounted() {
         let module = window.location.href.split('=')[1]
@@ -178,7 +134,7 @@ export default {
         }
         this.everySystem = this.matter[0].children
         this.tabSize()
-    }
+    },
 }
 </script>
 <style lang="less" scoped>

+ 1 - 1
src/views/room/detail.vue

@@ -266,7 +266,7 @@ export default {
                 // type_code: this.row.type_code
             }
             // if (this.floorChange) {
-            //     postParams.gname = this.floorChange
+            //     postParams.gcname = this.floorChange
             // }
             // if (this.row.floorcode) {
             //     postParams.floorcode = this.row.floorcode

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

@@ -671,7 +671,7 @@ export default {
                 }
             }
             // if (this.floorChange) {
-            //     postParams.gname = this.floorChange
+            //     postParams.gcname = this.floorChange
             // }
             queryHxsb({ data, postParams }).then((res) => {
                 this.loading2 = false