Step F6:AE & 风险/问题管理(PV)

This commit is contained in:
Cheng Zhou
2025-12-16 22:17:26 +08:00
parent e047756b9c
commit abb5b0a107
42 changed files with 779 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
import { apiGet, apiPost, apiPatch } from "./axios";
import type { ApiListResponse } from "../types/api";
export const fetchAes = (studyId: string, params?: Record<string, any>) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/aes/`, { params });
export const createAe = (studyId: string, payload: Record<string, any>) =>
apiPost(`/api/v1/studies/${studyId}/aes/`, payload);
export const updateAe = (studyId: string, aeId: string, payload: Record<string, any>) =>
apiPatch(`/api/v1/studies/${studyId}/aes/${aeId}`, payload);
+12
View File
@@ -0,0 +1,12 @@
import { apiGet, apiPost } from "./axios";
export const fetchAttachments = (studyId: string, entityType: string, entityId: string) =>
apiGet(`/api/v1/studies/${studyId}/${entityType}/${entityId}/attachments`);
export const uploadAttachment = (studyId: string, entityType: string, entityId: string, file: File) => {
const formData = new FormData();
formData.append("file", file);
return apiPost(`/api/v1/studies/${studyId}/${entityType}/${entityId}/attachments`, formData, {
headers: { "Content-Type": "multipart/form-data" },
});
};
+11
View File
@@ -0,0 +1,11 @@
import { apiGet, apiPost } from "./axios";
export const fetchComments = (studyId: string, entityType: string, entityId: string) =>
apiGet(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`);
export const createComment = (
studyId: string,
entityType: string,
entityId: string,
payload: Record<string, any>
) => apiPost(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`, payload);
+11
View File
@@ -0,0 +1,11 @@
import { apiGet, apiPost, apiPatch } from "./axios";
import type { ApiListResponse } from "../types/api";
export const fetchIssues = (studyId: string, params?: Record<string, any>) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/issues/`, { params });
export const createIssue = (studyId: string, payload: Record<string, any>) =>
apiPost(`/api/v1/studies/${studyId}/issues/`, payload);
export const updateIssue = (studyId: string, issueId: string, payload: Record<string, any>) =>
apiPatch(`/api/v1/studies/${studyId}/issues/${issueId}`, payload);