feat(health): 新增依从性统计前端页面

- 新增 medicationAdherence.js:统计API接口
- 新增 medicationStatistic/index.vue:统计页面
  - 概览卡片:总任务、已服药、漏服、服药率、准时率
  - 趋势图:服药率和准时率折线图
  - 时段分布:饼图展示
  - 日历视图:月度服药日历
This commit is contained in:
bot5
2026-03-19 08:35:08 +08:00
parent d8caa6c7e6
commit f090aeb9b9
2 changed files with 620 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
import request from '@/utils/request'
// 获取总体依从性统计
export function getOverallAdherence(query) {
return request({
url: '/health/adherence/overall',
method: 'get',
params: query
})
}
// 获取每日依从性统计列表
export function getDailyAdherence(query) {
return request({
url: '/health/adherence/daily',
method: 'get',
params: query
})
}
// 获取日历视图数据
export function getCalendarData(personId, yearMonth) {
return request({
url: '/health/adherence/calendar',
method: 'get',
params: { personId, yearMonth }
})
}
// 获取各时段服药统计
export function getTimeSlotAdherence(query) {
return request({
url: '/health/adherence/timeSlot',
method: 'get',
params: query
})
}
// 获取各药品依从性统计
export function getMedicineAdherence(query) {
return request({
url: '/health/adherence/medicine',
method: 'get',
params: query
})
}
// 获取各人员依从性统计
export function getPersonAdherence(query) {
return request({
url: '/health/adherence/person',
method: 'get',
params: query
})
}
// 获取漏服原因统计
export function getMissedReasonStats(query) {
return request({
url: '/health/adherence/missedReason',
method: 'get',
params: query
})
}
// 获取仪表盘概览数据
export function getDashboard(personId) {
return request({
url: '/health/adherence/dashboard',
method: 'get',
params: { personId }
})
}