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,
taskId: this.id,
current: this.current,
size: 3000
},
})
.then((res) => {

View File

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

View File

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