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) + }}>显示网格
+ + } >