Newer
Older
DH_Apicture / src / views / pictureOnMap / page / WaterAssets / index.vue
@wudi wudi 14 days ago 1 KB 1
<template>
  <!-- 水务资产 -->
  <div class="WaterAssets">
    <!-- 左侧排水设施 -->
    <Transition name="fade_left">
      <DrainageFacilitiesLeft v-show="!showPanel"></DrainageFacilitiesLeft>
    </Transition>

    <!-- 右侧监测资产 -->
    <Transition name="fade_right">
      <MonitoringAssetsRight v-show="!showPanel"></MonitoringAssetsRight>
    </Transition>

    <!-- 下部分数字孪生 -->
    <shuziluanshengBottom></shuziluanshengBottom>

    <PanelDisplayHidden @showPanelChange="PanelChange"></PanelDisplayHidden>
  </div>
</template>
<script setup name="WaterAssets">
import bus from '@/bus';
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue';
const { proxy } = getCurrentInstance();
import DrainageFacilitiesLeft from './DrainageFacilitiesLeft/index.vue';
import MonitoringAssetsRight from './MonitoringAssetsRight/index.vue';
import shuziluanshengBottom from './shuziluanshengBottom/index.vue';

// 面板控制组件
import PanelDisplayHidden from '@/views/pictureOnMap/page/components/PanelDisplayHidden.vue';
const showPanel = ref(false); //面板展开收起
const PanelChange = val => {
  showPanel.value = val;
};

const mapInit = ()=>{
  setTimeout(() => ['newfiber-XYZLayer','高清地图'].forEach(k => bus.emit('setLayerVisible', { layername: k, isCheck: true })), 2000);
}

onMounted(() => {
  mapInit();
  bus.on(mapInitBusName,() => mapInit());
});
onBeforeUnmount(() => {
  ['newfiber-XYZLayer','高清地图'].forEach(k => bus.emit('setLayerVisible', { layername: k, isCheck: false }))
  bus.off(mapInitBusName);
});
</script>
<style lang="scss" scoped></style>