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

修改name问题

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