湖里大屏(质量管理):简化问题占比代码

This commit is contained in:
Jack 2022-08-08 11:28:28 +08:00
parent 64bbbefa2d
commit 3fa112ccd8

View File

@ -1,8 +1,6 @@
<template>
<!-- 问题占比 -->
<div class="questionRate">
<div class="title">{{ title }}</div>
<div class="content">
<Card :title="title">
<div class="warp">
<div class="chart">
<JRingChart
:title="{ text: 3412, subTitle: '问题总数' }"
@ -22,17 +20,18 @@
</div>
</div>
</div>
</div>
</Card>
</template>
<script>
import Card from '../components/Card.vue'
import JRingChart from '../jChart/pie/JRingChart.vue'
export default {
components: { JRingChart },
components: { Card, JRingChart },
props: {
title: {
type: String,
default: 'default title'
default: ''
}
},
data() {
@ -42,58 +41,46 @@ export default {
</script>
<style lang="less" scoped>
.questionRate {
width: 100%;
.warp {
height: 100%;
border: 1px solid #0081c3;
.title {
padding-left: 6px;
height: 30px;
line-height: 30px;
font-size: 18px;
color: #6ee4f0;
display: flex;
.chart {
width: 55%;
height: 100%;
}
.content {
height: calc(100% - 30px);
.count {
flex: 1;
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;
}
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;
}
}
}