Browse Source

账号新增按钮启用

zhongxiaoyu 2 years ago
parent
commit
aeb9419a9b
1 changed files with 19 additions and 19 deletions
  1. 19 19
      src/views/accountManagement/components/accountEdit.vue

+ 19 - 19
src/views/accountManagement/components/accountEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: Badguy
  * @Date: 2022-02-15 11:37:42
- * @LastEditTime: 2022-04-26 14:09:40
+ * @LastEditTime: 2022-05-10 18:03:53
  * @LastEditors: your name
  * @Description: 编辑账号
  * have a nice day!
@@ -521,24 +521,24 @@ export default {
       })
     },
     handleSaveEdit() {
-      // const params = {
-      //   AuthList: this.permissionTreeChckedTemp,
-      //   GroupList: this.accountGroupTreeCheckedTemp.map(groupId => ({ GroupId: groupId })),
-      //   RoleList: this.roleListCheckedTemp,
-      //   TacList: this.loginPolicyCheckedTemp,
-      //   UserDesc: this.accountForm.desc,
-      //   UserName: this.accountForm.name,
-      //   UserPwd: this.accountForm.pwd
-      // }
-      // if (this.doesAccountExist) {
-      //   this.saveEditAccount({
-      //     ...params,
-      //     UserId: this.userId,
-      //     Status: this.accountForm.status
-      //   })
-      // } else {
-      //   this.saveAddAccount(params)
-      // }
+      const params = {
+        AuthList: this.permissionTreeChckedTemp,
+        GroupList: this.accountGroupTreeCheckedTemp.map(groupId => ({ GroupId: groupId })),
+        RoleList: this.roleListCheckedTemp,
+        TacList: this.loginPolicyCheckedTemp,
+        UserDesc: this.accountForm.desc,
+        UserName: this.accountForm.name,
+        UserPwd: this.accountForm.pwd
+      }
+      if (this.doesAccountExist) {
+        this.saveEditAccount({
+          ...params,
+          UserId: this.userId,
+          Status: this.accountForm.status
+        })
+      } else {
+        this.saveAddAccount(params)
+      }
     },
     // 编辑账号
     async saveEditAccount(params) {