forked from integrated_whb/integrated_whb_vue
历史轨迹
parent
4a5bd7df58
commit
55ccefb142
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
|
@ -31,7 +31,7 @@
|
|||
v-for="(item, index) in data.breadcrumbList"
|
||||
:key="item.path"
|
||||
>
|
||||
<router-link v-if="index === 0" :to="item.path">
|
||||
<router-link v-if="index === 0" to="/index">
|
||||
{{ item.meta.title }}
|
||||
</router-link>
|
||||
<span v-else-if="index !== data.breadcrumbList.length - 1">
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -27,7 +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"
|
||||
v-model:is-historical-trajectory="isHistoricalTrajectory"
|
||||
/>
|
||||
</div>
|
||||
<transition
|
||||
|
@ -43,9 +43,7 @@
|
|||
<div v-show="right_option" class="right_ico">
|
||||
<right-ico></right-ico>
|
||||
</div>
|
||||
<historical-trajectory-options
|
||||
v-if="currentCheckChildren === 'historicalTrajectory'"
|
||||
/>
|
||||
<historical-trajectory-options v-if="isHistoricalTrajectory" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -63,7 +61,7 @@ const right_option = ref(true);
|
|||
const transitionKey = ref(0);
|
||||
const leftCurrentComponent = ref("");
|
||||
const rightCurrentComponent = ref("");
|
||||
const currentCheckChildren = ref("");
|
||||
const isHistoricalTrajectory = ref(false);
|
||||
const corp = { CORP_NAME: "河北秦安", lng: 119.44758654, lat: 39.91845908 };
|
||||
|
||||
onMounted(() => {
|
||||
|
|
Loading…
Reference in New Issue