import clsx from 'clsx'; import React, { useMemo, useState,useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import useRequest from '../../../../utils/useRequest'; import PanelBox from '../../components/PanelBox'; import { Box, Typography, Checkbox, FormControlLabel, ButtonGroup, Button, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, IconButton, Collapse, Paper } from '@material-ui/core'; import RemoveIcon from '@material-ui/icons/Remove'; import { makeStyles } from '@material-ui/core/styles'; import AddIcon from '@material-ui/icons/Add'; import DpTableCell from '../../../../layouts/mui/DpTableCell'; import DpTableRow from '../../../../layouts/mui/DpTableRow'; import appconsts from '../../../../models/appconsts'; import { DatePicker } from 'antd'; import { SkRealPromise } from '../../../../models/_/real'; import { InfoPopNames } from '../../InfoPops'; import { renderDrp, renderSkArz, renderSkRz } from '../../../../utils/renutils'; import config from '../../../../config'; import moment from 'moment'; const { RangePicker } = DatePicker; const ljtj = [ {'level':'≥250',children:[],stcd:'001',color:'#ffd5d5'}, {'level':'100~250',children:[],stcd:'002',color:'#f2defe'}, {'level':'50~100',children:[],stcd:'003',color:'#ddf'}, {'level':'25~50',children:[],stcd:'004',color:'#d2e9fc'}, {'level':'10~25',children:[],stcd:'005',color:'#d9f7ff'}, {'level':'0.1~10',stcd:'006',color:'#edfce9',children:[ { "stcd": "61612910", "stnm": "白果镇", "adcd": "421181000000000", "wscd": null, "importancy": 0, "lgtd": 115.01083, "lttd": 31.041152, "elev": null, "hasRz": true, "type": "sh", "today": 0, "h1": 7, "h3": 8.4, "h6": 10.5, "h12": 11.200000000000001, "h24": 0.6, "h48": 32.8, "tm": "2025-06-03T02:10:00.000Z", "state": 1, "warning": 0 }, { "stcd": "61614460", "stnm": "夫子河镇", "adcd": "421181000000000", "wscd": null, "importancy": 0, "lgtd": 115.026944, "lttd": 30.959121, "elev": null, "hasRz": true, "type": "sh", "today": 0, "h1": 6, "h3": 7.199999999999999, "h6": 9, "h12": 9.600000000000001, "h24": 0.6, "h48": 11.899999999999999, "tm": "2025-06-03T02:00:00.000Z", "state": 1, "warning": 0 }, { "stcd": "61615110", "stnm": "盐田河镇", "adcd": "421181000000000", "wscd": null, "importancy": 0, "lgtd": 115.172808, "lttd": 30.963342, "elev": null, "hasRz": true, "type": "sh", "today": 0, "h1": 7, "h3": 8.4, "h6": 10.5, "h12": 11.200000000000001, "h24": 0.4, "h48": 31.299999999999997, "tm": "2025-06-03T02:00:00.000Z", "state": 1, "warning": 0 }, { "stcd": "616151210", "stnm": "龟山镇", "adcd": "421181000000000", "wscd": null, "importancy": 0, "lgtd": 115.183208, "lttd": 31.074978, "elev": null, "hasRz": true, "type": "sh", "today": 0, "h1": 7, "h3": 8.4, "h6": 10.5, "h12": 11.200000000000001, "h24": 0.51, "h48": 31.299999999999997, "tm": "2025-06-03T02:00:00.000Z", "state": 1, "warning": 0 }, ]}, ] const useStyles = makeStyles((theme) => ({ root: { color: '#fff' }, table: { '& .MuiTableCell-root': { color: '#fff', borderBottom: '1px solid rgba(255, 255, 255, 0.1)' } }, warningRow: { '&.immediate': { backgroundColor: '#d32f2f' }, '&.prepare': { backgroundColor: '#ed6c02' } }, expandIcon: { marginRight: theme.spacing(1), fontSize: 20, cursor: 'pointer', transition: 'transform 0.3s', '&.expanded': { transform: 'rotate(180deg)' } }, warningCount: { marginLeft: theme.spacing(1) }, expandedContent: { backgroundColor: 'rgba(0, 0, 0, 0.2)', padding: theme.spacing(2) }, statsSection: { marginTop: theme.spacing(4) }, statsTitle: { color: '#1976d2', marginBottom: theme.spacing(3) }, warningStats: { display: 'flex', justifyContent: 'space-around', marginTop: theme.spacing(2) }, statItem: { display: 'flex', flexDirection: 'column', alignItems: 'center' }, warningIcon: { fontSize: 40, marginBottom: theme.spacing(1), '&.immediate': { color: '#d32f2f' }, '&.prepare': { color: '#ed6c02' } }, })); export default function AreaDrp({ style }) { const dispatch = useDispatch(); const classes = useStyles(); const [params, setParams] = useState({ tm: [moment(),moment().add(1,'days')] }) const [tabVal, setTabVal] = useState('1') const [expanded, setExpanded] = useState({}); let { data } = useRequest(SkRealPromise.get); const sortedData = useMemo(() => (data || []).sort((a, b) => (b.aRz - a.aRz), [data])); const flyTo = (record) => { const { lgtd, lttd } = record; if (lgtd && lttd) { // dispatch.runtime.setFeaturePop({ type: 'RealDrpPop', properties: record, coordinates: [lgtd, lttd] }); dispatch.runtime.setCameraTarget({ center: [lgtd, lttd ], zoom: 12,//12config.poiPositionZoom.sk, pitch: 0,//config.poiPitch, bearing: 0, }); } } const handleExpand = (type) => { setExpanded(prev => ({ // ...prev, [type]: !prev[type] })); }; return ( <>
*/}
>
)
}