From 9051a612ad371b922f9195fd1daba1ad07addc20 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 6 Jun 2022 14:02:03 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=94=B9=E4=BA=86=E5=87=A0=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fuwuxiangmu/cpts/edit.vue | 21 ++++++++++----- .../communityService/fuwuzuzhi/cpts/edit.vue | 27 +++++++++++++------ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue index 96ee1ecb..41982c36 100644 --- a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue +++ b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue @@ -125,7 +125,9 @@ :file-list="fmData.attachmentList" :on-success="handleImgSuccess" :on-remove="handleImgRemove" + :on-exceed="handleImgExceed" :before-upload="beforeImgUpload" + :limit="3" > @@ -210,12 +212,12 @@ export default { serviceContent: [ { required: true, message: "服务内容不能为空", trigger: "blur" }, ], - policyGround: [ - { required: true, message: "政策依据不能为空", trigger: "blur" }, - ], - policyLevel: [ - { required: true, message: "政策级别不能为空", trigger: "blur" }, - ], + // policyGround: [ + // { required: true, message: "政策依据不能为空", trigger: "blur" }, + // ], + // policyLevel: [ + // { required: true, message: "政策级别不能为空", trigger: "blur" }, + // ], }; }, }, @@ -323,6 +325,13 @@ export default { } }, + handleImgExceed() { + this.$message({ + type: "warning", + message: "文件数量最多不超过三个", + }); + }, + watchImg(src) { window.open(src); }, diff --git a/src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue b/src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue index 0dff383d..68795797 100644 --- a/src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue +++ b/src/views/modules/communityService/fuwuzuzhi/cpts/edit.vue @@ -48,7 +48,7 @@ v-model="fmData.orgName" > -
{{ fmData.orgName || '--' }}
+
{{ fmData.orgName || "--" }}
-
{{ fmData.orgDescribe || '--' }}
+
{{ fmData.orgDescribe || "--" }}
-
{{ fmData.principalName || '--' }}
+
{{ fmData.principalName || "--" }}
-
{{ fmData.principalMobile || '--' }}
+
{{ fmData.principalMobile || "--" }}
查询 -
{{ fmData.remark || '--' }}
+
{{ fmData.remark || "--" }}
@@ -191,6 +193,7 @@ var map; var search; var markers; var infoWindowList; +var geocoder; // 新建一个正逆地址解析类 export default { props: { @@ -282,6 +285,8 @@ export default { }); infoWindowList = Array(10); + geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类 + // 监听地图平移结束 map.on("panend", () => { this.handleMoveCenter(); @@ -339,6 +344,12 @@ export default { this.fmData.latitude = lat; this.fmData.longitude = lng; this.setMarker(lat, lng); + + geocoder + .getAddress({ location: new TMap.LatLng(lat, lng) }) // 将给定的坐标位置转换为地址 + .then((result) => { + // this.fmData.address = result.result.address; + }); }, async getInfo() { From bb92de2c3fd797fee8fab2c06d179e5a883fad53 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 6 Jun 2022 14:32:19 +0800 Subject: [PATCH 2/9] =?UTF-8?q?bug=EF=BC=9A=E6=94=BF=E7=AD=96=E7=BA=A7?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/communityService/fuwuxiangmu/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityService/fuwuxiangmu/index.vue b/src/views/modules/communityService/fuwuxiangmu/index.vue index 93321bd0..2f0948d8 100644 --- a/src/views/modules/communityService/fuwuxiangmu/index.vue +++ b/src/views/modules/communityService/fuwuxiangmu/index.vue @@ -140,7 +140,7 @@ Date: Mon, 6 Jun 2022 14:58:09 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityService/fuwuxiangmu/cpts/edit.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue index 41982c36..26cbf4e3 100644 --- a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue +++ b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue @@ -123,6 +123,7 @@ :data="{ customerId: customerId }" :show-file-list="true" :file-list="fmData.attachmentList" + :on-preview="handleImgPreview" :on-success="handleImgSuccess" :on-remove="handleImgRemove" :on-exceed="handleImgExceed" @@ -130,6 +131,7 @@ :limit="3" > + 点击上传,支持图片、word、pdf格式 @@ -279,7 +281,7 @@ export default { ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"].indexOf(format) == -1 ) { - this.$message.error("文档仅限pdf和office文件!"); + this.$message.error("仅限图片、word和pdf文件!"); return false; } return true; @@ -310,6 +312,11 @@ export default { } }, + handleImgPreview(file) { + console.log(file); + window.open(file.url || file.response.data.url); + }, + handleImgRemove(file) { console.log("handleImgRemove", file); if (file.response) { From 1de58e0464d4a9ca950e94c6f7055ead05f8980f Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 6 Jun 2022 15:27:46 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/communityService/fuwujilu/addForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/addForm.vue b/src/views/modules/communityService/fuwujilu/addForm.vue index 85d4d109..1161f941 100644 --- a/src/views/modules/communityService/fuwujilu/addForm.vue +++ b/src/views/modules/communityService/fuwujilu/addForm.vue @@ -440,8 +440,8 @@ export default { this.endLoading() - this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); - this.feedbackFormData = { ...this.formData.feedback } + // this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); + // this.feedbackFormData = { ...this.formData.feedback } }, From e2e4f274e8c72ec0f7d07df701e2adf63e6db545 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 7 Jun 2022 10:43:10 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=8F=8D=E9=A6=88=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/fuwujilu/addForm.vue | 51 ++++--------------- .../communityService/fuwujilu/fuwuList.vue | 5 ++ 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/addForm.vue b/src/views/modules/communityService/fuwujilu/addForm.vue index 1161f941..69c6f42b 100644 --- a/src/views/modules/communityService/fuwujilu/addForm.vue +++ b/src/views/modules/communityService/fuwujilu/addForm.vue @@ -362,41 +362,6 @@ export default { address: '', attachmentList: [],// 附件列表 }, - formDataTemp: { - principalContact: "15111111111", - principalName: "31231", - remark: "4234234", - serviceCategoryKey: "01", - serviceOrgId: "1531105677127692289", - serviceProjectId: "1531514265581076482", - serviceScope: [ - { - objectId: "1479033225060757506", - objectName: "合肥路街道", - objectType: "street", - }, - { - objectId: "1514064686570147842", - objectName: "ss", - objectType: "street", - } - ], - serviceTimeEnd: "", - serviceTimeStart: "", - - feedback: { - address: "山东省青岛市市南区南京路73号", - latitude: 36.0722275, - longitude: 120.38945519, - satisfaction: "bad", - serviceEffect: "234234234", - serviceGoal: "234234", - servicePeopleNumber: 1, - serviceProjectId: "1531514265581076482", - serviceProjectName: "223", - serviceStatus: "completed", - } - }, projectList: [],//服务项目list orgList: [],//服务组织list @@ -430,18 +395,17 @@ export default { async mounted () { this.startLoading() this.initMap() + this.$refs.ref_form_feedback.resetFields(); if (this.formType === 'add') { this.$refs.ref_form.resetFields(); await this.loadScopeTree() - } - - this.$refs.ref_form_feedback.resetFields(); + } else { + this.$set(this.feedbackFormData, 'serviceProjectName', this.serviceProjectName) + } this.endLoading() - // this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); - // this.feedbackFormData = { ...this.formData.feedback } }, @@ -598,7 +562,7 @@ export default { console.log(this.formData) // return false const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - if (regPhone.test(this.formData.principalContact) === false) { + if (this.formData.principalContact && regPhone.test(this.formData.principalContact) === false) { this.btnDisable = false this.$message({ type: 'warning', @@ -959,6 +923,11 @@ export default { type: String, required: '' }, + serviceProjectName: {//服务项目名称 + type: String, + required: false, + default: '' + }, formType: { //表单操作类型 add新增,edit编辑,detail详情,feedback反馈 type: String, required: '' diff --git a/src/views/modules/communityService/fuwujilu/fuwuList.vue b/src/views/modules/communityService/fuwujilu/fuwuList.vue index de27fac6..3ce7a034 100644 --- a/src/views/modules/communityService/fuwujilu/fuwuList.vue +++ b/src/views/modules/communityService/fuwujilu/fuwuList.vue @@ -238,6 +238,7 @@ :statusArray="statusArray" :satisfyArray="satisfyArray" :serviceRecordId="serviceRecordId" + :serviceProjectName="serviceProjectName" @handleOk="handleOk" @handleClose="handleClose"> @@ -344,6 +345,7 @@ export default { disabledDate: startDisabledDate }, serviceRecordId: '', + serviceProjectName: '', showAdd: false, showDetail: false, @@ -411,6 +413,7 @@ export default { async handleDetail (row) { this.serviceRecordId = row.serviceRecordId + this.formType = 'detail' this.showDetail = true @@ -424,7 +427,9 @@ export default { //加载组织数据 async handleFeedback (row) { + this.serviceRecordId = row.serviceRecordId + this.serviceProjectName = row.serviceProjectName this.addDiaTitle = '服务反馈' this.formType = 'feedback' this.showAdd = true; From 212a1c0eb6deb7c65c5c2d6752559ed1b0db3239 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 7 Jun 2022 17:02:59 +0800 Subject: [PATCH 6/9] 111 --- .../modules/communityService/fuwujilu/addForm.vue | 12 ++++++------ .../shequzhili/event/cpts/process-form-demand.vue | 11 ++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/addForm.vue b/src/views/modules/communityService/fuwujilu/addForm.vue index 69c6f42b..8cb7c9c7 100644 --- a/src/views/modules/communityService/fuwujilu/addForm.vue +++ b/src/views/modules/communityService/fuwujilu/addForm.vue @@ -122,10 +122,10 @@ style="display: block"> @@ -175,10 +175,10 @@ style="display: block"> diff --git a/src/views/modules/shequzhili/event/cpts/process-form-demand.vue b/src/views/modules/shequzhili/event/cpts/process-form-demand.vue index 3423c3d8..795668e7 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-demand.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-demand.vue @@ -470,9 +470,14 @@ export default { handleServiceChange (type, val) { if (val === "social_org") { - if (type === "add") this.getServiceuserList(val, "add_demand"); - else this.getServiceuserList(val, "query_demand"); - } else this.getServiceuserList(val, ""); + if (type === "add") { + this.getServiceuserList(val, "add_demand"); + } else { + this.getServiceuserList(val, "query_demand"); + } + } else { + this.getServiceuserList(val, ""); + } }, async getServiceuserList (serviceType, query) { From c16e84f48cc798b8f979f0f28411357362ab9428 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 8 Jun 2022 13:41:53 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8D=A2=E8=A1=8Cbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/fuwuxiangmu/cpts/edit.vue | 10 +++++----- .../modules/communityService/fuwuzuzhi/cpts/edit.vue | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue index 26cbf4e3..3331aa6d 100644 --- a/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue +++ b/src/views/modules/communityService/fuwuxiangmu/cpts/edit.vue @@ -29,7 +29,7 @@ > -
{{ fmData.serviceCategory || "--" }}
+
{{ fmData.serviceCategory || "--" }}
-
{{ fmData.serviceName || "--" }}
+
{{ fmData.serviceName || "--" }}
-
{{ fmData.serviceContent || "--" }}
+
{{ fmData.serviceContent || "--" }}
-
{{ fmData.policyLevelName || "--" }}
+
{{ fmData.policyLevelName || "--" }}
-
{{ fmData.policyGround || "--" }}
+
{{ fmData.policyGround || "--" }}
-
{{ fmData.serviceTypeName }}
+
{{ fmData.serviceTypeName }}
-
{{ fmData.orgName || "--" }}
+
{{ fmData.orgName || "--" }}
-
{{ fmData.orgDescribe || "--" }}
+
{{ fmData.orgDescribe || "--" }}
-
{{ fmData.principalName || "--" }}
+
{{ fmData.principalName || "--" }}
-
{{ fmData.principalMobile || "--" }}
+
{{ fmData.principalMobile || "--" }}
-
{{ fmData.remark || "--" }}
+
{{ fmData.remark || "--" }}
From 12397745cfc25bbcbcc9be4098bef9e063fd9e53 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 8 Jun 2022 15:38:52 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/fuwujilu/detailForm.vue | 183 +++++++++++++++++- .../communityService/fuwujilu/fuwuList.vue | 1 + 2 files changed, 174 insertions(+), 10 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/detailForm.vue b/src/views/modules/communityService/fuwujilu/detailForm.vue index 5ed9abe5..e32fcd64 100644 --- a/src/views/modules/communityService/fuwujilu/detailForm.vue +++ b/src/views/modules/communityService/fuwujilu/detailForm.vue @@ -139,6 +139,138 @@ +
+

反馈内容

+ + + + + {{feedbackFormData.serviceGoal}} + + + + + {{feedbackFormData.serviceEffect}} + + + + + {{feedbackFormData.servicePeopleNumber}} + + + + + 已完成 + + + + + {{feedbackFormData.satisfactionShow}} + + + + + {{feedbackFormData.address}} + + + +
+ +
+
+ +
+
+ + + 查询 +
+
+ +
+
+ + + + + + 无附件 + +
+
+
@@ -185,8 +317,6 @@ export default { } return { - - btnDisable: false, keyWords: '', @@ -202,6 +332,20 @@ export default { longitude: 36.0722275, //经度 latitude: 120.38945519 //纬度 }, + + feedbackFormData: { + serviceProjectId: '',// 服务项目id + serviceProjectName: '', + serviceGoal: '',// 服务目标 + serviceEffect: '',// 服务效果 + servicePeopleNumber: null,// 服务人数 + serviceStatus: 'completed',// 服务状态。in_service服务中;completed:已完成 + satisfaction: '',//满意度。不满意:bad、基本满意:good、非常满意:perfect + longitude: '',// 经度 + latitude: '',// 维度 + address: '', + attachmentList: [],// 附件列表 + }, serviceList: [],//服务list endPickerOptions: { @@ -211,17 +355,18 @@ export default { disabledDate: startDisabledDate }, - projectList: [], - + fileList: [], + uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', } }, components: {}, mounted () { if (this.serviceRecordId) {//详情 this.loadInfo() + } - // this.initMap() + this.initMap() console.log('mounted') }, @@ -240,13 +385,25 @@ export default { if (code === 0) { this.formData = { ...data } 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) + }); + + } else { this.$message.error(msg) } }, - - async handleComfirm () { this.btnDisable = true @@ -265,6 +422,7 @@ export default { }, + async editFuwu () { const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 if (regPhone.test(this.formData.principalContact) === false) { @@ -409,7 +567,7 @@ export default { geocoder .getAddress({ location: location }) // 将给定的坐标位置转换为地址 .then((result) => { - this.formData.address = result.result.address + // this.formData.address = result.result.address // 显示搜索到的地址 }); }, @@ -448,7 +606,6 @@ export default { computed: { dataRule () { return { - serviceCategoryKey: [ { required: true, message: '服务类别不能为空', trigger: 'blur' }, ], @@ -485,7 +642,13 @@ export default { default () { return [] } - } + }, + satisfyArray: { + type: Array, + default () { + return [] + } + }, } } diff --git a/src/views/modules/communityService/fuwujilu/fuwuList.vue b/src/views/modules/communityService/fuwujilu/fuwuList.vue index 3ce7a034..2309bd62 100644 --- a/src/views/modules/communityService/fuwujilu/fuwuList.vue +++ b/src/views/modules/communityService/fuwujilu/fuwuList.vue @@ -253,6 +253,7 @@ @closed="showDetail = false"> Date: Thu, 9 Jun 2022 09:13:30 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=AF=A6=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 {