fix:修改新风系统弹窗 优化页面展示

This commit is contained in:
zhaohy
2024-08-02 10:45:49 +08:00
parent c0fa5ad9be
commit bab2e8def5
6 changed files with 139 additions and 34 deletions

View File

@@ -41,6 +41,30 @@
</template>
</div>
</transition>
<!-- PM2.5 -->
<transition name="zep">
<div v-if="selectIndex === 2">
<template v-for="(item, index) in pmData" :key="index">
<div
style="position: absolute"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }">
<singleModel :dataSource="item" />
</div>
</template>
</div>
</transition>
<!-- CO2e -->
<transition name="zep">
<div v-if="selectIndex === 3">
<template v-for="(item, index) in CO2Data" :key="index">
<div
style="position: absolute"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }">
<singleModel :dataSource="item" />
</div>
</template>
</div>
</transition>
</div>
</template>
<script lang="ts" setup>
@@ -116,6 +140,44 @@
url: humidity,
},
]);
//PM2.5数组
const pmData = ref([
{
title: '多功能传感器A',
styleText: { left: '48%', bottom: '64%' },
type: 'pm2.5',
unit: '',
number: 20,
url: PM25,
},
{
title: '多功能传感器B',
styleText: { left: '48.2%', bottom: '43%' },
type: 'pm2.5',
unit: '',
number: 20,
url: PM25,
},
]);
//二氧化碳 浓度
const CO2Data = ref([
{
title: '多功能传感器A',
styleText: { left: '48%', bottom: '64%' },
type: '二氧化碳',
unit: 'CO2e',
number: 20,
url: CO2,
},
{
title: '多功能传感器B',
styleText: { left: '48.2%', bottom: '43%' },
type: '二氧化碳',
unit: 'CO2e',
number: 99,
url: CO2,
},
]);
onMounted(() => {});
onUnmounted(() => {});
</script>