Browse Source

fix: bug修改

deploy-dev
xuziqiang 4 months ago
parent
commit
bbed0e3ff3
  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', // labelField: 'deviceName',
// valueField: 'deviceName', // valueField: 'deviceName',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; return option.deviceName?.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}, },
showSearch: true, showSearch: true,
immediate: true, immediate: true,
@ -231,7 +231,7 @@ export const tableConfig = (orgId) => {
// labelField: 'manufacturer', // labelField: 'manufacturer',
// valueField: 'manufacturer', // valueField: 'manufacturer',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; return option.manufacturer?.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}, },
showSearch: true, showSearch: true,
immediate: true, immediate: true,

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

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

Loading…
Cancel
Save