Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/mcfxkh-Web
commit
023c56afb6
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 214 KiB |
|
|
@ -174,6 +174,7 @@ const map = {
|
||||||
Object.keys(DCPJ_TYPES).forEach(key => {
|
Object.keys(DCPJ_TYPES).forEach(key => {
|
||||||
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
||||||
});
|
});
|
||||||
|
dispatch.runtime.setHome();
|
||||||
}
|
}
|
||||||
else if (id === 0) {
|
else if (id === 0) {
|
||||||
layerVisible = {
|
layerVisible = {
|
||||||
|
|
@ -233,6 +234,7 @@ const map = {
|
||||||
Object.keys(DCPJ_TYPES).forEach(key => {
|
Object.keys(DCPJ_TYPES).forEach(key => {
|
||||||
layerVisible['Dcpj_' + key + 'Layer'] = !SLGC_TYPES[key];
|
layerVisible['Dcpj_' + key + 'Layer'] = !SLGC_TYPES[key];
|
||||||
});
|
});
|
||||||
|
dispatch.runtime.setHome();
|
||||||
} else if (id === 4) {
|
} else if (id === 4) {
|
||||||
layerVisible = {
|
layerVisible = {
|
||||||
RealDrpLayer: false,
|
RealDrpLayer: false,
|
||||||
|
|
@ -245,6 +247,7 @@ const map = {
|
||||||
Object.keys(DCPJ_TYPES).forEach(key => {
|
Object.keys(DCPJ_TYPES).forEach(key => {
|
||||||
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
||||||
});
|
});
|
||||||
|
dispatch.runtime.setHome();
|
||||||
} else if (id === 5) {
|
} else if (id === 5) {
|
||||||
layerVisible = {
|
layerVisible = {
|
||||||
RealDrpLayer: false,
|
RealDrpLayer: false,
|
||||||
|
|
@ -259,6 +262,7 @@ const map = {
|
||||||
Object.keys(DCPJ_TYPES).forEach(key => {
|
Object.keys(DCPJ_TYPES).forEach(key => {
|
||||||
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
||||||
});
|
});
|
||||||
|
dispatch.runtime.setHome();
|
||||||
} else if (id === 6) {
|
} else if (id === 6) {
|
||||||
layerVisible = {
|
layerVisible = {
|
||||||
RealDrpLayer: false,
|
RealDrpLayer: false,
|
||||||
|
|
@ -278,6 +282,7 @@ const map = {
|
||||||
Object.keys(DCPJ_TYPES).forEach(key => {
|
Object.keys(DCPJ_TYPES).forEach(key => {
|
||||||
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
layerVisible['Dcpj_' + key + 'Layer'] = false;
|
||||||
});
|
});
|
||||||
|
dispatch.runtime.setHome();
|
||||||
} else if (id === 7) {
|
} else if (id === 7) {
|
||||||
layerVisible = {
|
layerVisible = {
|
||||||
RealDrpLayer: false,
|
RealDrpLayer: false,
|
||||||
|
|
@ -596,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}>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function DrpReal({ style }) {
|
||||||
title="站点统计"
|
title="站点统计"
|
||||||
color="green"
|
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()
|
// setSkLayer1()
|
||||||
}}/>
|
}}/>
|
||||||
</PanelBox>
|
</PanelBox>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue