bea288e414
== 已部署上线 (9项) == - 代办事项真实数据源集成 (企微审批API 8bug修复链) - H5/坐席端 Logo样式统一+绿色背景 - 视频引导页修复 (localStorage key v2) - 坐席端 v9 Vue版本修复 (ElMessage._context) - 截图按钮 v10 修复 (getDisplayMedia user gesture) - 扫码样式恢复+H5扫码登录跳转修复 - H5截图快捷键提示 == 代码完成待部署 (3项) == - 知识迭代3Bug修复 (#8 POST端点/#7 MERGE幂等/#6 过期检查) - 会议室预定-小鱼易联终端 (40文件, 40/40测试通过) - IT资产升级审批推送 (asset_service.py) == 需求文档 (2项) == - 坐席端AI辅助消息框-PRD (4项新功能确认) - 坐席端布局优化建议 v2.0 (7天计划) == 新增文档 == - 日报-2026-07-11.md - 知识迭代Bug修复报告-20260711.md - 会议室预定-部署指南.md - CHANGELOG.md 更新 == 测试 == - test_todo_integration.py: 40/40 - test_meetingroom.py: 40/40 - test_bugfix_ki_suggestions.py: 21/21
127 lines
3.7 KiB
Plaintext
127 lines
3.7 KiB
Plaintext
%% 坐席端截图+拍照功能 — 类图
|
|
%% 文件: docs/03-技术架构/class-diagram.mermaid
|
|
|
|
classDiagram
|
|
%% ===== 类型定义 =====
|
|
class PendingImage {
|
|
+id: string
|
|
+blob: Blob
|
|
+previewUrl: string
|
|
+source: "screenshot" | "camera"
|
|
+createdAt: number
|
|
}
|
|
|
|
class SelectionBox {
|
|
+x: number
|
|
+y: number
|
|
+w: number
|
|
+h: number
|
|
}
|
|
|
|
class EditHistoryEntry {
|
|
+imageData: ImageData
|
|
+timestamp: number
|
|
}
|
|
|
|
class ScreenshotToolConfig {
|
|
+name: ScreenshotTool
|
|
+icon: string
|
|
+label: string
|
|
}
|
|
|
|
%% ===== Composables =====
|
|
class useScreenCapture {
|
|
-isCapturing: Ref~boolean~
|
|
+isScreenCaptureSupported() boolean
|
|
+captureScreen() Promise~Blob | null~
|
|
+captureScreenAsCanvas() Promise~HTMLCanvasElement | null~
|
|
}
|
|
|
|
class useCamera {
|
|
-isActive: Ref~boolean~
|
|
-error: Ref~CameraError | null~
|
|
-stream: MediaStream | null
|
|
+startCamera(facingMode?) Promise~boolean~
|
|
+stopCamera() void
|
|
+captureFrame() Promise~Blob | null~
|
|
+switchCamera() Promise~boolean~
|
|
}
|
|
|
|
class usePendingImages {
|
|
-images: Ref~PendingImage[]~
|
|
+addImage(blob: Blob, source: string) void
|
|
+removeImage(id: string) void
|
|
+clearAll() void
|
|
+hasImages: ComputedRef~boolean~
|
|
+count: ComputedRef~number~
|
|
}
|
|
|
|
%% ===== 组件 =====
|
|
class ScreenCapture {
|
|
+props: screenshotCanvas: HTMLCanvasElement
|
|
+emit: confirm(blob: Blob)
|
|
+emit: cancel()
|
|
-box: Ref~SelectionBox~
|
|
-currentTool: Ref~ScreenshotTool~
|
|
-currentColor: Ref~string~
|
|
-history: EditHistoryEntry[]
|
|
-historyIndex: number
|
|
+startSelect(e: MouseEvent) void
|
|
+onMove(e: MouseEvent) void
|
|
+startResize(dir: string, e: MouseEvent) void
|
|
+drawMosaic(x1, y1, x2, y2) void
|
|
+drawArrow(x1, y1, x2, y2) void
|
|
+drawText(x, y, text) void
|
|
+undo() void
|
|
+confirm() void
|
|
+cancel() void
|
|
}
|
|
|
|
class CameraCapture {
|
|
+props: modelValue: boolean
|
|
+emit: confirm(blob: Blob)
|
|
+emit: cancel()
|
|
+emit: update:modelValue(boolean)
|
|
-videoRef: Ref~HTMLVideoElement~
|
|
-capturedImage: Ref~string | null~
|
|
-cameraError: Ref~CameraError | null~
|
|
+startCamera() void
|
|
+capture() void
|
|
+retake() void
|
|
+confirm() void
|
|
+close() void
|
|
}
|
|
|
|
class PendingImagePreview {
|
|
+props: images: PendingImage[]
|
|
+emit: remove(id: string)
|
|
}
|
|
|
|
class ReplyBox {
|
|
-pendingImages: usePendingImages
|
|
-showScreenCapture: Ref~boolean~
|
|
-showCameraDialog: Ref~boolean~
|
|
-screenshotCanvas: Ref~HTMLCanvasElement | null~
|
|
+handleScreenshot() Promise~void~
|
|
+handleCamera() void
|
|
+onScreenCaptureConfirm(blob: Blob) void
|
|
+onCameraConfirm(blob: Blob) void
|
|
+onCameraCancel() void
|
|
+removePendingImage(id: string) void
|
|
+handleSend() Promise~void~
|
|
+sendPendingImages(convId: string) Promise~void~
|
|
}
|
|
|
|
%% ===== 关系 =====
|
|
ReplyBox --> useScreenCapture : 调用截图
|
|
ReplyBox --> useCamera : 调用拍照
|
|
ReplyBox --> usePendingImages : 管理待发送图片
|
|
ReplyBox --> ScreenCapture : 挂载截图编辑器
|
|
ReplyBox --> CameraCapture : 挂载拍照弹窗
|
|
ReplyBox --> PendingImagePreview : 挂载预览条
|
|
ScreenCapture --> SelectionBox : 选区状态
|
|
ScreenCapture --> EditHistoryEntry : 撤销历史
|
|
CameraCapture --> useCamera : 摄像头逻辑
|
|
PendingImagePreview --> PendingImage : 渲染缩略图
|
|
usePendingImages --> PendingImage : 管理队列
|