vue3实现简洁清爽pc端企业oa管理系统后台ui原型图代码
代码语言:html
所属分类:布局界面
代码描述:vue3实现简洁清爽pc端企业oa管理系统后台ui原型图代码,账号密码随便填写
代码标签: vue 简洁 清爽 pc端 企业 oa 管理 系统 后台 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>企业OA管理系统</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue3.2.22.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f7fa;
color: #333;
}
.app {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 登录页面 */
.login-container {
min-height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
align-items: center;
justify-content: center;
}
.login-card {
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
width: 400px;
}
.login-header {
text-align: center;
margin-bottom: 30px;
}
.login-header h1 {
color: #333;
font-size: 28px;
margin-bottom: 8px;
}
.login-header p {
color: #666;
font-size: 14px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
color: #333;
font-weight: 500;
}
.form-control {
width: 100%;
padding: 12px 16px;
border: 2px solid #e1e5e9;
border-radius: 8px;
font-size: 14px;
transition: border-color 0.3s;
}
.form-control:focus {
outline: none;
border-color: #667eea;
}
.btn {
display: inline-block;
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
text-align: center;
}
.btn-primary {
background: #667eea;
color: white;
width: 100%;
}
.btn-primary:hover {
background: #5a6fd8;
transform: translateY(-1px);
}
/* 主布局 */
.main-layout {
display: flex;
min-height: 100vh;
}
/* 侧边栏 */
.sidebar {
width: 260px;
background: #2c3e50;
color: white;
transition: all 0.3s;
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid #34495e;
}
.sidebar-header h2 {
font-size: 20px;
font-weight: 600;
}
.sidebar-nav {
padding: 20px 0;
}
.nav-item {
margin-bottom: 8px;
}
.nav-link {
display: flex;
align-items: center;
padding: 12px 20px;
color: #bdc3c7;
text-decoration: none;
transition: all 0.3s;
cursor: pointer;
}
.nav-link:hover,
.nav-link.active {
background: #34495e;
color: white;
}
.nav-link svg {
width: 20px;
height: 20px;
margin-right: 12px;
}
/* 主内容区域 */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
}
/* 顶部导航 */
.header {
background: white;
padding: 0 24px;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header-left h1 {
font-size: 20px;
color: #333;
}
.header-right {
display: flex;
align-items: center;
gap: 16px;
}
.user-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: #667eea;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 500;
}
/* 内容区域 */
.content {
flex: 1;
padding: 24px;
overflow-y: auto;
}
/* 卡片 */
.card {
background: white;
border-radius: 12px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
margin-bottom: 24px;
}
.card-header {
display: flex;
justify-content: between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 1px solid #f0f0f0;
}
.card-title {
font-size: 18px;
font-weight: 600;
color: #333;
}
/* 统计卡片 */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 24px;
margin-bottom: 24px;
}
.stat-card {
background: white;
padding: 24px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
align-items: center;
}
.stat-icon {
width: 48px;
height: 48px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
}
.stat-content h3 {
font-size: 24px;
font-weight: 600;
margin-bottom: 4px;
}
.stat-content p {
color: #666;
font-size: 14px;
}
/* 表格 */
.table-container {
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th,
.table td {
padding: 16px;
text-align: left;
border-bottom: 1px solid #f0f0f0;
}
.table th {
background: #f8f9fa;
font-weight: 600;
color: #333;
}
.table tbody tr:hover {
background: #f8f9fa;
}
/* 工具栏 */
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
gap: 16px;
}
.toolbar-left,
.toolbar-right {
display: flex;
align-items: center;
gap: 12px;
}
.search-box {
position: relative;
}
.search-input {
padding: 8px 36px 8px 12px;
border: 1px solid #ddd;
border-radius: 6px;
width: 250px;
}
.search-icon {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
width: 16px;
height: 16px;
color: #666;
}
/* 按钮样式 */
.btn-success {
background: #27ae60;
color: white;
}
.btn-success:hover {
background: #229954;
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
}
.btn-outline {
background: transparent;
border: 1px solid #ddd;
color: #333;
}
.btn-outline:hover {
background: #f8f9fa;
}
/* 表单 */
.form-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
/* 模态框 */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: white;
border-radius: 12px;
padding: 24px;
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 1px solid #f0f0f0;
}
.modal-title {
font-size: 18px;
font-weight: 600;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #666;
}
/* 状态标签 */
.badge {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.badge-success {
background: #d4edda;
color: #155724;
}
.badge-warning {
background: #fff3cd;
color: #856404;
}
.badge-danger {
background: #f8d7da;
color: #721c24;
}
/* 响应式 */
@media (max-width: 768px) {
.sidebar {
width: 80px;
}
.nav-link span {
display: none;
}
.stats-grid {
grid-template-columns: 1fr;
}
.toolbar {
flex-direction: column;
align-items: stretch;
}
.search-input {
width: 100%;
}
}
/* 动画 */
.fade-enter-active, .fade-leave-active {
transition: opacity 0.3s;
}
.fade-enter-from, .fade-leave-to {
opacity: 0;
}
.slide-enter-active, .slide-leave-active {
transition: transform 0.3s;
}
.slide-enter-from, .slide-leave-to {
transform: translateX(-100%);
}
</style>
</head>
<body>
<div id="app">
<!-- 登录页面 -->
<div v-if="currentPage === 'login'" class="login-container">
<div class="login-card">
<div class="login-header">
<h1>企业OA系统</h1>
<p>欢迎登录管理平台</p>
</div>
<form @submit.prevent="login">
<div class="form-group">
<label>用户名</label>
<input type="text" class="form-control" v-model="loginForm.username" placeholder="请输入用户名" required>
</div>
<div class="form-group">
<label>密码</label>
<input type="password" class="form-control" v-model="loginForm.password" placeholder="请输入密码" required>
</div>
<button type="submit" class="btn btn-primary">登录</button>
</form>
</div>
</div>
<!-- 主应用界面 -->
<div v-else class="app">
<div class="main-layout">
<!-- 侧边栏 -->
<nav class="sidebar">
<div class="sidebar-header">
<h2>OA系统</h2>
</div>
<ul class="sidebar-nav">
<li class="nav-item">
<a class="nav-link" :class="{active: currentPage === 'dashboard'}" @click="navigateTo('dashboard')">
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0