forked from integrated_whb/integrated_whb_vue
历史轨迹
parent
55ccefb142
commit
5311ae417d
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue