|
|
@ -81,6 +81,7 @@ const getToday = () => { |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
activeTimeRange.value = 'today' |
|
|
|
search(); |
|
|
|
} |
|
|
|
|
|
|
|
const getYesterday = () => { |
|
|
@ -99,6 +100,7 @@ const getYesterday = () => { |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
activeTimeRange.value = 'yesterday' |
|
|
|
search(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -117,6 +119,7 @@ const get7Days = function () { |
|
|
|
) |
|
|
|
getTime.value = [startTime, endTime] |
|
|
|
activeTimeRange.value = '7days' |
|
|
|
search(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -129,6 +132,7 @@ const reset = () => { |
|
|
|
} |
|
|
|
getTime.value = [] |
|
|
|
activeTimeRange.value = '' |
|
|
|
search() |
|
|
|
} |
|
|
|
|
|
|
|
//查询 |
|
|
@ -150,10 +154,10 @@ const get = async () => { |
|
|
|
const data = { |
|
|
|
...getObj.value, |
|
|
|
beanRechargeInfo: { |
|
|
|
...selectData.value |
|
|
|
}, |
|
|
|
...selectData.value, |
|
|
|
sortField: sortField.value, |
|
|
|
sortOrder: sortOrder.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
console.log('请求参数:', data); |
|
|
|
const result = await API({ |
|
|
@ -191,7 +195,7 @@ const handleSortChange = (column) => { |
|
|
|
console.log('排序方式:', column.order) |
|
|
|
|
|
|
|
// 直接使用允许的排序字段列表进行过滤 |
|
|
|
const allowedFields = ['money', 'freeGold', 'payTime', 'createTime', 'permanentGold']; |
|
|
|
const allowedFields = ['money', 'num']; |
|
|
|
if (allowedFields.includes(column.prop)) { |
|
|
|
sortField.value = column.prop; |
|
|
|
} |
|
|
@ -201,7 +205,7 @@ const handleSortChange = (column) => { |
|
|
|
console.log('传递给后端的排序字段:', sortField.value) |
|
|
|
console.log('传递给后端的排序方式:', sortOrder.value) |
|
|
|
|
|
|
|
// get(); |
|
|
|
get(); |
|
|
|
} |
|
|
|
//========================分页=========================== |
|
|
|
// 搜索对象 |
|
|
@ -230,7 +234,7 @@ const exportExcel = async () => { |
|
|
|
}, |
|
|
|
} |
|
|
|
try { |
|
|
|
const res = await API({ url: '/export', data: params }) |
|
|
|
const res = await API({ url: '/export/exportol', data: params }) |
|
|
|
if (res.code === 200) { |
|
|
|
ElMessage.success('导出成功') |
|
|
|
} else { |
|
|
@ -259,11 +263,10 @@ const getExportList = async () => { |
|
|
|
try { |
|
|
|
const result = await API({ url: '/export/export' }) |
|
|
|
if (result.code === 200) { |
|
|
|
// const filteredData = result.data.filter(item => { |
|
|
|
// return item.type === 2; //2表示金币充值列表 |
|
|
|
// }); |
|
|
|
// exportList.value = filteredData |
|
|
|
exportList.value = result.data |
|
|
|
const filteredData = result.data.filter(item => { |
|
|
|
return item.type === 10; |
|
|
|
}); |
|
|
|
exportList.value = filteredData |
|
|
|
} else { |
|
|
|
ElMessage.error(result.msg || '获取导出列表失败') |
|
|
|
} |
|
|
@ -390,9 +393,7 @@ onMounted(async function () { |
|
|
|
<el-col> |
|
|
|
<el-card> |
|
|
|
<div class="bean-info"> |
|
|
|
<!-- 汉字用 <strong> 加粗,动态数据用 <span> 包一层单独改色 --> |
|
|
|
<strong> 充值金豆数:</strong><span class="data-text">{{ beanNum }}</span> |
|
|
|
<strong>, 合计新币数:</strong><span class="data-text">{{ money }}</span>。 |
|
|
|
充值金豆数:{{ beanNum }}, 合计新币数:{{ money }}。 |
|
|
|
</div> |
|
|
|
<!-- 设置表格容器的高度和滚动样式 --> |
|
|
|
<div style="height: 520px; overflow-y: auto;margin-top: 10px;"> |
|
|
@ -413,9 +414,9 @@ onMounted(async function () { |
|
|
|
<span v-else>其他</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="rechargeTime" sortable label="充值时间" min-width="200px"> |
|
|
|
<el-table-column prop="rechargeTime" label="充值时间" min-width="200px"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ moment(scope.row.payTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
{{ moment(scope.row.rechargeTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -463,24 +464,5 @@ onMounted(async function () { |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
<style scoped> |
|
|
|
:deep(.custom-height-dialog .el-dialog__body) { |
|
|
|
height: 60vh; |
|
|
|
overflow-y: auto; |
|
|
|
padding: 15px; |
|
|
|
} |
|
|
|
.bean-info { |
|
|
|
background-color: #eaf5ff; |
|
|
|
padding: 12px 16px; |
|
|
|
border-radius: 6px; |
|
|
|
font-size: 16px; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
|
|
|
|
.bean-info strong { |
|
|
|
font-weight: 700; |
|
|
|
} |
|
|
|
|
|
|
|
.bean-info .data-text { |
|
|
|
color: #007bff; |
|
|
|
} |
|
|
|
</style> |