update 更换背景图 看板接口对接
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ref } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export const timeTab = [
|
||||
{
|
||||
@@ -18,6 +19,16 @@ export const timeTab = [
|
||||
value: '4',
|
||||
},
|
||||
];
|
||||
export const sexType = [
|
||||
{
|
||||
name: '男',
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
value: '1',
|
||||
},
|
||||
];
|
||||
|
||||
export function useSpin() {
|
||||
const spinning = ref(true);
|
||||
@@ -30,4 +41,110 @@ export function useSpin() {
|
||||
spinning,
|
||||
setSpin,
|
||||
};
|
||||
}
|
||||
|
||||
export const hospitalList = [
|
||||
{
|
||||
title: '兴隆医院',
|
||||
key: 'tangdu',
|
||||
},
|
||||
{
|
||||
title: '泾河医院',
|
||||
key: 'zhigong',
|
||||
},
|
||||
{
|
||||
title: '宁夏宝石花医院',
|
||||
key: 'yangehu',
|
||||
},
|
||||
{
|
||||
title: '庆阳医院',
|
||||
key: 'changan',
|
||||
},
|
||||
{
|
||||
title: '延安市人民医院',
|
||||
key: 'yananshi',
|
||||
},
|
||||
{
|
||||
title: '西京医院',
|
||||
key: 'xijing',
|
||||
},
|
||||
];
|
||||
|
||||
export function barOption(xData, ydata) {
|
||||
function maxCount() {
|
||||
if (ydata.length) {
|
||||
return Math.max(...ydata) < 5 ? 5 : null;
|
||||
} else {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
grid: {
|
||||
top: '18%',
|
||||
left: '8%',
|
||||
right: '8%',
|
||||
bottom: '15%',
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
},
|
||||
backgroundColor: 'rgba(50,50,50,0.7)',
|
||||
borderColor: '#1b7ef2',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: '#FFFFFF',
|
||||
fontSize: 14,
|
||||
},
|
||||
axisLine: {
|
||||
color: '#bac9e1',
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: '次数',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
padding: [0, 0, 0, -15],
|
||||
},
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: '#FFFFFF',
|
||||
fontSize: 14,
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'dashed',
|
||||
color: 'rgba(217, 231, 255, 0.2)',
|
||||
},
|
||||
},
|
||||
min: 0,
|
||||
max: maxCount(),
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: ydata,
|
||||
type: 'bar',
|
||||
barWidth: '20%',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#008CFF' },
|
||||
{ offset: 1, color: '#33CBFE' },
|
||||
]),
|
||||
},
|
||||
barMaxWidth: '10',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: '#33CBFE',
|
||||
fontWeight: 'normal',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user