From 9132824c612d633a0afef12429ec590f0bf5d8e1 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sat, 20 Jun 2026 22:10:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=81=A5=E5=BA=B7=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/health/chronicDiseaseManage.js | 88 + src/api/health/statisticAnalysis.js | 24 + src/router/index.js | 27 +- src/views/health/activityStatistic/index.vue | 582 +++++ src/views/health/chronicDisease/index.vue | 619 +++++- src/views/health/healthRecord/index.vue | 21 + src/views/health/healthScreen/index.vue | 1864 ++++++++++++++++ src/views/health/medicationPlan/index.vue | 34 +- src/views/health/recordScreen/index.vue | 2039 ++++++++++++++++++ src/views/index.vue | 118 +- 10 files changed, 5386 insertions(+), 30 deletions(-) create mode 100644 src/api/health/chronicDiseaseManage.js create mode 100644 src/views/health/activityStatistic/index.vue create mode 100644 src/views/health/healthScreen/index.vue create mode 100644 src/views/health/recordScreen/index.vue diff --git a/src/api/health/chronicDiseaseManage.js b/src/api/health/chronicDiseaseManage.js new file mode 100644 index 0000000..de71409 --- /dev/null +++ b/src/api/health/chronicDiseaseManage.js @@ -0,0 +1,88 @@ +import request from '@/utils/request' + +// 查询慢病指标记录列表 +export function listIndicator(query) { + return request({ + url: '/health/chronicDiseaseManage/indicator/list', + method: 'get', + params: query + }) +} + +// 查询慢病指标记录详细 +export function getIndicator(id) { + return request({ + url: '/health/chronicDiseaseManage/indicator/' + id, + method: 'get' + }) +} + +// 新增慢病指标记录 +export function addIndicator(data) { + return request({ + url: '/health/chronicDiseaseManage/indicator', + method: 'post', + data + }) +} + +// 修改慢病指标记录 +export function updateIndicator(data) { + return request({ + url: '/health/chronicDiseaseManage/indicator', + method: 'put', + data + }) +} + +// 删除慢病指标记录 +export function delIndicator(id) { + return request({ + url: '/health/chronicDiseaseManage/indicator/' + id, + method: 'delete' + }) +} + +// 查询复诊随访记录列表 +export function listFollowUp(query) { + return request({ + url: '/health/chronicDiseaseManage/followUp/list', + method: 'get', + params: query + }) +} + +// 新增复诊随访记录 +export function addFollowUp(data) { + return request({ + url: '/health/chronicDiseaseManage/followUp', + method: 'post', + data + }) +} + +// 修改复诊随访记录 +export function updateFollowUp(data) { + return request({ + url: '/health/chronicDiseaseManage/followUp', + method: 'put', + data + }) +} + +// 删除复诊随访记录 +export function delFollowUp(id) { + return request({ + url: '/health/chronicDiseaseManage/followUp/' + id, + method: 'delete' + }) +} + +// 查询状态变更历史 +export function listStatusHistory(query) { + return request({ + url: '/health/chronicDiseaseManage/statusHistory/list', + method: 'get', + params: query + }) +} diff --git a/src/api/health/statisticAnalysis.js b/src/api/health/statisticAnalysis.js index 797be1b..33cc312 100644 --- a/src/api/health/statisticAnalysis.js +++ b/src/api/health/statisticAnalysis.js @@ -24,6 +24,22 @@ export function getHealthAnalysis(query) { }) } +export function getActivityAnalysis(query) { + return request({ + url: '/health/analysis/activityAnalysis', + method: 'get', + params: query + }) +} + +export function getHealthScreen(query) { + return request({ + url: '/health/analysis/healthScreen', + method: 'get', + params: query + }) +} + export function getRecordAnalysis(query) { return request({ url: '/health/analysis/recordAnalysis', @@ -32,6 +48,14 @@ export function getRecordAnalysis(query) { }) } +export function getRecordScreen(query) { + return request({ + url: '/health/analysis/recordScreen', + method: 'get', + params: query + }) +} + export function getDoctorAnalysis(query) { return request({ url: '/health/analysis/doctorAnalysis', diff --git a/src/router/index.js b/src/router/index.js index 77c192c..31e14e3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -65,28 +65,19 @@ export const constantRoutes = [ { path: '', component: Layout, - redirect: '/accountCalendar' - // children: [ - // { - // path: '/index', - // component: () => import('@/views/index'), - // name: 'Index', - // meta: { title: '首页', icon: 'dashboard', affix: true } - // } - // ] + redirect: '/index' }, { path: '/index', component: Layout, - redirect: '/statisticanalysis/accountAnalysis' - // children: [ - // { - // path: '/index', - // component: () => import('@/views/index'), - // name: 'Index', - // meta: { title: '首页', icon: 'dashboard', affix: true } - // } - // ] + children: [ + { + path: '', + component: () => import('@/views/index'), + name: 'Index', + meta: { title: '首页', icon: 'dashboard', affix: true } + } + ] }, { path: '/user', diff --git a/src/views/health/activityStatistic/index.vue b/src/views/health/activityStatistic/index.vue new file mode 100644 index 0000000..30f60f7 --- /dev/null +++ b/src/views/health/activityStatistic/index.vue @@ -0,0 +1,582 @@ + + + + + diff --git a/src/views/health/chronicDisease/index.vue b/src/views/health/chronicDisease/index.vue index bff044e..af85c8b 100644 --- a/src/views/health/chronicDisease/index.vue +++ b/src/views/health/chronicDisease/index.vue @@ -138,21 +138,275 @@ + + +
+ + {{ detailRecord.personName || '--' }} + {{ detailRecord.diseaseName || '--' }} + {{ detailRecord.diseaseCode || '--' }} + {{ parseTime(detailRecord.diagnosisDate, '{y}-{m}-{d}') || '--' }} + + + {{ getStatusLabel(detailRecord.diseaseStatus) }} + + + {{ detailRecord.isActive === 1 ? '已启用' : '已停用' }} + {{ detailRecord.mainDoctor || '--' }} + {{ detailRecord.hospital || '--' }} + {{ detailRecord.department || '--' }} + {{ detailRecord.notes || '--' }} + {{ detailRecord.remark || '--' }} + + +
+
+ 关联用药计划 + 创建用药计划 +
+ + + + + + + + + + + + + + + + +
+ +
+
+ 指标监测 + 新增指标 +
+
+
+
{{ item.indicatorName || '--' }}
+
+ {{ item.indicatorValue ?? '--' }} + {{ item.indicatorUnit || '' }} +
+ {{ getIndicatorStatusLabel(item.status) }} +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ 复诊随访 + 新增随访 +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ 状态历史 +
+ + +
+ {{ getStatusLabel(item.oldStatus) }} + 调整为 + {{ getStatusLabel(item.newStatus) }} +
+
{{ item.reason || '档案状态调整' }}
+
建议:{{ item.treatmentAdvice }}
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/src/views/health/healthRecord/index.vue b/src/views/health/healthRecord/index.vue index 4430cea..ac6f18d 100644 --- a/src/views/health/healthRecord/index.vue +++ b/src/views/health/healthRecord/index.vue @@ -41,6 +41,7 @@
新增 删除 + 完整导出
@@ -323,6 +324,7 @@ const processRecordList = ref([]) const operateList = ref([ { id: 'view', icon: 'View', title: '查看', hasPermi: ['health:healthRecord:query'] }, + { id: 'fullExport', icon: 'Download', title: '完整导出', hasPermi: ['health:healthRecord:export'] }, { id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['health:healthRecord:edit'] }, { id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['health:healthRecord:remove'] } ]) @@ -381,6 +383,9 @@ const handleOperate = (operate, row) => { case 'edit': handleUpdate(row) break + case 'fullExport': + handleFullExport(row) + break case 'delete': handleDelete(row) break @@ -623,6 +628,22 @@ function handleExport() { ) } +function handleFullExport(row) { + const recordId = row && row.id ? row.id : ids.value[0] + const recordName = row && row.name ? row.name : '健康档案' + if (!recordId) { + proxy.$modal.msgWarning('请选择要导出的健康档案') + return + } + proxy.download( + 'health/analysis/recordFullExport', + { + recordId + }, + `${recordName}_完整信息_${new Date().getTime()}.xlsx` + ) +} + getList() getPersonList() diff --git a/src/views/health/healthScreen/index.vue b/src/views/health/healthScreen/index.vue new file mode 100644 index 0000000..3365e5f --- /dev/null +++ b/src/views/health/healthScreen/index.vue @@ -0,0 +1,1864 @@ + + + + + diff --git a/src/views/health/medicationPlan/index.vue b/src/views/health/medicationPlan/index.vue index a94b570..51e7025 100644 --- a/src/views/health/medicationPlan/index.vue +++ b/src/views/health/medicationPlan/index.vue @@ -104,10 +104,10 @@ - + - + @@ -234,6 +234,7 @@ import { listChronicDiseaseByMember } from '@/api/health/chronicDisease' import { Close } from '@element-plus/icons-vue' const { proxy } = getCurrentInstance() +const route = useRoute() const { medication_frequency_type, medication_plan_status, medical_unit } = proxy.useDict('medication_frequency_type', 'medication_plan_status', 'medical_unit') const planList = ref([]) @@ -257,9 +258,11 @@ const data = reactive({ pageSize: 10, planName: null, personId: null, + chronicDiseaseId: null, frequencyType: null, status: null, - keys: null + keys: null, + keyword: null }, rules: { personId: [{ required: true, message: '请选择人员', trigger: 'change' }], @@ -274,7 +277,8 @@ const { queryParams, form, rules } = toRefs(data) /** 查询用药计划列表 */ function getList() { loading.value = true - listMedicationPlan(queryParams.value).then((response) => { + const params = { ...queryParams.value, keyword: queryParams.value.keys } + listMedicationPlan(params).then((response) => { planList.value = response.rows total.value = response.total loading.value = false @@ -340,6 +344,7 @@ function handleQuery() { /** 重置按钮操作 */ function resetQuery() { proxy.resetForm('queryRef') + queryParams.value.chronicDiseaseId = null handleQuery() } @@ -449,6 +454,26 @@ function handleAdd() { title.value = '添加用药计划' } +function handleAddFromChronicDisease() { + const personId = route.query.personId ? Number(route.query.personId) : null + const chronicDiseaseId = route.query.chronicDiseaseId ? Number(route.query.chronicDiseaseId) : null + if (!personId || !chronicDiseaseId) { + return + } + reset() + form.value.personId = personId + form.value.chronicDiseaseId = chronicDiseaseId + form.value.planName = route.query.diseaseName ? `${route.query.diseaseName}用药计划` : null + queryParams.value.personId = personId + queryParams.value.chronicDiseaseId = chronicDiseaseId + listChronicDiseaseByMember(personId).then((res) => { + chronicDiseaseList.value = res.data || [] + }) + open.value = true + title.value = '添加用药计划' + getList() +} + /** 修改按钮操作 */ function handleUpdate(row) { reset() @@ -616,6 +641,7 @@ function handlePersonChange(personId) { getPersonList() getMedicineList() getList() +handleAddFromChronicDisease() + + diff --git a/src/views/index.vue b/src/views/index.vue index 45a6cf2..9b32642 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,7 +1,121 @@ - +