From b63af1ac325f049dedd1c939bfd7e5247da7f82b Mon Sep 17 00:00:00 2001 From: lihuilin Date: Fri, 4 Jul 2025 17:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=A5=BD=E4=BA=86=E5=90=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/audit/refundAudit.vue | 68 +++++++++++++---------------------------- stats.html | 2 +- 2 files changed, 22 insertions(+), 48 deletions(-) diff --git a/src/views/audit/refundAudit.vue b/src/views/audit/refundAudit.vue index 781e868..c5490e1 100644 --- a/src/views/audit/refundAudit.vue +++ b/src/views/audit/refundAudit.vue @@ -66,7 +66,7 @@ 任务金币:{{ stats.taskGolds.toFixed(2) }}金币 - + @@ -90,7 +90,7 @@ @@ -214,18 +214,6 @@ const rules = reactive({ reason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }] }) -// 获取用户信息 -// const getAdminInfo = async () => { -// try { -// const res = await API({ url: '' }) -// adminInfo.value = res -// if (res.market !== '总部') { -// searchForm.value.market = res.market -// } -// } catch (error) { -// console.error('获取用户信息失败', error) -// } -// } const handlePageSizeChange = function (val) { pagination.value.pageSize = val get() @@ -236,6 +224,14 @@ const handleCurrentChange = function (val) { get() console.log('aaaaaaaaaaaaaaa这是pageNum改变调用') } +// 处理排序事件 +const handleSortChange = (column) => { + console.log('排序字段:', column.prop) + console.log('排序方式:', column.order) + sortOrder.value = column.order === 'ascending' ? 'asc' : 'desc' + sortField.value = column.prop + get() +} // 显示驳回对话框 const showRejectDialog = (row) => { scopeValue.value = row @@ -278,14 +274,16 @@ const get = async function (val) { pageNum: pagination.value.pageNum, pageSize: pagination.value.pageSize, refundAudit: { - ...searchForm.value + ...searchForm.value, + sortField:sortField.value, + sortOrder:sortOrder.value } } console.log('看看传给后端的参数:', params) const res = await API({ url: '/audit/selectRefund', data: params }) tableData.value = res.list || [] pagination.value.total = res.total || 0 - console.log('查全部的total', pagination.value.total,res.total) + console.log('查全部的total', pagination.value.total, res.total) } catch (error) { console.error('获取数据失败', error) } @@ -353,7 +351,7 @@ const getStats = async () => { stats.value.permanentGolds = res.permanentGolds / 100 stats.value.freeGolds = res.freeGolds / 100 stats.value.taskGolds = res.taskGolds / 100 - console.log('see see stats和搜索对象', stats.value,params) + console.log('see see stats和搜索对象', stats.value, params) } catch (error) { console.log('请求失败', error) } @@ -383,16 +381,8 @@ const resetSearch = function () { // 今天 const getToday = function () { const today = new Date() - const startTime = new Date( - today.getFullYear(), - today.getMonth(), - today.getDate() - ) - const endTime = new Date( - today.getFullYear(), - today.getMonth(), - today.getDate() + 1 - ) + const startTime = new Date(today.getFullYear(), today.getMonth(), today.getDate()) + const endTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1) dateRange.value = [startTime, endTime] console.log('dateRange', dateRange.value) get() @@ -404,16 +394,8 @@ const getToday = function () { const getYesterday = function () { const yesterday = new Date() yesterday.setDate(yesterday.getDate() - 1) - const startTime = new Date( - yesterday.getFullYear(), - yesterday.getMonth(), - yesterday.getDate() - ) - const endTime = new Date( - yesterday.getFullYear(), - yesterday.getMonth(), - yesterday.getDate() + 1 - ) + const startTime = new Date(yesterday.getFullYear(), yesterday.getMonth(), yesterday.getDate()) + const endTime = new Date(yesterday.getFullYear(), yesterday.getMonth(), yesterday.getDate() + 1) dateRange.value = [startTime, endTime] console.log('dateRange', dateRange.value) get() @@ -424,16 +406,8 @@ const getYesterday = function () { // 近7天 const get7Days = function () { const today = new Date() - const startTime = new Date( - today.getFullYear(), - today.getMonth(), - today.getDate() - 6 - ) - const endTime = new Date( - today.getFullYear(), - today.getMonth(), - today.getDate() + 1 - ) + const startTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 6) + const endTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1) dateRange.value = [startTime, endTime] console.log('dateRange', dateRange.value) get() diff --git a/stats.html b/stats.html index f9750f9..3193c15 100644 --- a/stats.html +++ b/stats.html @@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {