|
@@ -258,7 +258,6 @@ export default {
|
|
|
} else {
|
|
|
this.editRoleFunc()
|
|
|
}
|
|
|
- this.resetForm('ruleForm')
|
|
|
} else {
|
|
|
return false
|
|
|
}
|
|
@@ -275,6 +274,7 @@ export default {
|
|
|
const res = await SaveRole(this.ruleForm);
|
|
|
if (res.code === 0) {
|
|
|
this.$message.success(res.message);
|
|
|
+ this.resetForm('ruleForm');
|
|
|
this.gueryRole({
|
|
|
QueryName: this.keyWords,
|
|
|
PageSize: this.PageSize,
|
|
@@ -294,10 +294,7 @@ export default {
|
|
|
RoleId: id,
|
|
|
});
|
|
|
if (res.code === 0) {
|
|
|
- const { RoleName, RoleDesc, RoleStatus } = res.returnData;
|
|
|
- this.ruleForm.RoleName = RoleName;
|
|
|
- this.ruleForm.RoleDesc = RoleDesc;
|
|
|
- this.ruleForm.RoleStatus = RoleStatus;
|
|
|
+ this.ruleForm = res.returnData;
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -308,14 +305,10 @@ export default {
|
|
|
//确认保存
|
|
|
async editRoleFunc () {
|
|
|
try {
|
|
|
- const res = await EditRole({
|
|
|
- RoleName: this.ruleForm.RoleName,
|
|
|
- RoleDesc: this.ruleForm.RoleDesc,
|
|
|
- RoleStatus: this.ruleForm.RoleStatus,
|
|
|
- RoleId: this.roleId,
|
|
|
- });
|
|
|
+ const res = await EditRole(this.ruleForm);
|
|
|
if (res.code === 0) {
|
|
|
this.$message.success(res.message);
|
|
|
+ this.resetForm('ruleForm');
|
|
|
this.gueryRole({
|
|
|
QueryName: this.keyWords,
|
|
|
PageSize: this.PageSize,
|