From f37845dd0a787dd42bf6c72e923433f30fcd8cc3 Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期四, 03 七月 2025 15:40:09 +0800 Subject: [PATCH] 实时模拟 --- src/api/trApi.js | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/api/trApi.js b/src/api/trApi.js index 4b64eb5..f826b82 100644 --- a/src/api/trApi.js +++ b/src/api/trApi.js @@ -81,6 +81,28 @@ throw error; } } + +// 瀹炴椂妯℃嫙鐨勭粨鏋� +export async function getSimresult(ids) { + try { + const res = await instance.get(`/simu/results?id=${ids}`); + return res.data; + } catch (error) { + console.error("Error deleting simulation data:", error); + throw error; + } +} + +// 缁撴潫瀹炴椂妯℃嫙 +export async function stopSim(ids) { + try { + const res = await instance.get(`/simu/stop?id=${ids}`); + return res.data; + } catch (error) { + console.error("Error deleting simulation data:", error); + throw error; + } +} // ************************************************************************************************************** // 瑙f瀽json鑾峰彇娉ョ煶娴佸弬鏁� export function parseWaterSimulationData(jsonData) { -- Gitblit v1.9.3