|
@@ -50,7 +50,12 @@ function initConsole(result){
|
|
|
'本月不合格病历-机器':require("../images/icon7.png"),
|
|
|
'本月质控数-机器':require("../images/icon10.png"),
|
|
|
'本月甲级病历-机器':require("../images/icon8.png"),
|
|
|
- '本月乙级病历-机器':require("../images/icon9.png")
|
|
|
+ '本月乙级病历-机器':require("../images/icon9.png"),
|
|
|
+ '本年病历数':require("../images/icon6.png"),
|
|
|
+ '本年不合格病历-机器':require("../images/icon7.png"),
|
|
|
+ '本年质控数-机器':require("../images/icon10.png"),
|
|
|
+ '本年甲级病历-机器':require("../images/icon8.png"),
|
|
|
+ '本年乙级病历-机器':require("../images/icon9.png"),
|
|
|
}
|
|
|
let dom = ''
|
|
|
for(let i in result){
|
|
@@ -121,6 +126,7 @@ function getBarData(type){
|
|
|
//柱状图住院费用
|
|
|
function barChartPay(dataX,dataY){
|
|
|
var myCharts = echarts.init(document.getElementById('barChartPay'));
|
|
|
+ var lengthNum = dataX.length;
|
|
|
$(window).resize(function(){
|
|
|
myCharts.resize()
|
|
|
});
|
|
@@ -148,7 +154,8 @@ function barChartPay(dataX,dataY){
|
|
|
axisLabel: {//x轴刻度
|
|
|
textStyle: {
|
|
|
color: '#333'
|
|
|
- }
|
|
|
+ },
|
|
|
+ rotate:lengthNum>8?30:0
|
|
|
},
|
|
|
axisLine: {//x轴
|
|
|
lineStyle:{
|
|
@@ -193,7 +200,7 @@ function barChartPay(dataX,dataY){
|
|
|
{
|
|
|
name: '平均住院费用',
|
|
|
type: 'bar',
|
|
|
- barWidth: '6%',
|
|
|
+ barWidth: lengthNum<5?'8%':'23%',
|
|
|
data: dataY
|
|
|
}
|
|
|
]
|
|
@@ -203,6 +210,7 @@ function barChartPay(dataX,dataY){
|
|
|
//柱状图住院日期
|
|
|
function barChart(dataX,dataY){
|
|
|
var myChart = echarts.init(document.getElementById('barChart'));
|
|
|
+ var lengthNum = dataX.length;
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
|
});
|
|
@@ -230,7 +238,8 @@ function barChart(dataX,dataY){
|
|
|
axisLabel: {//x轴刻度
|
|
|
textStyle: {
|
|
|
color: '#333'
|
|
|
- }
|
|
|
+ },
|
|
|
+ rotate:lengthNum>8?30:0
|
|
|
},
|
|
|
axisLine: {//x轴
|
|
|
lineStyle:{
|
|
@@ -275,7 +284,7 @@ function barChart(dataX,dataY){
|
|
|
{
|
|
|
name: '平均住院日',
|
|
|
type: 'bar',
|
|
|
- barWidth: '6%',
|
|
|
+ barWidth: lengthNum<5?'8%':'23%',
|
|
|
data: dataY
|
|
|
}
|
|
|
]
|
|
@@ -285,7 +294,6 @@ function barChart(dataX,dataY){
|
|
|
}
|
|
|
//空心饼图
|
|
|
function emptyCircle(data){
|
|
|
- if(!data||data.length == 0)return
|
|
|
var myChart = echarts.init(document.getElementById('emptyCircle'));
|
|
|
$(window).resize(function(){
|
|
|
myChart.resize()
|
|
@@ -302,7 +310,7 @@ function emptyCircle(data){
|
|
|
backgroundColor: bgColor,
|
|
|
color: color,
|
|
|
title: [{
|
|
|
- text: '{val|' + total + '}\n{name|' + title + '}',
|
|
|
+ text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
|
|
|
top: 'center',
|
|
|
left: 'center',
|
|
|
textStyle: {
|