Merge branch 'master' of https://gitee.com/hdka/Industry-ui
This commit is contained in:
@@ -62,7 +62,6 @@ export function materialAbnormalStart(query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /work/material/abnormal_start
|
|
||||||
export function stepFinishError(batchId) {
|
export function stepFinishError(batchId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/work/step/finishError/'+batchId,
|
url: '/work/step/finishError/'+batchId,
|
||||||
@@ -70,7 +69,6 @@ export function stepFinishError(batchId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// /work/material/abnormal_start
|
|
||||||
export function materialNextError(query) {
|
export function materialNextError(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/work/material/nextError',
|
url: '/work/material/nextError',
|
||||||
@@ -79,7 +77,6 @@ export function materialNextError(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// /work/material/abnormal_start
|
|
||||||
export function stepCheckAbnormal(batchId) {
|
export function stepCheckAbnormal(batchId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/work/step/check_abnormal/'+batchId,
|
url: '/work/step/check_abnormal/'+batchId,
|
||||||
|
|||||||
@@ -277,7 +277,8 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="finalData"
|
:data="finalData"
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%">
|
style="width: 100%"
|
||||||
|
>
|
||||||
<el-table-column type="index" label="序号"></el-table-column>
|
<el-table-column type="index" label="序号"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="id"
|
prop="id"
|
||||||
@@ -388,7 +389,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {messageData, messageUpdate} from '@/api/system/resource'
|
import { messageData, messageUpdate } from '@/api/system/resource'
|
||||||
import {
|
import {
|
||||||
listMaterial,
|
listMaterial,
|
||||||
materialFinalData,
|
materialFinalData,
|
||||||
@@ -403,7 +404,7 @@ import {
|
|||||||
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
|
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
|
||||||
stepNextError
|
stepNextError
|
||||||
} from '@/api/system/abnormal'
|
} from '@/api/system/abnormal'
|
||||||
import {getFaultMessage, newIP} from '@/api/system/common'
|
import { getFaultMessage, newIP } from '@/api/system/common'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
@@ -442,10 +443,10 @@ export default {
|
|||||||
nextStepFlagError: -1,
|
nextStepFlagError: -1,
|
||||||
messageData: {},
|
messageData: {},
|
||||||
newHTML: true,
|
newHTML: true,
|
||||||
processBatchId:0,
|
processBatchId: 0,
|
||||||
nowPass: {},
|
nowPass: {},
|
||||||
nextStepLoading: false,
|
nextStepLoading: false,
|
||||||
circleStart: 0,
|
circleStart: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -487,7 +488,6 @@ export default {
|
|||||||
}
|
}
|
||||||
} else if (state === 1) {
|
} else if (state === 1) {
|
||||||
let material = this.processing
|
let material = this.processing
|
||||||
let step = this.passList.filter(item => item.operation === 1)[0]
|
|
||||||
step.state = 1
|
step.state = 1
|
||||||
stepUpdate(step).then(res => {
|
stepUpdate(step).then(res => {
|
||||||
materialCheckFlagError(material).then(res => {
|
materialCheckFlagError(material).then(res => {
|
||||||
@@ -508,26 +508,25 @@ export default {
|
|||||||
|
|
||||||
// 下道次
|
// 下道次
|
||||||
nextStep() {
|
nextStep() {
|
||||||
let step = this.passList.filter(item => item.operation === 1)[0]
|
let step = this.nowPass
|
||||||
if (step && step.state === 0) {
|
if (step && step.state === 0) {
|
||||||
alert('请操作当前道次')
|
this.$message('请操作当前道次')
|
||||||
this.nextStepLoading = false
|
this.nextStepLoading = false
|
||||||
} else {
|
} else {
|
||||||
this.nextStepLoading = true
|
this.nextStepLoading = true
|
||||||
stepNextError(step)
|
stepNextError(step).then(res => {
|
||||||
.then(res => {
|
|
||||||
this.nextStepLoading = false
|
this.nextStepLoading = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.$message(error.message)
|
this.$message(error.message)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.nextStepLoading = false
|
this.nextStepLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -538,7 +537,12 @@ export default {
|
|||||||
let material = this.processing
|
let material = this.processing
|
||||||
material.stepFlag = stepFlag
|
material.stepFlag = stepFlag
|
||||||
materialNextError(material).then(res => {
|
materialNextError(material).then(res => {
|
||||||
|
if (res.data === 2) {
|
||||||
|
// 如果返回值为2表示全部发生异常了
|
||||||
|
this.finalFlag = 1
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.finalData = this.dataList
|
||||||
|
}
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
// 表示这是第一次穷尽
|
// 表示这是第一次穷尽
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
@@ -562,13 +566,12 @@ export default {
|
|||||||
startProcess() {
|
startProcess() {
|
||||||
let params = {
|
let params = {
|
||||||
state: 5,
|
state: 5,
|
||||||
batchId:this.processBatchId
|
batchId: this.processBatchId
|
||||||
}
|
}
|
||||||
materialAbnormalStart(params).then(res => {
|
materialAbnormalStart(params).then(res => {
|
||||||
if (res.data !== 0) {
|
if (res.data !== 0) {
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
this.getDataList()
|
|
||||||
})
|
})
|
||||||
alert('开始轧制')
|
alert('开始轧制')
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
@@ -580,19 +583,19 @@ export default {
|
|||||||
|
|
||||||
finishProcess() {
|
finishProcess() {
|
||||||
|
|
||||||
stepCheckAbnormal(this.processBatchId).then(res => {
|
stepCheckAbnormal(this.processBatchId).then(res => {
|
||||||
if (res.data === 0) {
|
if (res.data === 0) {
|
||||||
// get
|
// get
|
||||||
stepFinishError(this.processBatchId).then(res => {
|
stepFinishError(this.processBatchId).then(res => {
|
||||||
alert('该批次轧制完成')
|
alert('该批次轧制完成')
|
||||||
})
|
})
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.passList = []
|
this.passList = []
|
||||||
this.processing = {batchId: -1, id: null}
|
this.processing = { batchId: -1, id: null }
|
||||||
} else {
|
} else {
|
||||||
alert('该批次存在某道次尚未处理')
|
alert('该批次存在某道次尚未处理')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -664,9 +667,10 @@ export default {
|
|||||||
}
|
}
|
||||||
stepProcess(params).then(res => {
|
stepProcess(params).then(res => {
|
||||||
this.passList = res.data
|
this.passList = res.data
|
||||||
this.nextStepFlagError = res.data.filter(item => item.operation === 1)[0].state
|
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)[0]
|
this.nowPass = this.passList.filter(item => item.operation === 1).length > 0 ? this.passList.filter(item => item.operation === 1)[0] : {}
|
||||||
let nowPass = this.nowPass
|
if (this.nowPass !== {}) {
|
||||||
|
let nowPass = this.nowPass
|
||||||
|
|
||||||
let temp = nowPass.step % 8
|
let temp = nowPass.step % 8
|
||||||
const angleMap = {
|
const angleMap = {
|
||||||
@@ -681,6 +685,7 @@ export default {
|
|||||||
8: 45,
|
8: 45,
|
||||||
};
|
};
|
||||||
this.circleStart = angleMap[temp];
|
this.circleStart = angleMap[temp];
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -538,10 +538,6 @@ export default {
|
|||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.finalData = this.dataList
|
this.finalData = this.dataList
|
||||||
}
|
}
|
||||||
if (res.data === 0) {
|
|
||||||
// 返回值等于0 表示没有切换物料
|
|
||||||
|
|
||||||
}
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
materialNextStepFlag().then(res => {
|
materialNextStepFlag().then(res => {
|
||||||
if (res.data === 1) {
|
if (res.data === 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user