diff --git a/acupuncture-前台/src/views/indexCom/JM.vue b/acupuncture-前台/src/views/indexCom/JM.vue
index 2d53d970..d92089d3 100644
--- a/acupuncture-前台/src/views/indexCom/JM.vue
+++ b/acupuncture-前台/src/views/indexCom/JM.vue
@@ -92,6 +92,7 @@ import {
physiqueEcharts,
postureEcharts,
agrypniaEcharts,
+ anxietyEcharts,
} from "./index";
export default {
name: "Post",
@@ -112,7 +113,7 @@ export default {
physiqueValue: null, // 体质
postureValue: null, // 体态
agrypniaValue: null, // 失眠
-
+ anxietyValue: null, // 焦虑
// 体系中文
systemObj: {
yxfpz: "隐形肥胖型", //隐形肥胖型
@@ -209,6 +210,12 @@ export default {
this.agrypniaValue.push(smfb[key]);
}
this.handleAgrypnia();
+ // 焦虑度
+ this.anxietyValue = [];
+ for (let key in jlfb) {
+ this.anxietyValue.push(jlfb[key]);
+ }
+ this.handleAnxiety();
});
this.loading = false;
} catch (e) {}
@@ -285,10 +292,8 @@ export default {
endTime: _data[1] + " " + "23:59:59",
};
},
- // 体质
+ // 失眠评估
handleAgrypnia() {
- console.log("this.agrypniaValue", this.agrypniaValue);
-
agrypniaEcharts.series[0].data = this.agrypniaValue;
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("agrypnia"), null, {
@@ -299,6 +304,18 @@ export default {
window.onresize = myChart.resize;
});
},
+ // 焦虑评估
+ handleAnxiety() {
+ anxietyEcharts.series[0].data = this.anxietyValue;
+ this.$nextTick(() => {
+ var myChart = echarts.init(document.getElementById("anxiety"), null, {
+ height: 300,
+ });
+ myChart.setOption(anxietyEcharts, true);
+ myChart.resize();
+ window.onresize = myChart.resize;
+ });
+ },
// 重新渲染图标
getRenew() {
this.Linepatient();
diff --git a/acupuncture-前台/src/views/indexCom/index.js b/acupuncture-前台/src/views/indexCom/index.js
index 347d88c2..93cd4a03 100644
--- a/acupuncture-前台/src/views/indexCom/index.js
+++ b/acupuncture-前台/src/views/indexCom/index.js
@@ -509,6 +509,70 @@ export const agrypniaEcharts = {
],
};
+// 焦虑度
+export const anxietyEcharts = {
+ 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: ['<8分', '8~20分','21~35分','>35分'],
+
+ },
+ 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: {