2024-12-23 17:52:42 +08:00
|
|
|
|
import React, { Fragment, useRef, useMemo, useEffect, useState } from 'react';
|
|
|
|
|
|
import { Table, Card, Modal, Form, Input, Button, Row, Col, Timeline, message, Tabs, Image } from 'antd';
|
2024-12-11 17:56:03 +08:00
|
|
|
|
import ToolBar from './toolbar';
|
|
|
|
|
|
import apiurl from '../../../../service/apiurl';
|
|
|
|
|
|
import usePageTable from '../../../../components/crud/usePageTable2';
|
|
|
|
|
|
import { createCrudService } from '../../../../components/crud/_';
|
2024-12-23 17:52:42 +08:00
|
|
|
|
import { httppost5, httppost2 } from '../../../../utils/request';
|
2024-12-11 17:56:03 +08:00
|
|
|
|
import { exportFile } from '../../../../utils/tools.js';
|
2024-12-25 13:48:51 +08:00
|
|
|
|
import './index.less'
|
2024-12-11 17:56:03 +08:00
|
|
|
|
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
|
|
|
|
|
const Page = () => {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const projectType = {
|
|
|
|
|
|
0: '闸后流量',
|
|
|
|
|
|
1: '雨量',
|
|
|
|
|
|
2: '闸前水位',
|
2025-01-08 17:20:49 +08:00
|
|
|
|
3: '闸后水位'
|
2024-12-25 13:48:51 +08:00
|
|
|
|
}
|
2024-12-11 17:56:03 +08:00
|
|
|
|
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const bbType = {
|
|
|
|
|
|
0: '日报表',
|
|
|
|
|
|
1: '年报表',
|
2025-01-08 17:20:49 +08:00
|
|
|
|
2:'月报表'
|
2024-12-25 13:48:51 +08:00
|
|
|
|
}
|
2024-12-11 17:56:03 +08:00
|
|
|
|
const [searchVal, setSearchVal] = useState(false)
|
2024-12-23 17:52:42 +08:00
|
|
|
|
const [requsetUrlObj, setRequsetUrlObj] = useState({})
|
|
|
|
|
|
const requsetUrlObjRef = useRef(null)
|
|
|
|
|
|
requsetUrlObjRef.current = requsetUrlObj;
|
2024-12-11 17:56:03 +08:00
|
|
|
|
const timeColumns = [
|
|
|
|
|
|
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" },
|
2024-12-23 17:52:42 +08:00
|
|
|
|
...Array(16).fill(0).map((item, index) => ({
|
|
|
|
|
|
title: `${index + 9}时`,
|
|
|
|
|
|
key: `rzH${index + 9}`,
|
|
|
|
|
|
dataIndex: `rzH${index + 9}`,
|
2024-12-11 17:56:03 +08:00
|
|
|
|
width: 80,
|
|
|
|
|
|
align: "center",
|
2024-12-23 17:52:42 +08:00
|
|
|
|
sorter: (a, b) => a[`rzH${index + 9}`] - b[`rzH${index + 9}`]
|
2024-12-11 17:56:03 +08:00
|
|
|
|
})),
|
2024-12-23 17:52:42 +08:00
|
|
|
|
...Array(8).fill(0).map((item, index) => ({
|
|
|
|
|
|
title: `${index + 1}时`,
|
|
|
|
|
|
key: `rzH${index + 1}`,
|
|
|
|
|
|
dataIndex: `rzH${index + 1}`,
|
2024-12-11 17:56:03 +08:00
|
|
|
|
width: 80,
|
|
|
|
|
|
align: "center",
|
2024-12-23 17:52:42 +08:00
|
|
|
|
sorter: (a, b) => a[`rzH${index + 1}`] - b[`rzH${index + 1}`]
|
2024-12-11 17:56:03 +08:00
|
|
|
|
})),
|
2024-12-25 13:48:51 +08:00
|
|
|
|
{ title: '平均', key: 'rzAvg ', dataIndex: 'rzAvg', width: 100, align: "center", sorter: (a, b) => a.rzAvg - b.rzAvg },
|
2024-12-11 17:56:03 +08:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const dayColumns = [
|
2025-01-08 17:20:49 +08:00
|
|
|
|
{ title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", render: (v, r, i) => <span>{v ? `${v}号`: ''}</span>},
|
|
|
|
|
|
{title: '监测值', key: 'data', dataIndex: 'data', width: 120, align: "center",}
|
2024-12-11 17:56:03 +08:00
|
|
|
|
];
|
|
|
|
|
|
const yearColumns = [
|
2025-03-26 15:17:21 +08:00
|
|
|
|
// { title: '日期', key: 'date', dataIndex: 'date', width: 120, align: "center", fixed: "left" },
|
2024-12-23 17:52:42 +08:00
|
|
|
|
...Array(12).fill(0).map((item, index) => ({
|
|
|
|
|
|
title: `${index + 1}月`,
|
|
|
|
|
|
key: `drpM${index + 1}`,
|
|
|
|
|
|
dataIndex: `drpM${index + 1}`,
|
2024-12-11 17:56:03 +08:00
|
|
|
|
width: 100,
|
|
|
|
|
|
align: "center",
|
|
|
|
|
|
}))
|
|
|
|
|
|
];
|
2024-12-23 17:52:42 +08:00
|
|
|
|
|
|
|
|
|
|
const newTimeColumns = useMemo(() => {
|
|
|
|
|
|
const changeColumns = JSON.parse(JSON.stringify(timeColumns));
|
|
|
|
|
|
changeColumns[changeColumns.length - 1] = {
|
|
|
|
|
|
title: '日累计',
|
|
|
|
|
|
key: 'drpD',
|
|
|
|
|
|
dataIndex: 'drpD',
|
|
|
|
|
|
width: 100,
|
|
|
|
|
|
align: 'center',
|
2024-12-25 13:48:51 +08:00
|
|
|
|
sorter: (a, b) => a.drpD - b.drpD
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
const cols = [changeColumns[0]];
|
|
|
|
|
|
changeColumns.forEach((item, i) => {
|
|
|
|
|
|
if (i > 0) {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
if (i < 17) {
|
2025-01-08 17:20:49 +08:00
|
|
|
|
item.sorter = (a, b) => a[`drpH${i + 8}`] - b[`drpH${i + 8}`]
|
2024-12-23 17:52:42 +08:00
|
|
|
|
} else {
|
2025-01-08 17:20:49 +08:00
|
|
|
|
item.sorter = (a, b) => a[`drpH${i - 16}`] - b[`drpH${i - 16}`]
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
cols.push({
|
|
|
|
|
|
...item,
|
|
|
|
|
|
key: item.key.replace('rz', 'drp'),
|
2024-12-25 13:48:51 +08:00
|
|
|
|
dataIndex: item.dataIndex.replace('rz', 'drp'),
|
|
|
|
|
|
})
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
2024-12-25 13:48:51 +08:00
|
|
|
|
return searchVal.type == 1 ? cols : timeColumns
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}, [searchVal])
|
|
|
|
|
|
|
2024-12-11 17:56:03 +08:00
|
|
|
|
const width = useMemo(() => {
|
2024-12-23 17:52:42 +08:00
|
|
|
|
let columns = searchVal.type1 == 0 ? timeColumns : searchVal.type1 == 1 ? yearColumns : yearColumns;
|
2024-12-11 17:56:03 +08:00
|
|
|
|
return columns.reduce((total, cur) => total + (cur.width), 0)
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}, [searchVal]);
|
|
|
|
|
|
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const [staData, setStaData] = useState({})
|
2024-12-23 17:52:42 +08:00
|
|
|
|
const [data, setData] = useState([])
|
2024-12-25 13:48:51 +08:00
|
|
|
|
|
2024-12-23 17:52:42 +08:00
|
|
|
|
const getData = async (params) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await httppost2(requsetUrlObjRef.current?.page, params)
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
setData(res.data)
|
2024-12-11 17:56:03 +08:00
|
|
|
|
}
|
2024-12-23 17:52:42 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 年报表总结栏
|
|
|
|
|
|
const getStaData = async (params) => {
|
|
|
|
|
|
let obj = {};
|
2025-01-08 17:20:49 +08:00
|
|
|
|
try {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const res = await httppost2(requsetUrlObjRef.current?.yearSummary, params)
|
2025-01-08 17:20:49 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
res.data.list?.forEach(item => {
|
|
|
|
|
|
if (!obj[item.date]) {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
let arr = Object.keys(item)
|
2025-01-08 17:20:49 +08:00
|
|
|
|
params.type == 1 ? arr.splice(0, 1) : arr.splice(0, 2)
|
|
|
|
|
|
obj[item.date] = arr.map(o => ({ [o]: item[o] }))
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
setStaData({ ...res.data, list: obj })
|
2024-12-25 13:48:51 +08:00
|
|
|
|
}
|
2025-01-08 17:20:49 +08:00
|
|
|
|
} catch (error) {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
console.log(error);
|
2025-01-08 17:20:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-12-23 17:52:42 +08:00
|
|
|
|
// 导出
|
|
|
|
|
|
const exportExcel = () => {
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
...searchVal,
|
|
|
|
|
|
}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const fileName =
|
2025-01-08 17:20:49 +08:00
|
|
|
|
(searchVal?.type1 == 0 ?
|
2024-12-25 13:48:51 +08:00
|
|
|
|
`${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` :
|
2025-01-08 17:20:49 +08:00
|
|
|
|
searchVal?.type1 == 1 ?formatDate(searchVal.year):
|
|
|
|
|
|
formatDate(searchVal.yearMonth)) + projectType[searchVal.type] + bbType[searchVal.type1]
|
|
|
|
|
|
httppost5(requsetUrlObjRef.current?.export, params).then(res => {
|
2024-12-25 13:48:51 +08:00
|
|
|
|
exportFile(`${fileName}.xlsx`, res.data)
|
2024-12-11 17:56:03 +08:00
|
|
|
|
})
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getUrl = (name, type) => {
|
|
|
|
|
|
let urlObj;
|
|
|
|
|
|
let obj = {
|
|
|
|
|
|
page: type == 0 ? apiurl.gcyx.tjbb.swrbb : apiurl.gcyx.tjbb.swnbb,
|
2025-01-08 17:20:49 +08:00
|
|
|
|
export: type == 0 ? apiurl.gcyx.tjbb.swrbbExport : type == 1 ?apiurl.gcyx.tjbb.swnbbExport: apiurl.gcyx.tjbb.swybbExport,
|
2024-12-25 13:48:51 +08:00
|
|
|
|
yearSummary: type == 1 ? apiurl.gcyx.tjbb.swnbbSummary : ''
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
switch (name) {
|
|
|
|
|
|
case 0:
|
|
|
|
|
|
urlObj = obj
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 1:
|
|
|
|
|
|
urlObj = {
|
|
|
|
|
|
page: type == 0 ? apiurl.gcyx.tjbb.jyrbb : apiurl.gcyx.tjbb.jynbb,
|
2025-01-08 17:20:49 +08:00
|
|
|
|
export: type == 0 ? apiurl.gcyx.tjbb.jyrbbExport :type == 1 ? apiurl.gcyx.tjbb.jynbbExport: apiurl.gcyx.tjbb.swybbExport,
|
|
|
|
|
|
yearSummary: type == 1 ? apiurl.gcyx.tjbb.jynbbSummary : ''
|
2024-12-23 17:52:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
urlObj = obj
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
urlObj = obj
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
return urlObj
|
|
|
|
|
|
}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
|
2025-01-08 17:20:49 +08:00
|
|
|
|
const [monthData, setMonthData] = useState([])
|
|
|
|
|
|
const getMonthData = async (params) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await httppost2(apiurl.gcyx.tjbb.swybb, params)
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
const silceData = res.data.slice(-3)
|
|
|
|
|
|
setData(res.data.slice(0,-3))
|
|
|
|
|
|
setMonthData(silceData)
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
const formatDate = (date1) => {
|
|
|
|
|
|
const date = new Date(date1);
|
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
|
const month = date.getMonth() + 1;
|
|
|
|
|
|
const day = date.getDate();
|
2025-01-08 17:20:49 +08:00
|
|
|
|
const res = searchVal.type1 == 0 ? year + '年' + month + '月' + day + '日' :
|
|
|
|
|
|
searchVal.type1 == 1 ? year + '年' :
|
|
|
|
|
|
year + '年' + month + '月'
|
|
|
|
|
|
return res;
|
2024-12-25 13:48:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-23 17:52:42 +08:00
|
|
|
|
useEffect(() => {
|
2025-03-26 15:17:21 +08:00
|
|
|
|
setRequsetUrlObj(getUrl(searchVal.type, searchVal.type1))
|
|
|
|
|
|
requsetUrlObjRef.current = getUrl(searchVal.type, searchVal.type1)
|
2025-01-08 17:20:49 +08:00
|
|
|
|
if (searchVal && searchVal.type1 != 1 && searchVal.type1 != 2) {
|
2024-12-23 17:52:42 +08:00
|
|
|
|
const params = { ...searchVal }
|
2025-01-19 17:30:20 +08:00
|
|
|
|
|
2024-12-23 17:52:42 +08:00
|
|
|
|
getData(params)
|
2024-12-11 17:56:03 +08:00
|
|
|
|
}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
if (searchVal.type1 == 1) {
|
|
|
|
|
|
getStaData(searchVal)
|
|
|
|
|
|
}
|
2025-01-08 17:20:49 +08:00
|
|
|
|
|
|
|
|
|
|
if (searchVal.type1 == 2) {
|
|
|
|
|
|
getMonthData(searchVal)
|
|
|
|
|
|
}
|
2025-03-26 15:17:21 +08:00
|
|
|
|
|
2024-12-11 17:56:03 +08:00
|
|
|
|
}, [searchVal])
|
2024-12-23 17:52:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
2024-12-11 17:56:03 +08:00
|
|
|
|
return (
|
|
|
|
|
|
<>
|
2024-12-23 17:52:42 +08:00
|
|
|
|
<div className='content-root clearFloat xybm' style={{ paddingBottom: "0" }}>
|
|
|
|
|
|
<div className='lf CrudAdcdTreeTableBox' style={{ width: "100%", overflowY: "auto" }}>
|
2024-12-11 17:56:03 +08:00
|
|
|
|
<Card className='nonebox'>
|
|
|
|
|
|
<ToolBar
|
|
|
|
|
|
setSearchVal={setSearchVal}
|
|
|
|
|
|
exportFile1={exportExcel}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
|
|
|
|
|
<Table
|
|
|
|
|
|
title={() => (
|
|
|
|
|
|
<>
|
2025-01-08 17:20:49 +08:00
|
|
|
|
<h2 style={{ textAlign: "center" }}>
|
|
|
|
|
|
{searchVal?.type1 == 0 ?
|
|
|
|
|
|
`${formatDate(searchVal?.dateRangeSo?.start)} - ${formatDate(searchVal?.dateRangeSo?.end)}` :
|
|
|
|
|
|
searchVal?.type1 == 1 ?
|
|
|
|
|
|
formatDate(searchVal.year):formatDate(searchVal.yearMonth)
|
|
|
|
|
|
}
|
|
|
|
|
|
{projectType[searchVal.type]}{bbType[searchVal.type1]}</h2>
|
2024-12-25 13:48:51 +08:00
|
|
|
|
<div style={{ textAlign: "right" }}>单位:{searchVal?.type != 1 ? 'm' : 'mm'}</div>
|
2024-12-11 17:56:03 +08:00
|
|
|
|
</>
|
|
|
|
|
|
)}
|
2025-01-08 17:20:49 +08:00
|
|
|
|
columns={searchVal.type1 == 0 ? newTimeColumns : searchVal.type1 == 1 ? yearColumns : dayColumns}
|
2024-12-23 17:52:42 +08:00
|
|
|
|
rowKey="date"
|
|
|
|
|
|
dataSource={data}
|
|
|
|
|
|
pagination={false}
|
2024-12-25 13:48:51 +08:00
|
|
|
|
scroll={{ x: width, y: "calc( 100vh - 650px )" }}
|
|
|
|
|
|
summary={(pageData) => {
|
|
|
|
|
|
return (
|
|
|
|
|
|
searchVal.type1 == 1 ?
|
2025-01-08 17:20:49 +08:00
|
|
|
|
searchVal.type != 1 ?
|
|
|
|
|
|
<Table.Summary fixed>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={100} align='center' className="xyt-custom-cell">
|
|
|
|
|
|
<div className='table-summary-ceil'>
|
|
|
|
|
|
<div className='summary-left'></div>
|
|
|
|
|
|
<div className='summary-right'>平均</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["平均"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={121} align='center' className="xyt-custom-cell">
|
|
|
|
|
|
<div className='table-summary-ceil'>
|
|
|
|
|
|
<div className='summary-left'></div>
|
|
|
|
|
|
<div className='summary-right'>最高</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["最高"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={46} align='center' className="xyt-custom-cell">
|
|
|
|
|
|
<div className='table-summary-ceil'>
|
|
|
|
|
|
<div className='summary-left'>月统计</div>
|
|
|
|
|
|
<div className='summary-right'>最高日期</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["最高日期"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={156} align='center' className="xyt-custom-cell">
|
|
|
|
|
|
<div className='table-summary-ceil'>
|
|
|
|
|
|
<div className='summary-left'></div>
|
|
|
|
|
|
<div className='summary-right'>最低</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["最低"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={155} align='center' className="xyt-custom-cell" >
|
|
|
|
|
|
<div className='table-summary-ceil'>
|
|
|
|
|
|
<div className='summary-left'></div>
|
|
|
|
|
|
<div className='summary-right'>最低日期</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["最低日期"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={200} align='center' >年统计</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={1} align='center' >最高水位</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.max}</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={3} align='center'>最低水位</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.min}</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={3} align='center'>平均水位</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.avg}</Table.Summary.Cell>
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
</Table.Summary> :
|
|
|
|
|
|
<Table.Summary fixed>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={100} align='center' >月降雨量</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["月降雨量"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={21} align='center' >降雨日数</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["降雨日数"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={22} align='center' >最大日量</Table.Summary.Cell>
|
|
|
|
|
|
{staData?.list?.["最大日量"]?.map((item, index) => (
|
|
|
|
|
|
<Table.Summary.Cell index={index + 1} align='center'>{item[`drpM${index + 1}`]}</Table.Summary.Cell>
|
|
|
|
|
|
)
|
|
|
|
|
|
)}
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >年统计</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={1} align='center' colSpan={3}>降水量</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={2} align='center' colSpan={3}>{staData?.drpSum}</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={3} align='center' colSpan={3}>降雨日数</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={4} align='center' colSpan={3}>{staData?.dayCount}</Table.Summary.Cell>
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
</Table.Summary>
|
|
|
|
|
|
:
|
|
|
|
|
|
searchVal.type1 == 2 ?<Table.Summary fixed>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >月平均</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >{monthData[0]?.data}</Table.Summary.Cell>
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >月最大</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >{monthData[1]?.data}</Table.Summary.Cell>
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Row>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >月最小</Table.Summary.Cell>
|
|
|
|
|
|
<Table.Summary.Cell index={12} align='center' >{monthData[2]?.data}</Table.Summary.Cell>
|
|
|
|
|
|
</Table.Summary.Row>
|
|
|
|
|
|
</Table.Summary>:null
|
2024-12-25 13:48:51 +08:00
|
|
|
|
)
|
|
|
|
|
|
}}
|
|
|
|
|
|
/>
|
2025-01-08 17:20:49 +08:00
|
|
|
|
|
2024-12-11 17:56:03 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default Page;
|