2026-02-24 23:26:41 +08:00
|
|
|
|
<template>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
<div class="layout-container">
|
|
|
|
|
|
<div class="header-section">
|
|
|
|
|
|
<el-card shadow="hover" class="header-card">
|
|
|
|
|
|
<div class="header-content">
|
|
|
|
|
|
<UserTop
|
|
|
|
|
|
userName="超级管理员"
|
|
|
|
|
|
weatherInfo="今日小雪;夜间:多云;温度:(-4.0℃ 至 2.0℃);东北风/1-3级"
|
|
|
|
|
|
/>
|
2026-03-03 17:35:54 +08:00
|
|
|
|
</div>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
</el-card>
|
2026-03-03 17:35:54 +08:00
|
|
|
|
</div>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
<div class="main-section">
|
|
|
|
|
|
<div class="left-section">
|
|
|
|
|
|
<el-card shadow="hover" class="card-item card-1">
|
|
|
|
|
|
<NoteLeft />
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
<el-card shadow="hover" class="card-item card-2">
|
|
|
|
|
|
<AlertMain />
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
<el-card shadow="hover" class="card-item card-3">
|
|
|
|
|
|
<QuickLogin />
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="right-section">
|
|
|
|
|
|
<div class="right-top-section">
|
2026-03-08 23:38:37 +08:00
|
|
|
|
<el-card shadow="hover" class="card-item right-top-card">
|
|
|
|
|
|
<div class="right-placeholder">
|
|
|
|
|
|
<ChartNote />
|
|
|
|
|
|
</div>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
</el-card>
|
2026-03-03 17:35:54 +08:00
|
|
|
|
</div>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
<div class="right-bottom-section">
|
2026-03-08 23:38:37 +08:00
|
|
|
|
<el-card shadow="hover" class="card-item right-bottom-card">
|
2026-03-05 18:32:39 +08:00
|
|
|
|
<div class="right-placeholder">下区域内容</div>
|
2026-03-03 17:35:54 +08:00
|
|
|
|
</el-card>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-24 23:26:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
import UserTop from './components/UserTop.vue';
|
|
|
|
|
|
import NoteLeft from './components/Note.vue'
|
|
|
|
|
|
import AlertMain from './components/Alert.vue'
|
|
|
|
|
|
import QuickLogin from './components/Quick.vue'
|
2026-03-08 23:38:37 +08:00
|
|
|
|
import ChartNote from './components/ChartNote.vue'
|
2026-02-24 23:26:41 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.layout-container {
|
2026-03-03 17:35:54 +08:00
|
|
|
|
width: 100%;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
height: 100%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
padding: 8px;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background-color: #f5f7fa;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.header-section {
|
|
|
|
|
|
height: 10%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
width: 100%;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.header-card {
|
|
|
|
|
|
height: 100%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
display: flex;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
align-items: stretch !important;
|
|
|
|
|
|
justify-content: stretch !important;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
transition: all 0.3s ease;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.header-content {
|
2026-03-03 17:35:54 +08:00
|
|
|
|
width: 100%;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
height: 100%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.main-section {
|
|
|
|
|
|
height: 90%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
width: 100%;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 8px;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
box-sizing: border-box;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
min-width: 0;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.left-section {
|
2026-03-08 23:38:37 +08:00
|
|
|
|
width: 45%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
flex-shrink: 0;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 23:38:37 +08:00
|
|
|
|
/* 核心样式:card-item 统一所有卡片样式 */
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.card-item {
|
|
|
|
|
|
flex: 1;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
display: flex;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
align-items: stretch !important;
|
|
|
|
|
|
justify-content: stretch !important;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
min-height: 80px;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.right-section {
|
2026-03-03 17:35:54 +08:00
|
|
|
|
flex: 1;
|
2026-03-05 18:32:39 +08:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
flex-shrink: 0;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.right-top-section {
|
|
|
|
|
|
height: 50%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.right-bottom-section {
|
|
|
|
|
|
height: 50%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 23:38:37 +08:00
|
|
|
|
/* 移除右侧卡片独立样式,统一继承 card-item */
|
|
|
|
|
|
.right-top-card, .right-bottom-card {
|
|
|
|
|
|
/* 仅保留占位,如需特殊样式可在此添加 */
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 23:38:37 +08:00
|
|
|
|
/* 统一卡片内容占位符样式 */
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.right-placeholder {
|
|
|
|
|
|
padding: 4px;
|
|
|
|
|
|
text-align: center;
|
2026-03-08 23:38:37 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 23:38:37 +08:00
|
|
|
|
/* 深度样式统一作用于所有 el-card */
|
2026-03-05 18:32:39 +08:00
|
|
|
|
:deep(.el-card) {
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
margin: 0 !important;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
:deep(.el-card__body) {
|
|
|
|
|
|
padding: 4px !important;
|
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:32:39 +08:00
|
|
|
|
:deep(.el-card:hover) {
|
|
|
|
|
|
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
|
|
|
|
|
|
transform: translateY(-2px);
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-08 23:38:37 +08:00
|
|
|
|
/* 响应式样式保持不变 */
|
2026-03-03 17:35:54 +08:00
|
|
|
|
@media (max-width: 768px) {
|
2026-03-05 18:32:39 +08:00
|
|
|
|
.main-section {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-section, .right-section {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 50%;
|
|
|
|
|
|
flex: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.left-section {
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
}
|
|
|
|
|
|
.card-item {
|
|
|
|
|
|
min-width: 120px;
|
|
|
|
|
|
min-height: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-top-section, .right-bottom-section {
|
|
|
|
|
|
height: 50%;
|
2026-03-03 17:35:54 +08:00
|
|
|
|
}
|
2026-02-24 23:26:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|