Rmengdi 1 anno fa
parent
commit
30f95e255e
1 ha cambiato i file con 10 aggiunte e 8 eliminazioni
  1. 10 8
      pdaaphm-ui/src/views/dataManage/contrast/index.vue

+ 10 - 8
pdaaphm-ui/src/views/dataManage/contrast/index.vue

@@ -179,14 +179,16 @@ export default {
         this.chart2.dispose()
         this.chart2 = null
       }
-      if (this.ioSubList)
-        this.ioSubList.forEach(item => {
-          if (item.type === '1') {
-            this.handleCSV(item.path, item.type)
-          } else if (item.type === '2' && item.name === '输出1') {
-            this.handleCSV(item.path, item.type)
-          }
-        })
+      if (this.ioSubList){
+        let firstInput = this.ioSubList.find(item => item.type === "1" && item.path.includes(".csv"));
+        let firstOut = this.ioSubList.find(item => item.type === "2" && item.path.includes(".csv"));
+        if (firstInput) {
+          this.handleCSV(firstInput.path, firstInput.type)
+        }
+        if(firstOut){
+          this.handleCSV(firstOut.path, firstOut.type)
+        }
+      }
     },
     /** 创建连接算法大类型和算法子类列表的map */
     createTypeMap() {