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