Przeglądaj źródła

判断没图不显示tab

zhulizhen1111 4 lat temu
rodzic
commit
571af357e7

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

@@ -628,6 +628,11 @@ var system = [
                     id: "TJYL",
                     children: [
                         {
+                            label: "北面外立面",
+                            id: "RQYL",
+                            param: { tab_code: "2343", type_code: "2029" },
+                        },
+                        {
                             label: "西面外立面",
                             id: "RQYL",
                             param: { tab_code: "2340", type_code: "2027" },
@@ -642,11 +647,6 @@ var system = [
                             id: "RQYL",
                             param: { tab_code: "2342", type_code: "2026" },
                         },
-                        {
-                            label: "北面外立面",
-                            id: "RQYL",
-                            param: { tab_code: "2343", type_code: "2029" },
-                        },
                     ],
                 },
                 {

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

@@ -200,7 +200,8 @@ export default {
                 this.rotationImg = res.data || []
             })
         },
-        //原理图没图片不显示tab
+        //原理图没图片不显示tab 因为供电和燃气系统没有tab所以分开判断
+        //这个方法是判断有tab的count>0的时候显示tab
         isShowTab() {
             let data = {
                 plazaId: this.$store.state.plazaId,
@@ -211,6 +212,7 @@ export default {
                 postParams.push({
                     params: {
                         typecode: this.dialogInfo.param.type_code,
+                        system: this.smsxt,
                         module: '1002'
                     },
                     tableName: 'glsms_proimgup'
@@ -220,6 +222,7 @@ export default {
                     postParams.push({
                         params: {
                             typecode: el.param.type_code,
+                            system: this.smsxt,
                             module: '1002'
                         },
                         tableName: 'glsms_proimgup'
@@ -233,9 +236,11 @@ export default {
                 data.forEach(el => {
                     this.tabCount.push({
                         count: el.count,
+                        system: el.params.system,
                         typecode: el.params.typecode
                     })
                 })
+                this.$emit('emitCount',this.tabCount)
             })
         }
     }

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

@@ -9,12 +9,10 @@
         </div>
         <div class='eq-bottom'>
             <div class='eq-left'>
-                <ul>
+                <ul v-for='(eve,index) in everySystem' :key='"o"+index'>
                     <li
                         class='li-style'
-                        :class='{"is-active": eve.id}'
-                        v-for='(eve,index) in everySystem'
-                        :key='"o"+index'
+                        :class='{"is-active": eve.id}' 
                         @click='dialogVisible(eve)'
                     >
                         <span class='circle'></span>
@@ -47,7 +45,7 @@
                 </div>
             </div>
         </div>
-        <eq-dialog ref='dialog' :systemName='systemName' :smsxt='smsxt'></eq-dialog>
+        <eq-dialog ref='dialog' :systemName='systemName' :smsxt='smsxt' @emitCount='emitCount'></eq-dialog>
     </div>
 </template>
 
@@ -79,7 +77,8 @@ export default {
             show: false,
             fqPic: [],
             loadName: '',
-            type: ''
+            type: '',
+            objCount:[]
         }
     },
     components: { floorList, eqDialog, floorMap, editList },
@@ -97,6 +96,10 @@ export default {
             }
             this.init()
         },
+        //判断有没有原理图,如果没有则不出现系统原理图列表li
+        emitCount(objCount){
+            this.objCount = objCount
+        },
         emitFloor(item) {
             this.floorInfo = item
             this.$refs.floorMap.init(this.floorInfo.gname)

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

@@ -78,7 +78,7 @@
             </el-table-column>
             <el-table-column label='更换配件信息' align='center'>
                 <el-table-column prop='ischangepj' label='是/否更换'>
-                    <template slot-scope='{row}'>{{row.ischangepj || '--'}}</template>
+                    <template slot-scope='{row}'>{{row.ismodel==1?'是':(row.ismodel==0?"否" :'--')}}</template>
                 </el-table-column>
                 <el-table-column prop='model' label='配件名称型号' width='130' show-overflow-tooltip resizable>
                     <template slot-scope='{row}'>{{row.model || '--'}}</template>

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

@@ -86,7 +86,7 @@
             </el-table-column>
             <el-table-column label='更换配件信息' align='center'>
                 <el-table-column prop='ischangepj' label='是/否更换'>
-                    <template slot-scope='{row}'>{{row.ischangepj || '--'}}</template>
+                    <template slot-scope='{row}'>{{row.ismodel==1?'是':(row.ismodel==0?"否" :'--')}}</template>
                 </el-table-column>
                 <el-table-column prop='model' label='配件名称型号' width='130' show-overflow-tooltip resizable>
                     <template slot-scope='{row}'>{{row.model || '--'}}</template>