Jelajahi Sumber

1. bug fix 设备设施 弹窗组件,楼层下拉菜单 bug修复
2.feat 设备设施 左侧 查看图纸 --> 弹出的弹窗 title隐藏 图标(进入详情)

yx 4 tahun lalu
induk
melakukan
d35de98b41

+ 3 - 1
src/views/equipment/eqDialog.vue

@@ -5,8 +5,10 @@
             <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
             <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
                 <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span>
+                <!-- 2020-7-12 查看图纸时 隐藏图标(查看入口) -->
+                <!-- v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"' -->
                 <img
-                    v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"'
+                    v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP" && dialogInfo.label !== "查看图纸"'
                     src='../../assets/imgs/zy1.png'
                     @click='visibalBox'
                     style='margin-top:-4px;'

+ 24 - 10
src/views/equipment/table/djspTable.vue

@@ -44,7 +44,7 @@ import { Select } from 'meri-design'
 import EqDetail from './eqDetaileDialog'
 import { queryShops } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
-
+import store from '../../../store/index'
 export default {
     components: { Select, EqDetail },
     data() {
@@ -102,16 +102,17 @@ export default {
                 console.log(res)
                 this.tableData = []
                 let floor = {}
-                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 => {
-                            console.log(k)
-                            this.tableData.push(k)
+                res.data &&
+                    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 => {
+                                console.log(k)
+                                this.tableData.push(k)
+                            })
                         })
                     })
-                })
 
                 this.tableData.map(n => {
                     if (floor[n.floor] === 0) {
@@ -132,12 +133,25 @@ export default {
                 this.getList()
             }
         },
-        floor() {
+        /* floor() {
+            console.log('watch floor')
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {
+        console.log('商铺电表数 mounted')
         this.floor = this.$cookie.get('floorMapId')
+        console.log(this.floor)
         this.getList()
     }
 }

+ 13 - 2
src/views/equipment/table/eqListTable.vue

@@ -60,7 +60,7 @@
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.wzjc || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width="300">
+            <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width='300'>
                 <template slot-scope='{row}'>{{row.manufacturer || '--'}}</template>
             </el-table-column>
         </el-table>
@@ -86,6 +86,7 @@ import { Select } from 'meri-design'
 import EqDetail from './eqDetaileDialog'
 import { queryEquipmentList } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
+import store from '../../../store/index'
 
 export default {
     components: { Select, EqDetail },
@@ -162,9 +163,19 @@ export default {
                 this.getList()
             }
         },
-        floor(newV, oldV) {
+        /* floor(newV, oldV) {
             console.log(newV, oldV)
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {

+ 13 - 1
src/views/equipment/table/standTable.vue

@@ -85,6 +85,8 @@ import EqDetail from './eqDetaileDialog'
 
 import { mapGetters } from 'vuex'
 import { Select } from 'meri-design'
+import store from '../../../store/index'
+
 export default {
     data() {
         return {
@@ -170,8 +172,18 @@ export default {
                 this.getList()
             }
         },
-        floor(newV, oldV) {
+        /* floor(newV, oldV) {
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {