Newer
Older
urbanLifeline_YanAn / src / views / oneMap / components / FXHG.vue
@鲁yixuan 鲁yixuan on 8 Oct 3 KB updata
<template>
  <div id="ZHPS">
    <div :class="['LeftBox', 'animate__animated', showPanel ? 'animate__fadeOutLeft' : 'animate__fadeInLeft']">
      <xqhgLeftBox />
    </div>
    <div :class="['RightBox', 'animate__animated', showPanel ? 'animate__fadeOutRight' : 'animate__fadeInRight']">
      <xqRightBox />
    </div>
    <div :class="['BottomBox', 'animate__animated', showPanel ? 'animate__bounceInUp' : 'animate__bounceInUp']" v-if="showBottom">
      <sqhgBottomBox />
    </div>
  </div>
  <div v-if="showPanel == false" class="bnt" @click="goBack">放回</div>
  <FHPL v-if="curType == true" />
</template>

<script setup name="ZHPS">
import { ref, reactive, toRefs, onMounted, onBeforeUnmount } from 'vue';
import FHPL from '@/views/oneMap/components/FHPL.vue';
import xqhgLeftBox from '@/views/oneMap/FloodStuationReview/xqhgLeftBox.vue';
import xqRightBox from '@/views/oneMap/FloodStuationReview/xqRightBox.vue';
import sqhgBottomBox from '@/views/oneMap/FloodStuationReview/sqhgBottomBox.vue';
import bus from '@/bus';
const AllData = reactive({});
const curType = ref(false);
const showPanel = ref(true); //面板展开收起
const showBottom = ref(true);
const control = ref('1');
// 面板内容展开收起控制
const props = defineProps({
  showPanel: {
    type: Boolean,
  },
});
function goBack(params) {
  showPanel.value = true;
  showBottom.value = false;
  curType.value = true;
}

watch(
  () => props.showPanel,
  () => {
    showPanel.value = props.showPanel;
  },
  { immediate: true }
);

onMounted(() => {
  bus.emit('checkBottom', control.value);

  //接受日历
  bus.on('checkRili', params => {
    console.log(params, '接收paramsparamsparams');
  });

  let initePSTimer = setInterval(() => {
    if (!newfiberMapbox) return;
    bus.emit('setLayerVisible', { layername: 'ysLine1', isCheck: true });
    bus.emit('setLayerVisible', { layername: 'wsLine1', isCheck: true });
    clearInterval(initePSTimer);
  }, 100);
});
onBeforeUnmount(() => {
  bus.emit('setLayerVisible', { layername: 'ysLine1', isCheck: false });
  bus.emit('setLayerVisible', { layername: 'wsLine1', isCheck: false });
});
</script>

<style lang="scss" scoped>
#ZHPS {
  .LeftBox {
    width: 450px;
    height: calc(100% - 98px);
    position: absolute;
    left: 10px;
    top: 70px;
    background: linear-gradient(0deg, rgba(0, 93, 114, 0.8) 0%, rgba(0, 93, 114, 0.8) 100%);
    border-radius: 6px;
    border: 1px solid #47eef3;
    box-shadow: inset 0 0 5px 5px #47eef38a;
  }
  .RightBox {
    width: 450px;
    height: calc(100% - 98px);
    position: absolute;
    right: 10px;
    top: 70px;
    background: linear-gradient(0deg, rgba(0, 93, 114, 0.8) 0%, rgba(0, 93, 114, 0.8) 100%);
    border-radius: 6px;
    border: 1px solid #47eef3;
    box-shadow: inset 0 0 5px 5px #47eef38a;
    z-index: 120;
  }
  .BottomBox {
    width: 900px;
    height: 260px;
    position: absolute;
    right: 500px;
    bottom: 70px;
    background: linear-gradient(0deg, rgba(0, 93, 114, 0.8) 0%, rgba(0, 93, 114, 0.8) 100%);
    border-radius: 6px;
    border: 1px solid #47eef3;
    box-shadow: inset 0 0 5px 5px #47eef38a;
  }
}
.bnt {
  width: 62px;
  height: 62px;
  position: absolute;
  left: 520px;
  bottom: 340px;
  background: url('@/assets/images/fhpl/rkan_bnt.png') no-repeat;
  background-size: 100% 100%;
  cursor: pointer;

  font-family: Source Han Sans CN;
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  line-height: 60px;
  padding-left: 14px;
}
</style>