变更
This commit is contained in:
@@ -277,7 +277,8 @@
|
||||
<el-table
|
||||
:data="finalData"
|
||||
stripe
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
@@ -388,7 +389,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {messageData, messageUpdate} from '@/api/system/resource'
|
||||
import { messageData, messageUpdate } from '@/api/system/resource'
|
||||
import {
|
||||
listMaterial,
|
||||
materialFinalData,
|
||||
@@ -403,7 +404,7 @@ import {
|
||||
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
|
||||
stepNextError
|
||||
} from '@/api/system/abnormal'
|
||||
import {getFaultMessage, newIP} from '@/api/system/common'
|
||||
import { getFaultMessage, newIP } from '@/api/system/common'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
@@ -442,10 +443,10 @@ export default {
|
||||
nextStepFlagError: -1,
|
||||
messageData: {},
|
||||
newHTML: true,
|
||||
processBatchId:0,
|
||||
processBatchId: 0,
|
||||
nowPass: {},
|
||||
nextStepLoading: false,
|
||||
circleStart: 0,
|
||||
circleStart: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -520,12 +521,12 @@ export default {
|
||||
this.submitButton = res.data === 0
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message(error.message)
|
||||
})
|
||||
.finally(() => {
|
||||
this.nextStepLoading = false
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message(error.message)
|
||||
})
|
||||
.finally(() => {
|
||||
this.nextStepLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -536,7 +537,12 @@ export default {
|
||||
let material = this.processing
|
||||
material.stepFlag = stepFlag
|
||||
materialNextError(material).then(res => {
|
||||
|
||||
if (res.data === 2) {
|
||||
// 如果返回值为2表示全部发生异常了
|
||||
this.finalFlag = 1
|
||||
this.dialogVisible = true
|
||||
this.finalData = this.dataList
|
||||
}
|
||||
this.getDataList()
|
||||
// 表示这是第一次穷尽
|
||||
materialNextStepFlagError().then(res => {
|
||||
@@ -560,7 +566,7 @@ export default {
|
||||
startProcess() {
|
||||
let params = {
|
||||
state: 5,
|
||||
batchId:this.processBatchId
|
||||
batchId: this.processBatchId
|
||||
}
|
||||
materialAbnormalStart(params).then(res => {
|
||||
if (res.data !== 0) {
|
||||
@@ -577,19 +583,19 @@ export default {
|
||||
|
||||
finishProcess() {
|
||||
|
||||
stepCheckAbnormal(this.processBatchId).then(res => {
|
||||
if (res.data === 0) {
|
||||
// get
|
||||
stepFinishError(this.processBatchId).then(res => {
|
||||
alert('该批次轧制完成')
|
||||
})
|
||||
this.dataList = []
|
||||
this.passList = []
|
||||
this.processing = {batchId: -1, id: null}
|
||||
} else {
|
||||
alert('该批次存在某道次尚未处理')
|
||||
}
|
||||
})
|
||||
stepCheckAbnormal(this.processBatchId).then(res => {
|
||||
if (res.data === 0) {
|
||||
// get
|
||||
stepFinishError(this.processBatchId).then(res => {
|
||||
alert('该批次轧制完成')
|
||||
})
|
||||
this.dataList = []
|
||||
this.passList = []
|
||||
this.processing = { batchId: -1, id: null }
|
||||
} else {
|
||||
alert('该批次存在某道次尚未处理')
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
@@ -659,29 +665,26 @@ export default {
|
||||
delFlag: 1,
|
||||
batchId: this.processing.batchId
|
||||
}
|
||||
console.log(params)
|
||||
stepProcess(params).then(res => {
|
||||
this.passList = res.data
|
||||
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
|
||||
this.nextStepFlagError = res.data.filter(item => item.operation === 1).length > 0 ? res.data.filter(item => item.operation === 1)[0].state : -1
|
||||
this.nowPass = this.passList.filter(item => item.operation === 1).length > 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]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -538,10 +538,6 @@ export default {
|
||||
this.dialogVisible = true
|
||||
this.finalData = this.dataList
|
||||
}
|
||||
if (res.data === 0) {
|
||||
// 返回值等于0 表示没有切换物料
|
||||
|
||||
}
|
||||
this.getDataList()
|
||||
materialNextStepFlag().then(res => {
|
||||
if (res.data === 1) {
|
||||
|
||||
Reference in New Issue
Block a user