feat(personal-item): 个人事项

This commit is contained in:
caozehui
2026-05-19 10:59:07 +08:00
parent acd41555f9
commit 7d578ab271
28 changed files with 3743 additions and 105 deletions

97
src/typings/api/personal-item.d.ts vendored Normal file
View File

@@ -0,0 +1,97 @@
declare namespace Api {
namespace PersonalItem {
interface PageParams {
pageNo: number;
pageSize: number;
}
type PersonalItemStatusCode = 'pending' | 'active' | 'paused' | 'completed' | 'cancelled';
interface PersonalItemLifecycleAction {
actionCode: string;
actionName: string;
needReason: boolean;
}
interface PersonalItem {
id: string;
taskTitle: string;
ownerId: string;
statusCode: PersonalItemStatusCode;
terminal?: boolean;
allowEdit?: boolean;
availableActions?: PersonalItemLifecycleAction[] | null;
progressRate: number;
totalSpentHours?: number | null;
plannedStartDate: string | null;
plannedEndDate: string | null;
actualStartDate: string | null;
actualEndDate: string | null;
taskDesc: string | null;
lastStatusReason: string | null;
attachments: Api.Project.AttachmentItem[] | null;
creator: string;
createTime: string;
updater: string;
updateTime: string;
deleted: boolean;
ownerName?: string | null;
ownerNickname?: string | null;
statusName?: string | null;
}
type PersonalItemSearchParams = CommonType.RecordNullable<
Pick<PageParams, 'pageNo' | 'pageSize'> & {
keyword: string;
ownerId: string;
statusCode: PersonalItemStatusCode;
updateTime: string[];
}
>;
interface PersonalItemPageResult {
total: number;
list: PersonalItem[];
}
interface SavePersonalItemParams {
taskTitle: string;
ownerId?: string;
executionId?: string | null;
progressRate?: number | null;
plannedStartDate: string | null;
plannedEndDate: string | null;
taskDesc: string | null;
attachments: Api.Project.AttachmentItem[] | null;
}
interface UpdatePersonalItemParams extends SavePersonalItemParams {
id: string;
}
interface ChangePersonalItemStatusParams {
actionCode: string;
reason?: string | null;
}
interface PersonalItemExecutionOption {
executionId: string;
executionName: string;
projectId?: string | null;
projectName?: string | null;
}
interface BatchDeletePersonalItemParams {
ids: string[];
}
interface BindPersonalItemExecutionParams {
ids: string[];
executionId: string;
}
type PersonalItemWorklog = Api.Project.TaskWorklog;
type PersonalItemWorklogSearchParams = Api.Project.TaskWorklogSearchParams;
type SavePersonalItemWorklogParams = Api.Project.SaveTaskWorklogParams;
}
}

View File

@@ -380,6 +380,7 @@ declare namespace Api {
durationHours: number;
/** 本次填报进度0~100scale=2 */
progressRate: number;
difficulty?: string | null;
workContent: string | null;
attachments?: AttachmentItem[] | null;
createTime: string;
@@ -403,6 +404,7 @@ declare namespace Api {
durationHours: number;
/** 本次填报进度0~100scale=2必填 */
progressRate: number;
difficulty?: string | null;
workContent?: string | null;
/** 编辑语义null 保留原值 / [] 清空 / [...] 替换 */
attachments?: AttachmentItem[] | null;