|
|
@ -129,70 +129,70 @@ |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row style="margin-top: 20px"> |
|
|
|
<el-card> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-tabs v-model="activeTab" @tab-change="handleTabChange"> |
|
|
|
<el-tab-pane label="金币充值" name="recharge"></el-tab-pane> |
|
|
|
<el-tab-pane label="金币消费" name="consume"></el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-col> |
|
|
|
<div style="margin-top:5px;width:40vw">合计 |
|
|
|
永久金币 {{ activeTab === 'recharge' ? sumRechargePermanent / 100 : sumConsumePermanent / 100 }} |
|
|
|
免费金币 {{ activeTab === 'recharge' ? sumRechargeFree / 100 : sumConsumeFree / 100 }} |
|
|
|
任务金币 {{ activeTab === 'recharge' ? sumRechargeTask / 100 : sumConsumeTask / 100 }} |
|
|
|
</div> |
|
|
|
<div @change="handleDatePickerChange" style="width:15vw"> |
|
|
|
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''">今日 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getWeek()" :type="activeTimeRange === 'week' ? 'primary' : ''">本周 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getMonth()" :type="activeTimeRange === 'month' ? 'primary' : ''">本月 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getYear()" :type="activeTimeRange === 'year' ? 'primary' : ''">本年 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="→" start-placeholder="开始时间" |
|
|
|
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" style="width:20vw" |
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" /> |
|
|
|
<el-button type="primary" style="margin-left: 5px" @click="getChartData">查询</el-button> |
|
|
|
</div> |
|
|
|
</el-row> |
|
|
|
<el-card> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-tabs v-model="activeTab" @tab-change="handleTabChange"> |
|
|
|
<el-tab-pane label="金币充值" name="recharge"></el-tab-pane> |
|
|
|
<el-tab-pane label="金币消费" name="consume"></el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-col> |
|
|
|
<div style="margin-top:5px;width:40vw">合计 |
|
|
|
永久金币 {{ activeTab === 'recharge' ? sumRechargePermanent / 100 : sumConsumePermanent / 100 }} |
|
|
|
免费金币 {{ activeTab === 'recharge' ? sumRechargeFree / 100 : sumConsumeFree / 100 }} |
|
|
|
任务金币 {{ activeTab === 'recharge' ? sumRechargeTask / 100 : sumConsumeTask / 100 }} |
|
|
|
</div> |
|
|
|
<div @change="handleDatePickerChange" style="width:15vw"> |
|
|
|
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''">今日 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getWeek()" :type="activeTimeRange === 'week' ? 'primary' : ''">本周 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getMonth()" :type="activeTimeRange === 'month' ? 'primary' : ''">本月 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getYear()" :type="activeTimeRange === 'year' ? 'primary' : ''">本年 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="→" start-placeholder="开始时间" |
|
|
|
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" style="width:20vw" |
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" :disabled-date="disabledDate" @change="handleDatePickerChange" /> |
|
|
|
<el-button type="primary" style="margin-left: 5px" @click="getChartData">查询</el-button> |
|
|
|
</div> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 20px"> |
|
|
|
<el-col :span="18"> |
|
|
|
<div class="bar"> |
|
|
|
<div ref="chartRef" style="width: 100%; height: 400px"></div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-card class="rank-card" style="width: 100%; height: 100%"> |
|
|
|
<div class="card-large margin-bottom">金币{{ activeTab === 'recharge' ? '充值' : '消费' }}排名</div> |
|
|
|
<el-select v-model="selectedType" style="width: 100%; margin-bottom: 15px"> |
|
|
|
<el-option label="全部类型" value="all"></el-option> |
|
|
|
<el-option label="永久金币" value="permanent"></el-option> |
|
|
|
<el-option label="免费金币" value="free"></el-option> |
|
|
|
<el-option label="任务金币" value="task"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-table :data="tableData" height="320px"> |
|
|
|
<el-table-column prop="rank" label="排名" width="60" align="center"></el-table-column> |
|
|
|
<el-table-column prop="market" label="地区" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ marketMapping[scope.row.market] || scope.row.market }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="coinAmount" label="金币数量" align="center"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ row.coinAmount.toLocaleString() }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
|
<el-row :gutter="20" style="margin-top: 20px"> |
|
|
|
<el-col :span="18"> |
|
|
|
<div class="bar"> |
|
|
|
<div ref="chartRef" style="width: 100%; height: 400px"></div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-card class="rank-card" style="width: 100%; height: 100%"> |
|
|
|
<div class="card-large margin-bottom">金币{{ activeTab === 'recharge' ? '充值' : '消费' }}排名</div> |
|
|
|
<el-select v-model="selectedType" style="width: 100%; margin-bottom: 15px"> |
|
|
|
<el-option label="全部类型" value="all"></el-option> |
|
|
|
<el-option label="永久金币" value="permanent"></el-option> |
|
|
|
<el-option label="免费金币" value="free"></el-option> |
|
|
|
<el-option label="任务金币" value="task"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-table :data="tableData" height="320px"> |
|
|
|
<el-table-column prop="rank" label="排名" width="60" align="center"></el-table-column> |
|
|
|
<el-table-column prop="market" label="地区" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ marketMapping[scope.row.market] || scope.row.market }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="coinAmount" label="金币数量" align="center"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ row.coinAmount.toLocaleString() }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
|
</el-row> |
|
|
|
</template> |
|
|
|
|
|
|
@ -425,6 +425,11 @@ const processData = (data) => { |
|
|
|
ydayRechargeNum.value = summary.ydayRechargeNum |
|
|
|
firstRecharge.value = summary.firstRecharge |
|
|
|
} |
|
|
|
//无法选择的时间 |
|
|
|
const disabledDate = (time) => { |
|
|
|
const limitDate = new Date(2025, 0, 1); |
|
|
|
return time.getTime() < limitDate.getTime(); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取市场列表 |
|
|
|
const getMarkets = async () => { |
|
|
|