refactor(health): 前端适配后端API重构
- 新增 medicationTask.js 替代 medicationRecord.js - 新增 medicationTask/index.vue 服药任务页面 - 更新 medicationAdherence.js 参数名 personId -> memberId - 状态值适配:0-待服药 1-已服药 2-漏服 3-跳过
This commit is contained in:
53
src/api/health/medicationTask.js
Normal file
53
src/api/health/medicationTask.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询服药任务列表
|
||||
export function listMedicationTask(query) {
|
||||
return request({
|
||||
url: '/health/medicationTask/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询服药任务详细
|
||||
export function getMedicationTask(id) {
|
||||
return request({
|
||||
url: '/health/medicationTask/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除服药任务
|
||||
export function delMedicationTask(id) {
|
||||
return request({
|
||||
url: '/health/medicationTask/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 确认服药
|
||||
export function confirmMedication(id, confirmType) {
|
||||
return request({
|
||||
url: '/health/medicationTask/confirm/' + id,
|
||||
method: 'put',
|
||||
params: { confirmType }
|
||||
})
|
||||
}
|
||||
|
||||
// 跳过服药
|
||||
export function skipMedication(id, notes) {
|
||||
return request({
|
||||
url: '/health/medicationTask/skip/' + id,
|
||||
method: 'put',
|
||||
params: { notes }
|
||||
})
|
||||
}
|
||||
|
||||
// 标记漏服
|
||||
export function markMissed(id, notes) {
|
||||
return request({
|
||||
url: '/health/medicationTask/missed/' + id,
|
||||
method: 'put',
|
||||
params: { notes }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user