From 8b0998883dcd92f4f6b69f0f24a5fa6cf183d544 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 25 Oct 2026 20:38:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(E04):=202D=20=EC=B5=9C=EC=86=8C=20=3D=20GET?= =?UTF-8?q?=20=E2=80=A6/stab/result2d=20=C2=B7=20=EA=B5=AC=EA=B0=84=20?= =?UTF-8?q?=EB=B0=94=EB=80=8C=EB=A9=B4=20=EB=8A=98=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=EB=B3=B8=20=EB=8B=A4=EC=8B=9C=20=EC=97=B6=20(533-3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- E04_Stab3D/E04_Stab3D_UI_Page.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/E04_Stab3D/E04_Stab3D_UI_Page.ts b/E04_Stab3D/E04_Stab3D_UI_Page.ts index d75dc1d6d..8cad3b057 100644 --- a/E04_Stab3D/E04_Stab3D_UI_Page.ts +++ b/E04_Stab3D/E04_Stab3D_UI_Page.ts @@ -3,7 +3,7 @@ * E04 안정성평가 3D 해석(요구 347-1 · 요구서 4-2 · 4-3 · PLAN 533-3) — B05~B09 틀(group_workflow). * 좌 = 구간 목록 · 탐색 설정(기본 · 고급 접힘) · [해석] · 진행률 · [끊기] * 가운데 = 평면 지도(셀별 최소 안전율 · 임계 체적) · [3D 보기](지표 + 노선면 + 임계 활동면) - * 우 = 구간 결과(3D 최소 · 2D 최소(같은 구간) · 3D/2D 비 · 체적 · 방법) + * 우 = 구간 결과(3D 최소 · 2D 최소(같은 구간 E03 측점 fs_min 최소) · 3D/2D 비 · 체적 · 방법) * 계산 = 서버 단독(POST …/stab/analyze3d · 뒤에서) · 화면은 값 · 그림만. 탐색 설정 = sessionStorage. * ========================================================================== */ @@ -74,13 +74,13 @@ async function api(path: string, init?: RequestInit): Promise { return body; } -/** E03 2D 측점 결과(sub2 · GET …/stab/section) — 없으면 빈 목록 */ +/** E03 2D 측점 요약(GET …/stab/result2d · stations[].fs_min · 측점 하나에 깎기 · 쌓기 두 줄) — 없으면 빈 목록 */ async function fetch2d( projectId: string, ): Promise<{ chainage_m: number; fs_min: number | null }[]> { try { const body = await api<{ stations?: Record[] }>( - `/projects/${projectId}/stab/section`, + `/projects/${projectId}/stab/result2d`, ); return (body.stations ?? []).map((s) => ({ chainage_m: Number(s.chainage_m), @@ -233,12 +233,13 @@ export function renderE04Stab3D(root: HTMLElement): void { const remember = (): void => sessionStorage.setItem(cacheKey(projectId), JSON.stringify(settings.read())); + let shownKey = ""; settings.onChange(() => { remember(); const { start_m, end_m } = settings.read(); map.setRange(start_m, end_m); paintSections(); - if (result && result.key !== sectionKey(start_m, end_m)) void openResult(); + if (shownKey !== sectionKey(start_m, end_m)) void openResult(); }); function paintButtons(): void { @@ -285,13 +286,12 @@ export function renderE04Stab3D(root: HTMLElement): void { } function paintResult(): void { - const { start_m, end_m } = settings.read(); if (!result) { resultBody.replaceChildren(el("p", { className: "e04-empty", text: t("E04_Result_None") })); return; } const s = result.summary; - const f2d = min2d(stations2d, start_m, end_m); + const f2d = min2d(stations2d, s.start_m, s.end_m); const ratio = ratio3d2d(s.f_min, f2d); const station = overview?.stations.reduce( (best, x) => @@ -331,6 +331,7 @@ export function renderE04Stab3D(root: HTMLElement): void { async function openResult(): Promise { const { start_m, end_m } = settings.read(); const key = sectionKey(start_m, end_m); + shownKey = key; const saved = overview?.saved.some((s) => s.key === key); result = saved ? await api(`/projects/${projectId}/stab/result3d?key=${key}`).catch(() => null)