update
This commit is contained in:
@@ -111,6 +111,9 @@ const navList = ref<any>([]);
|
||||
const visible = ref(true);
|
||||
const viewType = ref('1'); // 1文件模式 2作业模式
|
||||
const loading = ref(false);
|
||||
if (props.defaultExpandedKeys.length > 0) {
|
||||
localStorage.setItem('DATA_OVERVIEW_NAV_LIST', '[]');
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.templateId,
|
||||
@@ -141,13 +144,18 @@ const openDefaultExpandedFun = (baseData: any) => {
|
||||
// 1s后打开默认节点
|
||||
setTimeout(() => {
|
||||
if (baseData.length > 0 && props.defaultExpandedKeys.length > 0) {
|
||||
const projectData = baseData.find((i: any) => i.id === props.defaultExpandedKeys[0]);
|
||||
// 来自数据总览的匹配id,来自项目列表的匹配relatedResourceUuid
|
||||
const projectData = baseData.find(
|
||||
(item: any) =>
|
||||
item.id === props.defaultExpandedKeys[0] ||
|
||||
item.relatedResourceUuid === props.defaultExpandedKeys[0]
|
||||
);
|
||||
navListStorageData = projectData ? [projectData] : [];
|
||||
}
|
||||
navList.value = navListStorageData;
|
||||
expandedKeys.value = navList.value.map((i: any) => i.id);
|
||||
currentKey.value = navList.value[navList.value.length - 1].id;
|
||||
}, 1000);
|
||||
currentKey.value = navList.value[navList.value.length - 1]?.id || '';
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文件数据" name="projectData">
|
||||
<DataOverView
|
||||
v-if="displayedTabs.includes('projectData')"
|
||||
:defaultExpandedKeys="[]"
|
||||
v-if="displayedTabs.includes('projectData') && projectUuid"
|
||||
:defaultExpandedKeys="[projectUuid]"
|
||||
hideAddBtn
|
||||
hideTree
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user