feat(项目需求): 开发项目需求的功能。
This commit is contained in:
214
src/typings/api/project.d.ts
vendored
214
src/typings/api/project.d.ts
vendored
@@ -446,5 +446,219 @@ declare namespace Api {
|
||||
interface InactiveProjectMemberParams {
|
||||
reason: string | null;
|
||||
}
|
||||
|
||||
// ========== 项目需求相关类型定义 ==========
|
||||
/** 项目需求状态编码 */
|
||||
type ProjectRequirementStatusCode =
|
||||
| 'pending_confirm'
|
||||
| 'pending_review'
|
||||
| 'implementing'
|
||||
| 'accepted'
|
||||
| 'closed'
|
||||
| 'rejected'
|
||||
| 'cancelled';
|
||||
|
||||
/** 项目需求来源类型 */
|
||||
type ProjectRequirementSourceType = 'manual' | 'work_order' | 'product_requirement';
|
||||
|
||||
/** 项目需求优先级 */
|
||||
type ProjectRequirementPriority = 0 | 1 | 2 | 3;
|
||||
|
||||
/** 是否需要评审 */
|
||||
type ProjectRequirementReviewRequired = 0 | 1;
|
||||
|
||||
interface ProjectRequirement {
|
||||
/** 需求 ID */
|
||||
id: string;
|
||||
/** 所属项目 ID */
|
||||
projectId: string;
|
||||
/** 父需求 ID,0 表示顶级需求 */
|
||||
parentId: string;
|
||||
/** 所属模块 ID */
|
||||
moduleId: string;
|
||||
/** 是否需要评审 */
|
||||
reviewRequired: ProjectRequirementReviewRequired;
|
||||
/** 需求标题 */
|
||||
title: string;
|
||||
/** 需求描述 */
|
||||
description?: string | null;
|
||||
/** 需求分类字典值 */
|
||||
category: string;
|
||||
/** 需求分类名称 */
|
||||
categoryName?: string | null;
|
||||
/** 需求来源类型 */
|
||||
sourceType: ProjectRequirementSourceType;
|
||||
/** 来源业务 ID */
|
||||
sourceBizId?: string | null;
|
||||
/** 优先级 */
|
||||
priority: ProjectRequirementPriority;
|
||||
/** 优先级名称 */
|
||||
priorityName?: string | null;
|
||||
/** 当前状态编码 */
|
||||
statusCode: ProjectRequirementStatusCode;
|
||||
/** 当前状态名称 */
|
||||
statusName?: string | null;
|
||||
/** 最近一次状态动作原因 */
|
||||
lastStatusReason?: string | null;
|
||||
/** 提出人用户 ID */
|
||||
proposerId: string;
|
||||
/** 提出人昵称 */
|
||||
proposerNickname?: string | null;
|
||||
/** 当前处理人用户 ID */
|
||||
currentHandlerUserId?: string | null;
|
||||
/** 当前处理人昵称 */
|
||||
currentHandlerUserNickname?: string | null;
|
||||
/** 所需工时 */
|
||||
workHours: number;
|
||||
/** 排序值 */
|
||||
sort: number;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 更新时间 */
|
||||
updateTime: string;
|
||||
/** 子需求列表 */
|
||||
children?: ProjectRequirement[];
|
||||
/** 是否终态 */
|
||||
terminal?: boolean;
|
||||
}
|
||||
|
||||
interface ProjectRequirementModule {
|
||||
/** 模块 ID */
|
||||
id: string;
|
||||
/** 父模块 ID,0 表示顶级 */
|
||||
parentId: string;
|
||||
/** 所属项目 ID */
|
||||
projectId: string;
|
||||
/** 模块名称 */
|
||||
moduleName: string;
|
||||
/** 模块说明 */
|
||||
remark?: string | null;
|
||||
/** 图标 */
|
||||
icon?: string | null;
|
||||
/** 排序值 */
|
||||
sort: number;
|
||||
/** 子模块列表 */
|
||||
children?: ProjectRequirementModule[];
|
||||
}
|
||||
|
||||
interface ProjectRequirementStatusDict {
|
||||
/** 状态编码 */
|
||||
statusCode: string;
|
||||
/** 状态名称 */
|
||||
statusName: string;
|
||||
/** 排序值 */
|
||||
sort: number;
|
||||
/** 是否初始状态 */
|
||||
initialFlag: boolean;
|
||||
/** 是否终态 */
|
||||
terminalFlag: boolean;
|
||||
}
|
||||
|
||||
interface ProjectRequirementLifecycleAction {
|
||||
actionCode: string;
|
||||
actionName: string;
|
||||
toStatusCode: string;
|
||||
toStatusName: string;
|
||||
needReason: boolean;
|
||||
}
|
||||
|
||||
interface ProjectRequirementLifecycleInfo {
|
||||
statusCode: ProjectRequirementStatusCode;
|
||||
statusName?: string | null;
|
||||
lastStatusReason?: string | null;
|
||||
terminal: boolean;
|
||||
allowEdit: boolean;
|
||||
availableActions: ProjectRequirementLifecycleAction[];
|
||||
}
|
||||
|
||||
/** 项目需求分页查询参数 */
|
||||
type ProjectRequirementSearchParams = CommonType.RecordNullable<
|
||||
Pick<PageParams, 'pageNo' | 'pageSize'> &
|
||||
Pick<
|
||||
ProjectRequirement,
|
||||
'moduleId' | 'parentId' | 'category' | 'priority' | 'statusCode' | 'currentHandlerUserId' | 'sourceType'
|
||||
> & {
|
||||
projectId: string;
|
||||
title: string;
|
||||
}
|
||||
>;
|
||||
|
||||
/** 创建项目需求参数 */
|
||||
type SaveProjectRequirementParams = Pick<
|
||||
ProjectRequirement,
|
||||
| 'projectId'
|
||||
| 'moduleId'
|
||||
| 'reviewRequired'
|
||||
| 'title'
|
||||
| 'description'
|
||||
| 'category'
|
||||
| 'priority'
|
||||
| 'proposerId'
|
||||
| 'proposerNickname'
|
||||
| 'currentHandlerUserId'
|
||||
| 'currentHandlerUserNickname'
|
||||
| 'workHours'
|
||||
| 'sort'
|
||||
>;
|
||||
|
||||
/** 更新项目需求参数 */
|
||||
type UpdateProjectRequirementParams = { id: string } & SaveProjectRequirementParams;
|
||||
|
||||
/** 变更项目需求状态参数 */
|
||||
interface ChangeProjectRequirementStatusParams {
|
||||
id: string;
|
||||
projectId: string;
|
||||
actionCode: string;
|
||||
reason?: string | null;
|
||||
}
|
||||
|
||||
/** 关闭项目需求参数 */
|
||||
interface CloseProjectRequirementParams {
|
||||
id: string;
|
||||
projectId: string;
|
||||
reason: string;
|
||||
}
|
||||
|
||||
/** 拆分项目需求参数 */
|
||||
type SplitProjectRequirementParams = Pick<
|
||||
ProjectRequirement,
|
||||
| 'parentId'
|
||||
| 'projectId'
|
||||
| 'moduleId'
|
||||
| 'reviewRequired'
|
||||
| 'title'
|
||||
| 'description'
|
||||
| 'category'
|
||||
| 'priority'
|
||||
| 'proposerId'
|
||||
| 'proposerNickname'
|
||||
| 'currentHandlerUserId'
|
||||
| 'currentHandlerUserNickname'
|
||||
| 'workHours'
|
||||
| 'sort'
|
||||
>;
|
||||
|
||||
/** 删除项目需求参数 */
|
||||
interface DeleteProjectRequirementParams {
|
||||
id: string;
|
||||
projectId: string;
|
||||
}
|
||||
|
||||
/** 保存项目需求模块参数 */
|
||||
interface SaveProjectRequirementModuleParams {
|
||||
id?: string;
|
||||
projectId: string;
|
||||
parentId?: string | null;
|
||||
moduleName: string;
|
||||
remark?: string | null;
|
||||
icon?: string | null;
|
||||
sort?: number;
|
||||
}
|
||||
|
||||
/** 删除项目需求模块参数 */
|
||||
interface DeleteProjectRequirementModuleParams {
|
||||
id?: string;
|
||||
projectId: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user