From 7eab12e9e434abcbabd71319ebcde0e62686291a Mon Sep 17 00:00:00 2001 From: shidongli Date: Mon, 26 Sep 2022 10:56:07 +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 --- src/views/system/station/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index 94791d4..d3039bb 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -1010,7 +1010,7 @@ export default { }, //点击区县城 clickarea(item) { - // this.value3 = ""; + this.value3 = ""; console.log(item); getSecondaryLevelInfo(item.id).then((res) => { console.log(res); @@ -1020,7 +1020,7 @@ export default { //点击市 clickcity(item) { this.value2 = ""; - // this.value3 = ""; + this.value3 = ""; console.log(item); getSecondaryLevelInfo(item.id).then((res) => { console.log(res); From 0bd0a3a5f183de2f68ed0a2a2dbd0cc310f22cea Mon Sep 17 00:00:00 2001 From: shidongli Date: Mon, 26 Sep 2022 13:22:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A2=AB=E6=8A=A4=E7=90=86=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=20=E7=B4=A7=E6=80=A5=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/patientArchives/index.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/system/patientArchives/index.vue b/src/views/system/patientArchives/index.vue index 9e5d6f5..3e7e90f 100644 --- a/src/views/system/patientArchives/index.vue +++ b/src/views/system/patientArchives/index.vue @@ -243,14 +243,20 @@ export default { } cb(new Error("请输入正确的联系电话")); }; + var checkMobile2 = (rule, value, cb) => { // 验证手机号的正则表达式 const regMobile = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/; - if (regMobile.test(value)) { + if (!value) { //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步 + return cb() + }else{ + if (regMobile.test(value)) { return cb(); + }else{ + cb(new Error("请输入正确的紧急联系电话")); } - cb(new Error("请输入正确的紧急联系电话")); + } }; //验证身份证 @@ -367,7 +373,7 @@ export default { // { required: true, message: "紧急联系人不能为空", trigger: "blur" } // ], urgentContactPhone: [ - { validator: checkMobile2,message: "", trigger: "blur" } + { validator: checkMobile2,trigger: "blur"} ], // homeLongitude: [ // { required: true, message: "居住地址经度不能为空", trigger: "blur" }