feat(ssa): Complete V11 UI development and frontend-backend integration - Pixel-perfect V11 UI, multi-task support, Word export, input overlay fix, code cleanup. MVP Phase 1 core 95% complete.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-20 14:46:45 +08:00
parent 49b5c37cb1
commit 8d496d1515
38 changed files with 7255 additions and 1074 deletions

View File

@@ -0,0 +1,90 @@
/**
* SSA-Pro 智能统计工作台 V11
*
* 100% 还原 V11 原型图设计
* - 左侧抽屉栏(可展开/收起)
* - 中间对话区(居中布局)
* - 右侧工作区(动态显示)
*
* 键盘快捷键:
* - Esc: 关闭工作区/代码模态框
* - Ctrl+B: 切换侧边栏
* - Ctrl+N: 新建分析
*/
import React, { useEffect, useCallback } from 'react';
import { useSSAStore } from './stores/ssaStore';
import { SSASidebar } from './components/SSASidebar';
import { SSAChatPane } from './components/SSAChatPane';
import { SSAWorkspacePane } from './components/SSAWorkspacePane';
import { SSACodeModal } from './components/SSACodeModal';
import { SSAToast } from './components/SSAToast';
const SSAWorkspace: React.FC = () => {
const {
workspaceOpen,
setWorkspaceOpen,
codeModalVisible,
setCodeModalVisible,
sidebarExpanded,
setSidebarExpanded,
reset,
} = useSSAStore();
const handleKeyDown = useCallback((e: KeyboardEvent) => {
if (e.key === 'Escape') {
if (codeModalVisible) {
setCodeModalVisible(false);
} else if (workspaceOpen) {
setWorkspaceOpen(false);
}
}
if (e.ctrlKey || e.metaKey) {
if (e.key === 'b' || e.key === 'B') {
e.preventDefault();
setSidebarExpanded(!sidebarExpanded);
}
if (e.key === 'n' || e.key === 'N') {
e.preventDefault();
reset();
}
}
}, [
codeModalVisible,
workspaceOpen,
sidebarExpanded,
setCodeModalVisible,
setWorkspaceOpen,
setSidebarExpanded,
reset,
]);
useEffect(() => {
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
}, [handleKeyDown]);
return (
<div className="ssa-v11">
{/* Toast 容器 */}
<SSAToast />
{/* 左侧抽屉栏 */}
<SSASidebar />
{/* 主容器 */}
<div className="ssa-v11-main">
{/* 对话区 */}
<SSAChatPane />
{/* 工作区 */}
<SSAWorkspacePane />
</div>
{/* 代码模态框 */}
<SSACodeModal />
</div>
);
};
export default SSAWorkspace;