zhaohy 4 months ago
parent
commit
06ee0ec6a4
  1. 4
      hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts
  2. 16
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

4
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,

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

@ -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('操作成功');
});
}

Loading…
Cancel
Save