From 002b322741c9f9577e099356fe8201cea32f7bab Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 11 九月 2023 12:53:25 +0800
Subject: [PATCH] 	modified:   src/components/view/standard.vue

---
 src/components/view/standard.vue |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/components/view/standard.vue b/src/components/view/standard.vue
index b92a1d2..c60f440 100644
--- a/src/components/view/standard.vue
+++ b/src/components/view/standard.vue
@@ -61,7 +61,9 @@
         <div class="contentTable" v-if="this.typeselect == 0">
           <technology  :tableType="tableType" :tableData="tableData"></technology>
         </div>
-        <div v-if="this.typeselect == 1">鎶�鏈寚鏍�</div>
+        <div v-if="this.typeselect == 1">
+          <target :tableType="tableType" :tableData="tableData"></target>
+        </div>
         <div v-if="this.typeselect == 2">
           <bom  :tableType="tableType" :tableData="tableData"></bom>
         </div>
@@ -206,7 +208,7 @@
       // console.log(val);
       this.typeselect = val
 
-      console.log(this.typeselect);
+      // console.log(this.typeselect);
       this.selectVersion()
     },
     handleNodeClick(val) {//鏍戠殑鍊�
@@ -241,13 +243,19 @@
         }
       }).then(res => {
         let arr = res.data;
-        console.log(arr);
-        for(var i=0;i<arr.length;i++){
-            arr[i].id = "0" + i;
-        }
+        this.formatData(arr)
         this.tableData = arr;
       })
     },
+    formatData(data){
+      let arr = data;
+      for(var i=0;i<arr.length;i++){
+            arr[i].rowId = Math.random();
+            if(arr[i].children != undefined){
+              this.formatData(arr[i].children);
+            }
+        }
+    },
     verevent(val) {
       // console.log(val);
       let cc = val.replace('v', '')

--
Gitblit v1.9.3