From 85d35dcc5899e54128e63a11ad8da2fec6e9394f Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期六, 26 八月 2023 15:43:56 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before --- src/views/basicData/index.vue | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/views/basicData/index.vue b/src/views/basicData/index.vue index 576920a..952955e 100644 --- a/src/views/basicData/index.vue +++ b/src/views/basicData/index.vue @@ -136,7 +136,7 @@ <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" - row-key="name" + row-key="id" border height="calc(100vh - 250px)" default-expand-all @@ -347,20 +347,17 @@ // 鑷畾涔� if (this.isAllSelect) { val.forEach((i) => { - let isExist = false; - this.deleteList.findIndex((c) => { - if (c === i.id) { - isExist = true; - } - }); - if (!isExist && i.id !== undefined) { + if (i.id !== undefined) { this.deleteList.push(i.id); + } else { + i.children.forEach((c) => { + this.deleteList.push(c.id); + }); } }); } else { this.deleteList.splice(0, this.deleteList.length); } - // 鑷畾涔夌粨鏉� }, //閫夋嫨鏌愯 selectTr(selection, row) { -- Gitblit v1.9.3