2023-11-07 19:10:45 +08:00
|
|
|
<template>
|
2024-07-24 15:42:37 +08:00
|
|
|
<div class="currentDataContainer">
|
|
|
|
<div class="topBox">
|
|
|
|
<el-menu
|
|
|
|
:default-active="activeName"
|
|
|
|
mode="horizontal"
|
|
|
|
@select="handleSelect">
|
|
|
|
<el-menu-item index="currentTest">当前检测数据</el-menu-item>
|
|
|
|
<el-menu-item index="24hour">24小时检测数据</el-menu-item>
|
|
|
|
</el-menu>
|
|
|
|
</div>
|
|
|
|
<div class="bottomBox">
|
|
|
|
<!-- 当前检测数据 -->
|
|
|
|
<div v-if="activeName === 'currentTest'">
|
|
|
|
<CurrentTest />
|
|
|
|
</div>
|
|
|
|
<!-- 24小时检测数据 -->
|
|
|
|
<div v-if="activeName === '24hour'">
|
|
|
|
<HourData />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-11-07 19:10:45 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2024-07-24 15:42:37 +08:00
|
|
|
import CurrentTest from './currentTest.vue';
|
|
|
|
import HourData from './hourData.vue';
|
2023-11-07 19:10:45 +08:00
|
|
|
export default {
|
2024-07-24 15:42:37 +08:00
|
|
|
name: 'currentData',
|
2023-11-07 19:10:45 +08:00
|
|
|
data() {
|
2024-07-24 15:42:37 +08:00
|
|
|
return {
|
|
|
|
activeName: 'currentTest',
|
2023-11-07 19:10:45 +08:00
|
|
|
};
|
2024-07-24 15:42:37 +08:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
CurrentTest,
|
|
|
|
HourData,
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleSelect(name) {
|
|
|
|
this.activeName = name;
|
|
|
|
},
|
2023-11-07 19:10:45 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
2023-11-10 17:02:52 +08:00
|
|
|
<style scoped lang="scss">
|
2024-07-24 15:42:37 +08:00
|
|
|
.currentDataContainer {
|
|
|
|
width: 100%;
|
2024-08-05 15:34:57 +08:00
|
|
|
min-height: calc(100vh - 164px);
|
2024-07-24 15:42:37 +08:00
|
|
|
background: rgba(242, 244, 249, 1);
|
|
|
|
.topBox {
|
|
|
|
.el-menu {
|
|
|
|
background-color: #f2f4f9;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
.el-menu.el-menu--horizontal {
|
|
|
|
border-bottom: none;
|
|
|
|
width: 100%;
|
|
|
|
.el-menu-item {
|
|
|
|
height: 48px;
|
|
|
|
line-height: 48px;
|
|
|
|
width: calc((100% / 2) - 4px);
|
|
|
|
border-radius: 8px;
|
|
|
|
background-color: #fff;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 500;
|
|
|
|
color: rgba(22, 22, 22, 0.65);
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
:first-child {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
.el-menu-item.is-active {
|
|
|
|
border-width: 4px;
|
|
|
|
color: #161616;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.el-tabs__active-bar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottomBox {
|
2024-08-05 15:34:57 +08:00
|
|
|
height: calc(100vh - 220px);
|
2024-07-24 15:42:37 +08:00
|
|
|
background: #fff;
|
|
|
|
padding: 16px;
|
|
|
|
border-radius: 8px;
|
2024-08-05 15:34:57 +08:00
|
|
|
overflow-y: auto;
|
2024-07-24 15:42:37 +08:00
|
|
|
}
|
2023-11-15 09:08:20 +08:00
|
|
|
}
|
2023-11-10 17:02:52 +08:00
|
|
|
</style>
|