<template> <div id="ZHPS"> <div :class="[ 'LeftBox', 'animate__animated', showPanel ? 'animate__fadeOutLeft' : 'animate__fadeInLeft', ]" > <PsLeftBox /> </div> <div :class="[ 'RightBox', 'animate__animated', showPanel ? 'animate__fadeOutRight' : 'animate__fadeInRight', ]" > <PsRightBox /> </div> <!-- <div class="IssueWarning" :class="[showPanel ? 'TuChengImgTrue' : 'TuChengImgFalse']" @click="WarningClick">发布预警</div> --> </div> </template> <script setup name="ZHPS"> import { ref, reactive, toRefs, onMounted, onBeforeUnmount } from "vue"; import PsLeftBox from "@/views/oneMap/SmartDrainage/PsLeftBox.vue"; import PsRightBox from "@/views/oneMap/SmartDrainage/PsRightBox.vue"; import bus from "@/bus"; import mapBoxVectorLayer from "@/utils/GISdocument/mapboxVectorLayer.js"; const AllData = reactive({}); const showPanel = ref(true); //面板展开收起 // 面板内容展开收起控制 const props = defineProps({ showPanel: { type: Boolean, }, }); watch( () => props.showPanel, () => { showPanel.value = props.showPanel; }, { immediate: true } ); // 发布预警 const WarningClick = (item) => { let data = { title: "发布预警", comIDs: ["RQ_Warning"], }; bus.emit("publicDialog", data); setTimeout(() => { bus.emit("RQ_PrimaryType", 2); }); }; onMounted(() => { // let initePSTimer = setInterval(() => { // if (!newfiberMapbox) return; // bus.emit('setLayerVisible', { layername: 'pipeline_info_flow_ys', isCheck: true }); // bus.emit('setLayerVisible', { layername: 'ysLine1', isCheck: true }); // bus.emit('setLayerVisible', { layername: 'wsLine1', isCheck: true }); // clearInterval(initePSTimer); // }, 100); newfiberMapbox.map.easeTo({ center: [109.488, 36.596], zoom: 12, pitch: 55, }); }); onBeforeUnmount(() => { bus.emit("SetLayerShow", ["蓝色地图"]); newfiberMapbox.map.setBearing(0); mapBoxVectorLayer.removeByIds(["clickPoint"]); bus.emit("closeCesiumPopup"); // bus.emit('setLayerVisible', { layername: 'pipeline_info_flow_ys', isCheck: false }); //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(4, 34, 84, 0.8) 0%, rgba(4, 34, 84, 0.8) 100%); border-radius: 6px; border: 1px solid #4aa4ff; box-shadow: inset 0 0 5px 5px #4aa4ff8a; z-index: 999; } .RightBox { width: 450px; height: calc(100% - 98px); position: absolute; right: 10px; top: 70px; background: linear-gradient(0deg, rgba(4, 34, 84, 0.8) 0%, rgba(4, 34, 84, 0.8) 100%); border-radius: 6px; border: 1px solid #4aa4ff; box-shadow: inset 0 0 5px 5px #4aa4ff8a; z-index: 999; } .IssueWarning { width: 40px; height: 60px; position: absolute; top: 100px; left: 480px; font-family: Source Han Sans CN; font-weight: 400; font-size: 13px; color: #ffffff; text-align: center; background: #003756; border-radius: 28px; border: 1px solid #53c6c9; display: flex; align-items: center; cursor: pointer; box-shadow: inset 0 0 5px 2px #47eef38a; } .TuChengImgTrue { transform: translateX(-460px); transition: all 1s ease; } .TuChengImgFalse { transform: translateX(0px); transition: all 1s ease; } } </style>