From b085d9349e438d646b0bf383db8bc8b37fc3d37b Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 3 Sep 2025 22:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=8D=9F=E5=BC=B9=E6=A1=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/repair/equipAssessment/index.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pages/repair/equipAssessment/index.vue b/src/pages/repair/equipAssessment/index.vue index 622c737..45d07dc 100644 --- a/src/pages/repair/equipAssessment/index.vue +++ b/src/pages/repair/equipAssessment/index.vue @@ -116,8 +116,8 @@ {{ modalContent }} - - + + @@ -130,6 +130,8 @@ import { getLossAssessmentListAPI,repairSubmitAPI,repairRejectAPI,updateRepairSt import { onShow } from '@dcloudio/uni-app' import { debounce } from 'lodash-es' +const timer = ref(null) +const countdown = ref(0) const total = ref(0) // 数据总�� const active = ref(1) // tap索引 const tableList = ref([]) // 列表数据源 @@ -299,6 +301,17 @@ const handleItem = (item) => { if(item.repairStatusCode == "0") { // 使用自定义弹窗 showCustomModal.value = true + if (timer.value) clearInterval(timer.value) + countdown.value = 3 + timer.value = setInterval(() => { + if (countdown.value > 0) { + countdown.value-- + } else { + clearInterval(timer.value) + timer.value = null + countdown.value = 0 + } + }, 1000) } else { uni.navigateTo({ url: `/pages/repair/equipAssessment/view?taskId=${item.taskId}` }) } @@ -343,12 +356,14 @@ const handleItem = (item) => { // 自定义弹窗确认事件 const handleConfirm = () => { + if (countdown.value > 0) return showCustomModal.value = false uni.navigateTo({ url: `/pages/repair/equipAssessment/details?taskId=${currentItem.value.taskId}` }) } // 自定义弹窗取消事件 const handleCancel = async () => { + if (countdown.value > 0) return showCustomModal.value = false const res = await updateRepairStatusAPI({taskId: currentItem.value.taskId}) if(res.code == 200) {