From 4c5c20a7c03539104df74072b1b8a81b51c19ab8 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 14 九月 2023 10:42:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/view/standard-table/product.vue | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/view/standard-table/product.vue b/src/components/view/standard-table/product.vue index 95a0782..c3c13d2 100644 --- a/src/components/view/standard-table/product.vue +++ b/src/components/view/standard-table/product.vue @@ -35,9 +35,9 @@ /* .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> <template> <div class="standard"> @@ -69,7 +69,7 @@ </el-table-column> <el-table-column prop="productFather" label="椤圭洰"> <template slot-scope="scope"> - <el-tag type="info" v-if="scope.row.productFather != null">03</el-tag> + <el-tag type="info" v-if="scope.row.productFather != null">04</el-tag> <span>{{scope.row.productFather}}</span> </template> </el-table-column> @@ -85,11 +85,12 @@ deviceGroupDialog:false, selects: [], isAllSelect:false, + deleteList:[], } }, props:['tableData','tableType'], methods:{ - // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆 + // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆 // 鍏ㄩ��/鍙栨秷閫夋搷浣� selectAll(val) { this.isAllSelect = !this.isAllSelect; @@ -125,13 +126,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.tqid); + } }, // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆 缁撴潫 } -- Gitblit v1.9.3