历史轨迹

pull/1/head
LiuJiaNan 2024-02-22 13:52:52 +08:00
parent 55ccefb142
commit 5311ae417d
1 changed files with 12 additions and 15 deletions

View File

@ -370,23 +370,26 @@ const fnBottomOptionsListChange = (item, index) => {
rightOption.value = index !== 4;
};
const fnBottomChildOptionsListChange = (index, item1, index1) => {
const currentItem = data.bottomOptionsList[index].list[index1];
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;
const currentForItem = data.bottomOptionsList[i].list[j];
if (currentForItem.check) {
if (currentForItem.type !== item1.type) currentForItem.check = false;
if (currentForItem.action) currentForItem.action(false, item1.type);
}
}
data.bottomOptionsList[index].list[index1].check =
!data.bottomOptionsList[index].list[index1].check;
}
currentItem.check = !currentItem.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;
const currentForItem = data.bottomOptionsList[i].list[j];
if (currentForItem.type === "historicalTrajectory") {
currentForItem.check = false;
isHistoricalTrajectory.value = false;
isSelf = true;
break;
@ -394,14 +397,8 @@ const fnBottomChildOptionsListChange = (index, item1, index1) => {
}
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
);
}
currentItem.check = !currentItem.check;
if (currentItem.action) currentItem.action(currentItem.check, item1.type);
}
};
</script>