|
|
@ -495,11 +495,13 @@ |
|
|
|
formData.value = {}; |
|
|
|
opMap.type = ''; |
|
|
|
opMap.fuc = ''; |
|
|
|
disabled.value = true; |
|
|
|
}; |
|
|
|
const clearRoleData = () => { |
|
|
|
roleFormData.value = {}; |
|
|
|
opMap.type = ''; |
|
|
|
opMap.fuc = ''; |
|
|
|
roleDisabled.value = true; |
|
|
|
}; |
|
|
|
|
|
|
|
// 部门权限选择 |
|
|
@ -623,7 +625,8 @@ |
|
|
|
|
|
|
|
// 部门切换需要调整角色tab |
|
|
|
roleActiveKey.value = 1; |
|
|
|
|
|
|
|
// 需要重置数据 |
|
|
|
clearDeptData(); |
|
|
|
const { selected } = info; |
|
|
|
if (!selectedKeys?.length) return; |
|
|
|
|
|
|
@ -633,6 +636,7 @@ |
|
|
|
// 确定是否是企业 |
|
|
|
if (!selectRef.value.hasOwnProperty('own') && !selectRef.value.hasOwnProperty('orgInfo')) { |
|
|
|
// 部门 |
|
|
|
formRef.value?.reset(); |
|
|
|
formData.value = cloneDeep(info.node.dataRef.deptInfo); |
|
|
|
} else { |
|
|
|
activeKey.value = 1; |
|
|
@ -672,10 +676,13 @@ |
|
|
|
const SelectUserTree = (selectedKeys: any, info: any) => { |
|
|
|
const { selected } = info; |
|
|
|
// roleDisabled.value = !selected; |
|
|
|
|
|
|
|
// 重置原操作逻辑 |
|
|
|
clearRoleData(); |
|
|
|
if (!selectedKeys?.length) return; |
|
|
|
roleTreeSelectedKeys.value = [info.node.key]; |
|
|
|
selectRoleRef.value = info.node.dataRef; |
|
|
|
formRoleRef.value?.reset(); |
|
|
|
|
|
|
|
roleFormData.value = cloneDeep(info.node.dataRef); |
|
|
|
roleCheckedKeys.value = []; |
|
|
|
if (selectRoleRef.value?.proleId) { |
|
|
|