feat(projects): 新增项目、执行、任务等功能

This commit is contained in:
2026-05-09 11:30:34 +08:00
parent f4f43814b3
commit 824392b564
106 changed files with 13060 additions and 1049 deletions

View File

@@ -59,3 +59,19 @@ export const RDMS_REQ_PRIORITY_DICT_CODE = 'rdms_req_priority';
* 来源口径:产品需求文档中定义,标签包括工程需求、用户需求、安全需求、体验优化、功能需求
*/
export const RDMS_REQ_CATEGORY_DICT_CODE = 'rdms_req_category';
/**
* 项目类型字典编码
*
* 对应业务字段:项目相关接口和页面中的 projectType
* 来源口径:后端字典 rdms_project_type
*/
export const RDMS_PROJECT_TYPE_DICT_CODE = 'rdms_project_type';
/**
* 项目执行类型字典编码
*
* 对应业务字段:项目任务管理中执行的 executionType
* 来源口径:`rdms-project-boot-执行任务接口API文档.md` 明确 executionType 来自字典 rdms_project_execution_type
*/
export const RDMS_PROJECT_EXECUTION_TYPE_DICT_CODE = 'rdms_project_execution_type';

View File

@@ -10,11 +10,11 @@ export const objectContextDomainConfigs: App.ObjectContext.DomainConfig[] = [
routePathPrefixes: ['/project'],
entryRouteKey: 'project_list',
entryRoutePath: '/project/list',
fallbackDefaultRouteKey: 'project_dashboard',
fallbackDefaultRoutePath: '/project/dashboard',
contextApiPath: `${WEB_SERVICE_PREFIX}/project/context`,
contextApiObjectIdParamKey: 'projectId',
contextApiObjectIdPlacement: 'query',
fallbackDefaultRouteKey: 'project_project_overview',
fallbackDefaultRoutePath: '/project/project/overview',
contextApiPath: `${WEB_SERVICE_PREFIX}/project/project/{id}/context`,
contextApiObjectIdParamKey: 'id',
contextApiObjectIdPlacement: 'path',
objectIdQueryKey: OBJECT_CONTEXT_QUERY_KEY
},
{

View File

@@ -0,0 +1,59 @@
/**
* 业务对象状态颜色ElTag type集中配置
*
* 各业务域的 statusCode → ElTag type 在此统一维护,避免散落在各业务模块。
* 未来若后端状态字典返回颜色字段,可在调用方优先取后端值,缺失时回退此映射。
*/
export type StatusTagType = 'primary' | 'success' | 'warning' | 'info' | 'danger';
export type StatusDomain =
| 'projectExecution'
| 'projectTask'
| 'executionMember'
| 'project'
| 'product'
| 'requirement'
| 'workOrder';
const statusTagTypeRegistry: Record<StatusDomain, Record<string, StatusTagType>> = {
// 项目-执行
projectExecution: {
pending: 'info',
active: 'primary',
paused: 'warning',
completed: 'success',
cancelled: 'danger'
},
// 项目-任务
projectTask: {
pending: 'info',
active: 'primary',
blocked: 'warning',
completed: 'success',
cancelled: 'danger'
},
// 执行成员变更事件
executionMember: {
join: 'success',
inactive: 'danger',
owner_transfer_in: 'warning',
owner_transfer_out: 'warning'
},
// 项目(待补全)
project: {},
// 产品(待补全)
product: {},
// 需求(待补全)
requirement: {},
// 工单(待补全)
workOrder: {}
};
export function getStatusTagType(domain: StatusDomain, statusCode: string | null | undefined): StatusTagType {
if (!statusCode) {
return 'info';
}
return statusTagTypeRegistry[domain][statusCode] || 'info';
}