Browse Source

Merge pull request #1044 from colinin/fix-organization-expanded-keys

fix(vben5-identity): remove the organization expanded keys
pull/1059/head
yx lin 1 year ago
committed by GitHub
parent
commit
59a5341215
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitTree.vue

4
apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitTree.vue

@ -49,14 +49,12 @@ const actionsMap: ContextMenuActionMap = {
}; };
const organizationUnits = ref<DataNode[]>([]); const organizationUnits = ref<DataNode[]>([]);
const expandedKeys = ref<string[]>([]);
const loadedKeys = ref<string[]>([]); const loadedKeys = ref<string[]>([]);
const selectedKey = ref<string>(); const selectedKey = ref<string>();
/** 刷新组织机构树 */ /** 刷新组织机构树 */
async function onRefresh() { async function onRefresh() {
loadedKeys.value = []; loadedKeys.value = [];
expandedKeys.value = [];
const { items } = await getRootListApi(); const { items } = await getRootListApi();
organizationUnits.value = items.map((item) => { organizationUnits.value = items.map((item) => {
return { return {
@ -82,7 +80,6 @@ async function onLoad(node: EventDataNode) {
}; };
}); });
organizationUnits.value = [...organizationUnits.value]; organizationUnits.value = [...organizationUnits.value];
expandedKeys.value.push(nodeKey);
loadedKeys.value.push(nodeKey); loadedKeys.value.push(nodeKey);
} }
@ -162,7 +159,6 @@ watchEffect(() => {
</Button> </Button>
</template> </template>
<Tree <Tree
:expanded-keys="expandedKeys"
:load-data="onLoad" :load-data="onLoad"
:loaded-keys="loadedKeys" :loaded-keys="loadedKeys"
:tree-data="organizationUnits" :tree-data="organizationUnits"

Loading…
Cancel
Save