diff --git a/src/assets/images/map/bottom/ico18.png b/src/assets/images/map/bottom/ico18.png new file mode 100644 index 0000000..aba89cb Binary files /dev/null and b/src/assets/images/map/bottom/ico18.png differ diff --git a/src/assets/images/map/bottom/ico18_on.png b/src/assets/images/map/bottom/ico18_on.png new file mode 100644 index 0000000..69b5825 Binary files /dev/null and b/src/assets/images/map/bottom/ico18_on.png differ diff --git a/src/layout/breadcrumb/index.vue b/src/layout/breadcrumb/index.vue index 5ddb5de..48f4bb2 100644 --- a/src/layout/breadcrumb/index.vue +++ b/src/layout/breadcrumb/index.vue @@ -31,7 +31,7 @@ v-for="(item, index) in data.breadcrumbList" :key="item.path" > - + {{ item.meta.title }} diff --git a/src/views/BI/components/bottom_options.vue b/src/views/BI/components/bottom_options.vue index 2596f4d..802f732 100644 --- a/src/views/BI/components/bottom_options.vue +++ b/src/views/BI/components/bottom_options.vue @@ -61,22 +61,23 @@ const props = defineProps({ required: true, default: false, }, - currentCheckChildren: { - type: String, + isHistoricalTrajectory: { + type: Boolean, required: true, - default: "", + default: false, }, }); const emits = defineEmits([ "update:leftCurrentComponent", "update:rightCurrentComponent", + "update:isHistoricalTrajectory", "update:rightOption", ]); const { leftCurrentComponent, rightCurrentComponent, rightOption, - currentCheckChildren, + isHistoricalTrajectory, } = useVModels(props, emits); const bottomOptionsList = [ @@ -125,10 +126,10 @@ const bottomOptionsList = [ action: handleFence, }, { - img: new URL("/src/assets/images/map/bottom/ico3.png", import.meta.url) + img: new URL("/src/assets/images/map/bottom/ico18.png", import.meta.url) .href, imgSelect: new URL( - "/src/assets/images/map/bottom/ico3_on.png", + "/src/assets/images/map/bottom/ico18_on.png", import.meta.url ).href, title: "历史轨迹", @@ -369,16 +370,39 @@ 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; - if (data.bottomOptionsList[index].list[index1].action) { - data.bottomOptionsList[index].list[index1].action( - data.bottomOptionsList[index].list[index1].check, - item1.type - ); + if (item1.type === "historicalTrajectory") { + for (let i = 0; i < data.bottomOptionsList.length; i++) { + for (let j = 0; j < data.bottomOptionsList[i].list.length; j++) { + const currentItem = data.bottomOptionsList[i].list[j]; + if (currentItem.type !== item1.type) currentItem.check = false; + } + } + data.bottomOptionsList[index].list[index1].check = + !data.bottomOptionsList[index].list[index1].check; + isHistoricalTrajectory.value = !isHistoricalTrajectory.value; + } else { + let isSelf = false; + for (let i = 0; i < data.bottomOptionsList.length; i++) { + for (let j = 0; j < data.bottomOptionsList[i].list.length; j++) { + const currentItem = data.bottomOptionsList[i].list[j]; + if (currentItem.type === "historicalTrajectory") { + currentItem.check = false; + isHistoricalTrajectory.value = false; + isSelf = true; + break; + } + } + if (isSelf) break; + } + data.bottomOptionsList[index].list[index1].check = + !data.bottomOptionsList[index].list[index1].check; + 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; };