This commit is contained in:
2023-10-13 13:53:24 +08:00
parent 7ce0415eb7
commit 12c3ad0b11
2 changed files with 42 additions and 56 deletions

View File

@@ -63,25 +63,18 @@
methods: { methods: {
async _tasks () { async _tasks () {
let res = await tasks(this.keyword, this.startPoint, this.endPoint) let res = await tasks(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') { res.result.map(el => {
res.result.map(el => { if(el.inst_status === '0') {
if(el.inst_status === '0') { this.$set(el, 'inst_status_name', '就绪')
this.$set(el, 'inst_status_name', '就绪') }
} if(el.inst_status === '1') {
if(el.inst_status === '1') { this.$set(el, 'inst_status_name', '执行中')
this.$set(el, 'inst_status_name', '执行中') }
} if(el.inst_status === '2') {
if(el.inst_status === '2') { this.$set(el, 'inst_status_name', '完成')
this.$set(el, 'inst_status_name', '完成') }
} })
}) this.dataList = [...res.result]
this.dataList = [...res.result]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
}, },
async _taskoperation (type) { async _taskoperation (type) {
try { try {

View File

@@ -70,43 +70,36 @@
methods: { methods: {
async _insts () { async _insts () {
let res = await insts(this.keyword, this.startPoint, this.endPoint) let res = await insts(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') { res.result.map(el => {
res.result.map(el => { if(el.inst_status === '0') {
if(el.inst_status === '0') { this.$set(el, 'inst_status_name', '就绪')
this.$set(el, 'inst_status_name', '就绪') }
} if(el.inst_status === '1') {
if(el.inst_status === '1') { this.$set(el, 'inst_status_name', '执行中')
this.$set(el, 'inst_status_name', '执行中') }
} if(el.inst_status === '2') {
if(el.inst_status === '2') { this.$set(el, 'inst_status_name', '完成')
this.$set(el, 'inst_status_name', '完成') }
} if(el.inst_status === '3') {
if(el.inst_status === '3') { this.$set(el, 'inst_status_name', '取消')
this.$set(el, 'inst_status_name', '取消') }
} if(el.inst_status === '4') {
if(el.inst_status === '4') { this.$set(el, 'inst_status_name', '异常')
this.$set(el, 'inst_status_name', '异常') }
} if(el.inst_step === '1') {
if(el.inst_step === '1') { this.$set(el, 'inst_step_name', '请求取货')
this.$set(el, 'inst_step_name', '请求取货') }
} if(el.inst_step === '2') {
if(el.inst_step === '2') { this.$set(el, 'inst_step_name', '取货完成')
this.$set(el, 'inst_step_name', '取货完成') }
} if(el.inst_step === '3') {
if(el.inst_step === '3') { this.$set(el, 'inst_step_name', '请求放货')
this.$set(el, 'inst_step_name', '请求放货') }
} if(el.inst_step === '4') {
if(el.inst_step === '4') { this.$set(el, 'inst_step_name', '放货完成')
this.$set(el, 'inst_step_name', '放货完成') }
} })
}) this.dataList = [...res.result]
this.dataList = [...res.result]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
}, },
async _inst (type) { async _inst (type) {
try { try {