This commit is contained in:
shijingjing
2022-07-22 13:54:18 +08:00
parent e2d99bedd4
commit 9a75f0b343
2 changed files with 52 additions and 35 deletions

View File

@@ -31,20 +31,27 @@
数据更新于<span>{{ info.remindTime }}</span> 数据更新于<span>{{ info.remindTime }}</span>
</div> </div>
<div class="pie_card"> <div class="pie_card">
<div v-show="info.executedCount != null" id="pieEcharts"></div> <div id="pieEcharts"></div>
<AiEmpty description="暂无数据" v-show="info.executedCount == null" />
<div class="pie_right"> <div class="pie_right">
<div> <div>
计划送达居民群: <span>{{ info.planCount || 0 }}</span> <span v-show="tabIndex==0">计划送达居民:</span>
<span v-show="tabIndex==1">计划送达居民群:</span>
<span>{{ info.planCount || 0 }}</span>
</div> </div>
<div> <div>
未送达居民群: <span>{{ info.unExecutedCount || 0 }}</span> <span v-show="tabIndex==0">未送达居民:</span>
<span v-show="tabIndex==1">未送达居民群:</span>
<span>{{ info.unExecutedCount || 0 }}</span>
</div> </div>
<div> <div>
已送达居民群: <span>{{ info.executedCount || 0 }}</span> <span v-show="tabIndex==0">已送达居民:</span>
<span v-show="tabIndex==1">已送达居民群:</span>
<span>{{ info.executedCount || 0 }}</span>
</div> </div>
<div> <div>
无法送达居民群: <span>{{ info.cannotExecuteCount || 0 }}</span> <span v-show="tabIndex==0">无法送达居民:</span>
<span v-show="tabIndex==1">无法送达居民群:</span>
<span>{{ info.cannotExecuteCount || 0 }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -60,13 +67,27 @@
<AiTable <AiTable
:data="tableData" :data="tableData"
:colConfigs="colConfigs0" :colConfigs="colConfigs0"
v-if="tabIndex == 0" v-if="tabIndex == 0 && tableData.length">
/> <u-td slot="groupOwnerId" align="center">
<template #slot="{ row }">
<p>{{row}}</p>
<AiOpenData v-if="row.groupOwnerId" type="userName" :openid="row.groupOwnerId"/>
</template>
</u-td>
</AiTable>
<AiTable <AiTable
:data="tableData" :data="tableData"
:colConfigs="colConfigs1" :colConfigs="colConfigs1"
v-if="tabIndex == 1" v-if="tabIndex == 1 && tableData.length"
/> >
<u-td slot="groupOwnerId" align="center">
<template #slot="{ row }">
<p>{{row}}</p>
<AiOpenData v-if="row.groupOwnerId" type="userName" :openid="row.groupOwnerId"/>
</template>
</u-td>
</AiTable>
<AiEmpty v-if="!tableData.length" description="暂无数据"></AiEmpty>
</div> </div>
</div> </div>
</div> </div>
@@ -100,25 +121,15 @@ export default {
computed: { computed: {
colConfigs0() { colConfigs0() {
return [ return [
{ { slot: "groupOwnerId",label: "成员" },
label: "成员", { label: "预计送达居民群", prop: "groupCount" }
prop: "groupOwnerId",
width: "240rpx",
dict: "householdRelation",
},
{ label: "预计未送达居民", prop: "groupCount" },
]; ];
}, },
colConfigs1() { colConfigs1() {
return [ return [
{ { label: "居民群",prop: "groupName" },
label: "居民群", { label: "群人数", prop: "memberCount"},
prop: "groupName", { slot: "groupOwnerId",label: "群主"}
width: "240rpx",
dict: "householdRelation",
},
{ label: "群人数", prop: "memberCount", width: "200rpx" },
{ label: "群主", prop: "groupOwnerId", dict: "sex" },
]; ];
}, },
}, },
@@ -129,6 +140,7 @@ export default {
methods: { methods: {
tabClick(index) { tabClick(index) {
this.tabIndex = index; this.tabIndex = index;
this.getStatistics()
}, },
toDetail() { toDetail() {
@@ -171,12 +183,12 @@ export default {
this.$u.toast(msg); this.$u.toast(msg);
} }
}, },
// 切换分段器
changeSub(index) { changeSub(index) {
this.subIndex = index; this.subIndex = index;
this.getStatistics() this.getStatistics()
}, },
// 获取数据
getStatistics() { getStatistics() {
this.$http this.$http
.post(`/app/appmasssendingtask/detailStatistics`, null, { .post(`/app/appmasssendingtask/detailStatistics`, null, {
@@ -189,26 +201,26 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res?.data) { if (res?.data) {
this.tableData = res.data.executedList; this.info = res.data
this.tableData = res.data.executedList.records
} }
this.getPieEcharts() this.getPieEcharts()
}); });
}, },
// 带百分比饼图 // 饼图
getPieEcharts() { getPieEcharts() {
this.pieEcharts = echarts.init(document.getElementById("pieEcharts")); this.pieEcharts = echarts.init(document.getElementById("pieEcharts"));
this.pieEcharts.setOption({ this.pieEcharts.setOption({
tooltip: { tooltip: {
trigger: "item", trigger: "item",
formatter: "{a} <br/>{b}: {c} ({d}%)",
}, },
color: ["#1684fc", "#ccc"], color: ["#1684fc", "#ccc"],
series: [ series: [
{ {
name: "群发送达率", name: "群发送达率",
type: "pie", type: "pie",
radius: ["65", "50%"], radius: ["50%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
label: { label: {
normal: { normal: {
@@ -221,7 +233,7 @@ export default {
}, },
data: [ data: [
{ {
value: 10, value: this.info.executedCount,
name: "群发送达率", name: "群发送达率",
label: { label: {
normal: { normal: {
@@ -233,7 +245,7 @@ export default {
}, },
}, },
}, },
{ value: 120 }, { value: this.info.unExecutedCount },
], ],
}, },
], ],
@@ -255,6 +267,11 @@ export default {
::v-deep .AiTopFixed .content { ::v-deep .AiTopFixed .content {
padding: 0; padding: 0;
} }
::v-deep .emptyWrap {
border: 2px solid #D0D4DC;
border-radius: 8px;
padding-bottom: 20px;
}
.tab-select { .tab-select {
width: 100%; width: 100%;
height: 96px; height: 96px;
@@ -359,7 +376,7 @@ export default {
} }
.list_content { .list_content {
padding: 0 32px; padding: 0 32px 32px 32px;
box-sizing: border-box; box-sizing: border-box;
.list_card { .list_card {

View File

@@ -39,7 +39,7 @@
<p>群发内容</p> <p>群发内容</p>
<div> <div>
<!-- 文本 --> <!-- 文本 -->
<div class="textarea" v-show="content.length">{{ content[0].content }}</div> <div class="textarea" v-show="content && content.length>0">{{ content[0].content }}</div>
<!-- 图片 --> <!-- 图片 -->
<div class="pictures" v-show="picList.length"> <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)"/> <image v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl" @click.stop="previewImages(picList, item.imgPicUrl)"/>