From 4df6bd0e79ff607df831bd33d87e24a411e3a47f Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Wed, 6 May 2026 07:16:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(tenant):=20=E6=8E=A8=E9=80=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=AF=B4=E6=98=8E=E4=B8=8EIM=E5=A4=9A=E7=AB=AF?= =?UTF-8?q?=E4=BA=92=E8=B8=A2=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 推送服务配置页新增字段说明提示(通道业务键含义、Channel ID 规则、 厂商凭据来源);IM 服务配置页新增"多端登录与互踢"卡片,支持三种 模式选择;app.ts 类型增加 multiDeviceLoginMode 字段。 Co-Authored-By: Claude Sonnet 4.6 --- tenant-platform/src/api/app.ts | 1 + tenant-platform/src/views/im/ImConfigView.vue | 47 +++++++++++++++++++ .../src/views/push/PushConfigView.vue | 14 ++++++ 3 files changed, 62 insertions(+) diff --git a/tenant-platform/src/api/app.ts b/tenant-platform/src/api/app.ts index 34de9ff..9ed9b3e 100644 --- a/tenant-platform/src/api/app.ts +++ b/tenant-platform/src/api/app.ts @@ -39,6 +39,7 @@ export interface ImServiceConfig { historyRetentionDays: number conversationPullLimit: number multiClientConversationDeleteSync: boolean + multiDeviceLoginMode?: 'MULTI_DEVICE_FREE' | 'SAME_PLATFORM_ONE' | 'SINGLE_DEVICE' } export interface UpdateServiceConfig { diff --git a/tenant-platform/src/views/im/ImConfigView.vue b/tenant-platform/src/views/im/ImConfigView.vue index 6d81be0..625b834 100644 --- a/tenant-platform/src/views/im/ImConfigView.vue +++ b/tenant-platform/src/views/im/ImConfigView.vue @@ -108,6 +108,36 @@ + + +
+
+
+
多端登录方式
+
控制同一账号在多个设备上的登录行为。
+
+ +
+
+
+
@@ -169,6 +199,7 @@ const imConfig = computed(() => { historyRetentionDays: parsed.historyRetentionDays ?? 7, conversationPullLimit: parsed.conversationPullLimit ?? 100, multiClientConversationDeleteSync: parsed.multiClientConversationDeleteSync ?? false, + multiDeviceLoginMode: normalizeLoginMode(parsed.multiDeviceLoginMode), } } catch { return defaultImConfig() @@ -186,9 +217,20 @@ function defaultImConfig(): ImServiceConfig { historyRetentionDays: 7, conversationPullLimit: 100, multiClientConversationDeleteSync: false, + multiDeviceLoginMode: 'MULTI_DEVICE_FREE', } } +function normalizeLoginMode( + mode: ImServiceConfig['multiDeviceLoginMode'] | string | undefined, +): ImServiceConfig['multiDeviceLoginMode'] { + const normalized = (mode ?? '').toString().trim().toUpperCase() + if (normalized === 'SAME_PLATFORM_ONE' || normalized === 'SINGLE_DEVICE' || normalized === 'MULTI_DEVICE_FREE') { + return normalized as ImServiceConfig['multiDeviceLoginMode'] + } + return 'MULTI_DEVICE_FREE' +} + function normalizeFriendRequestMode( mode: ImServiceConfig['friendRequestMode'] | string | undefined, allowFriendRequest: boolean | undefined, @@ -252,6 +294,11 @@ onMounted(loadData) .service-name { font-size: 15px; } .service-config-list { display: flex; flex-direction: column; gap: 12px; } .service-config-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #666; } +.service-config-row--column { flex-direction: column; align-items: flex-start; } .service-config-title { font-size: 13px; font-weight: 500; color: #303133; line-height: 1.4; } .service-config-desc { margin-top: 4px; font-size: 12px; color: #909399; line-height: 1.4; } +.login-mode-group { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; } +.login-mode-group :deep(.el-radio) { height: auto; align-items: flex-start; margin-right: 0; } +.login-mode-group :deep(.el-radio__label) { white-space: normal; font-size: 13px; font-weight: 500; color: #303133; } +.radio-desc { font-size: 12px; color: #909399; font-weight: 400; line-height: 1.5; margin-top: 2px; } diff --git a/tenant-platform/src/views/push/PushConfigView.vue b/tenant-platform/src/views/push/PushConfigView.vue index 9cb1c4e..5ca2626 100644 --- a/tenant-platform/src/views/push/PushConfigView.vue +++ b/tenant-platform/src/views/push/PushConfigView.vue @@ -34,6 +34,13 @@ 通知通道 +