|
@ -70,15 +70,39 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f |
|
|
{ value: '管廊', label: '管廊' }]} /> |
|
|
{ value: '管廊', label: '管廊' }]} /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
<div style={{}}> |
|
|
<div style={{}}> |
|
|
{/* /^\d+$|^\d*\.\d+$/g */} |
|
|
|
|
|
<Form.Item label="所在地区:" labelCol={{ span: 11 }} labelAlign='right' name="longitude" initialValue={modelData?.longitude} style={{ display: 'inline-block', width: 'calc(60% - 30px)', }} |
|
|
<Form.Item label="所在地区:" labelCol={{ span: 11 }} labelAlign='right' name="longitude" initialValue={modelData?.longitude} style={{ display: 'inline-block', width: 'calc(60% - 30px)', }} |
|
|
// rules={[{ required: true, message: '请输入横坐标', },]}
|
|
|
rules={[{ required: true, message: '',},{ |
|
|
|
|
|
validator: (rule, value, callback) => { |
|
|
|
|
|
const sjh = /^\d+$|^\d*\.\d+$/g; |
|
|
|
|
|
if (value) { |
|
|
|
|
|
let valid = sjh.test(value); |
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
return callback([new Error("横坐标填写错误")]); |
|
|
|
|
|
} |
|
|
|
|
|
callback(); |
|
|
|
|
|
} |
|
|
|
|
|
return callback([new Error("请输入横坐标")]); |
|
|
|
|
|
} |
|
|
|
|
|
}]} |
|
|
> |
|
|
> |
|
|
<Input placeholder="经度支持数字" /> |
|
|
<Input placeholder="经度支持数字" /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
~ |
|
|
~ |
|
|
<Form.Item name="latitude" initialValue={modelData?.latitude} style={{ display: 'inline-block', width: 'calc(40% + 15px)', }} |
|
|
<Form.Item name="latitude" initialValue={modelData?.latitude} style={{ display: 'inline-block', width: 'calc(40% + 15px)', }} |
|
|
// rules={[{ required: true, message: '请输入纵坐标', },]}
|
|
|
rules={[{ required: true, message: '', }, { |
|
|
|
|
|
validator: (rule, value, callback) => { |
|
|
|
|
|
const sjh = /^\d+$|^\d*\.\d+$/g; |
|
|
|
|
|
if (value) { |
|
|
|
|
|
let valid = sjh.test(value); |
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
return callback([new Error("纵坐标填写错误")]); |
|
|
|
|
|
} |
|
|
|
|
|
callback(); |
|
|
|
|
|
} |
|
|
|
|
|
return callback([new Error("请输入纵坐标")]); |
|
|
|
|
|
} |
|
|
|
|
|
}]} |
|
|
> |
|
|
> |
|
|
<Input placeholder="维度支持数字" /> |
|
|
<Input placeholder="维度支持数字" /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|