协同宣发

This commit is contained in:
shijingjing
2022-07-15 16:43:41 +08:00
parent 437f00aa15
commit 034e0e463a
4 changed files with 100 additions and 35 deletions

View File

@@ -1,106 +0,0 @@
<template>
<div class="detail">
<div class="task">
<div class="task_title">群发客户群</div>
<div class="task_content">
<div class="item">
<span>任务名称</span>
<span>居民社保最新政策</span>
</div>
<div class="item">
<span>创建人</span>
<span>居民社保最新政策</span>
</div>
<div class="item">
<span>所在部门</span>
<span>居民社保最新政策</span>
</div>
<div class="item">
<span>群发时间</span>
<span>居民社保最新政策</span>
</div>
</div>
</div>
<div class="info">
<div class="scope">
<span>群发范围</span>
<span>按条件筛选的全部X个客户群</span>
</div>
<div class="content">
<p>群发内容</p>
<div></div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {},
onShow() {
document.title = "群发审批"
}
}
</script>
<style lang="scss" scoped>
.detail {
padding: 32px;
box-sizing: border-box;
.task {
margin-bottom: 24px;
background: #FFF;
border-radius: 8px;
box-shadow: inset 0px -1px 0px 0px #DDDDDD;
.task_title {
padding: 26px 32px;
box-sizing: border-box;
border-bottom: 2px solid #DDDDDD;
}
.task_content {
padding: 0 32px 26px 32px;
box-sizing: border-box;
.item {
display: flex;
padding-top: 26px;
box-sizing: border-box;
span:first-child {
width: 160px;
color: #999999;
}
span:last-child {
width: calc(100% - 160px);
}
}
}
}
.info {
background: #FFF;
border-radius: 8px;
padding: 26px 32px;
box-sizing: border-box;
.scope {
display: flex;
margin-bottom: 16px;
span:first-child {
width: 160px;
color: #999;
}
span:last-child {
width: calc(100% - 160px);
}
}
.content {
p {
color: #999;
}
}
}
}
</style>

View File

@@ -1,311 +0,0 @@
<template>
<div class="groupSendDetail">
<AiTopFixed>
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{ item }}<span></span>
</div>
</div>
</AiTopFixed>
<div class="content">
<div class="header">
<div class="header_left">
<div>防疫宣传群发通知</div>
<div>创建时间: <span>{{ createTime }}</span></div>
</div>
<div class="header_right" @click="toDetail">查看详情</div>
</div>
<div class="pieEcharts">
<div class="pie_info">
<div class="tips">数据更新于2022-07-06 09:18:56</div>
<div class="pie_card">
<div id="pieEcharts"></div>
<div class="pie_right">
<div>计划送达居民群: <span>10</span></div>
<div>未送达居民群: <span>10</span></div>
<div>已送达居民群: <span>10</span></div>
<div>无法送达居民群: <span>10</span></div>
</div>
</div>
<div class="btn" :disabled="flag" @click="remindSend">提醒成员发送</div>
</div>
</div>
<div class="list_content">
<div class="list_card">
<div class="tab">
<u-subsection :list="subsection" :current="subIndex"></u-subsection>
</div>
<AiTable :data="tableData" :colConfigs="colConfigs0" v-if="tabIndex == 0"/>
<AiTable :data="tableData" :colConfigs="colConfigs1" v-if="tabIndex == 1"/>
</div>
</div>
</div>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
data() {
return {
tabs: ['成员统计', '居民群统计'],
tabIndex: 0,
pieEcharts: null,
subsection: [
{name: '未送达'},
{name: '已送达'},
{name: '无法送达'}
],
subIndex: 0,
tableData: [],
createTime: '',
id: '',
info: {},
flag: false,
timer: null,
current: 1,
}
},
computed: {
colConfigs0() {
return [
{ label: '成员', prop: 'groupOwnerId', width: '240rpx', dict: 'householdRelation' },
{ label: '预计未送达居民', prop: 'groupCount'},
]
},
colConfigs1() {
return [
{ label: '居民群', prop: 'groupName', width: '240rpx', dict: 'householdRelation' },
{ label: '群人数', prop: 'memberCount', width: '200rpx' },
{ label: '群主', prop: 'groupOwnerId', dict: 'sex' },
]
},
},
onLoad(o) {
this.id = o.id
this.createTime = o.time
this.getStatistics()
},
methods: {
tabClick(index) {
this.tabIndex = index
},
toDetail() {
uni.navigateTo({url: `./detail`})
},
// 提醒发送
remindSend() {
if(this.flag) return
var n = 60 * 60 * 1000
setTimeout(()=> {
})
this.$http.post('/app/appmasssendingtask/remindSend',null,{
params: {
id: this.id
}
}).then(res => {
console.log(res);
}).catch(err => {
console.log(err);
})
},
getStatistics() {
this.$http.post(`/app/appmasssendingtask/detailStatistics`, null, {
params: {
type: this.tabIndex,
sendStatus: this.subIndex,
taskId: this.id,
current: this.current
}
}).then(res => {
if(res?.data) {
this.tableData = res.data.executedList
}
})
},
// 带百分比饼图
getPieEcharts() {
this.pieEcharts = echarts.init(document.getElementById('pieEcharts'))
this.pieEcharts.setOption( {
// legend: {
// selectedMode:false
// },
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color:['#1684fc','#ccc'],
series: [
{
name: '群发送达率',
type: 'pie',
radius: ['65', '50%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
},
labelLine: {
show: false
},
data: [
{value: 10, name: '群发送达率', label:{
normal:{
show:true,
formatter: `{d}%\n群发居民群`,
textStyle: {
fontSize: 16,
},
}}
},
{value: 120,}
]
}
]
})
}
},
onShow() {
document.title = "群发居民群统计"
},
mounted() {
this.getPieEcharts()
}
}
</script>
<style lang="scss" scoped>
.groupSendDetail {
::v-deep .AiTopFixed .content {
padding: 0;
}
.tab-select {
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item {
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active {
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span {
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.header {
height: 160px;
padding: 32px;
box-sizing: border-box;
background: #FFF;
display: flex;
align-items: center;
.header_left {
width: calc(100% - 120px);
div:first-child {
color: #000000;
font-size: 32px;
font-weight: 600;
margin-bottom: 10px;
}
div:last-child {
color: #666666;
}
}
.header_right {
width: 120px;
color: #5297FF;
}
}
.pieEcharts {
width: 100%;
padding: 32px;
box-sizing: border-box;
.pie_info {
background: #FFF;
border-radius: 16px;
padding-bottom: 20px;
box-sizing: border-box;
.tips {
color: #666666;
padding: 40px 32px 0 32px;
box-sizing: border-box;
}
.pie_card {
display: flex;
width: 100%;
align-items: center;
#pieEcharts {
// flex: 1;
width: 60%;
height: 400px;
}
.pie_right {
// flex: 1;
width: 40%;
div {
margin-bottom: 10px;
}
}
}
.btn {
margin: 0 auto;
width: 90%;
height: 80px;
line-height: 80px;
text-align: center;
color: #FFF;
background: #3AA0FF;
border-radius: 8px;
}
}
}
.list_content {
padding: 0 32px;
box-sizing: border-box;
.list_card {
background: #FFF;
border-radius: 16px;
padding: 30px 30px;
.tab {
margin-bottom: 34px;
}
}
}
}
</style>

View File

@@ -1,314 +0,0 @@
<template>
<div class="groupSendResident">
<AiTopFixed>
<div class="search">
<div class="searchBox">
<u-search placeholder="请输入任务名称" v-model="taskTitle" @search="searchBtn" @clear="taskTitle='',current=1, list=[],getList()" :show-action="false"></u-search>
</div>
<div class="filterBtn" @click="filterShow = true"><img src="./images/shaixuan.png" alt="">筛选</div>
</div>
</AiTopFixed>
<div class="resident_list" v-if="list.length">
<div class="card" @click="toDetail(item)" v-for="(item,index) in list" :key="index">
<div class="card_title">
<div class="card_left">{{ item.taskTitle }}</div>
<div class="card_right"><span :class="item.status==0? 'status0': item.status==1? 'status1': item.status==2? 'status2':
item.status == 3? 'status3':item.status==4? 'status4': 'status5'"></span>{{ $dict.getLabel('mstStatus', item.status) }}</div>
</div>
<div>创建时间<span>{{ item.createTime }}</span></div>
<div>共需<span class="num">{{ item.groupOwnerCount }}</span>名成员完成群发目前已完成<span class="num">{{ item.completionRate || 0 }}%</span></div>
<div>创建部门<span>{{ item.createUserDept }}</span></div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!list.length"/>
<u-popup v-model="filterShow" mode="bottom" border-radius="14">
<div class="popup">
<div class="tips"></div>
<div class="title">
<div
class="cancel"
@click.stop="(filterShow = false), (timeSelect = 0)"
>
取消
</div>
<p>筛选条件</p>
<div class="confirm" @click.stop="selectConfirm">确定</div>
</div>
<scroll-view class="select-content" scroll-y="true">
<div class="type-list">
<div class="type-title">创建人</div>
<AiPagePicker class="select" type="sysUser" :selected.sync="createUserId">选择人员</AiPagePicker>
</div>
<div class="type-list">
<div class="type-title">群发时间</div>
<div class="item">
<div>开始时间</div>
<div style="display: flex;">
<u-input v-model="startTime" disabled placeholder="请选择开始时间" @click="showStart = true" />
<u-icon name="arrow-right"></u-icon>
</div>
</div>
<div class="item">
<div>结束时间</div>
<div style="display: flex;">
<u-input v-model="endTime" disabled placeholder="请选择开始时间" @click="showEnd = true" />
<u-icon name="arrow-right"></u-icon>
</div>
</div>
</div>
</scroll-view>
<u-picker mode="time" v-model="showStart" @confirm="confirmStart"></u-picker>
<u-picker mode="time" v-model="showEnd" @confirm="confirmEnd"></u-picker>
<div class="popBtn">
<div @click="reset">重置</div>
<div @click="selectConfirm">确认</div>
</div>
</div>
</u-popup>
</div>
</template>
<script>
export default {
data() {
return {
current: 1,
name: '',
list: [],
filterShow: false,
startTime: '',
endTime: '',
start: "",
end: "",
showStart: false,
showEnd: false,
taskTitle: '',
createUserId: [],
}
},
methods: {
toDetail(item) {
uni.navigateTo({url: `./groupSendDetail?id=${item.id}&time=${item.createTime}`})
},
searchBtn() {
this.current = 1
this.list = [],
this.getList()
},
getList() {
this.$http.post(`/app/appmasssendingtask/list`, null, {
params: {
current: this.current,
taskTitle: this.taskTitle,
createUserId: this.createUserId,
startTime: this.start,
endTime: this.end,
}
}).then(res=> {
if(res?.data) {
this.list = this.current == 1? res.data.records : [...res.data.records, ...this.list]
}
console.log(res);
})
},
filterBtn() {},
reset() {
this.startTime = '',
this.endTime = ''
},
selectConfirm() {
this.start = this.startTime,
this.end = this.endTime
this.filterShow = false
this.getList()
},
confirmStart(val) {
this.startTime = val.year + '-' + val.month + '-' + val.day
},
confirmEnd(val) {
this.endTime = val.year + '-' + val.month + '-' + val.day
},
},
onShow() {
document.title = '群发居民群'
this.$dict.load('mstStatus').then(() => {
this.getList()
})
},
onReachBottom() {
this.current ++
this.getList()
},
}
</script>
<style lang="scss" scoped>
.groupSendResident {
.search {
display: flex;
height: 80px;
align-items: center;
justify-content: space-between;
.searchBox {
width: 562px;
}
.filterBtn {
img {
width: 28px;
height: 28px;
}
}
}
.resident_list {
padding: 24px 32px 20px 32px;
box-sizing: border-box;
.card {
background: #FFF;
border-radius: 16px;
padding: 30px;
margin-bottom: 24px;
& > div {
padding: 10px 0;
}
.num {
color: #3AA0FF;
}
.card_title {
display: flex;
justify-content: space-between;
.card_left {
font-size: 32px;
color: #000000;
font-weight: 600;
}
.card_right {
span {
display: inline-block;
width: 16px;
height: 16px;
// background: #3399FF;
border-radius: 50%;
margin-right: 10px;
}
.status0 {
background: #3399FF;
}
.status1 {
background: #FFA938;
}
.status2 {
background: #3399FF;
}
.status3 {
background: #1CCEB0;
}
.status4 {
background: #FF6758;
}
.status5 {
background: #FF6758;
}
.status6 {
background: #999999;
}
}
}
}
}
.popup {
box-sizing: border-box;
// height: 800px;
.tips {
width: 80px;
height: 6px;
background: #dddddd;
border-radius: 4px;
padding: 0 32px;
box-sizing: border-box;
margin: 32px auto 8px auto;
}
.title {
height: 48px;
line-height: 48px;
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #222;
padding: 0 32px;
box-sizing: border-box;
padding-bottom: 32px;
.cancel {
display: inline-block;
width: 200px;
color: #aaa;
}
.confirm {
display: inline-block;
width: 200px;
text-align: right;
color: #333;
}
p {
display: inline-block;
width: calc(100% - 400px);
text-align: center;
font-size: 28px;
}
}
.select-content {
height: calc(100% - 100px);
overflow-y: scroll;
}
.type-list {
padding: 0 32px;
box-sizing: border-box;
margin-bottom: 32px;
.type-title {
line-height: 108px;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
}
.item {
display: flex;
justify-content: space-between;
& > div:last-child {
::v-deep .uni-input-input,
::v-deep .uni-input-placeholder {
text-align: right;
}
}
}
.active {
background: #1365dd;
color: #fff;
}
}
.popBtn {
display: flex;
height: 98px;
line-height: 98px;
div {
width: 50%;
border: 2px solid #3399ff;
text-align: center;
}
div:first-child {
color: #3399ff;
}
div:last-child {
color: #fff;
background: #3399ff;
}
}
}
}
</style>