更改历史轨迹组件引入位置

pull/3/head
LiuJiaNan 2024-03-01 13:52:31 +08:00
parent 75c44cf1ef
commit 481750be3f
3 changed files with 32 additions and 33 deletions

View File

@ -38,10 +38,21 @@
</div> </div>
</div> </div>
</div> </div>
<teleport to="#bi_container">
<transition
enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutDown"
mode="out-in"
>
<historical-trajectory-options
v-if="isHistoricalTrajectory && !isPureMap"
/>
</transition>
</teleport>
</template> </template>
<script setup> <script setup>
import { reactive, markRaw } from "vue"; import { reactive, markRaw, ref } from "vue";
import Personnel from "@/views/BI/components/personnel.vue"; import Personnel from "@/views/BI/components/personnel.vue";
import WorkSafely from "@/views/BI/components/work_safely.vue"; import WorkSafely from "@/views/BI/components/work_safely.vue";
import EntranceControl from "@/views/BI/components/entrance_control.vue"; import EntranceControl from "@/views/BI/components/entrance_control.vue";
@ -52,6 +63,7 @@ import { useVModels } from "@vueuse/core";
import { handleTrajectory, handleFence } from "@/views/BI/js/trajectory.js"; import { handleTrajectory, handleFence } from "@/views/BI/js/trajectory.js";
import { handleWork } from "@/views/BI/js/eight_work.js"; import { handleWork } from "@/views/BI/js/eight_work.js";
import { handleCamera } from "@/views/BI/js/camera.js"; import { handleCamera } from "@/views/BI/js/camera.js";
import HistoricalTrajectoryOptions from "@/views/BI/components/historical_trajectory_options.vue";
const props = defineProps({ const props = defineProps({
leftCurrentComponent: { leftCurrentComponent: {
@ -69,7 +81,7 @@ const props = defineProps({
required: true, required: true,
default: false, default: false,
}, },
isHistoricalTrajectory: { isPureMap: {
type: Boolean, type: Boolean,
required: true, required: true,
default: false, default: false,
@ -78,15 +90,12 @@ const props = defineProps({
const emits = defineEmits([ const emits = defineEmits([
"update:leftCurrentComponent", "update:leftCurrentComponent",
"update:rightCurrentComponent", "update:rightCurrentComponent",
"update:isHistoricalTrajectory",
"update:rightOption", "update:rightOption",
]); ]);
const { const { leftCurrentComponent, rightCurrentComponent, rightOption } = useVModels(
leftCurrentComponent, props,
rightCurrentComponent, emits
rightOption, );
isHistoricalTrajectory,
} = useVModels(props, emits);
const bottomOptionsList = [ const bottomOptionsList = [
{ {
@ -355,6 +364,7 @@ const bottomOptionsList = [
list: [], list: [],
}, },
]; ];
const isHistoricalTrajectory = ref(false);
const data = reactive({ const data = reactive({
bottomOptionsList, bottomOptionsList,
}); });

View File

@ -55,9 +55,11 @@
v-model:pd="data.form" v-model:pd="data.form"
:ele-type-num="+data.eleType" :ele-type-num="+data.eleType"
/> />
<template v-if="data.block2OptionsList.some((item) => item.total > 0)">
<teleport to="body"> <teleport to="body">
<div class="alarm_full_screen"> <div
v-if="data.block2OptionsList.some((item) => item.total > 0)"
class="alarm_full_screen"
>
<div <div
v-for="item in 4" v-for="item in 4"
:key="item" :key="item"
@ -65,7 +67,6 @@
/> />
</div> </div>
</teleport> </teleport>
</template>
</div> </div>
</template> </template>
<script setup> <script setup>

View File

@ -37,7 +37,7 @@
v-model:left-current-component="leftCurrentComponent" v-model:left-current-component="leftCurrentComponent"
v-model:right-current-component="rightCurrentComponent" v-model:right-current-component="rightCurrentComponent"
v-model:right-option="right_option" v-model:right-option="right_option"
v-model:is-historical-trajectory="isHistoricalTrajectory" v-model:is-pure-map="isPureMap"
/> />
</div> </div>
</transition> </transition>
@ -59,16 +59,6 @@
<div v-show="right_option" class="right_ico"> <div v-show="right_option" class="right_ico">
<right-ico v-model:is-pure-map="isPureMap" /> <right-ico v-model:is-pure-map="isPureMap" />
</div> </div>
<transition
enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutDown"
mode="out-in"
>
<historical-trajectory-options
v-if="isHistoricalTrajectory && !isPureMap"
/>
</transition>
</div> </div>
</template> </template>
@ -77,7 +67,6 @@ import autofit from "autofit.js";
import { onBeforeUnmount, onMounted, ref } from "vue"; import { onBeforeUnmount, onMounted, ref } from "vue";
import RightIco from "./components/rightico.vue"; import RightIco from "./components/rightico.vue";
import BottomOptions from "./components/bottom_options.vue"; import BottomOptions from "./components/bottom_options.vue";
import HistoricalTrajectoryOptions from "./components/historical_trajectory_options.vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { initMap } from "./js/map"; import { initMap } from "./js/map";
import { useUserStore } from "@/pinia/user.js"; import { useUserStore } from "@/pinia/user.js";
@ -88,7 +77,6 @@ const right_option = ref(true);
const transitionKey = ref(0); const transitionKey = ref(0);
const leftCurrentComponent = ref(""); const leftCurrentComponent = ref("");
const rightCurrentComponent = ref(""); const rightCurrentComponent = ref("");
const isHistoricalTrajectory = ref(false);
const isPureMap = ref(false); const isPureMap = ref(false);
const userStore = useUserStore(); const userStore = useUserStore();
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID; const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;