Files
wecom_it_smart_desk/docs/02-技术文档/技术架构/增量设计-布局优化v2-时序图.mermaid
T
Simon 44e77dcb0e chore(docs): docs/ 目录全面重新编号 + 重组
**重构前**(旧编号 02-11):
- docs/02-产品需求/      → 00 产品规划/PRD
- docs/03-技术架构/      → 01-05 子目录散落
- docs/04-原型设计/      → 01-02 产品设计(HTML 原型)
- docs/05-原型设计/      → screens/
- docs/06-测试素材/      → 02-E2E / 03-功能 / 04-版本测试
- docs/07-项目管理/      → 任务说明书/日报/计划
- docs/08-安全审计/      → 审计报告
- docs/09-堡垒运维/      → toolbox / deploy
- docs/10-项目管理/      → 任务说明书(重复)
- docs/11-历史归档/      → deploy-nas-archived

**重构后**(新编号 00-07,语义化):
- docs/00-产品开发流程与文档管理规范.md
- docs/00-版本迭代总览.md
- docs/01-产品文档/      (PRD/原型/认证/会话/AI 服务/坐席/集成)
- docs/02-技术文档/      (技术方案/架构图/重构记录/前端改造/实现配置)
- docs/03-测试文档/      (E2E/功能用例/版本报告/缺陷单)
- docs/04-运维文档/      (部署运维/运维指南)
- docs/05-运营文档/      (品牌推广/用户手册)
- docs/06-安全审计/      (审计报告)
- docs/07-项目管理/      (任务说明书/日报/计划/看板)

**净收益**:
- 目录编号与产品文档管理规范对齐(按文档阶段 01-07 编号)
- 消除 02-产品需求 与 10-项目管理 的编号重叠
- 子目录按文档类型分组(如 01-产品文档/00-产品规划、01-产品文档/01-认证与登录)
- 把运维/安全/项目管理从 0X 散落改为 04/06/07

合计 494 文件 + 78495 行 / - 14076 行
2026-08-03 18:46:55 +08:00

158 lines
6.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
%% =============================================================================
%% 增量设计:坐席端布局优化 v2.0 — 时序图
%% =============================================================================
%% 创建日期:2026-07-11
%% 包含 3 个关键流程的时序图
%% =============================================================================
%% ====== 时序图 1:回复建议区交互流程 ======
sequenceDiagram
autonumber
participant User as 坐席
participant ChatArea as ChatArea
participant RSA as ReplySuggestArea
participant ARB as AiRecommendBar
participant QRB as QuickReplyBar
participant CS as ConversationStore
participant RB as ReplyBox
participant API as Wingman API
Note over User, API: 场景:坐席选中会话 → 查看 AI 推荐 → 采纳填入输入框 → 发送
User->>ChatArea: 选中会话
ChatArea->>CS: selectConversation(id)
CS->>API: generateDraft(convId)
API-->>CS: DraftResult {content, confidence, reasoning}
CS->>CS: aiDrafts.set(convId, draft)
CS-->>ChatArea: currentConversationId 更新
ChatArea->>RSA: render (conversationId)
RSA->>ARB: :recommendations = loadFromStore()
ARB->>CS: 读取 aiDrafts.get(convId)
CS-->>ARB: Set~DraftResult~
ARB-->>User: 横向展示 1-3 条 AI 推荐卡片
Note over User, ARB: 坐席点击某条推荐
User->>ARB: 点击推荐卡片 #1
ARB->>CS: pendingReplyText = recommendation.content
ARB->>RSA: emit('select', content)
RSA->>ChatArea: emit('select', content)
Note over CS, RB: pendingReplyText 变化触发 ReplyBox watch
CS-->>RB: watch(pendingReplyText) 触发
RB->>RB: inputText = pendingReplyText
RB->>RB: pendingReplyText = '' (清空)
RB-->>User: 输入框显示推荐内容,光标聚焦
Note over User, RB: 坐席可编辑后发送
User->>RB: 按 Enter 发送
RB->>RB: handleSend()
RB->>ChatArea: emit('send', content)
ChatArea->>CS: sendReply(content, replyToId?)
CS->>API: sendMessage(convId, content)
API-->>CS: Message 对象
CS-->>ChatArea: messages.push(newMsg)
ChatArea-->>User: 消息列表刷新,显示新消息
Note over User, QRB: 场景:坐席使用快速回复
User->>QRB: 点击 L1 分类 chip(如"账号"
QRB->>QRB: navState.l1Index = index
QRB-->>User: 横向展示 L2 条目预览
User->>QRB: 点击条目"密码重置指引"
QRB->>CS: pendingReplyText = template.content
CS-->>RB: watch 触发,填入输入框
RB-->>User: 输入框显示快速回复内容
%% ====== 时序图 2:右栏模式切换流程 ======
sequenceDiagram
autonumber
participant User as 坐席
participant PMT as PanelModeToggle
participant AAP as AiAssistantPanel
participant WS as Workspace
participant CS as ConversationStore
participant DOM as DOM/CSS
Note over User, DOM: 场景:坐席点击右栏放大/缩小开关
User->>PMT: 点击开关按钮
PMT->>AAP: emit('toggle')
AAP->>WS: emit('toggle')
alt 当前为 normal 模式 (260px)
WS->>CS: setPanelMode('expanded')
CS-->>WS: panelMode = 'expanded'
WS->>WS: rightSidebarRef.style.width = 'var(--assistant-panel-expanded)'
WS->>DOM: CSS transition: width 260px → 560px (0.3s)
DOM-->>User: 右栏平滑放大到 560px
Note over WS, DOM: 中栏 flex:1 自动缩小,min-width: 400px 保底
else 当前为 expanded 模式 (560px)
WS->>CS: setPanelMode('normal')
CS-->>WS: panelMode = 'normal'
WS->>WS: rightSidebarRef.style.width = 'var(--assistant-panel-width)'
WS->>DOM: CSS transition: width 560px → 260px (0.3s)
DOM-->>User: 右栏平滑缩小到 260px
Note over WS, DOM: 中栏 flex:1 自动扩大
end
Note over User, DOM: 拖拽手柄在放大模式下仍然可用
Note over WS, DOM: 拖拽范围:200px ~ 560px(上限已调整)
%% ====== 时序图 3:功能迁移流程(开发过程) ======
sequenceDiagram
autonumber
participant Dev as 开发过程
participant Old as 旧组件
participant New as 新组件
participant ChatArea as ChatArea
participant AAP as AiAssistantPanel
participant Store as ConversationStore
Note over Dev, Store: Phase 1 — 清理重复(T02
Dev->>Old: 删除 AiRecommendInline.vue
Dev->>ChatArea: 移除 import AiRecommendInline
Dev->>Old: 删除 AiSuggestReply.vue
Dev->>AAP: 移除 import AiSuggestReply
Note over Dev: 移除右栏已迁移功能
Dev->>AAP: 移除 Wingman 触发按钮组
Dev->>AAP: 移除 AI 推荐区(AiSuggestReply 引用)
Dev->>AAP: 移除快速回复区(QuickReplyPanel 引用)
Note over AAP: AiAssistantPanel 仅保留容器骨架 + 标注区
Note over Dev, Store: Phase 3 — 中栏建设(T03
Dev->>New: 创建 ReplySuggestArea.vue
Dev->>New: 创建 AiRecommendBar.vue
Note over New, Store: AiRecommendBar 从 ConversationStore.aiDrafts 加载数据
Dev->>New: 创建 QuickReplyBar.vue
Note over New, Store: QuickReplyBar 从 QuickReplyStore 加载模板
Dev->>ChatArea: 在消息列表与 ReplyBox 之间插入 ReplySuggestArea
Dev->>New: ReplyBox 工具栏重构为左右分区
Note over Dev, Store: Phase 4 — 右栏建设(T04
Dev->>New: 创建 AiTrainingPanel.vue (Tab 容器)
Dev->>New: 创建 SmartTagEditor.vue
Note over New, Store: SmartTagEditor 从 AAP 迁出标签逻辑
Dev->>New: 创建 QualityFeedback.vue
Dev->>New: 创建 KnowledgeContribute.vue
Dev->>New: 创建 PanelModeToggle.vue
Dev->>AAP: AiAssistantPanel 承载 PanelModeToggle + AiTrainingPanel
Dev->>Store: ConversationStore 新增 panelMode 状态
Note over Dev, Store: Phase 5 — 联调测试(T05
Dev->>ChatArea: 验证 ReplySuggestArea ↔ ReplyBox 联动
Dev->>ChatArea: 验证消息区高度 ≥ 400px (1080p)
Dev->>AAP: 验证模式切换 + Tab 切换
Dev->>Store: 验证 pendingReplyText 全链路通信