feat(admin+api): 列表页子路由重构、结算历史与充值截图清理
赛事/代理管理从表格展开改为子路由详情页;结算页增加预览弹窗与历史记录;媒体库支持截图存储统计与自动/手动清理;Player 端充值截图压缩为 WebP 300KB。
This commit is contained in:
98
apps/admin/src/components/LeagueRowActions.vue
Normal file
98
apps/admin/src/components/LeagueRowActions.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
export interface LeagueRowView {
|
||||
id: string;
|
||||
isPublished: boolean;
|
||||
isPublishing: boolean;
|
||||
labels: {
|
||||
edit: string;
|
||||
createFixture: string;
|
||||
publish: string;
|
||||
unpublish: string;
|
||||
delete: string;
|
||||
};
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
row: LeagueRowView;
|
||||
}>();
|
||||
|
||||
defineEmits<{
|
||||
edit: [];
|
||||
createFixture: [];
|
||||
togglePublish: [];
|
||||
archive: [];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="league-row-actions">
|
||||
<div class="league-action-group">
|
||||
<el-button size="small" type="primary" @click.stop="$emit('edit')">
|
||||
{{ row.labels.edit }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" @click.stop="$emit('createFixture')">
|
||||
{{ row.labels.createFixture }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.isPublished"
|
||||
size="small"
|
||||
type="success"
|
||||
:loading="row.isPublishing"
|
||||
@click.stop="$emit('togglePublish')"
|
||||
>
|
||||
{{ row.labels.publish }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="small"
|
||||
type="warning"
|
||||
:loading="row.isPublishing"
|
||||
@click.stop="$emit('togglePublish')"
|
||||
>
|
||||
{{ row.labels.unpublish }}
|
||||
</el-button>
|
||||
<el-button size="small" type="danger" plain @click.stop="$emit('archive')">
|
||||
{{ row.labels.delete }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.league-row-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.league-action-group {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 2px 4px;
|
||||
border-radius: 8px;
|
||||
background: #fbfaf7;
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.league-row-actions :deep(.el-button) {
|
||||
margin: 0 !important;
|
||||
min-width: 52px;
|
||||
min-height: 26px;
|
||||
padding: 4px 10px !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: 700;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.league-row-actions :deep(.el-button:not(.is-disabled):not(:disabled)) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.league-row-actions :deep(.el-button.is-disabled),
|
||||
.league-row-actions :deep(.el-button:disabled) {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
@@ -139,7 +139,7 @@ watch(
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="dialogTitle"
|
||||
width="1080px"
|
||||
width="1250px"
|
||||
destroy-on-close
|
||||
class="player-wallet-ledger-dialog"
|
||||
append-to-body
|
||||
@@ -172,7 +172,7 @@ watch(
|
||||
<template #empty>
|
||||
<AdminTableEmpty />
|
||||
</template>
|
||||
<el-table-column :label="t('audit.col.time')" min-width="150">
|
||||
<el-table-column :label="t('audit.col.time')" min-width="140">
|
||||
<template #default="{ row }">{{ formatTime(row.createdAt) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.tx_id')" min-width="120" show-overflow-tooltip>
|
||||
@@ -181,7 +181,7 @@ watch(
|
||||
<el-table-column :label="t('finance.col.tx_type')" min-width="80">
|
||||
<template #default="{ row }">{{ walletTypeLabel(row.transactionType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.deposit_method')" min-width="120" show-overflow-tooltip>
|
||||
<el-table-column :label="t('finance.col.deposit_method')" min-width="100" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ depositMethodLabel(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.balance_change')" min-width="96" align="right">
|
||||
@@ -193,35 +193,35 @@ watch(
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.balance_before')" min-width="92" align="right">
|
||||
<el-table-column :label="t('finance.col.balance_before')" min-width="90" align="right">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="formatAmountFull(row.balanceBefore)" placement="top">
|
||||
<span>{{ formatAmount(row.balanceBefore) }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.balance_after')" min-width="92" align="right">
|
||||
<el-table-column :label="t('finance.col.balance_after')" min-width="90" align="right">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="formatAmountFull(row.balanceAfter)" placement="top">
|
||||
<span>{{ formatAmount(row.balanceAfter) }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.frozen_before')" min-width="92" align="right">
|
||||
<el-table-column :label="t('finance.col.frozen_before')" min-width="90" align="right">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="formatAmountFull(row.frozenBefore)" placement="top">
|
||||
<span>{{ formatAmount(row.frozenBefore) }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.frozen_after')" min-width="92" align="right">
|
||||
<el-table-column :label="t('finance.col.frozen_after')" min-width="90" align="right">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="formatAmountFull(row.frozenAfter)" placement="top">
|
||||
<span>{{ formatAmount(row.frozenAfter) }}</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('finance.col.reference')" min-width="110" show-overflow-tooltip>
|
||||
<el-table-column :label="t('finance.col.reference')" min-width="105" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<router-link
|
||||
v-if="row.betNo"
|
||||
@@ -234,7 +234,7 @@ watch(
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('agent.credit_tx.col.operator')" min-width="88">
|
||||
<el-table-column :label="t('agent.credit_tx.col.operator')" min-width="85">
|
||||
<template #default="{ row }">{{ row.operatorUsername ?? '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('user.field.remark')" min-width="100" show-overflow-tooltip>
|
||||
@@ -298,6 +298,10 @@ watch(
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.player-wallet-ledger-dialog {
|
||||
max-width: 95vw;
|
||||
}
|
||||
|
||||
.player-wallet-ledger-dialog .el-dialog__header {
|
||||
padding: 12px 16px 6px;
|
||||
margin-right: 0;
|
||||
|
||||
Reference in New Issue
Block a user