2025-07-14 17:31:24 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="noScollLine">
|
|
|
|
|
<!-- 预警信息弹框 -->
|
2025-07-14 18:15:09 +08:00
|
|
|
<Home_YJ v-if="isShow.showYj" :show="isShow.showYj" :data="list.Info_YJ" />
|
2025-07-14 17:31:24 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import emitter from "@/utils/eventBus.js";
|
|
|
|
|
import Home_YJ from "./components/home_yj.vue";
|
|
|
|
|
import { ref, onMounted, onUnmounted, reactive, getCurrentInstance } from "vue";
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const isShow = ref({
|
|
|
|
|
showYj: false, //预警弹窗
|
|
|
|
|
});
|
|
|
|
|
const list = reactive({
|
|
|
|
|
Info_YJ: [], //预警数据
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// 展示预警
|
|
|
|
|
emitter.on("showHomeYJ", (res) => {
|
|
|
|
|
isShow.value.showYj = res ? true : false;
|
2025-07-14 18:15:09 +08:00
|
|
|
if (res) list.Info_YJ = res;
|
2025-07-14 17:31:24 +08:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
emitter.off("showHomeYJ");
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
</style>
|