feat():修改水库

lsf-dev
李神峰 2025-06-10 13:53:14 +08:00
parent 0be79dd7c3
commit 75c5ba9690
15 changed files with 174 additions and 145 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

@ -337,9 +337,9 @@
},
"白蚁监测": {
"width": 20,
"height": 32,
"height": 30,
"x": 74,
"y": 290,
"y": 286,
"pixelRatio": 0.5,
"visible": true
},

View File

@ -247,13 +247,15 @@ const map = {
RealHDLayer: false,
RealSkLayer: false,
RainDrpLayer:true,
ShuikuLayer:true,
ShuikuLayer:false,
BxSkLayer: true,
FzdxLayer: false,
WataLayer: false,
AdcdLayer: true,
RoadLayer: true,
RivlLayer: true,
RealHDLayerQ2: true,
RealSkLayerQ2:true
};
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
@ -560,7 +562,7 @@ const map = {
dispatch.runtime.setYyfa({})
}
if (id === 3) {
if (id === 3 || id==203) {
dispatch.map.setLayerSetting({ dom: true });
// map.setLayoutProperty('卫星图', 'visibility', 'visible');
} else {

View File

@ -56,7 +56,7 @@ function HDStDlg({ record, onClose }) {
<DpTabs value={value} indicatorColor="primary" onChange={(_, v) => setValue(v)}>
<DpTab label={record.res_nm+'-'+record.cd_nm} />
</DpTabs>
<button className={classes.addButton} onClick={()=>setVisible(true)}>三维展示</button>
{/* <button className={classes.addButton} onClick={()=>setVisible(true)}>三维展示</button> */}
<DpCloseButton onClick={onClose} />
</DpAppBar>
<div style={{ padding: '2rem', hminHeight: '50rem',maxHeight: '60rem' }}>

View File

@ -196,23 +196,23 @@ function HDChart({ record }) {
style={{ height: '15rem', width: '30rem' }}
/>
<div className={classes.grid}>
<Typography variant="subtitle2">上报时间: {rtm ? moment(rtm).format('YYYY-MM-DD HH:mm:ss') : '-'}</Typography>
<Typography variant="subtitle2" style={{color:"#fff"}}>上报时间: {rtm ? moment(rtm).format('YYYY-MM-DD HH:mm:ss') : '-'}</Typography>
<div className={classes.realdrpgrid}>
<div className="item">
<div className="item" >
<Typography variant="caption">水位</Typography>
<Typography variant="h5">{renderHDRz(record)}</Typography>
<Typography variant="h5" style={{color:"#fff"}}>{renderHDRz(record)}</Typography>
</div>
<div className="item">
<div className="item" >
<Typography variant="caption">设防水位</Typography>
<Typography variant="h5">{record.sfz || '--'}</Typography>
<Typography variant="h5" style={{color:"#fff"}}>{record.sfz || '--'}</Typography>
</div>
<div className="item">
<Typography variant="caption">警戒水位</Typography>
<Typography variant="h5">{record.wrz || '--'}</Typography>
<Typography variant="h5" style={{color:"#fff"}}>{record.wrz || '--'}</Typography>
</div>
<div className="item">
<Typography variant="caption">保证水位</Typography>
<Typography variant="h5">{record.grz || '--'}</Typography>
<Typography variant="h5" style={{color:"#fff"}}>{record.grz || '--'}</Typography>
</div>
</div>
</div>

View File

@ -46,8 +46,8 @@ const ShapeStyle = {
const page1 = [
{
"res_cd": "42118140035",
"res_lon": 115.14137,
"res_lat": 31.55095,
"res_lon": 114.875,
"res_lat": 31.166667,
"cd": "01",
"cd_nm": "GN1",
"stnm": "GN1",
@ -65,7 +65,7 @@ const page1 = [
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"res_nm": "大堰口水库",
"res_nm": "浮桥河水库",
"de_value": -11.5381,
"dn_value": -11.2248,
"du_value": 113.8833,

View File

@ -9,6 +9,7 @@ import ReactEcharts from 'echarts-for-react';
import moment from 'moment'
import rzOption from './rzOption';
import DpAlert from '../../../../layouts/mui/DpAlert';
import { backgroundColor } from 'echarts/lib/theme/dark';
function RzSearch({ record }) {
console.log('r', record);
@ -64,7 +65,7 @@ function RzSearch({ record }) {
<DpAlert style={{ width: '100%' }} severity="error">{searchTm.error}</DpAlert>
</DpToolComponent>
) : (
<DpResultComponent>
<DpResultComponent >
<ReactEcharts
option={option}
style={{ height: '100%' }}

View File

@ -1,5 +1,6 @@
import echarts from 'echarts/lib/echarts';
import { hdyjColor } from '../../../../utils/renutils';
import { backgroundColor } from 'echarts/lib/theme/dark';
export default function rzOption({ data, skinfo }) {
const serialData = data.map(obj => [obj.tm, obj.rz || obj.z || 0]);
@ -19,14 +20,15 @@ export default function rzOption({ data, skinfo }) {
];
} else if (data[0]) {
const { sfz, wrz, grz } = data[0];
const recordWrz = wrz||skinfo.wrz;
markLine.data = [];
if (sfz) {
sorted.push(sfz)
markLine.data.push({ label: { formatter: '设防水位' }, yAxis: sfz, lineStyle: { color: hdyjColor[1] } });
}
if (wrz) {
sorted.push(wrz)
markLine.data.push({ label: { formatter: '警戒水位' }, yAxis: wrz, lineStyle: { color: hdyjColor[2] } });
if (recordWrz) {
sorted.push(recordWrz)
markLine.data.push({ label: { formatter: '警戒水位' + `(${recordWrz})` }, yAxis: recordWrz, lineStyle: { color: hdyjColor[2] } });
}
if (grz) {
sorted.push(grz)
@ -51,9 +53,9 @@ export default function rzOption({ data, skinfo }) {
}
},
grid: {
x: 24,
x: 25,
y: 24,
x2: 38,
x2: 100,
y2: 42,
borderWidth: 0
},

View File

@ -67,7 +67,7 @@ export default function OverallContent({ data, skAll }) {
24小时中共有<span className={classes.number}>1</span>
个站点雨量为<span className={classes.sttype}>大暴雨</span>
<span className={classes.number}>261mm</span>
共产生<span className={classes.number}>3</span>21<span className={classes.number}>1</span>
共产生<span className={classes.number}>3</span>21<span className={classes.number}>1</span><span className={classes.number}>1</span>
</div>
{/* <div>

View File

@ -14,12 +14,13 @@ import clsx from 'clsx';
import { renderDrp } from '../../../../utils/renutils';
const data1 = [
{
{
"res_cd": "42118140035",
"res_lon": 115.14137,
"res_lat": 31.55095,
"res_lon": 114.875,
"res_lat": 31.166667,
"cd": "01",
"cd_nm": "GN1",
"cd_nm": "GN1",
"stnm": "GN1",
"res_reg_cd": "42118140006-A4",
"ch": "0+000",
"province_cd": "420000000000",
@ -34,50 +35,17 @@ const data1 = [
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"res_nm": "大堰口水库",
"de_value": -4.2885,
"dn_value": -13.5384,
"du_value": 132.4892,
"res_nm": "浮桥河水库",
"de_value": -11.5381,
"dn_value": -11.2248,
"du_value": 113.8833,
"de_trend": null,
"dn_trend": null,
"du_trend": null,
"max_de": 1.0981,
"max_dn": -2.3255,
"max_du": 132.4892,
"dt": "2025-05-20",
"is_has_data": "y"
},
{
"res_cd": "42118140035",
"res_lon": 115.14137,
"res_lat": 31.55095,
"cd": "03",
"cd_nm": "GN3",
"res_reg_cd": "42118140006-A4",
"ch": "0+000",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181112000",
"town_nm": "福田河镇",
"bas_guid": "鄂东五河片区",
"eng_scal": "小1型",
"danger_stat": "非病险水库",
"label": "2023高标准",
"res_nm": "大堰口水库",
"de_value": -10.73,
"dn_value": -9.8975,
"du_value": 121.3495,
"de_trend": null,
"dn_trend": null,
"du_trend": null,
"max_de": 1.0981,
"max_dn": -2.3255,
"max_du": 132.4892,
"dt": "2025-05-20",
"max_de": 2.9303,
"max_dn": -2.1648,
"max_du": 113.8833,
"dt": "2025-05-25",
"is_has_data": "y"
},
{
@ -640,14 +608,16 @@ function DrpReal({ style }) {
<DpTableRow key={row.stcd}>
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer" onClick={() => {
const { res_lon:lgtd, res_lat:lttd } = row;
if (lgtd && lttd) {
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd],
zoom: 15,
pitch: 60,
bearing: 0
});
const { res_lon: lgtd, res_lat: lttd,res_nm:stnm } = row;
if (stnm == '浮桥河水库') {
if (lgtd && lttd) {
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd],
zoom: 15,
pitch: 60,
bearing: 0
});
}
}
}}>{row.res_nm}</div>
</DpTableCell>

View File

@ -204,7 +204,11 @@ export default function Overall({ style }) {
<Button
key={item.value}
className={classes.timeButton}
onClick={() => setTimeRange(item.value)}
onClick={() => {
if (item.value == '1h' || item.value == '3h') {
setTimeRange(item.value)
}
}}
variant={timeRange === item.value ? 'contained' : 'outlined'}
style={{ padding: '5px 10px' }}
>
@ -255,10 +259,10 @@ export default function Overall({ style }) {
{/* 展开的详细内容可以在这里添加 */}{
station.id == 'heavy' && drpData.map(item => (
<TableRow onClick={() =>flyTo(item)}>
<DpTableCell style={{ width: '25%' }}>{item.stnm}</DpTableCell>
<DpTableCell style={{ width: '20%' }}>{item.today}</DpTableCell>
<DpTableCell style={{ width: '25%' }}>阎家河镇</DpTableCell>
<DpTableCell style={{ width: '30%' }}>桃林河</DpTableCell>
<DpTableCell style={{ width: '53%' }}>{item.stnm}</DpTableCell>
<DpTableCell style={{ width: '10%' }}>{item.today}</DpTableCell>
<DpTableCell style={{ width: '20%' }}>阎家河镇</DpTableCell>
<DpTableCell style={{ width: '27%' }}>桃林河</DpTableCell>
</TableRow>
))
}

View File

@ -1,5 +1,6 @@
import React, { useState } from 'react';
import React, { useState,useCallback} from 'react';
import { OverallPromise } from '../../../../models/_/real';
import { useDispatch, useSelector } from 'react-redux';
import useRequest from '../../../../utils/useRequest';
import PanelBox from '../../components/PanelBox';
import OverallContent from './OverallContent';
@ -22,7 +23,13 @@ import {
import AddIcon from '@material-ui/icons/Add';
import RemoveIcon from '@material-ui/icons/Remove';
import DpTableCell from '../../../../layouts/mui/DpTableCell';
import useRefresh from '../../../../utils/useRefresh';
import { hdyjUnclose } from '../../../../models/_/hdyj';
import moment from 'moment';
import { HDRealPromise } from '../../../../models/_/real';
import { InfoPopNames } from '../../InfoPops';
import { hdyjLatestClosed } from '../../../../models/_/hdyj';
import config from '../../../../config';
const useStyles = makeStyles((theme) => ({
root: {
color: '#fff',
@ -90,7 +97,24 @@ const useStyles = makeStyles((theme) => ({
}
}));
export default function Overall({ style }) {
const dispatch = useDispatch();
const t = useRefresh(60 * 1000);
const hdyj =[{
"stcd": "61612900",
"stnm": "阎家河",
"adcd": null,
"wscd": null,
"importancy": 0,
"lgtd": 115.128722,
"lttd": 31.207,
"elev": null,
"hasRz": true,
"type": "sw",
"tm": "2025-06-03T02:00:00.000Z",
"rz": 61.75,
"state": 1,
wrz:61.6
}]
const classes = useStyles();
const [types, setTypes] = useState({
mountain: true,
@ -109,8 +133,8 @@ export default function Overall({ style }) {
};
const stations = [
{ id: 'history', name: '超危险水位', count: 0, type: 'pink' },
{ id: '100year', name: '超警戒水位', count: 0, type: 'purple' },
{ id: 'history', name: '超危险水位', count: 0, type: 'pink',types:'wx' },
{ id: '100year', name: '超警戒水位', count: 1, type: 'purple',types:'jj' },
];
const toggleExpand = (id) => {
@ -119,6 +143,19 @@ export default function Overall({ style }) {
[id]: !prev[id]
}));
};
const flyTo = useCallback(async ({ stcd, source }) => {
const list = await HDRealPromise.get() || [];
const record = list.find(o => o.stcd === stcd) || {};
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: InfoPopNames.RealHDPop, properties: {...record,wrz:61.6}, coordinates: [lgtd, lttd] });
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd],
zoom: 15,
pitch: config.poiPitch,
});
}
}, [dispatch]);
return (
<PanelBox
@ -175,13 +212,25 @@ export default function Overall({ style }) {
<DpTableCell colSpan={4} style={{ padding: 0 }}>
<Collapse in={expanded[station.id]} timeout="auto" unmountOnExit>
<Box className={`${classes.expandedRow} ${station.color}`}>
{/* 展开的详细内容可以在这里添加 */}
{/* <TableRow>
<DpTableCell style={{ width: '25%' }}>站名</DpTableCell>
<DpTableCell style={{ width: '20%' }}>水位(m)</DpTableCell>
<DpTableCell style={{ width: '25%' }}>所属政区</DpTableCell>
<DpTableCell style={{ width: '30%' }}>所属流域</DpTableCell>
</TableRow> */}
{
station.types == 'jj' ? hdyj.map(item => (
<TableRow onClick={() => flyTo(item)}>
<DpTableCell style={{ width: '40%' }}><div
className="table-ellipsis cursor-pointer"
>{item.stnm}</div></DpTableCell>
<DpTableCell style={{ width: '20%' }}><div
className="table-ellipsis cursor-pointer"
>{item.rz}</div></DpTableCell>
<DpTableCell style={{ width: '24%' }}><div
className="table-ellipsis cursor-pointer"
>{item.stnm}</div></DpTableCell>
<DpTableCell style={{ width: '20%' }}>{item.stnm}</DpTableCell>
</TableRow>
))
:
<Typography>暂无详细信息</Typography>
}
</Box>
</Collapse>
</DpTableCell>

View File

@ -105,13 +105,13 @@ export default function Overall({ style }) {
{
type: 'immediate',
label: '立即转移',
count: 3,
count: 0,
details: [] // 这里可以添加详细信息的数组
},
{
type: 'prepare',
label: '准备转移',
count: 0,
count: 3,
details: [] // 这里可以添加详细信息的数组
}
];
@ -278,10 +278,8 @@ export default function Overall({ style }) {
<DpTableCell colSpan={3} style={{ padding: 0 }}>
<Collapse in={expanded[row.type]} timeout="auto" unmountOnExit>
<Box className={classes.expandedContent}>
{/* 这里可以添加展开后显示的详细内容 */}
{/* <Typography>暂无详细信息</Typography> */}
{
row.type == 'immediate' ? zyData.map(item => (
row.type == 'prepare' ? zyData.map(item => (
<TableRow onClick={() => flyTo(item)}>
<DpTableCell style={{ width: '30%' }}><div
className="table-ellipsis cursor-pointer"

View File

@ -130,50 +130,52 @@ export default function Overall({ style }) {
}));
};
const skData = [{
"stcd": "716113701",
"type": "sk",
"hasRz": true,
"stnm": "永红水库",
"adcd": "421181105000",
"wscd": null,
"importancy": 0,
"lgtd": 115.120278,
"lttd": 31.183611,
"elev": 0,
"damel": 131.99,
"dsflz": 130.56,
"fsltdz": 129.9,
"ddz": 113.5,
"zcxsw": 129.9,
"drpTm": "2025-04-11T06:00:00.000Z",
"today": 0,
"h1": 0,
"h3": 0,
"h6": 0,
"h12": 0,
"h24": 0,
"h48": 0,
"drpState": 2,
"rz": 130.15,
"w": 0.444,
"a_fsltdz": -10.75,
"rzTm": "2025-04-11T06:00:00.000Z",
"rzWarning": 0,
"rzState": 2,
"pic": [
{
"stcd": "716113701",
"tm": "2023-11-16T11:19:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2023/1116/716113701/20231116191900.jpg"
},
{
"stcd": "716113701",
"tm": "2023-11-16T09:05:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2023/1116/716113702/20231116170500.jpg"
}
]
},]
const skData =[{
"stcd": "716129061",
"type": "sk",
"hasRz": true,
"stnm": "仰天窝水库",
"adcd": "421181201000",
"wscd": null,
"importancy": 0,
"lgtd": 115.106667,
"lttd": 31.126389,
"elev": 0,
"damel": 325.08,
"dsflz": 324.18,
"fsltdz": 323.5,
"ddz": 319.5,
"zcxsw": 323.5,
"drpTm": "2025-04-11T05:00:00.000Z",
"today": 0,
"h1": 0,
"h3": 0,
"h6": 0,
"h12": 0,
"h24": 0,
"h48": 0,
"drpState": 2,
"rz": 325.16,
"w": 0.132,
"a_fsltdz": 4.660000000000025,
"rzTm": "2025-04-11T05:00:00.000Z",
"rzWarning": 1,
"rzState": 2,
"pic": [
{
"stcd": "716129061",
"tm": "2023-03-12T06:05:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2023/0312/716129061/20230312140500.jpg"
},
{
"stcd": "716129061",
"tm": "2023-03-12T07:25:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2023/0312/716129062/20230312152500.jpg"
}
],
"aRz": 4.66,
"strarz": "4.66"
}];
const flyTo = () => {
const { lgtd, lttd } = skData[0];
if (lgtd && lttd) {
@ -247,11 +249,11 @@ export default function Overall({ style }) {
station.id == "cxx" && <TableRow onClick={() => flyTo()}>
<DpTableCell style={{ width: '20%' }}><div
className="table-ellipsis cursor-pointer"
>永红水库</div></DpTableCell>
<DpTableCell style={{ width: '20%' }}>130.15(0.25)</DpTableCell>
>仰天窝水库</div></DpTableCell>
<DpTableCell style={{ width: '20%' }}>325.16(1.66)</DpTableCell>
<DpTableCell style={{ width: '20%' }}><div
className="table-ellipsis cursor-pointer"
>阎家河</div></DpTableCell>
>龟山</div></DpTableCell>
<DpTableCell style={{ width: '20%' }}>阎家河</DpTableCell>
<DpTableCell style={{ width: '20%' }}><a
className="table-ellipsis cursor-pointer"

View File

@ -88,7 +88,8 @@ function Hdyj({ data }) {
}, [dispatch]);
const showdata = hisdata?.length > 0 ? hisdata : (data || []);
console.log("showdata",showdata);
return (
<div className="dppanel-shyj">
{