From b2f0a0cfefee1e9080dc652f87a06b80f0f960b3 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Fri, 22 Aug 2025 15:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/back/index.vue | 16 ++++++++++++++-- src/pages/part/part-lease/applyList.vue | 14 +++++++++++++- src/pages/picking/outbound/index.vue | 16 ++++++++++++++-- src/pages/picking/outbound/sign.vue | 14 +++++++++++++- src/pages/picking/review/index.vue | 14 +++++++++++++- src/pages/repair/testedInBound/index.vue | 15 +++++++++++++-- 6 files changed, 80 insertions(+), 9 deletions(-) diff --git a/src/pages/back/index.vue b/src/pages/back/index.vue index 1929215..da3faed 100644 --- a/src/pages/back/index.vue +++ b/src/pages/back/index.vue @@ -192,7 +192,7 @@ const queryParams = ref({ appTaskStatus: 0, isSign: 0, // 默认显示全部 pageNum: 1, - pageSize: 5, + pageSize: 20, }) // 右滑按钮组-未完成 @@ -333,7 +333,19 @@ const getTableList = async (isTap = false) => { if (res.data.rows.length == 0) { tableList.value = [] } else { - tableList.value.push(...res.data.rows) + // 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) { diff --git a/src/pages/part/part-lease/applyList.vue b/src/pages/part/part-lease/applyList.vue index 25ac8f0..2f46948 100644 --- a/src/pages/part/part-lease/applyList.vue +++ b/src/pages/part/part-lease/applyList.vue @@ -117,7 +117,19 @@ const getTableList = async (isTap = false) => { } else { // 下拉加载时,追加数据 if (res.data.rows && res.data.rows.length > 0) { - tableList.value = [...tableList.value, ...res.data.rows] + // tableList.value = [...tableList.value, ...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) { diff --git a/src/pages/picking/outbound/index.vue b/src/pages/picking/outbound/index.vue index c146aad..45036f0 100644 --- a/src/pages/picking/outbound/index.vue +++ b/src/pages/picking/outbound/index.vue @@ -157,7 +157,7 @@ const queryParams = ref({ keyWord: '', // 关键字 statusList: [3], // 状态 pageNum: 1, - pageSize: 10, + pageSize: 20, hasSign: 1, }) @@ -216,7 +216,19 @@ const getTableList = async (isTap = false, isSearch = false) => { tableList.value = [] } else { // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] + // tableList.value = [...tableList.value, ...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) { diff --git a/src/pages/picking/outbound/sign.vue b/src/pages/picking/outbound/sign.vue index 111736e..ec9e51e 100644 --- a/src/pages/picking/outbound/sign.vue +++ b/src/pages/picking/outbound/sign.vue @@ -279,7 +279,19 @@ const getTableList = async (isTap = false, isSearch = false) => { tableList.value = [] } else { // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] + // tableList.value = [...tableList.value, ...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) { diff --git a/src/pages/picking/review/index.vue b/src/pages/picking/review/index.vue index 7e69a50..a125512 100644 --- a/src/pages/picking/review/index.vue +++ b/src/pages/picking/review/index.vue @@ -264,7 +264,19 @@ const getTableList = async (isTap = false,isSearch = false) => { tableList.value = [] } else { // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] + // tableList.value = [...tableList.value, ...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) { diff --git a/src/pages/repair/testedInBound/index.vue b/src/pages/repair/testedInBound/index.vue index 4357c4e..da63b85 100644 --- a/src/pages/repair/testedInBound/index.vue +++ b/src/pages/repair/testedInBound/index.vue @@ -170,7 +170,7 @@ const queryParams = ref({ endTime: dateArray.value[1] || '', // 结束时间 keyWord: '', // 关键字 pageNum: 1, - pageSize: 5, + pageSize: 20, appTaskStatus: 0, }) @@ -249,7 +249,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) {