完成每日金币统计
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// ==================================每日数据====================================
|
||||
// 列表
|
||||
export const diamondStatList = query => {
|
||||
return request({
|
||||
url: '/admin/diamondStat/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
@@ -35,18 +35,18 @@
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="x" align="center" label="日期" />
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column align="center" label="全平台真实消耗" width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
detailsTitle = '全平台金币明细';
|
||||
edi(scope.row);
|
||||
edi(scope.row, 0);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.x }}
|
||||
{{ scope.row.totalDiamond }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -55,12 +55,12 @@
|
||||
<el-button
|
||||
@click="
|
||||
detailsTitle = '阿拉伯区金币明细';
|
||||
edi(scope.row);
|
||||
edi(scope.row, 2);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.x }}
|
||||
{{ scope.row.arDiamond }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -69,12 +69,12 @@
|
||||
<el-button
|
||||
@click="
|
||||
detailsTitle = '英语区金币明细';
|
||||
edi(scope.row);
|
||||
edi(scope.row, 1);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.x }}
|
||||
{{ scope.row.enDiamond }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -83,12 +83,12 @@
|
||||
<el-button
|
||||
@click="
|
||||
detailsTitle = '华语区金币明细';
|
||||
edi(scope.row);
|
||||
edi(scope.row, 4);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.x }}
|
||||
{{ scope.row.zhDiamond }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -97,24 +97,36 @@
|
||||
<el-button
|
||||
@click="
|
||||
detailsTitle = '土耳其区金币明细';
|
||||
edi(scope.row);
|
||||
edi(scope.row, 8);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
{{ scope.row.x }}
|
||||
{{ scope.row.trDiamond }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="x" align="center" label="全平台库存" />
|
||||
<el-table-column prop="x" align="center" label="阿拉伯区库存" />
|
||||
<el-table-column prop="x" align="center" label="英语区库存" />
|
||||
<el-table-column prop="x" align="center" label="华语区库存" />
|
||||
<el-table-column prop="x" align="center" label="土耳其区库存" />
|
||||
<el-table-column
|
||||
prop="totalRemainDiamond"
|
||||
align="center"
|
||||
label="全平台库存"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="arRemainDiamond"
|
||||
align="center"
|
||||
label="阿拉伯区库存"
|
||||
/>
|
||||
<el-table-column prop="enRemainDiamond" align="center" label="英语区库存" />
|
||||
<el-table-column prop="zhRemainDiamond" align="center" label="华语区库存" />
|
||||
<el-table-column
|
||||
prop="trRemainDiamond"
|
||||
align="center"
|
||||
label="土耳其区库存"
|
||||
/>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
<!-- <el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
@@ -124,7 +136,7 @@
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="30%" center>
|
||||
@@ -135,8 +147,9 @@
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="x" align="center" label="增加" />
|
||||
<el-table-column prop="x" align="center" label="消耗" />
|
||||
<el-table-column prop="domainDesc" align="center" label="类型" />
|
||||
<el-table-column prop="addDiamond" align="center" label="增加" />
|
||||
<el-table-column prop="subDiamond" align="center" label="消耗" />
|
||||
</el-table>
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
@@ -149,7 +162,7 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {} from "@/api/dailyCoinStatistics/dailyCoinStatistics";
|
||||
import { diamondStatList } from "@/api/dailyCoinStatistics/dailyCoinStatistics";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
@@ -191,27 +204,42 @@ export default {
|
||||
? dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss")
|
||||
: null;
|
||||
}
|
||||
// recordList({
|
||||
// startTime: startTime,
|
||||
// endTime: endTime,
|
||||
// pageNo: this.currentPage,
|
||||
// pageSize: this.pageSize,
|
||||
// }).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// this.total = res.data.total;
|
||||
// this.tableData = res.data.records;
|
||||
// this.loading = false;
|
||||
// } else {
|
||||
// ElMessage({
|
||||
// showClose: true,
|
||||
// message: res.message,
|
||||
// type: "error",
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
diamondStatList({
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
// pageNo: this.currentPage,
|
||||
// pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// this.total = res.data.total;
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 详情
|
||||
edi(res, title) {
|
||||
edi(res, type) {
|
||||
var jsonArr =
|
||||
type == 0
|
||||
? res.totalDomainDetail
|
||||
: type == 1
|
||||
? res.enDomainDetail
|
||||
: type == 2
|
||||
? res.arDomainDetail
|
||||
: type == 4
|
||||
? res.zhDomainDetail
|
||||
: type == 8
|
||||
? res.trDomainDetail
|
||||
: `"[""]"`;
|
||||
console.log(jsonArr);
|
||||
|
||||
this.tableDataIn = JSON.parse(jsonArr);
|
||||
this.detailsDialog = true;
|
||||
},
|
||||
// 分页导航
|
||||
|
Reference in New Issue
Block a user