历史轨迹

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