提交 5e944f38 编写于 作者: zhentian.jia's avatar zhentian.jia

修改name问题

上级 309f2a33
......@@ -180,10 +180,12 @@
<el-form-item label="所在地区" prop="addressList">
<!--@active-item-change="handleItemChange"-->
<el-cascader
ref="cascaderRegion"
placeholder="请选择省市县乡"
:options="provinceList"
v-model="addressList"
:props="optionProps">
:props="optionProps"
@change="handleChange">
</el-cascader>
</el-form-item>
</el-col>
......@@ -406,6 +408,7 @@
return time > Date.now() || time < old;
}
},
region: [],
}
},
props: {
......@@ -609,26 +612,32 @@
this.patientInfoForm.cityId = this.addressList[1];
this.patientInfoForm.countyId = this.addressList[2];
this.patientInfoForm.townId = this.addressList[3];
this.provinceLists.forEach((item) => {
if(this.patientInfoForm.provinceId == item.provinceId) {
this.patientInfoForm.provinceName = item.provinceName;
}
});
this.cityLists.forEach((item) => {
if(this.patientInfoForm.cityId == item.cityId) {
this.patientInfoForm.cityName = item.cityName;
}
});
this.countyLists.forEach((item) => {
if(this.patientInfoForm.countyId == item.countyId) {
this.patientInfoForm.countyName = item.countyName;
}
})
this.townLists.forEach((item) => {
if(this.patientInfoForm.townId == item.townId) {
this.patientInfoForm.townName = item.townName;
}
})
// this.provinceLists.forEach((item) => {
// if(this.patientInfoForm.provinceId == item.provinceId) {
// this.patientInfoForm.provinceName = item.provinceName;
// }
// });
// this.cityLists.forEach((item) => {
// if(this.patientInfoForm.cityId == item.cityId) {
// this.patientInfoForm.cityName = item.cityName;
// }
// });
// this.countyLists.forEach((item) => {
// if(this.patientInfoForm.countyId == item.countyId) {
// this.patientInfoForm.countyName = item.countyName;
// }
// })
// this.townLists.forEach((item) => {
// if(this.patientInfoForm.townId == item.townId) {
// this.patientInfoForm.townName = item.townName;
// }
// })
this.patientInfoForm.provinceName = vm.region[0];
this.patientInfoForm.cityName = vm.region[1];
this.patientInfoForm.countyName = vm.region[2];
this.patientInfoForm.townName = vm.region[3];
if(this.patientInfoForm.provinceName && this.patientInfoForm.cityName && this.patientInfoForm.countyName && this.patientInfoForm.townName) {
this.patientInfoForm.patientAddress = `${this.patientInfoForm.provinceName}${this.patientInfoForm.cityName}${this.patientInfoForm.countyName}${this.patientInfoForm.townName}`
}else {
......@@ -810,7 +819,14 @@
let s = n - old;
return Math.floor(s / (24 * 3600 * 1000));
// return s;
}
},
handleChange() {
setTimeout(function() {
let region = vm.$refs["cascaderRegion"].inputValue;
vm.region = region.split(" / ");
console.log("vm.region",vm.region)
},20)
},
},
filters: {
emptyFilter: function(value) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册