更改护理站部门信息的手机号校验

This commit is contained in:
闫晓茹 2022-09-26 13:49:38 +08:00
parent 9aa3335264
commit c6494148b7

View File

@ -8,7 +8,7 @@
v-show="showSearch"
label-width="68px"
>
<el-form-item label="护理站" prop="nurseStationId"
<el-form-item label="护理站" prop="nurseStationId"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')">
<el-select
v-model="queryParams.nurseStationId"
@ -25,7 +25,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理站" prop="nurseStationId"
<el-form-item label="护理站" prop="nurseStationId"
v-else>
<el-select
v-model="queryParams.nurseStationId"
@ -364,6 +364,16 @@ import { getListByUser } from "@/api/system/userlist.js";
export default {
name: "StationDepartment",
data() {
//
var checkMobile = (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)) {
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);
})