|
|
@ -1,9 +1,22 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { computed, onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
import { computed, onMounted, ref, watch } from 'vue' |
|
|
import { dayjs, ElMessage } from 'element-plus' |
|
|
import { dayjs, ElMessage } from 'element-plus' |
|
|
import request from '@/util/http.js' |
|
|
import request from '@/util/http.js' |
|
|
import API from '@/util/http.js' |
|
|
import API from '@/util/http.js' |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
|
|
|
import { useAdminStore } from "@/store/index.js"; |
|
|
|
|
|
import { storeToRefs } from "pinia"; |
|
|
|
|
|
const adminStore = useAdminStore(); |
|
|
|
|
|
const { flag } = storeToRefs(adminStore); |
|
|
|
|
|
|
|
|
|
|
|
// 监听全局flag状态变化 |
|
|
|
|
|
watch(flag, (newFlag, oldFlag) => { |
|
|
|
|
|
// 当flag状态改变时,重新发送请求 |
|
|
|
|
|
if (newFlag !== oldFlag) { |
|
|
|
|
|
selectLiveBy() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 之后整理一下 |
|
|
// 之后整理一下 |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
@ -223,7 +236,8 @@ const selectLiveBy = async function (val) { |
|
|
startTime: beanConsumeLive.value.startTime || '', |
|
|
startTime: beanConsumeLive.value.startTime || '', |
|
|
endTime: beanConsumeLive.value.endTime || '', |
|
|
endTime: beanConsumeLive.value.endTime || '', |
|
|
sortField: beanConsumeLive.value.sortField || 'consumeTime', |
|
|
sortField: beanConsumeLive.value.sortField || 'consumeTime', |
|
|
sortOrder: beanConsumeLive.value.sortOrder || 'desc' |
|
|
|
|
|
|
|
|
sortOrder: beanConsumeLive.value.sortOrder || 'desc', |
|
|
|
|
|
flag: flag.value |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -239,7 +253,7 @@ const selectLiveBy = async function (val) { |
|
|
payType: 1, // 固定传入 payType 值 1 是直播 |
|
|
payType: 1, // 固定传入 payType 值 1 是直播 |
|
|
beanConsumeLive: { |
|
|
beanConsumeLive: { |
|
|
...beanConsumeLive.value, |
|
|
...beanConsumeLive.value, |
|
|
|
|
|
|
|
|
|
|
|
flag: flag.value |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
@ -296,6 +310,8 @@ const reset = function () { |
|
|
getTime.value = {} |
|
|
getTime.value = {} |
|
|
activeTimeRange.value = '' // 清除激活状态 |
|
|
activeTimeRange.value = '' // 清除激活状态 |
|
|
|
|
|
|
|
|
|
|
|
// 重置页码 |
|
|
|
|
|
getObj.value.pageNum = 1 |
|
|
|
|
|
|
|
|
// 点完重置后,重新请求数据 |
|
|
// 点完重置后,重新请求数据 |
|
|
selectLiveBy() |
|
|
selectLiveBy() |
|
|
@ -561,7 +577,7 @@ const getTagText = (state) => { |
|
|
免费金豆数:{{ format3(Math.abs(freeBean)) }} |
|
|
免费金豆数:{{ format3(Math.abs(freeBean)) }} |
|
|
</div> |
|
|
</div> |
|
|
<div style="overflow-y: auto"> |
|
|
<div style="overflow-y: auto"> |
|
|
<el-table :data="tableData" style="width: 82vw" height="68vh" @sort-change="handleSortChange" |
|
|
|
|
|
|
|
|
<el-table :data="tableData" style="width: 82vw" height="69vh" @sort-change="handleSortChange" |
|
|
:row-style="{ height: '50px' }"> |
|
|
:row-style="{ height: '50px' }"> |
|
|
<el-table-column type="index" label="序号" width="80px" fixed="left"> |
|
|
<el-table-column type="index" label="序号" width="80px" fixed="left"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
@ -590,7 +606,7 @@ const getTagText = (state) => { |
|
|
<el-table-column prop="consumeTime" label="消费时间" sortable="custom" width="180px" /> |
|
|
<el-table-column prop="consumeTime" label="消费时间" sortable="custom" width="180px" /> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" style="margin-top: 20px;" |
|
|
|
|
|
|
|
|
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" style="margin-top: 20px;" |
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange" |
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange" |
|
|
@current-change="handleCurrentChange"></el-pagination> |
|
|
@current-change="handleCurrentChange"></el-pagination> |
|
|
</el-card> |
|
|
</el-card> |
|
|
@ -637,7 +653,6 @@ const getTagText = (state) => { |
|
|
// 表单的卡片样式 |
|
|
// 表单的卡片样式 |
|
|
.card2 { |
|
|
.card2 { |
|
|
background: #E7F4FD; |
|
|
background: #E7F4FD; |
|
|
height: 81vh; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 新币总数等等 |
|
|
// 新币总数等等 |
|
|
|