vue3实现亮色服务器后台管理监控仪表盘ui代码
代码语言:html
所属分类:布局界面
代码描述:vue3实现亮色服务器后台管理监控仪表盘ui代码
代码标签: vue 服务器 亮色 后台 管理 监控 仪表盘 ui 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>服务器可视化管理系统</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue.global.3.2.37.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/echarts.5.4.2.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.app {
display: flex;
min-height: 100vh;
}
.sidebar {
width: 250px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 80px;
}
.sidebar-header {
padding: 20px;
text-align: center;
border-bottom: 1px solid #e0e0e0;
}
.logo {
font-size: 24px;
font-weight: bold;
color: #333;
margin-bottom: 5px;
}
.sidebar.collapsed .logo {
font-size: 18px;
}
.nav-menu {
list-style: none;
padding: 20px 0;
}
.nav-item {
margin: 5px 0;
}
.nav-link {
display: flex;
align-items: center;
padding: 15px 20px;
color: #555;
text-decoration: none;
transition: all 0.3s ease;
cursor: pointer;
}
.nav-link:hover, .nav-link.active {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.nav-icon {
margin-right: 15px;
width: 20px;
height: 20px;
}
.sidebar.collapsed .nav-text {
display: none;
}
.main-content {
flex: 1;
padding: 20px;
overflow-y: auto;
}
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
padding: 20px 30px;
border-radius: 15px;
margin-bottom: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: between;
align-items: center;
}
.header-title {
font-size: 28px;
font-weight: bold;
color: #333;
}
.header-actions {
display: flex;
gap: 15px;
margin-left: auto;
}
.btn {
padding: 10px 20px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #f8f9fa;
color: #666;
border: 1px solid #e0e0e0;
}
.btn-secondary:hover {
background: #e9ecef;
}
.content-section {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 30px;
margin-bottom: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.grid {
display: grid;
gap: 20px;
}
.grid-2 {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-3 {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.grid-4 {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.card-title {
font-size: 18px;
font-weight: bold;
color: #333;
}
.status-badge {
padding: 4px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: bold;
}
.status-online {
background: #d4edda;
color: #155724;
}
.status-offline {
background: #f8d7da;
color: #721c24;
}
.status-warning {
background: #fff3cd;
color: #856404;
}
.server-image {
width: 100%;
height: 120px;
object-fit: cover;
border-radius: 8px;
margin-bottom: 15px;
}
.metric {
display: flex;
justify-content: space-between;
margin: 10px 0;
padding: 8px 0;
border-bottom: 1px solid #f0f0f0;
}
.metric:last-child {
border-bottom: none;
}
.metric-label {
color: #666;
font-size: 14px;
}
.metric-value {
font-weight: bold;
color: #333;
}
.progress-bar {
width: 100%;
height: 8px;
background: #f0f0f0;
border-radius: 4px;
overflow: hidden;
margin: 10px 0;
}
.progress-fill {
height: 100%;
transition: width 0.3s ease;
}
.progress-low {
background: linear-gradient(90deg, #4caf50, #81c784);
}
.progress-medium {
background: linear-gradient(90deg, #ff9800, #ffb74d);
}
.progress-high {
background: linear-gradient(90deg, #f44336, #e57373);
}
.chart-container {
height: 300px;
margin: 20px 0;
}
.table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.table th,
.table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e0e0e0;
}
.table th {
background: #f8f9fa;
font-weight: bold;
color: #333;
}
.table tr:hover {
background: #f8f9fa;
}
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.modal-content {
background: white;
border-radius: 15px;
padding: 30px;
width: 90%;
max-width: 500px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-title {
font-size: 20px;
font-weight: bold;
color: #333;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #666;
}
.form-group {
margin-bottom: 20px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #333;
}
.form-input {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 14px;
transition: border-color 0.3s ease;
}
.form-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.form-select {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 8px;
background: white;
font-size: 14px;
}
.toggle-btn {
background: none;
border: none;
cursor: pointer;
padding: 10px;
border-radius: 8px;
transition: background 0.3s ease;
}
.toggle-btn:hover {
background: rgba(102, 126, 234, 0.1);
}
@media (max-width: 768px) {
.sidebar {
width: 80px;
}
.sidebar .nav-text {
display: none;
}
.header {
padding: 15px 20px;
}
.header-title {
font-size: 24px;
}
.main-content {
padding: 15px;
}
.content-section {
padding: 20px;
}
.grid-2,
.grid-3,
.grid-4 {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div id="app">
<div class="app">
<!-- 侧边栏 -->
<nav class="sidebar" :class="{ collapsed: sidebarCollapsed }">.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0