zhulizhen1111 4 years ago
parent
commit
0677be8d93

+ 19 - 18
src/store/index.js

@@ -1,6 +1,6 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import { login, queryFloor, queryfmapID } from '@/api/login.js'
+import Vue from "vue"
+import Vuex from "vuex"
+import { login, queryFloor, queryfmapID } from "@/api/login.js"
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
@@ -8,15 +8,15 @@ export default new Vuex.Store({
         permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
         plazas: [], //项目列表
         userInfo: {
-            employeename: '', //用户名称:艾宇;
-            orgCode: '',
-            username: 'lengqiang', //账户名称
+            employeename: "", //用户名称:艾宇;
+            orgCode: "",
+            username: "lengqiang", //账户名称
         },
-        plazaId: '1000423',
-        projectName: '', //全局项目名称
+        plazaId: "1000423",
+        projectName: "", //全局项目名称
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
-        fmapID: '',
+        fmapID: "",
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
@@ -42,8 +42,9 @@ export default new Vuex.Store({
             state.floorsArr = data
             if (data.length > 0) {
                 data.forEach((e) => {
+                    console.log(e)
                     let obj = {
-                        id: e.code,
+                        id: e.gname,
                         name: e.code,
                     }
                     state.floorSelect.push(obj)
@@ -60,19 +61,19 @@ export default new Vuex.Store({
             await login({
                 username: palyload,
             }).then((res) => {
-                if (res.result == 'success') {
-                    commit('SETISREQUESTtAUTH', true)
-                    commit('SETAUTHMSG', res)
+                if (res.result == "success") {
+                    commit("SETISREQUESTtAUTH", true)
+                    commit("SETAUTHMSG", res)
                 } else {
-                    console.log('接口报错!!')
-                    commit('SETISREQUESTtAUTH', false)
+                    console.log("接口报错!!")
+                    commit("SETISREQUESTtAUTH", false)
                 }
             })
         },
         getFloors(context) {
             queryFloor({ plazaId: context.state.plazaId }).then((res) => {
-                if (res.result == 'success') {
-                    context.commit('SETFLOORS', res.data)
+                if (res.result == "success") {
+                    context.commit("SETFLOORS", res.data)
                 }
             })
         },
@@ -80,7 +81,7 @@ export default new Vuex.Store({
             await queryfmapID({
                 mapId: context.state.plazaId,
             }).then((res) => {
-                context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
+                context.commit("SETMAPID", `${context.state.plazaId}_${res.mapVersion}`)
             })
         },
     },

+ 3 - 3
src/utils/plugins/components.js

@@ -462,17 +462,17 @@ var system = [
                         {
                             label: "给水系统专项维修",
                             id: "GSZW1",
-                            param: { tab_code: "1592", diff: "gs" },
+                            param: { tab_code: "1592", difference: "给水" },
                         },
                         {
                             label: "排水系统专项维修",
                             id: "GSZW2",
-                            param: { tab_code: "1593", diff: "ps" },
+                            param: { tab_code: "1593", difference: "排水" },
                         },
                         {
                             label: "其他事项",
                             id: "GSQT",
-                            param: { tab_code: "1594", diff: "" },
+                            param: { tab_code: "1594", difference: "" },
                         },
                     ],
                 },

+ 20 - 6
src/views/equipment/eqDialog.vue

@@ -33,16 +33,13 @@
                 <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
                     <el-tab-pane
                         v-for='(value,index) in dialogInfo.children'
+                        v-if='value.id.slice(2,4)!="YL"'
                         :key='"u"+index'
                         :label='`${value.label}`'
                         :name='`${value.param.tab_code}`'
                     >
-                        <!-- 有tab的原理图 -->
-                        <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
-                            <rotation :rotationImg='rotationImg'></rotation>
-                        </div>
                         <!-- 主要设备清单 标准设备表格加tab -->
-                        <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
+                        <tableList v-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
                         <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
                         <!-- 维保表格 -->
                         <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' :tabLabel='tabLabel' :diff='diff' :major='dialogInfo.id'></wb-table>
@@ -53,6 +50,23 @@
                         <!-- 其他 -->
                         <other-table v-else-if='value.id.slice(2,4)=="QT"' ref='qtList' :tabLabel='tabLabel' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
                     </el-tab-pane>
+                    <template v-for='(value,index) in dialogInfo.children'>
+                        <template v-for='(eve,index1) in tabCount'>
+                            <template v-if='eve.typecode == value.param.type_code'>
+                                <el-tab-pane
+                                    :key='index1+index'
+                                    :label='`${value.label}`'
+                                    :name='`${value.param.type_code}`'
+                                    v-if='value.id.slice(2,4)=="YL" && eve.count>0'
+                                >
+                                    <!-- 有tab的原理图 -->
+                                    <div style='width:100%;height:600px;overflow:hidden'>
+                                        <rotation :rotationImg='rotationImg'></rotation>
+                                    </div>
+                                </el-tab-pane>
+                            </template>
+                        </template>
+                    </template>
                 </el-tabs>
             </div>
         </el-dialog>
@@ -206,7 +220,7 @@ export default {
             queryTab({ data, postParams }).then(res => {
                 this.tabCount = []
                 console.log('res', res)
-                let data = res.data || []
+                let data = res.data.data || []
                 data.forEach(el => {
                     this.tabCount.push({
                         count: el.count,

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

@@ -46,7 +46,7 @@
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
             <el-table-column prop='floorcode' label='楼层' width='100'>
-                <template slot-scope='{row}'>{{row.floor || '--'}}</template>
+                <template slot-scope='{row}'>{{row.floorcode || '--'}}</template>
             </el-table-column>
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.wzjc || '--'}}</template>
@@ -127,7 +127,7 @@ export default {
             //下拉
             if (this.floor) {
                 console.log(this.floor)
-                postParams.floor = this.floor
+                postParams.gname = this.floor
             }
             console.log(this.floor)
             //输入框搜索

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

@@ -47,7 +47,7 @@
                 <template slot-scope='{row}'>{{row.sbxh || '--'}}</template>
             </el-table-column>
             <el-table-column prop='floor' label='楼层' width='100'>
-                <template slot-scope='{row}'>{{row.floor || '--'}}</template>
+                <template slot-scope='{row}'>{{row.floorcode || '--'}}</template>
             </el-table-column>
             <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.manufacturer || '--'}}</template>
@@ -132,7 +132,7 @@ export default {
             }
             //下拉
             if (this.floor) {
-                data.floor = this.floor
+                data.gname = this.floor
             }
             //输入框搜索
             data.keyword = ''