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 @@
+
+
@@ -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