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) {