2024-09-23 14:06:03 +08:00
|
|
|
import React,{useState,useEffect} from 'react'
|
|
|
|
|
import { Row, Col, Form, Input, DatePicker, Button,Upload,message,Modal } from "antd"
|
|
|
|
|
import {PaperClipOutlined,DeleteOutlined} from '@ant-design/icons';
|
|
|
|
|
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
|
|
|
|
import { formItemLayout } from '../../../../../components/crud/FormLayoutProps'
|
|
|
|
|
import apiurl from '../../../../../service/apiurl';
|
|
|
|
|
import { httppost2 } from '../../../../../utils/request';
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
import "./index.less"
|
|
|
|
|
export default function ProjectBasciInfo() {
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
const [data, setData] = useState()
|
|
|
|
|
const [skdisabled, setSkDisabled] = useState(true)
|
|
|
|
|
const getData = async () => {
|
|
|
|
|
try {
|
|
|
|
|
const res = await httppost2(apiurl.dataResourcesCenter.projectAndWater.shuikuBasicinfo.detail)
|
|
|
|
|
form.setFieldsValue(res.data[0])
|
|
|
|
|
setData(res.data[0])
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-07 09:16:20 +08:00
|
|
|
const onFinish = async (values) => {
|
2024-09-23 14:06:03 +08:00
|
|
|
try {
|
2025-04-07 09:16:20 +08:00
|
|
|
// const values = form.getFieldsValue();
|
2024-09-23 14:06:03 +08:00
|
|
|
const params = {
|
|
|
|
|
...data,
|
|
|
|
|
...values,
|
|
|
|
|
}
|
|
|
|
|
const res = await httppost2(apiurl.dataResourcesCenter.projectAndWater.shuikuBasicinfo.update,params)
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
message.success("修改成功")
|
|
|
|
|
setSkDisabled(true)
|
|
|
|
|
getData()
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
getData()
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className='basic-info-content'>
|
|
|
|
|
<Form
|
|
|
|
|
form={form}
|
|
|
|
|
// {...formItemLayout}
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
|
labelCol={{ span: 8 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="坝址以上流域面积(km²)"
|
|
|
|
|
name="watShedArea"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{ width: '300px' }} disabled={skdisabled} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="坝顶高程(m)"
|
|
|
|
|
name="crestElev"
|
|
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="最大坝高(m)"
|
|
|
|
|
name="maxDamHeig"
|
|
|
|
|
labelCol={{ span: 6 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="校核洪水位(m)"
|
|
|
|
|
name="calFloodLev"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8} >
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="总库容(万m³)"
|
|
|
|
|
name="totCap"
|
|
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8} style={{marginLeft:"-105px"}}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="校核洪水位时最大下泄流量(m³/s)"
|
|
|
|
|
name="maxCalFloodFlow"
|
|
|
|
|
labelCol={{ span: 11 }}
|
|
|
|
|
wrapperCol={{span:13}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="设计洪水位(m)"
|
|
|
|
|
name="desFloodLev"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="调洪库容(万m³)"
|
|
|
|
|
name="storFlCap"
|
|
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8} style={{marginLeft:"-125px"}}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="设计洪水位时最大下泄流量(m³/s)"
|
|
|
|
|
name="maxDesFloodFlow"
|
|
|
|
|
labelCol={{ span: 12 }}
|
|
|
|
|
wrapperCol={{span:12}}
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="防洪高水位(m)"
|
|
|
|
|
name="uppLevFlco"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="防洪库容(万m³)"
|
2025-04-07 09:16:20 +08:00
|
|
|
name="flcoCap"
|
2024-09-23 14:06:03 +08:00
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8} style={{marginLeft:"-43px"}}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="下游河道安全泄量(m³/s)"
|
|
|
|
|
name="dsSaftFlow"
|
|
|
|
|
labelCol={{ span: 8 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="正常蓄水位(m)"
|
|
|
|
|
name="normWatLev"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="兴利库容(万m³)"
|
|
|
|
|
name="benResCap"
|
|
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="汛限水位(m)"
|
|
|
|
|
name="flLowLimLev"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
labelCol={{ span: 6 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="死水位(m)"
|
|
|
|
|
name="deadLev"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="死库容(万m³)"
|
|
|
|
|
name="deadCap"
|
|
|
|
|
labelCol={{ span: 5 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'280px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="堰顶高程(m)"
|
|
|
|
|
name="wcrstel"
|
2025-04-07 09:16:20 +08:00
|
|
|
rules={[{ required: false}]}
|
2024-09-23 14:06:03 +08:00
|
|
|
labelCol={{ span: 6 }}
|
|
|
|
|
wrapperCol={{span:14}}
|
|
|
|
|
>
|
|
|
|
|
<Input allowClear style={{width:'300px'}} disabled={skdisabled}/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row style={{marginTop:80}}>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
wrapperCol={{span:14,offset:10}}
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
skdisabled ? <Button type="primary" onClick={() => setSkDisabled(false)}>编辑</Button> :
|
|
|
|
|
<div style={{ display: 'flex', columnGap: 20 }}>
|
|
|
|
|
<Button onClick={() => setSkDisabled(true)}>取消</Button>
|
2025-04-07 09:16:20 +08:00
|
|
|
<Button type="primary" htmlType="submit">保存</Button>
|
2024-09-23 14:06:03 +08:00
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|