Browse Source

fix: 修改部门交互穿插逻辑导致提交异常

deploy-dev
xuziqiang 4 months ago
parent
commit
7745f55803
  1. 11
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

11
hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

@ -495,11 +495,13 @@
formData.value = {}; formData.value = {};
opMap.type = ''; opMap.type = '';
opMap.fuc = ''; opMap.fuc = '';
disabled.value = true;
}; };
const clearRoleData = () => { const clearRoleData = () => {
roleFormData.value = {}; roleFormData.value = {};
opMap.type = ''; opMap.type = '';
opMap.fuc = ''; opMap.fuc = '';
roleDisabled.value = true;
}; };
// //
@ -623,7 +625,8 @@
// tab // tab
roleActiveKey.value = 1; roleActiveKey.value = 1;
//
clearDeptData();
const { selected } = info; const { selected } = info;
if (!selectedKeys?.length) return; if (!selectedKeys?.length) return;
@ -633,6 +636,7 @@
// //
if (!selectRef.value.hasOwnProperty('own') && !selectRef.value.hasOwnProperty('orgInfo')) { if (!selectRef.value.hasOwnProperty('own') && !selectRef.value.hasOwnProperty('orgInfo')) {
// //
formRef.value?.reset();
formData.value = cloneDeep(info.node.dataRef.deptInfo); formData.value = cloneDeep(info.node.dataRef.deptInfo);
} else { } else {
activeKey.value = 1; activeKey.value = 1;
@ -672,10 +676,13 @@
const SelectUserTree = (selectedKeys: any, info: any) => { const SelectUserTree = (selectedKeys: any, info: any) => {
const { selected } = info; const { selected } = info;
// roleDisabled.value = !selected; // roleDisabled.value = !selected;
//
clearRoleData();
if (!selectedKeys?.length) return; if (!selectedKeys?.length) return;
roleTreeSelectedKeys.value = [info.node.key]; roleTreeSelectedKeys.value = [info.node.key];
selectRoleRef.value = info.node.dataRef; selectRoleRef.value = info.node.dataRef;
formRoleRef.value?.reset();
roleFormData.value = cloneDeep(info.node.dataRef); roleFormData.value = cloneDeep(info.node.dataRef);
roleCheckedKeys.value = []; roleCheckedKeys.value = [];
if (selectRoleRef.value?.proleId) { if (selectRoleRef.value?.proleId) {

Loading…
Cancel
Save