调查走访

This commit is contained in:
liuye
2022-11-22 14:21:40 +08:00
parent eb868b1996
commit 69ba2ed10e
3 changed files with 18 additions and 34 deletions

View File

@@ -20,7 +20,7 @@
</u-form-item>
<div class="line"></div>
<u-form-item label="区域定位" prop="address" required :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-form-item label="区域定位" prop="address" :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.address" disabled placeholder="请点击" @click="chooseAddress" />
</u-form-item>
@@ -57,8 +57,8 @@
<div class="line"></div>
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top" :border-bottom="false">
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
<u-form-item label="图片(最多9张)" prop="files" class="avatars" label-position="top" :border-bottom="false">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
</u-form>
</div>
@@ -84,6 +84,7 @@ export default {
optionId: '',
name: '',
phone: '',
residentId: '',
address: '',
lng: '',
@@ -94,7 +95,7 @@ export default {
applicationId: '',
title: '',
description: '',
images: [],
files: [],
},
showAreaId: false,
showStstus: false,
@@ -164,7 +165,7 @@ export default {
getDetail() {
if (this.id) {
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
this.$http.post(`/app/appvisitvondolencepingchang/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.forms = res.data
this.forms.create_user_name = res.data.name
@@ -172,9 +173,6 @@ export default {
this.forms.areaId = res.data.areaId
this.forms.areaName = res.data.areaName
this.forms.reality = this.$dict.getLabel('realityStatus', res.data.reality)
if (res.data.images) {
this.forms.images = JSON.parse(res.data.images || '[]')
}
}
})
}
@@ -198,30 +196,16 @@ export default {
return this.$u.toast('请输入入户走访事项')
}
const imgs = []
if (this.forms.images) {
this.forms.images.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
areaId: this.forms.areaId,
applicationId: this.forms.applicationId,
name: this.forms.name,
visitTime: this.forms.visitTime,
residentId: this.forms.residentId,
.post(`/app/appvisitvondolencepingchang/addOrUpdate`, {
...this.forms,
// menuLevel3Name: this.forms.menuLevel3Name,
applicationId: this.forms.applicationId,
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
title: this.forms.title,
description: this.forms.description,
createUserId: this.user.id,
createUserName: this.user.name,
images: JSON.stringify(imgs) || [],
id: this.id,
})
.then((res) => {