fix: 权限问题处理
This commit is contained in:
parent
cb32ba47ef
commit
09e7735391
|
@ -202,13 +202,6 @@
|
|||
>重置密码</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-switch
|
||||
v-model="form.enable"
|
||||
active-text="启用"
|
||||
inactive-text="禁用"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<el-form-item label="权限分配" prop="permissionCodes">
|
||||
|
@ -551,7 +544,7 @@ export default {
|
|||
)
|
||||
if (accountDetails) {
|
||||
this.form.permissionCodes = accountDetails.permissionCodes || []
|
||||
this.form.enable = accountDetails.enabled
|
||||
this.form.enable = accountDetails.status === 1
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionTree.setCheckedKeys(this.form.permissionCodes)
|
||||
})
|
||||
|
@ -606,8 +599,15 @@ export default {
|
|||
this.$message.error('请先选择要更新的商户账号')
|
||||
return
|
||||
}
|
||||
const selectedAccount = this.merchantAccountList.find(
|
||||
item => item.merchantId === this.form.merchantId
|
||||
)
|
||||
if (!selectedAccount) {
|
||||
this.$message.error('无法找到所选商户的详细信息')
|
||||
return
|
||||
}
|
||||
const permissionsData = {
|
||||
merchantAccountId: this.form.merchantId,
|
||||
merchantAccountId: selectedAccount.merchantAccountId,
|
||||
permissionCodes: this.form.permissionCodes,
|
||||
marketId
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue