From 9ddf303ca99059fac2d6b83829f2d39c04d1cf5f Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期三, 13 九月 2023 18:04:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.22:9001/r/mom-before

---
 src/components/view/standard-table/target.vue |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/components/view/standard-table/target.vue b/src/components/view/standard-table/target.vue
index 46cc2d9..9524ae4 100644
--- a/src/components/view/standard-table/target.vue
+++ b/src/components/view/standard-table/target.vue
@@ -57,6 +57,8 @@
       data() {
         return {
           selects: [],
+          deleteList:[],
+          isAllSelect:false,
         }
       },
       props:['tableData','tableType'],
@@ -99,13 +101,32 @@
           }
         }
       },
+      //鏀瑰彉閫変腑
+      toggleSelection(row, flag) {
+        this.$set(row, "isChecked", flag);
+        this.$nextTick(() => {
+          if (flag) {
+            this.$refs.multipleTable.toggleRowSelection(row, flag);
+          } else {
+            this.$refs.multipleTable.clearSelection();
+          }
+        });
+      },
       handleSelectionChange(val) {
         this.deleteList = [];
         val.forEach((v) => {
-          if (v.id !== undefined) {
-            this.deleteList.push(v.id);
-          }
+          this.searchIdFun(v);
         });
+        this.$emit("childData",this.deleteList);
+      },
+      //閫掑綊鏌ユ壘閫変腑鏁版嵁id
+      searchIdFun(data){
+        let obj = data;
+        if(obj.children != undefined){
+          this.searchIdFun(obj.children);
+        }else{
+          this.deleteList.push(obj.pid);
+        }
       },
       // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆  缁撴潫
         updateVal(row){
@@ -118,9 +139,6 @@
           }).catch(error=>{
             this.$message.error(error.message);
           })
-        },
-        handleSelectionChange(val) {
-          this.selects = val;
         },
       }
     }
@@ -169,8 +187,8 @@
     /* .standard .el-table__body {
       height: 100%;
     } */
-    .standard .el-table .el-table__row:not([class*="el-table__row--level-"]) td:nth-child(3){
+    /* .standard .el-table .el-table__row:not([class*="el-table__row--level-"]) td:nth-child(3){
       padding-left: 23px !important;
-     }
+     } */
   </style>
   
\ No newline at end of file

--
Gitblit v1.9.3