From edbbe2006f7f0c3550b5cc1389380eca56699d18 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Mon, 25 May 2026 23:39:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E7=94=A8=E8=8D=AF?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/health/medicationAdherence.js | 46 -- src/api/health/medicationPlan.js | 68 -- src/api/health/medicationRecord.js | 109 ---- src/api/health/medicationTask.js | 28 - src/pages.json | 37 +- src/pages/health/chronicDisease/addEdit.vue | 387 ----------- src/pages/health/chronicDisease/list.vue | 684 -------------------- src/pages/health/medicationPlan/addEdit.vue | 456 ------------- src/pages/health/medicationPlan/details.vue | 357 ---------- src/pages/health/medicationPlan/list.vue | 359 ---------- src/pages/health/medicationRecord/index.vue | 464 ------------- 11 files changed, 1 insertion(+), 2994 deletions(-) delete mode 100644 src/api/health/medicationAdherence.js delete mode 100644 src/api/health/medicationPlan.js delete mode 100644 src/api/health/medicationRecord.js delete mode 100644 src/api/health/medicationTask.js delete mode 100644 src/pages/health/chronicDisease/addEdit.vue delete mode 100644 src/pages/health/chronicDisease/list.vue delete mode 100644 src/pages/health/medicationPlan/addEdit.vue delete mode 100644 src/pages/health/medicationPlan/details.vue delete mode 100644 src/pages/health/medicationPlan/list.vue delete mode 100644 src/pages/health/medicationRecord/index.vue diff --git a/src/api/health/medicationAdherence.js b/src/api/health/medicationAdherence.js deleted file mode 100644 index e0ae9c0..0000000 --- a/src/api/health/medicationAdherence.js +++ /dev/null @@ -1,46 +0,0 @@ -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(memberId, yearMonth) { - return request({ - url: '/health/adherence/calendar', - method: 'get', - params: { memberId, yearMonth } - }) -} - -// 获取各时段服药统计 -export function getTimeSlotAdherence(query) { - return request({ - url: '/health/adherence/timeSlot', - method: 'get', - params: query - }) -} - -// 获取仪表盘概览数据 -export function getDashboard(memberId) { - return request({ - url: '/health/adherence/dashboard', - method: 'get', - params: { memberId } - }) -} \ No newline at end of file diff --git a/src/api/health/medicationPlan.js b/src/api/health/medicationPlan.js deleted file mode 100644 index a37ee1b..0000000 --- a/src/api/health/medicationPlan.js +++ /dev/null @@ -1,68 +0,0 @@ -import request from '@/utils/request' - -// 查询用药计划列表 -export function listMedicationPlan(query) { - return request({ - url: '/health/medicationPlan/list', - method: 'get', - params: query - }) -} - -// 查询用药计划详细 -export function getMedicationPlan(id) { - return request({ - url: '/health/medicationPlan/' + id, - method: 'get' - }) -} - -// 新增用药计划 -export function addMedicationPlan(data) { - return request({ - url: '/health/medicationPlan', - method: 'post', - data - }) -} - -// 修改用药计划 -export function updateMedicationPlan(data) { - return request({ - url: '/health/medicationPlan', - method: 'put', - data - }) -} - -// 删除用药计划 -export function delMedicationPlan(id) { - return request({ - url: '/health/medicationPlan/' + id, - method: 'delete' - }) -} - -// 暂停用药计划 -export function pauseMedicationPlan(id) { - return request({ - url: '/health/medicationPlan/pause/' + id, - method: 'put' - }) -} - -// 恢复用药计划 -export function resumeMedicationPlan(id) { - return request({ - url: '/health/medicationPlan/resume/' + id, - method: 'put' - }) -} - -// 结束用药计划 -export function endMedicationPlan(id) { - return request({ - url: '/health/medicationPlan/end/' + id, - method: 'put' - }) -} \ No newline at end of file diff --git a/src/api/health/medicationRecord.js b/src/api/health/medicationRecord.js deleted file mode 100644 index 7ddb6b8..0000000 --- a/src/api/health/medicationRecord.js +++ /dev/null @@ -1,109 +0,0 @@ -import request from '@/utils/request' - -function today() { - return new Date().toISOString().substring(0, 10) -} - -function normalizeQuery(query = {}) { - const params = { ...query } - if (params.keys && !params.keyword) { - params.keyword = params.keys - } - if (params.status) { - params.status = { - 1: 0, - 2: 1, - 3: 3, - 4: 2 - }[params.status] ?? params.status - } - delete params.keys - return params -} - -function normalizeStatus(status) { - return { - 0: '1', - 1: '2', - 2: '4', - 3: '3' - }[status] || String(status || '') -} - -function normalizeRecord(record = {}) { - const plannedTime = record.plannedTime || '' - const plannedDate = record.plannedDate || '' - return { - ...record, - status: normalizeStatus(record.status), - shortName: record.shortName || record.medicineName || '', - brand: record.brand || '', - dosage: record.dosage || record.plannedDosage || '', - dosageUnit: record.dosageUnit || '', - scheduledTime: record.scheduledTime || `${plannedDate} ${plannedTime}`.trim() - } -} - -function normalizeListResponse(res) { - const rows = (res.rows || []).map(normalizeRecord) - return { - ...res, - rows, - data: Array.isArray(res.data) ? res.data.map(normalizeRecord) : res.data - } -} - -// 查询服药任务列表,兼容页面中的 medicationRecord 命名 -export function listMedicationRecord(query) { - return request({ - url: '/health/medicationTask/list', - method: 'get', - params: normalizeQuery(query) - }).then(normalizeListResponse) -} - -// 查询今日服药任务 -export function getTodayRecords() { - return listMedicationRecord({ - pageNum: 1, - pageSize: 100, - queryDate: today() - }).then(res => ({ - ...res, - data: res.data || res.rows || [] - })) -} - -// 查询某计划某天的服药任务 -export function getRecordsByPlanAndDate(planId, queryDate) { - return listMedicationRecord({ - pageNum: 1, - pageSize: 100, - planId, - queryDate - }).then(res => ({ - ...res, - data: res.data || res.rows || [] - })) -} - -// 确认服药 -export function takeMedication(id, dosage, confirmTime) { - return request({ - url: '/health/medicationTask/confirm/' + id, - method: 'put', - params: { - confirmType: 1, - confirmTime - } - }) -} - -// 跳过服药 -export function skipMedication(id, notes) { - return request({ - url: '/health/medicationTask/skip/' + id, - method: 'put', - params: { notes } - }) -} diff --git a/src/api/health/medicationTask.js b/src/api/health/medicationTask.js deleted file mode 100644 index 1e9ad3e..0000000 --- a/src/api/health/medicationTask.js +++ /dev/null @@ -1,28 +0,0 @@ -import request from '@/utils/request' - -// 查询服药任务列表 -export function listMedicationTask(query) { - return request({ - url: '/health/medicationTask/list', - method: 'get', - params: query - }) -} - -// 确认服药 -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 } - }) -} \ No newline at end of file diff --git a/src/pages.json b/src/pages.json index d326bfc..4256e6a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -225,18 +225,6 @@ "navigationBarTitleText": "活动记录" } }, - { - "path": "pages/health/chronicDisease/list", - "style": { - "navigationBarTitleText": "慢性疾病档案" - } - }, - { - "path": "pages/health/chronicDisease/addEdit", - "style": { - "navigationBarTitleText": "慢性疾病档案" - } - }, { "path": "pages/health/statistic/doctorStatistic/index", "style": { @@ -266,31 +254,8 @@ "style": { "navigationBarTitleText": "吃奶量统计" } - }, - { - "path": "pages/health/medicationPlan/list", - "style": { - "navigationBarTitleText": "用药计划" - } - }, - { - "path": "pages/health/medicationPlan/details", - "style": { - "navigationBarTitleText": "用药计划详情" - } - }, - { - "path": "pages/health/medicationPlan/addEdit", - "style": { - "navigationBarTitleText": "用药计划" - } - }, - { - "path": "pages/health/medicationRecord/index", - "style": { - "navigationBarTitleText": "用药记录" - } } + ], "subPackages": [ { diff --git a/src/pages/health/chronicDisease/addEdit.vue b/src/pages/health/chronicDisease/addEdit.vue deleted file mode 100644 index 6feac5a..0000000 --- a/src/pages/health/chronicDisease/addEdit.vue +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/pages/health/chronicDisease/list.vue b/src/pages/health/chronicDisease/list.vue deleted file mode 100644 index d86aec1..0000000 --- a/src/pages/health/chronicDisease/list.vue +++ /dev/null @@ -1,684 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/health/medicationPlan/addEdit.vue b/src/pages/health/medicationPlan/addEdit.vue deleted file mode 100644 index d99f7bd..0000000 --- a/src/pages/health/medicationPlan/addEdit.vue +++ /dev/null @@ -1,456 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/health/medicationPlan/details.vue b/src/pages/health/medicationPlan/details.vue deleted file mode 100644 index 72a1aa7..0000000 --- a/src/pages/health/medicationPlan/details.vue +++ /dev/null @@ -1,357 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/health/medicationPlan/list.vue b/src/pages/health/medicationPlan/list.vue deleted file mode 100644 index 10a8404..0000000 --- a/src/pages/health/medicationPlan/list.vue +++ /dev/null @@ -1,359 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/pages/health/medicationRecord/index.vue b/src/pages/health/medicationRecord/index.vue deleted file mode 100644 index 0de779c..0000000 --- a/src/pages/health/medicationRecord/index.vue +++ /dev/null @@ -1,464 +0,0 @@ - - - - - \ No newline at end of file