From c6494148b7df6658de0c67c9f35dbeffc9f1ab7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Mon, 26 Sep 2022 13:49:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8A=A4=E7=90=86=E7=AB=99?=
=?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BF=A1=E6=81=AF=E7=9A=84=E6=89=8B=E6=9C=BA?=
=?UTF-8?q?=E5=8F=B7=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/StationDepartment/index.vue | 39 +++++++++++++-------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/views/system/StationDepartment/index.vue b/src/views/system/StationDepartment/index.vue
index 5c1d409..b5e41b5 100644
--- a/src/views/system/StationDepartment/index.vue
+++ b/src/views/system/StationDepartment/index.vue
@@ -8,7 +8,7 @@
v-show="showSearch"
label-width="68px"
>
-
-
{
+ // 验证手机号的正则表达式
+ 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)) {
+ return cb();
+ }
+ cb(new Error("请输入正确的联系电话"));
+ };
return {
nurseStationlist: [],
// 遮罩层
@@ -379,7 +389,7 @@ export default {
// 总条数
total: 0,
total2: 0,
-
+
// 护理站部门信息表格数据
StationDepartmentList: [],
// 弹出层标题
@@ -438,12 +448,13 @@ export default {
},
],
phone: [
- {
- required: true,
- message: "请选择联系电话",
- trigger: "blur",
- },
- ],
+ {
+ required: true,
+ validator: checkMobile,
+ trigger: "blur",
+ message: "",
+ },
+ ],
},
nurseStationId: [
{
@@ -469,14 +480,15 @@ export default {
phone: [
{
required: true,
- message: "请选择联系电话",
+ validator: checkMobile,
trigger: "blur",
+ message: "",
},
],
},
};
},
-
+
created() {
this.getList();
// this.listinfo();
@@ -514,7 +526,7 @@ export default {
nurseinfo() {
this.nurseStationId = row.nurseStationId;
},
-
+
//滑动下拉框
loadMore() {
var a = Math.ceil(this.total2 / 10);
@@ -628,6 +640,7 @@ export default {
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
+ console.log(this.queryParams)
}
});
},
@@ -678,7 +691,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
- .confirm('是否确认删除护理站部门信息编号为"' + ids + '"的数据项?')
+ .confirm('是否确认删除护理站部门信息的数据项?')
.then(function () {
return delStationDepartment(ids);
})