数据仓库优化

This commit is contained in:
JenniferW 2025-09-08 16:59:05 +08:00
parent 29f9b77d60
commit e7f464c3ef
1 changed files with 198 additions and 131 deletions

View File

@ -1,9 +1,13 @@
<template> <template>
<div class="data-warehouse"> <div class="data-warehouse">
<div class="warehouse-header"> <!-- 主标题区域 - 单独放左边 -->
<i class="el-icon-data-line"></i> <div class="main-title-section">
<img src="@/assets/33.png" alt="" class="title-image" />
<span>数据仓库</span> <span>数据仓库</span>
</div> </div>
<!-- 内容区域 - 放右边与标题区域左右布局 -->
<div class="warehouse-container">
<div class="warehouse-layers"> <div class="warehouse-layers">
<!-- DWD(数据明细层) - 左侧 --> <!-- DWD(数据明细层) - 左侧 -->
<div class="layer-item dwd-layer"> <div class="layer-item dwd-layer">
@ -23,6 +27,9 @@
</div> </div>
</div> </div>
<!-- 分隔线 -->
<div class="layer-divider"></div>
<!-- ODS(数据存储层) - 右侧 --> <!-- ODS(数据存储层) - 右侧 -->
<div class="layer-item ods-layer"> <div class="layer-item ods-layer">
<div class="layer-title">ODS(数据存储层)</div> <div class="layer-title">ODS(数据存储层)</div>
@ -47,6 +54,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -77,6 +85,17 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.data-warehouse { .data-warehouse {
height: 100%;
box-sizing: border-box;
overflow: hidden;
display: flex; /* 主容器变为flex让标题和内容区域左右布局 */
gap: 20px;
padding: 0;
margin: 0;
}
.main-title-section,
.warehouse-container {
background: linear-gradient( background: linear-gradient(
to bottom, to bottom,
rgba(30, 60, 100, 0.8), rgba(30, 60, 100, 0.8),
@ -86,37 +105,61 @@ export default {
border-radius: 12px; border-radius: 12px;
padding: 15px; padding: 15px;
box-shadow: 0 0 15px rgba(74, 144, 226, 0.2); box-shadow: 0 0 15px rgba(74, 144, 226, 0.2);
height: 100%; }
// -
.main-title-section {
flex: 0 0 100px; //
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box; box-sizing: border-box;
.warehouse-header { .title-image {
display: flex; width: 60%;
align-items: center; margin-bottom: 10px;
margin-bottom: 15px;
i {
font-size: 24px;
color: #4a90e2;
margin-right: 8px;
filter: drop-shadow(0 2px 2px rgba(74, 144, 226, 0.3));
} }
span { span {
font-size: 18px; font-size: 24px;
color: #fff; color: #fff;
font-weight: 500; font-weight: 600;
text-align: center;
text-shadow: 0 0 5px rgba(74, 144, 226, 0.5); text-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
} }
} }
// -
.warehouse-container {
flex: 1; //
height: 100%;
box-sizing: border-box;
}
.warehouse-layers { .warehouse-layers {
display: flex; display: flex;
gap: 15px; gap: 15px;
height: calc(100% - 50px); height: 100%;
box-sizing: border-box;
align-items: stretch; //
}
// 线
.layer-divider {
width: 1px;
background: linear-gradient(
to bottom,
transparent,
rgba(74, 144, 226, 0.5),
transparent
);
align-self: center;
height: 80%; // 线80%
}
.layer-item { .layer-item {
flex: 1; flex: 1;
padding: 12px; padding: 12px;
border-radius: 8px; border-radius: 8px;
transition: all 0.3s ease; transition: all 0.3s ease;
@ -196,14 +239,38 @@ export default {
.ods-layer .layer-stats { .ods-layer .layer-stats {
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
} }
}
//
@media (max-width: 1200px) {
.data-warehouse {
flex-direction: column;
}
.main-title-section {
flex: none;
border-right: none;
border-bottom: 1px solid rgba(74, 144, 226, 0.2);
padding-right: 0;
padding-bottom: 15px;
margin-bottom: 15px;
width: 100%;
} }
//
@media (max-width: 768px) {
.warehouse-layers { .warehouse-layers {
flex-direction: column; flex-direction: column;
} }
// 线
.layer-divider {
width: 80%;
height: 1px;
margin: 10px auto;
background: linear-gradient(
to right,
transparent,
rgba(74, 144, 226, 0.5),
transparent
);
}
} }
</style> </style>