jsmpeg地址指向,侧边栏指向修改

This commit is contained in:
龚皓 2024-10-25 16:51:53 +08:00
parent 1d550b8952
commit 47dc751cca
2 changed files with 21 additions and 9 deletions

View File

@ -5,7 +5,7 @@
<link rel="icon" href="/icon.ico"> <link rel="icon" href="/icon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>告警管理</title> <title>告警管理</title>
<script src="public\static\jsmpeg-master\jsmpeg.min.js"></script> <script src="/static/jsmpeg-master/jsmpeg.min.js"></script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -22,7 +22,11 @@
<el-icon><Avatar /></el-icon> <el-icon><Avatar /></el-icon>
<template #title><span>用户管理</span></template> <template #title><span>用户管理</span></template>
</el-menu-item> </el-menu-item>
<el-sub-menu index="1"> <el-menu-item index="/settings">
<el-icon><Setting /></el-icon>
<template #title><span>告警设置</span></template>
</el-menu-item>
<!-- <el-sub-menu index="1">
<template #title> <template #title>
<el-icon><Location /></el-icon> <el-icon><Location /></el-icon>
<span>面板测试</span> <span>面板测试</span>
@ -43,7 +47,7 @@
<el-icon><Document /></el-icon> <el-icon><Document /></el-icon>
<template #title><span>功能点3测试</span></template> <template #title><span>功能点3测试</span></template>
</el-menu-item> </el-menu-item>
</el-sub-menu> </el-sub-menu> -->
</el-menu> </el-menu>
</el-aside> </el-aside>
@ -64,7 +68,7 @@
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item> <el-dropdown-item @click="goToUserManagement">
<el-icon><User /></el-icon> <el-icon><User /></el-icon>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="onLogout"> <el-dropdown-item @click="onLogout">
@ -92,7 +96,7 @@ import { ref, watch, onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { import {
Document, WarningFilled, Location, User, SwitchButton, Document, WarningFilled, Location, User, SwitchButton,
House, Management, TrendCharts, Avatar, Fold, Expand House, Management, TrendCharts, Avatar, Fold, Expand ,Setting
} from '@element-plus/icons-vue'; } from '@element-plus/icons-vue';
import { BoxApi } from '@/utils/boxApi'; import { BoxApi } from '@/utils/boxApi';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
@ -103,6 +107,10 @@ const activeIndex = ref(route.path);
const isCollapse = ref(false); // const isCollapse = ref(false); //
const username = ref(''); // const username = ref(''); //
const goToUserManagement = () => {
router.push('/userList'); //
};
onMounted(() => { onMounted(() => {
const storedUsername = localStorage.getItem('username'); const storedUsername = localStorage.getItem('username');
username.value = storedUsername ? storedUsername : '用户'; username.value = storedUsername ? storedUsername : '用户';
@ -241,14 +249,18 @@ const onLogout = async () => {
} }
.nav-footer { .nav-footer {
background-color: #fff; background-color: #001529;
font-size: 16px; /* background: linear-gradient(to top, rgb(3, 158, 185,0.7), rgb(123, 3, 153,0.7)); */
color: #333; font-size: 12px;
height: 5vh; color: #fff;
font-weight: bold;
height: 2vh;
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
align-items: center;
margin: 0; margin: 0;
padding: 0; padding: 0;
border: 1px solid #001529;
} }
</style> </style>