大屏页面初始化
This commit is contained in:
BIN
screen-vue/src/assets/images/setting.png
Normal file
BIN
screen-vue/src/assets/images/setting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
277
screen-vue/src/views/screen/Setting/index.vue
Normal file
277
screen-vue/src/views/screen/Setting/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="work-layout-container">
|
||||
<div class="work-left-sidebar">
|
||||
<div class="menu-title">
|
||||
<h3>指标配置</h3>
|
||||
</div>
|
||||
<div class="menu-list">
|
||||
<div
|
||||
class="menu-item"
|
||||
:class="{ active: activeMenu === item.key }"
|
||||
v-for="item in menuList"
|
||||
:key="item.key"
|
||||
@click="activeMenu = item.key"
|
||||
>
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="work-section work-main-section">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const menuList = ref([
|
||||
{ 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 */
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
margin: 0 !important;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
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%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
height: 10%;
|
||||
background: rgba(15, 52, 96, 0.1);
|
||||
border: 1px solid rgba(26, 80, 139, 0.3);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #e0e6ff;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
height: 90%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.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);
|
||||
border-radius: 8px;
|
||||
color: #e0e6ff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
/* 你原来的媒体查询我完全不动 */
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -31,6 +31,7 @@
|
||||
value-format="YYYY"
|
||||
></el-date-picker>
|
||||
<button class="query-btn" @click="handleQuery">查询</button>
|
||||
<img src="@/assets/images/setting.png" class="setting-btn" @click="handleSetting" />
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -50,7 +51,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { getHomeModuleList } from '@/api/bizApi'
|
||||
import HomePage from './Home/index.vue'
|
||||
|
||||
@@ -112,6 +113,11 @@ const handleQuery = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 新增设置按钮点击事件
|
||||
const handleSetting = () => {
|
||||
router.push('/screen/Setting/index');
|
||||
};
|
||||
|
||||
async function getList() {
|
||||
try {
|
||||
const res = await getHomeModuleList();
|
||||
@@ -186,6 +192,24 @@ onMounted(() => {
|
||||
.dark-date-popper .el-date-table td.in-range .el-date-table-cell::before {
|
||||
background-color: rgba(60, 156, 255, 0.25) !important;
|
||||
}
|
||||
|
||||
/* 新增设置弹窗样式 */
|
||||
.dark-message-box {
|
||||
background-color: #0f3460 !important;
|
||||
border: 1px solid #1a508b !important;
|
||||
}
|
||||
.dark-message-box .el-message-box__header,
|
||||
.dark-message-box .el-message-box__content {
|
||||
background-color: #0f3460 !important;
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
.dark-message-box .el-message-box__title {
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
.confirm-btn {
|
||||
background: linear-gradient(90deg, #1a508b, #3c9cff) !important;
|
||||
border: 1px solid #1a508b !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
@@ -350,6 +374,26 @@ onMounted(() => {
|
||||
background: linear-gradient(90deg, #154580, #2b8ed8);
|
||||
}
|
||||
|
||||
.setting-btn {
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(90deg, #1a508b, #3c9cff);
|
||||
border: 1px solid #1a508b;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.setting-btn:hover {
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.6);
|
||||
background: linear-gradient(90deg, #154580, #2b8ed8);
|
||||
}
|
||||
|
||||
.screen-content {
|
||||
flex: 1;
|
||||
padding: 1px;
|
||||
@@ -396,11 +440,15 @@ onMounted(() => {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
.query-btn, .setting-btn {
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
padding: 0 18px;
|
||||
}
|
||||
.setting-btn {
|
||||
width: 32px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 900px) {
|
||||
@@ -414,9 +462,12 @@ onMounted(() => {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
.query-btn, .setting-btn {
|
||||
height: 32px;
|
||||
}
|
||||
.setting-btn {
|
||||
width: 32px;
|
||||
}
|
||||
.screen-content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 65px);
|
||||
|
||||
Reference in New Issue
Block a user