576 lines
16 KiB
Vue
576 lines
16 KiB
Vue
<template>
|
||
<ai-detail class="AppAnnounceDetail">
|
||
<template slot="title">
|
||
<ai-title title="群发详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||
</ai-title>
|
||
</template>
|
||
<template slot="content">
|
||
<ai-card title="基础信息">
|
||
<template #right>
|
||
<div class="right-tips">
|
||
<el-tooltip
|
||
placement="top"
|
||
content="任务开始后,3天内15分钟更新1次,3天后访问页面时触发更新,1时间最多刷新1次">
|
||
<i class="iconfont iconDetails"></i>
|
||
</el-tooltip>
|
||
<span>数据更新于{{ info.dataUpdateTime }}</span>
|
||
</div>
|
||
</template>
|
||
<template #content>
|
||
<ai-wrapper>
|
||
<ai-info-item label="任务名称" isLine :value="info.taskTitle"></ai-info-item>
|
||
<ai-info-item label="任务状态" isLine>
|
||
<span>{{ dict.getLabel('mstStatus', info.status) }}</span>
|
||
</ai-info-item>
|
||
<ai-info-item label="创建人">
|
||
<div class="user">
|
||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/user.png" />
|
||
<span><ai-open-data type="userName" :openid="info.createUserId"></ai-open-data></span>
|
||
</div>
|
||
</ai-info-item>
|
||
<ai-info-item label="审批人">
|
||
<div class="user-wrapper">
|
||
<div class="user" v-for="(item, index) in info.examines" :key="index">
|
||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/user.png" />
|
||
<span>
|
||
<ai-open-data type="userName" :openid="item.examineUserId"></ai-open-data>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</ai-info-item>
|
||
<ai-info-item label="创建时间" :value="info.createTime"></ai-info-item>
|
||
<ai-info-item label="群发时间" :value="info.choiceTime"></ai-info-item>
|
||
<ai-info-item label="群发范围" isLine>
|
||
<div class="text">
|
||
<span>按条件筛选的</span>
|
||
<i>{{ info.wxGroups ? info.wxGroups.length : 0 }}</i>
|
||
<span>个客户群</span>
|
||
<em>详情</em>
|
||
</div>
|
||
</ai-info-item>
|
||
<ai-info-item label="消息内容" isLine>
|
||
<div class="msg">
|
||
<p>{{ content }}</p>
|
||
<div class="msg-bottom" v-if="fileList.length">
|
||
<div class="left">
|
||
<img :src="mapIcon(fileList[0].msgType)" />
|
||
<span>{{ mapType(fileList[0].msgType) }}{{ fileList[0].mpTitle || fileList[0].name || fileList[0].linkTitle }} 等</span>
|
||
<i>{{ fileList.length }}</i>
|
||
<span>个附件</span>
|
||
</div>
|
||
<div class="right">预览消息</div>
|
||
</div>
|
||
</div>
|
||
</ai-info-item>
|
||
</ai-wrapper>
|
||
</template>
|
||
</ai-card>
|
||
<ai-card>
|
||
<template #title>
|
||
<div class="AppAnnounceDetail-title">
|
||
<span :class="[currIndex === 0 ? 'active' : '']" @click="currIndex = 0">成员统计</span>
|
||
<span :class="[currIndex === 1 ? 'active' : '']" @click="currIndex = 1">居民群统计</span>
|
||
</div>
|
||
</template>
|
||
<template #content>
|
||
<div class="content-item" v-if="currIndex === 0">
|
||
<div class="top">
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>计划执行成员</h3>
|
||
</div>
|
||
<p>{{ memberInfo.planCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>未执行成员</h3>
|
||
</div>
|
||
<p>{{ memberInfo.cannotExecuteCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>已执行成员</h3>
|
||
</div>
|
||
<p>{{ memberInfo.executedCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>无法执行成员</h3>
|
||
<el-tooltip
|
||
placement="top"
|
||
content="由于员工不在可见范围、离职、客户群接收已达到上限等原因,无法执行群发任务的成员总数">
|
||
<i class="iconfont iconDetails"></i>
|
||
</el-tooltip>
|
||
</div>
|
||
<p>{{ memberInfo.unExecutedCount || 0 }}</p>
|
||
</div>
|
||
</div>
|
||
<div class="bottom">
|
||
<div class="bottom-search">
|
||
<div class="left">
|
||
<el-radio-group v-model="search1.sendStatus" size="small" @change="search1.current = 1, getMemberInfo()">
|
||
<el-radio-button size="small" label="0">未执行</el-radio-button>
|
||
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
||
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
||
</el-radio-group>
|
||
</div>
|
||
<el-button type="primary" @click="sendMsg(0)">提醒成员发送</el-button>
|
||
</div>
|
||
<ai-table
|
||
:tableData="tableData1"
|
||
:col-configs="colConfigs1"
|
||
:total="total1"
|
||
border
|
||
tableSize="small"
|
||
:current.sync="search1.current"
|
||
:size.sync="search1.size"
|
||
@getList="getMemberInfo">
|
||
<el-table-column slot="user" label="成员" align="center">
|
||
<template slot-scope="{ row }">
|
||
<div class="userinfo">
|
||
<span>
|
||
<ai-open-data type="userName" :openid="row.groupOwnerId"></ai-open-data>
|
||
</span>
|
||
<span style="color: #999">
|
||
<ai-open-data type="departmentName" :openid="row.mainDepartment"></ai-open-data>
|
||
</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
</ai-table>
|
||
</div>
|
||
</div>
|
||
<div class="content-item" v-if="currIndex === 1">
|
||
<div class="top">
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>计划送达居民群</h3>
|
||
</div>
|
||
<p>{{ groupInfo.planCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>未送达居民群</h3>
|
||
</div>
|
||
<p>{{ groupInfo.planCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>已送达居民群</h3>
|
||
</div>
|
||
<p>{{ groupInfo.planCount || 0 }}</p>
|
||
</div>
|
||
<div class="top-item">
|
||
<div class="top-item__title">
|
||
<h3>无法送达居民群</h3>
|
||
</div>
|
||
<p>{{ groupInfo.planCount || 0 }}</p>
|
||
</div>
|
||
</div>
|
||
<div class="bottom">
|
||
<div class="bottom-search">
|
||
<div class="left">
|
||
<el-radio-group v-model="search2.sendStatus" size="small" @change="search2.current = 1, getGroupInfo()">
|
||
<el-radio-button size="small" label="0">未执行</el-radio-button>
|
||
<el-radio-button size="small" label="1">已执行</el-radio-button>
|
||
<el-radio-button size="small" label="2">无法执行</el-radio-button>
|
||
</el-radio-group>
|
||
</div>
|
||
<el-button type="primary" @click="sendMsg(1)">提醒成员发送</el-button>
|
||
</div>
|
||
<ai-table
|
||
:tableData="tableData2"
|
||
:col-configs="colConfigs2"
|
||
:total="total2"
|
||
border
|
||
tableSize="small"
|
||
:current.sync="search2.current"
|
||
:size.sync="search2.size"
|
||
@getList="getGroupInfo">
|
||
<el-table-column slot="user" label="群组" align="center">
|
||
<template slot-scope="{ row }">
|
||
<div class="userinfo">
|
||
<span>
|
||
<ai-open-data type="userName" :openid="row.groupOwnerId"></ai-open-data>
|
||
</span>
|
||
<span style="color: #999">
|
||
<ai-open-data type="departmentName" :openid="row.mainDepartment"></ai-open-data>
|
||
</span>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
</ai-table>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</ai-card>
|
||
</template>
|
||
</ai-detail>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
name: 'Detail',
|
||
|
||
props: {
|
||
instance: Function,
|
||
dict: Object,
|
||
params: Object
|
||
},
|
||
|
||
data () {
|
||
return {
|
||
total1: 0,
|
||
total2: 0,
|
||
radio1: '未执行',
|
||
search1: {
|
||
current: 1,
|
||
size: 10,
|
||
deptartId: '',
|
||
type: 0,
|
||
sendStatus: '0'
|
||
},
|
||
search2: {
|
||
current: 1,
|
||
size: 10,
|
||
deptartId: '',
|
||
type: 1,
|
||
sendStatus: '0'
|
||
},
|
||
memberInfo: {},
|
||
groupInfo: {},
|
||
tableData1: [],
|
||
fileList: [],
|
||
tableData2: [],
|
||
info: {},
|
||
content: '',
|
||
currIndex: 0,
|
||
colConfigs1: [
|
||
{ slot: 'user', label: '成员', openType: 'userName' },
|
||
{ prop: 'groupCount', label: '预计送达居民群', align: 'center' }
|
||
],
|
||
colConfigs2: [
|
||
{ prop: 'groupName', label: '居民群' },
|
||
{ prop: 'memberCount', label: '群人数', align: 'center' },
|
||
{ slot: 'user', label: '群主', align: 'center' },
|
||
]
|
||
}
|
||
},
|
||
|
||
created () {
|
||
this.getInfo(this.params.id)
|
||
this.getMemberInfo()
|
||
this.getGroupInfo()
|
||
},
|
||
|
||
methods: {
|
||
getMemberInfo () {
|
||
this.instance.post(`/app/appmasssendingtask/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.memberInfo = res.data
|
||
}
|
||
})
|
||
},
|
||
|
||
sendMsg (type) {
|
||
this.instance.post(`/app/appmasssendingtask/remindSend?id=${this.params.id}`).then(res => {
|
||
if (res.code === 0) {
|
||
this.$message.success('提醒成功')
|
||
}
|
||
})
|
||
},
|
||
|
||
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
|
||
this.total2 = res.data.executedList.total
|
||
this.groupInfo = res.data
|
||
}
|
||
})
|
||
},
|
||
|
||
getInfo (id) {
|
||
this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => {
|
||
if (res.code === 0) {
|
||
this.info = res.data
|
||
|
||
const content = res.data.contents.filter(v => v.msgType === '0')
|
||
|
||
if (content.length) {
|
||
this.content = content[0].content
|
||
}
|
||
|
||
this.fileList = res.data.contents.filter(v => v.msgType !== '0').map(v => {
|
||
return {
|
||
...v,
|
||
...v.sysFile
|
||
}
|
||
})
|
||
}
|
||
})
|
||
},
|
||
|
||
getList () {
|
||
|
||
},
|
||
|
||
mapType (type) {
|
||
return {
|
||
1: '图片',
|
||
2: '视频',
|
||
3: '文件',
|
||
4: '网站',
|
||
5: '小程序'
|
||
}[type]
|
||
},
|
||
|
||
mapIcon (type) {
|
||
return {
|
||
1: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||
2: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||
3: 'https://cdn.cunwuyun.cn/dvcp/announce/folder.png',
|
||
4: 'https://cdn.cunwuyun.cn/dvcp/announce/site.png',
|
||
5: 'https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png'
|
||
}[type]
|
||
},
|
||
|
||
cancel (isRefresh) {
|
||
this.$emit('change', {
|
||
type: 'list',
|
||
isRefresh: !!isRefresh
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.AppAnnounceDetail {
|
||
.user-wrapper {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.userinfo {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
line-height: 1;
|
||
|
||
span:first-child {
|
||
margin-bottom: 4px;
|
||
}
|
||
}
|
||
.user {
|
||
display: flex;
|
||
align-items: center;
|
||
line-height: 1;
|
||
margin-right: 8px;
|
||
|
||
img {
|
||
width: 16px;
|
||
height: 16px;
|
||
margin-right: 2px;
|
||
}
|
||
|
||
span {
|
||
position: relative;
|
||
top: 2px;
|
||
color: #222222;
|
||
font-size: 12px;
|
||
}
|
||
}
|
||
|
||
.text {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
i {
|
||
color: #2266FF;
|
||
font-style: normal;
|
||
}
|
||
|
||
em {
|
||
margin-left: 8px;
|
||
color: #2266FF;
|
||
font-size: 12px;
|
||
font-style: normal;
|
||
cursor: pointer;
|
||
transition: all ease 0.3s;
|
||
|
||
&:hover {
|
||
opacity: 0.6;
|
||
}
|
||
}
|
||
}
|
||
|
||
.msg {
|
||
background: #F9F9F9;
|
||
border-radius: 2px;
|
||
border: 1px solid #D0D4DC;
|
||
|
||
p {
|
||
line-height: 1.3;
|
||
padding: 8px 12px;
|
||
}
|
||
|
||
.msg-bottom {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
height: 38px;
|
||
padding: 0 16px;
|
||
border-top: 1px solid #D0D4DC;
|
||
|
||
.left {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
img {
|
||
width: 16px;
|
||
height: 16px;
|
||
margin-right: 8px;
|
||
}
|
||
|
||
span {
|
||
color: #222222;
|
||
font-size: 14px;
|
||
}
|
||
|
||
i {
|
||
color: #2266FF;
|
||
font-size: 14px;
|
||
font-style: normal;
|
||
}
|
||
}
|
||
|
||
.right {
|
||
color: #2266FF;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
|
||
&:hover {
|
||
opacity: 0.6;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
::v-deep .AppAnnounceDetail-title {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
span {
|
||
height: 100%;
|
||
line-height: 56px;
|
||
margin-right: 32px;
|
||
color: #888888;
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
transition: all ease 0.3s;
|
||
border-bottom: 3px solid transparent;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
|
||
&:hover {
|
||
color: #222;
|
||
}
|
||
|
||
&:last-child {
|
||
margin-right: 0;
|
||
}
|
||
|
||
&.active {
|
||
color: #222222;
|
||
border-bottom: 3px solid #2266FF;
|
||
}
|
||
}
|
||
}
|
||
|
||
.content-item {
|
||
.top {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 16px;
|
||
|
||
.top-item {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
flex: 1;
|
||
height: 90px;
|
||
margin-right: 16px;
|
||
padding: 0 16px;
|
||
background: #F9F9F9;
|
||
border-radius: 2px;
|
||
|
||
&:last-child {
|
||
margin-right: 0;
|
||
}
|
||
|
||
.top-item__title {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 8px;
|
||
|
||
i {
|
||
margin-left: 4px;
|
||
color: #8899bb;
|
||
font-size: 16px;
|
||
}
|
||
}
|
||
|
||
h3 {
|
||
color: #222222;
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
}
|
||
|
||
p {
|
||
color: #2266FF;
|
||
font-size: 24px;
|
||
font-weight: 700;
|
||
}
|
||
}
|
||
}
|
||
|
||
.bottom-search {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-bottom: 16px;
|
||
}
|
||
}
|
||
|
||
::v-deep .right-tips {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
i {
|
||
margin-right: 4px;
|
||
color: #8899bb;
|
||
font-size: 16px;
|
||
}
|
||
|
||
span {
|
||
color: #888888;
|
||
font-size: 12px;
|
||
}
|
||
}
|
||
}
|
||
</style>
|