This commit is contained in:
熊成强 2020-11-06 11:45:42 +08:00
parent 5ba79cef6f
commit dcd1b4e312

View File

@ -187,10 +187,8 @@ export default {
let res = await apiResultGetDetail({ id }) let res = await apiResultGetDetail({ id })
if (res.code !== 200) return if (res.code !== 200) return
this.obj = res.data this.obj = res.data
console.log('res: ', res)
}, },
handleRight (item) { handleRight (item) {
console.log('item: ', item)
this.form.item = item this.form.item = item
this.right.showRight = true this.right.showRight = true
}, },
@ -203,38 +201,12 @@ export default {
async handleList () { async handleList () {
let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id }) let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
if (res.code !== 200) return if (res.code !== 200) return
console.log('res.data.flowRecordList: ', res.data.flowRecordList)
const arr = res.data.flowRecordList.concat([]) const arr = res.data.flowRecordList.concat([])
for (let i in res.data.flowRecordList) { for (let i in res.data.flowRecordList) {
arr.shift() arr.shift()
res.data.flowRecordList[i][arr.some(j => j.status === 1) ? 'isGou' : 'isActive'] = true res.data.flowRecordList[i][arr.some(j => j.status === 1) ? 'isGou' : 'isActive'] = true
if (!arr.some(j => j.status === 1)) break if (!arr.some(j => j.status === 1)) break
// if (res.data.flowRecordList[i].status === 1) {
// res.data.flowRecordList[i].isGou = true
// arr.shift()
// } else {
// if (!arr.some(j => j.status === 1)) {
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isActive = true
// break
// } else {
// res.data.flowRecordList[ i ].isGou = true
// arr.shift()
// debugger
// }
// }
} }
// for (let i in res.data.flowRecordList) {
// if (res.data.flowRecordList[i].status === 4 && res.data.flowRecordList[Number(i) + 1].status === 0) {
// console.log('i: ', i)
// debugger
// break
// }
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isGou = true
// if (res.data.flowRecordList[i].status === 0) {
// res.data.flowRecordList[i === '0' ? i : (Number(i) - 1)].isActive = true
// break
// }
// }
this.formList = res.data this.formList = res.data
} }
}, },