|
@ -1,6 +1,6 @@ |
|
|
/* eslint-disable array-callback-return */ |
|
|
/* eslint-disable array-callback-return */ |
|
|
import { Button, Form, Input, message, Select, InputNumber, Cascader, Row, Col } from "antd"; |
|
|
import { Button, Form, Input, message, Select, InputNumber, Cascader, Row, Col } from "antd"; |
|
|
import { useEffect, useState } from "react"; |
|
|
|
|
|
|
|
|
import { useEffect, useRef, useState } from "react"; |
|
|
import { useNavigate } from "react-router"; |
|
|
import { useNavigate } from "react-router"; |
|
|
import { saveMeasurement_new } from "../../../services/measure/analysis"; |
|
|
import { saveMeasurement_new } from "../../../services/measure/analysis"; |
|
|
import { useAppSelector } from "../../../utils/hooks"; |
|
|
import { useAppSelector } from "../../../utils/hooks"; |
|
@ -9,8 +9,7 @@ import { |
|
|
dictionaryListService, |
|
|
dictionaryListService, |
|
|
queryStationData |
|
|
queryStationData |
|
|
} from "../../../services/ktj/org"; |
|
|
} from "../../../services/ktj/org"; |
|
|
import { useAppDispatch } from "../../../utils/hooks"; |
|
|
|
|
|
import { setOrgData } from "../../../store/ktj/orgState"; |
|
|
|
|
|
|
|
|
import type { InputRef } from 'antd/es/input'; |
|
|
import type { |
|
|
import type { |
|
|
OrgItem, |
|
|
OrgItem, |
|
|
GwdDicItem, |
|
|
GwdDicItem, |
|
@ -41,12 +40,17 @@ export default function MeasureConfig() { |
|
|
const [xbCodeOptions, setXbCodeOptions] = useState<dataSourceOptions[]>() |
|
|
const [xbCodeOptions, setXbCodeOptions] = useState<dataSourceOptions[]>() |
|
|
const [unitTypeList, setUnitTypeList] = useState<unitTypesOptions[]>([]) |
|
|
const [unitTypeList, setUnitTypeList] = useState<unitTypesOptions[]>([]) |
|
|
const [unitType, setUnitType] = useState<number>() |
|
|
const [unitType, setUnitType] = useState<number>() |
|
|
|
|
|
|
|
|
|
|
|
const inputRef = useRef<InputRef>(null); |
|
|
useEffect(()=>{ |
|
|
useEffect(()=>{ |
|
|
queryDictionaryList() |
|
|
queryDictionaryList() |
|
|
resetRailTypes() |
|
|
resetRailTypes() |
|
|
resetDataSource() |
|
|
resetDataSource() |
|
|
queryRailData() |
|
|
queryRailData() |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
if(inputRef.current){ |
|
|
|
|
|
inputRef.current.focus() |
|
|
|
|
|
} |
|
|
|
|
|
}, 100) |
|
|
}, []) |
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -331,7 +335,7 @@ export default function MeasureConfig() { |
|
|
name="name" |
|
|
name="name" |
|
|
rules={[{ required: true, message: "请输入测量名称" }]} |
|
|
rules={[{ required: true, message: "请输入测量名称" }]} |
|
|
> |
|
|
> |
|
|
<Input className="label-vh" placeholder="请输入测量名称" /> |
|
|
|
|
|
|
|
|
<Input ref={inputRef} className="label-vh" placeholder="请输入测量名称" /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
<Form.Item |
|
|
<Form.Item |
|
|
label={resetLabel('铁路局')} |
|
|
label={resetLabel('铁路局')} |
|
|