Browse Source

fix:保存提示1

master
guoapeng 2 months ago
parent
commit
6ec40470df
  1. 10
      src/pages/MeasureSave.tsx
  2. 22
      src/services/apiTypes.ts

10
src/pages/MeasureSave.tsx

@ -120,14 +120,14 @@ export default function MeasureSave() {
tljCode: tlj,
gwdCode: gwd,
xmCode: xm,
xbCode: XB_CODES.find((x) => x.value === directionCode[0])!.label,
xbCode: XB_CODES.find((x) => x.value === directionCode[0])?.label,
stationCode:
stationCode.length > 0
? contextState.stationList.find((s) => s.value === stationCode[0])!.label
? contextState.stationList.find((s) => s.value === stationCode[0])?.label
: '',
lineClassify: LINE_CLASSIFY.find((l) => l.value === lineClassCode[0])!.label,
dataSource: DATA_SOURCE.find((d) => d.value === dataSourceCode[0])!.label,
unitType: UNIT_TYPES.find((u) => u.value === unitType[0])!.label,
lineClassify: LINE_CLASSIFY.find((l) => l.value === lineClassCode[0])?.label,
dataSource: DATA_SOURCE.find((d) => d.value === dataSourceCode[0])?.label,
unitType: UNIT_TYPES.find((u) => u.value === unitType[0])?.label,
mile: +mile,
meter: +meter,
};

22
src/services/apiTypes.ts

@ -62,17 +62,17 @@ export type MeasurementDTO = {
};
export type ExtraDesc = {
railSize: string;
tljCode: string;
gwdCode: string;
xmCode: string;
xbCode: string;
stationCode: string;
lineClassify: string;
dataSource: string;
unitType: string;
mile: number;
meter: number;
railSize?: string;
tljCode?: string;
gwdCode?: string;
xmCode?: string;
xbCode?: string;
stationCode?: string;
lineClassify?: string;
dataSource?: string;
unitType?: string;
mile?: number;
meter?: number;
};
export type StationItem = { key: string; value: string };

Loading…
Cancel
Save