feat(ai-chat): 重构项目选择逻辑并合并OpenAPI定义文件
Some checks failed
Lint Code / Lint Code (push) Failing after 17m14s

- 将项目选择面板改为下拉选择器,简化UI交互
- 新增 `setDraftByProjectId` 和 `applyProjectSelection` 函数统一处理项目切换
- 删除分散的OpenAPI JSON文件,合并为统一的日报分析查询接口定义
- 在 `project.ts` 中添加 `getDailyReportWithAnalysisReports` API及相关类型定义
- 修复ChatGPT组件样式空格格式问题
This commit is contained in:
2026-04-01 16:03:26 +08:00
parent 5bb9b6d3db
commit 5b96f54d71
13 changed files with 1187 additions and 6203 deletions

View File

@@ -1,184 +0,0 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/ai/kb/document/{docId}/chunks": {
"get": {
"summary": "获取文档分片列表",
"deprecated": false,
"description": "获取文档分片列表\n获取文档分片列表\n获取指定文档的所有分片信息",
"tags": [],
"parameters": [
{
"name": "docId",
"in": "path",
"description": "文档UUID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseListDocumentChunkVO",
"description": "分片列表"
}
}
}
}
},
"security": []
}
},
"/api/v1/ai/kb/chunk/{chunkId}": {
"get": {
"summary": "获取分片详情",
"deprecated": false,
"description": "获取分片详情\n获取分片详情\n获取指定分片的详细信息",
"tags": [],
"parameters": [
{
"name": "chunkId",
"in": "path",
"description": "分片ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseDocumentChunkVO",
"description": "分片详情"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"DocumentChunkVO": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "分片ID"
},
"docId": {
"type": "string",
"description": "原始文档ID"
},
"content": {
"type": "string",
"description": "分片内容"
},
"chunkIndex": {
"type": "integer",
"description": "分片序号"
},
"chunkTotal": {
"type": "integer",
"description": "总分片数"
},
"title": {
"type": "string",
"description": "文档标题"
},
"docType": {
"type": "string",
"description": "文档类型"
},
"sourceType": {
"type": "string",
"description": "来源类型"
},
"status": {
"type": "string",
"description": "状态"
}
}
},
"BaseResponseListDocumentChunkVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DocumentChunkVO",
"description": "文档分片VO"
},
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseDocumentChunkVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/DocumentChunkVO",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -389,6 +389,102 @@ export const applyDailyReportAnalysisSuggestions = (
);
};
export type MilestoneRisk = {
milestoneId?: string;
milestoneName?: string;
planDate?: string;
riskLevel?: string;
description?: string;
estimatedDelayDays?: number;
suggestion?: string;
};
export type ResourceNeed = {
resourceType?: string;
resourceName?: string;
quantity?: number;
unit?: string;
reason?: string;
suggestedArrivalDate?: string;
};
export type ProgressSuggestion = {
taskId?: string;
taskName?: string;
suggestionType?: string;
suggestion?: string;
priority?: string;
expectedEffect?: string;
};
export type ProgressUpdateRecommendation = {
targetType?: string;
targetId?: string;
suggestedStatus?: string;
suggestedProgress?: number;
reason?: string;
confidence?: number;
};
export type IdentifiedRisk = {
riskName?: string;
category?: string;
description?: string;
probability?: number;
impact?: number;
riskLevel?: string;
impactScope?: string;
triggerCondition?: string;
mitigationPlan?: string;
contingencyPlan?: string;
priority?: string;
};
export type DailyReportAnalysisResult = {
reportId?: string;
projectId?: string;
projectName?: string;
reportDate?: string;
overallProgressAssessment?: OverallProgressAssessment;
milestoneRisks?: MilestoneRisk[];
resourceNeeds?: ResourceNeed[];
progressSuggestions?: ProgressSuggestion[];
progressUpdateRecommendations?: ProgressUpdateRecommendation[];
identifiedRisks?: IdentifiedRisk[];
};
export type DailyReportWithAnalysisVO = {
reportId?: string;
projectId?: string;
reportDate?: string;
submitterUsername?: string;
submitterId?: string;
workContent?: string;
tomorrowPlan?: string;
workIntensity?: number;
needHelp?: boolean;
helpContent?: string;
createTime?: string;
analysisId?: string;
analysisStatus?: string;
analysisResult?: DailyReportAnalysisResult;
analysisSuggestions?: DailyReportUpdateSuggestionVO[];
};
export const getDailyReportWithAnalysisReports = (params: {
projectId: string;
reportDate?: string;
pageNum: number;
pageSize: number;
suggestionStatus?: string;
}) => {
return http.request<Result<TableDataInfo<DailyReportWithAnalysisVO>>>(
"get",
"/api/v1/daily-report/analysis/reports",
{ params }
);
};
// ==================== 项目初始化(复用 system.ts 中的定义) ====================
/** 项目信息 */

View File

@@ -1,295 +0,0 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/daily-report/analysis/suggestions": {
"get": {
"summary": "获取日报进度更新建议",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "projectId",
"in": "query",
"description": "项目ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "reportId",
"in": "query",
"description": "日报ID",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "reportDate",
"in": "query",
"description": "日报日期",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "submitterUsername",
"in": "query",
"description": "日报提交人用户名",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseDailyReportAnalysisSuggestionsVO"
}
}
}
}
},
"security": []
}
},
"/api/v1/daily-report/analysis/suggestions/apply": {
"post": {
"summary": "应用日报进度回写建议",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApplyDailyReportSuggestionsRequest",
"description": "建议ID列表"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseInteger",
"description": "应用结果"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"OverallProgressAssessment": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "进度状态ahead-提前on_track-正常delayed-滞后"
},
"deviationPercentage": {
"type": "number",
"description": "进度偏差百分比 (正数表示提前,负数表示滞后)"
},
"description": {
"type": "string",
"description": "评估说明"
},
"keyIssues": {
"type": "array",
"items": {
"type": "string"
},
"description": "关键问题"
}
}
},
"DailyReportUpdateSuggestionVO": {
"type": "object",
"properties": {
"suggestionId": {
"type": "integer",
"description": "",
"format": "int64"
},
"targetType": {
"type": "string",
"description": ""
},
"targetId": {
"type": "integer",
"description": "",
"format": "int64"
},
"targetName": {
"type": "string",
"description": ""
},
"currentStatus": {
"type": "string",
"description": ""
},
"currentProgress": {
"type": "integer",
"description": ""
},
"suggestedStatus": {
"type": "string",
"description": ""
},
"suggestedProgress": {
"type": "integer",
"description": ""
},
"reason": {
"type": "string",
"description": ""
},
"confidence": {
"type": "number",
"description": ""
},
"status": {
"type": "string",
"description": ""
}
}
},
"DailyReportAnalysisSuggestionsVO": {
"type": "object",
"properties": {
"analysisId": {
"type": "integer",
"description": "",
"format": "int64"
},
"reportId": {
"type": "integer",
"description": "",
"format": "int64"
},
"projectId": {
"type": "integer",
"description": "",
"format": "int64"
},
"reportDate": {
"type": "string",
"description": ""
},
"overallProgressAssessment": {
"$ref": "#/components/schemas/OverallProgressAssessment",
"description": ""
},
"suggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DailyReportUpdateSuggestionVO",
"description": "cn.yinlihupo.domain.vo.DailyReportUpdateSuggestionVO"
},
"description": ""
}
}
},
"BaseResponseDailyReportAnalysisSuggestionsVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/DailyReportAnalysisSuggestionsVO",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseInteger": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "integer",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"ApplyDailyReportSuggestionsRequest": {
"type": "object",
"properties": {
"projectId": {
"type": "integer",
"description": "",
"format": "int64"
},
"suggestionIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": ""
}
},
"required": ["projectId", "suggestionIds"]
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -0,0 +1,547 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/daily-report/analysis/reports": {
"get": {
"summary": "分页获取项目日报及分析结果",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "projectId",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "reportDate",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pageNum",
"in": "query",
"description": "",
"required": true,
"example": 1,
"schema": {
"type": "integer"
}
},
{
"name": "pageSize",
"in": "query",
"description": "",
"required": true,
"example": 10,
"schema": {
"type": "integer"
}
},
{
"name": "suggestionStatus",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseTableDataInfoDailyReportWithAnalysisVO"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"OverallProgressAssessment": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "进度状态ahead-提前on_track-正常delayed-滞后"
},
"deviationPercentage": {
"type": "number",
"description": "进度偏差百分比 (正数表示提前,负数表示滞后)"
},
"description": {
"type": "string",
"description": "评估说明"
},
"keyIssues": {
"type": "array",
"items": {
"type": "string"
},
"description": "关键问题"
}
}
},
"DailyReportUpdateSuggestionVO": {
"type": "object",
"properties": {
"suggestionId": {
"type": "integer",
"description": "",
"format": "int64"
},
"analysisId": {
"type": "integer",
"description": "",
"format": "int64"
},
"reportId": {
"type": "integer",
"description": "",
"format": "int64"
},
"reportDate": {
"type": "string",
"description": ""
},
"submitterUsername": {
"type": "string",
"description": ""
},
"targetType": {
"type": "string",
"description": ""
},
"targetId": {
"type": "integer",
"description": "",
"format": "int64"
},
"targetName": {
"type": "string",
"description": ""
},
"currentStatus": {
"type": "string",
"description": ""
},
"currentProgress": {
"type": "integer",
"description": ""
},
"suggestedStatus": {
"type": "string",
"description": ""
},
"suggestedProgress": {
"type": "integer",
"description": ""
},
"reason": {
"type": "string",
"description": ""
},
"confidence": {
"type": "number",
"description": ""
},
"status": {
"type": "string",
"description": ""
}
}
},
"MilestoneRisk": {
"type": "object",
"properties": {
"milestoneId": {
"type": "integer",
"description": "里程碑 ID",
"format": "int64"
},
"milestoneName": {
"type": "string",
"description": "里程碑名称"
},
"planDate": {
"type": "string",
"description": "计划完成日期"
},
"riskLevel": {
"type": "string",
"description": "风险等级critical-严重high-高medium-中low-低"
},
"description": {
"type": "string",
"description": "风险描述"
},
"estimatedDelayDays": {
"type": "integer",
"description": "延期天数 (预估)"
},
"suggestion": {
"type": "string",
"description": "建议措施"
}
}
},
"ResourceNeed": {
"type": "object",
"properties": {
"resourceType": {
"type": "string",
"description": "资源类型human-人力material-物料equipment-设备other-其他"
},
"resourceName": {
"type": "string",
"description": "资源名称"
},
"quantity": {
"type": "number",
"description": "需求数量"
},
"unit": {
"type": "string",
"description": "单位"
},
"reason": {
"type": "string",
"description": "需求原因"
},
"suggestedArrivalDate": {
"type": "string",
"description": "建议到位时间"
}
}
},
"ProgressSuggestion": {
"type": "object",
"properties": {
"taskId": {
"type": "integer",
"description": "任务 ID (如果有明确关联的任务)",
"format": "int64"
},
"taskName": {
"type": "string",
"description": "任务名称"
},
"suggestionType": {
"type": "string",
"description": "建议类型accelerate-加速adjust_plan-调整计划add_resource-增加资源reorder-重新排序"
},
"suggestion": {
"type": "string",
"description": "具体建议内容"
},
"priority": {
"type": "string",
"description": "优先级critical-紧急high-高medium-中low-低"
},
"expectedEffect": {
"type": "string",
"description": "预期效果"
}
}
},
"ProgressUpdateRecommendation": {
"type": "object",
"properties": {
"targetType": {
"type": "string",
"description": "建议作用对象task / milestone"
},
"targetId": {
"type": "integer",
"description": "任务ID或里程碑ID",
"format": "int64"
},
"suggestedStatus": {
"type": "string",
"description": "建议状态pending / in_progress / completed / delayed 等(与现有状态体系保持一致)"
},
"suggestedProgress": {
"type": "integer",
"description": "建议进度 0-100"
},
"reason": {
"type": "string",
"description": "建议理由"
},
"confidence": {
"type": "number",
"description": "置信度 0-1"
}
}
},
"DailyReportAnalysisResult": {
"type": "object",
"properties": {
"reportId": {
"type": "integer",
"description": "日报ID",
"format": "int64"
},
"projectId": {
"type": "integer",
"description": "项目 ID",
"format": "int64"
},
"projectName": {
"type": "string",
"description": "项目名称"
},
"reportDate": {
"type": "string",
"description": "日报日期"
},
"overallProgressAssessment": {
"$ref": "#/components/schemas/OverallProgressAssessment",
"description": "整体进度评估"
},
"milestoneRisks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MilestoneRisk",
"description": "里程碑风险"
},
"description": "里程碑风险列表"
},
"resourceNeeds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceNeed",
"description": "资源需求"
},
"description": "资源需求列表"
},
"progressSuggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgressSuggestion",
"description": "进度建议"
},
"description": "进度建议列表"
},
"progressUpdateRecommendations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgressUpdateRecommendation",
"description": "进度更新建议(可回写)"
},
"description": "可直接回写到任务/里程碑的进度更新建议(需要用户确认后才执行)"
},
"identifiedRisks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IdentifiedRisk",
"description": "识别的风险 (直接入库)"
},
"description": "识别的风险列表 (直接入库)"
}
}
},
"DailyReportWithAnalysisVO": {
"type": "object",
"properties": {
"reportId": {
"type": "integer",
"description": "",
"format": "int64"
},
"projectId": {
"type": "integer",
"description": "",
"format": "int64"
},
"reportDate": {
"type": "string",
"description": ""
},
"submitterUsername": {
"type": "string",
"description": ""
},
"submitterId": {
"type": "integer",
"description": "",
"format": "int64"
},
"workContent": {
"type": "string",
"description": ""
},
"tomorrowPlan": {
"type": "string",
"description": ""
},
"workIntensity": {
"type": "integer",
"description": ""
},
"needHelp": {
"type": "boolean",
"description": ""
},
"helpContent": {
"type": "string",
"description": ""
},
"createTime": {
"type": "string",
"description": ""
},
"analysisId": {
"type": "integer",
"description": "",
"format": "int64"
},
"analysisStatus": {
"type": "string",
"description": ""
},
"analysisResult": {
"$ref": "#/components/schemas/DailyReportAnalysisResult",
"description": ""
},
"analysisSuggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DailyReportUpdateSuggestionVO",
"description": "cn.yinlihupo.domain.vo.DailyReportUpdateSuggestionVO"
},
"description": ""
}
}
},
"TableDataInfoDailyReportWithAnalysisVO": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "总记录数",
"format": "int64"
},
"rows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DailyReportWithAnalysisVO",
"description": "cn.yinlihupo.domain.vo.DailyReportWithAnalysisVO"
},
"description": "列表数据"
},
"code": {
"type": "integer",
"description": "消息状态码"
},
"msg": {
"type": "string",
"description": "消息内容"
}
}
},
"BaseResponseTableDataInfoDailyReportWithAnalysisVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/TableDataInfoDailyReportWithAnalysisVO",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"IdentifiedRisk": {
"type": "object",
"properties": {
"riskName": {
"type": "string",
"description": "风险名称"
},
"category": {
"type": "string",
"description": "风险分类: technical-技术风险, schedule-进度风险, cost-成本风险, quality-质量风险, resource-资源风险, external-外部风险, personnel-人员风险"
},
"description": {
"type": "string",
"description": "风险描述"
},
"probability": {
"type": "integer",
"description": "发生概率(0-100%)"
},
"impact": {
"type": "integer",
"description": "影响程度(1-5)"
},
"riskLevel": {
"type": "string",
"description": "风险等级calculated from probability * impact"
},
"impactScope": {
"type": "string",
"description": "影响范围"
},
"triggerCondition": {
"type": "string",
"description": "触发条件"
},
"mitigationPlan": {
"type": "string",
"description": "缓解措施"
},
"contingencyPlan": {
"type": "string",
"description": "应急计划"
},
"priority": {
"type": "string",
"description": "建议优先级: critical-紧急, high-高, medium-中, low-低"
}
}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -1,917 +0,0 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/resource/list": {
"get": {
"summary": "分页查询资源列表",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "pageNum",
"in": "query",
"description": "",
"required": true,
"example": 1,
"schema": {
"type": "integer"
}
},
{
"name": "pageSize",
"in": "query",
"description": "",
"required": true,
"example": 10,
"schema": {
"type": "integer"
}
},
{
"name": "projectId",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "resourceType",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "keyword",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponsePageMapObject"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/{id}": {
"get": {
"summary": "根据ID查询资源详情",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseResource"
}
}
}
}
},
"security": []
},
"delete": {
"summary": "删除资源",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource": {
"post": {
"summary": "新增资源",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Resource",
"description": ""
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseLong"
}
}
}
}
},
"security": []
},
"put": {
"summary": "修改资源",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResourceUpdateRequest",
"description": ""
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/{id}/status": {
"put": {
"summary": "更新资源状态",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "status",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/{id}/quantity": {
"put": {
"summary": "更新资源数量",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "actualQuantity",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/stats/budget": {
"get": {
"summary": "查询资源预算汇总",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "projectId",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseListMapObject"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/pending-arrival": {
"get": {
"summary": "查询即将到位的资源",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "projectId",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "days",
"in": "query",
"description": "",
"required": true,
"example": 7,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseListResource"
}
}
}
}
},
"security": []
}
},
"/api/v1/resource/pending-approval": {
"get": {
"summary": "查询待审批的资源申请",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "projectId",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseListMapObject"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"OrderItem": {
"type": "object",
"properties": {
"column": {
"type": "string",
"description": "需要进行排序的字段"
},
"asc": {
"type": "boolean",
"description": "是否正序排列,默认 true",
"default": true
}
}
},
"MapObject": {
"type": "object",
"properties": {
"key": {
"$ref": "#/components/schemas/key"
}
}
},
"PageMapObject": {
"type": "object",
"properties": {
"records": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MapObject"
},
"description": "查询数据列表",
"default": "Collections.emptyList()"
},
"total": {
"type": "integer",
"description": "总数",
"format": "int64",
"default": 0
},
"size": {
"type": "integer",
"description": "每页显示条数,默认 10",
"format": "int64",
"default": 10
},
"current": {
"type": "integer",
"description": "当前页",
"format": "int64",
"default": 1
},
"orders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderItem",
"description": "com.baomidou.mybatisplus.core.metadata.OrderItem"
},
"description": "排序字段信息",
"default": "new ArrayList<>()"
},
"optimizeCountSql": {
"type": "boolean",
"description": "自动优化 COUNT SQL",
"default": true
},
"searchCount": {
"type": "boolean",
"description": "是否进行 count 查询",
"default": true
},
"optimizeJoinOfCountSql": {
"type": "boolean",
"description": "{@link #optimizeJoinOfCountSql()}",
"default": true
},
"maxLimit": {
"type": "integer",
"description": "单页分页条数限制",
"format": "int64"
},
"countId": {
"type": "string",
"description": "countId"
},
"pages": {
"type": "integer",
"format": "int64"
}
}
},
"BaseResponsePageMapObject": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/PageMapObject",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"Resource": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "",
"format": "int64"
},
"resourceCode": {
"type": "string",
"description": "资源编号"
},
"projectId": {
"type": "integer",
"description": "项目ID",
"format": "int64"
},
"resourceType": {
"type": "string",
"description": "资源类型: human-人力, material-物料, equipment-设备, software-软件, finance-资金, other-其他"
},
"resourceName": {
"type": "string",
"description": "资源名称"
},
"description": {
"type": "string",
"description": "资源描述"
},
"specification": {
"type": "string",
"description": "规格型号"
},
"unit": {
"type": "string",
"description": "单位"
},
"planQuantity": {
"type": "number",
"description": "计划数量"
},
"actualQuantity": {
"type": "number",
"description": "实际数量"
},
"unitPrice": {
"type": "number",
"description": "单价"
},
"currency": {
"type": "string",
"description": "币种"
},
"supplier": {
"type": "string",
"description": "供应商/来源"
},
"status": {
"type": "string",
"description": "状态: planned-计划中, requested-已申请, approved-已批准, procuring-采购中, arrived-已到货, in_use-使用中, completed-已完成"
},
"planArriveDate": {
"type": "string",
"description": "计划到位日期"
},
"actualArriveDate": {
"type": "string",
"description": "实际到位日期"
},
"responsibleId": {
"type": "integer",
"description": "负责人ID",
"format": "int64"
},
"location": {
"type": "string",
"description": "存放位置"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "标签"
},
"extraData": {
"type": "object",
"properties": {},
"description": "扩展数据"
},
"createBy": {
"type": "integer",
"description": "创建人",
"format": "int64"
},
"createTime": {
"type": "string",
"description": "创建时间"
},
"updateBy": {
"type": "integer",
"description": "更新人",
"format": "int64"
},
"updateTime": {
"type": "string",
"description": "更新时间"
},
"deleted": {
"type": "integer",
"description": "删除标记"
}
}
},
"key": {
"type": "object",
"properties": {}
},
"BaseResponseLong": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "integer",
"description": "",
"format": "int64"
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseResource": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/Resource",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseVoid": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"description": "",
"type": "null"
},
"message": {
"type": "string",
"description": ""
}
}
},
"ResourceUpdateRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "资源ID必填",
"format": "int64"
},
"resourceType": {
"type": "string",
"description": "资源类型: human-人力, material-物料, equipment-设备, software-软件, finance-资金, other-其他"
},
"resourceName": {
"type": "string",
"description": "资源名称"
},
"description": {
"type": "string",
"description": "资源描述"
},
"specification": {
"type": "string",
"description": "规格型号"
},
"unit": {
"type": "string",
"description": "单位"
},
"planQuantity": {
"type": "number",
"description": "计划数量"
},
"actualQuantity": {
"type": "number",
"description": "实际数量"
},
"unitPrice": {
"type": "number",
"description": "单价"
},
"currency": {
"type": "string",
"description": "币种"
},
"supplier": {
"type": "string",
"description": "供应商/来源"
},
"status": {
"type": "string",
"description": "状态: planned-计划中, requested-已申请, approved-已批准, procuring-采购中, arrived-已到货, in_use-使用中, completed-已完成"
},
"planArriveDate": {
"type": "string",
"description": "计划到位日期"
},
"actualArriveDate": {
"type": "string",
"description": "实际到位日期"
},
"responsibleId": {
"type": "integer",
"description": "负责人ID直接传递ID时使用",
"format": "int64"
},
"responsibleName": {
"type": "string",
"description": "负责人姓名根据姓名自动匹配用户ID"
},
"location": {
"type": "string",
"description": "存放位置"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "标签"
},
"extraData": {
"type": "object",
"properties": {},
"description": "扩展数据"
}
}
},
"BaseResponseListMapObject": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MapObject"
},
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseListResource": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Resource",
"description": "资源实体类\n对应数据库表: resource"
},
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -1,606 +0,0 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/project-init/sse/submit-task": {
"post": {
"summary": "通过 SSE 提交项目初始化任务",
"deprecated": false,
"description": "使用通用 SSE 通道,通过 userId 推送进度",
"tags": [],
"parameters": [
{
"name": "userId",
"in": "query",
"description": "用户ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
"schema": {
"type": "string",
"default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"description": "项目资料文件",
"type": "string",
"format": "binary"
}
},
"required": ["file"]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseMapObject",
"description": "提交结果"
}
}
}
}
},
"security": []
}
},
"/api/v1/project-init/my-tasks": {
"get": {
"summary": "查询我的任务列表",
"deprecated": false,
"description": "根据当前登录用户的token查询其所有任务",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
"schema": {
"type": "string",
"default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseListProjectInitTaskVO",
"description": "任务列表"
}
}
}
}
},
"security": []
}
},
"/api/v1/project-init/my-tasks/stats": {
"get": {
"summary": "查询我的任务统计信息",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
"schema": {
"type": "string",
"default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseMapObject",
"description": "统计信息"
}
}
}
}
},
"security": []
}
},
"/api/v1/project-init/task/{taskId}": {
"get": {
"summary": "查询单个任务状态",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "taskId",
"in": "path",
"description": "任务ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc",
"schema": {
"type": "string",
"default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseProjectInitTaskVO",
"description": "任务状态"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"ProjectInfo": {
"type": "object",
"properties": {
"project_name": {
"type": "string",
"description": ""
},
"project_type": {
"type": "string",
"description": ""
},
"description": {
"type": "string",
"description": ""
},
"objectives": {
"type": "string",
"description": ""
},
"plan_start_date": {
"type": "string",
"description": ""
},
"plan_end_date": {
"type": "string",
"description": ""
},
"budget": {
"type": "number",
"description": ""
},
"currency": {
"type": "string",
"description": ""
},
"priority": {
"type": "string",
"description": ""
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": ""
}
}
},
"MilestoneInfo": {
"type": "object",
"properties": {
"milestone_name": {
"type": "string",
"description": ""
},
"description": {
"type": "string",
"description": ""
},
"plan_date": {
"type": "string",
"description": ""
},
"deliverables": {
"type": "string",
"description": ""
},
"owner_role": {
"type": "string",
"description": ""
}
}
},
"TaskInfo": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": ""
},
"task_name": {
"type": "string",
"description": ""
},
"parent_task_id": {
"type": "string",
"description": ""
},
"description": {
"type": "string",
"description": ""
},
"plan_start_date": {
"type": "string",
"description": ""
},
"plan_end_date": {
"type": "string",
"description": ""
},
"estimated_hours": {
"type": "integer",
"description": ""
},
"priority": {
"type": "string",
"description": ""
},
"assignee_role": {
"type": "string",
"description": ""
},
"dependencies": {
"type": "array",
"items": {
"type": "string"
},
"description": ""
},
"deliverables": {
"type": "string",
"description": ""
}
}
},
"BaseResponseMapObject": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "object",
"properties": {
"total": {
"type": "integer"
},
"processing": {
"type": "integer"
},
"completed": {
"type": "null"
},
"failed": {
"type": "null"
}
},
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"MemberInfo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": ""
},
"role_code": {
"type": "string",
"description": ""
},
"responsibility": {
"type": "string",
"description": ""
},
"department": {
"type": "string",
"description": ""
},
"weekly_hours": {
"type": "integer",
"description": ""
}
}
},
"ResourceInfo": {
"type": "object",
"properties": {
"resource_name": {
"type": "string",
"description": ""
},
"resource_type": {
"type": "string",
"description": ""
},
"quantity": {
"type": "number",
"description": ""
},
"unit": {
"type": "string",
"description": ""
},
"unit_price": {
"type": "number",
"description": ""
},
"supplier": {
"type": "string",
"description": ""
}
}
},
"RiskInfo": {
"type": "object",
"properties": {
"risk_name": {
"type": "string",
"description": ""
},
"category": {
"type": "string",
"description": ""
},
"description": {
"type": "string",
"description": ""
},
"probability": {
"type": "integer",
"description": ""
},
"impact": {
"type": "integer",
"description": ""
},
"mitigation_plan": {
"type": "string",
"description": ""
}
}
},
"TimelineNodeInfo": {
"type": "object",
"properties": {
"node_name": {
"type": "string",
"description": ""
},
"node_type": {
"type": "string",
"description": ""
},
"plan_date": {
"type": "string",
"description": ""
},
"description": {
"type": "string",
"description": ""
},
"kb_scope": {
"type": "array",
"items": {
"type": "string"
},
"description": ""
}
}
},
"ProjectInitResult": {
"type": "object",
"properties": {
"project": {
"$ref": "#/components/schemas/ProjectInfo",
"description": "项目基本信息"
},
"milestones": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MilestoneInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.MilestoneInfo"
},
"description": "里程碑列表"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TaskInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.TaskInfo"
},
"description": "任务清单"
},
"members": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.MemberInfo"
},
"description": "项目成员"
},
"resources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.ResourceInfo"
},
"description": "资源需求"
},
"risks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RiskInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.RiskInfo"
},
"description": "风险识别"
},
"timeline_nodes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TimelineNodeInfo",
"description": "cn.yinlihupo.domain.dto.ProjectInitResult.TimelineNodeInfo"
},
"description": "时间节点"
}
}
},
"ProjectInitTaskVO": {
"type": "object",
"properties": {
"taskId": {
"type": "string",
"description": "任务ID"
},
"userId": {
"type": "integer",
"description": "用户ID任务所属用户",
"format": "int64"
},
"status": {
"type": "string",
"description": "任务状态: pending-待处理, processing-处理中, completed-已完成, failed-失败"
},
"statusDesc": {
"type": "string",
"description": "状态描述"
},
"progress": {
"type": "integer",
"description": "当前进度百分比 (0-100)"
},
"progressMessage": {
"type": "string",
"description": "进度描述信息"
},
"originalFilename": {
"type": "string",
"description": "原始文件名"
},
"createTime": {
"type": "string",
"description": "任务创建时间"
},
"startTime": {
"type": "string",
"description": "任务开始处理时间"
},
"completeTime": {
"type": "string",
"description": "任务完成时间"
},
"result": {
"$ref": "#/components/schemas/ProjectInitResult",
"description": "处理结果仅当status=completed时有值"
},
"errorMessage": {
"type": "string",
"description": "错误信息仅当status=failed时有值"
}
}
},
"BaseResponseListProjectInitTaskVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectInitTaskVO",
"description": "项目初始化异步任务VO"
},
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
},
"BaseResponseProjectInitTaskVO": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"$ref": "#/components/schemas/ProjectInitTaskVO",
"description": ""
},
"message": {
"type": "string",
"description": ""
}
}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -1,396 +0,0 @@
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [],
"paths": {
"/api/v1/project": {
"put": {
"summary": "修改项目",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Project",
"description": ""
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/project/{id}": {
"delete": {
"summary": "删除项目",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/project/{id}/status": {
"put": {
"summary": "更新项目状态",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "status",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/project/{id}/progress": {
"put": {
"summary": "更新项目进度",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "progress",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
},
"/api/v1/project/{id}/manager": {
"put": {
"summary": "更新项目经理",
"deprecated": false,
"description": "",
"tags": [],
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "managerId",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95",
"schema": {
"type": "string",
"default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BaseResponseVoid"
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"Project": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "",
"format": "int64"
},
"projectCode": {
"type": "string",
"description": "项目编号"
},
"projectName": {
"type": "string",
"description": "项目名称"
},
"projectType": {
"type": "string",
"description": "项目类型"
},
"description": {
"type": "string",
"description": "项目描述"
},
"objectives": {
"type": "string",
"description": "项目目标"
},
"managerId": {
"type": "integer",
"description": "项目经理ID",
"format": "int64"
},
"sponsorId": {
"type": "integer",
"description": "项目发起人ID",
"format": "int64"
},
"planStartDate": {
"type": "string",
"description": "计划开始日期"
},
"planEndDate": {
"type": "string",
"description": "计划结束日期"
},
"actualStartDate": {
"type": "string",
"description": "实际开始日期"
},
"actualEndDate": {
"type": "string",
"description": "实际结束日期"
},
"budget": {
"type": "number",
"description": "项目预算"
},
"cost": {
"type": "number",
"description": "已花费金额"
},
"currency": {
"type": "string",
"description": "币种"
},
"progress": {
"type": "integer",
"description": "进度百分比"
},
"status": {
"type": "string",
"description": "状态: draft-草稿, planning-规划中, ongoing-进行中, paused-暂停, completed-已完成, cancelled-已取消"
},
"priority": {
"type": "string",
"description": "优先级: critical-关键, high-高, medium-中, low-低"
},
"riskLevel": {
"type": "string",
"description": "风险等级: high-高, medium-中, low-低"
},
"visibility": {
"type": "integer",
"description": "可见性: 1-公开, 2-部门内, 3-项目成员"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "标签列表"
},
"extraData": {
"type": "object",
"properties": {},
"description": "扩展数据"
},
"createBy": {
"type": "integer",
"description": "创建人",
"format": "int64"
},
"createTime": {
"type": "string",
"description": "创建时间"
},
"updateBy": {
"type": "integer",
"description": "更新人",
"format": "int64"
},
"updateTime": {
"type": "string",
"description": "更新时间"
},
"deleted": {
"type": "integer",
"description": "删除标记"
}
}
},
"BaseResponseVoid": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": ""
},
"data": {
"description": "",
"type": "null"
},
"message": {
"type": "string",
"description": ""
}
}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}

View File

@@ -1,594 +0,0 @@
{
"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": "查询成功"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -35,8 +35,8 @@ const messages = ref<ChatMessageVO[]>([]);
const sending = ref(false);
const projects = ref<ProjectItem[]>([]);
const projectLoading = ref(false);
const showProjectSelect = ref(false);
const currentProjectId = ref<string>("");
const selectedProjectId = ref<string>("");
const didInitProjectAndSessions = ref(false);
const activeSessionKey = ref<string>("");
const chatRenderKey = ref(0);
@@ -108,10 +108,64 @@ function setCurrentProject(project: ProjectItem) {
}
}
async function setDraftByProjectId(projectId: string) {
const pid = String(projectId || "");
if (!pid) return;
const project = projects.value.find(p => String(p.id || "") === pid);
if (!project) return;
currentProjectId.value = pid;
selectedProjectId.value = pid;
currentSession.value = {
sessionId: "",
sessionTitle: "新对话",
projectId: pid,
projectName: project.projectName || "",
lastMessageTime: new Date().toISOString(),
messageCount: 0,
createTime: new Date().toISOString()
};
messages.value = [];
deepChatHistory.value = [];
activeSessionKey.value = `draft-${pid}-${Date.now()}`;
chatRenderKey.value += 1;
}
async function applyProjectSelection(projectId: string) {
await setDraftByProjectId(projectId);
if (!currentProjectId.value) return;
const pid = currentProjectId.value;
await loadSessions(pid);
const firstSession = sessions.value[0];
if (firstSession?.sessionId) {
await selectSession(firstSession);
}
}
async function startNewDraftSession() {
const pid = String(
currentProjectId.value ||
selectedProjectId.value ||
projects.value[0]?.id ||
""
);
if (!pid) {
ElMessage.warning("请先选择项目");
return;
}
await setDraftByProjectId(pid);
await loadSessions(pid);
}
// 选择会话
async function selectSession(session: ChatSessionVO) {
currentSession.value = session;
currentProjectId.value = String(session.projectId || "");
selectedProjectId.value = String(session.projectId || "");
activeSessionKey.value = String(session.sessionId || "");
deepChatHistory.value = [];
chatRenderKey.value += 1;
@@ -140,35 +194,8 @@ async function loadMessages(sessionId: string) {
// 创建新会话
async function createNewSession() {
if (!currentSession.value?.projectId && projects.value.length === 0) {
await loadProjects();
}
showProjectSelect.value = true;
}
// 选择项目后创建会话
async function handleProjectSelect(project: ProjectItem) {
showProjectSelect.value = false;
const pid = String(project.id || "");
if (!pid) {
ElMessage.warning("项目ID缺失无法创建会话");
return;
}
currentProjectId.value = pid;
currentSession.value = {
sessionId: "",
sessionTitle: "新对话",
projectId: pid,
projectName: project.projectName || "",
lastMessageTime: new Date().toISOString(),
messageCount: 0,
createTime: new Date().toISOString()
};
messages.value = [];
deepChatHistory.value = [];
activeSessionKey.value = `draft-${pid}-${Date.now()}`;
chatRenderKey.value += 1;
await loadSessions(currentProjectId.value);
if (!projects.value.length) await loadProjects();
await startNewDraftSession();
}
async function requestAssistantReply(messageText: string): Promise<string> {
@@ -259,10 +286,7 @@ async function handleDeleteSession(session: ChatSessionVO) {
deepChatHistory.value = [];
const defaultProject = projects.value[0];
if (defaultProject?.id) {
currentSession.value = null;
setCurrentProject(defaultProject);
activeSessionKey.value = `draft-${String(defaultProject.id)}-${Date.now()}`;
chatRenderKey.value += 1;
await applyProjectSelection(String(defaultProject.id));
} else {
currentSession.value = null;
activeSessionKey.value = "";
@@ -293,19 +317,10 @@ onUnmounted(() => {
async function initPage() {
await loadProjects();
if (!didInitProjectAndSessions.value && projects.value.length > 0) {
setCurrentProject(projects.value[0]);
selectedProjectId.value = String(projects.value[0]?.id || "");
didInitProjectAndSessions.value = true;
}
if (!activeSessionKey.value && currentProjectId.value) {
activeSessionKey.value = `draft-${currentProjectId.value}-${Date.now()}`;
}
await loadSessions();
const firstSession = sessions.value[0];
if (firstSession?.sessionId) {
await selectSession(firstSession);
} else {
deepChatHistory.value = [];
chatRenderKey.value += 1;
if (selectedProjectId.value)
await applyProjectSelection(selectedProjectId.value);
}
}
@@ -329,25 +344,22 @@ onMounted(() => {
</el-button>
</div>
<!-- 项目选择 -->
<div v-if="showProjectSelect" class="project-select-panel">
<div class="panel-header">
<span>选择项目</span>
<el-button link @click="showProjectSelect = false">
<component :is="useRenderIcon('ri/close-line')" />
</el-button>
</div>
<el-scrollbar height="300px">
<div
<div class="project-select">
<el-select
v-model="selectedProjectId"
placeholder="选择项目"
filterable
:loading="projectLoading"
style="width: 100%"
@change="applyProjectSelection"
>
<el-option
v-for="project in projects"
:key="project.id"
class="project-item"
@click="handleProjectSelect(project)"
>
<component :is="useRenderIcon('ri/folder-line')" class="mr-2" />
{{ project.projectName }}
</div>
</el-scrollbar>
:key="String(project.id || '')"
:label="project.projectName || ''"
:value="String(project.id || '')"
/>
</el-select>
</div>
<!-- 会话列表 -->
@@ -469,28 +481,9 @@ onMounted(() => {
}
}
.project-select-panel {
.project-select {
padding: 12px 16px;
border-bottom: 1px solid var(--el-border-color-light);
.panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
font-weight: 500;
}
.project-item {
display: flex;
align-items: center;
padding: 12px 16px;
cursor: pointer;
transition: background 0.2s;
&:hover {
background: var(--el-fill-color-light);
}
}
}
.session-list {

View File

@@ -54,7 +54,7 @@ watch(
<template>
<deep-chat
ref="chatRef"
style=" width: 100%; height: 100%;border-radius: 10px"
style="width: 100%; height: 100%; border-radius: 10px"
:messageStyles="{
default: {
shared: {

View File

@@ -6,6 +6,7 @@ import {
getProjectDetail,
getDailyReportAnalysisSuggestions,
applyDailyReportAnalysisSuggestions,
getDailyReportWithAnalysisReports,
createTask,
updateTask,
deleteTask,
@@ -23,6 +24,7 @@ import {
type ProjectRisk,
type DailyReportAnalysisSuggestionsVO,
type DailyReportUpdateSuggestionVO,
type DailyReportWithAnalysisVO,
type Resource,
type ResourceUpdateRequest
} from "@/api/project";
@@ -99,6 +101,20 @@ const dailyReportSuggestions = ref<DailyReportAnalysisSuggestionsVO | null>(
);
const selectedSuggestionIds = ref<string[]>([]);
const dailyReportWithAnalysisLoading = ref(false);
const dailyReportWithAnalysisQuery = ref({
reportDate: "",
suggestionStatus: "",
pageNum: 1,
pageSize: 10
});
const dailyReportWithAnalysisRows = ref<DailyReportWithAnalysisVO[]>([]);
const dailyReportWithAnalysisTotal = ref(0);
const selectedDailyReportWithAnalysis = ref<DailyReportWithAnalysisVO | null>(
null
);
const dailyReportDetailVisible = ref(false);
// 成员详情模态框
const memberDetailModal = ref(false);
const selectedMember = ref<ProjectMember | null>(null);
@@ -804,12 +820,13 @@ function getResourceStatusText(status?: string): string {
function getRiskLevelType(
level?: string
): "success" | "warning" | "danger" | "info" {
switch (level) {
switch ((level || "").toLowerCase()) {
case "low":
return "success";
case "medium":
return "warning";
case "high":
case "critical":
return "danger";
default:
return "info";
@@ -1060,9 +1077,68 @@ async function handleDeleteResource(resourceId: string) {
}
}
async function fetchDailyReportWithAnalysis() {
if (!projectId.value) return;
dailyReportWithAnalysisLoading.value = true;
try {
const res = await getDailyReportWithAnalysisReports({
projectId: projectId.value,
reportDate: dailyReportWithAnalysisQuery.value.reportDate || undefined,
pageNum: dailyReportWithAnalysisQuery.value.pageNum,
pageSize: dailyReportWithAnalysisQuery.value.pageSize,
suggestionStatus:
dailyReportWithAnalysisQuery.value.suggestionStatus || undefined
});
const result = res as any;
if (result.code === 200) {
const data = result.data || {};
dailyReportWithAnalysisRows.value = Array.isArray(data.rows)
? data.rows
: [];
dailyReportWithAnalysisTotal.value = Number(data.total || 0);
} else {
message(result.message || "获取日报与分析数据失败", { type: "error" });
}
} catch (error) {
console.error("获取日报与分析数据失败:", error);
message("获取日报与分析数据失败", { type: "error" });
} finally {
dailyReportWithAnalysisLoading.value = false;
}
}
function openDailyReportDetail(row: DailyReportWithAnalysisVO) {
selectedDailyReportWithAnalysis.value = row;
dailyReportDetailVisible.value = true;
}
function handleDailyReportWithAnalysisPageChange(page: number) {
dailyReportWithAnalysisQuery.value.pageNum = page;
fetchDailyReportWithAnalysis();
}
function handleDailyReportWithAnalysisSizeChange(size: number) {
dailyReportWithAnalysisQuery.value.pageSize = size;
dailyReportWithAnalysisQuery.value.pageNum = 1;
fetchDailyReportWithAnalysis();
}
function handleDailyReportWithAnalysisSearch() {
dailyReportWithAnalysisQuery.value.pageNum = 1;
fetchDailyReportWithAnalysis();
}
function resetDailyReportWithAnalysisFilters() {
dailyReportWithAnalysisQuery.value.reportDate = "";
dailyReportWithAnalysisQuery.value.suggestionStatus = "";
dailyReportWithAnalysisQuery.value.pageNum = 1;
fetchDailyReportWithAnalysis();
}
onMounted(() => {
fetchProjectDetail();
fetchDailyReportSuggestions();
fetchDailyReportWithAnalysis();
fetchGanttData();
});
</script>
@@ -1736,6 +1812,394 @@ onMounted(() => {
</el-col>
</el-row>
<el-row :gutter="16" class="mt-4">
<el-col :xs="24" :lg="24">
<el-card shadow="hover">
<template #header>
<div class="flex-bc">
<div class="flex items-center gap-2">
<component :is="useRenderIcon('ri/file-text-line')" />
<span class="font-medium">项目日报</span>
<el-tag
v-if="dailyReportWithAnalysisTotal"
size="small"
type="info"
>
{{ dailyReportWithAnalysisTotal }} 条
</el-tag>
</div>
<div class="flex gap-2">
<el-button
link
:disabled="dailyReportWithAnalysisLoading"
@click="fetchDailyReportWithAnalysis"
>
<component :is="useRenderIcon(RefreshIcon)" />
</el-button>
</div>
</div>
</template>
<div v-loading="dailyReportWithAnalysisLoading">
<div class="flex items-center gap-2 mb-3">
<el-date-picker
v-model="dailyReportWithAnalysisQuery.reportDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="日报日期"
clearable
/>
<el-input
v-model="dailyReportWithAnalysisQuery.suggestionStatus"
placeholder="建议状态(可选)"
clearable
style="max-width: 180px"
/>
<el-button
type="primary"
size="small"
:loading="dailyReportWithAnalysisLoading"
@click="handleDailyReportWithAnalysisSearch"
>
查询
</el-button>
<el-button
size="small"
:disabled="dailyReportWithAnalysisLoading"
@click="resetDailyReportWithAnalysisFilters"
>
重置
</el-button>
</div>
<el-table
:data="dailyReportWithAnalysisRows"
highlight-current-row
style="width: 100%"
@row-click="openDailyReportDetail"
>
<el-table-column label="日期" width="120">
<template #default="{ row }">
{{ row.reportDate || "--" }}
</template>
</el-table-column>
<el-table-column label="提交人" width="120">
<template #default="{ row }">
{{ row.submitterUsername || "--" }}
</template>
</el-table-column>
<el-table-column label="分析状态" width="120">
<template #default="{ row }">
<el-tag size="small" type="info">
{{ row.analysisStatus || "--" }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="工时" width="90">
<template #default="{ row }">
{{ row.workIntensity ?? "--" }}
</template>
</el-table-column>
<el-table-column label="需协助" width="90">
<template #default="{ row }">
{{ row.needHelp ? "是" : "否" }}
</template>
</el-table-column>
<el-table-column label="内容" min-width="220">
<template #default="{ row }">
<div class="text-sm line-clamp-2">
{{ row.workContent || "--" }}
</div>
</template>
</el-table-column>
</el-table>
<div class="flex justify-end mt-3">
<el-pagination
background
layout="total, sizes, prev, pager, next"
:total="dailyReportWithAnalysisTotal"
:page-size="dailyReportWithAnalysisQuery.pageSize"
:current-page="dailyReportWithAnalysisQuery.pageNum"
:page-sizes="[5, 10, 20, 50]"
@current-change="handleDailyReportWithAnalysisPageChange"
@size-change="handleDailyReportWithAnalysisSizeChange"
/>
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-drawer
v-model="dailyReportDetailVisible"
:title="
selectedDailyReportWithAnalysis?.reportDate
? `日报详情 - ${selectedDailyReportWithAnalysis.reportDate}`
: '日报详情'
"
size="55%"
destroy-on-close
>
<el-empty
v-if="!selectedDailyReportWithAnalysis"
description="暂无日报详情"
/>
<div v-else>
<el-descriptions :column="1" size="small" border>
<el-descriptions-item label="日报日期">
{{ selectedDailyReportWithAnalysis.reportDate || "--" }}
</el-descriptions-item>
<el-descriptions-item label="提交人">
{{ selectedDailyReportWithAnalysis.submitterUsername || "--" }}
</el-descriptions-item>
<el-descriptions-item label="分析状态">
{{ selectedDailyReportWithAnalysis.analysisStatus || "--" }}
</el-descriptions-item>
<el-descriptions-item label="工作内容">
{{ selectedDailyReportWithAnalysis.workContent || "--" }}
</el-descriptions-item>
<el-descriptions-item label="明日计划">
{{ selectedDailyReportWithAnalysis.tomorrowPlan || "--" }}
</el-descriptions-item>
<el-descriptions-item
v-if="selectedDailyReportWithAnalysis.needHelp"
label="协助内容"
>
{{ selectedDailyReportWithAnalysis.helpContent || "--" }}
</el-descriptions-item>
</el-descriptions>
<div class="mt-4">
<el-empty
v-if="!selectedDailyReportWithAnalysis.analysisResult"
description="暂无分析结果"
/>
<div v-else>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment
"
class="mb-4"
>
<div class="flex items-center gap-2 mb-2">
<span class="font-medium">总体评估</span>
<el-tag
size="small"
:type="
getOverallAssessmentType(
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.status
)
"
>
{{
getOverallAssessmentText(
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.status
)
}}
</el-tag>
<span class="text-sm text-gray-500">
偏差
{{
formatDeviation(
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.deviationPercentage
)
}}
</span>
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.description
"
class="text-sm text-gray-600"
>
{{
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.description
}}
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult
.overallProgressAssessment?.keyIssues?.length
"
class="mt-2 flex flex-wrap gap-2"
>
<el-tag
v-for="(issue, index) in selectedDailyReportWithAnalysis
.analysisResult.overallProgressAssessment.keyIssues"
:key="index"
size="small"
type="warning"
>
{{ issue }}
</el-tag>
</div>
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult.milestoneRisks
?.length
"
class="mb-4"
>
<div class="font-medium mb-2">里程碑风险</div>
<el-table
:data="
selectedDailyReportWithAnalysis.analysisResult
.milestoneRisks || []
"
style="width: 100%"
size="small"
>
<el-table-column
label="里程碑"
min-width="160"
prop="milestoneName"
/>
<el-table-column
label="计划日期"
width="120"
prop="planDate"
/>
<el-table-column label="风险" width="90">
<template #default="{ row }">
<el-tag
size="small"
:type="getRiskLevelType(row.riskLevel)"
>
{{ row.riskLevel || "--" }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="预计延期(天)" width="120">
<template #default="{ row }">
{{ row.estimatedDelayDays ?? "--" }}
</template>
</el-table-column>
<el-table-column
label="说明"
min-width="200"
prop="description"
/>
</el-table>
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult.resourceNeeds
?.length
"
class="mb-4"
>
<div class="font-medium mb-2">资源需求</div>
<el-table
:data="
selectedDailyReportWithAnalysis.analysisResult
.resourceNeeds || []
"
style="width: 100%"
size="small"
>
<el-table-column
label="类型"
width="90"
prop="resourceType"
/>
<el-table-column
label="资源"
min-width="140"
prop="resourceName"
/>
<el-table-column label="数量" width="120">
<template #default="{ row }">
{{ row.quantity ?? "--" }} {{ row.unit || "" }}
</template>
</el-table-column>
<el-table-column label="原因" min-width="200" prop="reason" />
<el-table-column
label="建议到位"
width="120"
prop="suggestedArrivalDate"
/>
</el-table>
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult
.progressSuggestions?.length
"
class="mb-4"
>
<div class="font-medium mb-2">进度建议</div>
<el-table
:data="
selectedDailyReportWithAnalysis.analysisResult
.progressSuggestions || []
"
style="width: 100%"
size="small"
>
<el-table-column
label="任务"
min-width="160"
prop="taskName"
/>
<el-table-column
label="类型"
width="120"
prop="suggestionType"
/>
<el-table-column label="优先级" width="100" prop="priority" />
<el-table-column
label="建议"
min-width="220"
prop="suggestion"
/>
</el-table>
</div>
<div
v-if="
selectedDailyReportWithAnalysis.analysisResult.identifiedRisks
?.length
"
class="mb-4"
>
<div class="font-medium mb-2">识别风险</div>
<el-table
:data="
selectedDailyReportWithAnalysis.analysisResult
.identifiedRisks || []
"
style="width: 100%"
size="small"
>
<el-table-column
label="风险"
min-width="160"
prop="riskName"
/>
<el-table-column label="分类" width="120" prop="category" />
<el-table-column label="优先级" width="100" prop="priority" />
<el-table-column
label="描述"
min-width="220"
prop="description"
/>
</el-table>
</div>
</div>
</div>
</div>
</el-drawer>
<!-- 主要内容区 -->
<el-row :gutter="16">
<!-- 左侧:物料清单 -->