From e709e1e74fa99959c1c77eed884c1c60335d8116 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 1 Mar 2023 10:04:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=90=8C=E5=AE=A3=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppAnnounceResident/components/Add.vue | 248 ++++++++++++------ .../AppAnnounceResident/components/Detail.vue | 106 +++----- .../AppAnnounceResident/components/List.vue | 8 +- .../AppAnnounceWeChat/components/Add.vue | 57 +++- .../AppAnnounceWeChat/components/List.vue | 1 + ui/packages/basic/AiDialog.vue | 3 +- vue.config.js | 2 +- 7 files changed, 260 insertions(+), 165 deletions(-) diff --git a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Add.vue b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Add.vue index a7a1b5e0..80a94669 100644 --- a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Add.vue +++ b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Add.vue @@ -15,12 +15,12 @@ - 全部居民群 + 全部居民 按部门选择 按网格选择 - +
-
- {{ item.groupOwnerName }} - 等{{ form.wxGroups.length }}个 +
+ {{ item.userName }} + 等{{ form.groupList.length }}个
- 请选择 -
{{ form.filterCriteria.length ? '重新选择' : '选择' }}
+ 请选择 +
{{ form.groupList.length ? '重新选择' : '选择' }}
+
+ + + +
+
+ +
+ +
+ {{ item.name }} +
+ 请选择 +
{{ form.filterTags.length ? '重新选择' : '选择' }}
+
+
+
+ +
+ +
+ {{ item.name }} +
+ 请选择 +
{{ form.excludeFilterTags.length ? '重新选择' : '选择' }}
+
+
+
+ + + 全部 + + + +

消息预计送达居民数:

{{ groupLen }} @@ -51,47 +96,6 @@
- - - - - -
- -
- - - -
- 请选择 -
{{ form.examines.length ? '重新选择' : '选择' }}
-
-
- -
- -
- - - -
- 请选择 -
{{ form.examines.length ? '重新选择' : '选择' }}
-
-
- - - - - -
@@ -177,6 +181,17 @@ 从本地上传,图片最大支持10MB,支持JPG,PNG格式;视频最大支持10MB,支持MP4格式;文件最大支持20MB
+ + + +
@@ -318,9 +333,30 @@

{{ item.name }}

+ {{ item.name }} + +
+
+
+ + +
+
+

{{ item.name }}

+
+ {{ item.name }} @@ -364,11 +400,13 @@ export default { isRemoveTag: false, fileList: [], tags: [], + isShowRemoveTags: false, isShowAddLink: false, isShowAddMiniapp: false, isShowDate: false, isShowTags: false, chooseTags: [], + removeTags: [], isLoading: false, linkForm: { linkPicUrl: [], @@ -391,14 +429,23 @@ export default { contents: [], enableExamine: '0', examines: [], - wxGroups: [], wxGroupsName: '', sendScope: '0', sendType: 0, name: '', + taskEndTime: '', + groupList: [], + addTime: '', + gender: '2', + addEndTime: '', + addFromTime: '', filterCriteria: [], taskTitle: '', - examinesName: '' + examinesName: '', + filterTags: [], + filterTagsName: '', + excludeFilterTagsName: '', + excludeFilterTags: [] }, girdNames: '', id: '', @@ -415,12 +462,7 @@ export default { ...mapState(['user']), groupLen() { - let i = 0 - this.form.wxGroups.forEach(v => { - i = i + v.groupIds.split(',').length - }) - - return i + return this.form.groupList.length } }, @@ -447,6 +489,15 @@ export default { } }, + removeChoose (id) { + const index = this.removeTags.indexOf(id) + if (index === -1) { + this.removeTags.push(id) + } else { + this.removeTags.splice(index, 1) + } + }, + getTags () { this.instance.post(`/app/wxcp/wxcorptag/listAll?size=100`).then(res => { if (res.code == 0) { @@ -455,18 +506,34 @@ export default { }) }, - onTagsConfirm () { + onRemoveTagsConfirm () { + this.form.excludeFilterTagsName = this.removeTags.map(v => v.name).join(',') + this.form.excludeFilterTags = [...this.removeTags] + this.isShowRemoveTags = false + + this.getWxGroups() + }, + + onTagsConfirm () { + this.form.filterTagsName = this.chooseTags.map(v => v.name).join(',') + this.form.filterTags = [...this.chooseTags] + + this.isShowTags = false + this.getWxGroups() }, getInfo(id) { - this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/whchatmomentstask/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.form = { ...this.form, ...res.data, wxGroupsName: '1', - filterCriteria: res.data.filterCriteria.split(',') + filterTags: res.data.filterTags ? res.data.filterTags.split(',') : [], + excludeFilterTags: res.data.excludeFilterTags ? res.data.excludeFilterTags.split(',') : [], + filterCriteria: res.data.filterCriteria.split(','), + addTime: res.data.addEndTime ? [res.data.addFromTime, res.data.addEndTime] : '' } if (res.data.girdNames) { @@ -514,11 +581,14 @@ export default { onScopeChange(e) { this.form.filterCriteria = [] - this.form.wxGroups = [] + this.form.groupList = [] this.girdNames = '' + this.form.wxGroupsName = '' if (e === '0') { - this.getWxGroups() + this.$nextTick(() => { + this.getWxGroups() + }) } else { this.form.filterCriteria = [] } @@ -539,22 +609,23 @@ export default { }) } else { this.form.wxGroupsName = '' - this.form.wxGroups = [] + this.form.groupList = [] } }, getWxGroups() { - this.instance.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.form.sendScope}`, null, { - data: { - filterCriteria: this.form.filterCriteria.join(',') - }, - headers: {'Content-Type': 'application/json;charset=utf-8'}, - transformRequest: [function (data) { - return data.filterCriteria - }] + this.instance.post(`/app/whchatmomentstask/getSendScope`, { + sendScope: this.form.sendScope, + tags: this.form.filterTags.map(v => v.id).join(','), + filterCriteria: this.form.filterCriteria.join(','), + taskType: 1, + gender: this.form.gender, + excludeTags: this.form.excludeFilterTags.map(v => v.id).join(','), + addEndTime: this.form.addTime ? this.form.addTime[0] : '', + addFromTime: this.form.addTime ? this.form.addTime[1] : '' }).then(res => { if (res.code === 0) { - this.form.wxGroups = res.data + this.form.groupList = res.data } }) }, @@ -689,8 +760,8 @@ export default { confirm(sendType) { this.$refs.form.validate((valid) => { if (valid) { - if (!this.form.wxGroups.length) { - return this.$message.error('居民群数量不能为0') + if (!this.form.groupList.length) { + return this.$message.error('居民数量不能为0') } if (sendType === 1 && !this.dateForm.choiceTime) { @@ -711,12 +782,17 @@ export default { } else { this.isLoading2 = true } - this.instance.post(`/app/appmasssendingtask/addOrUpdate`, { + this.instance.post(`/app/whchatmomentstask/addOrUpdate`, { ...this.form, id: this.params.id, - wxGroups: this.form.wxGroups, + groupList: this.form.groupList, contents, sendType, + taskType: 1, + excludeFilterTags: this.form.excludeFilterTags.map(v => v.id).join(','), + addEndTime: this.form.addTime ? this.form.addTime[0] : '', + addFromTime: this.form.addTime ? this.form.addTime[1] : '', + filterTags: this.form.filterTags.map(v => v.id).join(','), choiceTime: this.dateForm.choiceTime, filterCriteria: this.form.filterCriteria.join(','), examines: this.form.examines.length ? this.form.examines.map(v => { @@ -836,6 +912,22 @@ export default { } } + .filter-item { + display: flex; + align-items: center; + margin-top: 20px; + + .AppAnnounceDetail-select { + flex: 1; + } + + label { + width: 60px; + margin-right: 20px; + color: #666; + } + } + .ai-form { textarea { border-radius: 4px 4px 0 0!important; diff --git a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Detail.vue b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Detail.vue index c9bae1cb..55887ea8 100644 --- a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Detail.vue +++ b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/Detail.vue @@ -26,7 +26,7 @@
{{ info.createUserName }} - ({{ info.createUserDeptName }}) + ({{ info.createUserDeptName }})
@@ -42,8 +42,8 @@
{{ info.sendScope === '0' ? '全部' : '按条件筛选的' }} - {{ groups.length }} - 个居民群 + {{ info.groupList.length }} + 个居民 详情
@@ -73,25 +73,25 @@
-

计划执行成员

+

预计执行员工

{{ memberInfo.planCount || 0 }}

-

未执行成员

+

未执行员工

{{ memberInfo.unExecutedCount || 0 }}

-

已执行成员

+

已执行员工

{{ memberInfo.executedCount || 0 }}

-

无法执行成员

+

无法执行员工

@@ -115,7 +115,7 @@ :instance="instance" @pick="e => onUserChange(e, 'search1')" :multiple="false" v-model="user1">
- {{ name1 }} + 部门 @@ -151,14 +151,20 @@ width="890px" title="群发范围" @onConfirm="isShowGroups = false"> - - + + +
+ {{ info.sendScope === '0' ? '全部' : '按条件筛选的' }} + {{ info.groupList.length }} + 个居民 +
+
+ + {{ info.filterTagsName || '-' }} + {{ info.excludeFilterTagsName || '-' }} + {{ mapGender(info.gender) }} + {{ info.addEndTime + '-' + info.addFromTime }} +
@@ -189,11 +195,8 @@ total1: 0, isShowGroups: false, isShowPhone: false, - total2: 0, user1: [], user2: [], - name1: '', - name2: '', radio1: '未执行', search1: { current: 1, @@ -202,13 +205,6 @@ type: 0, sendStatus: '0' }, - search2: { - current: 1, - size: 10, - deptartId: '', - type: 1, - sendStatus: '0' - }, memberInfo: {}, groupInfo: {}, tableData1: [], @@ -229,7 +225,8 @@ timer: null, min: 60, isDisabled: false, - rejecterId: '' + rejecterId: '', + userNames: '' } }, @@ -240,7 +237,6 @@ created () { this.getInfo(this.params.id) this.getMemberInfo() - this.getGroupInfo() }, destroyed () { @@ -249,39 +245,41 @@ methods: { getMemberInfo () { - this.instance.post(`/app/appmasssendingtask/detailStatistics`, null, { + this.instance.post(`/app/whchatmomentstask/detailStatistics`, null, { params: { ...this.search1, taskId: this.params.id } }).then(res => { if (res.code === 0) { - this.tableData1 = res.data.executedList.records - this.total1 = res.data.executedList.total + // this.tableData1 = res.data.executedList.records + // this.total1 = res.data.executedList.total this.memberInfo = res.data } }) }, + mapGender (v) { + return { + '2': '全部', + '1': '男', + '0': '女' + }[v] + }, + onUserChange (e, search) { if (e.length) { - search === 'search1' ? this.name1 = e[0].name : this.name2 = e[0].name this[search].deptartId = e[0].id } else { this[search].deptartId = '' - search === 'search1' ? this.name1 = '' : this.name2 = '' } this[search].current = 1 - if (search === 'search1') { - this.getMemberInfo() - } else { - this.getGroupInfo() - } + this.getMemberInfo() }, sendMsg () { - this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => { + this.instance.post(`/app/whchatmomentstask/remindExamine?id=${this.params.id}`).then(res => { if (res.code === 0) { this.$message.success('提醒成功') this.getInfo(this.params.id) @@ -289,26 +287,6 @@ }) }, - getGroupInfo () { - this.instance.post(`/app/appmasssendingtask/detailStatistics`, null, { - params: { - ...this.search2, - taskId: this.params.id - } - }).then(res => { - if (res.code === 0) { - this.tableData2 = res.data.executedList.records.map(v => { - return { - ...v, - groupName: v.groupName || '未命名群聊' - } - }) - this.total2 = res.data.executedList.total - this.groupInfo = res.data - } - }) - }, - countdown () { this.timer = setInterval(() => { const nowTime = this.$moment(new Date()) @@ -325,7 +303,7 @@ }, getInfo (id) { - this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/whchatmomentstask/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.info = res.data if (res.data.status === '4' && res.data.remindTime) { @@ -345,14 +323,8 @@ } }) - this.info.wxGroups = res.data.wxGroups.map(v => { - this.groups.push(...v.groupIds.split(',')) - return { - ...v, - groupIds: v.groupIds.split(',') - } - }) + this.userNames = res.data.groupList.map(e => e.userName).join(',') if (res.data.examines && res.data.examines.length) { const user = res.data.examines.filter(v => v.examineStatus === '2') diff --git a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/List.vue b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/List.vue index f1a2efa2..9e734a8f 100644 --- a/packages/wxwork/AnnounceResident/AppAnnounceResident/components/List.vue +++ b/packages/wxwork/AnnounceResident/AppAnnounceResident/components/List.vue @@ -3,7 +3,7 @@ @@ -106,7 +106,6 @@ startTime: '', endTime: '' }, - name: '', user: [], tableData: [], loading: false, @@ -155,16 +154,17 @@ getList() { this.loading = true - this.instance.post(`/app/appmasssendingtask/list`, null, { + this.instance.post(`/app/whchatmomentstask/list`, null, { params: { ...this.search, + taskType: 1 } }).then(res => { if (res.code == 0) { this.tableData = res.data.records.map(v => { return { ...v, - typeName: '群发居民群' + typeName: '群发居民' } }) this.total = res.data.total diff --git a/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/Add.vue b/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/Add.vue index 706a723d..bc29bcea 100644 --- a/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/Add.vue +++ b/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/Add.vue @@ -41,6 +41,17 @@
{{ form.filterCriteria.length ? '重新选择' : '选择' }}
+
+ +
+ +
+ {{ item.name }} +
+ 请选择 +
{{ form.filterTags.length ? '重新选择' : '选择' }}
+
+

消息预计送达居民群数:

{{ groupLen }} @@ -51,16 +62,6 @@
- -
- -
- {{ item.name }} -
- 请选择 -
{{ form.filterTags.length ? '重新选择' : '选择' }}
-
-
@@ -126,6 +127,17 @@ 从本地上传,图片最大支持10MB,支持JPG,PNG格式;视频最大支持10MB,支持MP4格式;文件最大支持20MB
+ + + + v.name).join(',') this.form.filterTags = [...this.chooseTags] + this.getWxGroups() this.isShowTags = false }, getInfo(id) { - this.instance.post(`/app/whchatmomentstask/customerTasKDetail?id=${id}`).then(res => { + this.instance.post(`/app/whchatmomentstask/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.form = { ...this.form, ...res.data, - wxGroupsName: '1', + filterTags: res.data.filterTags ? res.data.filterTags.split(',') : [], filterCriteria: res.data.filterCriteria.split(',') } @@ -451,7 +465,7 @@ export default { getWxGroups() { this.instance.post(`/app/whchatmomentstask/getSendScope`, { sendScope: this.form.sendScope, - filterTags: this.form.filterTags.map(v => v.id).join(','), + tags: this.form.filterTags.map(v => v.id).join(','), filterCriteria: this.form.filterCriteria.join(','), taskType: 0 }).then(res => { @@ -589,7 +603,7 @@ export default { this.$refs.form.validate((valid) => { if (valid) { if (!this.form.executorList.length) { - return this.$message.error('居民群数量不能为0') + return this.$message.error('居民数量不能为0') } if (sendType === 1 && !this.dateForm.choiceTime) { @@ -736,6 +750,21 @@ export default { overflow: hidden; } } + .filter-item { + display: flex; + align-items: center; + margin-top: 20px; + + .AppAnnounceDetail-select { + flex: 1; + } + + label { + width: 60px; + margin-right: 20px; + color: #666; + } + } .ai-form { textarea { diff --git a/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/List.vue b/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/List.vue index 678995ca..f90367e0 100644 --- a/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/List.vue +++ b/packages/wxwork/AnnounceWeChat/AppAnnounceWeChat/components/List.vue @@ -157,6 +157,7 @@ this.instance.post(`/app/whchatmomentstask/list`, null, { params: { ...this.search, + taskType: 0 } }).then(res => { if (res.code == 0) { diff --git a/ui/packages/basic/AiDialog.vue b/ui/packages/basic/AiDialog.vue index 9dab9a35..7e98f10b 100644 --- a/ui/packages/basic/AiDialog.vue +++ b/ui/packages/basic/AiDialog.vue @@ -47,7 +47,8 @@ export default { }, methods: { onCancel() { - this.dialog = false + this.$emit('update:visible', false) + this.$emit('onCancel') this.$emit('cancel') }, onConfirm() { diff --git a/vue.config.js b/vue.config.js index 61814631..e51ef632 100644 --- a/vue.config.js +++ b/vue.config.js @@ -57,7 +57,7 @@ module.exports = { proxy: { //设置代理,可解决跨5 '/lan': { - target: 'http://192.168.1.87:9000', + target: 'http://192.168.1.87:39000', changeOrigin: true, pathRewrite: { //地址重写