From 0a814607ea1677d8f6e7ff805313865cd13e3ee8 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 9 Jun 2022 09:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/fuwujilu/detailForm.vue | 104 ++++++++++++------ 1 file changed, 69 insertions(+), 35 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/detailForm.vue b/src/views/modules/communityService/fuwujilu/detailForm.vue index e32fcd64..6125199c 100644 --- a/src/views/modules/communityService/fuwujilu/detailForm.vue +++ b/src/views/modules/communityService/fuwujilu/detailForm.vue @@ -144,6 +144,7 @@ @@ -151,45 +152,41 @@ prop="serviceGoal" label-width="150px" style="display: block"> - {{feedbackFormData.serviceGoal}} - + v-model="feedbackFormData.serviceGoal"> - {{feedbackFormData.serviceEffect}} - + v-model="feedbackFormData.serviceEffect"> - {{feedbackFormData.servicePeopleNumber}} - + label="服务人数"> 已完成 + - {{feedbackFormData.address}} - + -
@@ -252,20 +246,30 @@
-
+ --> - - + --> + 无附件
@@ -317,6 +321,8 @@ export default { } return { + + btnDisable: false, keyWords: '', @@ -366,8 +372,8 @@ export default { this.loadInfo() } - this.initMap() - console.log('mounted') + // this.initMap() + }, @@ -387,16 +393,17 @@ export default { this.formData.serviceRecordId = this.serviceRecordId this.feedbackFormData = { ...data.feedBack } this.feedbackFormData.servicePeopleNumber = this.formData.servicePeopleNumber - this.feedbackFormData.satisfactionShow = this.feedbackFormData.satisfaction === 'perfect' ? '非常满意' : this.feedbackFormData.satisfaction === 'good' ? '基本满意' : '不满意' this.fileList = [] - data.feedBack.attachmentList.forEach(element => { - let obj = { - name: element.attachmentName, - format: element.attachmentFormat, - url: element.attachmentUrl, - } - this.fileList.push(obj) - }); + if (data.feedBack.attachmentList && data.feedBack.attachmentList.length > 0) { + data.feedBack.attachmentList.forEach(element => { + let obj = { + name: element.attachmentName, + format: element.attachmentFormat, + url: element.attachmentUrl, + } + this.fileList.push(obj) + }); + } } else { @@ -422,7 +429,6 @@ export default { }, - async editFuwu () { const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 if (regPhone.test(this.formData.principalContact) === false) { @@ -461,6 +467,19 @@ export default { }, + //下载 + handleFileDownload (file) { + + var a = document.createElement('a'); + var event = new MouseEvent('click'); + a.download = file.name; + console.log(a) + a.href = file.url; + a.dispatchEvent(event); + + + }, + // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { // 定义地图中心点坐标 @@ -567,7 +586,7 @@ export default { geocoder .getAddress({ location: location }) // 将给定的坐标位置转换为地址 .then((result) => { - // this.formData.address = result.result.address + this.formData.address = result.result.address // 显示搜索到的地址 }); }, @@ -606,6 +625,7 @@ export default { computed: { dataRule () { return { + serviceCategoryKey: [ { required: true, message: '服务类别不能为空', trigger: 'blur' }, ], @@ -656,4 +676,18 @@ export default {