瀏覽代碼

解决issue #309 #300

zhangdaihao 5 年之前
父節點
當前提交
6c5060236d

+ 1 - 1
ant-design-vue-jeecg/src/views/system/DepartList.vue

@@ -363,7 +363,7 @@
       },
       onClearSelected() {
         this.hiding = true
-        this.checkedKeys = {}
+        this.checkedKeys = []
         this.currSelected = {}
         this.form.resetFields()
         this.selectedKeys = []

+ 8 - 0
ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue

@@ -208,6 +208,14 @@
         deleteAction(that.url.delete, {depId: this.currentDeptId, userId: id}).then((res) => {
           if (res.success) {
             that.$message.success(res.message);
+            if (this.selectedRowKeys.length>0){
+               for(let i =0; i<this.selectedRowKeys.length;i++){
+                   if (this.selectedRowKeys[i] == id){
+                     this.selectedRowKeys.splice(i,1);
+                     break;
+                   }
+               }
+            }
             that.loadData();
           } else {
             that.$message.warning(res.message);