This commit is contained in:
bb_pan 2025-08-24 19:50:12 +08:00
parent 529f04c591
commit b65ef8e119
6 changed files with 40 additions and 6 deletions

View File

@ -117,7 +117,8 @@
const getTableList = () => {
const res = getListDetails(queryParams.value).then(res => {
total.value = res.data.total
tableList.value.push(...res.data.rows)
// tableList.value.push(...res.data.rows)
tableList.value = res.data.rows
})
}

View File

@ -135,7 +135,7 @@
if (isTap) {
tableList.value = res.data.rows
} else {
tableList.value.push(...res.data.rows)
tableList.value = res.data.rows
}
}

View File

@ -238,7 +238,18 @@ const getTableList = async (isTap = false) => {
if (res.data.rows.length == 0) {
tableList.value = []
} else {
tableList.value.push(...res.data.rows)
const merged = [...tableList.value, ...res.data.rows]
// id
const unique = []
const seen = new Set()
for (const item of merged) {
if (!seen.has(item.taskId)) {
seen.add(item.taskId)
unique.push(item)
}
}
console.log('🚀 ~ getTableList ~ unique:', unique)
tableList.value = unique
}
}
} catch (error) {

View File

@ -200,7 +200,7 @@
const getTableList = () => {
const res = getListDetails(queryParams.value).then(res => {
total.value = res.data.total
tableList.value.push(...res.data.rows)
tableList.value = res.data.rows
})
}

View File

@ -229,7 +229,18 @@
if (isTap) {
tableList.value = res.data.rows
} else {
tableList.value.push(...res.data.rows)
const merged = [...tableList.value, ...res.data.rows]
// id
const unique = []
const seen = new Set()
for (const item of merged) {
if (!seen.has(item.taskId)) {
seen.add(item.taskId)
unique.push(item)
}
}
console.log('🚀 ~ getTableList ~ unique:', unique)
tableList.value = unique
}
} catch (error) {
console.log('🚀 ~ getTableList ~ error:', error)

View File

@ -216,7 +216,18 @@ const getTableList = async (isTap = false) => {
if (res.data.rows.length == 0) {
tableList.value = []
} else {
tableList.value.push(...res.data.rows)
const merged = [...tableList.value, ...res.data.rows]
// id
const unique = []
const seen = new Set()
for (const item of merged) {
if (!seen.has(item.taskId)) {
seen.add(item.taskId)
unique.push(item)
}
}
console.log('🚀 ~ getTableList ~ unique:', unique)
tableList.value = unique
}
}
}