guoxiaohuan 4 rokov pred
rodič
commit
b13ce11ba6

+ 2 - 3
src/components/floorMap/index.vue

@@ -34,7 +34,7 @@ export default {
             mapServerURL: `http://map.wanda.cn/editor`,
             canvasWidth: 600,
             canvasHeight: 800,
-            loading: false, // 限制重复查询
+            loading: true, // 限制重复查询
             view: null,
             urlMsg: {},
             canvasID: 'canvas',
@@ -68,7 +68,7 @@ export default {
     methods: {
         ...mapActions(['getfmapID']),
         init(floorid) {
-            // this.loading = true
+            this.loading = true
             this.floorid = floorid
             this.mapSize()
             this.$refs.canvasFun.isShow = false
@@ -129,7 +129,6 @@ export default {
                     this.$store.commit('SETISMESSAGE', false)
                     return
                 } else {
-                    console.log('data[0].Elements.Node', data)
                     if (
                         data.Data[0].Elements.Nodes.length === 0 &&
                         data.Data[0].Elements.Markers.length === 0 &&

+ 2 - 2
src/store/index.js

@@ -8,8 +8,8 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        // ssoToken: 'admin:lengqiang',
-        ssoToken: null,
+        ssoToken: 'admin:lengqiang',
+        // ssoToken: null,
         plazaName: '',
         isPreview: false,
         lastRoute: '',

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

@@ -167,7 +167,7 @@ export default {
         },
 
         visibalBox() {
-            this.$refs.Dialog.open(this.dialogInfo.id)
+            this.$refs.Dialog.open(this.smsxt)
         },
         //系统原理图接口
         initImage(typecode) {

+ 44 - 38
src/views/equipment/table/recordDialog.vue

@@ -3,14 +3,21 @@
     <div class='detail-dialog'>
         <el-dialog :title='`${major}${tabName}记录事项`' width='80%' :visible.sync='visible' style='height:900px;overflow-y:scroll;'>
             <div class='bottom-table' style='height:600px'>
-                <el-table :data='tableData' height='560' :border='true' style='width: 100%;margin-bottom:12px;' :span-method='objectSpanMethod'>
-                    <el-table-column label='位置' prop width='120' show-overflow-tooltip resizable>
+                <el-table
+                    :data='tableData'
+                    height='560'
+                    :border='true'
+                    style='width: 100%;margin-bottom:12px;'
+                    :span-method='objectSpanMethod'
+                    v-if='tableData.length>0'
+                >
+                    <el-table-column label='位置' prop width='230' show-overflow-tooltip resizable>
                         <template slot-scope='{row}'>{{row.smswz || '--'}}</template>
                     </el-table-column>
-                    <el-table-column prop='system' label='设备' width='200' show-overflow-tooltip resizable>
+                    <el-table-column label='设备' width='280' resizable>
                         <template slot-scope='{row}'>{{row.smsasset || '--'}}</template>
                     </el-table-column>
-                    <el-table-column prop='matter' label='记录事项' show-overflow-tooltip resizable>
+                    <el-table-column label='记录事项' show-overflow-tooltip resizable>
                         <template slot-scope='{row}'>
                             <p class='p-style' v-for='(item,index) in row.children' :key='item.sn'>{{index+1}}) {{item.matter}}</p>
                         </template>
@@ -33,35 +40,36 @@ export default {
         }
     },
     methods: {
-        open(major) {
-            if (major.slice(2, 4) == 'WX') {
-                this.tabName = '维修'
-            } else if (major.slice(2, 4) == 'WB') {
-                this.tabName = '维保'
-            } else if (major.slice(2, 4) == 'ZW') {
-                this.tabName = '专维'
-            } else if (major.slice(2, 4) == 'QT') {
-                this.tabName = '其他'
-            }
-            if (major.slice(0, 2) == 'GD') {
-                this.major = '供电系统'
-            } else if (major.slice(0, 2) == 'XF') {
-                this.major = '消防系统'
-            } else if (major.slice(0, 2) == 'GPS') {
-                this.major = '给排水系统'
-            } else if (major.slice(0, 2) == 'DT') {
-                this.major = '电梯系统'
-            } else if (major.slice(0, 2) == 'RQ') {
-                this.major = '燃气系统'
-            } else if (major.slice(0, 2) == 'RD') {
-                this.major = '弱电系统'
-            } else if (major.slice(0, 2) == 'NT') {
-                this.major = '暖通系统'
-            } else if (major.slice(0, 2) == 'TJ') {
-                this.major = '土建系统'
-            }
+        open(smsxt) {
+            // console.log(major)
+            // if (major.slice(2, 4) == 'WX') {
+            //     this.tabName = '维修'
+            // } else if (major.slice(2, 4) == 'WB') {
+            //     this.tabName = '维保'
+            // } else if (major.slice(2, 4) == 'ZW') {
+            //     this.tabName = '专维'
+            // } else if (major.slice(2, 4) == 'QT') {
+            //     this.tabName = '其他'
+            // }
+            // if (major.slice(0, 2) == 'GD') {
+            //     this.major = '供电系统'
+            // } else if (major.slice(0, 2) == 'XF') {
+            //     this.major = '消防系统'
+            // } else if (major.slice(0, 2) == 'GPS') {
+            //     this.major = '给排水系统'
+            // } else if (major.slice(0, 2) == 'DT') {
+            //     this.major = '电梯系统'
+            // } else if (major.slice(0, 2) == 'RQ') {
+            //     this.major = '燃气系统'
+            // } else if (major.slice(0, 2) == 'RD') {
+            //     this.major = '弱电系统'
+            // } else if (major.slice(0, 2) == 'NT') {
+            //     this.major = '暖通系统'
+            // } else if (major.slice(0, 2) == 'TJ') {
+            //     this.major = '土建系统'
+            // }
             this.visible = true
-            this.getRecordList(this.major)
+            this.getRecordList(smsxt)
         },
         objectSpanMethod({ row, column, rowIndex, columnIndex }) {
             if (columnIndex === 0) {
@@ -77,12 +85,13 @@ export default {
                 }
             }
         },
-        getRecordList(major) {
+        getRecordList(smsxt) {
             let getParams = {
-                system: major,
+                system_code: smsxt,
                 plazaId: this.$store.state.plazaId
             }
             queryRecord({ getParams }).then(res => {
+                this.tableData = []
                 res.data.forEach(i => {
                     i.children.forEach((j, index) => {
                         this.tableData.push({
@@ -94,22 +103,19 @@ export default {
                     })
                 })
             })
-            //console.log(this.tabName)
         }
     },
     mounted() {}
 }
 </script>
 <style lang="less" scoped>
-.detail-dialog {
-}
 </style>
 <style lang="less" scoped>
 .detail-dialog {
     .el-dialog__wrapper {
         overflow: hidden !important;
     }
-   /deep/.el-dialog {
+    /deep/.el-dialog {
         margin-top: 7vh !important;
         overflow-y: scroll !important;
     }