From ca191dfc48c5d949a34ac09fbc276afaa7959a55 Mon Sep 17 00:00:00 2001 From: 86156 <823267011@qq.com> Date: Tue, 15 Jul 2025 15:20:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/abnormal.js | 3 -- src/views/work/abnormal_process/index.vue | 41 ++++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/api/system/abnormal.js b/src/api/system/abnormal.js index 34e30a7..e0f01c5 100644 --- a/src/api/system/abnormal.js +++ b/src/api/system/abnormal.js @@ -62,7 +62,6 @@ export function materialAbnormalStart(query) { } -// /work/material/abnormal_start export function stepFinishError(batchId) { return request({ url: '/work/step/finishError/'+batchId, @@ -70,7 +69,6 @@ export function stepFinishError(batchId) { }) } -// /work/material/abnormal_start export function materialNextError(query) { return request({ url: '/work/material/nextError', @@ -79,7 +77,6 @@ export function materialNextError(query) { }) } -// /work/material/abnormal_start export function stepCheckAbnormal(batchId) { return request({ url: '/work/step/check_abnormal/'+batchId, diff --git a/src/views/work/abnormal_process/index.vue b/src/views/work/abnormal_process/index.vue index 5ac1d8d..d0a3b3d 100644 --- a/src/views/work/abnormal_process/index.vue +++ b/src/views/work/abnormal_process/index.vue @@ -509,7 +509,7 @@ export default { nextStep() { let step = this.nowPass if (step && step.state === 0) { - alert('请操作当前道次') + this.$message('请操作当前道次') this.nextStepLoading = false } else { this.nextStepLoading = true @@ -566,7 +566,6 @@ export default { if (res.data !== 0) { materialNextStepFlagError().then(res => { this.submitButton = res.data === 0 - this.getDataList() }) alert('开始轧制') this.getDataList() @@ -658,27 +657,31 @@ export default { let params = { materialId: this.processing.id, delFlag: 1, - batchId: this.processing.batchId + batchId: this.processBatchId } stepProcess(params).then(res => { this.passList = res.data - this.nextStepFlagError = res.data.filter(item => item.operation === 1)[0].state - this.nowPass = this.passList.filter(item => item.operation === 1)[0] - let nowPass = this.nowPass + if (res.data.length()>0){ + this.nextStepFlagError = res.data.filter(item => item.operation === 1)>0?res.data.filter(item => item.operation === 1)[0].state:-1 + this.nowPass = this.passList.filter(item => item.operation === 1)>0?this.passList.filter(item => item.operation === 1)[0]:{} + if (this.nowPass!=={}){ + let nowPass = this.nowPass - let temp = nowPass.step % 8 - const angleMap = { - 0: 315, - 1: 0, - 2: 90, - 3: 45, - 4: 135, - 5: 180, - 6: 270, - 7: 225, - 8: 315, - }; - this.circleStart = angleMap[temp]; + let temp = nowPass.step % 8 + const angleMap = { + 0: 315, + 1: 0, + 2: 90, + 3: 45, + 4: 135, + 5: 180, + 6: 270, + 7: 225, + 8: 315, + }; + this.circleStart = angleMap[temp]; + } + } }) },