增加出错过滤

master
Mr.sun 2 years ago
parent 5a14078737
commit 13fde54d34
  1. 32
      pages/AvgCarry/index.vue

@ -82,17 +82,37 @@
// pageSize: 10
// }
// this.getDataList()
this.$u.api.AvgCarry.queryBillingDByContainerCode({containerCode:this.dataForm.containerCode}).then(res=>{
// console.log(res);
this.endValue = res.data[0].targetPoint
this.beginValue= res.data[1].startPoint
// res.data=[{
// "targetPoint":"0460"
// }]
// this.endValue = res.data[0].targetPoint
// this.beginValue= res.data[1].startPoint
// this.pointList.forEach(item=>{
// if(res.data[0].targetPoint == item.value){
// this.end = item.label
// }
// if(res.data[1].startPoint == item.value){
// this.begin = item.label
// }
// })
this.endValue = res.data[0]?res.data[0].targetPoint:''
this.beginValue= res.data[1]?res.data[1].startPoint :''
this.pointList.forEach(item=>{
if(res.data[0].targetPoint == item.value){
this.end = item.label
if(res.data[0]){
if(res.data[0].targetPoint == item.value){
this.end = item.label
}
}
if(res.data[1].startPoint == item.value){
this.begin = item.label
if(res.data[1]){
if(res.data[1].startPoint == item.value){
this.begin = item.label
}
}
})
// this.end = res.data
this.pointList1 = this.pointList.filter(item=>item.value != this.beginValue&& item.value != this.endValue)

Loading…
Cancel
Save