Commit 5ccf12d5 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化办事指南事项管理

parent ede15671
......@@ -158,6 +158,7 @@ const sourceType = {
0: "一体化添加",
1: "手动添加",
};
import { uniqueObjArray } from "@/utils";
export default {
components: {
......@@ -272,6 +273,8 @@ export default {
// 搜索
onSearch() {
this.searchForm.page = 1;
this.selectedRowKeys = [];
this.selectedRows = [];
this.getMatterSiteData();
},
......@@ -308,15 +311,12 @@ export default {
// 勾选
onSelectChange(keys, rows) {
this.selectedRowKeys = keys;
this.selectedRows = [...this.selectedRows, ...rows];
let res = new Map();
this.selectedRows = this.selectedRows
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.includes(v.id);
});
this.selectedRows = uniqueObjArray([
...this.selectedRows,
...rows,
]).filter((v) => {
return this.selectedRowKeys.includes(v.id);
});
},
setBatchAgent() {
......
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