This commit is contained in:
shijingjing
2022-09-14 16:04:22 +08:00
parent ba2820c201
commit 1d43c9cd77
3 changed files with 31 additions and 86 deletions

View File

@@ -247,6 +247,7 @@ export default {
sendStatus: this.tabIndex==0? this.subIndex0: this.subIndex1, sendStatus: this.tabIndex==0? this.subIndex0: this.subIndex1,
taskId: this.id, taskId: this.id,
current: this.current, current: this.current,
size: 3000
}, },
}) })
.then((res) => { .then((res) => {

View File

@@ -153,7 +153,7 @@ export default {
if(this.tabIndex == 0) { if(this.tabIndex == 0) {
uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`}) uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`})
} else { } else {
alert('hhh') uni.navigateTo({url: `./circleDetail??id=${item.id}&time=${item.createTime}&type=${this.sendType}`})
} }
}, },

View File

@@ -1,19 +1,5 @@
<template> <template>
<div class="circleDetail"> <div class="circleDetail">
<!-- <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="content">
<div class="header"> <div class="header">
<div class="header_left"> <div class="header_left">
@@ -35,27 +21,19 @@
<div id="pieEcharts"></div> <div id="pieEcharts"></div>
<div class="pie_right"> <div class="pie_right">
<div> <div>
<span>{{ <span>计划执行成员</span>
tabIndex == 0 ? "计划执行成员:" : "计划送达居民群:"
}}</span>
<span>{{ info.planCount || 0 }}</span> <span>{{ info.planCount || 0 }}</span>
</div> </div>
<div> <div>
<span>{{ <span>未执行成员</span>
tabIndex == 0 ? "未执行成员:" : "未送达居民群:"
}}</span>
<span>{{ info.unExecutedCount || 0 }}</span> <span>{{ info.unExecutedCount || 0 }}</span>
</div> </div>
<div> <div>
<span>{{ <span>已执行成员</span>
tabIndex == 0 ? "已执行成员:" : "已送达居民群:"
}}</span>
<span>{{ info.executedCount || 0 }}</span> <span>{{ info.executedCount || 0 }}</span>
</div> </div>
<div> <div>
<span>{{ <span>无法执行成员</span>
tabIndex == 0 ? "无法执行成员:" : "无法送达居民群:"
}}</span>
<span>{{ info.cannotExecuteCount || 0 }}</span> <span>{{ info.cannotExecuteCount || 0 }}</span>
</div> </div>
</div> </div>
@@ -78,7 +56,7 @@
<AiTable <AiTable
:data="tableData" :data="tableData"
:colConfigs="tabIndex == 0 ? colConfigs0 : colConfigs1" :colConfigs="colConfigs"
v-if="tableData.length"/> v-if="tableData.length"/>
<AiEmpty v-if="!tableData.length" description="暂无数据"></AiEmpty> <AiEmpty v-if="!tableData.length" description="暂无数据"></AiEmpty>
</div> </div>
@@ -95,8 +73,7 @@ export default {
tabs: ["成员统计", "居民群统计"], tabs: ["成员统计", "居民群统计"],
tabIndex: 0, tabIndex: 0,
pieEcharts: null, pieEcharts: null,
subIndex0: 0, subIndex: 0,
subIndex1: 0,
tableData: [], tableData: [],
createTime: "", createTime: "",
id: "", id: "",
@@ -112,56 +89,25 @@ export default {
{ name: "无法执行" }, { name: "无法执行" },
], ],
update: true, update: true,
type: "",
}; };
}, },
computed: { computed: {
colConfigs0() { colConfigs() {
return [ return [
{ prop: "groupOwnerName", label: "成员" }, { prop: "groupOwnerName", label: "成员" },
{ label: "预计送达居民", prop: "groupCount" }, { prop: "groupCount", label: "预计送达居民"},
];
},
colConfigs1() {
return [
{ label: "居民群", prop: "groupName" },
{ label: "群人数", prop: "memberCount" },
{ slot: "groupOwnerId", label: "群主" },
]; ];
}, },
}, },
onLoad(o) { onLoad(o) {
this.id = o.id; this.id = o.id;
this.createTime = o.time; this.createTime = o.time;
this.type = o.type
}, },
methods: { methods: {
tabClick(index) {
this.tabIndex = index;
if(this.tabIndex == 0) {
this.subsection = [
{ name: "未执行" },
{ name: "已执行" },
{ name: "无法执行" },
]
this.update0 = true
this.update1 = false
this.$forceUpdate()
} else if(this.tabIndex == 1) {
this.subsection = [
{ name: "未送达" },
{ name: "已送达" },
{ name: "无法送达" },
]
this.update0 = false
this.update1 = true
this.$forceUpdate()
}
this.getStatistics();
},
getDetail() { getDetail() {
this.$http this.$http.post(`/app/whchatmomentstask/queryDetailById?id=${this.id}`).then((res) => {
.post(`/app/appmasssendingtask/queryDetailById?id=${this.id}`)
.then((res) => {
if (res?.data) { if (res?.data) {
this.detail = res.data; this.detail = res.data;
} }
@@ -220,25 +166,23 @@ export default {
}, },
// 获取数据 // 获取数据
getStatistics() { getStatistics() {
this.$http this.$http.post('/app/whchatmomentstask/detailStatistics', null, {
.post(`/app/appmasssendingtask/detailStatistics`, null, { params: {
params: { sendStatus: this.subIndex,
type: this.tabIndex, taskId: this.id,
sendStatus: this.tabIndex==0? this.subIndex0: this.subIndex1, current: this.current,
taskId: this.id, size: 3000,
current: this.current, },
size: 3000, })
}, .then((res) => {
}) if (res?.data) {
.then((res) => { this.info = res.data;
if (res?.data) { this.tableData = res.data.executedList.records;
this.info = res.data; setTimeout(()=>{
this.tableData = res.data.executedList.records; this.getPieEcharts();
setTimeout(()=>{ }, 1000)
this.getPieEcharts(); }
}, 1000) });
}
});
}, },
// 饼图 // 饼图
@@ -251,7 +195,7 @@ export default {
color: ["#1684fc", "#ccc"], color: ["#1684fc", "#ccc"],
series: [ series: [
{ {
name: this.tabIndex == 0 ? "任务完成率" : "群发送达率", name: "任务完成率",
type: "pie", type: "pie",
radius: ["50%", "70%"], radius: ["50%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,