From c8bda7f95194246a6e4d324c18fdef5753276806 Mon Sep 17 00:00:00 2001
From: Timothy Yin
Date: Wed, 22 Jan 2025 18:54:40 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E9=9D=A2=E6=9D=BF=E6=97=A0=E6=B3=95=E6=BB=9A?=
=?UTF-8?q?=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
layouts/default.vue | 2 +-
pages/generation/admin/users.vue | 568 +++++++++++++++----------------
2 files changed, 281 insertions(+), 289 deletions(-)
diff --git a/layouts/default.vue b/layouts/default.vue
index 41add24..e87dde5 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -46,7 +46,7 @@ const items = [
slot: 'account',
disabled: true,
}], [{
- label: '账号资料',
+ label: '账号管理',
icon: 'i-tabler-user-circle',
to: '/profile'
}], [{
diff --git a/pages/generation/admin/users.vue b/pages/generation/admin/users.vue
index 5aab1e5..a6016b7 100644
--- a/pages/generation/admin/users.vue
+++ b/pages/generation/admin/users.vue
@@ -517,11 +517,11 @@ const udpateBalance = (tag: ServiceTag, isActivate: boolean = false) => {
>
{
-
+
+
-
-
-
- {{
- systemServices.find((s) => s.tag === row.tag)?.name || row.tag
- }}
-
+
+
+
+ {{
+ systemServices.find((s) => s.tag === row.tag)?.name || row.tag
+ }}
+
-
-
- 未开通
-
-
+
+ 未开通
+
+
- 已过期
-
-
- 生效中
-
-
+ color="red"
+ variant="subtle"
+ size="xs"
+ >
+ 已过期
+
+
+ 生效中
+
+
-
-
- {{
- !!getBalanceByTag(row.tag)
- ? dayjs(
- getBalanceByTag(row.tag)!.create_time * 1000
- ).format('YYYY-MM-DD HH:mm:ss')
- : '未开通'
- }}
-
-
+
+
+ {{
+ !!getBalanceByTag(row.tag)
+ ? dayjs(
+ getBalanceByTag(row.tag)!.create_time * 1000
+ ).format('YYYY-MM-DD HH:mm:ss')
+ : '未开通'
+ }}
+
+
-
-
- {{
- !!getBalanceByTag(row.tag)
- ? dayjs(
- getBalanceByTag(row.tag)!.expire_time * 1000
- ).format('YYYY-MM-DD HH:mm:ss')
- : '未开通'
- }}
-
-
+
+
+ {{
+ !!getBalanceByTag(row.tag)
+ ? dayjs(
+ getBalanceByTag(row.tag)!.expire_time * 1000
+ ).format('YYYY-MM-DD HH:mm:ss')
+ : '未开通'
+ }}
+
+
-
-
- {{ getBalanceByTag(row.tag)?.remain_count || 0 }}
-
-
+
+
+ {{ getBalanceByTag(row.tag)?.remain_count || 0 }}
+
+
-
- {
- isActivateBalance = true
- userBalanceEditing = true
- userBalanceState.request_type = row.tag
- }
- "
- >
- 开通
-
- {
- isActivateBalance = false
- userBalanceEditing = true
- userBalanceState.request_type = row.tag
- }
- "
- >
- 延续
-
-
+ {
+ isActivateBalance = true
+ userBalanceEditing = true
+ userBalanceState.request_type = row.tag
+ }
+ "
+ >
+ 开通
+
+ {
+ isActivateBalance = false
+ userBalanceEditing = true
+ userBalanceState.request_type = row.tag
+ }
+ "
+ >
+ 延续
+
+ {
isActivateBalance = false
userBalanceEditing = true
@@ -685,24 +686,24 @@ const udpateBalance = (tag: ServiceTag, isActivate: boolean = false) => {
userBalanceState.remain_count = getBalanceByTag(row.tag)!.remain_count
}
"
- >
- 更新
-
-
-
+ >
+ 更新
+
+
+
-
-
-
-
-
-
- {{ isActivateBalance ? '开通' : '续期' }}
- {{
- systemServices.find(
- (s) => s.tag === userBalanceState.request_type
- )?.name || userBalanceState.request_type
- }}
- 服务
-
-
-
- {{ viewingUser!.username }}
-
-
-
+
+
+ {{ isActivateBalance ? '开通' : '续期' }}
+ {{
+ systemServices.find(
+ (s) => s.tag === userBalanceState.request_type
+ )?.name || userBalanceState.request_type
+ }}
+ 服务
+
+
+
+ {{ viewingUser!.username }}
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ >
+ {{ isActivateBalance ? '开通' : '续期' }}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
-
-
- {{ isActivateBalance ? '开通' : '续期' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 撤销授权
-
-
-
-
-
-
- 新增授权
-
-
+
+
+
+
+
+ 撤销授权
+
+
+
+
+
+
+ 新增授权
+
+
+