From 1e8fe3ad7cc445843f8938ad43811dd0bd5a48d6 Mon Sep 17 00:00:00 2001 From: zhangqun <179111901@qq.com> Date: Wed, 25 Oct 2023 17:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E7=8E=AF=E6=AF=94=E5=8A=A0=E7=A9=BA?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portShipping/waterInternational/form.vue | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pages/portShipping/waterInternational/form.vue b/pages/portShipping/waterInternational/form.vue index 0e1bb1a..2282571 100644 --- a/pages/portShipping/waterInternational/form.vue +++ b/pages/portShipping/waterInternational/form.vue @@ -419,14 +419,17 @@ this.form = res.data; this.form.passengerShipDTOList = this.form.passengerShipVOList; this.form.internationalCruiseDTOList = this.form.internationalCruiseVOList; - // if (checkNotEmpty(this.deptNameList)) { - // let idx = this.deptNameList.findIndex(item => item.deptName == this.form.organizationName); - // this.form.organizationNameIndex = idx > -1 ? idx : ''; - // if(!checkNotEmpty(this.form.organizationName)) { - // this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; - // this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : ''; - // } - // } + if (checkNotEmpty(this.deptNameList)) { + if(!checkNotEmpty(this.form.organizationName)) { + this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; + } + // let idx = this.deptNameList.findIndex(item => item.deptName == this.form.organizationName); + // this.form.organizationNameIndex = idx > -1 ? idx : ''; + // if(!checkNotEmpty(this.form.organizationName)) { + // this.form.organizationName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; + // this.form.organizationNameIndex = this.deptNameList.length > 0 ? 0 : ''; + // } + } this.getDept(); this.queryTime(); //统计时段 this.queryRoute(); @@ -601,8 +604,8 @@ .statDate + '&statPeriod=' + this.form.statPeriod + '&voyage=' + _voyage + '&_t=' + Date.parse( new Date()), {}, 'GET') .then(res => { - let dayData = res.data.minusDays; - let yearData = res.data.minusYears; + let dayData = res.data.minusDays ? res.data.minusDays : {}; + let yearData = res.data.minusYears ? res.data.minusYears : {}; if (type == 1) { //客班轮 // this.form.passengerShipDTOList[index].voyageNumberDod = this.$calcMom(this.form.passengerShipDTOList[index].voyageNumber,dayData.voyageNumber);