护理站信息
This commit is contained in:
parent
e4f4caaa2a
commit
40101ba9b0
@ -24,7 +24,7 @@ export function FirstLevels(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询市信息
|
||||
// 查询所属下级区域信息集合
|
||||
export function SecondaryLevelInfo(id) {
|
||||
return request({
|
||||
url: `/system/communityInfo/getSecondaryLevelInfo?`+`parentId=${id}`,
|
||||
|
||||
@ -436,7 +436,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="护理类型" prop="nurseStationType">
|
||||
<el-select
|
||||
v-model="form.nurseStationType2"
|
||||
v-model="nurseStationType2"
|
||||
multiple
|
||||
placeholder="请选择护理类型"
|
||||
style="width: 208px"
|
||||
@ -491,8 +491,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
||||
<editor
|
||||
:min-height="62"
|
||||
style="width: 90%; margin: 0 auto;"
|
||||
:min-height="62"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.agencyIntroduce"
|
||||
></editor>
|
||||
</el-form-item>
|
||||
@ -623,7 +623,7 @@ export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "Station",
|
||||
data() {
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
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}$/;
|
||||
@ -637,15 +637,16 @@ export default {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (!value) { //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
return cb()
|
||||
}else{
|
||||
if (regMobile.test(value)) {
|
||||
if (!value) {
|
||||
//所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
return cb();
|
||||
}else{
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
} else {
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
} else {
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return {
|
||||
imageUrl: "",
|
||||
@ -668,6 +669,7 @@ export default {
|
||||
//护理类型
|
||||
nurseTypeCode: "nurse_type_code",
|
||||
nurseStationTypelist: [],
|
||||
nurseStationType2:null,
|
||||
//shengshiqu
|
||||
value3: "",
|
||||
value2: "",
|
||||
@ -925,13 +927,14 @@ export default {
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.nurseStationType2 = [];
|
||||
this.form = {
|
||||
id: null,
|
||||
areaCode: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
nurseStationType2: [],
|
||||
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
@ -1047,17 +1050,19 @@ export default {
|
||||
this.form.nurseStationType.length == 0
|
||||
) {
|
||||
} else {
|
||||
this.form.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||
this.form.nurseStationType = this.form.nurseStationType2;
|
||||
this.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
}
|
||||
// this.form.nurseStationLabelList = [];
|
||||
this.title = "修改护理站信息";
|
||||
getSubordinateRegions(response.data.areaCode).then((res) => {
|
||||
this.value = String(res.data.provinceCode);
|
||||
this.value1 = res.data.cityName;
|
||||
this.value2 = res.data.regionName;
|
||||
this.value3 = res.data.streetName;
|
||||
console.log(typeof this.value);
|
||||
if (res.data) {
|
||||
this.value = String(res.data.provinceCode);
|
||||
this.value1 = res.data.cityName;
|
||||
this.value2 = res.data.regionName;
|
||||
this.value3 = res.data.streetName;
|
||||
console.log(typeof this.value);
|
||||
}
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
@ -1096,17 +1101,18 @@ export default {
|
||||
});
|
||||
this.open = true;
|
||||
this.loading = false;
|
||||
console.log(this.form);
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.form.nurseStationType2;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.areaCode = Number(this.form.areaCode);
|
||||
this.form.nurseStationType = this.form.nurseStationType2.join(",");
|
||||
this.form.nurseStationType = this.nurseStationType2.join(",");
|
||||
if (this.form.id != null) {
|
||||
updateStation(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user