From 57b54883101cc4f2cbaf6ee04abe8beea7e5ae15 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 27 Mar 2023 13:38:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=99=84=E4=BB=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/uploadFile/file.vue | 13 ++++++++++++- .../components/beupgradedonline.vue | 2 +- .../components/upgradeRequirements.vue | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/jero-web/src/components/uploadFile/file.vue b/jero-web/src/components/uploadFile/file.vue index 510dc1a4c..601685f03 100644 --- a/jero-web/src/components/uploadFile/file.vue +++ b/jero-web/src/components/uploadFile/file.vue @@ -34,7 +34,7 @@ export default { name: 'file', - props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], + props: ['disableds', 'disabled', 'thisFileUploadUrl','accept', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], data() { return { visible: false, @@ -88,6 +88,16 @@ // let thisFileType = this.thisFileType.replace(/\s+/g, ""); console.log(file) this.fileTypeSatus = true + //根据格式拦截 + if(this.accept){ + let fileNames = file.name.split('.') + let fileType = fileNames[fileNames.length - 1].toLocaleLowerCase() + let extList = this.accept.split(',') + if (!extList.find((item) => item == fileType)) { + this.$message.error(this.$t('uploadOnly') + this.accept + this.$t('type')) + reject(false) + } + } if (this.isMultiple) { if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) { this.$message.warning(this.$t('onlyOnefileUploaded')) @@ -121,6 +131,7 @@ // }else{ // this.fileTypeSatus = false; // } + // } // } this.$message.destroy() }, diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index 5c9c59deb..73ba83733 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -45,7 +45,7 @@ :placeholder="$t('PleaseSelect')" :type="'select'" :triggerChange="false" - :dictCode="record.dictCode" + :dictCode="'driving_automation_level'" v-model="record.jszdhjb"/> diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue index 28189dc21..7563136e2 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue @@ -34,7 +34,7 @@ {{ $t('last') }} {{ $t('next') }} - + From dd28a87d2e087f6a94f328a786b261eb45442296 Mon Sep 17 00:00:00 2001 From: yuekuo Date: Mon, 27 Mar 2023 13:42:37 +0800 Subject: [PATCH 2/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 --- jero-web/src/common/lang/zh-cn.js | 2 +- .../auxiliaryupgradehavechanged.vue | 203 +++++++++--------- .../components/upgradehavechanged.vue | 63 +++--- .../components/basicInformation.vue | 8 +- .../components/recordparameters.vue | 14 +- 5 files changed, 146 insertions(+), 144 deletions(-) diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 6347fbd7e..2d3326621 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1743,7 +1743,7 @@ module.exports = { afterthesoftwareversionupgraded:'软件版本号升级后', beforetheOSversionupgraded:'操作系统版本号升级前', aftertheoperatingsystemversionupgraded:'操作系统版本号升级后', - initialpackageforintegrityinflammatorydata:'初始软件包的完整性炎症数据', + initialpackageforintegrityinflammatorydata:'初始软件包的完整性验证数据', upgradepackageintegrityverificationdata:'升级包完整性验证数据', upgradepackagesize:'升级包大小', differentialupgradeornot:'是否差分升级', diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue index 07f92fd14..22bcac59c 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue @@ -22,41 +22,39 @@ :columns="columns" style="margin-bottom: 20px" > - - - - {{ $t('yes') }} - {{ $t('not') }} - + + - - - - {{ $t('yes') }} - {{ $t('not') }} - + + - - - - - - + - - + + + + + + + + + + + + + + + + + + - {{$t('addcontroller')}} - {{$t('addfunction')}} - {{$t('delete')}} + {{$t('add')}} + {{$t('delete')}}
@@ -86,8 +84,7 @@ export default { return { dataSource: [ { - key:1, - functionname:'ceshi', + } ], loading: false, @@ -98,108 +95,83 @@ export default { align: 'left', dataIndex: 'functionname', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'functionname' }, }, { - title: this.$t('configuration'), + title: this.$t('upgradedestinationype'), align: 'left', - dataIndex: 'configuration', + dataIndex: 'upgradedestinationype', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'upgradedestinationype' }, + }, + { + title: this.$t('adjustmentofchangedBulletinparameters'), + align: 'left', + dataIndex: 'adjustmentofchangedBulletinparameters', + ellipsis: true, + width: 170, + children: [ + { + title: this.$t('preupgrade'), + align: 'left', + dataIndex: 'preupgrade', + ellipsis: true, + width: 170, + scopedSlots: { customRender: 'preupgrade' }, + }, + { + title: this.$t('afterupgrade'), + align: 'left', + dataIndex: 'afterupgrade', + ellipsis: true, + width: 170, + scopedSlots: { customRender: 'afterupgrade' }, + }, + ] }, { - title: this.$t('whetheritcanbeupgraded'), + title: this.$t('functionalchangedescription'), align: 'left', - dataIndex: 'whetheritcanbeupgraded', + dataIndex: 'functionalchangedescription', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'functionalchangedescription' }, }, { - title: this.$t('drivingautomationlevel'), + title: this.$t('variationofapplicableconditions'), align: 'left', - dataIndex: 'drivingautomationlevel', + dataIndex: 'variationofapplicableconditions', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'variationofapplicableconditions' }, }, { - title: this.$t('technicalparameters'), + title: this.$t('upgradetheelectroniccontrollerinvolved'), align: 'left', - dataIndex: 'technicalparameters', + dataIndex: 'upgradetheelectroniccontrollerinvolved', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'upgradetheelectroniccontrollerinvolved' }, }, { title: this.$t('functiondescription'), align: 'left', dataIndex: 'functiondescription', ellipsis: true, - width: 170 + width: 170, + scopedSlots: { customRender: 'functiondescription' }, }, { title: this.$t('applicationconditions'), align: 'left', dataIndex: 'applicationconditions', ellipsis: true, - width: 170 - }, - { - title: this.$t('controllerparameter'), - align: 'left', - dataIndex: 'controllerparameter', - ellipsis: true, width: 170, - children: [ - { - title: this.$t('electronic'), - align: 'left', - dataIndex: 'electronic', - ellipsis: true, - width: 170 - }, - { - title: this.$t('electroniccontrollerproductionenterprises'), - align: 'left', - dataIndex: 'electroniccontrollerproductionenterprises', - ellipsis: true, - width: 170 - }, - { - title: this.$t('electroniccontrollertype'), - align: 'left', - dataIndex: 'electroniccontrollertype', - ellipsis: true, - width: 170 - }, - { - title: this.$t('hardwareversioninformation'), - align: 'left', - dataIndex: 'hardwareversioninformation', - ellipsis: true, - width: 170 - }, - { - title: this.$t('softwaredevelopmententerprise'), - align: 'left', - dataIndex: 'softwaredevelopmententerprise', - ellipsis: true, - width: 170 - }, - { - title: this.$t('operatingsystemversion'), - align: 'left', - dataIndex: 'operatingsystemversion', - ellipsis: true, - width: 170 - }, - { - title: this.$t('inflammatorydata'), - align: 'left', - dataIndex: 'inflammatorydata', - ellipsis: true, - width: 170 - }, - ] + scopedSlots: { customRender: 'applicationconditions' }, }, + { title: this.$t('operation'), align: 'left', @@ -216,6 +188,7 @@ export default { }, mounted() { // this.getList() + this.getData() }, methods: { // 模板下载 @@ -250,12 +223,40 @@ export default { } }) }, + getData(){ + let otaIdT=localStorage.getItem('otaIdT') + if(otaIdT==null){ + otaIdT='' + } + let otaId=localStorage.getItem('otaId') + if(otaId==null){ + otaId='' + } + getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ + this.dataSource =res.result.list == null ? {} : res.result.list + }) + }, + save(){ + postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{ + console.log(res); + this.$message.success(this.$t('SavedSuccessfully')) + }) + }, last(){ + this.save() this.$emit('beupgradedonlineup') }, next(){ + this.save() this.$emit('beupgradedonlinedown') }, + addlineAtBot(){ + let obj={} + this.dataSource.push(obj) + }, + deleteData(record){ + this.dataSource.splice(this.dataSource.indexOf(record),1) + }, uploadSuccess(data) { let attIdList = [] if (data && data.length > 0) { diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue index 8a9ba250d..4193f643a 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue @@ -37,34 +37,28 @@ - + - + - + - + - - - - - - - + - + - + - + @@ -76,7 +70,7 @@ {{$t('uploadattachment')}}
- {{$t('preservation')}} + {{$t('preservation')}} {{$t('last')}} {{$t('next')}}
@@ -194,22 +188,7 @@ export default { width: 170, scopedSlots: { customRender: 'aftertheoperatingsystemversionupgraded' }, }, - { - title: this.$t('softwaredevelopmententerprise'), - align: 'left', - dataIndex: 'softwaredevelopmententerprise', - ellipsis: true, - width: 170, - scopedSlots: { customRender: 'softwaredevelopmententerprise' }, - }, - { - title: this.$t('initialpackageforintegrityinflammatorydata'), - align: 'left', - dataIndex: 'initialpackageforintegrityinflammatorydata', - ellipsis: true, - width: 170, - scopedSlots: { customRender: 'initialpackageforintegrityinflammatorydata' }, - }, + { title: this.$t('upgradepackageintegrityverificationdata'), align: 'left', @@ -252,6 +231,7 @@ export default { }, mounted() { // this.getList() + this.getData() }, methods: { // 模板下载 @@ -298,10 +278,31 @@ export default { } }) }, + getData(){ + let otaIdT=localStorage.getItem('otaIdT') + if(otaIdT==null){ + otaIdT='' + } + let otaId=localStorage.getItem('otaId') + if(otaId==null){ + otaId='' + } + getAction('/ota/otaBaSjSjxtbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ + 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=>{ + console.log(res); + this.$message.success(this.$t('SavedSuccessfully')) + }) + }, last(){ + this.save() this.$emit('upgradedonlineup') }, next(){ + this.save() this.$emit('upgradedonlinedown') }, addlineAtBot(){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index 754c0b314..e1769a475 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -360,10 +360,14 @@ import { message } from 'ant-design-vue' }) }, - async save(){ + save(){ this.$refs.ruleForm.validate(valid=>{ if(valid){ - postAction('/ota/otaBaCxJbxx/add',{ otaId:localStorage.getItem('otaId'),...this.form}).then( res => { + let otaId = localStorage.getItem('otaId') + if(otaId==null || otaId == undefined){ + otaId='' + } + postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => { if(res.code == 200){ localStorage.setItem('otaId', res.result.otaId) this.$message.success(this.$t('SavedSuccessfully')) diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index 0c2bb82ca..1a291a6cf 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -95,7 +95,7 @@
{{$t('fillincontent')}} - + {{ $t('yes') }} {{ $t('not') }} @@ -299,7 +299,7 @@ export default { }, dataSource: [ { - key: 'wlaqyqSl', + key: 'jgldSl', val:'', componentname: this.$t('networksecurityrequirements'), configuration: this.$t('ineffectiveupgrades'), @@ -307,7 +307,7 @@ export default { fillincontent:this.$t('yesisselected'), }, { - key: 'wlaqyqBzwz', + key: 'jgldBzwz', val:'', componentname: this.$t('networksecurityrequirements'), configuration: this.$t('ineffectiveupgrades'), @@ -315,7 +315,7 @@ export default { fillincontent:this.$t('forwardXquantity'), }, { - key: 'wlaqyqGgxh', + key: 'jgldGgxh', val:'', componentname: this.$t('networksecurityrequirements'), configuration: this.$t('ineffectiveupgrades'), @@ -323,7 +323,7 @@ export default { fillincontent:this.$t('yesisselected'), }, { - key: 'wlaqyqScqy', + key: 'jgldScqy', val:'', componentname: this.$t('networksecurityrequirements'), configuration: this.$t('productionenterprise'), @@ -890,10 +890,6 @@ 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 && key !='id'){ - console.log(key); - res.result.bj[key]=Number(res.result.bj[key]) - } if(item.key==key){ item.val=res.result.bj[key] }