This commit is contained in:
bb_pan 2025-08-25 09:10:26 +08:00
parent b65ef8e119
commit ab11e28e65
9 changed files with 106 additions and 17 deletions

View File

@ -154,13 +154,14 @@ const handleIsOverToday = () => {
// } // }
// //
const scanStart = () => { const scanStart = () => {
qrCodeScan.value = '201807-00009' qrCodeScan.value = ''
getMaInfoScan() codeData.value = {}
// codeData.value = {} if (scanQrCodeRef.value) {
// if (scanQrCodeRef.value) { scanQrCodeRef.value.scanQrCode()
// scanQrCodeRef.value.scanQrCode() }
// }
// qrCodeScan.value = // --
// qrCodeScan.value = '201807-00009'
// getMaInfoScan() // getMaInfoScan()
} }

View File

@ -162,7 +162,18 @@ const getTableList = async (isTap = false) => {
queryParams.value.pageNum = 1 queryParams.value.pageNum = 1
} else { } else {
if (res.rows?.length) { if (res.rows?.length) {
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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
} }
} }
return res // 使 return res // 使

View File

@ -119,7 +119,7 @@ const queryParams = ref({
taskStage: 4, // taskStage: 4, //
isFinish: '0', // isFinish: '0', //
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 20,
}) })
const boxCode = ref('') const boxCode = ref('')
const boxInfo = ref({}) const boxInfo = ref({})
@ -290,7 +290,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {
@ -309,7 +320,7 @@ const onScrollTolower = debounce(() => {
console.log("下一页") console.log("下一页")
// //
if (tableList.value.length < total.value) { if (tableList.value.length < total.value) {
queryParams.value.pageSize += 5 queryParams.value.pageSize += 10
getTableList(false) getTableList(false)
} }
}, 500) }, 500)

View File

@ -218,7 +218,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {

View File

@ -129,7 +129,18 @@ const getTableList = async (isTap = false) => {
} else { } else {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {

View File

@ -249,7 +249,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {

View File

@ -244,7 +244,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {

View File

@ -217,7 +217,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {

View File

@ -229,7 +229,18 @@ const getTableList = async (isTap = false) => {
// //
if (res.rows && res.rows.length > 0) { if (res.rows && res.rows.length > 0) {
// 使 // 使
tableList.value = [...tableList.value, ...res.rows] const merged = [...tableList.value, ...res.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) { } catch (error) {