大屏项目初始化
This commit is contained in:
@@ -17,30 +17,45 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="work-section work-main-section">
|
||||
|
||||
<div v-if="activeMenu === 1" class="menu-content">
|
||||
<HomeIndex />
|
||||
</div>
|
||||
<div v-else-if="activeMenu === 2" class="menu-content">
|
||||
<WorkIndex />
|
||||
</div>
|
||||
<div v-else-if="activeMenu === 3" class="menu-content">
|
||||
<ErpIndex />
|
||||
</div>
|
||||
<div v-else-if="activeMenu === 4" class="menu-content">
|
||||
<SysIndex />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import HomeIndex from './components/Home.vue'
|
||||
import WorkIndex from './components/Work.vue'
|
||||
import ErpIndex from './components/Erp.vue'
|
||||
import SysIndex from './components/Sys.vue'
|
||||
|
||||
const menuList = ref([
|
||||
{ key: 1, label: '指标一' },
|
||||
{ key: 2, label: '指标二' },
|
||||
{ key: 3, label: '指标三' },
|
||||
{ key: 4, label: '指标四' },
|
||||
{ key: 1, label: '首页' },
|
||||
{ key: 2, label: '工作' },
|
||||
{ key: 3, label: '财务' },
|
||||
{ key: 4, label: '系统' },
|
||||
])
|
||||
const activeMenu = ref(1)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 你原来的全部样式 100% 保留,我只加左侧样式 */
|
||||
.work-layout-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row; /* 只改这一个字:column → row */
|
||||
flex-direction: row;
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
margin: 0 !important;
|
||||
@@ -49,93 +64,6 @@ const activeMenu = ref(1)
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.work-section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.work-top-header {
|
||||
height: 10%;
|
||||
}
|
||||
|
||||
.work-main-section {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.work-col {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.work-col-1-3 {
|
||||
width: calc((100% - 12px) / 3);
|
||||
}
|
||||
|
||||
.work-left-col, .work-middle-col, .work-right-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.work-card-1-3 {
|
||||
height: calc((100% - 12px) / 3);
|
||||
}
|
||||
|
||||
.work-card-2-3 {
|
||||
height: calc(2 * ((100% - 12px) / 3) + 6px);
|
||||
}
|
||||
|
||||
.work-card {
|
||||
width: 100%;
|
||||
background-color: rgba(15, 52, 96, 0.1);
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
border-radius: 8px;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #e0e6ff;
|
||||
backdrop-filter: blur(2px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.full-card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.work-card:hover {
|
||||
box-shadow: 0 4px 12px rgba(60, 156, 255, 0.2);
|
||||
border-color: rgba(60, 156, 255, 0.6);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.work-card h3 {
|
||||
font-size: 16px;
|
||||
margin-bottom: 8px;
|
||||
letter-spacing: 1px;
|
||||
background: #3c9cff;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.work-card p {
|
||||
font-size: 13px;
|
||||
opacity: 0.75;
|
||||
color: #b4c7e7;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.work-left-sidebar {
|
||||
width: 15%;
|
||||
height: 100%;
|
||||
@@ -143,135 +71,124 @@ const activeMenu = ref(1)
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
background: transparent;
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
backdrop-filter: blur(2px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
height: 10%;
|
||||
background: rgba(15, 52, 96, 0.1);
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #e0e6ff;
|
||||
backdrop-filter: blur(2px);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.menu-title h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
background: #3c9cff;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
font-weight: 600;
|
||||
padding: 0 4px 8px 4px;
|
||||
color: #e0e6ff;
|
||||
font-size: 20px;
|
||||
border-bottom: 1px solid rgba(26, 80, 139, 0.5);
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
height: 90%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
gap: 8px;
|
||||
padding: 4px 0;
|
||||
margin-top: 0;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.menu-list::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.menu-list::-webkit-scrollbar-track {
|
||||
background: rgba(26, 80, 139, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.menu-list::-webkit-scrollbar-thumb {
|
||||
background: rgba(26, 80, 139, 0.5);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.menu-list::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(26, 80, 139, 0.7);
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(15, 52, 96, 0.1);
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 16px;
|
||||
border-radius: 8px;
|
||||
color: #e0e6ff;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
background: rgba(26, 80, 139, 0.2);
|
||||
color: #e0e6ff;
|
||||
text-align: center;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background: rgba(26, 80, 139, 0.3);
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.2);
|
||||
}
|
||||
|
||||
.menu-item.active {
|
||||
border-color: rgba(60, 156, 255, 0.6);
|
||||
box-shadow: 0 4px 12px rgba(60, 156, 255, 0.2);
|
||||
background: rgba(60, 156, 255, 0.1);
|
||||
background: linear-gradient(90deg, rgba(26, 80, 139, 0.8), rgba(60, 156, 255, 0.8));
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.4);
|
||||
}
|
||||
|
||||
/* 你原来的媒体查询我完全不动 */
|
||||
@media (max-width: 1600px) {
|
||||
.work-layout-container {
|
||||
padding: 6px;
|
||||
gap: 4px;
|
||||
}
|
||||
.work-section {
|
||||
gap: 4px;
|
||||
}
|
||||
.work-col-1-3 {
|
||||
width: calc((100% - 8px) / 3);
|
||||
}
|
||||
.work-card-1-3 {
|
||||
height: calc((100% - 8px) / 3);
|
||||
}
|
||||
.work-card-2-3 {
|
||||
height: calc(2 * ((100% - 8px) / 3) + 4px);
|
||||
}
|
||||
.work-card {
|
||||
padding: 10px;
|
||||
}
|
||||
.work-card h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.work-card p {
|
||||
font-size: 12px;
|
||||
}
|
||||
.work-main-section {
|
||||
height: 100%;
|
||||
width: 85%;
|
||||
background: transparent;
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
backdrop-filter: blur(2px);
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.work-layout-container {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
padding: 6px;
|
||||
gap: 6px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.work-section {
|
||||
flex-direction: column;
|
||||
height: auto !important;
|
||||
min-height: 120px;
|
||||
gap: 6px;
|
||||
}
|
||||
.work-col-1-3 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.work-left-col, .work-middle-col, .work-right-col {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
}
|
||||
.work-card-1-3, .work-card-2-3 {
|
||||
height: 120px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.work-card {
|
||||
padding: 8px;
|
||||
}
|
||||
.menu-content {
|
||||
padding: 0 4px;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
color: #e0e6ff;
|
||||
}
|
||||
|
||||
@media (max-height: 900px) {
|
||||
.work-layout-container {
|
||||
padding: 6px;
|
||||
gap: 4px;
|
||||
}
|
||||
.work-section {
|
||||
gap: 4px;
|
||||
}
|
||||
.work-card {
|
||||
padding: 8px;
|
||||
}
|
||||
.work-card h3 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.work-card p {
|
||||
font-size: 12px;
|
||||
}
|
||||
.menu-content h4 {
|
||||
margin: 0 0 16px 0;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
border-bottom: 1px solid rgba(26, 80, 139, 0.5);
|
||||
padding-bottom: 8px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.menu-content p {
|
||||
margin: 0;
|
||||
color: #e0e6ff;
|
||||
line-height: 1.6;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user