From c802f63adabee549b1a593d61105d457bd42f668 Mon Sep 17 00:00:00 2001 From: alanpaine Date: Wed, 8 Apr 2026 16:16:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E4=BF=AE=E5=A4=8D=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=8A=BD=E5=B1=89=E5=92=8C=E6=A8=A1=E6=80=81=E6=A1=86?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=B8=B2=E6=9F=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为多个抽屉和模态框组件添加 forceRender 属性,确保表单字段在隐藏后重新显示时能正确渲染 修复会议详情页转录时间线显示问题,移除多余的时间戳元素 优化实时ASR会话页面的UI布局和交互设计 --- .../business/MeetingCreateDrawer.tsx | 3 +- .../src/pages/access/permissions/index.tsx | 2 +- frontend/src/pages/access/roles/index.tsx | 2 +- frontend/src/pages/access/users/index.tsx | 2 +- frontend/src/pages/business/AiModels.tsx | 1 + frontend/src/pages/business/MeetingDetail.tsx | 40 +- frontend/src/pages/business/Meetings.tsx | 8 +- .../src/pages/business/PromptTemplates.tsx | 1 + .../src/pages/business/RealtimeAsrSession.tsx | 382 ++++++++++-------- .../src/pages/organization/orgs/index.tsx | 2 +- .../src/pages/organization/tenants/index.tsx | 2 +- .../src/pages/system/dictionaries/index.tsx | 8 +- .../src/pages/system/sys-params/index.tsx | 1 + 13 files changed, 254 insertions(+), 200 deletions(-) diff --git a/frontend/src/components/business/MeetingCreateDrawer.tsx b/frontend/src/components/business/MeetingCreateDrawer.tsx index 6b72b2a..f711500 100644 --- a/frontend/src/components/business/MeetingCreateDrawer.tsx +++ b/frontend/src/components/business/MeetingCreateDrawer.tsx @@ -259,7 +259,8 @@ export const MeetingCreateDrawer: React.FC = ({ open, open={open} onClose={onCancel} width={960} - destroyOnClose + forceRender + destroyOnClose={false} placement="right" closable={false} footer={ diff --git a/frontend/src/pages/access/permissions/index.tsx b/frontend/src/pages/access/permissions/index.tsx index 14ff16d..c2ef062 100644 --- a/frontend/src/pages/access/permissions/index.tsx +++ b/frontend/src/pages/access/permissions/index.tsx @@ -317,7 +317,7 @@ export default function Permissions() { record.permType !== "button" && !!record.children?.length }} /> - diff --git a/frontend/src/pages/access/roles/index.tsx b/frontend/src/pages/access/roles/index.tsx index 993df08..e17fa48 100644 --- a/frontend/src/pages/access/roles/index.tsx +++ b/frontend/src/pages/access/roles/index.tsx @@ -637,7 +637,7 @@ export default function Roles() {
setSelectedUserKeys(keys as number[]) }} columns={[{ title: "显示名称", dataIndex: "displayName" }, { title: "用户名", dataIndex: "username" }, { title: "手机号", dataIndex: "phone" }]} /> - setDrawerOpen(false)} width={420} destroyOnHidden footer={
}> + setDrawerOpen(false)} width={420} destroyOnHidden forceRender footer={
}>
- - -
- - LIVE SESSION - 会中实时识别 - 会中页面只保留控制区和实时转写流。 - -
- - - - - - - - -
- - } /> - - - -
- -
ASR 模型{sessionDraft.asrModelName}
-
总结模型{sessionDraft.summaryModelName}
-
识别模式{sessionDraft.mode}
-
热词数量{sessionDraft.hotwords.length}
-
- 麦克风输入 -
-
+
+ + {/* 核心转写区域 */} +
+ {transcripts.length === 0 && !streamingText ? ( +
+ +
+ ) : ( +
+ {transcripts.map((item) => ( +
+
+ } style={{ background: "linear-gradient(135deg, #7a84ff, #9363ff)", border: "none" }} /> +
+
+
+ {item.speakerName} + {formatTranscriptTime(item.startTime)} +
+
{item.text}
- -
+ ))} -
- -
- - - -
- -
-
- 实时转写流 - 优先展示最终片段,流式草稿保留在底部作为当前正在识别的内容。 -
- - } color={recording ? "processing" : sessionStatus?.status === "ACTIVE" && hasRemoteActiveConnection ? "processing" : sessionStatus?.status === "PAUSED_RESUMABLE" || sessionStatus?.status === "PAUSED_EMPTY" ? "warning" : "default"}>{recording ? "采集中" : connecting ? "连接中" : sessionStatus?.status === "ACTIVE" && hasRemoteActiveConnection ? "连接占用中" : sessionStatus?.status === "PAUSED_RESUMABLE" || sessionStatus?.status === "PAUSED_EMPTY" ? "已暂停" : "待命"} - {sessionDraft.asrModelName} - -
- -
- {transcripts.length === 0 && !streamingText ? ( -
- + {streamingText ? ( +
+
+ } style={{ background: "#cbd5e1", border: "none" }} /> +
+
+
+ {streamingSpeaker} + ... +
+
{streamingText}
+
- ) : ( - - {transcripts.map((item) => ( -
-
{formatTranscriptTime(item.startTime)}
-
-
- } className="transcript-avatar" /> - {item.speakerName} - {item.userId ? UID: {item.userId} : null} - {formatTranscriptTime(item.startTime)} - {formatTranscriptTime(item.endTime)} -
-
{item.text}
-
-
- ))} - - {streamingText ? ( -
-
--:--
-
-
- } className="transcript-avatar" /> - {streamingSpeaker} - 流式草稿 -
-
{streamingText}
-
-
- ) : null} -
- )} + ) : null}
- - - + )} +
+ + {/* 底部悬浮控制条 */} +
+
+
+ {recording ? : } +
+
+
+ {recording ? "录音中..." : connecting ? "连接中..." : sessionStatus?.status === "PAUSED_RESUMABLE" || sessionStatus?.status === "PAUSED_EMPTY" ? "已暂停" : "待命"} +
+
+ {formatClock(elapsedSeconds)} +
+
+
+ + +
+ )} diff --git a/frontend/src/pages/organization/orgs/index.tsx b/frontend/src/pages/organization/orgs/index.tsx index d87ecec..f5e0e9c 100644 --- a/frontend/src/pages/organization/orgs/index.tsx +++ b/frontend/src/pages/organization/orgs/index.tsx @@ -185,7 +185,7 @@ export default function Orgs() { )}
-