diff --git a/src/api/his.ts b/src/api/his.ts index 5f633dd..a3fa5c2 100644 --- a/src/api/his.ts +++ b/src/api/his.ts @@ -10,6 +10,8 @@ import type { PhysicalExamCustomerListResponse, InputPhysicalExamProgressDetail, PhysicalExamProgressDetailResponse, + InputPhysicalExamProgress, + PhysicalExamProgressResponse, InputCustomerDetail, CustomerDetailResponse, InputMedicalExamCenterSignIn, @@ -142,6 +144,18 @@ export const getPhysicalExamProgressDetail = ( ).then(res => res.data); }; +/** + * 体检进度 + */ +export const getPhysicalExamProgress = ( + data: InputPhysicalExamProgress +): Promise => { + return request.post( + `${MEDICAL_EXAM_BASE_PATH}/progress`, + data + ).then(res => res.data); +}; + /** * 客户详情 */ diff --git a/src/api/types.ts b/src/api/types.ts index 9b5bfed..ac3ab1f 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -223,6 +223,19 @@ export interface OutputPhysicalExamProgressDetail { */ export type PhysicalExamProgressDetailResponse = CommonActionResult; +/** + * 体检进度入参 + */ +export interface InputPhysicalExamProgress { + /** 体检ID */ + physical_exam_id: number; +} + +/** + * 体检进度接口返回 + */ +export type PhysicalExamProgressResponse = CommonActionResult; + /** * 客户详情入参 */ diff --git a/src/components/exam/ExamModal.tsx b/src/components/exam/ExamModal.tsx index dd08536..8edb41e 100644 --- a/src/components/exam/ExamModal.tsx +++ b/src/components/exam/ExamModal.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import type { ExamClient, ExamModalTab } from '../../data/mockData'; import type { CustomerAppointmentInfo, CustomerExamAddItem, CustomerInfo, PhysicalExamProgressItem } from '../../api'; -import { getCustomerDetail, getPhysicalExamProgressDetail } from '../../api'; +import { getCustomerDetail, getPhysicalExamProgress } from '../../api'; import { isExamActionDone } from '../../utils/examActions'; import { ExamDetailPanel } from './ExamDetailPanel'; import { ExamAddonPanel } from './ExamAddonPanel'; @@ -67,13 +67,13 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps) setDetailLoading(true); Promise.all([ getCustomerDetail({ physical_exam_id }), - getPhysicalExamProgressDetail({ physical_exam_id }), + getPhysicalExamProgress({ physical_exam_id }), ]) .then(([detailRes, progressRes]) => { setCustomerInfo(detailRes.Data?.customerInfo ?? null); setAppointmentInfo(detailRes.Data?.appointmentInfo ?? null); setAddItemInfoList(detailRes.Data?.addItemInfoList ?? null); - setProgressList(progressRes.Data?.examProgressesList ?? null); + setProgressList(progressRes.Data ?? null); }) .catch((err) => { console.error('获取客户详情/进度失败', err);