This commit is contained in:
shijingjing
2022-05-05 16:39:57 +08:00
parent 1d8e45b30c
commit d95e80b2f2

View File

@@ -1,9 +1,9 @@
<template>
<div class="add">
<div class="steps" v-if="!isEdit">
<div class="steps" v-show="!isEdit">
<u-steps :list="numList" :current="current" mode="number"></u-steps>
</div>
<div class="form" v-if="current == 0 || isEdit">
<div class="form" v-show="current == 0 || isEdit">
<div class="form-group">
<div class="form-item" v-if="!isEdit">
<div class="form-item__wrapper">
@@ -121,7 +121,7 @@
<span>现住址</span>
</div>
<div class="right">
<AiAreaPicker :fullName.sync="form.currentAreaName" v-model="form.currentAreaId">
<AiAreaPicker :fullName.sync="form.currentAreaName" v-model="form.currentAreaId" @select="areaSelect">
<AiMore v-model="form.currentAreaName"/>
</AiAreaPicker>
</div>
@@ -547,15 +547,16 @@ export default {
this.form.objectType = query.objectType
this.houseIdNumber = query.houseIdNumber
if (this.isEdit) {
this.flag = true
this.getInfo(this.$route.query.id)
}
})
},
onShow() {
document.title = this.isEdit ? '编辑监测对象' : '添加监测对象'
if (this.isEdit) {
this.flag = true
this.getInfo(this.$route.query.id)
}
},
methods: {
rules() {
@@ -565,9 +566,15 @@ export default {
idNumber: '请输入身份证号',
phone: '请输入联系方式',
currentAreaId: '请选择现住址',
}
},
areaSelect(e) {
console.log(e);
this.form.currentAreaId = e
},
getResidentList() {
uni.navigateTo({
url: './residentList'
@@ -703,6 +710,7 @@ export default {
getInfo(id) {
this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => {
if (res?.data) {
console.log(res.data);
res.data.basicsCheckList = res.data.basicsCheck.split(',')
res.data.basicsCheckList.map((item, index) => {
this.basicsCheckList[index].checked = true
@@ -716,7 +724,9 @@ export default {
this.helthList.map(items => {
items.checked = res.data.healthyStatusList.includes(items.dictValue)
})
this.form = { ...this.form, ...res.data }
// this.form.currentAreaId = res.data.currentAreaId
if (this.form.photo) {
this.photo = [{url: this.form.photo}] || []