From b37ff83c101d5f66d5d2c988138284fe4a385e5f Mon Sep 17 00:00:00 2001 From: qzc Date: Fri, 13 Jun 2025 15:20:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E6=A0=BC=E9=9B=A8?= =?UTF-8?q?=E9=87=8F=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/map/index.js | 18 +++++++++--------- src/views/Home/panels/JbqkRight/page3.js | 6 +++--- src/views/Home/panels/Tqyb24h/index.js | 23 +++++++++++++++++++++-- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/models/map/index.js b/src/models/map/index.js index 7986beb..03a8d15 100644 --- a/src/models/map/index.js +++ b/src/models/map/index.js @@ -601,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) { diff --git a/src/views/Home/panels/JbqkRight/page3.js b/src/views/Home/panels/JbqkRight/page3.js index ac405ba..5d32ed3 100644 --- a/src/views/Home/panels/JbqkRight/page3.js +++ b/src/views/Home/panels/JbqkRight/page3.js @@ -118,8 +118,8 @@ function Page({jbqkKey}) { 序号 水库名称 - 类型 - 类型 + {/* 类型 */} + 库容 { @@ -135,7 +135,7 @@ function Page({jbqkKey}) { {tableRow.stnm} - {tableRow.name} + {/* {tableRow.name} */} {tableRow.w} diff --git a/src/views/Home/panels/Tqyb24h/index.js b/src/views/Home/panels/Tqyb24h/index.js index 5f303c3..ab22ae5 100644 --- a/src/views/Home/panels/Tqyb24h/index.js +++ b/src/views/Home/panels/Tqyb24h/index.js @@ -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={ + <> +
{ + setShow(!show) + }}>显示网格
+ + } >