feat():人工录入数据菜单隐藏
parent
a7a869b41d
commit
ccb029352b
|
|
@ -427,7 +427,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
|||
{ id: id(), title: '渗压监测', path: '/mgr/gcaqjc/sjtjcx/syjx' },
|
||||
{ id: id(), title: '渗流监测 ', path: '/mgr/gcaqjc/sjtjcx/sljx' },
|
||||
{ id: id(), title: '位移监测 ', path: '/mgr/gcaqjc/sjtjcx/wyjx' },
|
||||
{ id: id(), title: '人工监测数据录入 ', path: '/mgr/gcaqjc/sjtjcx/sjlr' },
|
||||
// { id: id(), title: '人工监测数据录入 ', path: '/mgr/gcaqjc/sjtjcx/sjlr' },
|
||||
{ id: id(), title: '年度渗压统计表', path: '/mgr/gcaqjc/sjtjcx/ndsytjb' },
|
||||
{ id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' },
|
||||
{ id: id(), title: '年度位移统计表', path: '/mgr/gcaqjc/sjtjcx/ndwytjb' },
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ const apiurl = {
|
|||
sjtjcx: {
|
||||
sycx: {
|
||||
page: service_fxdd + '/osmoticPressR/page',
|
||||
list:service_fxdd + "/attDamProfile/list"
|
||||
list: service_fxdd + "/attDamProfile/list",
|
||||
list1:service_fxdd + '/osmoticPressR/list/dvcd'
|
||||
},
|
||||
slcx: {
|
||||
page:service_fxdd + '/osmoticFlowR/page'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,R
|
|||
import { formItemLayout, btnItemLayout } from '../../../../../components/crud/FormLayoutProps';
|
||||
import apiurl from '../../../../../service/apiurl';
|
||||
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||
import { httppost2 } from '../../../../../utils/request';
|
||||
import { httppost2,httpget2 } from '../../../../../utils/request';
|
||||
|
||||
import moment from 'moment';
|
||||
const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
||||
|
|
@ -11,7 +11,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
const [form] = Form.useForm();
|
||||
const [dmList, setDmList] = useState([])
|
||||
const [codeList, setCodeList] = useState([])
|
||||
const [dmCode,setDmCode] = useState('')
|
||||
const [dmCd,setDmCd] = useState([])
|
||||
|
||||
const onFinish = (values) => {
|
||||
if (mode === 'edit') {
|
||||
|
|
@ -43,10 +43,20 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
}
|
||||
}
|
||||
|
||||
const getCdCode = async () => {
|
||||
try {
|
||||
const res = await httpget2(apiurl.gcaqjc.sjtjcx.sycx.list1)
|
||||
setDmCd(res.data.map(s=>({label:s,value:s})));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
getDmList()
|
||||
getStationCode()
|
||||
getCdCode()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
|
|
@ -83,12 +93,26 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
name="mpcd"
|
||||
>
|
||||
<NormalSelect
|
||||
disabled={true}
|
||||
disabled={mode==='view'}
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
options={codeList.map(o => ({ label: o.mpcd, value: o.mpcd }))}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="测点名称"
|
||||
rules={[{ required: true }]}
|
||||
name="dvcd"
|
||||
>
|
||||
<NormalSelect
|
||||
disabled={mode==='view'}
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
options={dmCd}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
|
|
@ -97,7 +121,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
|
|||
getValueFromEvent={(e,dateString) => dateString}
|
||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||
>
|
||||
<DatePicker disabled={true} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} allowClear showTime />
|
||||
<DatePicker disabled={mode==='view'} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} allowClear showTime />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const Page = () => {
|
|||
const [searchVal, setSearchVal] = useState(false)
|
||||
const columns = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
|
||||
{ title: '水库代码', key: 'rscd', dataIndex: 'rscd', width: 200, ellipsis: true, align:"center" },
|
||||
{ title: '测点名称', key: 'dvcd', dataIndex: 'dvcd', width: 200, ellipsis: true, align:"center" },
|
||||
{ title: '水工建筑物编号', key: 'hycncd', dataIndex: 'hycncd', width: 200, align:"center"},
|
||||
{ title: '测点编号', key: 'mpcd', dataIndex: 'mpcd', width: 200, align:"center"},
|
||||
{ title: '测量时间', key: 'mstm', dataIndex: 'mstm', width: 200, align:"center"},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import AdcdFuzzyTreeSelect from '../../../../../components/Form/AdcdFuzzyTreeSel
|
|||
import NormalSelect from '../../../../../components/Form/NormalSelect';
|
||||
import { config } from '../../../../../config';
|
||||
import moment from 'moment';
|
||||
import { httppost2 } from '../../../../../utils/request';
|
||||
import { httppost2,httpget2 } from '../../../../../utils/request';
|
||||
import apiurl from '../../../../../service/apiurl';
|
||||
const { RangePicker } = DatePicker;
|
||||
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||
|
|
@ -50,8 +50,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
|
||||
const getStationCode = async () => {
|
||||
try {
|
||||
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
||||
setCodeList(res.data.map(s=>({label:s.mpcd,value:s.mpcd,profileCode:s.mpcd})));
|
||||
const res = await httpget2(apiurl.gcaqjc.sjtjcx.sycx.list1)
|
||||
setCodeList(res.data.map(s=>({label:s,value:s,profileCode:s})));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
@ -124,12 +124,12 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
style={{ width: "150px" }}
|
||||
options={dmList}
|
||||
onChange={(v)=>{
|
||||
form.setFieldValue('stationCode',null)
|
||||
form.setFieldValue('dvcd',null)
|
||||
setDmCode(v)
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="测点编号" name="stationCode">
|
||||
<Form.Item label="测点名称" name="dvcd">
|
||||
<NormalSelect
|
||||
allowClear
|
||||
style={{ width: "150px" }}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import AdcdFuzzyTreeSelect from '../../../../components/Form/AdcdFuzzyTreeSelect
|
|||
import NormalSelect from '../../../../components/Form/NormalSelect';
|
||||
import { config } from '../../../../config';
|
||||
import moment from 'moment';
|
||||
import { httppost2 } from '../../../../utils/request';
|
||||
import { httppost2,httpget2 } from '../../../../utils/request';
|
||||
import apiurl from '../../../../service/apiurl';
|
||||
const { RangePicker } = DatePicker;
|
||||
const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
||||
|
|
@ -49,8 +49,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
|
||||
const getStationCode = async () => {
|
||||
try {
|
||||
const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list)
|
||||
setCodeList(res.data.map(s=>({label:s.mpcd,value:s.mpcd,profileCode:s.mpcd})));
|
||||
const res = await httpget2(apiurl.gcaqjc.sjtjcx.sycx.list1)
|
||||
setCodeList(res.data.map(s=>({label:s,value:s,profileCode:s})));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
@ -132,12 +132,12 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
|
|||
style={{ width: "150px" }}
|
||||
options={dmList}
|
||||
onChange={(v)=>{
|
||||
form.setFieldValue('mpcd',null)
|
||||
form.setFieldValue('dvcd',null)
|
||||
setDmCode(v)
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="测点编号" name="mpcd">
|
||||
<Form.Item label="测点名称" name="dvcd">
|
||||
<NormalSelect
|
||||
allowClear
|
||||
style={{ width: "150px" }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue