import React, { useMemo, useState } from 'react';
import useRequest from '../../../../utils/useRequest';
import PanelBox from '../../components/PanelBox';
import Table from '@material-ui/core/Table';
import TableContainer from '@material-ui/core/TableContainer';
import TableBody from '@material-ui/core/TableBody';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import DpTableCell from '../../../../layouts/mui/DpTableCell';
import DpTableRow from '../../../../layouts/mui/DpTableRow';
import { useDispatch, useSelector } from 'react-redux';
import useRefresh from '../../../../utils/useRefresh';
import { HDRealPromise } from '../../../../models/_/real';
import clsx from 'clsx';
import { renderHDRz } from '../../../../utils/renutils';
import Setting from './Setting';
import { InfoPopNames } from '../../InfoPops';
import config from '../../../../config';
import moment from 'moment';
import { Empty } from 'antd'
import TableYj from './tableYj';
import { Select, MenuItem } from '@material-ui/core/index'
// import showData from './constant'
function rzRender(rz, base) {
return (
= base ? 'red' : '#fff' }}>
{typeof base === 'number' ? base.toFixed(2) : ''}
);
}
function HDReal({ style }) {
const dispatch = useDispatch();
const tableRzFilter = useSelector(s => s.realview.tableRzFilter);
const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh);
const num = useSelector(s => s.runtime.duibifxNum)
const yyRes = useSelector(s => s.runtime.yyObj);
const [setting, showSetting] = useState(false);
const [dimension, setDimension] = useState('ft');
const data = [
{
"guid": "42118120003",
"code": "",
"name": "浮桥河水库",
"resRegCode": "42000020030-A4",
"adName": "白果镇",
"engScal": "大(2)型",
"place": "湖北省-黄冈市-麻城市-白果镇",
"lon": "115.068090",
"lat": "31.026170",
'username': '熊杰',
taskType: '除草除杂',
tm: '2025-06-02 17:38:00',
status: '已处理'
},
{
"guid": "42118120003",
"code": "",
"name": "浮桥河水库",
"resRegCode": "42000020030-A4",
"adName": "白果镇",
"engScal": "大(2)型",
"place": "湖北省-黄冈市-麻城市-白果镇",
"lon": "115.068090",
"lat": "31.026170",
'username': '白斌',
taskType: '除草除杂',
tm: '2025-06-02 17:09:11',
status: '已处理'
},
{
"guid": "42118120003",
"code": "",
"name": "明山水库",
"resRegCode": "42000020030-A4",
"adName": "白果镇",
"engScal": "大(2)型",
"place": "湖北省-黄冈市-麻城市-白果镇",
"lon": "115.068090",
"lat": "31.026170",
'username': '余静',
taskType: '危险提示',
tm: '2025-06-02 16:10:00',
status: '已处理'
},
{
"guid": "42118120003",
"code": "",
"name": "永红水库",
"resRegCode": "42000020030-A4",
"adName": "白果镇",
"engScal": "大(2)型",
"place": "湖北省-黄冈市-麻城市-白果镇",
"lon": "115.068090",
"lat": "31.026170",
'username': '周真',
taskType: '设备养护',
tm: '2025-06-02 15:00:49',
status: '待处理'
},
{
"guid": "42118120003",
"code": "",
"name": "永丰水库",
"resRegCode": "42000020030-A4",
"adName": "白果镇",
"engScal": "大(2)型",
"place": "湖北省-黄冈市-麻城市-白果镇",
"lon": "115.068090",
"lat": "31.026170",
'username': '陈发',
taskType: '除草除杂',
tm: '2025-06-02 14:43:49',
status: '已处理'
},
]
const [list, setList] = useState(data)
const onChange = (event) => {
const value = event.target.value;
setDimension(value);
const newData = data.filter(item => item.taskType == value);
if (newData.length) {
setList(newData);
} else {
setList(data)
}
}
const flyTo = () => {
dispatch?.runtime.setInfoDlg({ layerId: 'ShuikuyanghuLayer', properties: {} })
}
return (
>
}
>
水库名称
管护类型
内容
上报时间
{list.map((row, index) => (
{row.name}
{row.taskType}
一切正常
{row.tm}
))}
{
setting && showSetting(false)} />
}
)
}
export default HDReal;