Compare commits
No commits in common. "280ea1adb59e426592a0459634bb637f5a141768" and "2519ae0dd1d0c73151cdc07baa75b20f85f1d9c5" have entirely different histories.
280ea1adb5
...
2519ae0dd1
|
|
@ -467,10 +467,6 @@ const apiurl = {
|
||||||
},
|
},
|
||||||
zfzl: {
|
zfzl: {
|
||||||
list: service_fxdd + "/gateValveReal/list",
|
list: service_fxdd + "/gateValveReal/list",
|
||||||
historypage: service_fxdd + '/gateValveReal/log/page',
|
|
||||||
historyList: service_fxdd + '/gateValveReal/log/loglist',
|
|
||||||
historyPageExport: service_fxdd + '/gateValveReal/log/exp',
|
|
||||||
swInfo:service_fxdd + '/reservoir/water/waterInfo',
|
|
||||||
krlist: service_fxdd + "/reservoir/water/data",
|
krlist: service_fxdd + "/reservoir/water/data",
|
||||||
info: service_fxdd + "/attGateValve/detail",
|
info: service_fxdd + "/attGateValve/detail",
|
||||||
kgpage: service_fxdd + "/gateValveR/page",
|
kgpage: service_fxdd + "/gateValveR/page",
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
// 网格
|
// 网格
|
||||||
show: false,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#CCCCCC',
|
color: '#CCCCCC',
|
||||||
type: 'dashed'
|
type: 'dashed'
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,7 @@ const Page = () => {
|
||||||
pageSo: {
|
pageSo: {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 99999,
|
pageSize: 99999,
|
||||||
},
|
}
|
||||||
searchDate:searchVal?.searchDate
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.rcgl.byfz.bypc.count, params);
|
const res = await httppost2(apiurl.rcgl.byfz.bypc.count, params);
|
||||||
|
|
@ -158,7 +157,7 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCount();
|
getCount();
|
||||||
}, [searchVal])
|
}, [])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchVal) {
|
if (searchVal) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
||||||
|
|
@ -4,78 +4,61 @@ import ModalToolBar from './ModalToolBar';
|
||||||
import { httppost5 } from '../../../utils/request';
|
import { httppost5 } from '../../../utils/request';
|
||||||
import { exportFile } from '../../../utils/tools';
|
import { exportFile } from '../../../utils/tools';
|
||||||
import apiurl from '../../../service/apiurl';
|
import apiurl from '../../../service/apiurl';
|
||||||
import usePageTable from '../../../components/crud/usePageTable2';
|
export default function ModalContent() {
|
||||||
import { createCrudService } from '../../../components/crud/_';
|
|
||||||
export default function ModalContent({zfjkData}) {
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
key: 'inx',
|
key: 'inx',
|
||||||
dataIndex:'inx',
|
|
||||||
width: 80,
|
width: 80,
|
||||||
|
render: (r, i) => <span>{i + 1}</span>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '闸阀名称',
|
title: '闸门名称',
|
||||||
key: 'valveName',
|
key: 'project',
|
||||||
dataIndex:'valveName',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作内容',
|
title: '操作内容',
|
||||||
dataIndex:'opContent',
|
key: 'project',
|
||||||
key: 'opContent',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作结果',
|
title: '操作结果',
|
||||||
dataIndex:'status',
|
key: 'project',
|
||||||
key: 'status',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
}
|
||||||
|
,
|
||||||
{
|
{
|
||||||
title: '操作时间',
|
title: '操作时间',
|
||||||
dataIndex:'tm',
|
key: 'project',
|
||||||
key: 'tm',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const [searchVal, setSearchVal] = useState(false)
|
const [searchVal, setSearchVal] = useState(false)
|
||||||
// 闸阀弹框更多数据
|
|
||||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gsxl.zfzl.historypage).find_noCode);
|
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
let params = {
|
let params = {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
pageSo: {
|
// pageSo: {
|
||||||
pageNumber: tableProps.pagination.current,
|
// pageNumber: tableProps.pagination.current,
|
||||||
pageSize:tableProps.pagination.pageSize
|
// pageSize:tableProps.pagination.pageSize
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
httppost5(apiurl.gcaqjc.sjtjcx.ndsytjb.export, params).then(res => {
|
||||||
httppost5(apiurl.gsxl.zfzl.historyPageExport, params).then(res => {
|
|
||||||
exportFile(`闸门操作记录.xlsx`,res.data)
|
exportFile(`闸门操作记录.xlsx`,res.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
|
||||||
if (searchVal) {
|
|
||||||
const params = {
|
|
||||||
search: {
|
|
||||||
...searchVal,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
search(params)
|
|
||||||
}
|
|
||||||
}, [searchVal])
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Card className='nonebox'>
|
<Card className='nonebox'>
|
||||||
<ModalToolBar
|
<ModalToolBar
|
||||||
setSearchVal={setSearchVal}
|
setSearchVal={setSearchVal}
|
||||||
exportFile={exportExcel}
|
exportFile={exportExcel}
|
||||||
list={zfjkData}
|
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||||
<Table columns={columns} rowKey="inx" {...tableProps} />
|
<Table columns={columns} rowKey="inx" dataSource={[]} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { Form, Input, Button, DatePicker } from 'antd';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import NormalSelect from '../../../components/Form/NormalSelect';
|
import NormalSelect from '../../../components/Form/NormalSelect';
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
const ToolBar = ({ setSearchVal, exportFile,list }) => {
|
const ToolBar = ({ setSearchVal, exportFile }) => {
|
||||||
const optionsType = [
|
const optionsType = [
|
||||||
{
|
{
|
||||||
label: "今日",
|
label: "今日",
|
||||||
|
|
@ -44,7 +44,7 @@ const ToolBar = ({ setSearchVal, exportFile,list }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete values.tm
|
delete values.tm
|
||||||
setSearchVal({ ...values, dateTimeRangeSo:dateTimeSo });
|
setSearchVal({ ...values, dateTimeSo });
|
||||||
}
|
}
|
||||||
|
|
||||||
const onValuesChange = (e) => {
|
const onValuesChange = (e) => {
|
||||||
|
|
@ -70,28 +70,20 @@ const ToolBar = ({ setSearchVal, exportFile,list }) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (list.length > 0) {
|
|
||||||
let dateTimeSo = {
|
let dateTimeSo = {
|
||||||
start: moment().subtract(7, "days").format('YYYY-MM-DD 00:00:00'),
|
start: moment().subtract(1, "years").format('YYYY-MM-DD 00:00:00'),
|
||||||
end: moment().format('YYYY-MM-DD 00:00:00')
|
end: moment().format('YYYY-MM-DD 00:00:00')
|
||||||
}
|
}
|
||||||
form.setFieldValue("tm", [moment(dateTimeSo.start), moment(dateTimeSo.end)])
|
form.setFieldValue("tm", [moment(dateTimeSo.start), moment(dateTimeSo.end)])
|
||||||
form.setFieldValue("valveCode", list[0]?.valveCode)
|
setSearchVal({ dateTimeSo })
|
||||||
setSearchVal({dateTimeRangeSo:dateTimeSo, valveCode:list[0]?.valveCode})
|
}, [])
|
||||||
}
|
|
||||||
}, [list])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish} onValuesChange={onValuesChange}>
|
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish} onValuesChange={onValuesChange}>
|
||||||
<Form.Item label="闸门名称" name="valveCode">
|
<Form.Item label="闸门名称" name="maintainType">
|
||||||
<NormalSelect
|
<NormalSelect allowClear style={{ width: '150px' }} options={types} />
|
||||||
style={{ width: '150px' }}
|
|
||||||
options={list}
|
|
||||||
allowClear={false}
|
|
||||||
fieldNames={{label: 'valveName',value: 'valveCode'}}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="日期范围" name="tm">
|
<Form.Item label="日期范围" name="tm">
|
||||||
<RangePicker
|
<RangePicker
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import './index.less';
|
||||||
import { httpget, httpget2, httppost2 } from '../../../utils/request';
|
import { httpget, httpget2, httppost2 } from '../../../utils/request';
|
||||||
import apiurl from '../../../service/apiurl';
|
import apiurl from '../../../service/apiurl';
|
||||||
import ModalContent from './ModalContent';
|
import ModalContent from './ModalContent';
|
||||||
|
|
||||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||||
const CanvasW = 1080
|
const CanvasW = 1080
|
||||||
const CanvasH = 640
|
const CanvasH = 640
|
||||||
|
|
@ -183,20 +182,17 @@ const Page = () => {
|
||||||
const jcColumns = [
|
const jcColumns = [
|
||||||
{
|
{
|
||||||
title: '项目',
|
title: '项目',
|
||||||
key: 'name',
|
key: 'project',
|
||||||
dataIndex:'name',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实时数据',
|
title: '实时数据',
|
||||||
key: 'realData',
|
key: 'project',
|
||||||
dataIndex:'realData',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据采集时间',
|
title: '数据采集时间',
|
||||||
dataIndex:'tm',
|
key: 'project',
|
||||||
key: 'tm',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -204,20 +200,17 @@ const Page = () => {
|
||||||
const zfColumns = [
|
const zfColumns = [
|
||||||
{
|
{
|
||||||
title: '闸阀名称',
|
title: '闸阀名称',
|
||||||
key: 'valveName',
|
key: 'project',
|
||||||
dataIndex:'valveName',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '当前开关状态',
|
title: '当前开关状态',
|
||||||
key: 'status',
|
key: 'project',
|
||||||
dataIndex:'status',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '数据采集时间',
|
title: '数据采集时间',
|
||||||
dataIndex:'tm',
|
key: 'project',
|
||||||
key: 'tm',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -225,26 +218,22 @@ const Page = () => {
|
||||||
const jlColumns = [
|
const jlColumns = [
|
||||||
{
|
{
|
||||||
title: '闸阀名称',
|
title: '闸阀名称',
|
||||||
key: 'valveName',
|
key: 'project',
|
||||||
dataIndex:'valveName',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作内容',
|
title: '操作内容',
|
||||||
dataIndex:'opContent',
|
key: 'project',
|
||||||
key: 'opContent',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作结果',
|
title: '操作结果',
|
||||||
dataIndex:'status',
|
key: 'project',
|
||||||
key: 'status',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作时间',
|
title: '操作时间',
|
||||||
dataIndex:'tm',
|
key: 'project',
|
||||||
key: 'tm',
|
|
||||||
width: 150,
|
width: 150,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -263,9 +252,9 @@ const Page = () => {
|
||||||
const pts = contextCoordinates(xunit, hole);
|
const pts = contextCoordinates(xunit, hole);
|
||||||
const eqpnoList = useMemo(() => damList ? new Array(damList.length).fill(0).map((o, index) => index) : [], [damList]);
|
const eqpnoList = useMemo(() => damList ? new Array(damList.length).fill(0).map((o, index) => index) : [], [damList]);
|
||||||
|
|
||||||
// useEffect(() => {
|
useEffect(() => {
|
||||||
// getList()
|
getList()
|
||||||
// }, [])
|
}, [])
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const { code, data } = await httppost2(apiurl.zmjk.getList)
|
const { code, data } = await httppost2(apiurl.zmjk.getList)
|
||||||
|
|
@ -273,8 +262,8 @@ const Page = () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const obj = data[0] || {}
|
const obj = data[0] || {}
|
||||||
// getInformation(obj.gateCode)
|
getInformation(obj.gateCode)
|
||||||
// getDamData(obj.stcd)
|
getDamData(obj.stcd)
|
||||||
getVideo(obj.gateCode)
|
getVideo(obj.gateCode)
|
||||||
setData(obj)
|
setData(obj)
|
||||||
}
|
}
|
||||||
|
|
@ -331,95 +320,6 @@ const Page = () => {
|
||||||
return num
|
return num
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 闸阀监控列表数据
|
|
||||||
const [zfjkData, setzfjkData] = useState([])
|
|
||||||
const getZfjkData = async () => {
|
|
||||||
try {
|
|
||||||
const res = await httppost2(apiurl.gsxl.zfzl.list)
|
|
||||||
if (res.code == 200) {
|
|
||||||
setzfjkData(res.data)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 闸阀历史操作
|
|
||||||
const [zfjkHistoryListData, setzfjkHistoryListData] = useState([])
|
|
||||||
const getZfjkHistoryData = async () => {
|
|
||||||
try {
|
|
||||||
const res = await httppost2(apiurl.gsxl.zfzl.historyList)
|
|
||||||
if (res.code == 200) {
|
|
||||||
setzfjkHistoryListData(res.data)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const swList = [
|
|
||||||
{
|
|
||||||
name: "库水位(m)",
|
|
||||||
realData:'',
|
|
||||||
tm:''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "今日雨量(mm)",
|
|
||||||
realData:'',
|
|
||||||
tm:''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "灌溉发电流量(m³/s)",
|
|
||||||
realData:'',
|
|
||||||
tm:''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
// 闸阀历史操作
|
|
||||||
const [zfjkSwData, setzfjkSwData] = useState([])
|
|
||||||
const getZfjkSwData = async () => {
|
|
||||||
try {
|
|
||||||
const res = await httppost2(apiurl.gsxl.zfzl.swInfo)
|
|
||||||
if (res.code == 200) {
|
|
||||||
const {
|
|
||||||
rz,
|
|
||||||
todayRainNum,
|
|
||||||
outPowerNum,
|
|
||||||
todayRainNumTm,
|
|
||||||
outPowerNumTm,
|
|
||||||
tm
|
|
||||||
} = res.data;
|
|
||||||
const newArr = swList.map(item => {
|
|
||||||
if (item.name == '库水位(m)') {
|
|
||||||
item.realData = rz;
|
|
||||||
item.tm = tm;
|
|
||||||
} else if (item.name == '今日雨量(mm)') {
|
|
||||||
item.realData = todayRainNum;
|
|
||||||
item.tm = todayRainNumTm;
|
|
||||||
} else {
|
|
||||||
item.realData = outPowerNum;
|
|
||||||
item.tm = outPowerNumTm;
|
|
||||||
}
|
|
||||||
return item;
|
|
||||||
})
|
|
||||||
setzfjkSwData(newArr)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getZfjkData()
|
|
||||||
getZfjkHistoryData()
|
|
||||||
getZfjkSwData()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='content-root clearFloat xybm sg_zmjk' style={{ paddingRight: "0", paddingBottom: "0" }}>
|
<div className='content-root clearFloat xybm sg_zmjk' style={{ paddingRight: "0", paddingBottom: "0" }}>
|
||||||
|
|
@ -435,12 +335,12 @@ const Page = () => {
|
||||||
<div className='sz_left_up_table'>
|
<div className='sz_left_up_table'>
|
||||||
<Table
|
<Table
|
||||||
columns={zfColumns}
|
columns={zfColumns}
|
||||||
rowKey={(record) => record.tm}
|
rowKey={(record) => record.id}
|
||||||
dataSource={zfjkData}
|
dataSource={[]}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='sg_zmjk_left_title' style={{ marginTop: 150,display:'flex',justifyContent:'space-between' }}>
|
<div className='sg_zmjk_left_title' style={{ marginTop: 175,display:'flex',justifyContent:'space-between' }}>
|
||||||
<div><Divider type="vertical" style={{ width: 5, background: '#259def', height: 20 }} />
|
<div><Divider type="vertical" style={{ width: 5, background: '#259def', height: 20 }} />
|
||||||
最近操作记录</div>
|
最近操作记录</div>
|
||||||
<div onClick={() => setOpen(true)}>
|
<div onClick={() => setOpen(true)}>
|
||||||
|
|
@ -453,8 +353,8 @@ const Page = () => {
|
||||||
<div className='sz_left_up_table'>
|
<div className='sz_left_up_table'>
|
||||||
<Table
|
<Table
|
||||||
columns={jlColumns}
|
columns={jlColumns}
|
||||||
rowKey={(record) => record.tm}
|
rowKey={(record) => record.id}
|
||||||
dataSource={zfjkHistoryListData}
|
dataSource={[]}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -539,8 +439,8 @@ const Page = () => {
|
||||||
<div style={{ width: '100%', marginTop: 10 }}>
|
<div style={{ width: '100%', marginTop: 10 }}>
|
||||||
<Table
|
<Table
|
||||||
columns={jcColumns}
|
columns={jcColumns}
|
||||||
rowKey={(record) => record.tm}
|
rowKey={(record) => record.id}
|
||||||
dataSource={zfjkSwData}
|
dataSource={[]}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
{/* {
|
{/* {
|
||||||
|
|
@ -584,13 +484,12 @@ const Page = () => {
|
||||||
width={1100}
|
width={1100}
|
||||||
title="闸门操作记录"
|
title="闸门操作记录"
|
||||||
footer={null}
|
footer={null}
|
||||||
destroyOnClose
|
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setOpen(false)
|
setOpen(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ height: '600px' }}>
|
<div style={{ height: '600px' }}>
|
||||||
<ModalContent zfjkData={zfjkData} />
|
<ModalContent/>
|
||||||
{/* <Tabs>
|
{/* <Tabs>
|
||||||
<Tabs.TabPane tab="基本信息" key="item-1">
|
<Tabs.TabPane tab="基本信息" key="item-1">
|
||||||
<Descriptions bordered size="small" column={3} >
|
<Descriptions bordered size="small" column={3} >
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue