|
|
@ -44,7 +44,8 @@ export default { |
|
|
|
await this.getData(this.hospitalId); |
|
|
|
// 绘制图表 |
|
|
|
var option = { |
|
|
|
legend: { data: ['新建', '数据收集按时完成', '数据收集中', '废弃', '数据收集超时'] }, |
|
|
|
// legend: { data: ['新建', '数据收集按时完成', '数据收集中', '废弃', '数据收集超时'] }, |
|
|
|
legend: { data: ['新建', '数据收集按时完成', '数据收集中'] }, |
|
|
|
xAxis: [ |
|
|
|
{ |
|
|
|
axisLabel: { |
|
|
@ -189,68 +190,68 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '废弃', |
|
|
|
type: 'bar', |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: this.dList, |
|
|
|
barWidth: this.widthNum > 550 ? 20 : 10, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#f00' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#F00' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#F00' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#F00' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '数据收集超时', |
|
|
|
type: 'bar', |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: this.eList, |
|
|
|
barWidth: this.widthNum > 550 ? 20 : 10, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#F5D041' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#FF9000' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#F5D041' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#FF9000' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
// { |
|
|
|
// name: '废弃', |
|
|
|
// type: 'bar', |
|
|
|
// // label: labelOption, |
|
|
|
// emphasis: { focus: 'series' }, |
|
|
|
// data: this.dList, |
|
|
|
// barWidth: this.widthNum > 550 ? 20 : 10, |
|
|
|
// itemStyle: { |
|
|
|
// normal: { |
|
|
|
// label: { |
|
|
|
// formatter: '{c}', |
|
|
|
// show: true, |
|
|
|
// position: 'top', |
|
|
|
// textStyle: { |
|
|
|
// fontSize: '12', |
|
|
|
// color: '#000', |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
// { offset: 0, color: '#f00' }, //柱图渐变色 |
|
|
|
// { offset: 1, color: '#F00' }, //柱图渐变色 |
|
|
|
// ]), |
|
|
|
// }, |
|
|
|
// emphasis: { |
|
|
|
// color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
// { offset: 0, color: '#F00' }, //柱图高亮渐变色 |
|
|
|
// { offset: 1, color: '#F00' }, //柱图高亮渐变色 |
|
|
|
// ]), |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// name: '数据收集超时', |
|
|
|
// type: 'bar', |
|
|
|
// // label: labelOption, |
|
|
|
// emphasis: { focus: 'series' }, |
|
|
|
// data: this.eList, |
|
|
|
// barWidth: this.widthNum > 550 ? 20 : 10, |
|
|
|
// itemStyle: { |
|
|
|
// normal: { |
|
|
|
// label: { |
|
|
|
// formatter: '{c}', |
|
|
|
// show: true, |
|
|
|
// position: 'top', |
|
|
|
// textStyle: { |
|
|
|
// fontSize: '12', |
|
|
|
// color: '#000', |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
// { offset: 0, color: '#F5D041' }, //柱图渐变色 |
|
|
|
// { offset: 1, color: '#FF9000' }, //柱图渐变色 |
|
|
|
// ]), |
|
|
|
// }, |
|
|
|
// emphasis: { |
|
|
|
// color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
// { offset: 0, color: '#F5D041' }, //柱图高亮渐变色 |
|
|
|
// { offset: 1, color: '#FF9000' }, //柱图高亮渐变色 |
|
|
|
// ]), |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
], |
|
|
|
}; |
|
|
|
myChart.setOption(option); |
|
|
|