diff --git a/src/api/project.ts b/src/api/project.ts index ab21df1..b3ab19a 100644 --- a/src/api/project.ts +++ b/src/api/project.ts @@ -11,7 +11,7 @@ type Result = { /** 项目列表项 - 根据 OpenAPI 定义 */ export type ProjectItem = { - id?: number; + id?: string; projectCode?: string; projectName?: string; projectType?: string; @@ -56,7 +56,7 @@ export const getProjectList = (params?: ProjectQueryParams) => { }; /** 删除项目 */ -export const deleteProject = (id: number) => { +export const deleteProject = (id: string) => { return http.request>("delete", `/api/v1/project/${id}`); }; @@ -90,7 +90,7 @@ export const getProjectStatistics = () => { /** 甘特图任务 */ export type GanttTask = { - id?: number; + id?: string; taskName?: string; type?: string; // task-任务, milestone-里程碑 startDate?: string; @@ -100,15 +100,15 @@ export type GanttTask = { progress?: number; status?: string; priority?: string; - parentId?: number; + parentId?: string; sortOrder?: number; assigneeName?: string; - dependencies?: number[]; + dependencies?: string[]; }; /** 项目甘特图数据 */ export type ProjectGantt = { - projectId?: number; + projectId?: string; projectName?: string; projectStatus?: string; projectStartDate?: string; @@ -119,13 +119,165 @@ export type ProjectGantt = { }; /** 获取项目甘特图数据 */ -export const getProjectGantt = (projectId: number) => { +export const getProjectGantt = (projectId: string) => { return http.request>( "get", `/api/v1/project/${projectId}/gantt` ); }; +// ==================== 项目详情 ==================== + +/** 项目成员 */ +export type ProjectMember = { + id: string; + userId?: string; + userName?: string; + realName?: string; + avatar?: string; + roleCode: string; + department?: string; + responsibility?: string; + weeklyHours?: number; + joinDate?: string; + status?: number; +}; + +/** 项目里程碑 */ +export type ProjectMilestone = { + id: string; + milestoneName: string; + description?: string; + planDate?: string; + actualDate?: string; + status?: string; + progress?: number; + isKey?: number; + deliverables?: string; + sortOrder?: number; +}; + +/** 项目任务 */ +export type ProjectTask = { + id: string; + taskCode?: string; + taskName: string; + description?: string; + taskType?: string; + milestoneId?: string; + assigneeId?: string; + assigneeName?: string; + planStartDate?: string; + planEndDate?: string; + actualStartDate?: string; + actualEndDate?: string; + planHours?: number; + actualHours?: number; + progress?: number; + priority?: string; + status?: string; + sortOrder?: number; +}; + +/** 项目资源 */ +export type ProjectResource = { + id: string; + resourceCode?: string; + resourceType?: string; + resourceName: string; + description?: string; + specification?: string; + unit?: string; + planQuantity?: number; + actualQuantity?: number; + unitPrice?: number; + currency?: string; + supplier?: string; + status?: string; + planArriveDate?: string; + actualArriveDate?: string; +}; + +/** 项目风险 */ +export type ProjectRisk = { + id: string; + riskCode?: string; + category?: string; + riskName: string; + description?: string; + probability?: number; + impact?: number; + riskScore?: number; + riskLevel?: string; + status?: string; + ownerId?: string; + mitigationPlan?: string; + dueDate?: string; + discoverTime?: string; +}; + +/** 时间线节点 */ +export type TimelineNode = { + id: string; + nodeName: string; + nodeType?: string; + planDate?: string; + actualDate?: string; + description?: string; + status?: string; + sortOrder?: number; + kbScope?: string[]; +}; + +/** 项目详情 */ +export type ProjectDetail = { + id: string; + projectCode: string; + projectName: string; + projectType: string; + description?: string; + objectives?: string; + managerId?: string; + managerName?: string; + sponsorId?: string; + planStartDate?: string; + planEndDate?: string; + actualStartDate?: string; + actualEndDate?: string; + budget?: number; + cost?: number; + currency?: string; + progress?: number; + status?: string; + priority?: string; + riskLevel?: string; + visibility?: number; + tags?: string[]; + createTime?: string; + updateTime?: string; + memberCount?: number; + taskCount?: number; + completedTaskCount?: number; + milestoneCount?: number; + resourceCount?: number; + riskCount?: number; + highRiskCount?: number; + members?: ProjectMember[]; + milestones?: ProjectMilestone[]; + tasks?: ProjectTask[]; + resources?: ProjectResource[]; + risks?: ProjectRisk[]; + timelineNodes?: TimelineNode[]; +}; + +/** 获取项目详情 */ +export const getProjectDetail = (projectId: string) => { + return http.request>( + "get", + `/api/v1/project/${projectId}` + ); +}; + // ==================== 项目初始化(复用 system.ts 中的定义) ==================== /** 项目信息 */ diff --git a/src/api/项目详情.openapi.json b/src/api/项目详情.openapi.json new file mode 100644 index 0000000..ae15ff1 --- /dev/null +++ b/src/api/项目详情.openapi.json @@ -0,0 +1,594 @@ +{ + "code": 200, + "data": { + "id": "2037831996319100930", + "projectCode": "PRJ15F5BF5B5CAD", + "projectName": "AIHR 智能简历筛选系统", + "projectType": "研发项目", + "description": "利用大语言模型(LLM)和自然语言处理(NLP)技术,实现简历的自动化解析、人岗匹配度评分及候选人排序,提升招聘效率。", + "objectives": "1. 效率提升:单份处理时间降至10秒内。2. 精准匹配:人岗匹配度评分准确率>90%。3. 系统集成:无缝对接主流招聘网站及内部ATS。4. 合规安全:候选人数据脱敏,符合《个人信息保护法》。", + "managerId": null, + "managerName": null, + "sponsorId": null, + "planStartDate": "2026-04-01", + "planEndDate": "2026-09-30", + "actualStartDate": null, + "actualEndDate": null, + "budget": 2850000.0, + "cost": 0.0, + "currency": "CNY", + "progress": 0, + "status": "planning", + "priority": "high", + "riskLevel": "low", + "visibility": 1, + "tags": null, + "createTime": null, + "updateTime": null, + "memberCount": 4, + "taskCount": 8, + "completedTaskCount": 0, + "milestoneCount": 6, + "resourceCount": 6, + "riskCount": 4, + "highRiskCount": 0, + "members": [ + { + "id": "2037831996608507907", + "userId": null, + "userName": null, + "realName": null, + "avatar": null, + "roleCode": "manager", + "department": null, + "responsibility": "负责整体项目规划、进度控制、风险管理及跨部门协调", + "weeklyHours": 40.0, + "joinDate": null, + "status": 1 + }, + { + "id": "2037831996646256642", + "userId": null, + "userName": null, + "realName": null, + "avatar": null, + "roleCode": "leader", + "department": null, + "responsibility": "负责需求梳理、原型设计、用户故事编写及验收测试", + "weeklyHours": 40.0, + "joinDate": null, + "status": 1 + }, + { + "id": "2037831996646256643", + "userId": null, + "userName": null, + "realName": null, + "avatar": null, + "roleCode": "leader", + "department": null, + "responsibility": "负责系统整体技术选型、架构设计、核心技术难点攻关", + "weeklyHours": 20.0, + "joinDate": null, + "status": 1 + }, + { + "id": "2037831996646256644", + "userId": null, + "userName": null, + "realName": null, + "avatar": null, + "roleCode": "member", + "department": null, + "responsibility": "负责测试用例编写、功能测试、性能测试及自动化测试脚本", + "weeklyHours": 40.0, + "joinDate": null, + "status": 1 + } + ], + "milestones": [ + { + "id": "2037831996319100931", + "milestoneName": "需求分析与架构设计", + "description": "完成需求评审及技术架构可行性验证", + "planDate": "2026-04-30", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 0 + }, + { + "id": "2037831996319100932", + "milestoneName": "核心算法模型训练与验证", + "description": "模型在测试集上的准确率>85%,解析字段覆盖率>95%", + "planDate": "2026-06-15", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 1 + }, + { + "id": "2037831996319100933", + "milestoneName": "系统功能开发完成 (Alpha 版)", + "description": "核心功能(上传、解析、评分、搜索)闭环跑通", + "planDate": "2026-07-31", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 2 + }, + { + "id": "2037831996386209793", + "milestoneName": "系统集成与内部测试 (Beta 版)", + "description": "支持并发用户数>50,响应时间<2秒,无严重 Bug", + "planDate": "2026-08-31", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 3 + }, + { + "id": "2037831996386209794", + "milestoneName": "用户验收测试 (UAT) 与试点", + "description": "试点部门(人力资源部)确认功能满足业务需求", + "planDate": "2026-09-15", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 4 + }, + { + "id": "2037831996386209795", + "milestoneName": "正式上线与交付", + "description": "系统正式部署至生产环境,完成全员培训", + "planDate": "2026-09-30", + "actualDate": null, + "status": "pending", + "progress": 0, + "isKey": 0, + "deliverables": null, + "sortOrder": 5 + } + ], + "tasks": [ + { + "id": "2037831996386209796", + "taskCode": null, + "taskName": "需求分析与产品设计", + "description": "梳理业务需求,输出原型设计与需求规格说明书", + "taskType": null, + "milestoneId": "2037831996319100931", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-04-01", + "planEndDate": "2026-04-20", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 120.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 0 + }, + { + "id": "2037831996449124353", + "taskCode": null, + "taskName": "系统架构与数据库设计", + "description": "完成技术选型、架构设计及数据库表结构设计", + "taskType": null, + "milestoneId": "2037831996319100932", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-04-15", + "planEndDate": "2026-04-30", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 80.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 1 + }, + { + "id": "2037831996449124354", + "taskCode": null, + "taskName": "数据准备与标注", + "description": "处理10万份历史简历并完成5000对简历-JD匹配标注", + "taskType": null, + "milestoneId": "2037831996319100933", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-04-20", + "planEndDate": "2026-05-20", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 160.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 2 + }, + { + "id": "2037831996449124355", + "taskCode": null, + "taskName": "核心算法模型训练", + "description": "基于大模型进行简历解析引擎与匹配算法的训练和调优", + "taskType": null, + "milestoneId": "2037831996386209793", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-05-01", + "planEndDate": "2026-06-15", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 240.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 3 + }, + { + "id": "2037831996449124356", + "taskCode": null, + "taskName": "系统前后端功能开发", + "description": "开发后端服务及前端管理界面,并完成API对接", + "taskType": null, + "milestoneId": "2037831996386209794", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-06-01", + "planEndDate": "2026-07-31", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 320.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 4 + }, + { + "id": "2037831996449124357", + "taskCode": null, + "taskName": "系统集成与内测", + "description": "系统整体集成、性能测试及缺陷修复", + "taskType": null, + "milestoneId": "2037831996386209795", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-08-01", + "planEndDate": "2026-08-31", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 160.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 5 + }, + { + "id": "2037831996449124358", + "taskCode": null, + "taskName": "用户验收测试与试点", + "description": "人力资源部介入试用系统,收集反馈并进行优化", + "taskType": null, + "milestoneId": "2037831996319100931", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-09-01", + "planEndDate": "2026-09-15", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 80.0, + "actualHours": null, + "progress": 0, + "priority": "medium", + "status": "pending", + "sortOrder": 6 + }, + { + "id": "2037831996516233217", + "taskCode": null, + "taskName": "生产部署与交付", + "description": "系统部署上线,组织全员培训,输出总结报告", + "taskType": null, + "milestoneId": "2037831996319100932", + "assigneeId": null, + "assigneeName": null, + "planStartDate": "2026-09-16", + "planEndDate": "2026-09-30", + "actualStartDate": null, + "actualEndDate": null, + "planHours": 80.0, + "actualHours": null, + "progress": 0, + "priority": "high", + "status": "pending", + "sortOrder": 7 + } + ], + "resources": [ + { + "id": "2037831996646256645", + "resourceCode": null, + "resourceType": "equipment", + "resourceName": "高性能云服务器 (16核64G)", + "description": null, + "specification": null, + "unit": "台", + "planQuantity": 5.0, + "actualQuantity": null, + "unitPrice": 2000.0, + "currency": "CNY", + "supplier": "云服务提供商", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + }, + { + "id": "2037831996709171202", + "resourceCode": null, + "resourceType": "equipment", + "resourceName": "云端 GPU 算力资源 (NVIDIA A100/A800)", + "description": null, + "specification": null, + "unit": "小时", + "planQuantity": 2000.0, + "actualQuantity": null, + "unitPrice": 50.0, + "currency": "CNY", + "supplier": "云算力平台", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + }, + { + "id": "2037831996709171203", + "resourceCode": null, + "resourceType": "equipment", + "resourceName": "对象存储空间", + "description": null, + "specification": null, + "unit": "TB", + "planQuantity": 5.0, + "actualQuantity": null, + "unitPrice": 300.0, + "currency": "CNY", + "supplier": "云服务提供商", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + }, + { + "id": "2037831996709171204", + "resourceCode": null, + "resourceType": "material", + "resourceName": "历史简历数据", + "description": null, + "specification": null, + "unit": "份", + "planQuantity": 100000.0, + "actualQuantity": null, + "unitPrice": 0.0, + "currency": "CNY", + "supplier": "企业内部", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + }, + { + "id": "2037831996709171205", + "resourceCode": null, + "resourceType": "material", + "resourceName": "高质量匹配标注数据集", + "description": null, + "specification": null, + "unit": "对", + "planQuantity": 5000.0, + "actualQuantity": null, + "unitPrice": 10.0, + "currency": "CNY", + "supplier": "数据标注专员", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + }, + { + "id": "2037831996709171206", + "resourceCode": null, + "resourceType": "human", + "resourceName": "法律合规咨询服务", + "description": null, + "specification": null, + "unit": "项", + "planQuantity": 1.0, + "actualQuantity": null, + "unitPrice": 50000.0, + "currency": "CNY", + "supplier": "外部法律顾问", + "status": "planned", + "planArriveDate": null, + "actualArriveDate": null, + "responsibleId": null, + "location": null, + "tags": null + } + ], + "risks": [ + { + "id": "2037831996780474370", + "riskCode": null, + "category": "technical", + "riskName": "模型准确率不达标风险", + "description": "大语言模型可能出现幻觉或对复杂简历解析不准,导致人岗匹配准确率低于90%", + "probability": 40.0, + "impact": 4.0, + "riskScore": 1.6, + "riskLevel": "medium", + "status": "identified", + "ownerId": null, + "mitigationPlan": "引入高质量标注数据集微调模型,增加人工专家复核机制,持续优化算法", + "dueDate": null, + "discoverTime": "2026-03-28T17:59:43.784116" + }, + { + "id": "2037831996780474369", + "riskCode": null, + "category": "external", + "riskName": "数据隐私与合规风险", + "description": "简历数据包含大量个人敏感信息,处理不当可能违反《个人信息保护法》", + "probability": 30.0, + "impact": 5.0, + "riskScore": 1.5, + "riskLevel": "medium", + "status": "identified", + "ownerId": null, + "mitigationPlan": "聘请法律顾问审核全流程合规性,严格实施数据脱敏处理,建立完善的数据访问权限控制", + "dueDate": null, + "discoverTime": "2026-03-28T17:59:43.778244" + }, + { + "id": "2037831996780474371", + "riskCode": null, + "category": "technical", + "riskName": "第三方ATS系统集成风险", + "description": "对接主流招聘网站及内部ATS时可能遇到API限制或数据格式不兼容问题", + "probability": 50.0, + "impact": 3.0, + "riskScore": 1.5, + "riskLevel": "medium", + "status": "identified", + "ownerId": null, + "mitigationPlan": "提前获取第三方接口文档并进行技术验证,设计高兼容性的中间件适配层", + "dueDate": null, + "discoverTime": "2026-03-28T17:59:43.786088" + }, + { + "id": "2037831996780474372", + "riskCode": null, + "category": "resource", + "riskName": "算力资源短缺风险", + "description": "云端高端GPU(如A100/A800)可能存在排队或租赁不到位的情况,影响训练进度", + "probability": 25.0, + "impact": 4.0, + "riskScore": 1.0, + "riskLevel": "medium", + "status": "identified", + "ownerId": null, + "mitigationPlan": "提前锁定云资源供应商并签订算力保障协议,准备备用算力平台方案", + "dueDate": null, + "discoverTime": "2026-03-28T17:59:43.789088" + } + ], + "timelineNodes": [ + { + "id": "2037831996843388930", + "nodeName": "项目启动", + "nodeType": "event", + "planDate": "2026-04-01", + "actualDate": null, + "description": "项目正式启动,团队入场", + "status": "pending", + "sortOrder": 0, + "kbScope": null + }, + { + "id": "2037831996843388931", + "nodeName": "M1: 需求分析与架构设计完成", + "nodeType": "milestone", + "planDate": "2026-04-30", + "actualDate": null, + "description": "完成需求评审及技术架构可行性验证", + "status": "pending", + "sortOrder": 1, + "kbScope": null + }, + { + "id": "2037831996843388932", + "nodeName": "M2: 核心算法验证通过", + "nodeType": "milestone", + "planDate": "2026-06-15", + "actualDate": null, + "description": "模型准确率达标,解析引擎V1.0产出", + "status": "pending", + "sortOrder": 2, + "kbScope": null + }, + { + "id": "2037831996843388933", + "nodeName": "M3: Alpha版开发完成", + "nodeType": "milestone", + "planDate": "2026-07-31", + "actualDate": null, + "description": "核心功能闭环跑通", + "status": "pending", + "sortOrder": 3, + "kbScope": null + }, + { + "id": "2037831996843388934", + "nodeName": "M4: Beta版内测完成", + "nodeType": "milestone", + "planDate": "2026-08-31", + "actualDate": null, + "description": "性能达标,无严重缺陷", + "status": "pending", + "sortOrder": 4, + "kbScope": null + }, + { + "id": "2037831996906303490", + "nodeName": "M5: UAT与试点完成", + "nodeType": "milestone", + "planDate": "2026-09-15", + "actualDate": null, + "description": "人力资源部验收确认", + "status": "pending", + "sortOrder": 5, + "kbScope": null + }, + { + "id": "2037831996906303491", + "nodeName": "M6: 系统正式上线与交付", + "nodeType": "milestone", + "planDate": "2026-09-30", + "actualDate": null, + "description": "全员培训完成,项目结项", + "status": "pending", + "sortOrder": 6, + "kbScope": null + } + ] + }, + "message": "查询成功" +} diff --git a/src/router/modules/project.ts b/src/router/modules/project.ts index 0086416..effe065 100644 --- a/src/router/modules/project.ts +++ b/src/router/modules/project.ts @@ -17,6 +17,16 @@ export default { meta: { title: $t("menus.pureProject") } + }, + { + path: "/project/detail/:id", + name: "ProjectDetail", + component: () => import("@/views/project/detail.vue"), + meta: { + title: "项目详情", + showLink: false, + activePath: "/project" + } } ] } satisfies RouteConfigsTable; diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue new file mode 100644 index 0000000..9bdcf9f --- /dev/null +++ b/src/views/project/detail.vue @@ -0,0 +1,865 @@ + + + + + diff --git a/src/views/project/index.vue b/src/views/project/index.vue index 6805237..a3cbae3 100644 --- a/src/views/project/index.vue +++ b/src/views/project/index.vue @@ -1,5 +1,6 @@