项目启动添加loading

This commit is contained in:
joylink_fanyuhong 2024-10-09 14:11:13 +08:00
parent fbdf490a30
commit 7f102ad837
2 changed files with 5 additions and 0 deletions

View File

@ -175,6 +175,7 @@ let scene: null | IGraphicScene = null;
onMounted(async () => {
const dom = document.getElementById('line-app-container');
$q.loading.hide();
if (dom && defaultMapId && simulationId) {
lineStore.setMapId(+defaultMapId);
lineStore.setSimulationId(simulationId);

View File

@ -225,6 +225,9 @@ function onCreate() {
myForm.value?.validate().then(async (res) => {
if (res) {
if (operateDisabled.value) return;
$q.loading.show({
delay: 400, // ms
});
await startSimulationByProject(+createInfo.id, +createInfo.runConfigId);
}
});
@ -336,6 +339,7 @@ function joinTest(val: SimulationItem) {
projectId: val.projectId,
};
router.push({ path: '/linemap', query });
// $q.loading.hide();
}
function endTest(val: SimulationItem) {
operateDisabled.value = true;