Newer
Older
DH_Apicture / src / views / pictureOnMap / page / FloodControlAndDrainage / Pailaodiaodu / MonitoringWarningRigh / index.vue
@zhangqy zhangqy 28 days ago 868 bytes first commit
<template>
  <div>
    <fxjc v-if="props.selectType == 1 && fxjcShow" :data="fxjcData" />
    <clgz v-if="props.selectType == 2" />
    <bzdd v-if="props.selectType == 3" />
  </div>
</template>

<script setup name="PailaodiaoduRigth">
import fxjc from "./components/fxjc.vue";
import clgz from "./components/clgz.vue";
import bzdd from "./components/bzdd.vue";
import bus from "@/bus";
const props = defineProps({
  selectType: {
    type: String,
    default: "1",
  },
});
const fxjcShow = ref(false);
const fxjcData = ref({});

watch(
  () => props.selectType,
  (value) => {
    fxjcShow.value = false;
  },
  { immediate: true, deep: true }
);
onMounted(() => {
  bus.on("wyzsActiveData", (e) => {
    fxjcShow.value = true;
    fxjcData.value = e;
  });
});
onBeforeUnmount(() => {
  bus.off("wyzsActiveData");
});
</script>

<style lang="scss" scoped></style>