数据统计加分页
This commit is contained in:
@@ -68,30 +68,6 @@ export async function listActivity(params) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询活动机构数据统计
|
||||
* @param id 活动id
|
||||
*/
|
||||
export async function getActivityStatistics(id) {
|
||||
const res = await request.get('/sylive/activity/statistics/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询活动团队数据统计
|
||||
* @param id 活动id
|
||||
*/
|
||||
export async function getActivityStatisticsTeam(id) {
|
||||
const res = await request.get('/sylive/activity/statistics_team/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加活动
|
||||
* @param data 活动信息
|
||||
@@ -223,3 +199,55 @@ export async function getActivitystoreBarchart(params) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询活动机构数据统计
|
||||
* @param id 活动id
|
||||
*/
|
||||
export async function getActivityStatistics(id) {
|
||||
const res = await request.get('/sylive/statistics/biz/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询活动团队数据统计
|
||||
* @param id 活动id
|
||||
*/
|
||||
export async function getActivityStatisticsTeam(id) {
|
||||
const res = await request.get('/sylive/statistics/team/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询门店统计
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageStatisticsBiz(params) {
|
||||
const res = await request.get('/sylive/statistics/page_biz', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询顾问统计
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageStatisticsConsultant(params) {
|
||||
const res = await request.get('/sylive/statistics/page_consultant', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<ele-empty v-show="browseBizRank.length ? false : true"></ele-empty>
|
||||
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
||||
<div style="padding: 10px 10px 10px 10px">
|
||||
<div
|
||||
@@ -98,6 +97,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -117,6 +117,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -130,7 +131,6 @@
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<ele-empty v-show="subscribeBizRank.length ? false : true"></ele-empty>
|
||||
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
||||
<div style="padding: 10px 10px 10px 10px">
|
||||
<div
|
||||
@@ -144,6 +144,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -163,6 +164,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -176,7 +178,6 @@
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<ele-empty v-show="watchBizRank.length ? false : true"></ele-empty>
|
||||
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
||||
<div style="padding: 10px 10px 10px 10px">
|
||||
<div
|
||||
@@ -190,6 +191,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -209,6 +211,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -222,7 +225,6 @@
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<ele-empty v-show="orderBizRank.length ? false : true"></ele-empty>
|
||||
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
||||
<div style="padding: 10px 10px 10px 10px">
|
||||
<div
|
||||
@@ -236,6 +238,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -255,6 +258,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
title="门店统计"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
size="mini"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageStatisticsBiz } from '@/api/sylive/activity';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'bizName',
|
||||
label: '门店名称',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'consultant',
|
||||
label: '参与/全部顾问数',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'browse',
|
||||
label: '浏览数(人)',
|
||||
align: 'center',
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'subscribe',
|
||||
label: '预约数(人)',
|
||||
align: 'center',
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'watch',
|
||||
label: '观看数(人)',
|
||||
align: 'center',
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'order',
|
||||
label: '订单数(单)',
|
||||
align: 'center',
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'livePV',
|
||||
label: '观看数(人次)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'watchDuration',
|
||||
label: '人均观看(分)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, order }) {
|
||||
const activityId = this.$route.query.id;
|
||||
if (!activityId) {
|
||||
return;
|
||||
}
|
||||
return pageStatisticsBiz({ ...order, page, limit, activityId });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
title="顾问统计"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
size="mini"
|
||||
>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageStatisticsConsultant } from '@/api/sylive/activity';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'consultantName',
|
||||
label: '顾问名称',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'browse',
|
||||
label: '浏览数(人)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'subscribe',
|
||||
label: '预约数(人)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'watch',
|
||||
label: '观看数(人)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'order',
|
||||
label: '订单数(单)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'livePV',
|
||||
label: '观看数(人次)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
},
|
||||
{
|
||||
prop: 'watchDuration',
|
||||
label: '人均观看(分)',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, order }) {
|
||||
const activityId = this.$route.query.id;
|
||||
if (!activityId) {
|
||||
return;
|
||||
}
|
||||
return pageStatisticsConsultant({ ...order, page, limit, activityId });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -97,6 +97,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -116,6 +117,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -135,6 +137,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -161,6 +164,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -180,6 +184,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -199,6 +204,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -225,6 +231,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -244,6 +251,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -263,6 +271,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -289,6 +298,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -308,6 +318,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -327,6 +338,7 @@
|
||||
:stroke-width="10"
|
||||
:show-text="false"
|
||||
:percentage="item.percent"
|
||||
v-if="!isNaN(parseInt(item.percent))"
|
||||
/>
|
||||
</div>
|
||||
<div>{{ item.value }}</div>
|
||||
@@ -397,114 +409,8 @@
|
||||
/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card
|
||||
shadow="never"
|
||||
header="门店统计"
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<el-table :data="statistics.bizData">
|
||||
<el-table-column
|
||||
label="门店名称"
|
||||
prop="bizName"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="consultant"
|
||||
label="参与/全部顾问数"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="browse"
|
||||
label="浏览数(人)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="subscribe"
|
||||
label="预约数(人)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="watch"
|
||||
label="观看数(人次)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单数(单)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="livePV"
|
||||
label="观看数(人次)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="watchDuration"
|
||||
label="人均观看(分)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card
|
||||
shadow="never"
|
||||
header="顾问统计"
|
||||
body-style="padding: 11px;"
|
||||
class="workplace-table-card"
|
||||
>
|
||||
<el-table :data="statistics.consultantData">
|
||||
<el-table-column
|
||||
label="顾问名称"
|
||||
prop="consultantName"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="browse"
|
||||
label="浏览数(人)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="subscribe"
|
||||
label="预约数(人)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="watch"
|
||||
label="观看数(人次)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单数(单)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="livePV"
|
||||
label="观看数(人次)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="watchDuration"
|
||||
label="人均观看(分)"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<biz-table />
|
||||
<consultant-table />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -520,14 +426,14 @@
|
||||
import VChart from 'vue-echarts';
|
||||
import 'echarts-wordcloud';
|
||||
import { echartsMixin } from '@/utils/echarts-mixin';
|
||||
import BizTable from './components/biz-table.vue';
|
||||
import ConsultantTable from './components/consultant-table.vue';
|
||||
|
||||
use([CanvasRenderer, TooltipComponent, FunnelChart]);
|
||||
|
||||
export default {
|
||||
name: 'SyliveActivityStatistics',
|
||||
components: {
|
||||
VChart
|
||||
},
|
||||
components: { VChart, BizTable, ConsultantTable },
|
||||
mixins: [echartsMixin(['funnelChart'])],
|
||||
data() {
|
||||
return {
|
||||
@@ -872,11 +778,9 @@
|
||||
/* 人数分布排名 */
|
||||
.monitor-user-count-item {
|
||||
margin-bottom: 8px;
|
||||
|
||||
:deep(.el-progress-bar__outer) {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.ele-cell-content {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user