87 lines
2.6 KiB
Vue
87 lines
2.6 KiB
Vue
<template>
|
|
<div class="lr-box">
|
|
<div class="lr-title">{{ props.data.title }}</div>
|
|
<div class="lr-content">
|
|
<TempHumiVue />
|
|
<div class="avg-th">
|
|
<div class="avg-th-title">当前平均温度</div>
|
|
<div class="avg-th-value temp-color">{{props.data.temp}}℃</div>
|
|
</div>
|
|
<div class="avg-th">
|
|
<div class="avg-th-title">当前平均湿度</div>
|
|
<div class="avg-th-value humi-color">{{props.data.humi}}%RH</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import TempHumiVue from './temp_humi_icon.vue';
|
|
|
|
const props = defineProps({
|
|
data: {
|
|
type: Object,
|
|
default: () => {
|
|
return {
|
|
title: '研发中心四楼',
|
|
temp: 25.5,
|
|
humi: 60
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.lr-box {
|
|
width: 100%;
|
|
height: 134px;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
|
|
.lr-title {
|
|
width: 100%;
|
|
height: 34px;
|
|
box-sizing: border-box;
|
|
background-image: url('./../image/u803.png');
|
|
background-position: top left;
|
|
background-repeat: no-repeat;
|
|
padding-left: 60px;
|
|
font-size: 25px;
|
|
color: #2affff;
|
|
text-align: left;
|
|
line-height: 34px;
|
|
font-weight: 700;
|
|
}
|
|
.lr-content {
|
|
width: 100%;
|
|
height: 100px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
.avg-th {
|
|
width: 40%;
|
|
height: 34px;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
.avg-th-title {
|
|
font-size: 14px;
|
|
color: #fff;
|
|
font-weight: 700;
|
|
}
|
|
.temp-color {
|
|
color: #2affff;
|
|
}
|
|
.humi-color {
|
|
color: #ffd249;
|
|
}
|
|
.avg-th-value {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|