From 93b43444b82a159087c972e876b3a1a4d432032c Mon Sep 17 00:00:00 2001 From: yuekuo Date: Sun, 26 Mar 2023 10:40:33 +0800 Subject: [PATCH 1/2] =?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/beupgradedonline.vue | 86 +++++++++---------- .../components/recordparameters.vue | 3 +- .../components/safetyPrecautions.vue | 2 +- 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index 692e6053e..007798e90 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -45,6 +45,7 @@ :placeholder="$t('PleaseSelect')" :type="'select'" :triggerChange="false" + :dictCode="record.dictCode" v-model="record.jszdhjb"/> @@ -124,31 +125,31 @@ import ImportFile from '@/components/ImportFileData/index' }, dataSource: [ { - gnmc:'前向碰撞预警(FCW)' + gnmc:'前向碰撞预警(FCW)', }, { - gnmc:'车道偏离预警(LDW)' + gnmc:'车道偏离预警(LDW)', }, { - gnmc:'百区监测(BSD)' + gnmc:'百区监测(BSD)', }, { - gnmc:'驻员疲劳篮澳CDFM)' + gnmc:'驻员疲劳篮澳CDFM)', }, { - gnmc:'自动紧急制动(AEB)' + gnmc:'自动紧急制动(AEB)', }, { - gnmc:'自适应巡航控制(ACC)' + gnmc:'自适应巡航控制(ACC)', }, { - gnmc:'自适应巡航控制(ACC)' + gnmc:'车道保持辅助(LKA)', }, { - gnmc:'智能泊车辅助(IPA)' + gnmc:'智能泊车辅助(IPA)', }, { - gnmc:'交通拥堵辅助(TJA)' + gnmc:'交通拥堵辅助(TJA)', }, ], loading: false, @@ -341,44 +342,43 @@ import ImportFile from '@/components/ImportFileData/index' } getAction('/ota/otaBaCxKsjjsmccs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{ if(res.code==200){ - if(res.result.length==0){ - this.dataSource=[ - { - gnmc:'前向碰撞预警(FCW)' - }, - { - gnmc:'车道偏离预警(LDW)' - }, - { - gnmc:'百区监测(BSD)' - }, - { - gnmc:'驻员疲劳篮澳CDFM)' - }, - { - gnmc:'自动紧急制动(AEB)' - }, - { - gnmc:'自适应巡航控制(ACC)' - }, - { - gnmc:'自适应巡航控制(ACC)' - }, - { - gnmc:'智能泊车辅助(IPA)' - }, - { - gnmc:'交通拥堵辅助(TJA)' - }, - ] + if(res.result.list.length==0){ + this.dataSource=[ + { + gnmc:'前向碰撞预警(FCW)' + }, + { + gnmc:'车道偏离预警(LDW)' + }, + { + gnmc:'百区监测(BSD)' + }, + { + gnmc:'驻员疲劳篮澳CDFM)' + }, + { + gnmc:'自动紧急制动(AEB)' + }, + { + gnmc:'自适应巡航控制(ACC)' + }, + { + gnmc:'自适应巡航控制(ACC)' + }, + { + gnmc:'智能泊车辅助(IPA)' + }, + { + gnmc:'交通拥堵辅助(TJA)' + }, + ] }else{ - res.result.forEach(item =>{ + res.result.list.forEach(item =>{ item.pzqk =Number(item.pzqk) - }) - res.result.forEach(item =>{ item.sfksj =Number(item.sfksj) + item.jszdhjb=Number(item.jszdhjb)== 0?undefined:Number(item.jszdhjb) }) - this.dataSource=res.result + this.dataSource=res.result.list } } }) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index c8d40b80f..3373a9158 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -887,7 +887,8 @@ export default { this.dataSource.forEach(item=>{ for(let key in res.result.bj){ - if(Number(res.result.bj[key])!=NaN &&Number(res.result.bj[key])!=0){ + if(Number(res.result.bj[key])!=NaN &&Number(res.result.bj[key])!=0 && key !=id){ + console.log(key); res.result.bj[key]=Number(res.result.bj[key]) } if(item.key==key){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue index 6b29fe8a2..a78535453 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue @@ -27,7 +27,7 @@ @change="update" :placeholder="$t('PleaseSelect')" :type="'select'" - :dictCode="record.dictCode" + dictCode="driving_automation_level" :triggerChange="false"/> From a3307e4ac27b18b6d46fd046912f1cb885a143d7 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Sun, 26 Mar 2023 10:55:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ota=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/uploadFileOta/file.vue | 239 ++++++++++++++++++ .../components/basicInformation.vue | 13 +- .../components/beupgradedonline.vue | 26 +- .../vehicleinformation/components/other.vue | 3 + .../components/recordparameters.vue | 3 + .../components/safetyPrecautions.vue | 7 + .../components/upgradeRequirements.vue | 3 + .../components/upgradedonline.vue | 43 +++- .../vehicleregistration/index.vue | 4 +- 9 files changed, 320 insertions(+), 21 deletions(-) create mode 100644 jero-web/src/components/uploadFileOta/file.vue diff --git a/jero-web/src/components/uploadFileOta/file.vue b/jero-web/src/components/uploadFileOta/file.vue new file mode 100644 index 000000000..510dc1a4c --- /dev/null +++ b/jero-web/src/components/uploadFileOta/file.vue @@ -0,0 +1,239 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index c3932b12d..4f78383d2 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -270,6 +270,9 @@ import { message } from 'ant-design-vue' localStorage.setItem('otaIdT',value) this.$forceUpdate() + if(this.$route.query.type == 1){ + return + } this.getData() }, // 模板下载 @@ -296,8 +299,10 @@ import { message } from 'ant-design-vue' }) }, getData(){ + if(this.$route.query.type == 1){ + return + } let otaIdT=localStorage.getItem('otaIdT') - console.log('!!!',otaIdT); if(otaIdT==null){ otaIdT='' } @@ -315,19 +320,19 @@ import { message } from 'ant-design-vue' this.form.cpsb=res.result.cpsb this.form.cpmc=res.result.cpmc this.form.cpxh=res.result.cpxh - this.form.dllx1=res.result.dllx1 - this.form.dllx2=res.result.dllx2 this.form.txzd=res.result.txzd this.form.cdotasj=res.result.cdotasj this.form.cxmb=this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh - console.log(res.result); if(res.result.dllx1 == null ){ res.result.dllx1 = undefined } if(res.result.dllx2 == null){ res.result.dllx2 = undefined } + this.form.dllx1=res.result.dllx1 + this.form.dllx2=res.result.dllx2 // this.changeSelect() + this.$forceUpdate() } }) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index 007798e90..892f99db2 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -119,6 +119,7 @@ import ImportFile from '@/components/ImportFileData/index' return { formInline: {}, uploadName:'', + fileList:'', url: { exportData: '/ota/otaBaCxKsjjsmccs/exportData', importZipUrl: '/ota/otaBaCxKsjjsmccs/importData',//导入 @@ -375,16 +376,20 @@ import ImportFile from '@/components/ImportFileData/index' }else{ res.result.list.forEach(item =>{ item.pzqk =Number(item.pzqk) + }) + res.result.list.forEach(item =>{ item.sfksj =Number(item.sfksj) item.jszdhjb=Number(item.jszdhjb)== 0?undefined:Number(item.jszdhjb) }) this.dataSource=res.result.list + this.fileList = res.result.fj + this.$forceUpdate() } } }) }, save(){ - postAction('/ota/otaBaCxKsjjsmccs/add',{otaId:localStorage.getItem('otaId'),list:this.dataSource}).then(res =>{ + postAction('/ota/otaBaCxKsjjsmccs/add',{otaId:localStorage.getItem('otaId'),list:this.dataSource,fj:this.fileList}).then(res =>{ console.log(res); }) }, @@ -397,16 +402,15 @@ import ImportFile from '@/components/ImportFileData/index' this.$emit('beupgradedonlinedown') }, uploadSuccess(data) { - let attIdList = [] - if (data && data.length > 0) { - data.map(item => { - attIdList.push(item.id || data.name) - }) - } - /** 赋值给当前对应的表单文件 */ - this.formInline[this.uploadName] = attIdList.join(',') - this.formInline = { ...this.formInline } - this.$refs.ruleForm.clearValidate(['fileKey']) + let attIdList = [] + if (data && data.length > 0) { + data.map(item => { + attIdList.push(item.id || data.name) + }) + } + this.$forceUpdate() + // /** 赋值给当前对应的表单文件 */ + this.fileList = attIdList.join(',') }, //中间加 addlineAtMid(record){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue index ec0ca13c0..03c949871 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/other.vue @@ -51,6 +51,9 @@ export default { }, methods: { getData(){ + if(this.$route.query.type == 1){ + return + } let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ otaIdT='' diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index 3373a9158..884ef6542 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -866,6 +866,9 @@ export default { downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {}) }, getData(){ + if(this.$route.query.type == 1){ + return + } let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ otaIdT='' diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue index a78535453..f1ecd09e2 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue @@ -69,6 +69,7 @@ import ImportFile from '@/components/ImportFileData/index' { key: '1', zmcl:'', + info:'', aspect: this.$t('upgradepacketprotectionmeasures'), safetymeasure: this.$t('authenticityandintegrityprotectionmechanism'), relevantverification: 'havemeasures', @@ -78,6 +79,7 @@ import ImportFile from '@/components/ImportFileData/index' { key: '2', zmcl:'', + info:'', aspect: this.$t('otaupgradedsecuritymeasuresforvehicles'), safetymeasure: this.$t('failsafmechanism'), relevantverification: 'havemeasures', @@ -88,6 +90,7 @@ import ImportFile from '@/components/ImportFileData/index' key: '3', aspect: '', zmcl:'', + info:'', safetymeasure: this.$t('vehiclesafetyMeasuresafterUpgradefailure'), relevantverification: 'havemeasures', certifyingmaterials:'', @@ -97,6 +100,7 @@ import ImportFile from '@/components/ImportFileData/index' key: '4', aspect: '', zmcl:'', + info:'', safetymeasure: this.$t('informationsecuritymechanism'), relevantverification: 'havemeasures', certifyingmaterials:'', @@ -186,6 +190,9 @@ import ImportFile from '@/components/ImportFileData/index' downloadFile('ota/otaBaCxAqcs/exportTemplate', '车型及功能备案' + '.zip', {}) }, getData(){ + if(this.$route.query.type == 1){ + return + } let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ otaIdT='' diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue index 335b566a8..35c5f5d6c 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue @@ -205,6 +205,9 @@ export default { downloadFile('ota/otaBaCxZxsjyq/exportTemplate', '车型及功能备案' + '.zip', {}) }, getData(){ + if(this.$route.query.type == 1){ + return + } console.log(localStorage.getItem('otaId')); let otaIdT=localStorage.getItem('otaIdT') if(otaIdT==null){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue index 6b9091fd9..afc3b71c8 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue @@ -83,7 +83,10 @@
- {{$t('uploadattachment')}} + + {{ (fileList === 'null' || fileList === '' || + fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles') + }}

注:附件包括测试项目清单、测试报告.测试标准或技术规范

    支持doc/docx/pdf格式,大小50M以内

@@ -94,18 +97,21 @@ {{$t('next')}}
+