From b3dd7b963c77fc3a5f16cf374b6342a159a3c8cb Mon Sep 17 00:00:00 2001 From: DaxPay Dev Date: Sun, 12 Jul 2026 12:32:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E4=BC=9A=E8=AF=9D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=96=B0=E5=A2=9E=E5=B9=B6=E5=8F=91=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SessionManagement页面与i18n新增concurrentScope(GLOBAL/PER_DEVICE)radio及概览标签 --- .../src/api/system/security.api.ts | 2 + .../system/security/session-management.json | 7 ++++ .../system/security/session-management.json | 7 ++++ .../security/components/SessionManagement.vue | 38 +++++++++++++++++++ 4 files changed, 54 insertions(+) diff --git a/apps/daxpay-admin/src/api/system/security.api.ts b/apps/daxpay-admin/src/api/system/security.api.ts index 078ff0f96..8d2b952fe 100644 --- a/apps/daxpay-admin/src/api/system/security.api.ts +++ b/apps/daxpay-admin/src/api/system/security.api.ts @@ -125,6 +125,8 @@ export interface SessionManagementConfig { maxConcurrentSessions?: number; /** 并发策略 */ concurrentStrategy?: string; + /** 并发计数范围 GLOBAL=全局共享 / PER_DEVICE=按终端独立 */ + concurrentScope?: string; } /** diff --git a/apps/daxpay-admin/src/locales/langs/en-US/system/security/session-management.json b/apps/daxpay-admin/src/locales/langs/en-US/system/security/session-management.json index d41b1da7c..70fadd08c 100644 --- a/apps/daxpay-admin/src/locales/langs/en-US/system/security/session-management.json +++ b/apps/daxpay-admin/src/locales/langs/en-US/system/security/session-management.json @@ -7,6 +7,7 @@ "online": "Online {hours} hours", "active": "Active {hours} hours", "concurrent": "Concurrent {count} sessions", + "scope": "Scope {name}", "strategy": "Strategy {name}" }, "section": { @@ -39,5 +40,11 @@ "newSession": "Allow New Session", "kickOldest": "Kick Oldest Session", "denyNew": "Deny New Session" + }, + "concurrentScope": { + "label": "Concurrent Counting Scope", + "desc": "Global: all terminals share one quota pool; Per Device: each terminal type counts independently.", + "global": "Global", + "perDevice": "Per Device" } } diff --git a/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/session-management.json b/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/session-management.json index 04618e0fd..97c9a99a4 100644 --- a/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/session-management.json +++ b/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/session-management.json @@ -7,6 +7,7 @@ "online": "在线 {hours} 小时", "active": "活跃 {hours} 小时", "concurrent": "并发 {count} 个", + "scope": "范围 {name}", "strategy": "策略 {name}" }, "section": { @@ -39,5 +40,11 @@ "newSession": "允许新会话", "kickOldest": "踢出最早会话", "denyNew": "拒绝新会话" + }, + "concurrentScope": { + "label": "并发计数范围", + "desc": "全局共享:所有终端共用一个配额池;按终端独立:每类终端各自计数互不影响。", + "global": "全局共享", + "perDevice": "按终端独立" } } diff --git a/apps/daxpay-admin/src/views/system/config/security/components/SessionManagement.vue b/apps/daxpay-admin/src/views/system/config/security/components/SessionManagement.vue index bd185ffae..bfd5337ef 100644 --- a/apps/daxpay-admin/src/views/system/config/security/components/SessionManagement.vue +++ b/apps/daxpay-admin/src/views/system/config/security/components/SessionManagement.vue @@ -28,10 +28,22 @@ { label: $t('system.security.session-management.concurrentStrategy.denyNew'), value: 'DENY_NEW' }, ]; + // 并发计数范围选项 + const concurrentScopeOptions = [ + // 全局共享 + { label: $t('system.security.session-management.concurrentScope.global'), value: 'GLOBAL' }, + // 按终端独立 + { label: $t('system.security.session-management.concurrentScope.perDevice'), value: 'PER_DEVICE' }, + ]; + const currentStrategyLabel = computed(() => { return concurrentStrategyOptions.find((item) => item.value === formState.value.concurrentStrategy)?.label || '-'; }); + const currentScopeLabel = computed(() => { + return concurrentScopeOptions.find((item) => item.value === formState.value.concurrentScope)?.label || '-'; + }); + const summaryItems = computed(() => { return [ // 控制启用状态 @@ -46,6 +58,8 @@ $t('system.security.session-management.summary.concurrent', { count: formState.value.maxConcurrentSessions ?? 0, }), + // 计数范围 + $t('system.security.session-management.summary.scope', { name: currentScopeLabel.value }), // 策略名称 $t('system.security.session-management.summary.strategy', { name: currentStrategyLabel.value }), ]; @@ -249,6 +263,30 @@
{{ $t('system.security.session-management.section.policy') }}
+
+
+ +
{{ + $t('system.security.session-management.concurrentScope.label') + }}
+ +
{{ + $t('system.security.session-management.concurrentScope.desc') + }}
+
+ + {{ item.label }} + +
+