Procházet zdrojové kódy

原理图tab对应的typecode

zhulizhen1111 před 4 roky
rodič
revize
222c3d5971
1 změnil soubory, kde provedl 7 přidání a 1 odebrání
  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
             }