From 4a86c212b2980f78c464dc00edc1caea3440ad16 Mon Sep 17 00:00:00 2001 From: lihui_ocr Date: Wed, 10 Apr 2024 21:25:06 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=E9=80=9A=E8=BF=87=E4=B8=8D=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=BF=AB=E6=8D=B7=E9=94=AE=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Approval/NotPassed.vue | 3 ++- src/views/task/content/Content.vue | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/Approval/NotPassed.vue b/src/components/Approval/NotPassed.vue index 7d3ea14..6d42cca 100644 --- a/src/components/Approval/NotPassed.vue +++ b/src/components/Approval/NotPassed.vue @@ -4,7 +4,7 @@ import { useMessage } from 'naive-ui' import { useDictionary } from '@/store/modules/dictonary' import { audit } from '@/api/task/task' -const emit = defineEmits(['success']) +const emit = defineEmits(['success','close']) const message = useMessage() const loading = ref(false) @@ -42,6 +42,7 @@ function showModal(value) { function closeModal() { show.value = false + emit('close') } defineExpose({ diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index fc77327..ac2cfe2 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -157,9 +157,17 @@ function handleKeydown(event) { // 如果两次按键时间间隔小于我们设定的双击间隔,则认为是双击 if (now - lastKeyPressTime < doubleClickInterval) { - // 清除已经设置的定时器(如果有的话) - clearTimeout(keyPressTimer); + const item = taskDetailInfo.value; + if ( + item?.userapprove?.statshis === 2 || + item?.userapprove?.statshis == 3 + ) { + overTask.value = null; + return; + } + if (validate([item]) == null && batch.value === false) + overTask.value = item; // 执行想要的操作 const modal = unref(notPassModalRef)! as any; modal.showModal([taskDetailInfo.value]); @@ -270,8 +278,9 @@ function approvalHandler(items?: any) { negativeText: "取消", onPositiveClick: () => { doAudit(param); + overTask.value = null; }, - onNegativeClick: () => {}, + onNegativeClick: () => {overTask.value = null;}, }); } @@ -334,7 +343,7 @@ async function addSuspicious() { const res = await dubiousfileyd({ pictureid: taskDetailInfo.value.ocrPicture.id, }); - console.log(res) + if (res.code === "OK") { message.success("加入成功"); setBatch(false); @@ -461,6 +470,7 @@ async function getDetail() { function notPassSuccess(param) { batchModalRef.value.reload(); reloadList(param, "不通过"); + overTask.value=null } function reloadList(param, text) { @@ -507,6 +517,9 @@ function overTaskHandelr(item: any) { if (validate([item]) == null && batchtwo.value === false) overTasktwo.value = item; } +function closePassno(){ + overTask.value=null +}