Commit Graph

5 Commits

Author SHA1 Message Date
5b37e40db3 refactor(BookDetail): 移除不稳的 Arco 子组件 + 自实现简洁布局
- 移除 a-page-header/a-statistic/a-descriptions/a-list-item-meta
  (Arco 2.x 这些组件在 BookDetail 里有渲染问题)
- 顶部改用 a-card + flex 自定义布局
- 4 张统计卡用 div + 大数字
- 左侧目录改用 ul/li 自定义(避开 a-list slot 顺序坑)
- 右侧三 tab 保留 a-tabs,word/json 内用 div + a-button
2026-10-11 19:09:51 +08:00
e69bc67823 feat(BookDetail): 左侧目录 + 右侧三 tab(word/html/json)+ 顶部统计卡片 2026-10-11 18:57:12 +08:00
49392b47fc fix: 修大小写敏感性 (Linux 部署): views/redirect + views/login 2026-10-11 18:15:09 +08:00
5d199c2cdb deploy: venv 移到 ~/book-mcp-venv(避免 /opt 无权限);dev 端口默认 5173 2026-10-11 18:04:47 +08:00
9b0910ccb1 Initial commit: book-mcp 教辅处理 MCP server + Arco Vue 管理端
后端 (book_mcp_server.py, 335 行, 15 个 MCP 工具):
- create_book / add_document / mark_html_ready / mark_json_ready / mark_failed
- update_book_status / soft_delete_book / retry_failed
- get_book / list_books / get_document / list_documents / get_document_url
- upload_to_rustfs / health
- 走 JSON-RPC + stateless_http + json_response(前端可直接调)
- launchd 守护 / 6 秒拉起(macOS)
- systemd 守护脚本(Linux/codelab)

存储:
- MongoDB (mongo:8.0 容器) - book/book_document/document_file 三表
- RustFS 对象存储(fs.code-lab.cn/scan/)- book/<id>/docs/<doc_id>/{docx,html,json}
- 幂等设计: zip_sha256 唯一 + (book_id+original_path) 唯一

前端 (Vue 3 + TS + Arco Design):
- 列表页 /book/list - 搜索 + 状态过滤 + 进度
- 详情页 /book/:id - 文档折叠 + 文件下载
- MCP 客户端 src/api/mcp.ts (JSON-RPC over fetch)

部署:
- deploy/install.sh (codelab 一键装 backend + systemd)
- deploy/install-frontend.sh (vite dev / 生产构建)
- docs/deploy.md (运维手册)

测试:
- tests/test_basic.py (sanity 7 项)
- tests/test_e2e.py (完整 e2e: docx→HTML→入库→上传→校验)
2026-10-11 18:03:57 +08:00