From d292d4dda6c4ca056f17b7c2ba108706bfaa1efd Mon Sep 17 00:00:00 2001
From: "1747191978@qq.com" <1942943850@qq.com>
Date: Tue, 18 Feb 2025 09:58:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B2=BB=E7=96=97=E7=BB=9F=E8=AE=A1=EF=BC=88?=
=?UTF-8?q?=E6=B2=BB=E7=96=97=E7=B1=BB=E5=9E=8B=E3=80=81=E6=B2=BB=E7=96=97?=
=?UTF-8?q?=E6=95=88=E6=9E=9C=E3=80=81=E6=B2=BB=E7=96=97=E8=B4=B9=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
acupuncture-前台/src/views/indexCom/XGZL.vue | 85 ++++++++++++++------
acupuncture-前台/src/views/indexCom/index.js | 63 ++++++++++++++-
2 files changed, 122 insertions(+), 26 deletions(-)
diff --git a/acupuncture-前台/src/views/indexCom/XGZL.vue b/acupuncture-前台/src/views/indexCom/XGZL.vue
index 0872908b..acbc6125 100644
--- a/acupuncture-前台/src/views/indexCom/XGZL.vue
+++ b/acupuncture-前台/src/views/indexCom/XGZL.vue
@@ -81,6 +81,25 @@
+
@@ -94,7 +113,8 @@
import {
healTypeEcharts,
diseaseMethodEcharts,
- effectEcharts
+ effectEcharts,
+ costEcharts
} from "./index";
export default {
name: "Post",
@@ -112,11 +132,12 @@
healTypeValue: null, // 治疗类型
diseaseMethod: null, // 病种方法
effectValue: null, // 治疗效果
- effectObj:{
- "zy":"治愈",//治愈
- "xx":"显效",//显效
- "hz":"好转",//好转
- "wx":"无效"//无效
+ costValue: null, //治疗效果
+ effectObj: {
+ "zy": "治愈", //治愈
+ "xx": "显效", //显效
+ "hz": "好转", //好转
+ "wx": "无效" //无效
}
};
},
@@ -162,27 +183,29 @@
// index ++
// }
// this.handleDiseaseMethod()
-
+
// 治疗效果
- this.effectValue = [
- {
- name: '治愈',
- value: zlxwfb.zy
- },
- {
- name: '显效',
- value: zlxwfb.xx
- },
- {
- name: '好转',
- value: zlxwfb.hz
- },
- {
- name: '无效',
- value: zlxwfb.wx
- }
- ]
+ this.effectValue = [{
+ name: '治愈',
+ value: zlxwfb.zy
+ },
+ {
+ name: '显效',
+ value: zlxwfb.xx
+ },
+ {
+ name: '好转',
+ value: zlxwfb.hz
+ },
+ {
+ name: '无效',
+ value: zlxwfb.wx
+ }
+ ]
this.handleEffect()
+ // 治疗费用
+ this.costValue =[zlfy.score1,zlfy.score2,zlfy.score3,zlfy.score4,zlfy.score5]
+ this.handleCost()
});
this.loading = false;
} catch (e) {}
@@ -223,6 +246,18 @@
window.onresize = myChart.resize;
});
},
+ // 治疗费用
+ handleCost() {
+ costEcharts.series[0].data = this.costValue
+ this.$nextTick(() => {
+ var myChart = echarts.init(document.getElementById("cost"), null, {
+ height: 300,
+ });
+ myChart.setOption(costEcharts, 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 e3613111..f538b732 100644
--- a/acupuncture-前台/src/views/indexCom/index.js
+++ b/acupuncture-前台/src/views/indexCom/index.js
@@ -728,7 +728,68 @@ export const effectEcharts = {
},
],
};
-
+// 诊疗费
+export const costEcharts = {
+ 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: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'],
+ },
+ 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, //柱图宽度
+ itemStyle: {
+ normal: {
+ //这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
+ barBorderRadius: [50, 50, 0, 0],
+ },
+ },
+ },
+
+ ],
+};
// 患者信息 - 数据分析
export const HZXXSJFX = {