李神峰 2025-06-18 09:11:55 +08:00
commit 023c56afb6
6 changed files with 39 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

View File

@ -174,6 +174,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
});
dispatch.runtime.setHome();
}
else if (id === 0) {
layerVisible = {
@ -233,6 +234,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = !SLGC_TYPES[key];
});
dispatch.runtime.setHome();
} else if (id === 4) {
layerVisible = {
RealDrpLayer: false,
@ -245,6 +247,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
});
dispatch.runtime.setHome();
} else if (id === 5) {
layerVisible = {
RealDrpLayer: false,
@ -259,6 +262,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
});
dispatch.runtime.setHome();
} else if (id === 6) {
layerVisible = {
RealDrpLayer: false,
@ -278,6 +282,7 @@ const map = {
Object.keys(DCPJ_TYPES).forEach(key => {
layerVisible['Dcpj_' + key + 'Layer'] = false;
});
dispatch.runtime.setHome();
} else if (id === 7) {
layerVisible = {
RealDrpLayer: false,
@ -596,15 +601,15 @@ const map = {
map.setLayoutProperty('灌区图', 'visibility', 'none');
}
}
if(id === 5){
if(map){
map.setLayoutProperty('网格雨量', 'visibility', 'visible');
}
}else{
if(map){
map.setLayoutProperty('网格雨量', 'visibility', 'none');
}
}
// if(id === 5){
// if(map){
// map.setLayoutProperty('网格雨量', 'visibility', 'visible');
// }
// }else{
// if(map){
// map.setLayoutProperty('网格雨量', 'visibility', 'none');
// }
// }
if (id != 504) {

View File

@ -118,8 +118,8 @@ function Page({jbqkKey}) {
<TableRow>
<DpTableCell style={{ minWidth: '1rem' }} align="left">序号</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="center">水库名称</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">类型</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">类型</DpTableCell>
{/* <DpTableCell style={{ minWidth: '8rem' }} align="center">类型</DpTableCell> */}
<DpTableCell style={{ minWidth: '8rem' }} align="center">库容</DpTableCell>
</TableRow>
</TableHead>
{
@ -135,7 +135,7 @@ function Page({jbqkKey}) {
{tableRow.stnm}
</div>
</DpTableCell>
<DpTableCell align="center" >{tableRow.name}</DpTableCell>
{/* <DpTableCell align="center" >{tableRow.name}</DpTableCell> */}
<DpTableCell align="center" >{tableRow.w}</DpTableCell>
</DpTableRow>
</TableBody>

View File

@ -32,9 +32,10 @@ const useStyles = makeStyles({
export default function AreaDrp({ style }) {
const classes = useStyles();
const [show,setShow] = useState(false)
const dispatch = useDispatch();
const [tab,setTab] = useState('1')
useEffect(()=>{
useEffect(()=>{
// if(tab==='1'){
// dispatch.rcview.showRealContour('h24')
// }else{
@ -46,7 +47,18 @@ export default function AreaDrp({ style }) {
// dispatch.runtime.setLayerSetting({ planeArea: null });
// dispatch.map.setLayerVisible({ ContourLayer: false });
// }
},[tab])
const map = window.__mapref
if(map){
map.setLayoutProperty('网格雨量', 'visibility', show?'visible':'none');
}
return ()=>{
const map = window.__mapref
if(map){
map.setLayoutProperty('网格雨量', 'visibility', 'none');
}
}
},[show])
return (
@ -54,6 +66,13 @@ export default function AreaDrp({ style }) {
style={style}
title="天气预报"
color="blue"
extra={
<>
<div style={{color:show?"#29b6f6":'#ffffff',marginTop:"0.1rem",cursor:'pointer'}} onClick={()=>{
setShow(!show)
}}>显示网格</div>
</>
}
>
<div className={classes.root} style={{marginBottom:'-1.5rem'}}>
<Grid container className={classes.tool}>

View File

@ -83,7 +83,7 @@ function DrpReal({ style }) {
title="站点统计"
color="green"
>
<img src={process.env.PUBLIC_URL+'/assets/站点统计.jpg'} style={{width:'27rem',marginLeft:'0rem',marginTop:'0rem'}} onClick={()=>{
<img src={process.env.PUBLIC_URL+'/assets/站点统计.png'} style={{width:'26rem',marginLeft:'0.2rem',marginTop:'0.8rem'}} onClick={()=>{
// setSkLayer1()
}}/>
</PanelBox>