仿真结束弹框调整

This commit is contained in:
fan 2024-01-30 17:29:01 +08:00
parent 9531f7bfa3
commit c487a649d4

View File

@ -325,12 +325,14 @@ watch(
} }
); );
const errorSimulation = ref(false); const errorSimulation = ref(false);
const simulationOver = ref(false);
watch( watch(
() => testManageStore.socketInfo, () => testManageStore.socketInfo,
(val) => { (val) => {
if ( if (
val.simulationId == simulationId && val.simulationId == simulationId &&
val.state == state.SimulationStatus.SimulationState.Destroy val.state == state.SimulationStatus.SimulationState.Destroy &&
!simulationOver.value
) { ) {
$q.dialog({ $q.dialog({
title: '提示', title: '提示',
@ -342,7 +344,8 @@ watch(
} else if ( } else if (
val.simulationId == simulationId && val.simulationId == simulationId &&
val.state === state.SimulationStatus.SimulationState.Error && val.state === state.SimulationStatus.SimulationState.Error &&
!errorSimulation.value !errorSimulation.value &&
!simulationOver.value
) { ) {
errorSimulation.value = true; errorSimulation.value = true;
$q.dialog({ $q.dialog({
@ -366,6 +369,7 @@ function destroySimAndBack() {
try { try {
if (simulationId) { if (simulationId) {
$q.loading.show(); $q.loading.show();
simulationOver.value = true;
await destroySimulation({ simulationId }); await destroySimulation({ simulationId });
} }
backConfirm(); backConfirm();