From 2b9d46439fb9983fbde1de463af0c667f55b1eac Mon Sep 17 00:00:00 2001
From: FlyFive <826323891@qq.com>
Date: 星期一, 26 十月 2020 16:31:51 +0800
Subject: [PATCH] update ruoyi-ui/src/views/system/dept/index.vue. 验证的提示信息错了
---
ruoyi-ui/src/views/system/role/index.vue | 37 ++++++++++++++++---------------------
1 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index 9c760f6..279c466 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -368,18 +368,18 @@
// 鎵�鏈夎彍鍗曡妭鐐规暟鎹�
getMenuAllCheckedKeys() {
// 鐩墠琚�変腑鐨勮彍鍗曡妭鐐�
- let checkedKeys = this.$refs.menu.getHalfCheckedKeys();
+ let checkedKeys = this.$refs.menu.getCheckedKeys();
// 鍗婇�変腑鐨勮彍鍗曡妭鐐�
- let halfCheckedKeys = this.$refs.menu.getCheckedKeys();
+ let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
// 鎵�鏈夐儴闂ㄨ妭鐐规暟鎹�
getDeptAllCheckedKeys() {
// 鐩墠琚�変腑鐨勯儴闂ㄨ妭鐐�
- let checkedKeys = this.$refs.dept.getHalfCheckedKeys();
+ let checkedKeys = this.$refs.dept.getCheckedKeys();
// 鍗婇�変腑鐨勯儴闂ㄨ妭鐐�
- let halfCheckedKeys = this.$refs.dept.getCheckedKeys();
+ let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
@@ -440,6 +440,7 @@
menuIds: [],
deptIds: [],
menuCheckStrictly: true,
+ deptCheckStrictly: true,
remark: undefined
};
this.resetForm("form");
@@ -536,20 +537,16 @@
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys();
updateRole(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
});
} else {
this.form.menuIds = this.getMenuAllCheckedKeys();
addRole(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
});
}
}
@@ -560,11 +557,9 @@
if (this.form.roleId != undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys();
dataScope(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.openDataScope = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.openDataScope = false;
+ this.getList();
});
}
},
@@ -580,7 +575,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ })
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -593,7 +588,7 @@
return exportRole(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ })
}
}
};
--
Gitblit v1.9.3