diff --git a/frontend/src/api/dataQueries.ts b/frontend/src/api/dataQueries.ts new file mode 100644 index 00000000..b72992b7 --- /dev/null +++ b/frontend/src/api/dataQueries.ts @@ -0,0 +1,11 @@ +import { apiGet, apiPost, apiPatch } from "./axios"; +import type { ApiListResponse } from "../types/api"; + +export const fetchDataQueries = (studyId: string, params?: Record) => + apiGet>(`/api/v1/studies/${studyId}/data-queries/`, { params }); + +export const createDataQuery = (studyId: string, payload: Record) => + apiPost(`/api/v1/studies/${studyId}/data-queries/`, payload); + +export const updateDataQuery = (studyId: string, queryId: string, payload: Record) => + apiPatch(`/api/v1/studies/${studyId}/data-queries/${queryId}`, payload); diff --git a/frontend/src/components/DataQueryForm.vue b/frontend/src/components/DataQueryForm.vue new file mode 100644 index 00000000..9e011b5d --- /dev/null +++ b/frontend/src/components/DataQueryForm.vue @@ -0,0 +1,147 @@ + + + diff --git a/frontend/src/components/Layout.vue b/frontend/src/components/Layout.vue index 9ca144b4..f01a9940 100644 --- a/frontend/src/components/Layout.vue +++ b/frontend/src/components/Layout.vue @@ -22,6 +22,8 @@ 受试者 AE 风险/问题 + 数据问题 + SDV/SDR diff --git a/frontend/src/components/VerificationTable.vue b/frontend/src/components/VerificationTable.vue new file mode 100644 index 00000000..4a2562a5 --- /dev/null +++ b/frontend/src/components/VerificationTable.vue @@ -0,0 +1,27 @@ + + + diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index da059661..d5973f69 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -13,11 +13,13 @@ import SubjectDetail from "../views/SubjectDetail.vue"; import Aes from "../views/Aes.vue"; import AeDetail from "../views/AeDetail.vue"; import DataQueries from "../views/DataQueries.vue"; +import DataQueryDetail from "../views/DataQueryDetail.vue"; import Imp from "../views/Imp.vue"; import Finance from "../views/Finance.vue"; import Faq from "../views/Faq.vue"; import Issues from "../views/Issues.vue"; import IssueDetail from "../views/IssueDetail.vue"; +import Verification from "../views/Verification.vue"; const routes: RouteRecordRaw[] = [ { @@ -85,6 +87,12 @@ const routes: RouteRecordRaw[] = [ component: DataQueries, meta: { title: "数据问题", requiresStudy: true }, }, + { + path: "study/data-queries/:queryId", + name: "StudyDataQueryDetail", + component: DataQueryDetail, + meta: { title: "数据问题详情", requiresStudy: true }, + }, { path: "study/issues", name: "StudyIssues", @@ -115,6 +123,12 @@ const routes: RouteRecordRaw[] = [ component: Faq, meta: { title: "FAQ", requiresStudy: true }, }, + { + path: "study/verifications", + name: "StudyVerifications", + component: Verification, + meta: { title: "核查进度", requiresStudy: true }, + }, ], }, { diff --git a/frontend/src/views/Aes.vue b/frontend/src/views/Aes.vue index 1a3f03ae..7c8943d8 100644 --- a/frontend/src/views/Aes.vue +++ b/frontend/src/views/Aes.vue @@ -18,7 +18,11 @@ - + + + @@ -62,6 +66,12 @@ const total = ref(0); const page = ref(1); const pageSize = 10; const subjects = ref([]); +const subjectMap = computed(() => + subjects.value.reduce>((acc, cur) => { + acc[cur.id] = cur.subject_no || cur.id; + return acc; + }, {}) +); const statuses = ["NEW", "FOLLOW_UP", "CLOSED"]; diff --git a/frontend/src/views/DataQueries.vue b/frontend/src/views/DataQueries.vue index d8212d8f..33023cf1 100644 --- a/frontend/src/views/DataQueries.vue +++ b/frontend/src/views/DataQueries.vue @@ -1,13 +1,158 @@ - + diff --git a/frontend/src/views/DataQueryDetail.vue b/frontend/src/views/DataQueryDetail.vue new file mode 100644 index 00000000..1ae256e5 --- /dev/null +++ b/frontend/src/views/DataQueryDetail.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/frontend/src/views/Verification.vue b/frontend/src/views/Verification.vue index d97e9163..11472318 100644 --- a/frontend/src/views/Verification.vue +++ b/frontend/src/views/Verification.vue @@ -8,13 +8,26 @@
+ 新增进度
- + + + + + + + + + + + + + @@ -82,8 +95,22 @@ const openEdit = (row: any) => { showEdit.value = true; }; +const openCreate = () => { + if (!canEdit.value) return; + editForm.value = { subject_id: "", site_id: "", level: filters.value.level || "SDV", percent: 0, notes: "" }; + showEdit.value = true; +}; + const submitEdit = async () => { if (!study.currentStudy) return; + if (!editForm.value.subject_id) { + ElMessage.warning("请输入受试者ID"); + return; + } + if (!editForm.value.level) { + ElMessage.warning("请选择类型"); + return; + } submitting.value = true; try { await upsertVerification(study.currentStudy.id, { diff --git a/pg_data/base/16384/24576 b/pg_data/base/16384/24576 index df72e97b..0b1d1fb6 100644 Binary files a/pg_data/base/16384/24576 and b/pg_data/base/16384/24576 differ diff --git a/pg_data/base/16384/24584 b/pg_data/base/16384/24584 index 061d791e..ae81a085 100644 Binary files a/pg_data/base/16384/24584 and b/pg_data/base/16384/24584 differ diff --git a/pg_data/base/16384/24672 b/pg_data/base/16384/24672 index 008cb3ae..3b4fe21c 100644 Binary files a/pg_data/base/16384/24672 and b/pg_data/base/16384/24672 differ diff --git a/pg_data/base/16384/24672_fsm b/pg_data/base/16384/24672_fsm index 39488e54..ce027bca 100644 Binary files a/pg_data/base/16384/24672_fsm and b/pg_data/base/16384/24672_fsm differ diff --git a/pg_data/base/16384/24678 b/pg_data/base/16384/24678 index dd24da86..4c1f4151 100644 Binary files a/pg_data/base/16384/24678 and b/pg_data/base/16384/24678 differ diff --git a/pg_data/base/16384/24740 b/pg_data/base/16384/24740 index 0b9e430a..fa7b43e2 100644 Binary files a/pg_data/base/16384/24740 and b/pg_data/base/16384/24740 differ diff --git a/pg_data/base/16384/24815 b/pg_data/base/16384/24815 index 9db191ca..4b18b8a4 100644 Binary files a/pg_data/base/16384/24815 and b/pg_data/base/16384/24815 differ diff --git a/pg_data/base/16384/24822 b/pg_data/base/16384/24822 index 96e19cb2..bbd5dd2b 100644 Binary files a/pg_data/base/16384/24822 and b/pg_data/base/16384/24822 differ diff --git a/pg_data/base/16384/24849 b/pg_data/base/16384/24849 index 223ed55d..959a21e5 100644 Binary files a/pg_data/base/16384/24849 and b/pg_data/base/16384/24849 differ diff --git a/pg_data/base/16384/24850 b/pg_data/base/16384/24850 index 65d76241..4c49be91 100644 Binary files a/pg_data/base/16384/24850 and b/pg_data/base/16384/24850 differ diff --git a/pg_data/base/16384/24851 b/pg_data/base/16384/24851 index 3c8c02ed..ece7249e 100644 Binary files a/pg_data/base/16384/24851 and b/pg_data/base/16384/24851 differ diff --git a/pg_data/base/16384/24853 b/pg_data/base/16384/24853 index 8682a42c..a5f863b6 100644 Binary files a/pg_data/base/16384/24853 and b/pg_data/base/16384/24853 differ diff --git a/pg_data/base/16384/24860 b/pg_data/base/16384/24860 index 618977d0..3f957e15 100644 Binary files a/pg_data/base/16384/24860 and b/pg_data/base/16384/24860 differ diff --git a/pg_data/base/16384/24887 b/pg_data/base/16384/24887 index e22a9116..bba1abc7 100644 Binary files a/pg_data/base/16384/24887 and b/pg_data/base/16384/24887 differ diff --git a/pg_data/base/16384/24888 b/pg_data/base/16384/24888 index dd8a8efc..44c361ef 100644 Binary files a/pg_data/base/16384/24888 and b/pg_data/base/16384/24888 differ diff --git a/pg_data/base/16384/24889 b/pg_data/base/16384/24889 index 98262ca7..fdcedf9e 100644 Binary files a/pg_data/base/16384/24889 and b/pg_data/base/16384/24889 differ diff --git a/pg_data/base/16384/2604 b/pg_data/base/16384/2604 index 982d5ecd..dc298b20 100644 Binary files a/pg_data/base/16384/2604 and b/pg_data/base/16384/2604 differ diff --git a/pg_data/base/16384/2659 b/pg_data/base/16384/2659 index e8925a5d..f8aa09f5 100644 Binary files a/pg_data/base/16384/2659 and b/pg_data/base/16384/2659 differ diff --git a/pg_data/global/pg_control b/pg_data/global/pg_control index d0a17a2c..9ae82d73 100644 Binary files a/pg_data/global/pg_control and b/pg_data/global/pg_control differ diff --git a/pg_data/pg_wal/000000010000000000000001 b/pg_data/pg_wal/000000010000000000000001 index bb30d23c..4c28f090 100644 Binary files a/pg_data/pg_wal/000000010000000000000001 and b/pg_data/pg_wal/000000010000000000000001 differ diff --git a/pg_data/pg_xact/0000 b/pg_data/pg_xact/0000 index da7ed3d9..d9c6818a 100644 Binary files a/pg_data/pg_xact/0000 and b/pg_data/pg_xact/0000 differ