湖里大屏(质量管理):完成问题占比布局

This commit is contained in:
Jack 2022-08-03 10:04:48 +08:00
parent 023f6134d5
commit 0c38423785
2 changed files with 84 additions and 20 deletions

View File

@ -21,6 +21,10 @@ export default {
subTitle: {
type: String,
default: ''
},
radius: {
type: Array,
default: () => ['65%', '80%']
}
},
mounted() {
@ -59,7 +63,7 @@ export default {
{
name: '',
type: 'pie',
radius: ['65%', '80%'],
radius: this.radius,
avoidLabelOverlap: false,
hoverAnimation: false,
label: {

View File

@ -1,42 +1,102 @@
<template>
<!-- 问题占比 -->
<div class="container">
<div class="titleTxt">{{ title }}</div>
</div>
<!-- 问题占比 -->
<div class="questionRate">
<div class="title">{{ title }}</div>
<div class="content">
<div class="chart">
<JRingChart
title="3412"
subTitle="问题总数"
:color="['#557DEE', '#43D7B5']"
:data="[{ value: 2314 }, { value: 987 }]"
:radius="['55%', '80%']"
/>
</div>
<div class="count">
<div class="count-item">
<div class="label">紧要问题</div>
<div class="num">2314</div>
</div>
<div class="count-item">
<div class="label">一般问题</div>
<div class="num">987</div>
</div>
</div>
</div>
</div>
</template>
<script>
import JRingChart from '../jChart/pie/JRingChart.vue'
export default {
components: { JRingChart },
props: {
title: {
type: String,
default: "default title"
default: 'default title'
}
},
data() {
return {
};
},
return {}
}
}
</script>
<style lang="less" scoped>
.container {
.questionRate {
width: 100%;
height: 100%;
border: 1px solid #0081c3;
.titleTxt {
.title {
padding-left: 6px;
height: 30px;
line-height: 30px;
font-size: 18px;
color: #6ee4f0;
margin-top: 5px;
margin-left: 5px;
}
.content {
height: calc(100% - 30px);
display: flex;
.chart {
width: 55%;
height: 100%;
}
.count {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.count-item {
position: relative;
&::before {
position: absolute;
left: -16px;
top: 10px;
content: '';
width: 6px;
height: 6px;
border-radius: 50%;
}
&:first-child {
margin-bottom: 20px;
}
&:first-child::before {
background-color: #557dee;
}
&:last-child::before {
background-color: #43d7b5;
}
.label {
margin-bottom: 8px;
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
}
.num {
font-size: 18px;
}
}
}
}
}
</style>