diff --git a/public/assets/dswgj.png b/public/assets/dswgj.png new file mode 100644 index 0000000..9685cd3 Binary files /dev/null and b/public/assets/dswgj.png differ diff --git a/public/assets/gxs.png b/public/assets/gxs.png new file mode 100644 index 0000000..d7d2e50 Binary files /dev/null and b/public/assets/gxs.png differ diff --git a/public/assets/lyhq.png b/public/assets/lyhq.png new file mode 100644 index 0000000..2e0725f Binary files /dev/null and b/public/assets/lyhq.png differ diff --git a/public/assets/xs.png b/public/assets/xs.png index 7abec89..ca0ab1e 100644 Binary files a/public/assets/xs.png and b/public/assets/xs.png differ diff --git a/public/assets/yytc.png b/public/assets/yytc.png index ed8aa97..b73305b 100644 Binary files a/public/assets/yytc.png and b/public/assets/yytc.png differ diff --git a/src/models/map/index.js b/src/models/map/index.js index 19e0c17..cbd05e2 100644 --- a/src/models/map/index.js +++ b/src/models/map/index.js @@ -148,7 +148,7 @@ const map = { setView(id) { let layerVisible = {}; const map = window.__mapref - if (id === 0 || id === 1 || id ==501 || id == 504 || id == 507 || id == 506|| id == 505 || id == 503) { + if (id === 0 || id === 1 || id == 503) { layerVisible = { RealDrpLayer: true, RealHDLayer: true, @@ -265,7 +265,7 @@ const map = { AdcdLayer: true, RoadLayer: true, RivlLayer: true, - BxjcLayer:true, + BxjcLayer: true, }; Object.keys(DCPJ_TYPES).forEach(key => { layerVisible['Dcpj_' + key + 'Layer'] = false; @@ -346,6 +346,58 @@ const map = { Object.keys(DCPJ_TYPES).forEach(key => { layerVisible['Dcpj_' + key + 'Layer'] = false; }); + } else if (id == 501) { + layerVisible = { + RealDrpLayer: true, + RealHDLayer: true, + RealSkLayer: true, + ShuiZhaLayer: true, + BzLayer: true, + SbLayer: true, + QdLayer: true, + ShuizhiLayer: true, + TrsqLayer: true, + AdcdLayer: true, + RivlLayer: true, + }; + Object.keys(DCPJ_TYPES).forEach(key => { + layerVisible['Dcpj_' + key + 'Layer'] = false; + }); + }else if (id == 504) { + layerVisible = { + RealDrpLayer: true, + TrsqLayer: true, + AdcdLayer: true, + RivlLayer: true, + }; + Object.keys(DCPJ_TYPES).forEach(key => { + layerVisible['Dcpj_' + key + 'Layer'] = false; + }); + }else if (id == 505) { + layerVisible = { + BzLayer: true, + SbLayer: true, + QdLayer: true, + ShuizhiLayer: true, + AdcdLayer: true, + RivlLayer: true, + }; + Object.keys(DCPJ_TYPES).forEach(key => { + layerVisible['Dcpj_' + key + 'Layer'] = false; + }); + }else if (id == 506 || id == 507) { + layerVisible = { + AdcdLayer: true, + RivlLayer: true, + }; + Object.keys(DCPJ_TYPES).forEach(key => { + if (key == 'bsnssinfo') { + layerVisible['Dcpj_' + key + 'Layer'] = true; + } else { + layerVisible['Dcpj_' + key + 'Layer'] = false; + + } + }); } dispatch.runtime.setLayerSetting({ contour: null, dem: undefined }) @@ -353,17 +405,17 @@ const map = { dispatch.runtime.setFeaturePop(null); - if(id===201||id===205){ - dispatch.map.setLayerSetting({dom: false}); + if (id === 201 || id === 205) { + dispatch.map.setLayerSetting({ dom: false }); map.setLayoutProperty('热力图', 'visibility', 'visible'); - }else{ + } else { // dispatch.map.setLayerSetting({dom: true}); map.setLayoutProperty('热力图', 'visibility', 'none'); } if (id != 504) { - dispatch.runtime.setYyfa({}) - } + dispatch.runtime.setYyfa({}) + } } diff --git a/src/models/map/layout.js b/src/models/map/layout.js index cb8c64e..63cc5bc 100644 --- a/src/models/map/layout.js +++ b/src/models/map/layout.js @@ -131,24 +131,44 @@ export default function calcLayout(view, rightStack, hidePanels) { leftFullHeight = true; }else if (view === 501) { left = [ - { key: '雨量监测',style: { height: '33%', flexGrow: 1 } }, - { key: '水情监测', style: { height: '33%', flexGrow: 1 } }, - { key: '工情监控', style: { height: '34%', flexGrow: 1 } }, + { key: '天气'}, + { key: '雨量监测',style: { height: '32%', flexGrow: 1 } }, + { key: '水情监测', style: { height: '32%', flexGrow: 1 } }, + { key: '工情监控', style: { height: '32%', flexGrow: 1 } }, ]; leftFullHeight = true; + }else if (view === 503) { + left = [ + { key: '天气' }, + { key: '警情', style: { height: '60%', flexGrow: 1 } }, + ]; + leftFullHeight = true; + } else if (view === 504) { left = [ - { key: '降雨预报', style: { height: '40%', flexGrow: 1 } }, - { key: '预警信息管理', style: { height: '40%', flexGrow: 1 } }, + { key: '天气'}, + { key: '降雨预报', style: { height: '30%', flexGrow: 1 } }, + { key: '预警信息管理', style: { height: '50%', flexGrow: 1 } }, ]; leftFullHeight = true; }else if (view === 505) { left = [ - { key: '灌区统计', style: { height: '30%', flexGrow: 1 } }, + { key: '天气'}, + { key: '灌区统计', style: { height: '25%', flexGrow: 1 } }, { key: '月用水趋势', style: { height: '35%', flexGrow: 1 } }, { key: '渠道分配比例', style: { height: '35%', flexGrow: 1 } }, ] leftFullHeight = true; + }else if (view === 506) { + left = [ + { key: '天气' }, + { key: '水政统计', style: { height: '40%', flexGrow: 1 } }, + ] + + }else if (view === 507) { + left = [ + { key: '天气'}, + ] } if (rightEx) { @@ -295,16 +315,15 @@ export default function calcLayout(view, rightStack, hidePanels) { rightFullHeight = true; }else if (view === 503) { right = [ - { key: '水资源调度', style: { height: '100%', flexGrow: 1 } }, - // { key: '月用水趋势', style: { height: '35%', flexGrow: 1 } }, + { key: '水资源调度', style: { height: '40%', flexGrow: 1 } }, + { key: '供需水', style: { height: '55%', flexGrow: 1 } }, // { key: '渠道分配比例', style: { height: '35%', flexGrow: 1 } }, ] rightFullHeight = true; }else if (view === 506) { right = [ - { key: '水政统计', style: { height: '30%', flexGrow: 1 } }, + { key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } }, { key: '区域统计', style: { height: '35%', flexGrow: 1 } }, - { key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } }, ] rightFullHeight = true; } diff --git a/src/views/Home/InfoPops/RealQDPop/HDChart.js b/src/views/Home/InfoPops/RealQDPop/HDChart.js new file mode 100644 index 0000000..7d2e5df --- /dev/null +++ b/src/views/Home/InfoPops/RealQDPop/HDChart.js @@ -0,0 +1,223 @@ +import React, { useEffect, useMemo, useState } from 'react' +import echarts from 'echarts/lib/echarts'; +import ReactEcharts from 'echarts-for-react'; +import { makeStyles, Typography } from '@material-ui/core'; +import moment from 'moment'; +import { hdyjColor, renderHDRz } from '../../../../utils/renutils'; +import { normalizeSearchTmRange } from '../../../../utils/tools'; +import { rzSearch } from '../../../../models/_/search'; + + +const useStyles = makeStyles({ + grid: { + color: '#fff', + padding: '1rem', + }, + + realdrpgrid: { + display: 'flex', + justifyContent: 'space-between', + textAlign: 'center', + margin: '0.5rem 0' + } +}) + +function HDChart({ record }) { + const classes = useStyles(); + + const [data, setData] = useState([]); + + const tm = [moment().add(-24, 'hour'), moment()]; + const resultTm = normalizeSearchTmRange(tm, 'h'); + + useEffect(() => { + rzSearch(record.type, record.stcd, 'h', resultTm, record.countycode).then((data) => { + setData(data || []); + }); + }, []) + + const option = useMemo(() => { + const serialData = data.map(obj => [obj.tm, obj.z || 0]); + + let sorted = data.map(o => o.z); + + const markLine = []; + const { sfz, wrz, grz } = record; + + if (sfz) { + sorted.push(sfz); + markLine.push({ name: '设防', yAxis: sfz, lineStyle: { color: hdyjColor[1] } }); + } + if (wrz) { + sorted.push(wrz); + markLine.push({ name: '警戒', yAxis: wrz, lineStyle: { color: hdyjColor[2] } }); + } + if (grz) { + sorted.push(grz); + markLine.push({ name: '保证', yAxis: grz, lineStyle: { color: hdyjColor[3] } }); + } + + + sorted = sorted.sort(); + let minVal = sorted[0] || 0; + let maxVal = sorted[sorted.length - 1] || 0; + let dz = 0.5; + maxVal = Math.ceil(maxVal / dz) * dz; + minVal = Math.floor(minVal / dz) * dz; + + return { + tooltip: { + trigger: 'axis', + axisPointer: { + lineStyle: { + color: '#fff' + } + } + }, + grid: { + x: markLine.length > 0 ? 64 : 24, + y: 24, + x2: 38, + y2: 42, + borderWidth: 0 + }, + calculable: true, + xAxis: [ + { + type: 'time', + splitLine: { + show: false + }, + axisLabel: { + color: '#bbb', + fontSize: 9, + textShadowBlur: 4, + textShadowColor: '#6ab', + // formatter: val => val.substr('2020-10-14 '.length, 2) + }, + axisLine: { + lineStyle: { + color: '#07a6ff', + width: 0.5, + } + }, + axisTick: { + show: false, + } + } + ], + yAxis: [ + { + type: 'value', + position: 'right', + splitLine: { + show: true, + lineStyle: { + color: '#07a6ff', + width: 0.25, + type: 'dashed' + } + }, + axisLabel: { + color: '#bbb', + fontSize: 10, + textShadowBlur: 4, + textShadowColor: '#6ab', + }, + axisLine: { + show: false + }, + axisTick: { + show: false, + }, + min: minVal, + max: maxVal + } + ], + series: [ + { + name: '水位', + type: 'line', + showSymbol: false, + label: { + show: false, + }, + data: serialData, + lineStyle: { + normal: { + width: 1, + } + }, + areaStyle: { + normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: 'rgba(3, 194, 236, 0.3)' + }, { + offset: 0.8, + color: 'rgba(3, 194, 236, 0)' + } + ], false), + shadowColor: 'rgba(0, 0, 0, 0.1)', + shadowBlur: 10 + } + }, + itemStyle: { + normal: { + color: '#03C2EC' + } + }, + markPoint: { + data: [ + { type: 'max', name: '最大值', symbol: 'circle', symbolSize: 1, symbolOffset: [0, -12] }, + { type: 'min', name: '最小值', symbol: 'circle', symbolSize: 1, symbolOffset: [0, 12] } + ] + }, + markLine: { + silent: true, + symbol: 'none', + label: { + position: 'start', + formatter: (p) => p?.name + ' ' + p?.value, + }, + data: markLine + } + } + ] + }; + }, [data]); + + const rtm = record.rzTm || record.tm; + + return ( + <> + + {/*
+ 上报时间: {rtm ? moment(rtm).format('YYYY-MM-DD HH:mm:ss') : '-'} +
+
+ 水位 + {renderHDRz(record)} +
+
+ 设防水位 + {record.sfz || '--'} +
+
+ 警戒水位 + {record.wrz || '--'} +
+
+ 保证水位 + {record.grz || '--'} +
+
+
*/} + + ) +} + +export default React.memo(HDChart); diff --git a/src/views/Home/InfoPops/RealQDPop/index.js b/src/views/Home/InfoPops/RealQDPop/index.js new file mode 100644 index 0000000..1ffab6b --- /dev/null +++ b/src/views/Home/InfoPops/RealQDPop/index.js @@ -0,0 +1,39 @@ +import React from 'react' +import { makeStyles } from '@material-ui/core'; +import HDChart from './HDChart'; + +const useStyles = makeStyles({ + grid: { + color: '#fff', + padding: '1rem', + }, + + realdrpgrid: { + display: 'flex', + justifyContent: 'space-between', + textAlign: 'center', + margin: '0.5rem 0' + } +}) + +function RealHDTip({ record, dispatch }) { + + const viewInfo = () => { + dispatch?.runtime.setInfoDlg({ layerId: 'RealHDLayer', properties: record }) + } + + return ( + <> +
+
+
{record.stnm}
+
详细
+
+ + +
+ + ) +} + +export default React.memo(RealHDTip); diff --git a/src/views/Home/InfoPops/index.js b/src/views/Home/InfoPops/index.js index d5d06a2..6af53c7 100644 --- a/src/views/Home/InfoPops/index.js +++ b/src/views/Home/InfoPops/index.js @@ -27,6 +27,7 @@ import SqPop from './SqPop'; import LlqdPop from './LlqdPop'; import LlsbPop from './LlsbPop'; import ScjcPop from './ScJcPop'; +import RealQDPop from './RealQDPop' export const InfoPopNames = { RealSkPop: 'RealSkPop', RealHDPop: 'RealHDPop', @@ -40,7 +41,10 @@ export const InfoPops = ({ type, properties, dispatch }) => { return } else if (type === InfoPopNames.RealHDPop) { return - } else if (type === InfoPopNames.RealSkPop) { + }else if (type === 'qdpop') { + return + } + else if (type === InfoPopNames.RealSkPop) { return } else if (type === InfoPopNames.PicStPop) { return diff --git a/src/views/Home/MapCtrl/mapstyle/bzlayer.js b/src/views/Home/MapCtrl/mapstyle/bzlayer.js index deca106..2ee98ed 100644 --- a/src/views/Home/MapCtrl/mapstyle/bzlayer.js +++ b/src/views/Home/MapCtrl/mapstyle/bzlayer.js @@ -5614,7 +5614,7 @@ export default class BzLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: 'bz', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/MapCtrl/mapstyle/qdlayer.js b/src/views/Home/MapCtrl/mapstyle/qdlayer.js index b8c8c6f..c7c5ec6 100644 --- a/src/views/Home/MapCtrl/mapstyle/qdlayer.js +++ b/src/views/Home/MapCtrl/mapstyle/qdlayer.js @@ -76,6 +76,39 @@ const page1 = [ "lgtd": 111.826413, "irrCode_dictText": "水库枢纽", "bsnm": "漳河流域" + }, + { + "addvcd": "420800000000000", + "moditime": "2022-10-01 21:00:00", + "comments": "水资源多孔闸门控制系统", + "src": "zhzj", + "esstym": "", + "mvalue": { + "formatTm": null, + "formatHq": "0.000", + "vol": 0, + "formatAccq": null, + "stcd": "4211221029", + "rz": 1.123, + "tm": "2025-05-26 16:00", + "hq": 0, + "fr": null, + "chan": "1", + "accq": 120057496 + }, + "lttd": 31.145846, + "sttp": "QQ", + "irrCode": "D00001300", + "sort": 6001, + "hasImg": false, + "stlc": "荆门市", + "dtmel": 0, + "stcd": "4211221029", + "stnm": "邓家河干渠", + "addvcd_dictText": "荆门市", + "lgtd": 114.753859, + "irrCode_dictText": "水库枢纽", + "bsnm": "漳河流域" }, { "addvcd": "420800000000000", @@ -1346,7 +1379,7 @@ export default class QdLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: '渠道流量站', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/MapCtrl/mapstyle/sblayer.js b/src/views/Home/MapCtrl/mapstyle/sblayer.js index 6344a6a..d1bf5bd 100644 --- a/src/views/Home/MapCtrl/mapstyle/sblayer.js +++ b/src/views/Home/MapCtrl/mapstyle/sblayer.js @@ -774,7 +774,7 @@ export default class SbLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: '流量水表站', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/MapCtrl/mapstyle/shuizhalayer.js b/src/views/Home/MapCtrl/mapstyle/shuizhalayer.js index 1399d33..fa872e6 100644 --- a/src/views/Home/MapCtrl/mapstyle/shuizhalayer.js +++ b/src/views/Home/MapCtrl/mapstyle/shuizhalayer.js @@ -4920,7 +4920,7 @@ export default class ShuiZhaLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: 'sz', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/MapCtrl/mapstyle/shuizhilayer.js b/src/views/Home/MapCtrl/mapstyle/shuizhilayer.js index 9733490..1583538 100644 --- a/src/views/Home/MapCtrl/mapstyle/shuizhilayer.js +++ b/src/views/Home/MapCtrl/mapstyle/shuizhilayer.js @@ -544,7 +544,7 @@ export default class ShuizhiLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: '水质站', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/MapCtrl/mapstyle/trsqlayer.js b/src/views/Home/MapCtrl/mapstyle/trsqlayer.js index 844a724..18d93be 100644 --- a/src/views/Home/MapCtrl/mapstyle/trsqlayer.js +++ b/src/views/Home/MapCtrl/mapstyle/trsqlayer.js @@ -243,7 +243,7 @@ export default class TrsqLayer extends BaseLayer { featureClicked(properties, dispatch) { dispatch.runtime.setFeaturePop({ - type: InfoPopNames.PicStPop, + type: '墒情站', properties, coordinates: [properties.lgtd, properties.lttd], offsetPop: true, diff --git a/src/views/Home/PanelIndex.js b/src/views/Home/PanelIndex.js index 417c4fe..a758169 100644 --- a/src/views/Home/PanelIndex.js +++ b/src/views/Home/PanelIndex.js @@ -82,6 +82,8 @@ import Afjk from './panels/Afjk' import Dhfx from './panels/Dhfx' import Yhfx from './panels/Yhfx' import Bjtj from './panels/Bjtj' +import Szzddgxs from './panels/Szzddgxs' +import Szzddjq from './panels/Szzddjq' export default function PanelIndex({ name, style, ...params }) { if (name === '天气') { @@ -196,6 +198,8 @@ export default function PanelIndex({ name, style, ...params }) { return } else if (name == '水资源调度') { return + } else if (name == '供需水') { + return }else if (name == '预演方案') { return }else if (name == '预演结果') { @@ -250,6 +254,8 @@ export default function PanelIndex({ name, style, ...params }) { return } else if (name === '报警统计') { return + } else if (name === '警情') { + return } diff --git a/src/views/Home/index.js b/src/views/Home/index.js index 178ac33..450aaf7 100644 --- a/src/views/Home/index.js +++ b/src/views/Home/index.js @@ -29,7 +29,7 @@ export default function Demo1() { yyRes.yy && <> - + } diff --git a/src/views/Home/panels/GqWatch/constatData.js b/src/views/Home/panels/GqWatch/constatData.js index 306aaa8..7af3d1c 100644 --- a/src/views/Home/panels/GqWatch/constatData.js +++ b/src/views/Home/panels/GqWatch/constatData.js @@ -60,67 +60,6 @@ "insPow": null, "collDate": "2022-09-15" }, - { - "mvalue": null, - "wainWasoType": null, - "updserRsn": "换启闭机", - "gtctrTp": null, - "updDate": "2023-08-31", - "chanCode": "420802001350", - "engStat": null, - "desTotInsCap": null, - "gateSize": "3*2.8", - "wagaCode": "HP0074208020000185", - "adCode": "420802102000000", - "adCode_dictText": "漳河镇", - "lgtd": 112.078158 +2.9619, - "updserInvst": null, - "engGrad": null, - "runStat": "1", - "irrCode_dictText": "总干渠", - "flow": null, - "bnch": "0+920", - "startLat": null, - "engScal": null, - "chanCode_dictText": "总干渠", - "lockDisc": null, - "wagaUse": null, - "engManCode_dictText": "烟墩管理段", - "irrCode": "D00000290", - "sort": 1002, - "stcd": "0000000004", - "dsfl": 50, - "admDep": null, - "startDate": null, - "note": null, - "inEle": 108, - "pwrTp": "2", - "updserDate": "2014-01-01", - "engManCode": "ENG100035", - "chidCount": 1, - "whthInWat_dictText": "是", - "lttd": 30.953845 -0.2002, - "whthInWat": "1", - "hasImg": true, - "stfl": 32, - "endLat": null, - "wagaType": "1", - "endLong": null, - "gtctrTlmtCd": null, - "outEle": 108, - "pwrTp_dictText": "电动", - "wagaName": "二干渠进水闸", - "wagaType_dictText": "分水闸", - "hdgrTp": "2", - "compDate": "1966-01-01", - "startLong": null, - "gaorNum": 1, - "runStat_dictText": "在用良好", - "gateTp": "平板", - "hdgrTp_dictText": "螺杆式", - "insPow": null, - "collDate": "2022-09-15" - }, { "mvalue": null, "wainWasoType": null, diff --git a/src/views/Home/panels/Gwdh/index.js b/src/views/Home/panels/Gwdh/index.js index ee1271f..444ea45 100644 --- a/src/views/Home/panels/Gwdh/index.js +++ b/src/views/Home/panels/Gwdh/index.js @@ -20,6 +20,7 @@ import config from '../../../../config'; import { DatePicker } from 'antd'; import moment from 'moment'; import './index.less' +import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index' const { RangePicker } = DatePicker; function rzRender(rz, base) { @@ -37,6 +38,7 @@ function HDReal({ style }) { // const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0); // let { data } = useRequest(HDRealPromise.get, t); const [setting, showSetting] = useState(false); + const [dimension, setDimension] =useState('ft'); // const showData = useMemo(() => { // if (!data) { @@ -137,43 +139,82 @@ function HDReal({ style }) { } > -
- trigger.parentElement} - /> -
+
+
+ trigger.parentElement} + /> +
+
+ + + + +
+
- 日期 - 电耗(kWh) + 日期 + 水厂 + 电耗(kWh) + 上月对比(kWh) - {data.map((row) => ( + {data.map((row,i) => (
{row.date}
+ 水厂{i+1} {row.power} + 0 {/* {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} */}
diff --git a/src/views/Home/panels/Gwgsl/index.js b/src/views/Home/panels/Gwgsl/index.js index bc9998a..5bee8cc 100644 --- a/src/views/Home/panels/Gwgsl/index.js +++ b/src/views/Home/panels/Gwgsl/index.js @@ -1,4 +1,4 @@ -import React, { useMemo, useState,useEffect } from 'react'; +import React, { useMemo, useState, useEffect } from 'react'; import useRequest from '../../../../utils/useRequest'; import PanelBox from '../../components/PanelBox'; @@ -19,6 +19,8 @@ import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; import { DatePicker } from 'antd'; import moment from 'moment'; +import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index' + import './index.less' const { RangePicker } = DatePicker; @@ -55,12 +57,12 @@ function HDReal({ style }) { // return ret; // }, [data, tableRzFilter]); - const showData = Array(1).fill(0).map((o,i) => ({ + const showData = Array(1).fill(0).map((o, i) => ({ date: '2025-05-26', event: '侵占河道', type: '侵占河道', status: '待处理', - place:'浮桥河灌区' + place: '浮桥河灌区' })) const flyTo = (record) => { @@ -78,11 +80,11 @@ function HDReal({ style }) { const data = [ { key: '0', date: '合计', supply: '15402.15', lastMonth: '14725.78' }, - { key: '1', date: '2025-05-01', supply: '643.91', lastMonth: '446.78' }, - { key: '2', date: '2025-05-02', supply: '654.94', lastMonth: '527.03' }, - { key: '3', date: '2025-05-03', supply: '674.31', lastMonth: '528.33' }, - { key: '4', date: '2025-05-04', supply: '619.43', lastMonth: '448.18' }, - { key: '5', date: '2025-05-05', supply: '537.5', lastMonth: '483.9' } + { key: '1', date: '2025-05-01', supply: '643.91', lastMonth: '446.78', waterp: '水厂1' }, + { key: '2', date: '2025-05-02', supply: '654.94', lastMonth: '527.03', waterp: '水厂2' }, + { key: '3', date: '2025-05-03', supply: '674.31', lastMonth: '528.33', waterp: '水厂3' }, + { key: '4', date: '2025-05-04', supply: '619.43', lastMonth: '448.18', waterp: '水厂4' }, + { key: '5', date: '2025-05-05', supply: '537.5', lastMonth: '483.9', waterp: '水厂5' } ]; const toggleStType = (type) => { const visible = !tableRzFilter[type]; @@ -92,29 +94,30 @@ function HDReal({ style }) { const toggleAutoRefresh = () => { dispatch.realview.setHdAutoRefresh(!hdAutoRefresh); } +const [dimension, setDimension] =useState('ft'); - const searchTm = (e) => { - setParams({ - ...params, - stm: e[0].format("YYYY-MM-DD HH:mm"), - etm: e[1].format("YYYY-MM-DD HH:mm"), - tm:e, - }) - }; - useEffect(() => { - let options = ""; - options = { - etm: moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), - stm: moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), - tm: [ - moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }), - moment().add(1, 'hour').set({ minute: 0, second: 0 }), - ], - } - - setParams(options) - - }, []) + const searchTm = (e) => { + setParams({ + ...params, + stm: e[0].format("YYYY-MM-DD HH:mm"), + etm: e[1].format("YYYY-MM-DD HH:mm"), + tm: e, + }) + }; + useEffect(() => { + let options = ""; + options = { + etm: moment().add(1, 'hour').set({ minute: 0, second: 0 }).format("YYYY-MM-DD HH:mm"), + stm: moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }).format("YYYY-MM-DD HH:mm"), + tm: [ + moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }), + moment().add(1, 'hour').set({ minute: 0, second: 0 }), + ], + } + + setParams(options) + + }, []) return ( } > -
- trigger.parentElement} - /> -
- +
+
+ trigger.parentElement} + /> +
+
+ + + + +
+
+
- 日期 - 供水量(m³) - 上月对比(m³) + 日期 + 水厂 + 供水量(m³) + 上月对比(m³) @@ -170,6 +209,7 @@ function HDReal({ style }) { className="table-ellipsis cursor-pointer" >{row.date} + {row.waterp} {row.supply} {row.lastMonth} {/* {rzRender(row.rz, row.grz)} diff --git a/src/views/Home/panels/Gwjc/index.js b/src/views/Home/panels/Gwjc/index.js index 62e8019..3bae68f 100644 --- a/src/views/Home/panels/Gwjc/index.js +++ b/src/views/Home/panels/Gwjc/index.js @@ -57,7 +57,7 @@ function HDReal({ style }) { const showData = [ { stnm: '监测点1', - press: '0.52', + press: '0.91', flow: 200, hg: 90, "lttd": 30.8456 +0.2002, @@ -76,7 +76,7 @@ function HDReal({ style }) { stnm: '监测点3', press: '0.52', flow: 200, - hg: 90, + hg: 20, "lttd": 30.8866 +0.2002, "lgtd": 112.2006 +2.9619, @@ -146,10 +146,10 @@ function HDReal({ style }) {
{row.press}
+ style={{color:row.press > 0.8 ? 'orange':''}}>{row.press}
{row.flow} - {row.hg} +
{row.hg}
{/* {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} */} diff --git a/src/views/Home/panels/Gwqsl/index.js b/src/views/Home/panels/Gwqsl/index.js index 357f19e..53f86e6 100644 --- a/src/views/Home/panels/Gwqsl/index.js +++ b/src/views/Home/panels/Gwqsl/index.js @@ -19,6 +19,8 @@ import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; import { DatePicker } from 'antd'; import moment from 'moment'; +import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index' + import './index.less' const { RangePicker } = DatePicker; @@ -31,6 +33,8 @@ function rzRender(rz, base) { } function HDReal({ style }) { + const [dimension, setDimension] =useState('ft'); + const dispatch = useDispatch(); const tableRzFilter = useSelector(s => s.realview.tableRzFilter); const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh); @@ -77,16 +81,12 @@ function HDReal({ style }) { const data = [ - { key: '0', date: '合计', intake: '20959.07', lastMonth: '22558.47' }, - { key: '1', date: '2025-05-01', intake: '754.77', lastMonth: '704.77' }, - { key: '2', date: '2025-05-02', intake: '940.93', lastMonth: '713.9' }, - { key: '3', date: '2025-05-03', intake: '891.67', lastMonth: '526.83' }, - { key: '4', date: '2025-05-04', intake: '888.15', lastMonth: '577.1' }, - { key: '5', date: '2025-05-05', intake: '813.27', lastMonth: '780.13' }, - { key: '6', date: '2025-05-06', intake: '875.79', lastMonth: '850.83' }, - { key: '7', date: '2025-05-07', intake: '743.86', lastMonth: '862.48' }, - { key: '8', date: '2025-05-08', intake: '728.14', lastMonth: '853.63' }, - { key: '9', date: '2025-05-09', intake: '738.43', lastMonth: '890.43' } + { key: '0', date: '合计', intake: '20959.07', lastMonth: '22558.47',waterp: '' }, + { key: '1', date: '2025-05-01', intake: '754.77', lastMonth: '704.77',waterp: '水厂1' }, + { key: '2', date: '2025-05-02', intake: '940.93', lastMonth: '713.9',waterp: '水厂2' }, + { key: '3', date: '2025-05-03', intake: '891.67', lastMonth: '526.83',waterp: '水厂3' }, + { key: '4', date: '2025-05-04', intake: '888.15', lastMonth: '577.1',waterp: '水厂4' }, + { key: '5', date: '2025-05-05', intake: '813.27', lastMonth: '780.13',waterp: '水厂5' }, ]; const toggleStType = (type) => { const visible = !tableRzFilter[type]; @@ -137,33 +137,69 @@ function HDReal({ style }) { } > -
- trigger.parentElement} - /> -
+
+
+ trigger.parentElement} + /> +
+
+ + + + +
+
- 日期 - 取水量(m³) - 上月对比(m³) + 日期 + 水厂 + 取水量(m³) + 上月对比(m³) @@ -174,6 +210,7 @@ function HDReal({ style }) { className="table-ellipsis cursor-pointer" >{row.date} + {row.waterp} {row.intake} {row.lastMonth} {/* {rzRender(row.rz, row.grz)} diff --git a/src/views/Home/panels/Gx/OverallContent.js b/src/views/Home/panels/Gx/OverallContent.js index 77e27af..3bcf2c0 100644 --- a/src/views/Home/panels/Gx/OverallContent.js +++ b/src/views/Home/panels/Gx/OverallContent.js @@ -122,7 +122,7 @@ export default function OverallContent({ data }) {
总数量
-
12875公里
+
12875千米
总里程
{/*
diff --git a/src/views/Home/panels/HDWatch/index.js b/src/views/Home/panels/HDWatch/index.js index 4d9d971..6451a60 100644 --- a/src/views/Home/panels/HDWatch/index.js +++ b/src/views/Home/panels/HDWatch/index.js @@ -48,12 +48,71 @@ function HDReal({ style }) { }); return ret; }, [data, tableRzFilter]); - console.log("showData",showData); + console.log("showData", showData); - const flyTo = (record) => { + const skData = [ + { + "stcd": "61613010", + "type": "sk", + "hasRz": true, + "stnm": "明山水库", + "adcd": "421181103000", + "wscd": null, + "importancy": 0, + "lgtd": 115.066667, + "lttd": 31.016667, + "elev": 0, + "damel": 98.7, + "dsflz": 96.07, + "fsltdz": 93, + "ddz": 78.02, + "zcxsw": 93, + "drpTm": "2025-05-28T03:00:00.000Z", + "today": 0, + "h1": 0, + "h3": 0, + "h6": 0, + "h12": 0, + "h24": 0, + "h48": 0, + "drpState": 1, + "rz": 83.23, + "w": 42.8, + "a_fsltdz": -9.769999999999996, + "rzTm": "2025-05-28T03:00:00.000Z", + "rzWarning": 0, + "rzState": 1 + } + ] + const qdData = [ + { + "stcd": "61613010", + "stnm": "邓家河干渠", + "adcd": "421181103000", + "wscd": null, + "importancy": 0, + "lgtd": 114.753859, + "lttd": 31.145846, + "elev": 0, + "hasRz": true, + "type": "sk", + "tm": "2025-05-28T02:00:00.000Z", + "today": 0.52, + "h1": 0, + "h3": 0, + "h6": 0, + "h12": 0, + "h24": 0, + "h48": 0, + "state": 1, + "warning": 0 + }, + ] + + const flyTo = (record,types) => { const { lgtd, lttd } = record; if (lgtd && lttd) { - dispatch.runtime.setFeaturePop({ type: InfoPopNames.RealHDPop, properties: record, coordinates: [lgtd, lttd] }); + dispatch.runtime.setFeaturePop({ type: types =='hd'?InfoPopNames.RealHDPop:types =='sk'?InfoPopNames.RealSkPop:'qdpop', properties: record, coordinates: [lgtd, lttd] }); dispatch.runtime.setCameraTarget({ center: [lgtd, lttd + config.poiPositionOffsetY.hd], zoom: config.poiPositionZoom.hd, @@ -80,6 +139,7 @@ function HDReal({ style }) { tabs={ toggleStType('hd')}>河道 + toggleStType('sk')}>水库 toggleStType('qd')}>渠道 } @@ -107,25 +167,40 @@ function HDReal({ style }) {
flyTo(row)}>{row.stnm}
- {renderHDRz(row)} + {renderHDRz(row,'hd')} {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} ))}
-
: + : + - 名称 - 水位 - 保证水位 - 警戒水位 + 名称 + 水位 - + {type == 'sk'?skData.map((row) => ( + + +
flyTo(row,'sk')}>{row.stnm}
+
+ {row.rz} +
+ )) : + qdData.map((row) => ( + + +
flyTo(row,'qd')}>{row.stnm}
+
+ {row.elev} +
+ )) + }
diff --git a/src/views/Home/panels/SzSta/OverallContent.js b/src/views/Home/panels/SzSta/OverallContent.js index fb37000..c7aef23 100644 --- a/src/views/Home/panels/SzSta/OverallContent.js +++ b/src/views/Home/panels/SzSta/OverallContent.js @@ -126,10 +126,10 @@ export default function OverallContent({ data }) {
5
-
涉水事件累计
+
累计事件数量
1
@@ -141,7 +141,7 @@ export default function OverallContent({ data }) {
处理中事件
-
24
+
24
diff --git a/src/views/Home/panels/SzSta/index.js b/src/views/Home/panels/SzSta/index.js index b3209c7..a69b0f4 100644 --- a/src/views/Home/panels/SzSta/index.js +++ b/src/views/Home/panels/SzSta/index.js @@ -3,11 +3,43 @@ import { OverallPromise } from '../../../../models/_/real'; import useRequest from '../../../../utils/useRequest'; import PanelBox from '../../components/PanelBox'; import OverallContent from './OverallContent'; - +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'; export default function Overall({ style }) { const { data } = useRequest(OverallPromise.get); - + const showData = [ + { + unit: '麻城市水利和湖泊局', + inspectionCount: 50, + eventCount: 2, + processingCount: 1 + }, + { + unit: '麻城市水利事业发展中心', + inspectionCount: 0, + eventCount: 0, + processingCount: 0 + }, + { + unit: '麻城市河道堤防管理事务中心', + inspectionCount: 0, + eventCount: 0, + processingCount: 0 + }, + { + unit: '麻城市明山水库管理处', + inspectionCount: 0, + eventCount: 0, + processingCount: 0 + } + + ] return ( + + + + + 管理单位 + 累计巡查次数 + 事件数 + 处理中事件数 + + + + {showData.map((row) => ( + + +
{row.unit}
+
+ {row.inspectionCount} +
{row.eventCount}
+ {row.processingCount} + {/* {rzRender(row.rz, row.grz)} + {rzRender(row.rz, row.wrz)} */} +
+ ))} +
+
+
) } diff --git a/src/views/Home/panels/Szqytj/index.js b/src/views/Home/panels/Szqytj/index.js index 9f346b8..90a011b 100644 --- a/src/views/Home/panels/Szqytj/index.js +++ b/src/views/Home/panels/Szqytj/index.js @@ -119,7 +119,7 @@ function HDReal({ style }) { // } extra={ <> - + {/* */} {/* showSetting(true)}> */} } @@ -166,7 +166,7 @@ function HDReal({ style }) { {row.event} {row.type} - {row.place} +
{row.place}
{row.status} {/* {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} */} diff --git a/src/views/Home/panels/Szwtqytj/index.js b/src/views/Home/panels/Szwtqytj/index.js index 18d29f5..4ae4845 100644 --- a/src/views/Home/panels/Szwtqytj/index.js +++ b/src/views/Home/panels/Szwtqytj/index.js @@ -121,7 +121,7 @@ function HDReal({ style }) { // } extra={ <> - + {/* */} {/* showSetting(true)}> */} } @@ -166,7 +166,7 @@ function HDReal({ style }) { className="table-ellipsis cursor-pointer" >{row.date} - {row.event} +
{row.event}
{row.type} {row.place} {row.status} diff --git a/src/views/Home/panels/Szzdd/index.js b/src/views/Home/panels/Szzdd/index.js index 4438c1f..6e0069e 100644 --- a/src/views/Home/panels/Szzdd/index.js +++ b/src/views/Home/panels/Szzdd/index.js @@ -1,8 +1,10 @@ -import React,{useState} from 'react' +import React, { useState } from 'react' import PanelBox from '../../components/PanelBox'; import MiniSinglePie from './MiniSinglePie' import clsx from 'clsx'; -import { FormControl, InputLabel, Select, MenuItem } from '@material-ui/core/index'; +import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index' +import { styled } from '@material-ui/styles'; + export default function GQ({ style }) { const v1 = 20; @@ -13,25 +15,48 @@ export default function GQ({ style }) { const v4 = 800; const r2 = (v3 * 100 / v4).toFixed(1); const [selected, setSelected] = useState(1) - const [dimension, setDimension] =useState('waterUsage'); + const CustomSwitch = styled(Switch)({ + '& .MuiSwitch-switchBase': { + color: '#fff', + '&.Mui-checked': { + color: '#1890ff', + '& + .MuiSwitch-track': { + backgroundColor: '#1890ff', + opacity: 0.5, + }, + }, + }, + '& .MuiSwitch-track': { + backgroundColor: 'rgba(255, 255, 255, 0.3)', + }, + }); + + const StyledFormControlLabel = styled(FormControlLabel)({ + '& .MuiFormControlLabel-label': { + color: '#fff' + } + }); + const [dimension, setDimension] = useState('fqh'); + const [checked, setChecked] = React.useState(false); + return ( - setSelected(1)}>供蓄水 - setSelected(2)}>蓄水 - setSelected(3)}>警情 - - } + title="蓄水" + color="green" + // tabs={ + // + // setSelected(1)}>供蓄水 + // setSelected(2)}>蓄水 + // setSelected(3)}>警情 + // + // } extra={ } > -
-
+ {/*
浮桥河灌区 -
- -
+
*/} + + +
+ + setChecked(e.target.checked)} + /> + } + label="多灌区模式" + /> + {checked &&
+ + + + +
} +
) } diff --git a/src/views/Home/panels/Szzddgxs/MiniSinglePie.js b/src/views/Home/panels/Szzddgxs/MiniSinglePie.js new file mode 100644 index 0000000..114c3a7 --- /dev/null +++ b/src/views/Home/panels/Szzddgxs/MiniSinglePie.js @@ -0,0 +1,68 @@ + + +import React, { useMemo } from 'react'; +import ReactEcharts from 'echarts-for-react'; + + + +export default ({ value, name, fontSize, color, color2 }) => { + + const option = useMemo(() => { + + const ret = { + series: [{ + name: name, + type: 'pie', + radius: ['70%', '85%'], + avoidLabelOverlap: false, + hoverAnimation: false, + label: { + normal: { + show: false, + position: 'center', + textStyle: { + fontSize: fontSize || 16, + fontWeight: 'bold' + }, + formatter: '{b}\n\n{c}%' + } + }, + data: [{ + value, + name, + itemStyle: { + normal: { + color: color || '#7ca8da', + } + }, + label: { + normal: { + show: true + } + } + }, + { + value: 100 - value, + name: '', + itemStyle: { + normal: { + color: color2 || '#495c76', + } + }, + } + ] + }] + }; + + return ret; + }, []); + + + return ( + + ) +} + diff --git a/src/views/Home/panels/Szzddgxs/index.js b/src/views/Home/panels/Szzddgxs/index.js new file mode 100644 index 0000000..50862e9 --- /dev/null +++ b/src/views/Home/panels/Szzddgxs/index.js @@ -0,0 +1,71 @@ +import React,{useState} from 'react' +import PanelBox from '../../components/PanelBox'; +import MiniSinglePie from './MiniSinglePie' +import clsx from 'clsx'; +import { FormControl, InputLabel, Select, MenuItem } from '@material-ui/core/index'; + +export default function GQ({ style }) { + const v1 = 20; + const v2 = 32; + const r = (v1 * 100 / v2).toFixed(1); + + const v3 = 650; + const v4 = 800; + const r2 = (v3 * 100 / v4).toFixed(1); + const [selected, setSelected] = useState(1) + const [dimension, setDimension] =useState('waterUsage'); + return ( + + // setSelected(1)}>供蓄水 + // setSelected(2)}>蓄水 + // setSelected(3)}>警情 + // + // } + extra={ + + } + > +
+ {/*
+ + 灌区 + + +
*/} + +
+
+ ) +} diff --git a/src/views/Home/panels/Szzddjq/MiniSinglePie.js b/src/views/Home/panels/Szzddjq/MiniSinglePie.js new file mode 100644 index 0000000..114c3a7 --- /dev/null +++ b/src/views/Home/panels/Szzddjq/MiniSinglePie.js @@ -0,0 +1,68 @@ + + +import React, { useMemo } from 'react'; +import ReactEcharts from 'echarts-for-react'; + + + +export default ({ value, name, fontSize, color, color2 }) => { + + const option = useMemo(() => { + + const ret = { + series: [{ + name: name, + type: 'pie', + radius: ['70%', '85%'], + avoidLabelOverlap: false, + hoverAnimation: false, + label: { + normal: { + show: false, + position: 'center', + textStyle: { + fontSize: fontSize || 16, + fontWeight: 'bold' + }, + formatter: '{b}\n\n{c}%' + } + }, + data: [{ + value, + name, + itemStyle: { + normal: { + color: color || '#7ca8da', + } + }, + label: { + normal: { + show: true + } + } + }, + { + value: 100 - value, + name: '', + itemStyle: { + normal: { + color: color2 || '#495c76', + } + }, + } + ] + }] + }; + + return ret; + }, []); + + + return ( + + ) +} + diff --git a/src/views/Home/panels/Szzddjq/index.js b/src/views/Home/panels/Szzddjq/index.js new file mode 100644 index 0000000..b78b4d4 --- /dev/null +++ b/src/views/Home/panels/Szzddjq/index.js @@ -0,0 +1,72 @@ +import React,{useState} from 'react' +import PanelBox from '../../components/PanelBox'; +import MiniSinglePie from './MiniSinglePie' +import clsx from 'clsx'; +import { FormControl, InputLabel, Select, MenuItem } from '@material-ui/core/index'; + +export default function GQ({ style }) { + const v1 = 20; + const v2 = 32; + const r = (v1 * 100 / v2).toFixed(1); + + const v3 = 650; + const v4 = 800; + const r2 = (v3 * 100 / v4).toFixed(1); + const [selected, setSelected] = useState(1) + const [dimension, setDimension] =useState('waterUsage'); + return ( + + // setSelected(1)}>供蓄水 + // setSelected(2)}>蓄水 + // setSelected(3)}>警情 + // + // } + extra={ + + } + > +
+ {/*
+ + 灌区 + + +
*/} + + +
+
+ ) +} diff --git a/src/views/Home/panels/YaRes/index.js b/src/views/Home/panels/YaRes/index.js index 0c867e1..e29491d 100644 --- a/src/views/Home/panels/YaRes/index.js +++ b/src/views/Home/panels/YaRes/index.js @@ -158,8 +158,8 @@ function HDReal({ style }) { >{row.rz} {row.maxF} - {row.cxTime} - {row.ffTime} +
{row.cxTime}
+
{row.ffTime}
))} @@ -168,19 +168,19 @@ function HDReal({ style }) {
-
风险等级
-
一般
+
风险等级
+
一般
-
淹没影响
+
淹没影响
-
2个
-
淹没乡镇数
+
2个
+
淹没乡镇数
-
0.5k㎡
-
淹没总面积
+
500k㎡
+
淹没总面积
@@ -189,8 +189,10 @@ function HDReal({ style }) { - 乡镇名称 - 影响面积/㎡ + 乡镇名称 + 影响户数 + 影响人口 + 影响面积/K㎡ {/* 警戒水位 */} @@ -202,14 +204,14 @@ function HDReal({ style }) { className="table-ellipsis cursor-pointer" >{row.stnm} + 221 + 640
{row.area}
- {/* {row.maxF} - {row.cxTime} - {row.ffTime} */} + ))} diff --git a/src/views/Home/panels/Yyfa/index.js b/src/views/Home/panels/Yyfa/index.js index 649c8b1..23d0a70 100644 --- a/src/views/Home/panels/Yyfa/index.js +++ b/src/views/Home/panels/Yyfa/index.js @@ -57,7 +57,7 @@ const [yyValue, setYyValue] = React.useState(false); title="预演方案" color="green" tabs={ - 方案预演 + 加载方案 } >
@@ -71,7 +71,7 @@ const [yyValue, setYyValue] = React.useState(false); } label="2025003预案" style={{color:"#fff"}}/> - {res.yy &&
+ {res.yy &&
最大淹没范围
@@ -80,9 +80,9 @@ const [yyValue, setYyValue] = React.useState(false);
淹没人口:3.211(万人)
-
+ {/*
-
+
*/}
}