From 3191bdd3ecfd1497cb64b0e32b880c98be9bd4aa Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Fri, 23 Feb 2024 17:02:55 +0800 Subject: [PATCH] =?UTF-8?q?Bug:=E3=80=90ID1000469=E3=80=91=E4=BB=AA?= =?UTF-8?q?=E5=99=A8=E7=AE=A1=E7=90=86-=E5=BA=8F=E5=88=97=E5=8F=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E5=8F=B7=E4=B8=BA=E4=B8=AD=E6=96=87=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=88=90=E5=8A=9F=EF=BC=8C=E8=B6=85=E8=BF=87=E4=B8=89=E5=8D=81?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E7=AC=A6=EF=BC=8C=E6=8F=90=E7=A4=BA=EF=BC=9A?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=BC=82=E5=B8=B8=EF=BC=8C=E8=AF=B7=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flossom-ui/src/views/system/instrumentSerial/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flossom-ui/src/views/system/instrumentSerial/index.vue b/flossom-ui/src/views/system/instrumentSerial/index.vue index 8781f9d..f40e052 100644 --- a/flossom-ui/src/views/system/instrumentSerial/index.vue +++ b/flossom-ui/src/views/system/instrumentSerial/index.vue @@ -86,7 +86,6 @@ >确认 - - + @@ -564,6 +563,12 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { + var pattern = /^[a-zA-Z0-9\s]+$/; + if (!pattern.test(this.form.serial) || this.form.serial.trim().length === 0 + || this.form.serial.trim().length > 30) { + this.$modal.msgError("请输入正确的序列号"); + return; + } if (this.form.id != null) { updateSerial(this.form).then(response => { this.$modal.msgSuccess("修改成功");