From f090aeb9b9f4930c26e6507c8dcd0d9d3f402b77 Mon Sep 17 00:00:00 2001 From: bot5 Date: Thu, 19 Mar 2026 08:35:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(health):=20=E6=96=B0=E5=A2=9E=E4=BE=9D?= =?UTF-8?q?=E4=BB=8E=E6=80=A7=E7=BB=9F=E8=AE=A1=E5=89=8D=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 medicationAdherence.js:统计API接口 - 新增 medicationStatistic/index.vue:统计页面 - 概览卡片:总任务、已服药、漏服、服药率、准时率 - 趋势图:服药率和准时率折线图 - 时段分布:饼图展示 - 日历视图:月度服药日历 --- src/api/health/medicationAdherence.js | 73 +++ .../health/medicationStatistic/index.vue | 547 ++++++++++++++++++ 2 files changed, 620 insertions(+) create mode 100644 src/api/health/medicationAdherence.js create mode 100644 src/views/health/medicationStatistic/index.vue 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 @@ + + + + + \ No newline at end of file