湖里大屏(安全管理):更改安全问题使用 Card 组件

This commit is contained in:
Jack 2022-08-23 18:07:40 +08:00
parent 8efdc2c036
commit 4247e5d2e2

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="wrap"> <Card :title="title">
<div class="title">{{ title }}</div>
<div class="charts"> <div class="charts">
<div class="chart"> <div class="chart">
<JRingChart :title="{ text: totals.totalNum, subTitle: '问题总数' }" :color="['#3CABFD']" /> <JRingChart :title="{ text: totals.totalNum, subTitle: '问题总数' }" :color="['#3CABFD']" />
@ -32,18 +31,19 @@
</div> </div>
</div> --> </div> -->
</div> </div>
</div> </Card>
</template> </template>
<script> <script>
import { selectSecurityManageStatisticsApi } from '@/assets/js/api/dataBoard' import { selectSecurityManageStatisticsApi } from '@/assets/js/api/dataBoard'
import Card from '../components/Card.vue'
import JRingChart from '../jChart/pie/JRingChart.vue' import JRingChart from '../jChart/pie/JRingChart.vue'
export default { export default {
components: { JRingChart }, components: { Card, JRingChart },
props: { props: {
title: { title: {
type: String, type: String,
default: 'default title' default: ''
} }
}, },
mounted() { mounted() {
@ -69,65 +69,52 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.wrap { .charts {
width: 100%; padding: 10px 30px 0;
height: 100%; display: flex;
border: 1px solid #0081c3; justify-content: space-around;
.chart {
.title { width: 200px;
padding-left: 6px; height: 200px;
height: 30px;
line-height: 30px;
font-size: 18px;
color: #6ee4f0;
} }
.charts { .count {
padding: 10px 30px 0; width: 14%;
display: flex; display: flex;
justify-content: space-around; flex-direction: column;
.chart { justify-content: center;
width: 200px; align-items: center;
height: 200px; .count-item {
} position: relative;
.count { &::before {
width: 14%; position: absolute;
display: flex; left: -16px;
flex-direction: column; top: 10px;
justify-content: center; content: '';
align-items: center; width: 6px;
.count-item { height: 6px;
position: relative; border-radius: 50%;
&::before { }
position: absolute; &:first-child {
left: -16px; margin-bottom: 20px;
top: 10px; }
content: ''; &:first-child::before {
width: 6px; background-color: #557dee;
height: 6px; }
border-radius: 50%; &:last-child::before {
} background-color: #ff6c7f;
&:first-child { }
margin-bottom: 20px; .num {
} margin-bottom: 8px;
&:first-child::before { font-size: 14px;
background-color: #557dee; color: rgba(255, 255, 255, 0.7);
} span {
&:last-child::before { font-size: 18px;
background-color: #ff6c7f; color: #fff;
}
.num {
margin-bottom: 8px;
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
span {
font-size: 18px;
color: #fff;
}
}
.rate {
font-size: 14px;
} }
} }
.rate {
font-size: 14px;
}
} }
} }
} }