You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
2.7 KiB

<template>
<div class="bottomLeft">
<dv-border-box-13>
<div class="chartsBox">
<div class="chartItem">
<p>手术等级</p>
<dv-charts :option="option1"></dv-charts>
</div>
<div class="chartItem">
<p>ASA分级</p>
<dv-charts :option="option2"></dv-charts>
</div>
</div>
</dv-border-box-13>
</div>
</template>
<script>
export default {
data() {
return {
option1: {
series: [
{
type: 'pie',
radius: ['40%', '55%'],
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2,
},
data: [
{
name: '一级',
value: 300,
},
{
name: '二级',
value: 250,
},
{
name: '三级',
value: 250,
},
{
name: '四级',
value: 100,
},
{
name: '五级',
value: 80,
},
],
outsideLabel: {
formatter: '{name} {value}',
labelLineBendGap: '8%',
labelLineEndLength: 8,
style: {
fontSize: 16,
},
},
},
],
},
option2: {
series: [
{
type: 'pie',
radius: ['40%', '55%'],
data: [
{
name: 'I级',
value: 80,
},
{
name: 'II级',
value: 50,
},
{
name: 'III级',
value: 10,
},
{
name: 'IV级',
value: 20,
},
],
outsideLabel: {
formatter: '{name} {value}',
labelLineBendGap: '8%',
labelLineEndLength: 8,
style: {
fontSize: 16,
},
},
},
],
},
};
},
};
</script>
<style lang="scss" scoped>
.bottomLeft {
flex-basis: 40%;
.chartsBox {
width: 100%;
height: 100%;
display: flex;
position: relative;
padding-top: 10px;
box-sizing: border-box;
.chartItem {
width: 50%;
height: 100%;
flex-shrink: 0;
padding-top: 40px;
box-sizing: border-box;
p {
font-size: 24px;
text-align: center;
letter-spacing: 0.1vh;
}
:deep(.dv-charts-container) {
height: 90%;
}
}
}
}
</style>