From a7ee02e97aee5a5335ed4093f70e42b4a8622e23 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Sat, 25 Mar 2023 16:22:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/basicInformation.vue | 40 ++++++++++------ .../components/beupgradedonline.vue | 12 ++--- .../vehicleinformation/components/other.vue | 9 ++-- .../components/recordparameters.vue | 10 ++-- .../components/safetyPrecautions.vue | 19 +++++--- .../components/upgradeRequirements.vue | 25 ++++++---- .../components/upgradedonline.vue | 12 ++--- .../vehicleinformation/index.vue | 46 +++++++++---------- .../vehicleregistration/index.vue | 1 + jero-web/vue.config.js | 2 +- 10 files changed, 96 insertions(+), 80 deletions(-) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index 07eb0ce76..f5281255b 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -226,7 +226,7 @@ name: 'basicInformation', components:{ }, - props:['otaId'], + // props:['otaId'], data() { return { confirmLoading: false, @@ -261,30 +261,42 @@ }) }, getData(){ - // if(this.otaId && this.otaId !=''){ - console.log('otaId',this.otaId); - getAction('/ota/otaBaCxJbxx/queryByOtaId',this.otaId).then(res=>{ + + if(localStorage.getItem('otaId') == null){ + return + }else{ + getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{ if(res.code == 200){ - + this.form=res.result + if(res.result.dllx1 == null ){ + res.result.dllx1 = undefined + } + if(res.result.dllx2 == null){ + res.result.dllx2 = undefined + } + this.changeSelect() } }) - // } + } + }, next(){ - this.save() - this.$emit('basicInformationForm',this.otaId) + this.save() + setTimeout(()=>{ + this.$emit('basicInformationForm') + },300) + }, - save(){ - - postAction('/ota/otaBaCxJbxx/add',{otaId:this.otaId,...this.form}).then( res => { - if(res.code == 200){ - this.otaId = res.result.otaId + async save(){ + postAction('/ota/otaBaCxJbxx/add',{otaId:localStorage.getItem('otaId'),...this.form}).then( res => { + if(res.code == 200){ + localStorage.setItem('otaId', res.result.otaId) } }) }, changeSelect(target){ - this.form.Vehicledynamictype2=undefined + this.form.dllx2=undefined if(target =='传统动力汽车'){ this. projectNameList2=['汽油','柴油'] }else if (target =='节能汽车'){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index 7bf389f5b..c5e684fe1 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -111,7 +111,6 @@ components:{ uploadFile }, - props:['otaId'], data() { return { dataSource: [ @@ -311,25 +310,22 @@ }) }, getData(){ - if(this.otaId && this.otaId !=''){ - getAction('/ota/otaBaCxKsjjsmccs/queryByOtaId',this.otaId).then(res=>{ + getAction('/ota/otaBaCxKsjjsmccs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{ console.log(res); }) - } - }, save(){ - postAction('/ota/otaBaCxKsjjsmccs/add',{otaId:this.otaId,list:this.dataSource}).then(res =>{ + postAction('/ota/otaBaCxKsjjsmccs/add',{otaId:localStorage.getItem('otaId'),list:this.dataSource}).then(res =>{ console.log(res); }) }, last(){ this.save() - this.$emit('beupgradedonlineup',this.otaId) + this.$emit('beupgradedonlineup') }, next(){ this.save() - this.$emit('beupgradedonlinedown',this.otaId) + this.$emit('beupgradedonlinedown') }, uploadSuccess(data) { let attIdList = [] diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue index 144fc1b33..cb53b8e76 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue @@ -51,8 +51,7 @@ export default { }, methods: { getData(){ - if(this.otaId && this.otaId !=''){ - getAction('/ota/otaBaCxQt/queryByOtaId',this.otaId).then(res=>{ + getAction('/ota/otaBaCxQt/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{ console.log(res); }) } @@ -61,7 +60,7 @@ export default { save(){ this.$refs.ruleForm.validate( valid =>{ if (valid) { - postAction('/ota/otaBaCxQt/add',{otaId:this.otaId,...this.queryParam}).then(res=>{ + postAction('/ota/otaBaCxQt/add',{otaId:localStorage.getItem('otaId'),...this.queryParam}).then(res=>{ console.log(res); }) } else { @@ -71,13 +70,13 @@ export default { }, last(){ this.save() - this.$emit('otherup',this.queryParam) + this.$emit('otherup') }, submit(){ this.save() }, } -} +