From 2bb643a1e72455bec3c2a52e24399575ed10ff39 Mon Sep 17 00:00:00 2001 From: jiang Date: Mon, 28 Jul 2025 18:40:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80?= =?UTF-8?q?=EF=BC=8C=E6=95=B4=E4=BD=93=E5=AD=97=E4=BD=93=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=A4=A7=E4=B8=80=E7=82=B9=E3=80=82=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8E=82=E5=AE=B6=E4=B8=8D=E5=9B=9E=E6=98=BE=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=B8=8D=E6=88=90=E5=8A=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dateUpdate/index.vue | 509 +++++++++++-------- src/pages/repair/wsMaInfo/index.vue | 727 ++++++++++++++-------------- src/services/wsMaInfo/wsMaInfo.js | 6 +- 3 files changed, 686 insertions(+), 556 deletions(-) diff --git a/src/pages/dateUpdate/index.vue b/src/pages/dateUpdate/index.vue index 4bab40b..8afbac9 100644 --- a/src/pages/dateUpdate/index.vue +++ b/src/pages/dateUpdate/index.vue @@ -1,229 +1,338 @@ - - ::v-deep .uni-data-checklist { - // 去掉 flex: 1 - flex: none; - } - \ No newline at end of file diff --git a/src/pages/repair/wsMaInfo/index.vue b/src/pages/repair/wsMaInfo/index.vue index 53f48c6..2b6474d 100644 --- a/src/pages/repair/wsMaInfo/index.vue +++ b/src/pages/repair/wsMaInfo/index.vue @@ -1,403 +1,424 @@ \ No newline at end of file + &:active { + background: #f7f8fa; + } + } + } + } +} + diff --git a/src/services/wsMaInfo/wsMaInfo.js b/src/services/wsMaInfo/wsMaInfo.js index 562ea56..40d4c17 100644 --- a/src/services/wsMaInfo/wsMaInfo.js +++ b/src/services/wsMaInfo/wsMaInfo.js @@ -64,11 +64,11 @@ export const getMaModeData = (parentId) => { } -export const updateCheckTime = (id) => { +export const updateCheckTime = (maCode) => { return http({ method: 'POST', url: '/material/wsMaInfo/updateCheckTime', - data: {id} + data: {maCode} }) } @@ -82,4 +82,4 @@ export const getSupplier = () => { url: '/material/wsMaInfo/getSupplier', data: {} }) -} \ No newline at end of file +} From 08d9468270300c184e7fabf8e2f4c3d2305a5d55 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Tue, 29 Jul 2025 10:05:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 7 ++- src/pages/back/index.vue | 27 ++++++---- .../integratedQuery/derateRecord/index.vue | 3 ++ .../directRotationRecord/index.vue | 3 ++ .../integratedQuery/inUseRecord/index.vue | 3 ++ .../integratedQuery/receiveRecord/index.vue | 3 ++ .../settleAccountsRecord/index.vue | 3 ++ .../authorizeSignature/authorizeSignature.vue | 3 ++ .../materialClerkConfirms.vue | 3 ++ .../teamBackRecord/teamBackRecord.vue | 3 ++ .../teamLeaseRecord/teamLeaseRecord.vue | 3 ++ .../teamWarning/teamWarning.vue | 3 ++ .../materialsStation/toolsBack/toolsBack.vue | 3 ++ .../toolsLease/toolsLease.vue | 3 ++ .../toolsLedger/toolsLedger.vue | 3 ++ src/pages/new-purchase/accept/index.vue | 6 +++ src/pages/new-purchase/bind/index.vue | 30 +++++++---- src/pages/new-purchase/entry/index.vue | 6 +++ src/pages/picking/outbound/index.vue | 42 +++++++++------ src/pages/picking/outbound/sign.vue | 52 +++++++++++-------- src/pages/picking/review/index.vue | 44 ++++++++++------ src/pages/repair/equipAssessment/index.vue | 28 ++++++---- src/pages/repair/fieldMaintenance/index.vue | 22 +++++--- src/pages/repair/repairManage/index.vue | 28 ++++++---- src/pages/repair/testExamine/index.vue | 6 +++ src/pages/repair/testedInBound/index.vue | 26 +++++++--- .../stquery/deviceStatusRecord/index.vue | 33 +++++++----- 27 files changed, 276 insertions(+), 120 deletions(-) diff --git a/src/pages.json b/src/pages.json index 0a27d3b..12e6a5d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -821,7 +821,12 @@ } }, // 项目部授权书 - + { + "path": "pages/materialsStation/authorizeSignature/authorizeSignature", + "style": { + "navigationStyle": "custom" + } + }, // 材料员确认 { "path": "pages/materialsStation/materialClerkConfirms/materialClerkConfirms", diff --git a/src/pages/back/index.vue b/src/pages/back/index.vue index e56996a..99a4970 100644 --- a/src/pages/back/index.vue +++ b/src/pages/back/index.vue @@ -289,18 +289,25 @@ const onClick=(e,item,itemIndex)=> { //获取列表 const getTableList = async (isTap = false) => { - console.log('queryParams.value查询参数', queryParams.value) - const res = await getBackList(queryParams.value) - console.log('res列表数据', res) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { - tableList.value = [] + try { + uni.showLoading({ title: '加载中',mask: true }) + console.log('queryParams.value查询参数', queryParams.value) + const res = await getBackList(queryParams.value) + console.log('res列表数据', res) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows } else { - tableList.value.push(...res.data.rows) + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + tableList.value.push(...res.data.rows) + } } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/integratedQuery/derateRecord/index.vue b/src/pages/integratedQuery/derateRecord/index.vue index e3e32be..8bee65d 100644 --- a/src/pages/integratedQuery/derateRecord/index.vue +++ b/src/pages/integratedQuery/derateRecord/index.vue @@ -99,6 +99,7 @@ onMounted(() => { // 获取列表数据 const getList = async () => { try { + uni.showLoading({ title: '加载中', mask: true }) const params = { startDate: queryForm.dateRange[0], endDate: queryForm.dateRange[1], @@ -111,6 +112,8 @@ const getList = async () => { listData.value = res.data } catch (error) { console.log('🚀 ~ getList ~ error', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/integratedQuery/directRotationRecord/index.vue b/src/pages/integratedQuery/directRotationRecord/index.vue index b62cd9c..89e7eee 100644 --- a/src/pages/integratedQuery/directRotationRecord/index.vue +++ b/src/pages/integratedQuery/directRotationRecord/index.vue @@ -96,6 +96,7 @@ onMounted(() => { // 获取列表数据 const getList = async () => { try { + uni.showLoading({ title: '加载中', mask: true }) const params = { startTime: queryForm.dateRange[0], endTime: queryForm.dateRange[1], @@ -108,6 +109,8 @@ const getList = async () => { listData.value = res.data } catch (error) { console.log('🚀 ~ getList ~ error', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/integratedQuery/inUseRecord/index.vue b/src/pages/integratedQuery/inUseRecord/index.vue index 8ebf48b..c9be827 100644 --- a/src/pages/integratedQuery/inUseRecord/index.vue +++ b/src/pages/integratedQuery/inUseRecord/index.vue @@ -123,6 +123,7 @@ const getTableList = () => { console.log('🚀 ~ formRef.value.validate ~ valid:', valid) if (!valid) { try { + uni.showLoading({ title: '加载中', mask: true }) const params = { unitId: queryForm.unitId, projectId: queryForm.proId, @@ -137,6 +138,8 @@ const getTableList = () => { } catch (error) { console.log(error) tableList.value = [] + } finally { + uni.hideLoading() } } }) diff --git a/src/pages/integratedQuery/receiveRecord/index.vue b/src/pages/integratedQuery/receiveRecord/index.vue index 84e80ef..b2d9e04 100644 --- a/src/pages/integratedQuery/receiveRecord/index.vue +++ b/src/pages/integratedQuery/receiveRecord/index.vue @@ -95,6 +95,7 @@ onMounted(() => { // 获取列表数据 const getList = async () => { try { + uni.showLoading({ title: '加载中', mask: true }) const params = { startTime: queryForm.dateRange[0], endTime: queryForm.dateRange[1], @@ -107,6 +108,8 @@ const getList = async () => { listData.value = res.data } catch (error) { console.log('🚀 ~ getList ~ error', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/integratedQuery/settleAccountsRecord/index.vue b/src/pages/integratedQuery/settleAccountsRecord/index.vue index 7e92d13..8d9d21c 100644 --- a/src/pages/integratedQuery/settleAccountsRecord/index.vue +++ b/src/pages/integratedQuery/settleAccountsRecord/index.vue @@ -78,6 +78,7 @@ onMounted(() => { // 获取列表数据 const getList = async () => { try { + uni.showLoading({ title: '加载中', mask: true }) const params = { startDate: queryForm.dateRange[0], endDate: queryForm.dateRange[1], @@ -89,6 +90,8 @@ const getList = async () => { listData.value = res.data } catch (error) { console.log('🚀 ~ getList ~ error', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/authorizeSignature/authorizeSignature.vue b/src/pages/materialsStation/authorizeSignature/authorizeSignature.vue index 354ce9d..82cbd55 100644 --- a/src/pages/materialsStation/authorizeSignature/authorizeSignature.vue +++ b/src/pages/materialsStation/authorizeSignature/authorizeSignature.vue @@ -114,6 +114,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getAuthorListApi(params) console.log('🚀 ~ getList ~ res:', res) tableList.value = res.data.rows @@ -122,6 +123,8 @@ const getList = async () => { console.log('🚀 ~ getList ~ error:', error) tableList.value = [] total.value = 0 + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/materialClerkConfirms/materialClerkConfirms.vue b/src/pages/materialsStation/materialClerkConfirms/materialClerkConfirms.vue index 53420e0..1b6fd4f 100644 --- a/src/pages/materialsStation/materialClerkConfirms/materialClerkConfirms.vue +++ b/src/pages/materialsStation/materialClerkConfirms/materialClerkConfirms.vue @@ -103,11 +103,14 @@ const getList = async () => { queryParams.startTime = queryParams.range && queryParams.range[0] queryParams.endTime = queryParams.range && queryParams.range[1] try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getCompleteOutTaskListApi(queryParams) tableList.value = res.data.rows total.value = res.data.total } catch (error) { console.log('🚀 ~ getList ~ error:', error) + } finally { + uni.hideLoading() } } const handleDetails = (item) => { diff --git a/src/pages/materialsStation/teamBackRecord/teamBackRecord.vue b/src/pages/materialsStation/teamBackRecord/teamBackRecord.vue index fb97d45..3aede07 100644 --- a/src/pages/materialsStation/teamBackRecord/teamBackRecord.vue +++ b/src/pages/materialsStation/teamBackRecord/teamBackRecord.vue @@ -105,6 +105,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getBackListAPI(params) console.log('🚀 ~ getList ~ res:', res) if (res.code == 200) { @@ -115,6 +116,8 @@ const getList = async () => { console.log('🚀 ~ getList ~ error:', error) tableList.value = [] total.value = 0 + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/teamLeaseRecord/teamLeaseRecord.vue b/src/pages/materialsStation/teamLeaseRecord/teamLeaseRecord.vue index d167210..954f7e6 100644 --- a/src/pages/materialsStation/teamLeaseRecord/teamLeaseRecord.vue +++ b/src/pages/materialsStation/teamLeaseRecord/teamLeaseRecord.vue @@ -105,6 +105,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getPickingOutboundListAPI(params) console.log('🚀 ~ getList ~ res:', res) if (res.code == 200) { @@ -115,6 +116,8 @@ const getList = async () => { console.log('🚀 ~ getList ~ error:', error) tableList.value = [] total.value = 0 + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/teamWarning/teamWarning.vue b/src/pages/materialsStation/teamWarning/teamWarning.vue index 391b3a6..0222b7d 100644 --- a/src/pages/materialsStation/teamWarning/teamWarning.vue +++ b/src/pages/materialsStation/teamWarning/teamWarning.vue @@ -130,11 +130,14 @@ const getList = async () => { status: queryParams.status, } try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getTeamWarnDetailsListApi(params) console.log('🚀 ~ getList ~ res:', res) tableList.value = res.data } catch (error) { console.log('🚀 ~ getList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/toolsBack/toolsBack.vue b/src/pages/materialsStation/toolsBack/toolsBack.vue index 13a2f0e..0d35fd2 100644 --- a/src/pages/materialsStation/toolsBack/toolsBack.vue +++ b/src/pages/materialsStation/toolsBack/toolsBack.vue @@ -141,6 +141,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getBackListAPI(params) console.log('🚀 ~ getList ~ res:', res) if (res.code == 200) { @@ -162,6 +163,8 @@ const getList = async () => { console.log('🚀 ~ getList ~ error:', error) tableList.value = [] total.value = 0 + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/toolsLease/toolsLease.vue b/src/pages/materialsStation/toolsLease/toolsLease.vue index df59a55..2d00017 100644 --- a/src/pages/materialsStation/toolsLease/toolsLease.vue +++ b/src/pages/materialsStation/toolsLease/toolsLease.vue @@ -147,6 +147,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) const res = await getPickingOutboundListAPI(params) console.log('🚀 ~ getList ~ res:', res) if (res.code == 200) { @@ -177,6 +178,8 @@ const getList = async () => { console.log('🚀 ~ getList ~ error:', error) tableList.value = [] total.value = 0 + } finally { + uni.hideLoading() } } diff --git a/src/pages/materialsStation/toolsLedger/toolsLedger.vue b/src/pages/materialsStation/toolsLedger/toolsLedger.vue index 9389959..89dcbd5 100644 --- a/src/pages/materialsStation/toolsLedger/toolsLedger.vue +++ b/src/pages/materialsStation/toolsLedger/toolsLedger.vue @@ -201,6 +201,7 @@ const getList = async () => { } console.log('🚀 ~ getList ~ params:', params) try { + uni.showLoading({ title: '加载中', mask: true }) let res = null if (isTeam.value) { res = await getTeamUseNumList(params) @@ -241,6 +242,8 @@ const getList = async () => { } catch (error) { console.error('获取设备列表失败:', error) equipmentCategories.value = [] + } finally { + uni.hideLoading() } } diff --git a/src/pages/new-purchase/accept/index.vue b/src/pages/new-purchase/accept/index.vue index 609bc10..73af582 100644 --- a/src/pages/new-purchase/accept/index.vue +++ b/src/pages/new-purchase/accept/index.vue @@ -142,6 +142,10 @@ const queryParams = ref({ // } const getTableList = async (isTap = false) => { try { + uni.showLoading({ + title: '加载中...', + mask: true + }) const { data: res } = await getPurchaseList(queryParams.value) total.value = res.total @@ -158,6 +162,8 @@ const getTableList = async (isTap = false) => { console.error('获取列表数据失败:', error) if (isTap) tableList.value = [] throw error // 抛出错误,让外层捕获 + } finally { + uni.hideLoading() } } diff --git a/src/pages/new-purchase/bind/index.vue b/src/pages/new-purchase/bind/index.vue index 527899a..dd825a6 100644 --- a/src/pages/new-purchase/bind/index.vue +++ b/src/pages/new-purchase/bind/index.vue @@ -115,18 +115,28 @@ const onChangeDate = (val) => { // 获取列表数据 const getTableList = async (isTap = false) => { - console.log('queryParams.value查询参数', queryParams.value) - const { data: res } = await getPurchaseBindListAPI(queryParams.value) - console.log('res列表数据', res) - total.value = res.total - if (isTap) { - tableList.value = res.rows - } else { - if (res.rows.length == 0) { - tableList.value = [] + try { + uni.showLoading({ + title: '加载中...', + mask: true + }) + console.log('queryParams.value查询参数', queryParams.value) + const { data: res } = await getPurchaseBindListAPI(queryParams.value) + console.log('res列表数据', res) + total.value = res.total + if (isTap) { + tableList.value = res.rows } else { - tableList.value.push(...res.rows) + if (res.rows.length == 0) { + tableList.value = [] + } else { + tableList.value.push(...res.rows) + } } + } catch (error) { + + } finally { + uni.hideLoading() } } diff --git a/src/pages/new-purchase/entry/index.vue b/src/pages/new-purchase/entry/index.vue index c391822..cd80ad6 100644 --- a/src/pages/new-purchase/entry/index.vue +++ b/src/pages/new-purchase/entry/index.vue @@ -261,6 +261,10 @@ const swipeOptions = ref([ // 获取列表数据 const getTableList = async (isTap = false) => { try { + uni.showLoading({ + title: '加载中...', + mask: true + }) console.log('queryParams.value查询参数', queryParams.value) const { data: res } = await getPurchaseList(queryParams.value) console.log('res列表数据', res) @@ -287,6 +291,8 @@ const getTableList = async (isTap = false) => { if (isTap) { tableList.value = [] } + } finally { + uni.hideLoading() } } diff --git a/src/pages/picking/outbound/index.vue b/src/pages/picking/outbound/index.vue index 8ca0f5f..569bed2 100644 --- a/src/pages/picking/outbound/index.vue +++ b/src/pages/picking/outbound/index.vue @@ -176,24 +176,34 @@ const onChangeDate = (val) => { // 获取列表数据 const getTableList = async (isTap = false, isSearch = false) => { - if (isSearch) { - // 当进行搜索时,重置页码和列表数据 - queryParams.value.pageNum = 1 - tableList.value = [] - } - console.log('queryParams.value查询参数', queryParams.value) - const res = await getPickingOutboundListAPI(queryParams.value) - console.log('res列表数据', res) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { + try { + uni.showLoading({ + title: '加载中...', + mask: true, + }) + if (isSearch) { + // 当进行搜索时,重置页码和列表数据 + queryParams.value.pageNum = 1 tableList.value = [] - } else { - // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] } + console.log('queryParams.value查询参数', queryParams.value) + const res = await getPickingOutboundListAPI(queryParams.value) + console.log('res列表数据', res) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows + } else { + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + // tableList.value = res.data.rows + tableList.value = [...tableList.value, ...res.data.rows] + } + } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/picking/outbound/sign.vue b/src/pages/picking/outbound/sign.vue index 9d3797f..d356f0c 100644 --- a/src/pages/picking/outbound/sign.vue +++ b/src/pages/picking/outbound/sign.vue @@ -234,29 +234,39 @@ const onChangeDate = (val) => { // 获取列表数据 const getTableList = async (isTap = false, isSearch = false) => { - if (isSearch) { - // 当进行搜索时,重置页码和列表数据 - queryParams.value.pageNum = 1 - tableList.value = [] - } - console.log('queryParams.value查询参数', queryParams.value) - let res = null - if (opts.value) { - res = await getNoSignListAPI(queryParams.value) - } else { - res = await getPickingOutboundListAPI(queryParams.value) - } - console.log('res列表数据', res) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { + try { + uni.showLoading({ + title: '加载中...', + mask: true + }) + if (isSearch) { + // 当进行搜索时,重置页码和列表数据 + queryParams.value.pageNum = 1 tableList.value = [] - } else { - // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] } + console.log('queryParams.value查询参数', queryParams.value) + let res = null + if (opts.value) { + res = await getNoSignListAPI(queryParams.value) + } else { + res = await getPickingOutboundListAPI(queryParams.value) + } + console.log('res列表数据', res) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows + } else { + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + // tableList.value = res.data.rows + tableList.value = [...tableList.value, ...res.data.rows] + } + } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/picking/review/index.vue b/src/pages/picking/review/index.vue index 7549569..4bf8482 100644 --- a/src/pages/picking/review/index.vue +++ b/src/pages/picking/review/index.vue @@ -224,24 +224,34 @@ const onChangeDate = (val) => { // 获取列表数据 const getTableList = async (isTap = false,isSearch = false) => { - if (isSearch) { - // 当进行搜索时,重置页码和列表数据 - queryParams.value.pageNum = 1; - tableList.value = []; - } - console.log('queryParams.value查询参数', queryParams.value) - const res = await getPickingReviewListAPI(queryParams.value) - console.log('res列表数据', res) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { - tableList.value = [] - } else { - // tableList.value = res.data.rows - tableList.value = [...tableList.value, ...res.data.rows] + try { + uni.showLoading({ + title: '加载中...', + mask: true + }) + if (isSearch) { + // 当进行搜索时,重置页码和列表数据 + queryParams.value.pageNum = 1; + tableList.value = []; } + console.log('queryParams.value查询参数', queryParams.value) + const res = await getPickingReviewListAPI(queryParams.value) + console.log('res列表数据', res) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows + } else { + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + // tableList.value = res.data.rows + tableList.value = [...tableList.value, ...res.data.rows] + } + } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/repair/equipAssessment/index.vue b/src/pages/repair/equipAssessment/index.vue index c733fcb..7d9ea28 100644 --- a/src/pages/repair/equipAssessment/index.vue +++ b/src/pages/repair/equipAssessment/index.vue @@ -194,17 +194,27 @@ const onSearchBtn = () => { // 获取列表数据 const getTableList = async (isTap = false) => { - console.log('queryParams.value查询参数', queryParams.value) - const res = await getLossAssessmentListAPI(queryParams.value) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { - tableList.value = [] + try { + uni.showLoading({ + title: '加载中', + mask: true + }) + console.log('queryParams.value查询参数', queryParams.value) + const res = await getLossAssessmentListAPI(queryParams.value) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows } else { - tableList.value.push(...res.data.rows) + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + tableList.value.push(...res.data.rows) + } } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/repair/fieldMaintenance/index.vue b/src/pages/repair/fieldMaintenance/index.vue index 966d03e..62c220e 100644 --- a/src/pages/repair/fieldMaintenance/index.vue +++ b/src/pages/repair/fieldMaintenance/index.vue @@ -208,12 +208,22 @@ } const getTableList = async (isTap = false) => { - const res = await getList(queryParams.value) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - tableList.value.push(...res.data.rows) + try { + uni.showLoading({ + title: '加载中...', + mask: true + }) + const res = await getList(queryParams.value) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows + } else { + tableList.value.push(...res.data.rows) + } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/repair/repairManage/index.vue b/src/pages/repair/repairManage/index.vue index 5d3892a..ab89668 100644 --- a/src/pages/repair/repairManage/index.vue +++ b/src/pages/repair/repairManage/index.vue @@ -192,17 +192,27 @@ const onSearchBtn = () => { // 获取列表数据 const getTableList = async (isTap = false) => { - console.log('queryParams.value查询参数', queryParams.value) - const res = await getRepairListAPI(queryParams.value) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { - tableList.value = [] - } else { + try { + uni.showLoading({ + title: '加载中', + mask: true + }) + console.log('queryParams.value查询参数', queryParams.value) + const res = await getRepairListAPI(queryParams.value) + total.value = res.data.total + if (isTap) { tableList.value = res.data.rows + } else { + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + tableList.value = res.data.rows + } } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/repair/testExamine/index.vue b/src/pages/repair/testExamine/index.vue index 8bed37b..8558802 100644 --- a/src/pages/repair/testExamine/index.vue +++ b/src/pages/repair/testExamine/index.vue @@ -335,6 +335,10 @@ const getTableList = async (isTap = false) => { ? tableList.value.filter(item => item && item.checked).map(item => item.taskId) : [] try { + uni.showLoading({ + title: '加载中...', + mask: true + }) const res = await getListTestExamineApply(queryParams.value) total.value = res?.data?.total || 0 tableList.value = Array.isArray(res?.data?.rows) ? res.data.rows : [] @@ -348,6 +352,8 @@ const getTableList = async (isTap = false) => { console.error('获取列表数据失败:', error) total.value = 0 tableList.value = [] + } finally { + uni.hideLoading() } } diff --git a/src/pages/repair/testedInBound/index.vue b/src/pages/repair/testedInBound/index.vue index 358d62c..cd33407 100644 --- a/src/pages/repair/testedInBound/index.vue +++ b/src/pages/repair/testedInBound/index.vue @@ -217,16 +217,26 @@ const onSearchBtn = () => { // 获取列表数据 const getTableList = async (isTap = false) => { // console.log('queryParams.value查询参数', queryParams.value) - const res = await getRepairedList(queryParams.value) - total.value = res.data.total - if (isTap) { - tableList.value = res.data.rows - } else { - if (res.data.rows.length == 0) { - tableList.value = [] + try { + uni.showLoading({ + title: '加载中...', + mask: true + }) + const res = await getRepairedList(queryParams.value) + total.value = res.data.total + if (isTap) { + tableList.value = res.data.rows } else { - tableList.value.push(...res.data.rows) + if (res.data.rows.length == 0) { + tableList.value = [] + } else { + tableList.value.push(...res.data.rows) + } } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() } } diff --git a/src/pages/stquery/deviceStatusRecord/index.vue b/src/pages/stquery/deviceStatusRecord/index.vue index 086aec2..6ec8db8 100644 --- a/src/pages/stquery/deviceStatusRecord/index.vue +++ b/src/pages/stquery/deviceStatusRecord/index.vue @@ -191,19 +191,26 @@ const onScrollTolower = debounce(() => { }, 500) // 获取列表数据 const getTableList = async (isTap = false) => { - const res = await getRetainedEquipmentListApi(queryParams.value); - const newRows = res?.data?.rows || []; - total.value = res?.data?.total || 0; - - if (isTap || queryParams.pageNum === 1) { - // 刷新或tab切换,直接替换 - tableList.value = newRows; - } else { - // 加载更多,按 typeId 去重后合并 - const existingIds = new Set(tableList.value.map(item => item.typeId)); - const filteredRows = newRows.filter(item => !existingIds.has(item.typeId)); - tableList.value.push(...filteredRows); - } + try { + uni.showLoading({ title: '加载中', mask: true }) + const res = await getRetainedEquipmentListApi(queryParams.value); + const newRows = res?.data?.rows || []; + total.value = res?.data?.total || 0; + + if (isTap || queryParams.pageNum === 1) { + // 刷新或tab切换,直接替换 + tableList.value = newRows; + } else { + // 加载更多,按 typeId 去重后合并 + const existingIds = new Set(tableList.value.map(item => item.typeId)); + const filteredRows = newRows.filter(item => !existingIds.has(item.typeId)); + tableList.value.push(...filteredRows); + } + } catch (error) { + console.log('🚀 ~ getTableList ~ error:', error) + } finally { + uni.hideLoading() + } }; const getRetainedEquipmentList = async () => {