From 9ba0400b57f7a41abfa4d628791e7b577be79a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Wed, 6 Aug 2025 18:20:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=BA=E5=88=B6=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/process.js | 9 +++++++++ src/views/work/abnormal_process/index.vue | 21 +++++++++++++++++++-- src/views/work/process/index.vue | 18 +++++++++++++++++- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/api/system/process.js b/src/api/system/process.js index 015cfca..8c4209e 100644 --- a/src/api/system/process.js +++ b/src/api/system/process.js @@ -121,3 +121,12 @@ export function materialFinalData(data) { data: data }) } + +// 复位 +export function materialReset(query) { + return request({ + url: '/work/step/updateNextState', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/work/abnormal_process/index.vue b/src/views/work/abnormal_process/index.vue index b69d127..8ff367f 100644 --- a/src/views/work/abnormal_process/index.vue +++ b/src/views/work/abnormal_process/index.vue @@ -134,7 +134,10 @@
- + + 强制停止 + 确认 @@ -396,7 +399,8 @@ import { materialUpdate, stepPLC, stepProcess, stepSubmit, - stepUpdate + stepUpdate, + materialReset } from '@/api/system/process' import { materialAbnormalStart, @@ -461,6 +465,19 @@ export default { }) }, + reset() { + this.submitButton = false + materialReset().then(res => { + if (res.data == true) { + this.$message('强制停止成功') + this.submitButton = true + this.getDataList() + } else { + this.$message('强制停止失败,请联系管理员') + } + }) + }, + submit(state) { // 获取正在运行的对象 this.submitButton = false diff --git a/src/views/work/process/index.vue b/src/views/work/process/index.vue index 7b08025..972a73d 100644 --- a/src/views/work/process/index.vue +++ b/src/views/work/process/index.vue @@ -134,6 +134,10 @@
+ + 强制停止 + 确认 @@ -396,7 +400,8 @@ import { materialUpdate, stepCheck, stepFinish, stepNext, stepPLC, stepProcess, stepSubmit, - stepUpdate + stepUpdate, + materialReset } from '@/api/system/process' import {getFaultMessage, newIP} from '@/api/system/common' @@ -457,6 +462,17 @@ export default { }) }, + reset() { + materialReset().then(res => { + if (res.data == true) { + this.$message('强制停止成功') + this.getDataList() + } else { + this.$message('强制停止失败,请联系管理员') + } + }) + }, + submit(state) { this.submitButton = false // 获取正在运行的对象