feat: 修复部分功能(健康信息、VIP、医生端健康信息导入)

This commit is contained in:
李琦
2026-08-08 10:33:59 +08:00
parent 874d1e7731
commit 74272d61d2
16 changed files with 1799 additions and 781 deletions

View File

@@ -0,0 +1,19 @@
import { post, get } from './http'
/**
* 我的病历列表xk-api POST /medical-record/list
* 取值unwrapXkApi → code/result/message
* @param {{ user_patient_id: number, page?: number, pageSize?: number }} params
*/
export async function getMedicalRecordListApi(params) {
return await post('/medical-record/list', params, 3)
}
/**
* 我的病历详情xk-api GET /medical-record/detail
* 取值unwrapXkApi → code/result/message
* @param {{ id: number }} params
*/
export async function getMedicalRecordDetailApi(params) {
return await get('/medical-record/detail', params, 3)
}

41
request/api/patient.js Normal file
View File

@@ -0,0 +1,41 @@
import { post, get } from './http'
/**
* 就诊人相关接口统一走 xk-apitype=3
* 取值unwrapXkApi → code / result / message
*/
/** 就诊人列表 POST /patient/list → { list, latest_register_user_patient_id } */
export async function getPatientListApi(params = {}) {
return await post('/patient/list', params, 3)
}
/** 就诊人保存(新增/编辑POST /patient/save */
export async function savePatientApi(params = {}) {
return await post('/patient/save', params, 3)
}
/** 删除就诊人 POST /patient/delete */
export async function deletePatientApi(params = {}) {
return await post('/patient/delete', params, 3)
}
/** 监护人信息 GET /patient/guardian-info */
export async function getPatientGuardianInfoApi(params = {}) {
return await get('/patient/guardian-info', params, 3)
}
/** 关系枚举 GET /patient/relation */
export async function getPatientRelationApi(params = {}) {
return await get('/patient/relation', params, 3)
}
/** 设为默认就诊人 POST /patient/change-default传 up_id */
export async function changePatientDefaultApi(params = {}) {
return await post('/patient/change-default', params, 3)
}
/** 健康问诊详情 POST /patient/health-info传 user_patient_id */
export async function getPatientHealthInfoApi(params = {}) {
return await post('/patient/health-info', params, 3)
}

View File

@@ -1,4 +1,5 @@
import {post} from './http'
import { unwrapXkApi } from '@/utils/api-response.js'
/**
* 获取挂号记录列表
@@ -21,9 +22,11 @@ export async function fetchUnpaidRegisterListApi(params = {}) {
page: 1,
...params,
}, 3);
if (res.data?.code !== 0 && res.data?.code !== '0') {
// /register/list → xk-api
const { ok, payload } = unwrapXkApi(res)
if (!ok) {
return [];
}
const list = res.data?.result?.list || [];
const list = (payload && payload.list) || [];
return list.filter((item) => item.status === 0 && item.is_cancel !== 1);
}