方案设计模块提供了完整的文档方案设计、章节管理、AI辅助修改和最终文档生成功能。支持上传大文件(Word/PDF),根据需求描述生成方案,章节灵活组建,AI辅助修改,最终合并输出为Word或PDF格式。
GET /api/v1/solution-designs - 获取方案设计列表POST /api/v1/solution-designs - 创建方案设计GET /api/v1/solution-designs/{id} - 获取方案设计详情PUT /api/v1/solution-designs/{id} - 更新方案设计DELETE /api/v1/solution-designs/{id} - 删除方案设计POST /api/v1/solution-designs/{id}/generate - 生成最终文档GET /api/v1/solution-designs/{id}/chapters - 获取章节列表POST /api/v1/solution-designs/{id}/chapters - 添加章节POST /api/v1/solution-designs/{id}/chapters/{chapterId}/ai-suggestions - 获取AI修改建议POST /api/v1/solution-designs/{id}/chapters/{chapterId}/apply-ai - 应用AI修改curl -X POST http://localhost:3000/api/v1/solution-designs \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "智慧城市建设项目方案",
"description": "针对智慧城市建设的完整解决方案",
"requirements": "需要包含物联网设备部署、数据分析平台和用户界面设计",
"outputFormat": "docx"
}'
curl -X POST http://localhost:3000/api/v1/solution-designs/1/chapters \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"chapterNumber": 1,
"title": "项目概述",
"content": "本项目旨在建设智慧城市基础设施...",
"modificationInstructions": "请优化这段文字,使其更加专业"
}'
curl -X POST http://localhost:3000/api/v1/solution-designs/1/chapters/1/ai-suggestions \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"instructions": "请优化这段文字,使其更加专业和具有说服力"
}'
curl -X POST http://localhost:3000/api/v1/solution-designs/1/chapters/1/apply-ai \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"suggestions": ["建议增加具体数据支持", "优化段落结构"],
"revisedContent": "优化后的项目概述内容...",
"confidence": 0.85
}'
curl -X POST http://localhost:3000/api/v1/solution-designs/1/generate \
-H "Authorization: Bearer <your_jwt_token>"
npm run devhttp://localhost:5173/admin# 数据库配置
DB_HOST=localhost
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=d8dai
# MinIO配置(可选)
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_USE_SSL=false
# OpenAI配置(可选)
OPENAI_API_KEY=your_openai_api_key
查看控制台输出获取详细错误信息:
npm run dev 2>&1 | grep -i "solution\|error"