协同宣发

This commit is contained in:
yanran200730
2023-03-01 10:04:58 +08:00
parent 04c47c0387
commit e709e1e74f
7 changed files with 260 additions and 165 deletions

View File

@@ -26,7 +26,7 @@
<div class="user">
<img src="https://cdn.cunwuyun.cn/dvcp/announce/user.png" />
<span>{{ info.createUserName }}</span>
<span>{{ info.createUserDeptName }}</span>
<span>({{ info.createUserDeptName }})</span>
</div>
</ai-info-item>
<ai-info-item label="审批人" isLine v-if="info.enableExamine === '1'">
@@ -42,8 +42,8 @@
<ai-info-item label="群发范围" isLine>
<div class="text">
<span>{{ info.sendScope === '0' ? '全部' : '按条件筛选的' }}</span>
<i>{{ groups.length }}</i>
<span>个居民</span>
<i>{{ info.groupList.length }}</i>
<span>个居民</span>
<em @click="isShowGroups = true">详情</em>
</div>
</ai-info-item>
@@ -73,25 +73,25 @@
<div class="top">
<div class="top-item">
<div class="top-item__title">
<h3>计划执行成员</h3>
<h3>预计执行员工</h3>
</div>
<p>{{ memberInfo.planCount || 0 }}</p>
</div>
<div class="top-item">
<div class="top-item__title">
<h3>未执行</h3>
<h3>未执行员</h3>
</div>
<p>{{ memberInfo.unExecutedCount || 0 }}</p>
</div>
<div class="top-item">
<div class="top-item__title">
<h3>已执行</h3>
<h3>已执行员</h3>
</div>
<p>{{ memberInfo.executedCount || 0 }}</p>
</div>
<div class="top-item">
<div class="top-item__title">
<h3>无法执行</h3>
<h3>无法执行员</h3>
<el-tooltip
placement="top"
content="由于员工不在可见范围、离职、客户群接收已达到上限等原因,无法执行群发任务的成员总数">
@@ -115,7 +115,7 @@
:instance="instance"
@pick="e => onUserChange(e, 'search1')" :multiple="false" v-model="user1">
<div class="userSelcet">
<span style="color: #606266;" v-if="search1.deptartId">{{ name1 }}</span>
<span style="color: #606266;" v-if="search1.deptartId"><ai-open-data type="departmentName" :openid="search1.deptartId"></ai-open-data></span>
<span v-else>部门</span>
<i class="el-icon-arrow-up" v-if="!search1.deptartId"></i>
<i class="el-icon-circle-close" v-if="search1.deptartId" @click.stop="user1 = [], search1.deptartId = '', search1.current = 1, getMemberInfo()"></i>
@@ -151,14 +151,20 @@
width="890px"
title="群发范围"
@onConfirm="isShowGroups = false">
<ai-table
:tableData="info.wxGroups"
:col-configs="colConfigs3"
border
tableSize="small"
:isShowPagination="false"
@getList="() => {}">
</ai-table>
<ai-wrapper>
<ai-info-item label="消息发送" isLine :value="info.taskTitle">
<div class="text">
<span>{{ info.sendScope === '0' ? '全部' : '按条件筛选的' }}</span>
<i>{{ info.groupList.length }}</i>
<span>个居民</span>
</div>
</ai-info-item>
<ai-info-item label="添加人" isLine :value="userNames"></ai-info-item>
<ai-info-item label="标签" isLine>{{ info.filterTagsName || '-' }}</ai-info-item>
<ai-info-item label="剔除标签" isLine>{{ info.excludeFilterTagsName || '-' }}</ai-info-item>
<ai-info-item label="性别" isLine>{{ mapGender(info.gender) }}</ai-info-item>
<ai-info-item label="添加时间" isLine>{{ info.addEndTime + '-' + info.addFromTime }}</ai-info-item>
</ai-wrapper>
</ai-dialog>
<div class="detail-phone" v-if="isShowPhone">
<div class="mask"></div>
@@ -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')