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() })