feat: 实现产品/项目/版本三大模块完整功能

- 产品列表:拖拽排序持久化、编辑弹窗、删除校验(活跃版本需迁移)
- 项目列表:新建项目表单(产品选择+重名校验)、产品筛选、版本归属修复
- 版本列表:新建版本表单(迭代类型自动生成版本号)、状态/项目筛选、倒序排列
- 项目详情页:概览统计、人员墙(参与次数)、版本时间线(阶段流水线+进度条)
- 全局优化:筛选栏统一为header下方固定行、按钮颜色改为主题蓝、API探测300ms、store缓存
- 数据持久化到localStorage,支持离线开发

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-08 17:11:23 +08:00
parent e0120c470c
commit eca65f1bce
18 changed files with 2171 additions and 94 deletions

View File

@@ -17,6 +17,11 @@ export class ProductController {
return this.productService.findAll();
}
@Get('overview')
findAllWithChildren() {
return this.productService.findAllWithChildren();
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.productService.findOne(id);

View File

@@ -20,6 +20,23 @@ export class ProductService {
});
}
findAllWithChildren() {
return this.prisma.product.findMany({
orderBy: { createdAt: 'desc' },
include: {
projects: {
orderBy: { createdAt: 'desc' },
select: { id: true, name: true, description: true, createdAt: true },
},
versions: {
orderBy: { createdAt: 'desc' },
select: { id: true, name: true, releaseDate: true, createdAt: true },
},
_count: { select: { requirements: true, projects: true, versions: true } },
},
});
}
async findOne(id: string) {
const product = await this.prisma.product.findUnique({
where: { id },