增加网格雨量按钮
parent
2783cab920
commit
b37ff83c10
|
|
@ -601,15 +601,15 @@ const map = {
|
||||||
map.setLayoutProperty('灌区图', 'visibility', 'none');
|
map.setLayoutProperty('灌区图', 'visibility', 'none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(id === 5){
|
// if(id === 5){
|
||||||
if(map){
|
// if(map){
|
||||||
map.setLayoutProperty('网格雨量', 'visibility', 'visible');
|
// map.setLayoutProperty('网格雨量', 'visibility', 'visible');
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
if(map){
|
// if(map){
|
||||||
map.setLayoutProperty('网格雨量', 'visibility', 'none');
|
// map.setLayoutProperty('网格雨量', 'visibility', 'none');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
if (id != 504) {
|
if (id != 504) {
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,8 @@ function Page({jbqkKey}) {
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<DpTableCell style={{ minWidth: '1rem' }} align="left">序号</DpTableCell>
|
<DpTableCell style={{ minWidth: '1rem' }} align="left">序号</DpTableCell>
|
||||||
<DpTableCell style={{ minWidth: '5rem' }} align="center">水库名称</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>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
{
|
{
|
||||||
|
|
@ -135,7 +135,7 @@ function Page({jbqkKey}) {
|
||||||
{tableRow.stnm}
|
{tableRow.stnm}
|
||||||
</div>
|
</div>
|
||||||
</DpTableCell>
|
</DpTableCell>
|
||||||
<DpTableCell align="center" >{tableRow.name}</DpTableCell>
|
{/* <DpTableCell align="center" >{tableRow.name}</DpTableCell> */}
|
||||||
<DpTableCell align="center" >{tableRow.w}</DpTableCell>
|
<DpTableCell align="center" >{tableRow.w}</DpTableCell>
|
||||||
</DpTableRow>
|
</DpTableRow>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,10 @@ const useStyles = makeStyles({
|
||||||
|
|
||||||
export default function AreaDrp({ style }) {
|
export default function AreaDrp({ style }) {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
const [show,setShow] = useState(false)
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [tab,setTab] = useState('1')
|
const [tab,setTab] = useState('1')
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
// if(tab==='1'){
|
// if(tab==='1'){
|
||||||
// dispatch.rcview.showRealContour('h24')
|
// dispatch.rcview.showRealContour('h24')
|
||||||
// }else{
|
// }else{
|
||||||
|
|
@ -46,7 +47,18 @@ export default function AreaDrp({ style }) {
|
||||||
// dispatch.runtime.setLayerSetting({ planeArea: null });
|
// dispatch.runtime.setLayerSetting({ planeArea: null });
|
||||||
// dispatch.map.setLayerVisible({ ContourLayer: false });
|
// 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 (
|
return (
|
||||||
|
|
@ -54,6 +66,13 @@ export default function AreaDrp({ style }) {
|
||||||
style={style}
|
style={style}
|
||||||
title="天气预报"
|
title="天气预报"
|
||||||
color="blue"
|
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'}}>
|
<div className={classes.root} style={{marginBottom:'-1.5rem'}}>
|
||||||
<Grid container className={classes.tool}>
|
<Grid container className={classes.tool}>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue