|
|
|
|
@ -40,16 +40,16 @@
|
|
|
|
|
})
|
|
|
|
|
const choose_active = ref([])
|
|
|
|
|
const chooseReportClick = (key) => {
|
|
|
|
|
let index = choose_active.value.indexOf(key)
|
|
|
|
|
if (index === -1) {
|
|
|
|
|
if (choose_active.value.length === 2) {
|
|
|
|
|
uni.$lu.toast("最多选择两份报告对比")
|
|
|
|
|
} else {
|
|
|
|
|
choose_active.value.push(key)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
choose_active.value.splice(key, 1)
|
|
|
|
|
}
|
|
|
|
|
let index = choose_active.value.indexOf(key);
|
|
|
|
|
if (index === -1) { // 如果当前点击的报告没有被选中
|
|
|
|
|
if (choose_active.value.length === 2) {
|
|
|
|
|
uni.$lu.toast("最多选择两份报告对比");
|
|
|
|
|
} else {
|
|
|
|
|
choose_active.value.push(key); // 添加到已选报告列表
|
|
|
|
|
}
|
|
|
|
|
} else { // 当前点击的报告已经被选中了,执行删除操作
|
|
|
|
|
choose_active.value.splice(index, 1); // 注意这里应该是index而不是key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const chooseDoneClick = () => {
|
|
|
|
|
|