From 9e341eb4ebbb0bedc9aa1b4e84fb7213c6bb9653 Mon Sep 17 00:00:00 2001 From: xianyi Date: Mon, 12 Jan 2026 10:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/his.ts | 14 ++++++++++++++ src/api/types.ts | 13 +++++++++++++ src/components/exam/ExamModal.tsx | 6 +++--- 3 files changed, 30 insertions(+), 3 deletions(-) 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);