修改校验
This commit is contained in:
parent
edb71d29b4
commit
02911e0255
@ -318,7 +318,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.communityName"
|
||||
v-model="form.areaCode"
|
||||
clearable
|
||||
placeholder="请选择社区"
|
||||
style="width: 129px; margin-left: 10px"
|
||||
@ -720,9 +720,9 @@ export default {
|
||||
agencyName: [
|
||||
{ required: true, message: "机构名称不能为空", trigger: "blur" },
|
||||
],
|
||||
areaCode: [
|
||||
{ required: true, message: "行政区划不能为空", trigger: "blur" },
|
||||
],
|
||||
// areaCode: [
|
||||
// { required: true, message: "行政区划不能为空", trigger: "blur" },
|
||||
// ],
|
||||
agencyPhone: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
@ -838,7 +838,10 @@ export default {
|
||||
},
|
||||
// 点击社区
|
||||
clickstreetlist(item) {
|
||||
console.log(item,'555555')
|
||||
this.form.areaCode = item.areaCode;
|
||||
this.form.communityName = item.areaName;
|
||||
|
||||
},
|
||||
//点击区县城
|
||||
clickarea(item) {
|
||||
@ -885,7 +888,7 @@ export default {
|
||||
this.form.communityCode = "";
|
||||
|
||||
this.form.regionName = "";
|
||||
// this.form.areaCode = "";
|
||||
this.form.areaCode = "";
|
||||
// this.form.streetCode = "";
|
||||
getSecondaryLevelInfo(item.id).then((res) => {
|
||||
this.citylist = res.data;
|
||||
@ -936,7 +939,10 @@ export default {
|
||||
}
|
||||
},
|
||||
changeagencyCategoryId(e) {
|
||||
this.form.agencyCategoryId = e[e.length - 1];
|
||||
if(e){
|
||||
this.form.agencyCategoryId = e[e.length - 1];
|
||||
|
||||
}
|
||||
},
|
||||
// // 节点单击事件
|
||||
// handleNodeClick(data) {
|
||||
|
||||
@ -727,7 +727,7 @@ export default {
|
||||
departmentPhone: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机码",
|
||||
message: "请输入正确的科室电话",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -735,8 +735,8 @@ export default {
|
||||
{
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱地址",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@ -803,10 +803,17 @@ export default {
|
||||
// 所属机构
|
||||
change(e) {
|
||||
console.log(e, "78");
|
||||
this.form.agencyId = e[e.length - 1];
|
||||
const arr = this.$refs["cascader"].getCheckedNodes()[0].pathLabels;
|
||||
this.form.agencyName = arr.slice(-1).join(",");
|
||||
console.log(this.form.agencyName);
|
||||
if (e) {
|
||||
this.form.agencyId = e[e.length - 1];
|
||||
if (this.form.agencyId) {
|
||||
const arr = this.$refs["cascader"].getCheckedNodes()[0].pathLabels;
|
||||
// console.log(arr, "5555555");
|
||||
this.form.agencyName = arr.slice(-1).join(",");
|
||||
// console.log(this.form.agencyName);
|
||||
} else {
|
||||
this.form.agencyName = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// changeagencyCategoryId(e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user