From 13616b332dbf36cde13a20a52574a3fddc6c0d17 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Wed, 26 Jul 2023 16:46:01 +0800 Subject: [PATCH] bug --- src/components/Task.vue | 18 ++++++++++++++---- src/pages/index.vue | 50 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/src/components/Task.vue b/src/components/Task.vue index 6d675f8..35e7c8a 100644 --- a/src/components/Task.vue +++ b/src/components/Task.vue @@ -233,7 +233,7 @@ export default { } else if (row.status == 2) { if (this.role == 'ROLE_ADMIN') { return ( -
+
任务暂停
) @@ -348,14 +348,20 @@ export default { this.showPathDialog(row.id)} > 自定义路径规划 this.viewDetail( @@ -617,7 +623,7 @@ export default { diff --git a/src/pages/index.vue b/src/pages/index.vue index 87c13e8..d064d21 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -201,6 +201,8 @@ :class=" taskStore.currentTaskId == null || checkStore.manualCheck ? 'auto_btn cant_btn' + : taskStore.checkStatus + ? 'auto_btn stop_btn' : 'auto_btn' " @click="startAutoCheck" @@ -308,7 +310,14 @@

-
+

{{ imageStore.nuclearCoreName }}

当前历史记录

@@ -498,13 +507,18 @@ const preBtn = async () => { } const checkNumber = checkStore.checkNumber const currentTaskId = taskStore.currentTaskId - const res = await getNextCoordApi(checkNumber, currentTaskId, '0') - if (res?.code == 200) { - if (!res?.data?.result) { - MessagePlugin('error', { content: '已到达检测边缘' }) - return + if (checkNumber) { + const res = await getNextCoordApi(checkNumber, currentTaskId, '0') + if (res?.code == 200) { + if (!res?.data?.result) { + MessagePlugin('error', { content: '已到达检测边缘' }) + return + } + checkStore.updateCheckNumber(res?.data?.result) } - checkStore.updateCheckNumber(res?.data?.result) + } else { + // 请保证当前正在核查的坐标不为空 + MessagePlugin('error', { content: '请保证当前正在核查的坐标不为空' }) } } @@ -514,13 +528,17 @@ const nextBtn = async () => { } const checkNumber = checkStore.checkNumber const currentTaskId = taskStore.currentTaskId - const res = await getNextCoordApi(checkNumber, currentTaskId, '1') - if (res?.code == 200) { - if (!res?.data?.result) { - MessagePlugin('error', { content: '已到达检测边缘' }) - return + if (checkNumber) { + const res = await getNextCoordApi(checkNumber, currentTaskId, '1') + if (res?.code == 200) { + if (!res?.data?.result) { + MessagePlugin('error', { content: '已到达检测边缘' }) + return + } + checkStore.updateCheckNumber(res?.data?.result) } - checkStore.updateCheckNumber(res?.data?.result) + } else { + MessagePlugin('error', { content: '请保证当前正在核查的坐标不为空' }) } } @@ -792,6 +810,9 @@ initWebSocket() border-radius: 6px; } } + .stop_btn { + background: #0743fc; + } .cant_btn { background: #e8e8e8; .icon_box { @@ -896,6 +917,9 @@ initWebSocket() margin-top: 6px; } } + .cant_history { + background: #ebebeb; + } } .bottom_detail_card { width: 100%;