From 387c4e036ea200827271f0a7e7ff362c3e04d541 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Wed, 29 Mar 2023 14:22:50 +0800 Subject: [PATCH] =?UTF-8?q?ota=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + jero-web/src/components/uploadFile/file.vue | 11 ++++++++++- .../components/auxiliaryupgradehavechanged.vue | 2 +- .../components/thetargetvehicleofthisupgrade.vue | 2 +- .../components/upgradeimpactassessment.vue | 2 +- .../components/usernotification.vue | 2 +- .../components/beupgradedonline.vue | 2 +- .../components/safetyPrecautions.vue | 2 +- .../components/upgradeRequirements.vue | 2 +- .../vehicleinformation/components/upgradedonline.vue | 2 +- 11 files changed, 20 insertions(+), 9 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 6307e5a29..4f0c90365 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1739,4 +1739,5 @@ module.exports = { verifyConformanceConfirmation:'Verify conformance confirmation', designConformanceVerification:'Design conformance verification', nomorethan:'No more than 10', + uploadedfilelarger:'The uploaded file is larger than 50 MB', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 52bc1eeed..aaa978cf2 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1841,4 +1841,5 @@ module.exports = { verifyConformanceConfirmation:'验证符合性确认', designConformanceVerification:'设计符合性确认', nomorethan:'不能超过10个', + uploadedfilelarger:'文件大于50M', } \ No newline at end of file diff --git a/jero-web/src/components/uploadFile/file.vue b/jero-web/src/components/uploadFile/file.vue index 457ab1346..747211830 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','acceptcode', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], + props: ['disableds', 'disabled', 'thisFileUploadUrl','size' ,'acceptcode', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'], data() { return { visible: false, @@ -98,6 +98,15 @@ return false } } + // 根据大小拦截 + if(this.size){ + const isLt2KB = file.size / 1024 /1024 < this.size + let name = file.name + if (!isLt2KB) { + this.$message.error(name + this.$t('uploadedfilelarger')) + return false + } + } if (this.isMultiple) { if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) { this.$message.warning(this.$t('onlyOnefileUploaded')) diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue index 68c4443a4..a3b7a1546 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue @@ -68,7 +68,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 2215482c4..67b396f2d 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -83,7 +83,7 @@ }}

{{$t('noteone')}}

- + diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue index 5e791007d..e7ec6ed0c 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue @@ -162,7 +162,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue index 10413d2a0..79f27f620 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue @@ -182,7 +182,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index df3be5491..57d84655e 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -103,7 +103,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue index 1c3e59dde..54953b5d8 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue @@ -47,7 +47,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue index 779877220..70cdeba6a 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') }} - + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue index b364d98c4..53849ae28 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue @@ -99,7 +99,7 @@ {{$t('next')}} - +