From 8e53faad5288b43b61f2fa33a26921d4e8426f29 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Thu, 4 Jun 2026 16:41:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inspection/runTask.js | 67 +++ src/assets/icons/svg/pause.svg | 6 + src/assets/icons/svg/remove.svg | 1 + src/assets/icons/svg/start.svg | 6 + src/assets/icons/svg/stop.svg | 6 + src/views/inspection/runTask/index.vue | 476 ++++++++++++++++++++ src/views/inspection/runTask/task-steps.vue | 75 +++ src/views/inspection/task/index.vue | 3 +- 8 files changed, 639 insertions(+), 1 deletion(-) create mode 100644 src/api/inspection/runTask.js create mode 100644 src/assets/icons/svg/pause.svg create mode 100644 src/assets/icons/svg/remove.svg create mode 100644 src/assets/icons/svg/start.svg create mode 100644 src/assets/icons/svg/stop.svg create mode 100644 src/views/inspection/runTask/index.vue create mode 100644 src/views/inspection/runTask/task-steps.vue diff --git a/src/api/inspection/runTask.js b/src/api/inspection/runTask.js new file mode 100644 index 0000000..5b26ff6 --- /dev/null +++ b/src/api/inspection/runTask.js @@ -0,0 +1,67 @@ +import request from '@/utils/request' + +export function getRunTaskList(params) { + return request({ + url: '/inspection/taskInstance/list', + method: 'get', + params: params + }) +} + +export function getRunTaskDetail(id) { + return request({ + url: `/inspection/taskInstance/${id}`, + method: 'get' + }) +} + +export function addRunTask(data) { + return request({ + url: '/inspection/taskInstance', + method: 'post', + data: data + }) +} + +export function updateRunTask(data) { + return request({ + url: '/inspection/taskInstance', + method: 'put', + data: data + }) +} + +export function deleteRunTask(id) { + return request({ + url: `/inspection/taskInstance/${id}`, + method: 'delete' + }) +} + +export function startRunTask(id) { + return request({ + url: `/inspection/taskInstance/start/${id}`, + method: 'put' + }) +} + +export function stopRunTask(id) { + return request({ + url: `/inspection/taskInstance/stop/${id}`, + method: 'put' + }) +} + +export function pauseRunTask(id) { + return request({ + url: `/inspection/taskInstance/pause/${id}`, + method: 'put' + }) +} + +export function resumeRunTask(id) { + return request({ + url: `/inspection/taskInstance/resume/${id}`, + method: 'put' + }) +} \ No newline at end of file diff --git a/src/assets/icons/svg/pause.svg b/src/assets/icons/svg/pause.svg new file mode 100644 index 0000000..0468653 --- /dev/null +++ b/src/assets/icons/svg/pause.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/remove.svg b/src/assets/icons/svg/remove.svg new file mode 100644 index 0000000..808f25c --- /dev/null +++ b/src/assets/icons/svg/remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/svg/start.svg b/src/assets/icons/svg/start.svg new file mode 100644 index 0000000..6c9ef5b --- /dev/null +++ b/src/assets/icons/svg/start.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/svg/stop.svg b/src/assets/icons/svg/stop.svg new file mode 100644 index 0000000..47f964d --- /dev/null +++ b/src/assets/icons/svg/stop.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/views/inspection/runTask/index.vue b/src/views/inspection/runTask/index.vue new file mode 100644 index 0000000..c64ab82 --- /dev/null +++ b/src/views/inspection/runTask/index.vue @@ -0,0 +1,476 @@ + + + + + 任务队列 + 添加任务 + + + + + {{ task.taskName }} + + + + + + + + 机器人:{{ task.robotName }} + + + + + + + 当前任务 + + 历史记录 + + + + + + + + + 厂区巡检 + ID: 123456 + + 执行中 + + + 机器人:xxxx + IP: 192.168.1.100 + 开始时间: 2026-06-01 10:00:00 + + 执行进度 + + + + 执行日志 + + + 11:02:06 + 移动机器人至点位{{ index + 1 }} + + + + + + + + + + + + + {{ taskStatusMap[scope.row.status] || '未知状态' }} + + + + + + + {{ scope.row.taskType === '1' ? '巡检任务' : '讲解任务' }} + + + + + + + {{ formatDate(scope.row.startTime) }} + + + + + {{ formatDate(scope.row.endTime) }} + + + + + + 日志 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/inspection/runTask/task-steps.vue b/src/views/inspection/runTask/task-steps.vue new file mode 100644 index 0000000..88f7820 --- /dev/null +++ b/src/views/inspection/runTask/task-steps.vue @@ -0,0 +1,75 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/inspection/task/index.vue b/src/views/inspection/task/index.vue index 14b28c4..7238ffa 100644 --- a/src/views/inspection/task/index.vue +++ b/src/views/inspection/task/index.vue @@ -160,8 +160,9 @@ function getList() { tableDataList.value = res.rows; total.value = res.total; loading.value = false; + }).finally(() => { + loading.value = false; }); - } // 取消按钮