From e13adf29be6604105e1f2961212fce5376c91999 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Thu, 19 Dec 2024 16:08:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=81=A5=E5=BA=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=EF=BC=8C=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/health/statisticAnalysis.js | 16 ++ src/views/health/doctorRecord/index.vue | 19 +- src/views/health/doctorStatistic/index.vue | 189 +++++++++------- src/views/health/healthAnalysis/index.vue | 4 +- src/views/health/healthRecord/index.vue | 2 +- src/views/health/healthStatistic/index.vue | 220 +++++++++---------- src/views/health/marRecord/index.vue | 19 +- src/views/health/processRecord/index.vue | 20 +- src/views/health/temperatureRecord/index.vue | 19 +- 9 files changed, 301 insertions(+), 207 deletions(-) diff --git a/src/api/health/statisticAnalysis.js b/src/api/health/statisticAnalysis.js index 2ede0b0..cd24c67 100644 --- a/src/api/health/statisticAnalysis.js +++ b/src/api/health/statisticAnalysis.js @@ -23,3 +23,19 @@ export function getHealthAnalysis(query) { params: query }) } + +export function getRecordAnalysis(query) { + return request({ + url: '/health/analysis/recordAnalysis', + method: 'get', + params: query + }) +} + +export function getDoctorAnalysis(query) { + return request({ + url: '/health/analysis/doctorAnalysis', + method: 'get', + params: query + }) +} diff --git a/src/views/health/doctorRecord/index.vue b/src/views/health/doctorRecord/index.vue index c163910..976b4a4 100644 --- a/src/views/health/doctorRecord/index.vue +++ b/src/views/health/doctorRecord/index.vue @@ -4,10 +4,15 @@
查询条件
- + + + + + + @@ -390,6 +395,13 @@ const handlePersonChange = (personId) => { } }) } +const handleQueryPersonChange = (personId) => { + queryHealthRecordParams.personId = personId + queryParams.value.healthRecordId = null + listHealthRecord(queryHealthRecordParams).then((response) => { + healthRecordList.value = response.rows + }) +} const handleCountChange = (count) => { if (formDetail.value.price != null) { @@ -726,6 +738,11 @@ function getList() { function getPersonList() { listPerson(queryPersonParams.value).then((response) => { personList.value = response.rows + if (response.rows.length > 0) { + listHealthRecord(queryHealthRecordParams).then((res) => { + healthRecordList.value = res.rows + }) + } }) } diff --git a/src/views/health/doctorStatistic/index.vue b/src/views/health/doctorStatistic/index.vue index eb664e2..a94440b 100644 --- a/src/views/health/doctorStatistic/index.vue +++ b/src/views/health/doctorStatistic/index.vue @@ -63,7 +63,7 @@
就医次数
- {{ mar.marCategoryCount }}{{ doctor.doctorCount }}
@@ -75,7 +75,7 @@
就医费用
- {{ mar.marCount }}{{ doctor.doctorCost }}
@@ -88,8 +88,7 @@
常去医院
- {{ mar.qingre }}XXX + {{ doctor.commonHospital }}
@@ -100,25 +99,23 @@
常去科室
- {{ mar.zhike }}XXX + {{ doctor.commonDepartments }} +
+
+ +
+
+ +
+
+
常看大夫
+
+ {{ doctor.commonDoctor }}
-
-
- -
-
-
常看大夫
-
- {{ mar.wuhua }}XXX -
-
-
@@ -126,7 +123,7 @@
门诊次数
- {{ mar.marCategoryCount }}{{ doctor.clinicCount }}
@@ -138,7 +135,19 @@
急诊次数
- {{ mar.marCount }}{{ doctor.emergencyCount }} +
+
+
+
+
+ +
+
+
输液次数
+
+ {{ doctor.infusionCount }}
@@ -151,7 +160,19 @@
住院次数
- {{ mar.qingre }}{{ doctor.hospitalizedCount }} +
+
+
+
+
+ +
+
+
线上问诊次数
+
+ {{ doctor.onlineCount }}
@@ -161,46 +182,62 @@
就医统计
+ + + + - - -
- + - - + + - + - - - + + - + - - - - + + + + + + + + + + + + + + + +
@@ -212,14 +249,20 @@ import dayjs from 'dayjs' import * as echarts from 'echarts' import { ElMessage } from 'element-plus' import yearPicker from '@/components/YearPicker/index.vue' -import { getMarAnalysis } from '@/api/health/statisticAnalysis' +import { getDoctorAnalysis } from '@/api/health/statisticAnalysis' import { listPerson, getPerson } from '@/api/health/person' import { listHealthRecord } from '@/api/health/healthRecord' const { proxy } = getCurrentInstance() -const { deal_type, account_type, deal_category } = proxy.useDict('deal_type', 'account_type', 'deal_category') const personList = ref([]) const healthRecordList = ref([]) - +const { doctor_type, cost_type, check_type, package_unit, nursing_type, mar_type } = proxy.useDict( + 'doctor_type', + 'cost_type', + 'check_type', + 'package_unit', + 'nursing_type', + 'mar_type' +) const dateValue = ref({ startYear: 2000, endYear: new Date().getFullYear() }) const showYearValue = ref({ startShowYear: '', endShowYear: '' }) const updateStatisticYear = (startYear, endYear) => { @@ -234,7 +277,7 @@ const dates = [{ value: 1, label: '日' }] const accountsList = ref([]) const loading = ref(true) const total = ref(0) -const radioVal = ref('用药次数柱状图') +const radioVal = ref('就医明细统计') const dateValidate = (rules, value, callback) => { const dateType = rules.dateType || 'days' const num = rules.num || 31 @@ -312,9 +355,9 @@ function getPersonList() { } const today = new Date() -const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) -const start = dayjs(end).add(-60, 'day') -queryParams.value.time = [start, end] +// const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) +// const start = dayjs(end).add(-60, 'day') +// queryParams.value.time = [start, end] const handleTimeChange = (type) => { queryParams.value.time = null if (type === 1) { @@ -362,7 +405,7 @@ const calendarChange = (val) => { if (val[1]) firstChooseDate.value = '' } -const mar = ref({}) +const doctor = ref({}) const chartData = ref({ name: [], value1: [] @@ -387,16 +430,16 @@ function getList() { id, recordId } - getMarAnalysis(params).then((response) => { + getDoctorAnalysis(params).then((response) => { loading.value = false - mar.value = { ...response.data } - mar.value.marList.map((item) => { + doctor.value = { ...response.data } + doctor.value.doctorCostList.map((item) => { return { name: item.time, value: item.value } }) - response.data.marList.map((item) => { + response.data.doctorCostList.map((item) => { chartData.value.name.push(item.time) chartData.value.value1.push(item.value) }) @@ -411,10 +454,10 @@ function handleQuery() { function resetQuery() { proxy.resetForm('queryRef') queryParams.value.id = null - const today = new Date() - const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) - const start = dayjs(end).add(-60, 'day') - queryParams.value.time = [start, end] + // const today = new Date() + // const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) + // const start = dayjs(end).add(-60, 'day') + // queryParams.value.time = [start, end] total.value = 0 getPersonList() } @@ -440,7 +483,7 @@ const drawBar = (data) => { type: 'shadow' }, formatter: function (params) { - return params[0].name + '
' + '用药:' + params[0].value + '次' + return params[0].name + '
' + '费用:' + params[0].value + '元' } }, grid: { @@ -470,7 +513,7 @@ const drawBar = (data) => { type: 'value', // min: 1, // 设置 y 轴的最小值为 0 // max: 16, // 设置 y 轴的最大值为 100 - interval: 1, //设置y轴刻度间隔 + // interval: 1, //设置y轴刻度间隔 axisTick: { show: true // 默认为true,如果要隐藏,则改为 false }, @@ -491,18 +534,7 @@ const drawBar = (data) => { itemStyle: { // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 color: function (params) { - // 这里可以根据需要设置不同的颜色,比如根据数据值 - if (params.data < 4) { - return '#37b328' - } else if (params.data >= 4 && params.data < 8) { - return '#ff00ff' - } else if (params.data >= 8 && params.data < 12) { - return '#ff0066' - } else if (params.data >= 12 && params.data < 15) { - return '#ff0000' - } else if (params.data >= 15) { - return '#990000' // 数据在50到99之间为蓝色 - } + return '#2283cf' // 数据在50到99之间为蓝色 } } } @@ -540,7 +572,7 @@ const drawLine = (data) => { type: 'shadow' }, formatter: function (params) { - return params[0].name + '
' + '用药:' + params[0].value + '次' + return params[0].name + '
' + '费用:' + params[0].value + '元' } }, xAxis: { @@ -559,8 +591,8 @@ const drawLine = (data) => { yAxis: { type: 'value', // min: 1, // 设置 y 轴的最小值为 0 - // max: 16, // 设置 y 轴的最大值为 100 - interval: 1, //设置y轴刻度间隔 + // // max: 16, // 设置 y 轴的最大值为 100 + // interval: 1, //设置y轴刻度间隔 axisTick: { show: true }, @@ -582,18 +614,7 @@ const drawLine = (data) => { itemStyle: { // 此处可以是一个固定颜色值,也可以是一个回调函数根据数据动态计算颜色 color: function (params) { - // 这里可以根据需要设置不同的颜色,比如根据数据值 - if (params.data < 4) { - return '#37b328' - } else if (params.data >= 4 && params.data < 8) { - return '#ff00ff' - } else if (params.data >= 8 && params.data < 12) { - return '#ff0066' - } else if (params.data >= 12 && params.data < 15) { - return '#ff0000' - } else if (params.data >= 15) { - return '#990000' // 数据在50到99之间为蓝色 - } + return '#2283cf' // 数据在50到99之间为蓝色 } }, smooth: true, @@ -626,14 +647,14 @@ const drawLine = (data) => { myChart.setOption(option) } -const currentType = ref('用药次数柱状图') +const currentType = ref('就医费用柱状图') const handleRadioChange = (type) => { currentType.value = type switch (type) { - case '用药次数柱状图': + case '就医费用柱状图': drawBar(chartData.value) break - case '用药次数折线图': + case '就医费用折线图': drawLine(chartData.value) break default: diff --git a/src/views/health/healthAnalysis/index.vue b/src/views/health/healthAnalysis/index.vue index 291276f..b110d8c 100644 --- a/src/views/health/healthAnalysis/index.vue +++ b/src/views/health/healthAnalysis/index.vue @@ -12,7 +12,7 @@
-
档案总数
+
档案数量
{{ healthRecordCount }}
@@ -127,7 +127,7 @@
-
档案份数
+
档案数量
{{ item.healthRecordCount }}
diff --git a/src/views/health/healthRecord/index.vue b/src/views/health/healthRecord/index.vue index f1e1290..0d667b1 100644 --- a/src/views/health/healthRecord/index.vue +++ b/src/views/health/healthRecord/index.vue @@ -61,7 +61,7 @@ - +