From adb0dc355df80dd51371263b1c890ad3fd9e8598 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 09:00:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=202027=20=E6=96=B0=E8=B4=AD=E6=9C=BA?= =?UTF-8?q?=E5=85=B7=E9=AA=8C=E6=94=B6=E6=97=B6=EF=BC=8C=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=9A=84=E9=AA=8C=E6=94=B6=E5=9B=BE=E7=89=87=E8=BE=83=E5=A4=A7?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=AB=8B=E5=8D=B3=E7=82=B9=E5=87=BB=E7=A1=AE?= =?UTF-8?q?=E5=AE=9A=E6=8C=89=E9=92=AE=E4=BC=9A=E6=8F=90=E7=A4=BA=E2=80=9C?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E5=9B=BE=E7=89=87=E4=B8=8D=E8=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E2=80=9D=EF=BC=8C=E7=A8=8D=E7=AD=89=E7=89=87=E5=88=BB?= =?UTF-8?q?=E5=90=8E=E4=BC=9A=E6=8F=90=E7=A4=BA=E6=8E=A5=E5=8F=A3=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsAcceptance/component/queryTools.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/queryTools.vue b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/queryTools.vue index d445bd4f..f303e506 100644 --- a/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/queryTools.vue +++ b/sgzb-ui/src/views/warehouseManage/newPurchase/toolsAcceptance/component/queryTools.vue @@ -257,6 +257,7 @@ :class="{ disabled: uploadDisabled }" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" + :before-upload="beforeUpload" > @@ -300,6 +301,7 @@ :on-preview="handlePictureCardPreview" :class="{ disabled: uploadDisabled }" :on-remove="handleRemove" + :before-upload="beforeUpload" > @@ -1020,6 +1022,14 @@ export default { this.$store.dispatch('dict/cleanDict') }) }, + // 图片上传前校验 限制图片大小 + beforeUpload(file) { + const isLt5M = file.size / 1024 / 1024 < 5 + if (!isLt5M) { + this.$message.error('上传图片大小不能超过 5MB!') + } + return isLt5M + }, }, } From 4db4ef2c65da249d7c5a914ebb275e2271819816 Mon Sep 17 00:00:00 2001 From: csyue <1203338439@qq.com> Date: Wed, 12 Jun 2024 09:03:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=B4=E4=BF=AE?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/base/MaintenanceGangMapper.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaintenanceGangMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaintenanceGangMapper.xml index 77efc6d4..06cb994b 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaintenanceGangMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaintenanceGangMapper.xml @@ -45,10 +45,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"