From 13fde54d34a51ec3ad6b2ee6543a238f1da87323 Mon Sep 17 00:00:00 2001 From: "Mr.sun" <2290907227@qq.com> Date: Thu, 7 Mar 2024 17:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=BA=E9=94=99=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/AvgCarry/index.vue | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pages/AvgCarry/index.vue b/pages/AvgCarry/index.vue index 357c762..d233b09 100644 --- a/pages/AvgCarry/index.vue +++ b/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)