From 96b7ae4aafbf4a84e8b6f6578f240ec3f9ff0df5 Mon Sep 17 00:00:00 2001 From: LiuJiaNan Date: Wed, 21 Feb 2024 16:18:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=BD=A8=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/BI/components/bottom_options.vue | 39 ++++-- .../historical_trajectory_options.vue | 127 ++++++++++++++++++ src/views/BI/index.vue | 6 + 3 files changed, 164 insertions(+), 8 deletions(-) create mode 100644 src/views/BI/components/historical_trajectory_options.vue diff --git a/src/views/BI/components/bottom_options.vue b/src/views/BI/components/bottom_options.vue index 9c11d1f..2596f4d 100644 --- a/src/views/BI/components/bottom_options.vue +++ b/src/views/BI/components/bottom_options.vue @@ -61,16 +61,23 @@ const props = defineProps({ required: true, default: false, }, + currentCheckChildren: { + type: String, + required: true, + default: "", + }, }); const emits = defineEmits([ "update:leftCurrentComponent", "update:rightCurrentComponent", "update:rightOption", ]); -const { leftCurrentComponent, rightCurrentComponent, rightOption } = useVModels( - props, - emits -); +const { + leftCurrentComponent, + rightCurrentComponent, + rightOption, + currentCheckChildren, +} = useVModels(props, emits); const bottomOptionsList = [ { @@ -117,6 +124,17 @@ const bottomOptionsList = [ check: false, action: handleFence, }, + { + img: new URL("/src/assets/images/map/bottom/ico3.png", import.meta.url) + .href, + imgSelect: new URL( + "/src/assets/images/map/bottom/ico3_on.png", + import.meta.url + ).href, + title: "历史轨迹", + type: "historicalTrajectory", + check: false, + }, ], }, { @@ -320,6 +338,7 @@ const bottomOptionsList = [ check: false, components: [markRaw(VideoAIAnalysis), markRaw(VideoAIAnalysisRight)], action: handleCamera, + list: [], }, ]; const data = reactive({ @@ -350,12 +369,16 @@ const fnBottomOptionsListChange = (item, index) => { rightOption.value = index !== 4; }; const fnBottomChildOptionsListChange = (index, item1, index1) => { + currentCheckChildren.value = ""; data.bottomOptionsList[index].list[index1].check = !data.bottomOptionsList[index].list[index1].check; - data.bottomOptionsList[index].list[index1].action( - data.bottomOptionsList[index].list[index1].check, - item1.type - ); + if (data.bottomOptionsList[index].list[index1].action) { + data.bottomOptionsList[index].list[index1].action( + data.bottomOptionsList[index].list[index1].check, + item1.type + ); + } + currentCheckChildren.value = item1.type; }; diff --git a/src/views/BI/index.vue b/src/views/BI/index.vue index 1be3e1f..564dcfa 100644 --- a/src/views/BI/index.vue +++ b/src/views/BI/index.vue @@ -27,6 +27,7 @@ v-model:left-current-component="leftCurrentComponent" v-model:right-current-component="rightCurrentComponent" v-model:right-option="right_option" + v-model:current-check-children="currentCheckChildren" /> + @@ -50,6 +54,7 @@ import autofit from "autofit.js"; import { onBeforeUnmount, onMounted, ref } from "vue"; import RightIco from "./components/rightico.vue"; import BottomOptions from "./components/bottom_options.vue"; +import HistoricalTrajectoryOptions from "./components/historical_trajectory_options.vue"; import { useRouter } from "vue-router"; import { initMap } from "./js/map"; @@ -58,6 +63,7 @@ const right_option = ref(true); const transitionKey = ref(0); const leftCurrentComponent = ref(""); const rightCurrentComponent = ref(""); +const currentCheckChildren = ref(""); const corp = { CORP_NAME: "河北秦安", lng: 119.44758654, lat: 39.91845908 }; onMounted(() => {