|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: Badguy
|
|
|
* @Date: 2022-02-15 11:37:42
|
|
|
- * @LastEditTime: 2022-02-21 17:26:19
|
|
|
+ * @LastEditTime: 2022-02-21 18:27:18
|
|
|
* @LastEditors: your name
|
|
|
* @Description: 编辑账号
|
|
|
* have a nice day!
|
|
@@ -361,8 +361,8 @@ export default {
|
|
|
this.pwdStruc = PwdStruc
|
|
|
this.pwdLengthBegin = PwdLengthBegin
|
|
|
this.pwdLengthEnd = PwdLengthEnd
|
|
|
- this.queryType = OpenGroup ? 'group' : 'all'
|
|
|
this.openRole && (this.roleType = this.openGroup ? 'roleByUpId' : 'onlyRole')
|
|
|
+ this.queryType = this.openRole ? 'group' : 'all'
|
|
|
if (this.doesAccountExist) {
|
|
|
this.userId = this.$route.query.userId
|
|
|
this.getAccountInfo()
|
|
@@ -378,7 +378,7 @@ export default {
|
|
|
UserId: this.userId
|
|
|
})
|
|
|
if (res.code === 0) {
|
|
|
- // console.log(res.returnData)
|
|
|
+ console.log(res.returnData)
|
|
|
const { UserDesc, UserName, GroupList, TacList, AuthList, RoleList, Status } = res.returnData
|
|
|
this.accountForm.name = UserName
|
|
|
this.accountForm.desc = UserDesc
|
|
@@ -423,8 +423,7 @@ export default {
|
|
|
},
|
|
|
// 获取当前权限树勾选项
|
|
|
getPermissionTreeChecked(arr) {
|
|
|
- // console.log(arr)
|
|
|
- this.permissionTreeChckedTemp = arr
|
|
|
+ this.permissionTreeChckedTemp = arr.map(auth => auth.AuthList)
|
|
|
},
|
|
|
// 获取当前编辑的权限规则
|
|
|
getRulesOfCompetency(obj) {
|
|
@@ -482,15 +481,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleSaveEdit() {
|
|
|
- // console.log(this.permissionTreeChckedTemp)
|
|
|
- const AuthList = this.permissionTreeChckedTemp.map(auth => {
|
|
|
- return {
|
|
|
- ...auth.AuthList,
|
|
|
- AuthName: auth.AuthName
|
|
|
- }
|
|
|
- })
|
|
|
const params = {
|
|
|
- AuthList: AuthList,
|
|
|
+ AuthList: this.permissionTreeChckedTemp,
|
|
|
GroupList: this.accountGroupTreeCheckedTemp.map(groupId => ({ GroupId: groupId })),
|
|
|
RoleList: this.roleListCheckedTemp,
|
|
|
TacList: this.loginPolicyCheckedTemp,
|