|
|
@@ -25,7 +25,7 @@
|
|
|
<span class="info-label">活动类型:</span>
|
|
|
<span class="info-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ basicInfo.type || '--' }}</template>
|
|
|
+ <template v-else>{{ basicInfo.activityName || '--' }}</template>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="info-item">
|
|
|
@@ -33,7 +33,7 @@
|
|
|
<span class="info-label">活动时间:</span>
|
|
|
<span class="info-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ basicInfo.time || '--' }}</template>
|
|
|
+ <template v-else> {{ parseTime(basicInfo.startTime, '{y}-{m}-{d}') }} - {{ parseTime(basicInfo.endTime, '{y}-{m}-{d}') }}</template>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="info-item">
|
|
|
@@ -41,7 +41,7 @@
|
|
|
<span class="info-label">活动城市:</span>
|
|
|
<span class="info-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ basicInfo.city || '--' }}</template>
|
|
|
+ <template v-else>{{ basicInfo.cityName || '--' }}</template>
|
|
|
</span>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
@@ -55,7 +55,7 @@
|
|
|
<div class="overview-label">参与总人数</div>
|
|
|
<div class="overview-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ overviewData.totalPeople || '--' }}</template>
|
|
|
+ <template v-else>{{ overviewData.totalParticipants }}</template>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -65,7 +65,7 @@
|
|
|
<div class="overview-label">完成总人数</div>
|
|
|
<div class="overview-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ overviewData.completedPeople || '--' }}</template>
|
|
|
+ <template v-else>{{ overviewData.totalCompleted }}</template>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -75,7 +75,7 @@
|
|
|
<div class="overview-label">任务完成人次</div>
|
|
|
<div class="overview-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ overviewData.completedTimes || '--' }}</template>
|
|
|
+ <template v-else>{{ overviewData.totalTaskTimes }}</template>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -85,7 +85,7 @@
|
|
|
<div class="overview-label">已发放积分</div>
|
|
|
<div class="overview-value">
|
|
|
<el-skeleton v-if="loading" :rows="1" animated />
|
|
|
- <template v-else>{{ overviewData.issuedPoints || '--' }}</template>
|
|
|
+ <template v-else>{{ overviewData.totalPoints }}</template>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -97,9 +97,9 @@
|
|
|
<el-card shadow="hover">
|
|
|
<el-table v-if="!loading" :data="detailData" style="width: 100%">
|
|
|
<el-table-column prop="taskName" label="任务名称" width="180"></el-table-column>
|
|
|
- <el-table-column prop="completedPeople" label="完成人数" width="120" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="completedCount" label="完成人数" width="120" align="center"></el-table-column>
|
|
|
<el-table-column prop="completedTimes" label="完成人次" width="120" align="center"></el-table-column>
|
|
|
- <el-table-column prop="issuedPoints" label="发放积分" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="points" label="发放积分" align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
<el-skeleton v-else :rows="5" animated style="width: 100%"></el-skeleton>
|
|
|
</el-card>
|
|
|
@@ -113,6 +113,7 @@
|
|
|
import { getActivityStatistics } from "@/api/points/rules_api";
|
|
|
export default {
|
|
|
name: "Activity_statistics",
|
|
|
+ props: ['activityTypeOption', 'cityOptions'],
|
|
|
data() {
|
|
|
return {
|
|
|
drawerVisible: false,
|
|
|
@@ -135,12 +136,18 @@ export default {
|
|
|
},
|
|
|
async getActivityInfo(id) {
|
|
|
try {
|
|
|
- const res = await getActivityStatistics(id)
|
|
|
+ const res = await getActivityStatistics({id})
|
|
|
if (res.data) {
|
|
|
- let {basicInfo, overviewData, detailData} = res.data;
|
|
|
- this.basicInfo = basicInfo || {};
|
|
|
- this.overviewData = overviewData || {};
|
|
|
- this.detailData = detailData || [];
|
|
|
+ let {dataOverview, taskDetailList} = res.data;
|
|
|
+ this.basicInfo = {
|
|
|
+ name:res.data.name,
|
|
|
+ activityName: this.activityTypeOption.filter(item=>item.value == res.data.activityType)[0].label,
|
|
|
+ startTime: res.data.startTime,
|
|
|
+ endTime: res.data.endTime,
|
|
|
+ cityName: this.cityOptions.filter(item=>item.value == res.data.cityCode)[0].label,
|
|
|
+ };
|
|
|
+ this.overviewData = dataOverview;
|
|
|
+ this.detailData = taskDetailList;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
this.$message.error('获取数据失败,请稍后重试');
|