瀏覽代碼

系统原理图默认选中

zhulizhen1111 4 年之前
父節點
當前提交
662ee37478
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/views/equipment/eqDialog.vue

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

@@ -120,16 +120,18 @@ export default {
             this.dialogInfo = item
             this.dialogInfo = item
             if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
             if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
                 this.activeName = this.dialogInfo.children[0].param.tab_code
                 this.activeName = this.dialogInfo.children[0].param.tab_code
-                this.typecode = this.dialogInfo.children[0].param.type_code
                 this.diff = this.dialogInfo.children[0].param.diff
                 this.diff = this.dialogInfo.children[0].param.diff
                 if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
                 if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
+                    this.typecode = this.dialogInfo.children[0].param.type_code
+                    this.activeName = this.typecode
                     this.isShowTab()
                     this.isShowTab()
                     this.initImage(this.typecode)
                     this.initImage(this.typecode)
                 }
                 }
             } else {
             } else {
                 this.activeName = this.dialogInfo.param.tab_code
                 this.activeName = this.dialogInfo.param.tab_code
-                this.typecode = this.dialogInfo.param.type_code
                 if (this.dialogInfo.id.slice(2, 4) == 'YL') {
                 if (this.dialogInfo.id.slice(2, 4) == 'YL') {
+                    this.typecode = this.dialogInfo.param.type_code
+                    this.activeName = this.typecode
                     this.isShowTab()
                     this.isShowTab()
                     this.initImage(this.typecode)
                     this.initImage(this.typecode)
                 }
                 }
@@ -240,7 +242,7 @@ export default {
                         typecode: el.params.typecode
                         typecode: el.params.typecode
                     })
                     })
                 })
                 })
-                this.$emit('emitCount',this.tabCount)
+                this.$emit('emitCount', this.tabCount)
             })
             })
         }
         }
     }
     }