Просмотр исходного кода

:zap: 删除后清空被选项

smallchill 6 лет назад
Родитель
Сommit
093fd6696a

+ 6 - 0
src/views/authority/apiscope.vue

@@ -439,6 +439,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -480,6 +484,7 @@
         getMenuList(page.currentPage, page.pageSize, params).then(res => {
           this.data = res.data.data;
           this.loading = false;
+          this.selectionClear();
         });
       },
       // 数据权限模块
@@ -596,6 +601,7 @@
           const data = res.data.data;
           this.pageScope.total = data.total;
           this.dataScope = data.records;
+          this.selectionListScope = [];
         });
       },
     }

+ 6 - 0
src/views/authority/datascope.vue

@@ -469,6 +469,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -510,6 +514,7 @@
         getMenuList(page.currentPage, page.pageSize, params).then(res => {
           this.data = res.data.data;
           this.loading = false;
+          this.selectionClear();
         });
       },
       // 数据权限模块
@@ -626,6 +631,7 @@
           const data = res.data.data;
           this.pageScope.total = data.total;
           this.dataScope = data.records;
+          this.selectionListScope = [];
         });
       },
     }

+ 5 - 0
src/views/authority/role.vue

@@ -290,6 +290,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleRole() {
         if (this.selectionList.length !== 1) {
           this.$message.warning("只能选择一条数据");
@@ -349,6 +353,7 @@
             this.option.column[index].dicData = data;
           });
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 6 - 0
src/views/desk/notice.vue

@@ -4,6 +4,7 @@
                :table-loading="loading"
                :data="data"
                :page="page"
+               ref="crud"
                @row-del="rowDel"
                v-model="form"
                :permission="permissionList"
@@ -218,6 +219,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -273,6 +278,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/flow/follow.vue

@@ -162,6 +162,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       currentChange(currentPage) {
         this.page.currentPage = currentPage;
       },
@@ -175,6 +179,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/flow/manager.vue

@@ -233,6 +233,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -323,6 +327,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/flow/model.vue

@@ -211,6 +211,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -307,6 +311,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
         getDictionary({code: 'flow'}).then(res => {
           this.category = res.data.data;

+ 5 - 0
src/views/resource/oss.vue

@@ -230,6 +230,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleEnable(row) {
         this.$confirm("是否确定启用这条配置?", {
           confirmButtonText: "确定",
@@ -291,6 +295,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/client.vue

@@ -242,6 +242,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -285,6 +289,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/dept.vue

@@ -259,6 +259,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
           getDept(this.form.id).then(res => {
@@ -283,6 +287,7 @@
             this.option.column[index].dicData = data;
           });
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/dict.vue

@@ -201,6 +201,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -247,6 +251,7 @@
             this.option.column[index].dicData = data;
           });
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/menu.vue

@@ -260,6 +260,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -301,6 +305,7 @@
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           this.data = res.data.data;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/param.vue

@@ -161,6 +161,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -196,6 +200,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/tenant.vue

@@ -181,6 +181,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -216,6 +220,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/topmenu.vue

@@ -273,6 +273,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       currentChange(currentPage) {
         this.page.currentPage = currentPage;
       },
@@ -286,6 +290,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/system/user.vue

@@ -344,6 +344,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -416,6 +420,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
         getDeptTree(this.form.tenantId).then(res => {
           const index = this.$refs.crud.findColumnIndex("deptId");

+ 5 - 0
src/views/tool/code.vue

@@ -220,6 +220,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -286,6 +290,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/work/claim.vue

@@ -160,6 +160,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleClaim(row) {
         this.$confirm("确定签收此任务?", {
           confirmButtonText: "确定",
@@ -201,6 +205,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/work/done.vue

@@ -153,6 +153,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDetail(row) {
         this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
       },
@@ -177,6 +181,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/work/send.vue

@@ -163,6 +163,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleDetail(row) {
         this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
       },
@@ -187,6 +191,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/work/start.vue

@@ -166,6 +166,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleStart(row) {
         this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`});
       },
@@ -190,6 +194,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }

+ 5 - 0
src/views/work/todo.vue

@@ -160,6 +160,10 @@
       selectionChange(list) {
         this.selectionList = list;
       },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
       handleWork(row) {
         this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` });
       },
@@ -187,6 +191,7 @@
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
+          this.selectionClear();
         });
       }
     }