From 12bb196de39299dec1a0e02c3f01152249ea5039 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 20 Jul 2022 18:04:06 +0800 Subject: [PATCH] bug --- .../Announce/AppAnnounce/components/Add.vue | 66 ++++++++++++------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/project/sass/apps/Announce/AppAnnounce/components/Add.vue b/project/sass/apps/Announce/AppAnnounce/components/Add.vue index 9c0b3577..34628411 100644 --- a/project/sass/apps/Announce/AppAnnounce/components/Add.vue +++ b/project/sass/apps/Announce/AppAnnounce/components/Add.vue @@ -23,24 +23,24 @@
-
- +
+
- 请选择 + 请选择
选择

消息预计送达居民群数:

- {{ form.groupIds.length }} + {{ form.filterCriteria.length }} @@ -143,7 +143,7 @@
- +
请选择 @@ -177,7 +177,7 @@
- +
@@ -321,11 +321,11 @@ enableExamine: '0', examines: [], wxGroups: [], - groupIds: [], wxGroupsName: '', sendScope: '0', sendType: 0, name: '', + filterCriteria: [], taskTitle: '', examinesName: '' }, @@ -361,14 +361,37 @@ ...mapActions(['initOpenData', 'transCanvas']), getInfo (id) { - this.instance.post(`/app/wxcp/wxuser/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.form = { ...res.data, - departmentName: res.data.departmentNames, - tagIds: res.data.tags.map(v => v.id), - departmentIds: res.data.departmentIdsStr.split(',') + wxGroupsName: '1', + filterCriteria: res.data.filterCriteria.split(',') } + + if (res.data.examines && res.data.examines.length) { + this.form.examines = res.data.examines.map(v => { + return { + ...v, + wxOpenUserId: v.examineUserId, + id: v.examineUserId + } + }) + this.form.examinesName = '1' + } + + const content = res.data.contents.filter(v => v.msgType === '0') + + if (content.length) { + this.form.content = content[0].content + } + + this.fileList = res.data.contents.filter(v => v.msgType !== '0').map(v => { + return { + ...v, + ...v.sysFile + } + }) } }) }, @@ -385,7 +408,7 @@ if (e === '0') { this.getWxGroups() } else { - this.form.groupIds = [] + this.form.filterCriteria = [] } }, @@ -401,11 +424,11 @@ getWxGroups () { this.instance.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.form.sendScope}`, null, { data: { - groupIds: this.form.groupIds.join(',') + filterCriteria: this.form.filterCriteria.join(',') }, headers: {'Content-Type': 'application/json;charset=utf-8'}, transformRequest: [function (data) { - return data.groupIds + return data.filterCriteria }] }).then(res => { if (res.code === 0) { @@ -508,6 +531,7 @@ ...res.data.file, media: res.data.media, msgType: type, + sysFileId: res.data.file.id, imgPicUrl: res.data.file.url, mediaId: res.data.media.mediaId }) @@ -517,16 +541,6 @@ }) }, - onChange (e) { - if (e.length) { - this.form.departmentIds = e.map(v => v.id) - this.form.departmentName = e.map(v => v.name).join(',') - } else { - this.form.departmentIds = '' - this.form.departmentName = '' - } - }, - confirm (sendType) { this.$refs.form.validate((valid) => { if (valid) { @@ -547,6 +561,7 @@ id: this.params.id, wxGroups: this.form.wxGroups, contents, + filterCriteria: this.form.filterCriteria.join(','), examines: this.form.examines.length ? this.form.examines.map(v => { return { ...v, @@ -931,6 +946,7 @@ color: #888888; font-size: 14px; font-style: normal; + border-right: 1px solid #D0D4DC; background: #fff; }