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 // 获取正在运行的对象