This commit is contained in:
shijingjing
2022-10-09 14:50:02 +08:00
parent f6f989b6be
commit 87fbb25738

View File

@@ -217,7 +217,7 @@
</div>
</div>
</div>
<div class="form-item">
<div class="form-item" v-if="form.fromHighRiskArea == 1">
<div class="form-item__wrapper">
<div class="form-item__title">
<i>*</i>
@@ -355,7 +355,10 @@ export default {
},
},
onLoad() {
onLoad(o) {
if(o.id) {
this.getDetail(o.id)
}
this.$areaId = this.user.$areaId
this.travelTypeDict = this.$dict.getDict('epidemicRecentTravel')
this.getewayList()
@@ -370,6 +373,20 @@ export default {
this.form.arriveTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
},
getDetail(id) {
this.$instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res=> {
if(res?.data) {
console.log(res);
this.form = res.data
this.travelType = res.data.travelType?.split(',')
this.form.startTime = res.data.startTime.substr(0, res.data.startTime.length - 3)
this.form.arriveTime = res.data.arriveTime.substr(0, res.data.arriveTime.length - 3)
this.startAreaId = res.data.startAreaId
this.arriveAreaName = res.data.startAreaName
}
})
},
travelTypeSelect(value) {
const index = this.travelType.indexOf(value)
if (index === -1) {
@@ -529,22 +546,6 @@ export default {
this.form.companionCount = 0
this.form.companionList = []
}
// else {
// if(this.form.companionCount > 100) {
// return this.$u.toast('同行人数最多可填写100人。')
// }
// if(this.people.length != this.form.companionCount) {
// return this.$u.toast('请输入正确的同行人信息')
// } else {
// if(this.people.some(val=> (val.name=='') || (val.phone=='')) ) {
// return this.$u.toast('请输入完整的同行人信息')
// } else {
// this.form.companionList = this.people
// }
// }
// }
if (this.flag) return
this.flag = true