From 3e5a8807749b9448b6d32fef9bcb1275d5cb3778 Mon Sep 17 00:00:00 2001 From: wanglei Date: Sat, 6 Jul 2024 15:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=8E=A5=E6=94=B6=E4=BB=BB=E5=8A=A1=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dangan-ui/src/views/dangan/task/index.vue | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/dangan-ui/src/views/dangan/task/index.vue b/dangan-ui/src/views/dangan/task/index.vue index 01e90a9..578c87c 100644 --- a/dangan-ui/src/views/dangan/task/index.vue +++ b/dangan-ui/src/views/dangan/task/index.vue @@ -154,7 +154,7 @@ export default { name: "Task", - dicts: ['task_status', 'yw_type'], + dicts: ['task_status', 'yw_type', 'total_task'], data() { return { // 遮罩层 @@ -268,8 +268,27 @@ this.open = true; this.title = "任务详情"; }, - onReRecongnize(row){ + async onReRecongnize(row){ + let total_task = this.dict.type.total_task; + let total1 = await listTask({status: '1'}).then(response => { + return response.total; + }); + + if(total1 > total_task[0].value || total1 == total_task[0].value){ + this.$alert(`同时接收任务最大数【${total_task[0].value}】,请稍后再试!`, `提示`, { + type: 'warning' + }); + return; + } + + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); reRecongnize({taskId: row.id}).then(response => { + loading.close(); this.$modal.msgSuccess(response.msg); this.getList() })