水库切换修改
parent
9a42c45df7
commit
c958d79efa
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
|
|
@ -575,6 +575,7 @@ const map = {
|
|||
|| id === 203
|
||||
|| id === 205
|
||||
|| id === 206
|
||||
|| id === 200
|
||||
) {
|
||||
dispatch.map.setLayerSetting({ dom: true });
|
||||
// map.setLayoutProperty('卫星图', 'visibility', 'visible');
|
||||
|
|
|
|||
|
|
@ -323,9 +323,9 @@ export default function calcLayout(view, rightStack, hidePanels) {
|
|||
} else if (view === 200) {
|
||||
right = [
|
||||
{ key: '警报' },
|
||||
{ key: '超汛水库', style: { height: '16rem'} },
|
||||
{ key: '超汛水库', style: { height: '15rem'} },
|
||||
{ key: '站点统计', style: { height: '17rem'} },
|
||||
{ key: '监测告警', style: { height: '20rem'} },
|
||||
{ key: '监测告警总', style: { height: '21rem'} },
|
||||
// { key: '关联站点',style: { height: '15rem', flexGrow: 1 } },
|
||||
// { key: '水库水量统计',style: { height: '22rem' } },
|
||||
// { key: '洪水防御',style: { height: '18rem', flexGrow: 1 } },
|
||||
|
|
|
|||
|
|
@ -108,11 +108,10 @@ const useStyles = makeStyles({
|
|||
}
|
||||
});
|
||||
|
||||
function RealSkTip({ record, dispatch }) {
|
||||
function RealSkTip({ record, dispatch,view }) {
|
||||
const classes = useStyles();
|
||||
|
||||
const [picData, setPicData] = useState({});
|
||||
console.log('11111111', picData);
|
||||
const [damGraph, setDamGraph] = useState();
|
||||
const [picidx, setpicidx] = useState([1, 2]);
|
||||
|
||||
|
|
@ -180,7 +179,16 @@ function RealSkTip({ record, dispatch }) {
|
|||
<>
|
||||
<div className="boxhead"></div>
|
||||
<div className="featuretip-title">
|
||||
<div className="name">{record.stnm}</div>
|
||||
<div className="name">{record.stnm}
|
||||
{
|
||||
record?.setView&&view===200?
|
||||
<span style={{cursor:'pointer',color:'#50b1f9'}} onClick={()=>{
|
||||
dispatch.map.setView(203)
|
||||
sessionStorage.setItem('lastCenter',JSON.stringify(record))
|
||||
}}> 进入水库模块</span>
|
||||
:null
|
||||
}
|
||||
</div>
|
||||
<div className="extra cursor-pointer" onClick={viewInfo}>详细</div>
|
||||
</div>
|
||||
<div className={classes.root}>
|
||||
|
|
|
|||
|
|
@ -42,11 +42,10 @@ export const InfoPops = ({ type, properties, dispatch, view }) => {
|
|||
return <RealDrpPop record={properties} dispatch={dispatch} />
|
||||
} else if (type === InfoPopNames.RealHDPop) {
|
||||
return <RealHDPop record={properties} dispatch={dispatch} />
|
||||
}else if (type === 'qdpop') {
|
||||
} else if (type === 'qdpop') {
|
||||
return <RealQDPop record={properties} dispatch={dispatch} />
|
||||
}
|
||||
else if (type === InfoPopNames.RealSkPop) {
|
||||
return <RealSkPop record={properties} dispatch={dispatch} />
|
||||
} else if (type === InfoPopNames.RealSkPop) {
|
||||
return <RealSkPop record={properties} dispatch={dispatch} view={view} />
|
||||
} else if (type === InfoPopNames.PicStPop) {
|
||||
return <PicStPop record={properties} dispatch={dispatch} />
|
||||
} else if (type === 'bridge') {
|
||||
|
|
|
|||
|
|
@ -129,19 +129,13 @@ export default function MapCtrl({ initParams, onLoad }) {
|
|||
if(feature.layer.id==='sk1111'||feature.layer.id==='sk2222'||feature.layer.id==='临时水库tz'||feature.layer.id==='临时水库'){
|
||||
const record = feature.properties
|
||||
if(feature.layer.id==='临时水库tz'){
|
||||
dispatch.map.setView(203)
|
||||
sessionStorage.setItem('lastCenter',JSON.stringify([record.lgtd, record.lttd]))
|
||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: {...record,setView:true}, coordinates: [record.lgtd, record.lttd] });
|
||||
}else{
|
||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
||||
}
|
||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
||||
}
|
||||
if(feature.layer.id==='临时线'){
|
||||
debugger
|
||||
const record = feature.properties
|
||||
if(feature.layer.id==='临时水库tz'){
|
||||
dispatch.map.setView(203)
|
||||
sessionStorage.setItem('lastCenter',JSON.stringify([record.lgtd, record.lttd]))
|
||||
}
|
||||
dispatch.runtime.setFeaturePop({ type: record.layerPop, properties: record, coordinates: [record.lgtd, record.lttd] });
|
||||
}
|
||||
if (feature.layer.id === '关联站点') {
|
||||
const record = feature.properties
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ import Sksltj from './panels/Sksltj'
|
|||
import Hsfy from './panels/Hsfy'
|
||||
import Cxsk from './panels/Cxsk'
|
||||
import Zdtj from './panels/Zdtj'
|
||||
import Jcgjz from './panels/Jcgjz'
|
||||
|
||||
|
||||
|
||||
|
|
@ -403,9 +404,9 @@ export default function PanelIndex({ name, style, ...params }) {
|
|||
return <Cxsk style={style} />
|
||||
} else if (name === '站点统计') {
|
||||
return <Zdtj style={style} />
|
||||
} else if (name === '监测告警总') {
|
||||
return <Jcgjz style={style} />
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<PanelBox style={style} title={name} color="red">
|
||||
<p>not impl</p>
|
||||
|
|
|
|||
|
|
@ -157,29 +157,34 @@ export default function Title() {
|
|||
}
|
||||
{
|
||||
(view===203||view===205||view===206)?
|
||||
<div style={{position:'absolute',left:'50%',top:'6rem',transform:'translate(-50%, 0px)',display:'flex'}}>
|
||||
<div style={{position:'absolute',left:'29rem',top:'6rem',transform:'translate(0px, 0px)',display:'flex',flexDirection:'column'}}>
|
||||
{
|
||||
[
|
||||
{name:'返回',key:200},
|
||||
{name:'水库监测',key:203},
|
||||
{name:'防汛调度',key:205},
|
||||
{name:'巡查维养',key:206},
|
||||
{name:'返回',key:200,icon:'组1.png'},
|
||||
{name:'水库监测',key:203,icon:'组2.png'},
|
||||
{name:'防汛调度',key:205,icon:'组3.png'},
|
||||
{name:'巡查维养',key:206,icon:'组4.png'},
|
||||
].map((item)=>
|
||||
<>
|
||||
<div style={{padding:'1rem',color:item.key===view?'#65dbfb':'#ffffff',cursor:'pointer',margin:"0 1rem"}} onClick={()=>{
|
||||
<div style={{color:item.key===view?'#65dbfb':'#ffffff',cursor:'pointer',marginBottom:"0.5rem",display:'flex',flexDirection:'column',alignItems:'center',fontSize:'0.8rem'}} onClick={()=>{
|
||||
dispatch.map.setView(item.key)
|
||||
if(item.key===200){
|
||||
const center = JSON.parse(sessionStorage.getItem('lastCenter'))
|
||||
if(center){
|
||||
const {lgtd,lttd} = JSON.parse(sessionStorage.getItem('lastCenter'))
|
||||
if(lgtd&<td){
|
||||
dispatch.runtime.setCameraTarget({
|
||||
center: center,
|
||||
center: [lgtd, lttd+0.005],
|
||||
zoom: 15,
|
||||
pitch: 50,
|
||||
bearing: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
}}>{item.name}</div>
|
||||
}}>
|
||||
<div style={{width:'2.5rem',height:'3.2rem',overflow:'hidden'}}>
|
||||
<img style={{width:'100%'}} src={`${process.env.PUBLIC_URL}/assets/icon/${item.icon}`} alt=""/>
|
||||
</div>
|
||||
{item.name}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ function ARzSk({data}) {
|
|||
// ))
|
||||
// }
|
||||
// </div>
|
||||
<TableContainer style={{ height: '12.8rem' }}>
|
||||
<TableContainer style={{ height: '11.8rem' }}>
|
||||
<Table size="small" stickyHeader>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
import React from 'react';
|
||||
|
||||
import Dialog from '@material-ui/core/Dialog';
|
||||
import DialogContent from '@material-ui/core/DialogContent';
|
||||
import DpPaperComponent from '../../../../layouts/mui/DpPaperCompanent';
|
||||
import { FormGroup, MenuItem, Select, Switch, Typography } from '@material-ui/core';
|
||||
import DpDialogTitle from '../../../../layouts/mui/DpDialogTitle';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { getLayerSetting, getLayerVisible } from '../../../../models/map/selectors';
|
||||
import DpBackgroundDrop from '../../../../layouts/mui/DpBackdrop';
|
||||
|
||||
|
||||
function Setting({ onClose }) {
|
||||
const layerVisible = useSelector(getLayerVisible);
|
||||
const layerSetting = useSelector(getLayerSetting);
|
||||
|
||||
const dispath = useDispatch();
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
open={true}
|
||||
onClose={onClose}
|
||||
maxWidth="xl"
|
||||
style={{ borderRadius: 0 }}
|
||||
PaperComponent={DpPaperComponent}
|
||||
BackdropComponent={DpBackgroundDrop}
|
||||
>
|
||||
<div className="boxhead"></div>
|
||||
|
||||
<DpDialogTitle>河道水位显示设置</DpDialogTitle>
|
||||
<DialogContent>
|
||||
<div style={{ width: 320, padding: '1rem 0' }}>
|
||||
<FormGroup>
|
||||
<div style={{ marginBottom: '1rem' }}>
|
||||
<Typography variant="subtitle2">显示河道水位图层</Typography>
|
||||
<Switch
|
||||
checked={!!layerVisible.RealHDLayer}
|
||||
color="primary"
|
||||
edge="start"
|
||||
onChange={(e) => dispath.map.setLayerVisible({ RealHDLayer: e.target.checked })}
|
||||
/>
|
||||
</div>
|
||||
</FormGroup>
|
||||
</div>
|
||||
</DialogContent>
|
||||
<div className="boxfoot"></div>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
|
||||
export default Setting;
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
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 { Switch, FormControlLabel, InputLabel, Select, MenuItem, FormControl } from '@material-ui/core/index'
|
||||
|
||||
function rzRender(rz, base) {
|
||||
return (
|
||||
<DpTableCell align="right" style={{ color: rz >= base ? 'red' : '#fff' }}>
|
||||
{typeof base === 'number' ? base.toFixed(2) : ''}
|
||||
</DpTableCell>
|
||||
);
|
||||
}
|
||||
|
||||
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);
|
||||
const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0);
|
||||
// let { data } = useRequest(HDRealPromise.get, t);
|
||||
const [setting, showSetting] = useState(false);
|
||||
|
||||
|
||||
const toggleAutoRefresh = () => {
|
||||
dispatch.realview.setHdAutoRefresh(!hdAutoRefresh);
|
||||
}
|
||||
|
||||
const handleBxDlg = () => {
|
||||
dispatch.runtime.setInfoDlg({ layerId: 'WyWarnLayer', properties: {}})
|
||||
}
|
||||
|
||||
return (
|
||||
<PanelBox
|
||||
style={style}
|
||||
title="监测2告警"
|
||||
color="green"
|
||||
extra={
|
||||
<div>
|
||||
2025-05-26~2025-06-02
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<div style={{ display: 'flex', padding: '10px 5px',marginLeft:30, justifyContent: 'space-between', flexWrap: 'wrap' }}>
|
||||
<div>
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s3.png`} alt="" style={{ width: 180,cursor:'pointer' }} onClick={handleBxDlg}/>
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s2.png`} alt="" style={{ width: 180 }} />
|
||||
</div>
|
||||
|
||||
<div style={{ margin: '5px 0' }}>
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s1.png`} alt="" style={{ width: 180 }} />
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s4.png`} alt="" style={{ width: 180 }} />
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s5.png`} alt="" style={{ width: 180 }} />
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s6.png`} alt="" style={{ width: 180 }} />
|
||||
</div>
|
||||
<img src={`${process.env.PUBLIC_URL}/assets/s7.png`} alt="" style={{ width: 180,marginTop:5 }} />
|
||||
|
||||
|
||||
</div>
|
||||
{
|
||||
setting && <Setting onClose={() => showSetting(false)} />
|
||||
}
|
||||
</PanelBox>
|
||||
)
|
||||
}
|
||||
|
||||
export default HDReal;
|
||||
|
|
@ -63,7 +63,7 @@ function DrpReal({ style }) {
|
|||
if (lgtd && lttd) {
|
||||
// dispatch.runtime.setFeaturePop({ type: 'RealSkPop', properties: row, coordinates: [row.lgtd, row.lttd] });
|
||||
dispatch.runtime.setCameraTarget({
|
||||
center: [lgtd, lttd],
|
||||
center: [lgtd, lttd+0.005],
|
||||
zoom: 15,
|
||||
pitch: 50,
|
||||
bearing: 0
|
||||
|
|
|
|||
|
|
@ -83,7 +83,9 @@ function DrpReal({ style }) {
|
|||
title="站点统计"
|
||||
color="green"
|
||||
>
|
||||
<img src='/assets/站点统计.jpg' style={{width:'27rem',marginLeft:'0rem',marginTop:'0rem'}} onClick={()=>{setSkLayer1()}}/>
|
||||
<img src='/assets/站点统计.jpg' style={{width:'27rem',marginLeft:'0rem',marginTop:'0rem'}} onClick={()=>{
|
||||
// setSkLayer1()
|
||||
}}/>
|
||||
</PanelBox>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue