Browse Source

诊疗统计(病种、体系)

newMaster
1747191978@qq.com 4 months ago
parent
commit
a2365847d9
  1. 81
      acupuncture-前台/src/views/indexCom/JM.vue
  2. 71
      acupuncture-前台/src/views/indexCom/index.js

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

@ -16,12 +16,12 @@
<div style="flex: 1">
<el-card shadow="always">
<div class="dis title-box">
<span class="header-title">分布</span>
<span class="header-title">分布</span>
<div class="dis">
</div>
</div>
<div style="height: 300px" v-loading="loading">
<!-- <div id="gender" style="width: 100%"></div> -->
<div id="system" style="width: 100%"></div>
</div>
</el-card>
</div>
@ -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");

71
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 +=
"<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 HZXXSJFX = {
tooltip: {

Loading…
Cancel
Save