<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"; 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); // 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(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; } .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>