Sfoglia il codice sorgente

原理图tab对应的typecode

zhulizhen1111 4 anni fa
parent
commit
222c3d5971
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      src/views/equipment/eqDialog.vue

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

@@ -170,6 +170,7 @@ export default {
         },
         //点击tab函数
         handleClick(tab) {
+            console.log(tab)
             if (this.param) {
                 this.param = tab.name
             } else if (this.smsxt) {
@@ -178,7 +179,12 @@ export default {
             this.activeName = tab.name
             //原理图的tab怎么传typecode
             if (this.dialogInfo.children.length > 0) {
-                this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
+                this.dialogInfo.children.forEach(el=>{
+                    if(tab.label == el.label){
+                        this.typecode = el.param.type_code
+                    }
+                })
+                //this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
                 this.diff = this.dialogInfo.children[`${tab.index}`].param.diff
                 this.difference = this.dialogInfo.children[`${tab.index}`].param.difference
             }