lg_frontend/components/AirQuality.vue

170 lines
3.5 KiB
Vue
Raw Permalink Normal View History

2024-02-19 13:16:43 +00:00
<!--空气质量指数-->
<template>
<div class="air-quality-content">
<secondary-title :title="title"/>
2024-02-20 12:52:30 +00:00
<div class="air-data">
<div class="excellent-rate">
<div class="_title">空气质量</div>
<div class="_title">优良率</div>
<div class="num-bg">
<Number :num="90" />%
2024-02-20 12:52:30 +00:00
</div>
</div>
2024-02-21 13:09:38 +00:00
<div class="air-quality-trend">
<third-level-label :title="thirdLevelLabel"/>
<div class="_charts">
<air-quality-trend-charts :data-source="airQualityTrendDataSource"/>
</div>
</div>
2024-02-20 12:52:30 +00:00
</div>
2024-02-19 13:16:43 +00:00
</div>
</template>
<script>
2024-02-21 13:09:38 +00:00
import AirQualityTrendCharts from "@/components/charts/AirQualityTrendCharts";
2024-02-19 13:16:43 +00:00
export default {
name: "AirQuality",
2024-02-21 13:09:38 +00:00
components: {AirQualityTrendCharts},
2024-02-19 13:16:43 +00:00
data() {
return {
2024-02-21 13:09:38 +00:00
title: '空气质量指数',
thirdLevelLabel: '空气质量变化趋势',
airQualityTrendDataSource: [
{
name: '1',
value: 3,
attr: '2021'
},
{
name: '2',
value: 4,
attr: '2021'
},
{
name: '3',
value: 1,
attr: '2021'
},
{
name: '4',
value: 4,
attr: '2021'
},
{
name: '5',
value: 6,
attr: '2021'
},
{
name: '6',
value: 1,
attr: '2021'
},
{
name: '7',
value: 8,
attr: '2021'
},
{
name: '1',
value: 1,
attr: '2022'
},
{
name: '2',
value: 4,
attr: '2022'
},
{
name: '3',
value: 7,
attr: '2022'
},
{
name: '4',
value: 8,
attr: '2022'
},
{
name: '5',
value: 2,
attr: '2022'
},
{
name: '6',
value: 7,
attr: '2022'
},
{
name: '7',
value: 1,
attr: '2022'
}
]
2024-02-19 13:16:43 +00:00
}
}
}
</script>
<style scoped lang="less">
@import "assets/styles/mixin";
.air-quality-content {
width: 100%;
height: 601px;
2024-02-20 12:52:30 +00:00
background-image: linear-gradient(62deg, rgba(8, 31, 55, 0.10) 0%, rgba(18, 50, 81, 0.10) 100%);
2024-02-21 13:09:38 +00:00
/* border: 1px solid transparent; !* *!
border-image: linear-gradient(rgba(79, 182, 238, 0), rgba(39, 127, 216, 1)); !* 使用线性渐变作为边框图片 *!
border-image-slice: 1; !* 指定切分边框图像的位置 *!*/
2024-02-20 12:52:30 +00:00
.flex-column;
.air-data {
flex: 1;
.flex-row;
.excellent-rate {
width: 346px;
height: 100%;
.flex-column;
justify-content: center;
align-items: center;
._title {
font-family: MicrosoftYaHei;
font-size: 34.25px;
color: #6AC4FF;
letter-spacing: 2.25px;
text-align: center;
font-weight: 400;
}
.num-bg {
width: 239px;
height: 270px;
.bg("~/assets/peakCoalImages/left/air-excellent-rate-bg.png");
2024-02-20 12:52:30 +00:00
font-family: YouSheBiaoTiHei;
font-size: 85.62px;
color: #FFFFFF;
letter-spacing: 5.63px;
font-weight: 700;
line-height: 200px;
text-align: center;
}
}
.air-quality-trend {
2024-02-21 13:09:38 +00:00
height: 100%;
2024-02-20 12:52:30 +00:00
flex: 1;
2024-02-21 13:09:38 +00:00
.flex-column;
._charts {
flex: 1;
height: 0;
}
2024-02-20 12:52:30 +00:00
}
}
2024-02-19 13:16:43 +00:00
}
</style>