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"> <div style="flex: 1">
<el-card shadow="always"> <el-card shadow="always">
<div class="dis title-box"> <div class="dis title-box">
<span class="header-title">分布</span> <span class="header-title">分布</span>
<div class="dis"> <div class="dis">
</div> </div>
</div> </div>
<div style="height: 300px" v-loading="loading"> <div style="height: 300px" v-loading="loading">
<!-- <div id="gender" style="width: 100%"></div> --> <div id="system" style="width: 100%"></div>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -38,7 +38,8 @@
zlInfo zlInfo
} from "@/api/indexCom.js"; } from "@/api/indexCom.js";
import { import {
diagnoseEcharts diagnoseEcharts,
systemEcharts
} from "./index"; } from "./index";
export default { export default {
name: "Post", name: "Post",
@ -47,32 +48,25 @@
data() { data() {
return { return {
loading: false, loading: false,
diagnoseValue: null, // diagnoseValue: null, //
systemValue: null, //
queryParams: { queryParams: {
param: { param: {
startTime: "", startTime: "",
endTime: "", endTime: "",
}, },
}, },
jwbzObj: { //
"gxy": "高血压", // systemObj: {
"nxgb": "脑血管病", // "yxfpz": "隐形肥胖型", //
"exzl": "恶性肿瘤", // "zfgdx": "脂肪过多型", //
"gxb": "冠心病", // "fpx": "肥胖型", //
"jsjb": "精神疾病", // "jrbzx": "肌肉不足型", //
"whsezcky": "胃和十二指肠溃疡", // "jkjcx": "健康匀称型", //
"fpz": "肥胖症", // "czjrx": "超重肌肉型", //
"gzssz": "骨质疏松症", // "xsx": "消瘦型", //
"ycxXtxjb": "遗传性、先天性疾病", // "dzfx": "低脂肪型", //
"tnb": "糖尿病", //尿 "ydyx": "运动员型", //
"mxfxjb": "慢性肺系疾病", //
"gzxz": "高脂血症", //
"gzjb": "肝脏疾病", //
"gmxjb": "过敏性疾病", //
"gjy": "关节炎", //
"tf": "痛风", //
"sySb": "肾炎、肾病", //
"other": "其他" //
} }
}; };
}, },
@ -90,24 +84,40 @@
async getData() { async getData() {
try { try {
await zlInfo(this.queryParams).then((res) => { 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.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; this.loading = false;
} catch (e) {} } catch (e) {}
}, },
// //
handleDiagnose() { handleDiagnose() {
diagnoseEcharts.series[0].data = this.diagnoseValue?.map((item) => { diagnoseEcharts.series[0].data = this.diagnoseValue?.map((item) => {
return item.total; return item.total;
}); });
diagnoseEcharts.yAxis.data = this.diagnoseValue?.map((item) => { diagnoseEcharts.yAxis.data = this.diagnoseValue?.map((item) => {
return item.type; return item.type;
}); });
console.log('diagnoseEcharts',diagnoseEcharts)
this.$nextTick(() => { this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("diagnose"), null, { var myChart = echarts.init(document.getElementById("diagnose"), null, {
height: 300, height: 300,
@ -117,6 +127,23 @@
window.onresize = myChart.resize; 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) { initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD"); _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"; import * as echarts from "echarts";
// 患者信息统计 // -------- 患者信息统计 --------
// 患者总数 // 患者总数
export const HZXX = { export const HZXX = {
tooltip: { tooltip: {
@ -220,6 +220,8 @@ export const diseaseEcharts = {
], ],
}; };
// -------- 诊疗信息统计 --------
// 病种
export const diagnoseEcharts = { export const diagnoseEcharts = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
@ -257,8 +259,8 @@ export const diagnoseEcharts = {
}, },
grid: { grid: {
top: "12%", top: "12%",
left: "3%", left: "1%",
right: "12%", right: "14%",
bottom: "0%", bottom: "0%",
containLabel: true, 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 = { export const HZXXSJFX = {
tooltip: { tooltip: {

Loading…
Cancel
Save