This commit is contained in:
ljx
2025-09-09 11:46:44 +08:00
parent 23ceb718e9
commit 3579ff100f

View File

@ -228,8 +228,13 @@ const getMaterialsListData = async () => {
label: item.materialsName + '_' + item.createTime, label: item.materialsName + '_' + item.createTime,
children: [] children: []
})); }));
queryParams.value.materialsId = TreeData.value[0].id; if (TreeData.value.length > 0) {
getList(); queryParams.value.materialsId = TreeData.value[0].id;
getList();
} else {
queryParams.value.materialsId = '';
getList();
}
} }
}; };
@ -453,7 +458,7 @@ const listeningProject: WatchStopHandle = watch(
Object.values(childRowStates.value).forEach((state) => { Object.values(childRowStates.value).forEach((state) => {
state.queryParams.projectId = newId; state.queryParams.projectId = newId;
}); });
getList(); getMaterialsListData();
} }
); );