修改图层控制
parent
b6f9486afd
commit
656cc06a37
|
|
@ -384,7 +384,6 @@ const HomePage = ({ showPanels, mode }) => {
|
|||
// 如果是搜索结果,不要关闭图层
|
||||
if (checkedObj.label === '搜索结果') {
|
||||
// 主动设置相关图层可见
|
||||
|
||||
return;
|
||||
}
|
||||
if (checkedObj.label === '水库' || checkedObj.label === '大坝' || checkedObj.label === '溢洪道' || checkedObj.label === '视频点') {
|
||||
|
|
@ -394,21 +393,30 @@ const HomePage = ({ showPanels, mode }) => {
|
|||
}
|
||||
|
||||
if (checkedObj.label === '危险区' || checkedObj.label === '安置点' || checkedObj.label === '企事业单位' || checkedObj.label === '沿河居民户') {
|
||||
dispatch.map.setLayerVisible({ AZDLayer: true })
|
||||
dispatch.map.setLayerVisible({ QSYDWLayer: true })
|
||||
dispatch.map.setLayerVisible({ YHJMHLayer: true })
|
||||
dispatch.map.setLayerVisible({
|
||||
WxqLayer: true,
|
||||
AZDLayer: true,
|
||||
QSYDWLayer: true,
|
||||
YHJMHLayer: true,
|
||||
});
|
||||
} else {
|
||||
dispatch.map.setLayerVisible({ AZDLayer: false })
|
||||
dispatch.map.setLayerVisible({ QSYDWLayer: false })
|
||||
dispatch.map.setLayerVisible({ YHJMHLayer: false })
|
||||
dispatch.map.setLayerVisible({
|
||||
WxqLayer: false,
|
||||
AZDLayer: false,
|
||||
QSYDWLayer: false,
|
||||
YHJMHLayer: false,
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
dispatch.runtime.closeFeaturePopAll()
|
||||
dispatch.map.setLayerVisible({ PicStLayer: false })
|
||||
dispatch.map.setLayerVisible({ AZDLayer: false })
|
||||
dispatch.map.setLayerVisible({ QSYDWLayer: false })
|
||||
dispatch.map.setLayerVisible({ YHJMHLayer: false })
|
||||
dispatch.map.setLayerVisible({
|
||||
WxqLayer: false,
|
||||
PicStLayer: false,
|
||||
AZDLayer: false,
|
||||
QSYDWLayer: false,
|
||||
YHJMHLayer: false,
|
||||
});
|
||||
}
|
||||
}, [checkedObj])
|
||||
|
||||
|
|
@ -557,7 +565,6 @@ const HomePage = ({ showPanels, mode }) => {
|
|||
{checkedObj.label === '企事业单位' ? <QSYDW /> : null}
|
||||
{checkedObj.label === '沿河居民户' ? <YHJMH /> : null}
|
||||
|
||||
{checkedObj.label === '危险区' || checkedObj.label === '安置点' || checkedObj.label === '企事业单位' || checkedObj.label === '沿河居民户' ? <SetWxqStation mode={mode}/> : null}
|
||||
{checkedObj.label === '搜索结果' ? <SetDrpStation tms={tms} setTableData={() => { }} /> : null}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue