fix:首台率

main
@0Melon0 2 years ago
parent 3061e33d46
commit c2a96eac61

@ -26,7 +26,7 @@ export default {
enterFullscreen() { enterFullscreen() {
const element = document.documentElement; const element = document.documentElement;
// //
if (!this.isLoding) { if (this.isLoding) {
if (element.webkitRequestFullscreen) { if (element.webkitRequestFullscreen) {
// Chrome, Safari and Opera // Chrome, Safari and Opera
element.webkitRequestFullscreen(); element.webkitRequestFullscreen();
@ -80,4 +80,11 @@ export default {
padding-top: 0px; padding-top: 0px;
} }
} }
/* 定义渐变的样式 */
.gradientText {
background: linear-gradient(to top, #0592ff, #fff);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
</style> </style>

@ -0,0 +1,3 @@
@function vw($px) {
@return $px/1920 * 100vw;
}

@ -0,0 +1,116 @@
<template>
<section ref="echartsContainer"></section>
</template>
<script>
import * as echarts from 'echarts';
export default {
props: {
title: String,
maxNum: {
type: Number,
default: 100,
},
nowNum: Number,
unit: {
type: String,
default: '%',
},
},
data() {
return {
chartOptions: {
series: [
{
type: 'gauge',
startAngle: 90,
endAngle: -270,
pointer: {
show: false,
},
max: this.maxNum,
radius: '100%',
center: ['50%', '50%'],
progress: {
show: true,
overlap: false,
roundCap: true,
clip: false,
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#03c2fd',
},
{
offset: 0.5,
color: '#1ed3e5',
},
{
offset: 1,
color: '#2fded6',
},
],
global: false,
},
},
},
axisLine: {
lineStyle: {
color: [[1, '#4F518C']],
opacity: 0.7,
width: 30,
},
},
splitLine: {
show: false,
distance: 0,
length: 10,
},
axisTick: {
show: false,
},
axisLabel: {
show: false,
distance: 50,
},
data: [
{
value: this.nowNum,
name: this.title,
title: {
offsetCenter: ['0%', '20%'],
fontSize: 22,
fontFamily: 'Microsoft YaHei',
color: '#fff',
overflow: 'break',
lineHeight: 20,
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '-15%'],
fontSize: 40,
fontFamily: 'DIN-Bold,Microsoft YaHei',
color: '#03FFFF',
formatter: `{value}${this.unit}`,
},
},
],
},
],
},
};
},
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
chart.setOption(this.chartOptions);
},
};
</script>

@ -3,10 +3,10 @@
<dv-decoration-8 class="left" /> <dv-decoration-8 class="left" />
<dv-decoration-5 class="center" /> <dv-decoration-5 class="center" />
<dv-decoration-8 class="right" :reverse="true" /> <dv-decoration-8 class="right" :reverse="true" />
<div class="centerTitle">{{ $route.meta.title }}</div> <div class="centerTitle gradientText">{{ $route.meta.title }}</div>
<dv-decoration-7 class="dateBox" <dv-decoration-7 class="dateBox">
><span>{{ curTime }}</span></dv-decoration-7 <span>{{ curTime }}</span>
> </dv-decoration-7>
</Header> </Header>
</template> </template>

@ -33,6 +33,12 @@ const routes = [
meta: { title: '手术间利用率' }, meta: { title: '手术间利用率' },
component: () => import('@/views/pageRoom/index.vue'), component: () => import('@/views/pageRoom/index.vue'),
}, },
{
path: '/test',
name: 'test',
meta: { title: '手术间利用率' },
component: () => import('@/views/pageTest/index.vue'),
},
]; ];
const router = new VueRouter({ const router = new VueRouter({

@ -26,21 +26,22 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/assets/scss/pxtovw.scss';
.operation { .operation {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 2vh; padding: vw(20);
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.leftBox { .leftBox {
flex-basis: 25%; flex-basis: vw(462);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.rightBox { .rightBox {
flex-basis: 74%; flex-basis: vw(1326);
} }
} }
</style> </style>

@ -1,53 +1,57 @@
<template> <template>
<div class="leftBottom"> <dv-border-box-13 class="leftBottom">
<dv-border-box-13> <div class="echartsContainer" ref="echartsContainer"></div>
<dv-charts :option="option"></dv-charts>
</dv-border-box-13> </dv-border-box-13>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts';
export default { export default {
data() { data() {
return { return {
option: { chartOptions: {
grid: { grid: {
left: '18%', top: '13%',
left: '13%',
right: '10%',
bottom: '13%',
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false,
data: ['3月', '4月', '5月', '6月', '7月', '8月'], data: ['3月', '4月', '5月', '6月', '7月', '8月'],
axisLabel: { axisLabel: {
style: { color: '#fff',
stroke: '#fff',
fontSize: 14,
},
}, },
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
data: 'value',
max: 100,
min: 0,
axisLabel: { axisLabel: {
formatter: '{value}%', formatter: '{value}%',
style: { color: '#fff',
stroke: '#fff',
fontSize: 14,
},
}, },
}, },
series: [ series: [
{ {
data: [20, 86, 61, 69, 33, 50],
type: 'line', type: 'line',
data: [92, 89, 96, 98, 95, 95], areaStyle: {
label: { color: {
show: true, type: 'linear',
position: 'top', x: 0,
formatter: '{value}%', y: 0,
style: { x2: 0,
stroke: '#fff', y2: 1,
fontSize: 14, colorStops: [
{
offset: 0,
color: 'rgba(0, 128, 255, 0.7)', //
},
{
offset: 1,
color: 'rgba(200, 254, 255, 0)', //
},
],
}, },
}, },
}, },
@ -55,11 +59,21 @@ export default {
}, },
}; };
}, },
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
chart.setOption(this.chartOptions);
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/assets/scss/pxtovw.scss';
.leftBottom { .leftBottom {
height: 39%; height: vw(380);
background: #011343;
.echartsContainer {
height: 100%;
}
} }
</style> </style>

@ -1,89 +1,93 @@
<template> <template>
<div class="leftTop"> <div class="leftTop">
<dv-border-box-13> <dv-border-box-13>
<dv-charts :option="option"></dv-charts> <comGauge class="echartsContainer" :title="'首台准点率'" :nowNum="86"></comGauge>
<section class="dataSection"> <section class="dataSection">
<p>总人数<span class="numFont">350</span></p> <div class="left">
<p>进行中<span class="numFont">50</span></p> <p>总人数</p>
<p>待进行<span class="numFont">220</span></p> <span class="numFont gradientText">350</span>
</div>
<div class="right">
<div>
<p>进行中</p>
<span class="numFont gradientText">50</span>
</div>
<div>
<p>待进行</p>
<span class="numFont gradientText">220</span>
</div>
</div>
</section> </section>
</dv-border-box-13> </dv-border-box-13>
</div> </div>
</template> </template>
<script> <script>
import comGauge from '@/components/comGauge';
export default { export default {
data() { components: {
return { comGauge,
option: {
series: [
{
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 35,
center: ['50%', '45%'],
data: [{ name: 'itemA', value: 86, gradient: ['#03c2fd', '#1ed3e5', '#2fded6'] }],
axisLabel: {
show: false,
},
axisTick: {
show: false,
},
pointer: {
show: false,
},
dataItemStyle: {
lineCap: 'round',
},
details: {
show: true,
formatter: '首台准点率 {value}%',
style: {
fill: 'aqua',
fontSize: 24,
},
},
backgroundArc: {
style: {
stroke: '#4F518C',
},
},
},
],
},
};
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/assets/scss/pxtovw.scss';
.leftTop { .leftTop {
height: 59%; height: vw(500);
position: relative; position: relative;
background-color: #011343;
:deep(.dv-border-box-13) { :deep(.dv-border-box-13) {
padding: 2vh; padding: vw(40) vw(18);
box-sizing: border-box; box-sizing: border-box;
.dv-charts-container { .border-box-content {
height: 80%; display: flex;
} flex-direction: column;
justify-content: space-between;
.echartsContainer {
height: vw(252);
} }
.dataSection { .dataSection {
position: absolute; height: vw(120);
bottom: 1.2vh; display: flex;
left: 50%; justify-content: space-between;
transform: translateX(-50%); align-items: center;
.left {
flex-basis: vw(210);
border: 1px solid #4f518c;
height: 100%;
box-sizing: border-box;
padding-left: vw(32);
padding-top: vw(16);
p { p {
color: #fff; font-size: vw(20);
font-size: 2.4vh; margin-bottom: vw(4);
letter-spacing: .2vh; }
line-height: 4vh;
text-align: left;
span { span {
font-size: 2.6vh; font-size: vw(44);
color: aqua; }
letter-spacing: 0.1vh; }
margin-left: 1vh; .right {
flex-basis: vw(210);
div {
height: vw(58);
border: 1px solid #4f518c;
box-sizing: border-box;
padding: vw(16) vw(24);
display: flex;
justify-content: space-between;
align-items: center;
p {
font-size: vw(20);
}
span {
font-size: vw(24);
}
}
div:first-child {
margin-bottom: vw(4);
}
}
} }
} }
} }

@ -15,31 +15,196 @@ export default {
config: { config: {
header: ['手术间', '手术名称', '申请类型', '入手术室时间', '麻醉开始时间', '手术开始时间', '是否准点'], header: ['手术间', '手术名称', '申请类型', '入手术室时间', '麻醉开始时间', '手术开始时间', '是否准点'],
data: [ data: [
['WK01', '阑尾切除术', '紧急', '2023-09-10 08:00', '2023-09-10 08:30', '2023-09-10 09:15', '准点'], [
['WK02', '膝关节置换术', '择期', '2023-09-11 09:30', '2023-09-11 10:00', '2023-09-11 10:45', '不准点'], 'WK01',
['WK03', '白内障手术', '择期', '2023-09-12 14:45', '2023-09-12 15:15', '2023-09-12 15:45', '准点'], '阑尾切除术',
['WK04', '胆囊切除术', '紧急', '2023-09-13 08:30', '2023-09-13 09:00', '2023-09-13 09:45', '准点'], '<span class="emergent">紧急</span>',
['WK05', '阑尾切除术', '紧急', '2023-09-14 07:45', '2023-09-14 08:15', '2023-09-14 08:45', '不准点'], '2023-09-10 08:00',
['WK06', '膝关节置换术', '择期', '2023-09-15 10:00', '2023-09-15 10:30', '2023-09-15 11:15', '准点'], '2023-09-10 08:30',
['WK07', '阑尾切除术', '紧急', '2023-09-16 08:15', '2023-09-16 08:45', '2023-09-16 09:30', '不准点'], '2023-09-10 09:15',
['WK08', '白内障手术', '择期', '2023-09-17 14:30', '2023-09-17 15:00', '2023-09-17 15:45', '准点'], '<span class="colorBlue">准点</span>',
['WK09', '胆囊切除术', '紧急', '2023-09-18 08:45', '2023-09-18 09:15', '2023-09-18 10:00', '不准点'], ],
['WK10', '膝关节置换术', '择期', '2023-09-19 10:15', '2023-09-19 10:45', '2023-09-19 11:30', '准点'], [
['WK11', '阑尾切除术', '紧急', '2023-09-20 08:30', '2023-09-20 09:00', '2023-09-20 09:45', '准点'], 'WK02',
['WK12', '白内障手术', '择期', '2023-09-21 14:15', '2023-09-21 14:45', '2023-09-21 15:30', '不准点'], '膝关节置换术',
['WK13', '胆囊切除术', '紧急', '2023-09-22 08:00', '2023-09-22 08:30', '2023-09-22 09:15', '不准点'], '<span class="otherDay">择期</span>',
['WK14', '阑尾切除术', '紧急', '2023-09-23 07:30', '2023-09-23 08:00', '2023-09-23 08:45', '不准点'], '2023-09-11 09:30',
['WK15', '膝关节置换术', '择期', '2023-09-24 10:30', '2023-09-24 11:00', '2023-09-24 11:45', '准点'], '2023-09-11 10:00',
['WK16', '白内障手术', '择期', '2023-09-25 14:00', '2023-09-25 14:30', '2023-09-25 15:15', '不准点'], '2023-09-11 10:45',
['WK17', '胆囊切除术', '紧急', '2023-09-26 08:15', '2023-09-26 08:45', '2023-09-26 09:30', '不准点'], '<span class="colorpurple">不准点</span>',
['WK18', '阑尾切除术', '紧急', '2023-09-27 07:45', '2023-09-27 08:15', '2023-09-27 09:00', '不准点'], ],
['WK19', '膝关节置换术', '择期', '2023-09-28 10:45', '2023-09-28 11:15', '2023-09-28 12:00', '准点'], [
['WK20', '白内障手术', '择期', '2023-09-29 13:45', '2023-09-29 14:15', '2023-09-29 14:45', '不准点'], 'WK03',
'白内障手术',
'<span class="otherDay">择期</span>',
'2023-09-12 14:45',
'2023-09-12 15:15',
'2023-09-12 15:45',
'<span class="colorBlue">准点</span>',
],
[
'WK04',
'胆囊切除术',
'<span class="emergent">紧急</span>',
'2023-09-13 08:30',
'2023-09-13 09:00',
'2023-09-13 09:45',
'<span class="colorBlue">准点</span>',
],
[
'WK05',
'阑尾切除术',
'<span class="emergent">紧急</span>',
'2023-09-14 07:45',
'2023-09-14 08:15',
'2023-09-14 08:45',
'<span class="colorpurple">不准点</span>',
],
[
'WK06',
'膝关节置换术',
'<span class="otherDay">择期</span>',
'2023-09-15 10:00',
'2023-09-15 10:30',
'2023-09-15 11:15',
'<span class="colorBlue">准点</span>',
],
[
'WK07',
'阑尾切除术',
'<span class="emergent">紧急</span>',
'2023-09-16 08:15',
'2023-09-16 08:45',
'2023-09-16 09:30',
'<span class="colorpurple">不准点</span>',
],
[
'WK08',
'白内障手术',
'<span class="otherDay">择期</span>',
'2023-09-17 14:30',
'2023-09-17 15:00',
'2023-09-17 15:45',
'<span class="colorBlue">准点</span>',
],
[
'WK09',
'胆囊切除术',
'<span class="emergent">紧急</span>',
'2023-09-18 08:45',
'2023-09-18 09:15',
'2023-09-18 10:00',
'<span class="colorpurple">不准点</span>',
],
[
'WK10',
'膝关节置换术',
'<span class="otherDay">择期</span>',
'2023-09-19 10:15',
'2023-09-19 10:45',
'2023-09-19 11:30',
'<span class="colorBlue">准点</span>',
],
[
'WK11',
'阑尾切除术',
'<span class="emergent">紧急</span>',
'2023-09-20 08:30',
'2023-09-20 09:00',
'2023-09-20 09:45',
'<span class="colorBlue">准点</span>',
],
[
'WK12',
'白内障手术',
'<span class="otherDay">择期</span>',
'2023-09-21 14:15',
'2023-09-21 14:45',
'2023-09-21 15:30',
'<span class="colorpurple">不准点</span>',
],
[
'WK13',
'胆囊切除术',
'<span class="emergent">紧急</span>',
'2023-09-22 08:00',
'2023-09-22 08:30',
'2023-09-22 09:15',
'<span class="colorpurple">不准点</span>',
],
[
'WK14',
'阑尾切除术',
'<span class="emergent">紧急</span>',
'2023-09-23 07:30',
'2023-09-23 08:00',
'2023-09-23 08:45',
'<span class="colorpurple">不准点</span>',
],
[
'WK15',
'膝关节置换术',
'<span class="otherDay">择期</span>',
'2023-09-24 10:30',
'2023-09-24 11:00',
'2023-09-24 11:45',
'<span class="colorBlue">准点</span>',
],
[
'WK16',
'白内障手术',
'<span class="otherDay">择期</span>',
'2023-09-25 14:00',
'2023-09-25 14:30',
'2023-09-25 15:15',
'<span class="colorpurple">不准点</span>',
],
[
'WK17',
'胆囊切除术',
'<span class="emergent">紧急</span>',
'2023-09-26 08:15',
'2023-09-26 08:45',
'2023-09-26 09:30',
'<span class="colorpurple">不准点</span>',
],
[
'WK18',
'阑尾切除术',
'<span class="emergent">紧急</span>',
'2023-09-27 07:45',
'2023-09-27 08:15',
'2023-09-27 09:00',
'<span class="colorpurple">不准点</span>',
],
[
'WK19',
'膝关节置换术',
'<span class="otherDay">择期</span>',
'2023-09-28 10:45',
'2023-09-28 11:15',
'2023-09-28 12:00',
'<span class="colorBlue">准点</span>',
],
[
'WK20',
'白内障手术',
'<span class="otherDay">择期</span>',
'2023-09-29 13:45',
'2023-09-29 14:15',
'2023-09-29 14:45',
'<span class="colorpurple">不准点</span>',
],
], ],
rowNum: 12, rowNum: 12,
waitTime: 10000, waitTime: 100000,
carousel: 'page', carousel: 'page',
headerBGC:"#033860", headerBGC: 'rgba(74, 78, 103, 0.4)',
oddRowBGC: 'rgba(74, 78, 103, 0.15)',
evenRowBGC: 'rgba(74, 78, 103, 0.15)',
headerHeight: '48',
align: ['center', 'center', 'center', 'center', 'center', 'center', 'center'],
columnWidth: [95, 220, 90],
}, },
}; };
}, },
@ -47,23 +212,41 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/assets/scss/pxtovw.scss';
.rightMiddle { .rightMiddle {
height: 100%; height: 100%;
background: #011343;
:deep(.dv-border-box-13) { :deep(.dv-border-box-13) {
box-sizing: border-box; box-sizing: border-box;
padding: 2vh; padding: vw(20);
.dv-scroll-board { .dv-scroll-board {
height: 100%; height: 100%;
.header-item { .header-item {
font-size: 2vh; font-size: vw(16);
color: '#aaa';
} }
.ceil { .ceil {
font-size: 1.8vh; font-size: vw(16);
white-space: nowrap; white-space: nowrap;
} }
.row-item { .row-item {
.ceil:last-child { .colorBlue {
color: #87ceeb; color: #349afc !important;
}
.colorpurple {
color: #a53faf !important;
}
.emergent {
padding: vw(5) vw(10);
color: #03f0b4;
border: 1px solid #03f0b4;
border-radius: 4px;
}
.otherDay {
padding: vw(5) vw(10);
color: #f08503;
border: 1px solid #f08503;
border-radius: 4px;
} }
} }
} }

@ -23,7 +23,7 @@ export default {
}, },
legend: { legend: {
type: 'scroll', type: 'scroll',
data: ['手术准备', '手术中', '完成手术'], // data: ['', '', '', ''],
top: 10, top: 10,
right: 1, right: 1,
textStyle: { textStyle: {
@ -83,36 +83,50 @@ export default {
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`, startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${isUseArr[j]}:00:00`, endTime: `${currentDate} ${isUseArr[j]}:00:00`,
yValue: index - 1, yValue: index - 1,
color: '#87ceeb', color: '#64cfb7',
diff: dayjs(`${currentDate} ${isUseArr[j]}:00:00`).diff( diff: dayjs(`${currentDate} ${isUseArr[j]}:00:00`).diff(
dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`),
'minute' 'minute'
), ),
name: '完成手术', name: '出手术室',
}); });
} else if (isUseArr[j] > hours && isUseArr[j - 1] < hours) { } else if (isUseArr[j] > hours && isUseArr[j - 1] < hours) {
if (Math.random() > 0.5) {
timeArr.push({ timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`, startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${hours}:00:00`, endTime: `${currentDate} ${hours}:00:00`,
yValue: index - 1, yValue: index - 1,
color: '#72BDA3', color: '#e889a8',
diff: dayjs(`${currentDate} ${hours}:00:00`).diff( diff: dayjs(`${currentDate} ${hours}:00:00`).diff(
dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`),
'minute' 'minute'
), ),
name: '手术', name: '开始手术',
}); });
} else {
timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${hours}:00:00`,
yValue: index - 1,
color: '#efb763',
diff: dayjs(`${currentDate} ${hours}:00:00`).diff(
dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`),
'minute'
),
name: '手术结束',
});
}
} else if (isUseArr[j] > hours && isUseArr[j - 1] == hours) { } else if (isUseArr[j] > hours && isUseArr[j - 1] == hours) {
timeArr.push({ timeArr.push({
startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`, startTime: `${currentDate} ${isUseArr[j - 1]}:00:00`,
endTime: `${currentDate} ${hours}:05:00`, endTime: `${currentDate} ${hours}:05:00`,
yValue: index - 1, yValue: index - 1,
color: '#ECBA82', color: '#fce94e',
diff: dayjs(`${currentDate} ${hours}:05:00`).diff( diff: dayjs(`${currentDate} ${hours}:05:00`).diff(
dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`), dayjs(`${currentDate} ${isUseArr[j - 1]}:00:00`),
'minute' 'minute'
), ),
name: '手术准备', name: '入手术室',
}); });
} }
} }
@ -121,7 +135,9 @@ export default {
this.chartOptions.series = this.seriesData(timeArr); this.chartOptions.series = this.seriesData(timeArr);
}, },
seriesData(data) { seriesData(data) {
return data.map(function (item) { // const obj = {};
const res = data.map(function (item) {
// obj[item.name] = item.color;
return { return {
type: 'custom', type: 'custom',
name: item.name, name: item.name,
@ -151,7 +167,7 @@ export default {
position: [textX, textY], position: [textX, textY],
style: { style: {
text: `${item.diff} min`, text: `${item.diff} min`,
fill: item.color, fill: '#fff',
textSize: '14px', textSize: '14px',
textAlign: 'center', textAlign: 'center',
}, },
@ -162,6 +178,9 @@ export default {
data: [item], data: [item],
}; };
}); });
// console.log(obj);
// console.log(JSON.stringify(res));
return res;
}, },
getUseTime() { getUseTime() {
// 使 // 使

@ -0,0 +1,58 @@
<template>
<div class="rightMiddle">
<dv-border-box-13>
<dv-loading v-if="isLoding">Loading...</dv-loading>
<section v-else ref="echartsContainer"></section>
</dv-border-box-13>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
data() {
return {
isLoding: false,
chartOptions: {
legend: {},
tooltip: {},
dataset: {
source: [
['product', '2012', '2013', '2014', '2015'],
['Matcha Latte', 41.1, 30.4, 65.1, 53.3],
['Milk Tea', 86.5, 92.1, 85.7, 83.1],
['Cheese Cocoa', 24.1, 67.2, 79.5, 86.4],
],
},
xAxis: { type: 'category' },
yAxis: {},
series: [
{ type: 'bar', encode: { x: 'product', y: '2012' } },
{ type: 'bar', encode: { x: 'product', y: '2013' } },
{ type: 'bar', encode: { x: 'product', y: '2014' } },
{ type: 'bar', encode: { x: 'product', y: '2015' } },
],
},
};
},
mounted() {
const chartContainer = this.$refs.echartsContainer;
const chart = echarts.init(chartContainer);
chart.setOption(this.chartOptions);
},
};
</script>
<style lang="scss" scoped>
.rightMiddle {
width: 100%;
height: 100%;
:deep(.dv-border-box-13) {
padding: 2vh;
box-sizing: border-box;
section {
height: 100%;
}
}
}
</style>
Loading…
Cancel
Save