Merge branch 'qzc-dev'

lsf-dev
秦子超 2025-06-13 09:14:59 +08:00
commit dce41ebac5
19 changed files with 1067 additions and 4411 deletions

View File

@ -8,7 +8,9 @@
"warnstm": "2025-05-22 21:00:00",
"tempcolumn": 0,
"warnid": 1128,
"isauto": "0",
"isauto": "0",
"lgtd": 115.01083,
"lttd": 31.041152,
"warnnm": "白果镇山洪准备转移",
"adnm": "白果镇",
"adcd": "421181103000000",
@ -28,6 +30,8 @@
"warnnm": "夫子河镇北门村山洪准备转移",
"adnm": "夫子河镇北门村",
"adcd": "421181104001000",
"lgtd": 115.01986,
"lttd": 30.968793,
"warntypeid": 10,
"temprownumber": 2
},
@ -44,6 +48,8 @@
"warnnm": "夫子河镇山洪准备转移",
"adnm": "夫子河镇",
"adcd": "421181104000000",
"lgtd": 115.026944,
"lttd": 30.959121,
"warntypeid": 10,
"temprownumber": 3
},
@ -60,6 +66,8 @@
"warnnm": "福田河镇山洪准备转移",
"adnm": "福田河镇",
"adcd": "421181111000000",
"lgtd": 115.075433,
"lttd": 31.384331,
"warntypeid": 10,
"temprownumber": 4
},
@ -76,6 +84,8 @@
"warnnm": "木子店镇山洪准备转移",
"adnm": "木子店镇",
"adcd": "421181107000000",
"lgtd": 115.172808,
"lttd": 30.963342,
"warntypeid": 10,
"temprownumber": 5
},
@ -92,6 +102,8 @@
"warnnm": "白果镇山洪准备转移",
"adnm": "白果镇",
"adcd": "421181103000000",
"lgtd": 115.01083,
"lttd": 31.041152,
"warntypeid": 10,
"temprownumber": 6
},
@ -140,6 +152,8 @@
"warnnm": "张家畈镇山洪准备转移",
"adnm": "张家畈镇",
"adcd": "421181106000000",
"lgtd": 115.183208,
"lttd": 31.074978,
"warntypeid": 10,
"temprownumber": 9
},
@ -156,6 +170,8 @@
"warnnm": "夫子河镇北门村山洪准备转移",
"adnm": "夫子河镇北门村",
"adcd": "421181104001000",
"lgtd": 115.01986,
"lttd": 30.968793,
"warntypeid": 10,
"temprownumber": 10
}

View File

@ -191,7 +191,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
});
} else if (id === 9) {
} else if (id === 8) {
layerVisible = {
RealDrpLayer: false,
RealHDLayer: false,
@ -201,8 +201,9 @@ const map = {
YuwaiLayer: false,
AdcdLayer: true,
WataLayer: false,
RealSkLayerQ2: false,
RealHDLayerQ2: false,
RealSkLayerQ2: true,
RealHDLayerQ2: true,
ShyjLayer:true,
}
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
@ -549,36 +550,48 @@ const map = {
dispatch.runtime.setFeaturePop(null);
if (id === 8) {
dispatch.rcview.showRealContour('h24')
} else {
dispatch.runtime.setLayerSetting({ contour: null, dem: undefined });
dispatch.runtime.setLayerSetting({ planeArea: null });
dispatch.map.setLayerVisible({ ContourLayer: false });
}
// if (id === 8) {
// dispatch.rcview.showRealContour('h24')
// } else {
// dispatch.runtime.setLayerSetting({ contour: null, dem: undefined });
// dispatch.runtime.setLayerSetting({ planeArea: null });
// dispatch.map.setLayerVisible({ ContourLayer: false });
// }
if (id === 201) {
dispatch.map.setLayerSetting({ dom: false });
map.setLayoutProperty('热力图', 'visibility', 'visible');
if(map){
map.setLayoutProperty('热力图', 'visibility', 'visible');
}
} else {
// dispatch.map.setLayerSetting({dom: true});
map.setLayoutProperty('热力图', 'visibility', 'none');
if(map){
map.setLayoutProperty('热力图', 'visibility', 'none');
}
}
if (id === 306) {
if (id === 306 && map) {
dispatch.map.setLayerSetting({ dom: false });
dispatch.runtime.setShowGw(true)
// map.setLayoutProperty('管网图', 'visibility', 'visible');
// if(map){
// map.setLayoutProperty('管网图', 'visibility', 'visible');
// }
} else {
dispatch.runtime.setShowGw(false)
// dispatch.map.setLayerSetting({dom: true});
// map.setLayoutProperty('管网图', 'visibility', 'none');
// if(map){
// map.setLayoutProperty('管网图', 'visibility', 'none');
// }
}
if (id === 503 || id == 501 || id == 504 || id == 505 || id == 506 || id == 507) {
dispatch.map.setLayerSetting({ dom: false });
map.setLayoutProperty('灌区图', 'visibility', 'visible');
if(map){
map.setLayoutProperty('灌区图', 'visibility', 'visible');
}
} else {
// dispatch.map.setLayerSetting({dom: true});
map.setLayoutProperty('灌区图', 'visibility', 'none');
if(map){
map.setLayoutProperty('灌区图', 'visibility', 'none');
}
}
if (id != 504) {
dispatch.runtime.setYyfa({})
@ -586,23 +599,30 @@ const map = {
if (
id === 3
|| id === 8
|| id === 203
|| id === 205
|| id === 206
|| id === 200
) {
dispatch.map.setLayerSetting({ dom: true });
// map.setLayoutProperty('卫星图', 'visibility', 'visible');
// if(map){
// map.setLayoutProperty('卫星图', 'visibility', 'visible');
// }
} else {
dispatch.map.setLayerSetting({ dom: false });
// map.setLayoutProperty('卫星图', 'visibility', 'none');
// if(map){
// map.setLayoutProperty('卫星图', 'visibility', 'none');
// }
}
if(id!==200&&id!==203&&id!==205&&id!==206){
const layer = map.getLayer('临时水库tz')
if(layer){
if(map){
const layer = map.getLayer('临时水库tz')
if(layer){
map.removeLayer('临时水库tz');
map.removeSource('临时水库tz');
}
}
}
}

View File

@ -57,7 +57,7 @@ export default function calcLayout(view, rightStack, hidePanels) {
{ key: '天气' },
{ key: '未来24h预报', style: { height: '40%', flexGrow: 1 } },
];
leftFullHeight = true;
// leftFullHeight = true;
} else if (view === 6) {
left = [
{ key: '天气' },
@ -236,11 +236,14 @@ export default function calcLayout(view, rightStack, hidePanels) {
rightFullHeight = true;
}else if (view === 8) {
right = [
{ key: '警报' },
{ key: '防洪形势天气预报', style: { height: '18.5rem'} },
{ key: '防洪形势水情', style: { height: '18.5rem'} },
// { key: '警报' },
{ key: '防洪形势雨情2', style: {} },
{ key: '重点关注水情', style: { height: '18rem'} },
{ key: '测站到报率', style: { height: '18rem' } },
// { key: '防洪形势天气预报', style: { height: '18.5rem'} },
// { key: '防洪形势水情', style: { height: '18.5rem'} },
// { key: '河道水位', style: { height: '10rem', flexGrow: 1 } },
{ key: '防洪形势雨情', style: { height: '16rem', flexGrow: 1 } },
// { key: '防洪形势雨情', style: { height: '16rem', flexGrow: 1 } },
// { key: '工情', style: { height: '10rem', flexGrow: 1 } },
// { key: '今日值班' },
];
@ -277,10 +280,8 @@ export default function calcLayout(view, rightStack, hidePanels) {
// ]
} else if (view === 5) {
right = [
{ key: '警报' },
// { key: '气象预警综述' },
{ key: '重要水库预报', style: { flexGrow: 1 } },
{ key: '河流重要断面预报', style: { height: '40%', flexGrow: 1 } },
{ key: '重要水库预报', style: { height: '18rem', flexGrow: 1 } },
];
} else if (view === 6) {
right = [

View File

@ -3,6 +3,7 @@ import RealHDLayer from "./realhdlayer";
import RealHDLayerQ2 from "./realhdlayerQ2";
import RealSkLayer from "./realsklayer";
import RealSkLayerQ2 from "./realsklayerQ2";
import ShyjLayer from "./shyjLayer"
import sources from "./sources";
import base from "./base";
@ -72,6 +73,7 @@ class LayerMgr {
this.layers.push(new ShuikuLayer());
this.layers.push(new RainDrpLayer());
this.layers.push(new XunchaLayer());
this.layers.push(new ShyjLayer());
//
@ -223,6 +225,7 @@ class LayerMgr {
this.layerMap.ShuikuLayer.getStyle(),
this.layerMap.RainDrpLayer.getStyle(),
this.layerMap.XunchaLayer.getStyle(),
this.layerMap.ShyjLayer.getStyle(),
//

View File

@ -0,0 +1,92 @@
import clone from "clone";
import { PicStPromise, TestPicStPromise } from "../../../../models/_/real";
import { parseGeoJSON } from "../../../../utils/tools";
import { InfoPopNames } from "../../InfoPops";
import BaseLayer from "./baselayer";
const SourceName = '山洪预警';
const ShapeStyle = {
id: SourceName,
type: 'symbol',
source: SourceName,
layout: {
'icon-allow-overlap': true,
'text-allow-overlap': true,
'icon-image': 'Marker',
'icon-size': [
'interpolate', ['linear'], ['zoom'],
10, 0.8,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
10, 10,
14, 14,
],
'text-font': ['Roboto Black'],
'text-field': [
'step',
['zoom'],
'',
12, ['get', 'stnm']
],
'text-anchor': 'top',
'text-offset': [0, 1],
'visibility': 'none',
},
paint: {
'text-color': '#fff'
}
};
export default class ShyjLayer extends BaseLayer {
static LayerName = 'ShyjLayer';
static SourceName = SourceName;
getStyle() {
const ret = clone(ShapeStyle);
this._setStyleVisibility(ret);
return ret;
}
getName() {
return ShyjLayer.LayerName;
}
getSubLayers() {
return [ShapeStyle.id];
}
async doRefreshLayer(mapCtrl) {
const ms = mapCtrl.getSource(SourceName);
let data = await fetch(`${process.env.PUBLIC_URL}/data/shyjFind.json`)
.then((response) => response.json())
.catch(() => null);
const list = data.filter(o=>o.lgtd&&o.lttd)
ms.setData(parseGeoJSON(list));
return true;
}
getFeatureTip(record) {
return record.stnm;
}
featureClicked(properties, dispatch) {
dispatch.runtime.setInfoDlg({ layerId: 'ShWarn', properties: properties })
// dispatch.runtime.setFeaturePop({
// type: InfoPopNames.PicStPop,
// properties,
// coordinates: [properties.lgtd, properties.lttd],
// offsetPop: true,
// });
}
}

View File

@ -29,7 +29,7 @@ import ShuiyuandiQLayer from "./shuiyuandiQLayer";
import ShuikuLayer from "./shuikuLayer";
import RainDrpLayer from "./rainDrpLayer"
import XunchaLayer from "./xunchalayer"
import shyjLayer from "./shyjLayer"
const hash = window.location.origin;
@ -190,8 +190,11 @@ const sources = {
}, {})
),
//新图层
[shyjLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[BxjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },

View File

@ -116,6 +116,9 @@ import Cxsk from './panels/Cxsk'
import Zdtj from './panels/Zdtj'
import Jcgjz from './panels/Jcgjz'
import JbqkLeft from './panels/JbqkLeft'
import FhxsYq2 from './panels/FhxsYq2'
import Zdgzsq from './panels/Zdgzsq'
import Czdbl from './panels/Czdbl'
import Skyb from './panels/Skyb'
@ -417,6 +420,12 @@ export default function PanelIndex({ name, style, ...params }) {
return <JbqkLeft style={style} />
} else if (name === '防汛基本情况右侧') {
return <JbqkRight style={style} />
} else if (name === '防洪形势雨情2') {
return <FhxsYq2 style={style} />
} else if (name === '重点关注水情') {
return <Zdgzsq style={style} />
} else if (name === '测站到报率') {
return <Czdbl style={style} />
}
return (
<PanelBox style={style} title={name} color="red">

View File

@ -0,0 +1,74 @@
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 { DrpRealPromise } from '../../../../models/_/real';
import useRefresh from '../../../../utils/useRefresh';
import clsx from 'clsx';
import { renderDrp } from '../../../../utils/renutils';
import { TableSortLabel } from '@material-ui/core';
import { InfoPopNames } from '../../InfoPops';
// import AreaDrpChart from './chart';
import config from '../../../../config';
import TablePage from './table.js'
function DrpReal({ style }) {
const dispatch = useDispatch();
const [ tab, setTab ] = useState('1')
const [ tab2, setTab2 ] = useState('1')
const data = [
{ name:'余家河', dm:'华光潭二级...', hfsw:'224.1', hfll:'30.25', tm:'05-29 14:00' },
{ name:'朱家河', dm:'龙岗假山头', hfsw:'130.55', hfll:'55.65', tm:'05-29 14:30' },
{ name:'举水', dm:'昌化', hfsw:'103.22', hfll:'75.61', tm:'05-29 15:00' },
{ name:'巴水', dm:'河桥', hfsw:'85.86', hfll:'15.72', tm:'05-30 02:00' },
{ name:'沙河', dm:'於潜', hfsw:'69.09', hfll:'15.11', tm:'05-29 14:00' },
]
const flyTo = (record) => {
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: InfoPopNames.RealDrpPop, properties: record, coordinates: [lgtd, lttd] });
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd + config.poiPositionOffsetY.drp],
zoom: config.poiPositionZoom.drp,
pitch: config.poiPitch,
bearing: 0
});
}
}
return (
<PanelBox
style={style}
title="测站到报率"
color="green"
tabs={
<>
</>
}
extra={
<>
<span className="button-group">
<span className={clsx({ active: tab==='1' })} onClick={() => setTab('1')}>山洪</span>
<span className={clsx({ active: tab==='2' })} onClick={() => setTab('2')}>水文</span>
<span className={clsx({ active: tab==='3' })} onClick={() => setTab('3')}>水库</span>
</span>
</>
}
>
<TablePage tab={tab}/>
</PanelBox>
)
}
export default DrpReal;

View File

@ -0,0 +1,91 @@
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 appconsts from '../../../../models/appconsts';
import { renderDrp, renderSkArz, renderSkRz } from '../../../../utils/renutils';
const data = [
{ name:'雨量站', name2:'10', name3:'8', name4:'2', name5:'80' },
{ name:'水位站', name2:'15', name3:'15', name4:'0', name5:'100' },
{ name:'图像站', name2:'10', name3:'10', name4:'0', name5:'100' },
{ name:'合计', name2:'35', name3:'33', name4:'2', name5:'94.29' },
]
const data2 = [
{ name:'合计', name2:'64', name3:'64', name4:'0', name5:'100' },
]
const data3 = [
{ name:'合计', name2:'12', name3:'12', name4:'0', name5:'100' },
]
function Page({ tab }) {
return (
<TableContainer style={{ height: '12rem' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ minWidth: '2rem' }} align="left"></DpTableCell>
<DpTableCell style={{ minWidth: '3rem' }} align="center">总数</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="center">在线数量</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="center">离线数量</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="center">到报率%</DpTableCell>
</TableRow>
</TableHead>
<TableBody>
{
tab==='1'?data.map((row) => (
<DpTableRow key={row.name}>
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer" onClick={() => {}}>{row.name}</div>
</DpTableCell>
<DpTableCell align="center">{row.name2}</DpTableCell>
<DpTableCell align="center">{row.name3}</DpTableCell>
<DpTableCell align="center">{row.name4}</DpTableCell>
<DpTableCell align="center">{row.name5}</DpTableCell>
</DpTableRow>
)):null
}
{
tab==='2'?data2.map((row) => (
<DpTableRow key={row.name}>
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer" onClick={() => {}}>{row.name}</div>
</DpTableCell>
<DpTableCell align="center">{row.name2}</DpTableCell>
<DpTableCell align="center">{row.name3}</DpTableCell>
<DpTableCell align="center">{row.name4}</DpTableCell>
<DpTableCell align="center">{row.name5}</DpTableCell>
</DpTableRow>
)):null
}
{
tab==='3'?data3.map((row) => (
<DpTableRow key={row.name}>
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer" onClick={() => {}}>{row.name}</div>
</DpTableCell>
<DpTableCell align="center">{row.name2}</DpTableCell>
<DpTableCell align="center">{row.name3}</DpTableCell>
<DpTableCell align="center">{row.name4}</DpTableCell>
<DpTableCell align="center">{row.name5}</DpTableCell>
</DpTableRow>
)):null
}
</TableBody>
</Table>
</TableContainer>
)
}
export default React.memo(Page);

View File

@ -0,0 +1,141 @@
import React, { useMemo } from 'react';
import echarts from 'echarts/lib/echarts';
import ReactEcharts from 'echarts-for-react';
const pallete = [
['#177ab3', '#51c3e7'],
['#9976dc', '#c792ee'],
['#94a1eb', '#a7caf8'],
['#7ae5c3', '#c9f4ea'],
['#c7dca5', '#f5fcd5'],
['#7988d9', '#9dc6f1'],
['#d9ed8f', '#d3f89b'],
];
const palleteLen = pallete.length;
const AreaDrpChart = ({ data }) => {
const { max, sdata } = useMemo(() => {
let max = 0;
data.forEach(o => {
max = Math.max(max, o.av)
});
max = [10, 20, 50, 100, 200, 300, 400].find(i => i >= max);
return {
max,
sdata: data.map(o => ({ ...o, name: o.NAME.split('').join('\n') })),
}
}, [data]);
var option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
var res = `${params.name.substr('2020-10-14 '.length, 2)}时降雨:${params.data}mm`;
return res;
}
},
grid: {
x: 18,
y: 24,
x2: 28,
y2: 36,
bottom: 65,
borderWidth: 0
},
calculable: true,
xAxis: [
{
type: 'category',
data: sdata.map(o => o.name),
splitLine: {
show: false
},
axisLabel: {
color: '#bbb',
fontSize: 10,
textShadowBlur: 4,
textShadowColor: '#6ab',
},
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: 0,
max,
}
],
series: [
{
name: '降雨',
type: 'bar',
barWidth: '10px',
data: sdata.map(o => o.av),
itemStyle: {
normal: {
color: (params) => {
return new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: pallete[params.dataIndex % palleteLen][0] },
{ offset: 1, color: pallete[params.dataIndex % palleteLen][1] }
]
)
},
},
},
label: {
show: true,
position: 'top',
color: '#bbb',
fontSize: 12,
textShadowBlur: 4,
textShadowColor: '#6ab',
},
}
]
};
return (
<ReactEcharts
option={option}
style={{ height: '11rem', width: '100%' }}
/>
)
}
export default React.memo(AreaDrpChart);

View File

@ -0,0 +1,273 @@
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 { DrpRealPromise } from '../../../../models/_/real';
import useRefresh from '../../../../utils/useRefresh';
import clsx from 'clsx';
import { renderDrp } from '../../../../utils/renutils';
import { TableSortLabel } from '@material-ui/core';
import { InfoPopNames } from '../../InfoPops';
import AreaDrpChart from './chart';
import config from '../../../../config';
function DrpReal({ style }) {
const dispatch = useDispatch();
const [ tab, setTab ] = useState('1')
const data = [
{
"ADCD": "421181001000000",
"NAME": "龙池办事处",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181002000000",
"NAME": "鼓楼办事处",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181003000000",
"NAME": "南湖办事处",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181100000000",
"NAME": "中馆驿镇",
"drp": 4,
"cnt": 1,
"av": 4
},
{
"ADCD": "421181101000000",
"NAME": "宋埠镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181102000000",
"NAME": "歧亭镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181103000000",
"NAME": "白果镇",
"drp": 15,
"cnt": 1,
"av": 15
},
{
"ADCD": "421181104000000",
"NAME": "夫子河镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181105000000",
"NAME": "阎家河镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181106000000",
"NAME": "龟山镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181107000000",
"NAME": "盐田河镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181108000000",
"NAME": "张家畈镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181109000000",
"NAME": "木子店镇",
"drp": 93.5,
"cnt": 2,
"av": 46.8
},
{
"ADCD": "421181110000000",
"NAME": "三河口镇",
"drp": 18,
"cnt": 1,
"av": 18
},
{
"ADCD": "421181111000000",
"NAME": "黄土岗镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181112000000",
"NAME": "福田河镇",
"drp": 50,
"cnt": 1,
"av": 50
},
{
"ADCD": "421181113000000",
"NAME": "乘马岗镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181114000000",
"NAME": "顺河镇",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181200000000",
"NAME": "铁门岗乡",
"drp": 0,
"cnt": 0,
"av": 0
},
{
"ADCD": "421181471000000",
"NAME": "经济开发区",
"drp": 0,
"cnt": 0,
"av": 0
}
]
const data2 = [
{
"ADCD": "421181001000000",
"NAME": "举水",
"drp": 40,
"cnt": 0,
"av": 40
},
{
"ADCD": "421181002000000",
"NAME": "巴水",
"drp": 35,
"cnt": 0,
"av": 35
},
{
"ADCD": "421181003000000",
"NAME": "芭茅河",
"drp": 40,
"cnt": 0,
"av": 40
},
{
"ADCD": "421181100000000",
"NAME": "浮桥河",
"drp": 47,
"cnt": 1,
"av": 47
},
{
"ADCD": "421181101000000",
"NAME": "麻溪河",
"drp": 20,
"cnt": 0,
"av": 20
},
{
"ADCD": "421181102000000",
"NAME": "肖家河",
"drp": 15,
"cnt": 0,
"av": 15
},
{
"ADCD": "421181103000000",
"NAME": "余家河",
"drp": 45,
"cnt": 1,
"av": 45
},
{
"ADCD": "421181104000000",
"NAME": "白果河",
"drp": 20,
"cnt": 0,
"av": 20
}
]
const flyTo = (record) => {
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: InfoPopNames.RealDrpPop, properties: record, coordinates: [lgtd, lttd] });
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd + config.poiPositionOffsetY.drp],
zoom: config.poiPositionZoom.drp,
pitch: config.poiPitch,
bearing: 0
});
}
}
return (
<PanelBox
style={style}
title="雨情"
color="green"
tabs={
<>
</>
}
extra={
<>
<span className="button-group">
<span className={clsx({ active: tab==='1' })} onClick={() => setTab('1')}>政区</span>
<span className={clsx({ active: tab==='2' })} onClick={() => setTab('2')}>流域</span>
</span>
</>
}
>
<div className='tabStyle' style={{padding:'5px',paddingBottom:'15px'}}>
<span className="card-group">
<span className={clsx({ active: false})} style={{marginRight:'0.3rem'}}>1h</span>
<span className={clsx({ active: false})} style={{marginRight:'0.3rem'}}>3h</span>
<span className={clsx({ active: false})} style={{marginRight:'0.3rem'}}>6h</span>
<span className={clsx({ active: false})} style={{marginRight:'0.3rem'}}>12h</span>
<span className={clsx({ active: true})} style={{marginRight:'0.3rem'}}>24h</span>
<span className={clsx({ active: false})} style={{marginRight:'0.3rem'}}>48h</span>
</span>
</div>
<AreaDrpChart data={tab==='1'?data:data2} />
</PanelBox>
)
}
export default DrpReal;

View File

@ -14,11 +14,11 @@ import { renderDrp, renderSkArz, renderSkRz } from '../../../../utils/renutils';
const data = [
{ name:'余家河', dm:'华光潭二级...', hfsw:'224.1', hfll:'30.25', tm:'05-29 14:00' },
{ name:'朱家河', dm:'龙岗假山头', hfsw:'130.55', hfll:'55.65', tm:'05-29 14:30' },
{ name:'举水', dm:'昌化', hfsw:'103.22', hfll:'75.61', tm:'05-29 15:00' },
{ name:'巴水', dm:'河桥', hfsw:'85.86', hfll:'15.72', tm:'05-30 02:00' },
{ name:'沙河', dm:'於潜', hfsw:'69.09', hfll:'15.11', tm:'05-29 14:00' },
{ name:'举水', dm:'廖家畈断面', hfsw:'224.1', hfll:'30.25', tm:'05-29 14:00' },
{ name:'举水', dm:'草鞋店断面', hfsw:'130.55', hfll:'55.65', tm:'05-29 14:30' },
{ name:'巴水', dm:'义洲河断面', hfsw:'103.22', hfll:'75.61', tm:'05-29 15:00' },
{ name:'巴水', dm:'义洲河断面', hfsw:'85.86', hfll:'15.72', tm:'05-30 02:00' },
{ name:'芭茅河', dm:'芭茅河断面', hfsw:'69.09', hfll:'15.11', tm:'05-29 14:00' },
]
function SkReal({ style }) {
@ -33,11 +33,11 @@ function SkReal({ style }) {
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ maxWidth: '30%' }} align="left">河流名称</DpTableCell>
<DpTableCell align="center">断面名称</DpTableCell>
<DpTableCell align="center">洪峰水位</DpTableCell>
<DpTableCell align="center">洪峰流量</DpTableCell>
<DpTableCell align="center">峰现时间</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="left">流域</DpTableCell>
<DpTableCell style={{ minWidth: '7rem' }} align="center">断面名称</DpTableCell>
<DpTableCell style={{ minWidth: '7rem' }} align="center">预计洪峰水位</DpTableCell>
<DpTableCell style={{ minWidth: '7rem' }} align="center">预计洪峰流量</DpTableCell>
<DpTableCell style={{ minWidth: '7rem' }} align="center">峰现时间</DpTableCell>
</TableRow>
</TableHead>
<TableBody>

File diff suppressed because it is too large Load Diff

View File

@ -35,17 +35,17 @@ export default function AreaDrp({ style }) {
const dispatch = useDispatch();
const [tab,setTab] = useState('1')
useEffect(()=>{
if(tab==='1'){
dispatch.rcview.showRealContour('h24')
}else{
dispatch.rcview.showRealContour('h48')
}
// if(tab==='1'){
// dispatch.rcview.showRealContour('h24')
// }else{
// dispatch.rcview.showRealContour('h48')
// }
return ()=>{
dispatch.runtime.setLayerSetting({ contour: null, dem: undefined });
dispatch.runtime.setLayerSetting({ planeArea: null });
dispatch.map.setLayerVisible({ ContourLayer: false });
}
// return ()=>{
// dispatch.runtime.setLayerSetting({ contour: null, dem: undefined });
// dispatch.runtime.setLayerSetting({ planeArea: null });
// dispatch.map.setLayerVisible({ ContourLayer: false });
// }
},[tab])

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@ function Item({ data, viewInfo }) {
</div>
<div className="tail">
<span>{data.warnstm.substr(0, 'yyyy-mm-dd hh:mm'.length)}</span>
<a onClick={() => viewInfo(data, 'danad')} style={{ textAlign: 'right' }}>危险区</a>
{/* <a onClick={() => viewInfo(data, 'danad')} style={{ textAlign: 'right' }}>危险区</a> */}
</div>
</div>
</div>
@ -90,7 +90,16 @@ function ShYj({ data }) {
});
}
} else {
dispatch.runtime.setInfoDlg({ layerId: 'ShWarn', properties: record })
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd],
zoom: 15,
pitch: 50,
bearing: 0
});
}
// dispatch.runtime.setInfoDlg({ layerId: 'ShWarn', properties: record })
}
}, [dispatch]);
@ -99,9 +108,9 @@ function ShYj({ data }) {
return (
<div className="dppanel-shyj">
{
{/* {
hisdata?.length > 0 && <DpAlert severity="info">当前无预警显示最新10条已关闭预警</DpAlert>
}
} */}
{
showdata.map(o => (
<Item key={o.warnid} viewInfo={viewInfo} data={o} />

View File

@ -0,0 +1,78 @@
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 { DrpRealPromise } from '../../../../models/_/real';
import useRefresh from '../../../../utils/useRefresh';
import clsx from 'clsx';
import { renderDrp } from '../../../../utils/renutils';
import { TableSortLabel } from '@material-ui/core';
import { InfoPopNames } from '../../InfoPops';
// import AreaDrpChart from './chart';
import config from '../../../../config';
import TablePage from './table.js'
function DrpReal({ style }) {
const dispatch = useDispatch();
const [ tab, setTab ] = useState('1')
const [ tab2, setTab2 ] = useState('1')
const data = [
{ name:'余家河', dm:'华光潭二级...', hfsw:'224.1', hfll:'30.25', tm:'05-29 14:00' },
{ name:'朱家河', dm:'龙岗假山头', hfsw:'130.55', hfll:'55.65', tm:'05-29 14:30' },
{ name:'举水', dm:'昌化', hfsw:'103.22', hfll:'75.61', tm:'05-29 15:00' },
{ name:'巴水', dm:'河桥', hfsw:'85.86', hfll:'15.72', tm:'05-30 02:00' },
{ name:'沙河', dm:'於潜', hfsw:'69.09', hfll:'15.11', tm:'05-29 14:00' },
]
const flyTo = (record) => {
const { lgtd, lttd } = record;
if (lgtd && lttd) {
dispatch.runtime.setFeaturePop({ type: InfoPopNames.RealDrpPop, properties: record, coordinates: [lgtd, lttd] });
dispatch.runtime.setCameraTarget({
center: [lgtd, lttd + config.poiPositionOffsetY.drp],
zoom: config.poiPositionZoom.drp,
pitch: config.poiPitch,
bearing: 0
});
}
}
return (
<PanelBox
style={style}
title="雨情"
color="green"
tabs={
<>
</>
}
extra={
<>
<span className="button-group">
<span className={clsx({ active: tab==='1' })} onClick={() => setTab('1')}>河道</span>
<span className={clsx({ active: tab==='2' })} onClick={() => setTab('1')}>水库</span>
</span>
</>
}
>
<div className='tabStyle' style={{padding:'5px',paddingBottom:'15px'}}>
<span className="card-group">
<span className={clsx({ active: tab2==='1'})} style={{marginRight:'0.3rem'}} onClick={() => setTab2('1')}>政区</span>
<span className={clsx({ active: tab2==='2'})} style={{marginRight:'0.3rem'}} onClick={() => setTab2('2')}>流域</span>
</span>
</div>
{ tab==='1'?<TablePage tab={tab2}/>:null }
</PanelBox>
)
}
export default DrpReal;

View File

@ -0,0 +1,57 @@
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 appconsts from '../../../../models/appconsts';
import { renderDrp, renderSkArz, renderSkRz } from '../../../../utils/renutils';
const data = [
{ name:'宋埠镇', name2:'项生(宋埠)', name3:'675.49', name4:'680.23', name5:'692.17' },
{ name:'黄土岗镇', name2:'鹰山畈(黄土岗)', name3:'692.92', name4:'710.29', name5:'728.38' },
]
const data2 = [
{ name:'阎家河', name2:'桃林河(阎河)', name3:'609.78', name4:'603.20', name5:'639.21' },
{ name:'巴水', name2:'杨梅河(木子店)', name3:'509.53', name4:'539.20', name5:'558.29' },
]
function Page({ tab }) {
return (
<TableContainer style={{ height: '12rem' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ minWidth: '6rem' }} align="left">{tab==='1'?'乡镇':'流域'}</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">测站</DpTableCell>
<DpTableCell style={{ minWidth: '6rem' }} align="center">实时水位(m)</DpTableCell>
<DpTableCell style={{ minWidth: '6rem' }} align="center">警戒水位(m)</DpTableCell>
<DpTableCell style={{ minWidth: '6rem' }} align="center">保证水位(m)</DpTableCell>
</TableRow>
</TableHead>
<TableBody>
{(tab==='1'?data:data2).map((row) => (
<DpTableRow key={row.name}>
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer" onClick={() => {}}>{row.name}</div>
</DpTableCell>
<DpTableCell align="center">{row.name2}</DpTableCell>
<DpTableCell align="center">{row.name3}</DpTableCell>
<DpTableCell align="center">{row.name4}</DpTableCell>
<DpTableCell align="center">{row.name5}</DpTableCell>
</DpTableRow>
))}
</TableBody>
</Table>
</TableContainer>
)
}
export default React.memo(Page);

View File

@ -3,6 +3,13 @@ import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } fro
import PanelBox from '../../components/PanelBox';
import config from '../../../../config';
import { useDispatch, useSelector } from 'react-redux';
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 AreaDrpChart from './chart';
@ -238,7 +245,32 @@ function DrpReal({ style }) {
</>
}
>
<AreaDrpChart data={[]} rz={rz}/>
{/* <AreaDrpChart data={[]} rz={rz}/> */}
<div style={{color:'#ffffff',padding:'5px',background:'#313f65',width:"7rem",textAlign:"center",margin:'10px',marginBottom:"10px",borderRadius:'3px',fontSize:'14px'}}>水库雨量预报</div>
<TableContainer style={{ height: '100%' }}>
<Table size="small" stickyHeader>
<TableHead>
<TableRow style={{height:'3.2rem'}}>
<DpTableCell align="center">h1</DpTableCell>
<DpTableCell align="center">h3</DpTableCell>
<DpTableCell align="center">h6</DpTableCell>
<DpTableCell align="center">h12</DpTableCell>
<DpTableCell align="center">h24</DpTableCell>
</TableRow>
</TableHead>
<TableBody>
<DpTableRow key={1}>
<DpTableCell align="center">0</DpTableCell>
<DpTableCell align="center">0</DpTableCell>
<DpTableCell align="center">0.1</DpTableCell>
<DpTableCell align="center">0.2</DpTableCell>
<DpTableCell align="center">0.2</DpTableCell>
</DpTableRow>
</TableBody>
</Table>
</TableContainer>
<div style={{color:'#ffffff',padding:'5px',background:'#313f65',width:"7rem",textAlign:"center",margin:'10px',marginBottom:"10px",borderRadius:'3px',fontSize:'14px'}}>水库24h预报</div>
<img src={`${process.env.PUBLIC_URL}/assets/yuanyanjg.png`} alt="" style={{ width: '25rem',marginLeft:'0.6rem',marginBottom:"0.5rem" }}/>
</PanelBox>
)
}