From cd26c5d0552c80b90a5497754a80cf6b8bd91b8c Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Wed, 9 Apr 2025 21:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=AD=89=E5=BE=85=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Measure.tsx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pages/Measure.tsx b/src/pages/Measure.tsx index a8cf7f3..ebc8e15 100644 --- a/src/pages/Measure.tsx +++ b/src/pages/Measure.tsx @@ -13,7 +13,7 @@ import { useAppDispatch, useAppSelector } from '../utils/hooks'; import { updateTaskState } from '../store/features/measureSlice'; import Bridge from '../utils/bridge'; import { selectLabeledKtjOrgs, updateRailPoints } from '../store/features/baseData'; -import { refreshStationList, updateOrg } from '../store/features/contextSlice'; +import { updateOrg } from '../store/features/contextSlice'; import { selectOrgTextArr } from '../store'; export default function Measure() { @@ -91,6 +91,15 @@ export default function Measure() { }); return; } + if (baseState.ktjOrgs.length === 0) { + Dialog.alert({ + content: '请在基础数据同步完成后重试', + onConfirm: () => { + navigate('/home/mine'); + }, + }); + return; + } if (!contextState.currOrgCode) { Dialog.alert({ content: '请选择铁路局/工务段/线路', @@ -110,6 +119,15 @@ export default function Measure() { }; const onOrgBarClick = async () => { + if (baseState.ktjOrgs.length === 0) { + Dialog.alert({ + content: '请在基础数据同步完成后重试', + onConfirm: () => { + navigate('/home/mine'); + }, + }); + return; + } const value = await Cascader.prompt({ options: labeledKtjOrgs, placeholder: '请选择',