From bbed0e3ff3958b754d1c7239003ad956befb7c50 Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Thu, 25 Jul 2024 15:54:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/equipmentManage/ledger/config.ts | 4 ++-- .../view/organizationManage/departmentManage/index.vue | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts index 3420345..ee4ccbe 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts +++ b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts @@ -159,7 +159,7 @@ export const tableConfig = (orgId) => { // labelField: 'deviceName', // valueField: 'deviceName', filterOption: (input: string, option: any) => { - return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; + return option.deviceName?.toLowerCase().indexOf(input.toLowerCase()) >= 0; }, showSearch: true, immediate: true, @@ -231,7 +231,7 @@ export const tableConfig = (orgId) => { // labelField: 'manufacturer', // valueField: 'manufacturer', filterOption: (input: string, option: any) => { - return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; + return option.manufacturer?.toLowerCase().indexOf(input.toLowerCase()) >= 0; }, showSearch: true, immediate: true, diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index 94741d4..c8a6eea 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -128,7 +128,7 @@ formLayout="vertical" class="form" /> - + { + 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('操作成功'); }); }