Browse Source

诊疗统计不包含失眠焦虑

newMaster
1747191978@qq.com 4 months ago
parent
commit
a048b1b1f0
  1. 139
      acupuncture-前台/src/views/indexCom/JM.vue
  2. 103
      acupuncture-前台/src/views/indexCom/index.js
  3. 2
      acupuncture-前台/src/views/indexCom/patient.vue

139
acupuncture-前台/src/views/indexCom/JM.vue

@ -27,6 +27,60 @@
</div> </div>
</div> </div>
</div> </div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体质分布</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="physique" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">体态评估TAPS</span>
<div class="dis">
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="posture" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
<div class="app-container">
<div class="dis" style="width: 100%">
<div style="flex: 1; margin-right: 20px">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">失眠评估PHQ-9</span>
<div class="dis"></div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="agrypnia" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">焦虑HAMD-24</span>
<div class="dis">
</div>
</div>
<div style="height: 300px" v-loading="loading">
<div id="anxiety" style="width: 100%"></div>
</div>
</el-card>
</div>
</div>
</div>
</div> </div>
</template> </template>
@ -39,7 +93,9 @@
} from "@/api/indexCom.js"; } from "@/api/indexCom.js";
import { import {
diagnoseEcharts, diagnoseEcharts,
systemEcharts systemEcharts,
physiqueEcharts,
postureEcharts
} from "./index"; } from "./index";
export default { export default {
name: "Post", name: "Post",
@ -47,15 +103,18 @@
mixins: [resize], mixins: [resize],
data() { data() {
return { return {
loading: false,
diagnoseValue: null, //
systemValue: null, //
queryParams: { queryParams: {
param: { param: {
startTime: "", startTime: "",
endTime: "", endTime: "",
}, },
}, },
loading: false,
diagnoseValue: null, //
systemValue: null, //
physiqueValue: null, //
postureValue:null, //
// //
systemObj: { systemObj: {
"yxfpz": "隐形肥胖型", // "yxfpz": "隐形肥胖型", //
@ -67,7 +126,19 @@
"xsx": "消瘦型", // "xsx": "消瘦型", //
"dzfx": "低脂肪型", // "dzfx": "低脂肪型", //
"ydyx": "运动员型", // "ydyx": "运动员型", //
} },
//
physiqueObj: {
"phz": "平和质", //
"qxz": "气虚质", //
"yangxz": "阳虚质", //
"yinxz": "阴虚质", //
"tsz": "痰湿质", //湿
"srz": "湿热质", //湿
"xyz": "血瘀质", //
"qyz": "气郁质", //
"tlz": "特禀质", //
},
}; };
}, },
created() { created() {
@ -106,6 +177,35 @@
this.systemValue.push(data) this.systemValue.push(data)
} }
this.handleSystem() 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; this.loading = false;
} catch (e) {} } catch (e) {}
@ -144,6 +244,35 @@
window.onresize = myChart.resize; 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) { initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD"); _data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");

103
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 +=
"<br/>" +
`<span style="background:${params[i].color};width:12px;display:inline-block;height:12px;border-radius:50%;margin-right:5px;"></span>` +
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 = { export const HZXXSJFX = {
tooltip: { tooltip: {

2
acupuncture-前台/src/views/indexCom/patient.vue

@ -158,7 +158,7 @@
{ {
value: res.data.totalPatients, value: res.data.totalPatients,
name: "女" name: "女"
}, }
]; ];
// //
let ageValue = res.data.age let ageValue = res.data.age

Loading…
Cancel
Save