diff --git a/client/src/views/ability/cma.vue b/client/src/views/ability/cma.vue index 11c9083..746c6a9 100644 --- a/client/src/views/ability/cma.vue +++ b/client/src/views/ability/cma.vue @@ -435,6 +435,7 @@ export default { this.getList(); this.getList2(); this.getGroup(); + this.getGroup2(); }, handleFilter() { this.listQuery.page = 1; @@ -443,6 +444,7 @@ export default { this.listQuery2.search = this.listQuery.search; this.getList2(); this.getGroup(); + this.getGroup2(); }, handleAdd() { this.cma = Object.assign({}, defaultCMA); @@ -485,6 +487,13 @@ export default { this.listQuery.page = 1; this.getList(); }, + filterChange2(obj) { + for (let key in obj) { + this.listQuery2[key] = obj[key][0]; + } + this.listQuery2.page = 1; + this.getList2(); + }, async confirm(form) { this.$refs[form].validate((valid) => { if (valid) { diff --git a/client/src/views/ability/cma2.vue b/client/src/views/ability/cma2.vue index aa0058d..8b4e756 100644 --- a/client/src/views/ability/cma2.vue +++ b/client/src/views/ability/cma2.vue @@ -89,7 +89,7 @@ highlight-current-row max-height="700" ref="filterTable" - @selection-change="handleSelectionChange"> + @selection-change="handleSelectionChange" @filter-change="filterChange" > { this.groupBy[key] = response.data; - console.log(this.groupBy); }); } }, @@ -372,7 +371,6 @@ export default { }); }) .catch((err) => { - console.error(err); }); }, @@ -399,7 +397,6 @@ export default { }) }) .catch((err) => { - console.error(err); }); }, @@ -407,6 +404,7 @@ export default { this.multipleSelection = val; }, filterChange(obj) { + console.log(obj) for (let key in obj) { this.listQuery[key] = obj[key][0]; } diff --git a/server/apps/ability/views.py b/server/apps/ability/views.py index 7b68b5c..639493d 100644 --- a/server/apps/ability/views.py +++ b/server/apps/ability/views.py @@ -432,84 +432,49 @@ def import_cma2(filename, path): CMA.objects.filter(sszx=sszx, type='sub').delete() i = 3 max_row = sheet.max_row + defaultv = {} while i