|
|
@ -128,7 +128,7 @@ |
|
|
|
formLayout="vertical" |
|
|
|
class="form" /> |
|
|
|
</a-tab-pane> |
|
|
|
<a-tab-pane :key="2" tab="角色权限"> |
|
|
|
<a-tab-pane :key="2" tab="角色权限" :disabled="!selectRoleRef"> |
|
|
|
<a-tree |
|
|
|
v-if="rolePermissionTreeData?.length" |
|
|
|
:tree-data="rolePermissionTreeData" |
|
|
@ -501,12 +501,11 @@ |
|
|
|
roleFormData.value = {}; |
|
|
|
opMap.type = ''; |
|
|
|
opMap.fuc = ''; |
|
|
|
selectRoleRef.value = ''; |
|
|
|
roleDisabled.value = true; |
|
|
|
}; |
|
|
|
|
|
|
|
// 部门权限选择 |
|
|
|
const deptCheck = (checked, { halfCheckedKeys }) => { |
|
|
|
const deptCheck = (checked: any, { halfCheckedKeys }: any) => { |
|
|
|
console.log(checked, halfCheckedKeys); |
|
|
|
|
|
|
|
const result = checked.map((item) => { |
|
|
@ -626,11 +625,13 @@ |
|
|
|
|
|
|
|
// 部门切换需要调整角色tab |
|
|
|
roleActiveKey.value = 1; |
|
|
|
|
|
|
|
const { selected } = info; |
|
|
|
if (!selectedKeys?.length) return; |
|
|
|
// 需要重置数据 |
|
|
|
clearDeptData(); |
|
|
|
clearRoleData(); |
|
|
|
const { selected } = info; |
|
|
|
if (!selectedKeys?.length) return; |
|
|
|
selectRoleRef.value = ''; |
|
|
|
|
|
|
|
deptTreeSelectedKeys.value = [info.node.key]; |
|
|
|
selectRef.value = info.node.dataRef; |
|
|
@ -679,8 +680,9 @@ |
|
|
|
const { selected } = info; |
|
|
|
// roleDisabled.value = !selected; |
|
|
|
// 重置原操作逻辑 |
|
|
|
clearRoleData(); |
|
|
|
if (!selectedKeys?.length) return; |
|
|
|
clearRoleData(); |
|
|
|
|
|
|
|
roleTreeSelectedKeys.value = [info.node.key]; |
|
|
|
selectRoleRef.value = info.node.dataRef; |
|
|
|
formRoleRef.value?.reset(); |
|
|
@ -745,7 +747,7 @@ |
|
|
|
opMap.fuc(roleFormData.value).then(() => { |
|
|
|
getUserTree(); |
|
|
|
opMap.type !== 'editRole' && clearRoleData(); |
|
|
|
roleDisabled.value = !roleDisabled.value; |
|
|
|
roleDisabled.value = true; |
|
|
|
NsMessage.success('操作成功'); |
|
|
|
}); |
|
|
|
} |
|
|
|