删除旧版协同宣发

This commit is contained in:
liuye
2023-06-12 16:16:00 +08:00
parent 8e43673152
commit 3611e47d64
17 changed files with 0 additions and 1806 deletions

View File

@@ -1,354 +0,0 @@
<template>
<div class="AppCooperationPropaganda">
<AiTopFixed>
<div class="search">
<div class="searchBox">
<u-search placeholder="请输入任务名称" v-model="taskTitle" clearabled @search="searchBtn" @clear="taskTitle='',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.choiceTime }}</span></div>
<div>共需<span class="num">{{ item.groupOwnerCount || 0 }}</span>名成员完成群发目前已完成<span class="num">{{ item.completionRate || 0 }}%</span></div>
<div>
创建部门
<span v-if="item.createUserDeptName">{{ item.createUserDeptName }}</span>
</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!list.length"/>
<AiConsole></AiConsole>
<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 type="custom" :selected.sync="userIdList" nodeKey="createUserId" :ops="{url:`./selectUser`,label: 'id'}">
<div class="page_picker">
<span class="label" v-if="userIdList.length">已选择</span>
<span v-else style="color:#999;">请选择</span>
<u-icon name="arrow-right" color="#303133" size="24" style="margin-left:8px;"/>
</div>
</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 {
name: 'AppCooperationPropaganda',
appName: '协同宣发',
data() {
return {
current: 1,
name: '',
list: [],
filterShow: false,
startTime: '',
endTime: '',
start: "",
end: "",
showStart: false,
showEnd: false,
taskTitle: '',
createUserId: '',
userList: [],
userIdList: []
}
},
methods: {
toDetail(item) {
uni.navigateTo({url: `./cooperationDetail?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,
startTime: this.start,
endTime: this.end,
createUserId: this.createUserId,
}
}).then(res=> {
if(res?.data) {
this.list = this.current == 1? res.data.records : [...this.list,...res.data.records]
}
})
},
reset() {
this.start = '',
this.end = '',
this.startTime = '',
this.endTime = ''
this.userIdList = []
this.createUserId = ''
uni.setStorageSync('userSelect', [])
},
selectConfirm() {
if(this.userIdList.length) {
this.createUserId = this.userIdList?.[0].userId
}
this.start = this.startTime,
this.end = this.endTime
let startTmp = this.start.split("-");
let endTmp = this.end.split("-");
let stT = new Date(startTmp[0], startTmp[1], startTmp[2]);
let edT = new Date(endTmp[0], endTmp[1], endTmp[2]);
if (stT.getTime() > edT.getTime()) {
this.$u.toast("开始日期不能大于结束日期!");
this.filterShow = true
return
}
this.filterShow = false
this.current = 1
this.list = []
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.list = []
this.current = 1
this.getList()
})
},
onReachBottom() {
this.current ++
this.getList()
},
}
</script>
<style lang="scss" scoped>
.AppCooperationPropaganda {
.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: #FFA938;
}
.status1 {
background: #FF6758;
}
.status2 {
background: #3399FF;
}
.status3 {
background: #FF6758;
}
.status4 {
background: #3399FF;
}
.status5 {
background: #1CCEB0;
}
.status6 {
background: #666666;
}
}
}
}
}
.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;
}
.user {
display: flex;
justify-content: space-between;
}
}
.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;
}
}
}
.page_picker {
display: flex;
justify-content: space-between;
}
}
</style>

View File

@@ -1,533 +0,0 @@
<template>
<div class="cooperationDetail">
<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>{{ detail.taskTitle }} <span :class="detail.status==0? 'status0': detail.status==1? 'status1': detail.status==2? 'status2':
detail.status == 3? 'status3':detail.status==4? 'status4': 'status5'">{{ $dict.getLabel('mstStatus', detail.status) }}</span></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" v-if="detail.status">
数据更新于<span>{{ info.remindTime }}</span>
</div>
<div class="pie_card">
<div id="pieEcharts"></div>
<div class="pie_right">
<div>
<span>{{
tabIndex == 0 ? "计划执行成员:" : "计划送达居民群:"
}}</span>
<span>{{ info.planCount || 0 }}</span>
</div>
<div>
<span>{{
tabIndex == 0 ? "未执行成员:" : "未送达居民群:"
}}</span>
<span>{{ info.unExecutedCount || 0 }}</span>
</div>
<div>
<span>{{
tabIndex == 0 ? "已执行成员:" : "已送达居民群:"
}}</span>
<span>{{ info.executedCount || 0 }}</span>
</div>
<div v-if="detail.sendChannel !=1">
<span>{{
tabIndex == 0 ? "无法执行成员:" : "无法送达居民群:"
}}</span>
<span>{{ info.cannotExecuteCount || 0 }}</span>
</div>
</div>
</div>
<div v-if="detail.status == 4" class="btn" @click="remindSend">提醒成员发送</div>
</div>
</div>
<div class="list_content">
<div class="list_card">
<div class="tab" >
<div class="item" :class="subIndex == index? 'bgactive': ''" v-for="(item,index) in subsection" :key="index" @click="changeSub(index)">
{{ item }}
</div>
</div>
<AiTable
:data="tableData"
:colConfigs="tabIndex == 0 ? colConfigs0 : colConfigs1"
v-if="tableData.length"/>
<AiEmpty v-if="!tableData.length" description="暂无数据"></AiEmpty>
</div>
</div>
</div>
</div>
</template>
<script>
import echarts from "echarts";
export default {
data() {
return {
tabs: ["成员统计", "居民群统计"],
tabIndex: 0,
pieEcharts: null,
subIndex: 0,
tableData: [],
createTime: "",
id: "",
info: {},
current: 1,
firstClickTime: "",
currentClickTime: "",
detail: {},
subsection: [],
sendChannel: ''
};
},
computed: {
colConfigs0() {
return [
{ prop: "groupOwnerName", label: "成员" },
{ label: "预计送达居民群", prop: "groupCount" },
];
},
colConfigs1() {
return [
{ label: "居民群", prop: "groupName" },
{ label: "群人数", prop: "memberCount" },
{ prop: "groupOwnerName", label: "群主" },
];
},
},
onLoad(o) {
this.id = o.id;
this.createTime = o.time;
},
methods: {
tabClick(index) {
this.tabIndex = index;
this.subIndex = 0
if(this.sendChannel == 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行"]
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达"]
}
} else if(this.sendChannel != 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行","无法执行"]
} else if(this.tabIndex == 1) {
this.subsection = ["未送达","已送达","无法送达"]
}
}
this.getStatistics();
},
getDetail() {
this.$http
.post(`/app/appmasssendingtask/queryDetailById?id=${this.id}`)
.then((res) => {
if (res?.data) {
this.detail = res.data;
}
});
},
toDetail() {
uni.navigateTo({ url: `./detail?id=${this.id}` });
},
// 提醒发送
remindSend() {
uni.getSystemInfo({
success: (res)=>{
if(res.platform == "ios") {
this.firstClickTime = new Date(this.detail.remindTime.replace(/-/g, "/")).getTime() || 0
} else {
this.firstClickTime = new Date(this.detail.remindTime).getTime() || 0
}
}
});
this.currentClickTime = +new Date();
let time = this.currentClickTime - this.firstClickTime;
if (time >= 3600000) {
this.$http.post("/app/appmasssendingtask/remindSend", null, {
params: {
id: this.id,
},
})
.then((res) => {
if (res?.code == 0) {
this.$u.toast("已提醒成员发送");
this.getDetail()
}
})
.catch(() => {});
} else {
time = 3600000 - time;
const min = Math.floor(time / 60000); // 分钟
let second = Math.floor(time / 1000); // 秒
second %= 60;
let msg = ``;
if (min > 0 && second > 0) {
msg = `${min}分钟${second}秒后可以再次点击`;
} else if (min > 0 && second <= 0) {
msg = `${min}分钟后可以再次点击`;
} else if (min <= 0 && second > 0) {
msg = `${second}秒后可以再次点击`;
}
this.$u.toast(msg);
}
},
// 切换分段器
changeSub(index) {
this.subIndex = index;
this.getStatistics();
},
// 获取数据
getStatistics() {
this.$http
.post(`/app/appmasssendingtask/detailStatistics`, null, {
params: {
type: this.tabIndex,
sendStatus: this.subIndex,
taskId: this.id,
current: this.current,
size: 3000
},
})
.then((res) => {
if (res?.data) {
this.info = res.data;
this.tableData = res.data.executedList.records;
setTimeout(()=>{
this.getPieEcharts();
}, 1000)
}
});
},
// 饼图
getPieEcharts() {
this.pieEcharts = echarts.init(document.getElementById("pieEcharts"));
this.pieEcharts.setOption({
tooltip: {
show: false,
},
color: ["#1684fc", "#ccc"],
series: [
{
name: this.tabIndex == 0 ? "任务完成率" : "群发送达率",
type: "pie",
radius: ["50%", "70%"],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: "center",
},
},
labelLine: {
show: false,
},
data: [
{
value: this.info.executedCount,
name: "已执行成员",
label: {
normal: {
show: true,
formatter: ({ name, value }) => {
let num = value / this.info.planCount * 100
if (this.tabIndex == 0) {
return num % 1==0? `{name|任务达成率\n\n}{value|${num}%}`: `{name|任务达成率\n\n}{value|${ num.toFixed(1) }%}`;
} else {
return num % 1==0? `{name|群发送达率\n\n}{value|${num}%}`: `{name|群发送达率\n\n}{value|${ num.toFixed(1) }%}`;
}
},
textStyle: {
fontSize: 16,
},
rich: {
name: {
color: "#999",
},
value: {
color: "#000000",
fontSize: 26,
},
},
},
},
},
{
value: this.info.planCount - this.info.executedCount ,
name: "未执行成员"
},
],
},
],
});
},
},
watch: {
detail: {
handler(v) {
if(v) {
this.sendChannel = v.sendChannel
if(v.sendChannel == 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达"]
this.$forceUpdate()
}
} else if(v.sendChannel != 1) {
if(this.tabIndex == 0) {
this.subsection = ["未执行","已执行","无法执行"]
this.$forceUpdate()
} else if(this.tabIndex == 1){
this.subsection = ["未送达","已送达","无法送达"]
this.$forceUpdate()
}
}
}
},
deep: true
}
},
onShow() {
document.title = "群发居民群统计";
this.$dict.load("mstStatus")
this.getDetail();
this.getStatistics();
},
mounted() {
this.getPieEcharts();
},
};
</script>
<style lang="scss" scoped>
.cooperationDetail {
::v-deep .AiTopFixed .content {
padding: 0;
}
::v-deep .emptyWrap {
border: 2px solid #d0d4dc;
border-radius: 8px;
padding-bottom: 20px;
}
.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;
span {
display: inline-block;
padding: 0 8px;
border: 1px solid;
border-radius: 6px;
font-size: 26px;
font-weight: normal;
margin-left: 8px;
}
.status0 {
color: #FFA938 !important;
}
.status1 {
color: #FF6758 !important;
}
.status2 {
color: #3399FF !important;
}
.status3 {
color: #FF6758 !important;
}
.status4 {
color: #3399FF !important;
}
.status5 {
color: #1CCEB0 !important;
}
.status6 {
color: #666666 !important;
}
}
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 {
width: 60%;
height: 400px;
}
::v-deep .emptyWrap {
width: 60%;
}
.pie_right {
width: 40%;
padding-right: 30px;
box-sizing: border-box;
div {
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
}
}
.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 32px 32px;
box-sizing: border-box;
.list_card {
background: #fff;
border-radius: 16px;
padding: 30px 30px;
.tab {
margin-bottom: 34px;
::v-deep .u-subsection uni-view{
background: #eeef !important;
}
}
::v-deep .AiTable .u-table .u-tr .u-td p{
width: 100%;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
::v-deep .AiTable .u-table .u-tr .u-td {
width: 30%;
}
}
}
.tab {
height: 70px;
background-color: #eeeeef;
padding: 3px 4px;
border-radius: 10px;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
.item {
flex: 1;
height: 58px;
line-height: 58px;
align-self: center;
color: #3aa0ff;
text-align: center;
border-radius: 16px;
}
.bgactive {
background: #fff;
font-weight: 600;
}
}
}
</style>

View File

@@ -1,326 +0,0 @@
<template>
<div class="detail">
<div class="task">
<div class="task_title">群发客户群</div>
<div class="task_content">
<div class="item">
<span>任务名称</span>
<span>{{ data.taskTitle }}</span>
</div>
<div class="item">
<span>创建人</span>
<span>{{ data.createUserName }}</span>
</div>
<div class="item" v-if="data.enableExamine == 1">
<span>审批人</span>
<span>
<span v-for="(item, index) in approver" :key="index" style="color: #333;">
{{ item.examineUserName }}
<span v-show="index < approver.length - 1"></span>
</span>
</span>
</div>
<div class="item">
<span>所在部门</span>
<span style="display: flex;">
<div v-if="data.createUserDeptName">{{ data.createUserDeptName }}</div>
</span>
</div>
<div class="item">
<span>群发时间</span>
<span>{{ data.choiceTime }}</span>
</div>
<div class="item" v-if="data.sendChannel == 1">
<span>结束时间</span>
<span>{{ data.taskEndTime }}</span>
</div>
</div>
<div class="task_results" v-if="data.enableExamine == 1">
<img v-if="data.status == 1" src="./images/refuse.png" alt="">
<img v-if="data.status == 2 || data.status == 4" src="./images/pass.png" alt="">
</div>
</div>
<div class="info">
<div class="scope">
<span>群发范围</span>
<span v-if="data.sendScope==0">全部{{ data.receiveGroupCount || 0}}个居民群</span>
<span v-if="data.sendScope==1 || data.sendScope==2">按条件筛选的{{ data.receiveGroupCount || 0}}个居民群</span>
</div>
<div class="content">
<p>群发内容</p>
<div>
<!-- 文本 -->
<div class="textarea" v-show="content.length">{{ content }}</div>
<!-- 图片 -->
<div class="pictures" v-show="picList.length">
<image v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl" @click.stop="previewImages(picList, item.imgPicUrl)"/>
</div>
<!-- 视频 -->
<div class="video" v-show="videoList.length">
<video v-for="(item, index) in videoList" :key="index" :src="item.imgPicUrl"/>
</div>
<!-- 文件 -->
<div class="file" v-show="fileList.length">
<div class="file_item" v-for="(item,index) in fileList" :key="index" @click="prevFile(item.sysFile)">
<img src="./images/files.png" alt="">
<div>{{ item.sysFile.name }}</div>
</div>
</div>
<!-- 网页 -->
<div class="webpage" v-show="webpage.length">
<p>链接地址</p>
<a v-for="(item, index) in webpage" :key="index" :href="item.linkUrl">
<div v-if="item.linkTitle">{{item.linkTitle}}</div>
<div v-else>{{ item.linkUrl }}</div>
</a>
</div>
<!-- 小程序 -->
<div class="miniapp" v-show="miniapp.length">
<p>小程序</p>
<div v-for="(item, index) in miniapp" :key="index">{{item.mpTitle}}</div>
</div>
</div>
</div>
</div>
<div class="btn" v-if="data.status==0 && data.haveExaminPower">
<div class="refuse" @click="refuseBtn">审核拒绝</div>
<div class="pass" @click="passBtn">审核通过</div>
</div>
</div>
</template>
<script>
import { mapState ,mapActions } from "vuex";
export default {
name : "detail",
data() {
return {
id: "",
data: {},
content: '',
picList: [],
videoList: [],
fileList: [],
webpage: [],
miniapp: [],
pictres: [],
options: '',
approver: [], //审批人
}
},
onLoad(o) {
this.id = o.id
},
computed: {
...mapState(['user'])
},
methods: {
toMassDispatch() {
uni.navigateTo({ url: `./massDispatch?id=${this.id}`})
},
getDetail() {
this.$http.post(`/app/appmasssendingtask/queryDetailById?id=${this.id}`).then(res=> {
if (res?.data) {
this.data = res.data
this.content = res.data.contents.filter(v=> v.msgType == 0)?.[0].content
this.picList = res.data.contents.filter(v=> v.msgType == 1)
this.videoList = res.data.contents.filter(v=> v.msgType == 2)
this.fileList = res.data.contents.filter(v=> v.msgType == 3)
this.webpage = res.data.contents.filter(v=> v.msgType == 4)
this.miniapp = res.data.contents.filter(v=> v.msgType == 5)
this.approver = res.data.examines
// if(res.data.status==1) { // 拒绝
// this.approver = res.data.examines.filter(e=> e.examineStatus == 2)
// } else { // 通过
// this.approver = res.data.examines
// }
}
})
},
previewImages(images, img) {
uni.previewImage({
urls: images.map(v => v.imgPicUrl),
current: img
})
},
...mapActions(['previewFile']),
prevFile(file) {
this.$loading()
this.previewFile({ ...file }).then(()=>{
this.$hideLoading()
})
},
// 拒绝
refuseBtn() {
this.pass = 0
this.$confirm('确认审核拒绝该任务?').then(() => {
this.examine()
})
},
// 通过
passBtn() {
this.pass = 1
this.$confirm('确认审核通过该任务?').then(() => {
this.examine()
})
},
examine() {
this.$http.post(`/app/appmasssendingtask/examine`,null,{
params: {
pass: this.pass,
id: this.id,
options: this.options
}
}).then(res => {
if(res?.code == 0) {
if(this.pass == 0) {
this.$u.toast('任务已拒绝')
} else if(this.pass == 1) {
this.$u.toast('任务审核通过')
}
this.getDetail()
}
}).catch(()=> {
})
},
},
onShow() {
document.title = "群发审批"
this.getDetail()
}
}
</script>
<style lang="scss" scoped>
.detail {
padding: 32px 32px 140px 32px;
box-sizing: border-box;
.task {
position: relative;
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);
}
}
}
.task_results {
position: absolute;
right: 30px;
top: 30px;
img {
width: 160px;
height: 130px;
}
}
}
.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;
}
.textarea,
.pictures,
.video,
.file,
.webpage,
.miniapp {
background: #F9F9F9;
border-radius: 4px;
padding: 20px;
box-sizing: border-box;
margin-top: 26px;
}
.pictures {
margin-top: 16px;
image {
width: 190px;
height: 190px;
margin-right: 4px;
margin-bottom: 4px;
}
image:nth-child(3n) {
margin-right: 0;
}
}
.video {
video {
height: 300px;
}
}
.file {
.file_item {
display: flex;
align-items: center;
img {
width: 96px;
height: 96px;
}
}
}
}
}
.btn {
position: fixed;
display: flex;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
font-size: 32px;
z-index: 9;
.refuse {
width: 40%;
height: 100%;
background: #FFF;
color: #FF4466;
text-align: center;
}
.pass {
width: 60%;
height: 100%;
background: #3975C6;
color: #FFF;
text-align: center;
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,358 +0,0 @@
<template>
<div class="massDispatch">
<div class="tips">
<u-icon name="error-circle-fill" size="30" color="#ff9900"></u-icon>请于{{ data.taskEndTime }}前完成群发任务</div>
<div class="task">
<div class="task_title">群发客户群</div>
<div class="task_content">
<div class="item">
<span>任务名称</span>
<span>{{ data.taskTitle }}</span>
</div>
<div class="item">
<span>创建人</span>
<span>{{ data.createUserName }}</span>
</div>
</div>
<div class="task_results">
<!-- 5结束 8关闭 -->
<img v-if="data.status == 5" src="./images/finish.png" alt="">
<img v-if="data.status == 8" src="./images/close.png" alt="">
</div>
</div>
<div class="info">
<div class="scope">
<span>群发范围</span>
<span>我的全部居民群</span>
</div>
<div class="content">
<p>群发内容</p>
<div>
<!-- 文本 -->
<div class="textarea" v-show="content.length">{{ content }}</div>
<!-- 图片 -->
<div class="pictures" v-show="picList.length">
<image v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl" @click.stop="previewImages(picList, item.imgPicUrl)"/>
</div>
<!-- 视频 -->
<div class="video" v-show="videoList.length">
<video v-for="(item, index) in videoList" :key="index" :src="item.imgPicUrl"/>
</div>
<!-- 文件 -->
<div class="file" v-show="fileList.length">
<div class="file_item" v-for="(item,index) in fileList" :key="index" @click="prevFile(item.sysFile)">
<img src="./images/files.png" alt="">
<div>{{ item.sysFile.name }}</div>
</div>
</div>
<!-- 网页 -->
<div class="webpage" v-show="webpage.length">
<p>链接地址</p>
<a v-for="(item, index) in webpage" :key="index" :href="item.linkUrl">
<div v-if="item.linkTitle">{{item.linkTitle}}</div>
<div v-else>{{ item.linkUrl }}</div>
</a>
</div>
<!-- 小程序 -->
<div class="miniapp" v-show="miniapp.length">
<p>小程序</p>
<div v-for="(item, index) in miniapp" :key="index">{{item.mpTitle}}</div>
</div>
</div>
</div>
</div>
<AiConsole></AiConsole>
<div class="subBtn" @click="toSend" v-if="data.status == 4">
<div>前往群发</div>
</div>
</div>
</template>
<script>
import { mapState , mapActions } from "vuex";
export default {
name: "massDispatch",
data() {
return {
id: "",
data: {},
content: '',
picList: [],
videoList: [],
fileList: [],
webpage: [],
miniapp: [],
pictres: [],
options: '',
approver: [], //审批人
status: ''
}
},
onLoad(o) {
this.id = o.id
},
computed: {
...mapState(['user'])
},
methods: {
getDetail() {
this.$http.post(`/app/appmasssendingtask/queryDetailById?id=${this.id}`).then(res=> {
if (res?.data) {
this.data = res.data
this.content = res.data.contents.filter(v=> v.msgType == 0)?.[0].content
this.picList = res.data.contents.filter(v=> v.msgType == 1)
this.videoList = res.data.contents.filter(v=> v.msgType == 2)
this.fileList = res.data.contents.filter(v=> v.msgType == 3)
this.webpage = res.data.contents.filter(v=> v.msgType == 4)
this.miniapp = res.data.contents.filter(v=> v.msgType == 5)
this.approver = res.data.examines
}
})
},
previewImages(images, img) {
uni.previewImage({
urls: images.map(v => v.imgPicUrl),
current: img
})
},
...mapActions(['previewFile', 'shareToExternalChat']),
prevFile(file) {
this.$loading()
this.previewFile({ ...file }).then(()=>{
this.$hideLoading()
})
},
toSend() {
// 文本
const text = {
content: this.content
}
let data = []
// 图片
const imgs = this.picList.map(v =>{
return {
msgtype: "image",
image: {
mediaid: v.mediaId,
imgUrl: v.imgPicUrl,
},
}
})
// 视频
const videos = this.videoList.map(v =>{
return {
msgtype: "video",
video:{
mediaid: v.mediaId,
},
}
})
// 文件
const files = this.fileList.map(v => {
return {
msgtype: "file",
file:{
mediaid: v.mediaId,
},
}
})
// 链接
const links = this.webpage.map(v =>{
return {
msgtype: "link",
link: {
title: v.linkTitle,
imgUrl: v.linkPicUrl,
desc: v.linkDesc,
url: v.linkUrl,
},
}
})
// 小程序
const miniapps = this.miniapp.map(v =>{
return {
msgtype: "miniprogram",
miniprogram: {
appid: v.mpAppid,
title: v.mpTitle,
imgUrl : v.sysFile.accessUrl,
page: v.mpPage,
},
}
})
data = [ ...imgs, ...videos, ...files, ...links, ...miniapps ]
this.shareToExternalChat({ text: text, attachments: data }).then((res) =>{
console.log(res)
if(res.err_msg == "shareToExternalChat:ok") {
this.status = 'ok'
this.nextCallback()
} else if(res.err_msg == "shareToExternalChat:fail_empty parameters" || res.err_msg == "shareToExternalChat:cancel") {
console.log('取消发送')
} else {
this.status = 'fail'
this.nextCallback()
}
}).catch(()=>{})
},
nextCallback() {
this.$http.post(`/app/appmasssendingtask/h5Callback`, null, {
params: {
id: this.id,
status: this.status,
}
}).then((res) =>{
console.log(res);
})
}
},
onShow() {
document.title = "群发居民群任务"
this.getDetail()
}
}
</script>
<style lang="scss" scoped>
.massDispatch {
padding: 32px 32px 140px 32px;
box-sizing: border-box;
.tips {
width: 100%;
height: 50px;
line-height: 50px;
background: #fff1e8;
border: 1px solid #ff9e61;
border-radius: 8px;
margin-bottom: 16px;
padding: 0 30px;
box-sizing: border-box;
}
.task {
position: relative;
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);
}
}
}
.task_results {
position: absolute;
right: 30px;
top: 30px;
img {
width: 202px;
height: 200px;
}
}
}
.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;
}
.textarea,
.pictures,
.video,
.file,
.webpage,
.miniapp {
background: #F9F9F9;
border-radius: 4px;
padding: 20px;
box-sizing: border-box;
margin-top: 26px;
}
.pictures {
margin-top: 16px;
image {
width: 190px;
height: 190px;
margin-right: 4px;
margin-bottom: 4px;
}
image:nth-child(3n) {
margin-right: 0;
}
}
.video {
video {
height: 300px;
}
}
.file {
.file_item {
display: flex;
align-items: center;
img {
width: 96px;
height: 96px;
}
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
padding: 18px 32px;
box-sizing: border-box;
div {
width: 100%;
height: 80px;
line-height: 80px;
text-align: center;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
cursor: pointer;
}
}
}
</style>

View File

@@ -1,235 +0,0 @@
<template>
<section class="selectUser">
<div class="header-middle">
<div class="userCards" v-for="e in userList" :key="e.userId">
<div class="imges">
<div class="imgselect" :class="{ 'checked': e.isChecked }" @click.stop="itemCheck(e)" />
<img src="./images/tx@2x.png" alt="" class="avatras"/>
</div>
<div class="rights fill">
<div class="applicationNames">{{ e.userName }}</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!userList"/>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
</section>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "selectUser",
appName: "选择创建人",
data() {
return {
selected: {},
userList: [],
current: 1,
}
},
computed: {
...mapState(['user']),
hasData() {
return this.userList?.length > 0
}
},
onLoad() {
this.selected = uni.getStorageSync('userSelect') || []
this.getCreateUserList()
},
methods: {
isSelected(userId) {
return this.selected.userId === userId
},
getCreateUserList() {
this.userList = []
this.$http.post(`/app/appmasssendingtask/createUserlist`).then(res => {
if (res?.data) {
this.userList = res.data.map(e => ({
userId: e.create_user_id,
userName: e.create_user_name,
isChecked: this.isSelected(e.create_user_id)}
))
}
})
},
itemCheck(row) {
this.userList.forEach(e => e.isChecked = false)
const index = this.userList.findIndex(o => {
return row.userId===o.userId
})
this.userList[index].isChecked = true
this.selected = this.userList[index]
},
submit() {
if(!this.selected.userId) {
return this.$u.toast('请选择创建人')
}
uni.$emit("pagePicker:custom", [this.selected])
uni.setStorageSync('userSelect', this.selected)
uni.navigateBack()
},
}
}
</script>
<style lang="scss" scoped>
.selectUser {
height: 100%;
background: #fff;
.header-top {
background: #fff;
padding: 20px 32px;
}
.header-middle {
padding-bottom: 140px;
.hint {
padding: 28px 20px 28px 32px;
line-height: 56px;
box-shadow: 0 1px 0 0 #e4e5e6;
font-size: 30px;
font-weight: 500;
word-break: break-all;
}
.empty-div {
height: 16px;
background: #f5f5f5;
}
.imges {
display: flex;
align-items: center;
.imgselect {
width: 48px;
height: 48px;
vertical-align: middle;
background-image: url("./images/xz.png");
background-position: center;
background-size: 100% 100%;
&.checked {
background-image: url("./images/xzh.png");
}
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
width: calc(100% - 160px);
display: flex;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
.applicationNames {
flex: 1;
min-width: 0;
font-size: 36px;
font-weight: 500;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.imgs {
flex-shrink: 0;
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
.userCards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
.rights {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
padding-right: 40px;
height: inherit;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.idNumbers {
color: #666;
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
margin: 20px 34px 0 0;
float: right;
}
}
.color-3F8DF5 {
color: #3F8DF5;
}
.mar-h4 {
margin: 0 4px;
}
}
</style>