From 4b935fb42e6a15c18dbd9ece97e3f52fcd8ae7c0 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Tue, 28 Mar 2023 17:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/auxiliaryupgradehavechanged.vue | 18 +++++++++++++++--- .../informationaboutotherupgradetasks.vue | 2 +- .../thetargetvehicleofthisupgrade.vue | 2 +- .../components/upgradehavechanged.vue | 16 ++++++++++++++-- .../components/upgradetargetmodel.vue | 17 ++++++++++++++++- .../components/usernotification.vue | 8 ++++++-- 6 files changed, 53 insertions(+), 10 deletions(-) diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue index 874f7835b..7ba9967a4 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue @@ -64,7 +64,7 @@
- {{$t('preservation')}} + {{$t('preservation')}} {{$t('last')}} {{$t('next')}}
@@ -219,12 +219,24 @@ export default { otaId='' } getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ - this.dataSource =res.result.list == null ? {} : res.result.list + this.dataSource =res.result.list == null ? [{}] : res.result.list this.fileList = res.result.fj }) }, save(){ - postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{ + let objIsEmpty= ()=>{ + for (let key in this.dataSource[0]){ + return false + } + return true + } + let list=[] + if(this.dataSource.length==1 && objIsEmpty()){ + list=null + }else{ + list=this.dataSource + } + postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:list,fj:this.fileList}).then(res=>{ if(res.code==200){ this.$message.success(this.$t('SavedSuccessfully')) this.getData() diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/informationaboutotherupgradetasks.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/informationaboutotherupgradetasks.vue index e6ed49fe3..6a2a843c1 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/informationaboutotherupgradetasks.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/informationaboutotherupgradetasks.vue @@ -97,7 +97,7 @@ export default { if(otaId==null){ otaId='' } - getAction('/ota/otaBaSjQtsjxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}),then(res=>{ + getAction('/ota/otaBaSjQtsjxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ if(res.code == 200){ this.queryParam= res.result ==null ? {} :res.result } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 0b3f3fd80..2215482c4 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -24,7 +24,7 @@ v-model="formInline.zsl" :title='formInline.zsl' :max-length="50" - :placeholder="$t('PleaseSelect')"> + :placeholder="$t('pleaseEnter')"> diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue index 9f4830c36..7359cc864 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue @@ -285,11 +285,23 @@ export default { otaId='' } getAction('/ota/otaBaSjSjxtbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ - this.dataSource =res.result.list == null ? {} : res.result.list + this.dataSource =res.result.list == null ? [{}] : res.result.list }) }, save(){ - postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{ + let objIsEmpty= ()=>{ + for (let key in this.dataSource[0]){ + return false + } + return true + } + let list=[] + if(this.dataSource.length==1 && objIsEmpty()){ + list=null + }else{ + list=this.dataSource + } + postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list: list }).then(res=>{ if(res.code==200){ this.$message.success(this.$t('SavedSuccessfully')) this.getData() diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index fa99ca385..80899ab2f 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -198,13 +198,28 @@ import ImportFile from '@/components/ImportFileData/index' getAction('/ota/otaBaSjSjmbcx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ if(res.code == 200){ if(res.result==null){ - this.form=res.result + this.form={} this.form.cxmb=undefined this.form.bapc=undefined this.form.dllx1=undefined this.form.dllx2=undefined + this.form.qymc='安徽江淮汽车集团股份有限公司' }else{ this.form=res.result + if(res.result.dllx1==null){ + this.form.dllx1=undefined + + } + if(res.result.dllx2==null){ + this.form.dllx2=undefined + } + if(res.result.cxmb==null){ + this.form.cxmb=undefined + } + if(res.result.bapc==null){ + this.form.bapc=undefined + } + this.$forceUpdate() } } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue index 3295454ca..d4f042877 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue @@ -178,7 +178,7 @@
- {{$t('preservation')}} + {{$t('preservation')}} {{$t('last')}} {{$t('next')}}
@@ -243,6 +243,7 @@ export default { }) }, getData(){ + let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ otaIdT='' @@ -251,9 +252,12 @@ export default { if(otaId==null){ otaId='' } - getAction('/ota/otaBaSjGgnrfs/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}),then(res=>{ + getAction('/ota/otaBaSjGgnrfs/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ if(res.code == 200){ + this.formInline= res.result ==null ? {} :res.result + this.formInline.id=res.result.id + this.$forceUpdate() } }) },