From c3f66939368391545754dfbf0956c5e1662cc6d3 Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 17 Feb 2025 16:28:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AF=8A=E7=96=97=E7=97=85=E7=A7=8D?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acupuncture-前台/src/api/indexCom.js | 7 + acupuncture-前台/src/views/index.vue | 12 +- acupuncture-前台/src/views/indexCom/JM.vue | 490 +++++++----------- acupuncture-前台/src/views/indexCom/index.js | 59 +++ .../src/views/indexCom/patient.vue | 4 +- 5 files changed, 274 insertions(+), 298 deletions(-) diff --git a/acupuncture-前台/src/api/indexCom.js b/acupuncture-前台/src/api/indexCom.js index 1b647a5f..4c77e047 100644 --- a/acupuncture-前台/src/api/indexCom.js +++ b/acupuncture-前台/src/api/indexCom.js @@ -114,5 +114,12 @@ export function patientTotal(data) { }); } // 诊疗信息 +export function zlInfo(data) { + return request({ + url: "/statistics/zlInfo", + method: "post", + data: data, + }); +} // 治疗类型 // 随访分布 diff --git a/acupuncture-前台/src/views/index.vue b/acupuncture-前台/src/views/index.vue index 9ff9269a..ed5f9388 100644 --- a/acupuncture-前台/src/views/index.vue +++ b/acupuncture-前台/src/views/index.vue @@ -17,13 +17,13 @@ -
+
@@ -69,9 +69,9 @@ export default { }, methods: { resize() { - this.$refs.patient.getRenew(); - this.$refs.JM.getRenew(); - this.$refs.XGZL.getRenew(); + // this.$refs.patient.getRenew(); + // this.$refs.JM.getRenew(); + // this.$refs.XGZL.getRenew(); }, // 周 月 季 年 radioChange(_data, _type, _timeType) { diff --git a/acupuncture-前台/src/views/indexCom/JM.vue b/acupuncture-前台/src/views/indexCom/JM.vue index 7fc5360f..1894741f 100644 --- a/acupuncture-前台/src/views/indexCom/JM.vue +++ b/acupuncture-前台/src/views/indexCom/JM.vue @@ -1,296 +1,206 @@ - + >>>.el-card__body { + padding: 10px 0 !important; + } + + .dis { + display: flex; + } + + .header-title { + font-size: 18px; + } + + .title-box { + padding: 10px 20px; + border-bottom: 1px solid #dfe6ec; + } + + .dian-box { + align-items: center; + } + + .dian { + display: inline-block; + width: 16px; + height: 16px; + border-radius: 50%; + margin: 0 10px; + } + + .title-box { + justify-content: space-between; + } + + .>>>.el-radio--small.is-bordered { + margin-right: 20px !important; + margin-left: 0 !important; + } + + >>>.el-radio__input { + display: none; + } + + >>>.el-radio__label { + padding-left: 5px; + } + + .app-container { + padding: 0; + display: flex; + justify-content: space-between; + } + + .title { + display: flex; + align-items: center; + font-size: 20px; + font-weight: 600; + } + + .title-bor { + display: inline-block; + height: 20px; + width: 6px; + background: #4f8bff; + margin-right: 10px; + border-radius: 8px; + } + \ No newline at end of file diff --git a/acupuncture-前台/src/views/indexCom/index.js b/acupuncture-前台/src/views/indexCom/index.js index 658574d9..f79be0c5 100644 --- a/acupuncture-前台/src/views/indexCom/index.js +++ b/acupuncture-前台/src/views/indexCom/index.js @@ -1,4 +1,5 @@ import * as echarts from "echarts"; +// 患者信息统计 // 患者总数 export const HZXX = { tooltip: { @@ -218,6 +219,64 @@ export const diseaseEcharts = { ], }; + +export const diagnoseEcharts = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + label: { + backgroundColor: "#6a7985", + }, + }, + formatter: function (params) { + let res1 = params[0].name; + for (var i = 0, l = params.length; i < l; i++) { + res1 += + "
" + + `` + + params[i].seriesName + + " : " + + params[i].value + + "个"; + } + return res1; + }, + }, + xAxis: { + name: "数量( 个 )", + type: "value", + minInterval: 1, + splitLine: { + show: true, + lineStyle: { + type: "dashed", + }, + }, + + }, + grid: { + top: "12%", + left: "3%", + right: "12%", + bottom: "0%", + containLabel: true, + }, + yAxis: { + type: "category", + data: [], + }, + series: [ + { + name: "数量:", + data: [], + type: "bar", + barMaxWidth: 24, //柱图宽度 + color: "#4f8bff", + }, + + ], +}; // 患者信息 - 数据分析 export const HZXXSJFX = { tooltip: { diff --git a/acupuncture-前台/src/views/indexCom/patient.vue b/acupuncture-前台/src/views/indexCom/patient.vue index 722ac98a..bf1c3591 100644 --- a/acupuncture-前台/src/views/indexCom/patient.vue +++ b/acupuncture-前台/src/views/indexCom/patient.vue @@ -249,8 +249,8 @@ }, // 重新渲染图标 getRenew() { - this.Linepatient(); - this.columnar(); + // this.Linepatient(); + // this.columnar(); }, }, }; From a2365847d96d4e82bbdf0a120eb6ff2df398e843 Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 17 Feb 2025 16:47:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=8A=E7=96=97=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=EF=BC=88=E7=97=85=E7=A7=8D=E3=80=81=E4=BD=93=E7=B3=BB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acupuncture-前台/src/views/indexCom/JM.vue | 81 +++++++++++++------- acupuncture-前台/src/views/indexCom/index.js | 71 ++++++++++++++++- 2 files changed, 122 insertions(+), 30 deletions(-) diff --git a/acupuncture-前台/src/views/indexCom/JM.vue b/acupuncture-前台/src/views/indexCom/JM.vue index 1894741f..1b834c42 100644 --- a/acupuncture-前台/src/views/indexCom/JM.vue +++ b/acupuncture-前台/src/views/indexCom/JM.vue @@ -16,12 +16,12 @@
- 体型分布 + 体系分布
- +
@@ -38,7 +38,8 @@ zlInfo } from "@/api/indexCom.js"; import { - diagnoseEcharts + diagnoseEcharts, + systemEcharts } from "./index"; export default { name: "Post", @@ -47,32 +48,25 @@ data() { return { loading: false, - diagnoseValue: null, // 患者总数统计值 + diagnoseValue: null, // 病种 + systemValue: null, // 体系 queryParams: { param: { startTime: "", endTime: "", }, }, - jwbzObj: { - "gxy": "高血压", //高血压 - "nxgb": "脑血管病", //脑血管病 - "exzl": "恶性肿瘤", //恶性肿瘤 - "gxb": "冠心病", //冠心病 - "jsjb": "精神疾病", //精神疾病 - "whsezcky": "胃和十二指肠溃疡", //胃和十二指肠溃疡 - "fpz": "肥胖症", //肥胖症 - "gzssz": "骨质疏松症", //骨质疏松症 - "ycxXtxjb": "遗传性、先天性疾病", //遗传性、先天性疾病 - "tnb": "糖尿病", //糖尿病 - "mxfxjb": "慢性肺系疾病", //慢性肺系疾病 - "gzxz": "高脂血症", //高脂血症 - "gzjb": "肝脏疾病", //肝脏疾病 - "gmxjb": "过敏性疾病", //过敏性疾病 - "gjy": "关节炎", //关节炎 - "tf": "痛风", //痛风 - "sySb": "肾炎、肾病", //肾炎、肾病 - "other": "其他" //其他 + // 体系中文 + systemObj: { + "yxfpz": "隐形肥胖型", //隐形肥胖型 + "zfgdx": "脂肪过多型", //脂肪过多型 + "fpx": "肥胖型", //肥胖型 + "jrbzx": "肌肉不足型", //肌肉不足型 + "jkjcx": "健康匀称型", //健康匀称型 + "czjrx": "超重肌肉型", //超重肌肉型 + "xsx": "消瘦型", //消瘦型 + "dzfx": "低脂肪型", //低脂肪型 + "ydyx": "运动员型", //运动员型 } }; }, @@ -90,24 +84,40 @@ async getData() { try { await zlInfo(this.queryParams).then((res) => { - const {jlfb,smfb,sort,ttfb,txfb,zytz} = res.data + const { + jlfb, + smfb, + sort, + ttfb, + txfb, + zytz + } = res.data // 病种(主要诊断) - this.diagnoseValue = sort.sort((a, b) => a.total-b.total) + this.diagnoseValue = sort.sort((a, b) => a.total - b.total) this.handleDiagnose() + // 体系 + this.systemValue = [] + delete txfb.total + for (let key in txfb) { + let data = { + name: this.systemObj[key], + value: txfb[key] + } + this.systemValue.push(data) + } + this.handleSystem() }); this.loading = false; } catch (e) {} }, // 病种(主要诊断) handleDiagnose() { - diagnoseEcharts.series[0].data = this.diagnoseValue?.map((item) => { return item.total; }); diagnoseEcharts.yAxis.data = this.diagnoseValue?.map((item) => { return item.type; }); - console.log('diagnoseEcharts',diagnoseEcharts) this.$nextTick(() => { var myChart = echarts.init(document.getElementById("diagnose"), null, { height: 300, @@ -117,6 +127,23 @@ window.onresize = myChart.resize; }); }, + // 体系 + handleSystem() { + systemEcharts.series[0].data = this.systemValue?.map((item) => { + return item.value; + }); + systemEcharts.xAxis.data = this.systemValue?.map((item) => { + return item.name; + }); + this.$nextTick(() => { + var myChart = echarts.init(document.getElementById("system"), null, { + height: 300, + }); + myChart.setOption(systemEcharts, true); + myChart.resize(); + window.onresize = myChart.resize; + }); + }, // 数据处理 查询类型判断参数 initial(_data, _type) { _data[0] = this.$moment(_data[0]).format("YYYY-MM-DD"); diff --git a/acupuncture-前台/src/views/indexCom/index.js b/acupuncture-前台/src/views/indexCom/index.js index f79be0c5..c982a65c 100644 --- a/acupuncture-前台/src/views/indexCom/index.js +++ b/acupuncture-前台/src/views/indexCom/index.js @@ -1,5 +1,5 @@ import * as echarts from "echarts"; -// 患者信息统计 +// -------- 患者信息统计 -------- // 患者总数 export const HZXX = { tooltip: { @@ -220,6 +220,8 @@ export const diseaseEcharts = { ], }; +// -------- 诊疗信息统计 -------- +// 病种 export const diagnoseEcharts = { tooltip: { trigger: "axis", @@ -257,8 +259,8 @@ export const diagnoseEcharts = { }, grid: { top: "12%", - left: "3%", - right: "12%", + left: "1%", + right: "14%", bottom: "0%", containLabel: true, }, @@ -277,6 +279,69 @@ export const diagnoseEcharts = { ], }; +// 体系 +export const systemEcharts = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + label: { + backgroundColor: "#6a7985", + }, + }, + formatter: function (params) { + let res1 = params[0].name; + for (var i = 0, l = params.length; i < l; i++) { + res1 += + "
" + + `` + + params[i].seriesName + + " : " + + params[i].value + + "个"; + } + return res1; + }, + }, + xAxis: { + type: "category", + data: [], + }, + grid: { + top: "12%", + left: "5%", + right: "2%", + bottom: "0%", + containLabel: true, + }, + yAxis: { + name: "数量( 个 )", + type: "value", + minInterval: 1, + splitLine: { + show: true, + lineStyle: { + type: "dashed", + }, + }, + }, + series: [ + { + name: "数量:", + data: [], + type: "bar", + barMaxWidth: 24, //柱图宽度 + color: "#4f8bff", + itemStyle: { + normal: { + //这里设置柱形图圆角 [左上角,右上角,右下角,左下角] + barBorderRadius: [50, 50, 0, 0], + }, + }, + }, + + ], +}; // 患者信息 - 数据分析 export const HZXXSJFX = { tooltip: { From a048b1b1f05adb11dab0d23048db4cdeff07c2bf Mon Sep 17 00:00:00 2001 From: "1747191978@qq.com" <1942943850@qq.com> Date: Mon, 17 Feb 2025 18:04:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=8A=E7=96=97=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=B8=8D=E5=8C=85=E5=90=AB=E5=A4=B1=E7=9C=A0=E7=84=A6=E8=99=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acupuncture-前台/src/views/indexCom/JM.vue | 139 +++++++++++++++++- acupuncture-前台/src/views/indexCom/index.js | 103 +++++++++++++ .../src/views/indexCom/patient.vue | 2 +- 3 files changed, 238 insertions(+), 6 deletions(-) diff --git a/acupuncture-前台/src/views/indexCom/JM.vue b/acupuncture-前台/src/views/indexCom/JM.vue index 1b834c42..2c6c4ebe 100644 --- a/acupuncture-前台/src/views/indexCom/JM.vue +++ b/acupuncture-前台/src/views/indexCom/JM.vue @@ -27,6 +27,60 @@ +
+
+
+ +
+ 体质分布 +
+
+
+
+
+
+
+
+ +
+ 体态评估(TAPS) +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ 失眠评估(PHQ-9) +
+
+
+
+
+
+
+
+ +
+ 焦虑(HAMD-24) +
+
+
+
+
+
+
+
+
+
@@ -39,7 +93,9 @@ } from "@/api/indexCom.js"; import { diagnoseEcharts, - systemEcharts + systemEcharts, + physiqueEcharts, + postureEcharts } from "./index"; export default { name: "Post", @@ -47,15 +103,18 @@ mixins: [resize], data() { return { - loading: false, - diagnoseValue: null, // 病种 - systemValue: null, // 体系 queryParams: { param: { startTime: "", endTime: "", }, }, + loading: false, + diagnoseValue: null, // 病种 + systemValue: null, // 体系 + physiqueValue: null, // 体质 + postureValue:null, // 体态 + // 体系中文 systemObj: { "yxfpz": "隐形肥胖型", //隐形肥胖型 @@ -67,7 +126,19 @@ "xsx": "消瘦型", //消瘦型 "dzfx": "低脂肪型", //低脂肪型 "ydyx": "运动员型", //运动员型 - } + }, + // 体质 + physiqueObj: { + "phz": "平和质", //平和质 + "qxz": "气虚质", //气虚质 + "yangxz": "阳虚质", //阳虚质 + "yinxz": "阴虚质", //阴虚质 + "tsz": "痰湿质", //痰湿质 + "srz": "湿热质", //湿热质 + "xyz": "血瘀质", //血瘀质 + "qyz": "气郁质", //气郁质 + "tlz": "特禀质", //特禀质 + }, }; }, created() { @@ -106,6 +177,35 @@ this.systemValue.push(data) } this.handleSystem() + // 体质 + this.physiqueValue = [] + delete zytz.total + for (let key in zytz) { + let data = { + name: this.physiqueObj[key], + value: zytz[key], + } + this.physiqueValue.push(data) + } + this.handlePhysique() + // 体态 + this.postureValue = [{ + value: ttfb.score1, + name: "1分" + },{ + value: ttfb.score2, + name: "2分" + },{ + value: ttfb.score3, + name: "3分" + },{ + value: ttfb.score4, + name: "4分" + },{ + value: ttfb.score5, + name: "5分" + }] + this.handlePosture() }); this.loading = false; } catch (e) {} @@ -144,6 +244,35 @@ window.onresize = myChart.resize; }); }, + // 体质 + handlePhysique() { + physiqueEcharts.series[0].data = this.physiqueValue?.map((item) => { + return item.value; + }); + physiqueEcharts.xAxis.data = this.physiqueValue?.map((item) => { + return item.name; + }); + this.$nextTick(() => { + var myChart = echarts.init(document.getElementById("physique"), null, { + height: 300, + }); + myChart.setOption(physiqueEcharts, true); + myChart.resize(); + window.onresize = myChart.resize; + }); + }, + // 体态评估 + handlePosture() { + postureEcharts.series[0].data = this.postureValue + this.$nextTick(() => { + var myChart = echarts.init(document.getElementById("posture"), null, { + height: 300, + }); + myChart.setOption(postureEcharts, true); + myChart.resize(); + window.onresize = myChart.resize; + }); + }, // 数据处理 查询类型判断参数 initial(_data, _type) { _data[0] = this.$moment(_data[0]).format("YYYY-MM-DD"); diff --git a/acupuncture-前台/src/views/indexCom/index.js b/acupuncture-前台/src/views/indexCom/index.js index c982a65c..a23f45a3 100644 --- a/acupuncture-前台/src/views/indexCom/index.js +++ b/acupuncture-前台/src/views/indexCom/index.js @@ -342,6 +342,109 @@ export const systemEcharts = { ], }; +// 体质 +export const physiqueEcharts = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + label: { + backgroundColor: "#6a7985", + }, + }, + formatter: function (params) { + let res1 = params[0].name; + for (var i = 0, l = params.length; i < l; i++) { + res1 += + "
" + + `` + + params[i].seriesName + + " : " + + params[i].value + + "个"; + } + return res1; + }, + }, + xAxis: { + type: "category", + data: [], + }, + grid: { + top: "12%", + left: "5%", + right: "2%", + bottom: "0%", + containLabel: true, + }, + yAxis: { + name: "数量( 个 )", + type: "value", + minInterval: 1, + splitLine: { + show: true, + lineStyle: { + type: "dashed", + }, + }, + }, + series: [ + { + name: "数量:", + data: [], + type: "bar", + barMaxWidth: 24, //柱图宽度 + color: "#4f8bff", + itemStyle: { + normal: { + //这里设置柱形图圆角 [左上角,右上角,右下角,左下角] + barBorderRadius: [50, 50, 0, 0], + }, + }, + }, + + ], +}; +// 体态 +export const postureEcharts = { + tooltip: { + trigger: "item", + }, + title: { + text: "", + left: "center", + top: "40%", + textStyle: { + textAlign: "center", + color: "#393D4E", + fontSize: 40, + fontWeight: 600, + }, + }, + grid: { + top: "0%", + left: "0", + right: "0%", + bottom: "0%", + containLabel: true, + }, + color: ["#4f8bff", "#ffcd6c", "#00d1a1", "#a794fe","#EE6666"], + series: [ + { + type: "pie", + radius: "80%", + avoidLabelOverlap: false, + label: { + show: false, + position: "center", + }, + labelLine: { + show: false, + }, + data: [], + }, + ], +}; // 患者信息 - 数据分析 export const HZXXSJFX = { tooltip: { diff --git a/acupuncture-前台/src/views/indexCom/patient.vue b/acupuncture-前台/src/views/indexCom/patient.vue index bf1c3591..c1f31125 100644 --- a/acupuncture-前台/src/views/indexCom/patient.vue +++ b/acupuncture-前台/src/views/indexCom/patient.vue @@ -158,7 +158,7 @@ { value: res.data.totalPatients, name: "女" - }, + } ]; // 年龄分布 let ageValue = res.data.age