WholeProcessPlatform/frontend/src/components/engEnvironmentData/index.vue

97 lines
2.2 KiB
Vue
Raw Normal View History

<!-- engEnvironmentData/index.vue -->
<template>
<div class="eng-environment-data">
<div class="title">监测数据接入情况</div>
<div class="data-list">
<div class="data-item" v-for="item in dataList" :key="item.label">
<div class="item-content">
<span class="color-bar" :style="{ backgroundColor: item.color }"></span>
<span class="label">{{ item.label }}</span>
<span class="value" style=" color: #2f6b98 ">{{ item.value }}</span>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
// 定义组件名
defineOptions({
name: 'EngEnvironmentData'
});
// 数据列表
const dataList = ref([
{
label: '大中型已建在建电站',
value: '707',
color: '#00b894'
},
{
label: '已接入电站运行数据',
value: '452',
color: '#0984e3'
},
{
label: '已开展全过程监测工作',
value: '42',
color: '#6c5ce7'
}
]);
// 页面加载时执行的逻辑
onMounted(() => {
});
</script>
<style lang="scss" scoped>
.eng-environment-data {
padding: 0px 5px;
background: #fff;
border-radius: 4px;
width: 100%;
.title {
font-size: 14px;
font-weight: 500;
color: #333;
text-align: center;
2026-04-03 16:08:05 +08:00
margin-bottom: 4px;
}
.data-list {
2026-04-03 16:08:05 +08:00
display: flex;
flex-direction: column;
justify-content: space-between;
align-content: space-between;
height: 85%;
.data-item {
border: 1px solid #edf2f8;
cursor: pointer;
.item-content {
display: flex;
align-items: center;
2026-04-03 16:08:05 +08:00
padding: 6px;
.color-bar {
2026-04-02 10:54:14 +08:00
width: 2px;
2026-04-03 16:08:05 +08:00
height: 19px;
margin-right: 6px;
border-radius: 2px;
2026-04-02 10:54:14 +08:00
display: block;
}
.label {
flex: 1;
2026-04-03 16:08:05 +08:00
line-height: 10px;
}
}
}
}
}
</style>