Browse Source

治疗统计(治疗类型、治疗效果、治疗费用

newMaster
1747191978@qq.com 4 months ago
parent
commit
d292d4dda6
  1. 85
      acupuncture-前台/src/views/indexCom/XGZL.vue
  2. 63
      acupuncture-前台/src/views/indexCom/index.js

85
acupuncture-前台/src/views/indexCom/XGZL.vue

@ -81,6 +81,25 @@
</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="cost" style="width: 100%"></div>
</div>
</el-card>
</div>
<div style="flex: 1">
</div>
</div>
</div>
</div>
</template>
@ -94,7 +113,8 @@
import {
healTypeEcharts,
diseaseMethodEcharts,
effectEcharts
effectEcharts,
costEcharts
} from "./index";
export default {
name: "Post",
@ -112,11 +132,12 @@
healTypeValue: null, //
diseaseMethod: null, //
effectValue: null, //
effectObj:{
"zy":"治愈",//
"xx":"显效",//
"hz":"好转",//
"wx":"无效"//
costValue: null, //
effectObj: {
"zy": "治愈", //
"xx": "显效", //
"hz": "好转", //
"wx": "无效" //
}
};
},
@ -162,27 +183,29 @@
// index ++
// }
// this.handleDiseaseMethod()
//
this.effectValue = [
{
name: '治愈',
value: zlxwfb.zy
},
{
name: '显效',
value: zlxwfb.xx
},
{
name: '好转',
value: zlxwfb.hz
},
{
name: '无效',
value: zlxwfb.wx
}
]
this.effectValue = [{
name: '治愈',
value: zlxwfb.zy
},
{
name: '显效',
value: zlxwfb.xx
},
{
name: '好转',
value: zlxwfb.hz
},
{
name: '无效',
value: zlxwfb.wx
}
]
this.handleEffect()
//
this.costValue =[zlfy.score1,zlfy.score2,zlfy.score3,zlfy.score4,zlfy.score5]
this.handleCost()
});
this.loading = false;
} catch (e) {}
@ -223,6 +246,18 @@
window.onresize = myChart.resize;
});
},
//
handleCost() {
costEcharts.series[0].data = this.costValue
this.$nextTick(() => {
var myChart = echarts.init(document.getElementById("cost"), null, {
height: 300,
});
myChart.setOption(costEcharts, true);
myChart.resize();
window.onresize = myChart.resize;
});
},
//
initial(_data, _type) {
_data[0] = this.$moment(_data[0]).format("YYYY-MM-DD");

63
acupuncture-前台/src/views/indexCom/index.js

@ -728,7 +728,68 @@ export const effectEcharts = {
},
],
};
// 诊疗费
export const costEcharts = {
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: ['<300元','300 ~ 900元','900 ~ 2000元','2000 ~ 5000元','>5000元'],
},
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, //柱图宽度
itemStyle: {
normal: {
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
barBorderRadius: [50, 50, 0, 0],
},
},
},
],
};
// 患者信息 - 数据分析
export const HZXXSJFX = {

Loading…
Cancel
Save