feat: 优化代理后台页面布局
- 所有页面统一使用 BasicPage 组件 - 添加面包屑导航支持 - 统一页面标题和描述样式 - 移除控制台页面的应用管理快捷链接 - 优化卡密管理、用户管理、财务管理页面布局
This commit is contained in:
@@ -3,6 +3,7 @@ import { Key, Loader2, Plus } from 'lucide-vue-next'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { BasicPage } from '@/components/global-layout'
|
||||
import api from '@/services/api'
|
||||
|
||||
const { t } = useI18n()
|
||||
@@ -51,23 +52,19 @@ function getStatusBadge(status: string) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold">
|
||||
{{ t('agent.cards.title') }}
|
||||
</h1>
|
||||
<p class="text-muted-foreground">
|
||||
{{ t('agent.cards.description') }}
|
||||
</p>
|
||||
</div>
|
||||
<BasicPage
|
||||
:title="t('nav.cards')"
|
||||
description="管理生成的卡密"
|
||||
sticky
|
||||
>
|
||||
<template #actions>
|
||||
<UiButton as-child>
|
||||
<router-link to="/agent/cards/create">
|
||||
<Plus class="mr-2 h-4 w-4" />
|
||||
{{ t('agent.cards.generateCards') }}
|
||||
生成卡密
|
||||
</router-link>
|
||||
</UiButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<UiCard>
|
||||
<UiCardContent class="p-0">
|
||||
@@ -77,10 +74,10 @@ function getStatusBadge(status: string) {
|
||||
|
||||
<div v-else-if="cards.length === 0" class="text-center py-12 text-muted-foreground">
|
||||
<Key class="size-16 mx-auto mb-4 opacity-30" />
|
||||
<p>{{ t('agent.cards.noCards') }}</p>
|
||||
<p>暂无卡密</p>
|
||||
<UiButton class="mt-4" as-child>
|
||||
<router-link to="/agent/cards/create">
|
||||
{{ t('agent.cards.generateCards') }}
|
||||
生成卡密
|
||||
</router-link>
|
||||
</UiButton>
|
||||
</div>
|
||||
@@ -90,22 +87,22 @@ function getStatusBadge(status: string) {
|
||||
<thead class="bg-muted/50">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.cardCode') }}
|
||||
卡号
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.app') }}
|
||||
应用
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.cardType') }}
|
||||
卡类
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.status') }}
|
||||
状态
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.createTime') }}
|
||||
创建时间
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.cards.useTime') }}
|
||||
使用时间
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -137,5 +134,5 @@ function getStatusBadge(status: string) {
|
||||
</div>
|
||||
</UiCardContent>
|
||||
</UiCard>
|
||||
</div>
|
||||
</BasicPage>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user