diff --git a/src/api/health/medicationAdherence.js b/src/api/health/medicationAdherence.js new file mode 100644 index 0000000..0a637b9 --- /dev/null +++ b/src/api/health/medicationAdherence.js @@ -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 } + }) +} \ No newline at end of file diff --git a/src/views/health/medicationStatistic/index.vue b/src/views/health/medicationStatistic/index.vue new file mode 100644 index 0000000..cbc5ce2 --- /dev/null +++ b/src/views/health/medicationStatistic/index.vue @@ -0,0 +1,547 @@ + + + + + 查询条件 + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + {{ overview.totalTasks || 0 }} + 总任务数 + + + + + + + + {{ overview.completedTasks || 0 }} + 已服药 + + + + + + + + {{ overview.missedTasks || 0 }} + 漏服 + + + + + + + + {{ overview.adherenceRate || 0 }}% + 服药率 + + + + + + + + {{ overview.ontimeRate || 0 }}% + 准时率 + + + + + + + + + 服药趋势(最近7天) + + + + + 时段分布 + + + + + + + + 日历视图 + + + 上月 + {{ currentMonth }} + 下月 + + + + + + {{ day }} + + + + {{ day.day }} + + + + {{ day.data.adherenceRate }}% + + + + + + + + + + + \ No newline at end of file