Commit 267cba6a authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents ea0c43ae b2c3e441
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<a-layout-header class="header"> <a-layout-header class="header">
<div class="flex aic"> <div class="flex aic">
<router-link to="/" class="flex aic"> <router-link to="/" class="flex aic">
<img width="32" src="@/assets/img/logo.png" /> <!-- <img width="32" src="@/assets/img/logo.png" /> -->
<h1 style="padding-left: 10px">{{ systemName }}</h1> <h1>{{ systemName }}</h1>
</router-link> </router-link>
<HeaderSite class="ml20"></HeaderSite> <HeaderSite class="ml20"></HeaderSite>
</div> </div>
......
...@@ -354,19 +354,17 @@ export default { ...@@ -354,19 +354,17 @@ export default {
onSelectLeftRow(record, selected) { onSelectLeftRow(record, selected) {
if (selected && record.children && record.children.length) { if (selected && record.children && record.children.length) {
record.children.forEach((v) => { record.children.forEach((v) => {
this.selectedLeftRowKeys.push(v.id); this.selectedLeftRowKeys= [...new Set([...this.selectedLeftRowKeys,v.id])]
this.deleteData.push(v); this.deleteData=[...new Set([...this.deleteData,v])];
}); });
} else if (selected) { } else if (!selected) {
this.selectedLeftRowKeys.push(record.id);
this.deleteData.push(record);
} else {
this.selectedLeftRowKeys = this.selectedLeftRowKeys.filter( this.selectedLeftRowKeys = this.selectedLeftRowKeys.filter(
(v) => v != record.id (v) => v != record.id
); );
this.deleteData = this.deleteData.filter((v) => { this.deleteData = this.deleteData.filter((v) => {
return this.selectedLeftRowKeys.some((val) => v.id == val); return v.id !=record.id
}); });
} }
}, },
// 批量删除 // 批量删除
......
...@@ -190,11 +190,11 @@ export default { ...@@ -190,11 +190,11 @@ export default {
}, },
changePage() {}, changePage() {},
onSelectRow(record, selected) { onSelectRow(record, selected) {
if (selected && record.children.length) { if (selected && record.children && record.children.length) {
record.children.forEach((v) => { record.children.forEach((v) => {
this.rowKeys.push(v.id); this.rowKeys = [...new Set([...this.rowKeys,v.id])]
}); });
} else { } else if(!selected) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id); this.rowKeys = this.rowKeys.filter((v) => v != record.id);
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment