Browse Source

Merge branch 'develop' of git.sagacloud.cn:web/wanda-bm-guide into develop

guoxiaohuan 4 years ago
parent
commit
6f0a2e1c74

+ 2 - 1
src/components/Legend/src/legend.vue

@@ -487,11 +487,12 @@ export default {
         queryRemarksMethods() {},
         init() {
             // 图例
+            bus.$off('queryViewMethods') //解决触发多次监听
             bus.$on('queryViewMethods', () => {
-                // console.log('queryViewMethods')
                 this.queryView(false)
             })
             // 备注
+            bus.$off('queryRemarksMethods')
             bus.$on('queryRemarksMethods', res => {
                 let remarksText = ''
                 if (res) {

+ 24 - 8
src/store/index.js

@@ -1,7 +1,13 @@
 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'
 
@@ -148,8 +154,12 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({ commit }, palyload) {
-            await login({ returnTree: true }).then((res) => {
+        async getUserInfo({
+            commit
+        }, palyload) {
+            await login({
+                returnTree: true
+            }).then((res) => {
                 // 获取用户当前权限
                 if (res.result === 'success') {
                     commit('STOREACCESSLEVEL', res.level)
@@ -160,7 +170,9 @@ export default new Vuex.Store({
                         commit('SETPLAZENAME', data.plazaName)
                         localStorage.setItem('PLAZAID', data.plazaId)
                         commit('STOREPLAZAID', data.plazaId)
-                        router.push({ path: './home/homepage' })
+                        router.push({
+                            path: './home/homepage'
+                        })
                     } else {
                         if (level === 0) {
                             if (res.treeData[0].ccode) {
@@ -168,9 +180,13 @@ export default new Vuex.Store({
                                 commit('STOREPLAZAID', res.treeData[0].ccode)
                                 commit('SETPLAZENAME', res.treeData[0].cname)
                             }
-                            router.push({ path: './home/homepage' })
+                            router.push({
+                                path: './home/homepage'
+                            })
                         } else {
-                            router.push({ path: './group' })
+                            router.push({
+                                path: './group'
+                            })
                         }
                     }
                     // commit('SETISREQUESTtAUTH', false)
@@ -214,4 +230,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 5 - 2
src/views/equipment/eqDialog.vue

@@ -75,7 +75,7 @@
                                     :name='`${value.param.type_code}`'
                                     v-if='value.id.slice(2,4)=="YL" && value.param.type_code.slice(0,3)=="FBT"'
                                 >
-                                    <fenbuPic ref='fenbutu' :typecode='value.param.type_code'></fenbuPic>
+                                    <fenbuPic ref='fenbutu' v-if='showFenbuPic' :typecode='value.param.type_code'></fenbuPic>
                                 </el-tab-pane>
                             </template>
                         </template>
@@ -114,7 +114,8 @@ export default {
             tabLabel: '',
             tabCount: [],
             sizePic: '',
-            imgInfo: {}
+            imgInfo: {},
+            showFenbuPic: false //显示楼层分布组件
         }
     },
     mounted() {},
@@ -161,6 +162,7 @@ export default {
                 this.initImage(this.typecode)
             }
             if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode.slice(0, 3) == 'FBT') {
+                this.showFenbuPic = true
                 this.$nextTick(() => {
                     this.$refs.fenbutu[0] && this.$refs.fenbutu[0].openFloorMap()
                 })
@@ -271,6 +273,7 @@ export default {
          *  关闭弹窗,传回父组件,在父组件内 处理逻辑(关闭弹窗)
          */
         closeModal() {
+            this.showFenbuPic = false
             this.$emit('closeModal', true)
         }
     }

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

@@ -28,7 +28,13 @@
                     </div>
                     <div class='eq-content'>
                         <div class='legend-boxs'>
-                            <Legend :systemName='systemName' :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层${systemName}平面图`'></Legend>
+                            <Legend
+                                :key='keyLd'
+                                :systemName='systemName'
+                                :floors='floorsArr'
+                                type='1'
+                                :editTips='`编辑${floorInfo.code}层${systemName}平面图`'
+                            ></Legend>
                         </div>
                         <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
                         <div class='additional-box' v-if='fqPic.length>0'>
@@ -87,6 +93,7 @@ export default {
             type: '',
             objCount: [],
             keyFL: 'keyFL' + new Date().getTime(),
+            keyLd: 'keyLd_' + new Date().getTime(),
             ShowDialog: false //是否显示弹窗
         }
     },
@@ -150,6 +157,7 @@ export default {
         closeModal(flag) {
             this.ShowDialog = false
             this.keyFL = 'keyFL' + new Date().getTime()
+            this.keyLd = 'keyLd' + new Date().getTime()
         },
         //附加数据图片查看 showView为3展示状态
         additionalColl() {

+ 26 - 14
src/views/room/index.vue

@@ -878,6 +878,31 @@ export default {
 </script>
 <style lang="less" scoped>
 .compute-box {
+    /deep/ .el-dialog {
+        // padding: 16px 20px 20px;
+        overflow: hidden;
+        .el-dialog__header {
+            padding: 0;
+            font-size: 16px;
+            font-family: PingFangSC-Medium, PingFang SC;
+            font-weight: 500;
+            color: rgba(0, 0, 0, 0.85);
+            height: 60px;
+            line-height: 60px;
+            background: #f1f2f2;
+            padding-left: 20px;
+            // padding-bottom: 16px;
+        }
+        .el-dialog__headerbtn {
+            top: 0;
+        }
+        .el-dialog__body {
+            padding: 0 24px;
+            .is-active {
+                background: rgba(2, 91, 170, 0.15);
+            }
+        }
+    }
     .compute-zf {
         width: 15px;
         height: 13px;
@@ -971,26 +996,13 @@ export default {
 </style>
 <style lang="less">
 .compute-box {
-    .el-dialog {
-        padding: 16px 20px 20px;
-        overflow: hidden;
-        .el-dialog__header {
-            padding: 0;
-            font-size: 16px;
-            font-family: PingFangSC-Medium, PingFang SC;
-            font-weight: 500;
-            color: rgba(0, 0, 0, 0.85);
-            line-height: 24px;
-            padding-bottom: 16px;
-        }
-    }
     .compute-tab {
         .el-dialog__title {
             font-size: 16px;
             font-family: PingFangSC-Medium, PingFang SC;
             font-weight: 500;
             color: rgba(0, 0, 0, 0.85);
-            line-height: 24px;
+            line-height: 60px;
         }
         .el-dialog__body {
             padding: 0 24px;