219 lines
6.5 KiB
HTML
219 lines
6.5 KiB
HTML
<!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>
|
|
<!-- Element UI CSS -->
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
<!-- 美化样式 -->
|
|
<link rel="stylesheet" href="enhanced-styles.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: #f0f2f5;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.login-container {
|
|
background: #ffffff;
|
|
border-radius: 4px;
|
|
padding: 40px;
|
|
width: 100%;
|
|
max-width: 420px;
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.1);
|
|
}
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
.logo {
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
.logo-icon {
|
|
width: 80px;
|
|
height: 80px;
|
|
background: #409EFF;
|
|
border-radius: 50%;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 36px;
|
|
color: white;
|
|
margin-bottom: 16px;
|
|
}
|
|
.logo-title {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
.logo-subtitle {
|
|
font-size: 14px;
|
|
color: #999;
|
|
margin-top: 8px;
|
|
}
|
|
.form-item {
|
|
margin-bottom: 24px;
|
|
}
|
|
.form-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
color: #333;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 10px 14px;
|
|
border: 1px solid #d9d9d9;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
transition: border-color 0.3s;
|
|
background: #ffffff;
|
|
}
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: #409EFF;
|
|
}
|
|
.password-wrapper {
|
|
position: relative;
|
|
}
|
|
.password-toggle {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
color: #999;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
}
|
|
.remember-forgot {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
.remember {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
.remember input {
|
|
margin-right: 8px;
|
|
}
|
|
.forgot-link {
|
|
color: #409EFF;
|
|
font-size: 14px;
|
|
text-decoration: none;
|
|
}
|
|
.forgot-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.btn-login {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background: #409EFF;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
}
|
|
.btn-login:hover {
|
|
background: #66b1ff;
|
|
}
|
|
</style>
|
|
<!-- Vue.js -->
|
|
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
|
<!-- Element UI JS -->
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<div class="logo">
|
|
<div class="logo-icon">OA</div>
|
|
<div class="logo-title">OA系统</div>
|
|
<div class="logo-subtitle">企业办公管理平台</div>
|
|
</div>
|
|
|
|
<form id="loginForm">
|
|
<div class="form-item">
|
|
<label class="form-label">用户名</label>
|
|
<input type="text" class="form-input" placeholder="请输入用户名" required>
|
|
</div>
|
|
|
|
<div class="form-item">
|
|
<label class="form-label">密码</label>
|
|
<div class="password-wrapper">
|
|
<input type="password" class="form-input" placeholder="请输入密码" id="passwordInput" required>
|
|
<button type="button" class="password-toggle" onclick="togglePassword()">👁️</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="remember-forgot">
|
|
<label class="remember">
|
|
<input type="checkbox">
|
|
<span>记住密码</span>
|
|
</label>
|
|
<a href="forgot-password.html" class="forgot-link">忘记密码?</a>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-login">登录</button>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
const input = document.getElementById('passwordInput');
|
|
const toggle = event.target;
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
toggle.textContent = '🙈';
|
|
} else {
|
|
input.type = 'password';
|
|
toggle.textContent = '👁️';
|
|
}
|
|
}
|
|
|
|
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
const username = this.querySelector('input[type="text"]').value;
|
|
const password = this.querySelector('input[type="password"]').value;
|
|
|
|
if (!username || !password) {
|
|
CommonUtils.showMessage('请输入用户名和密码', 'error');
|
|
return;
|
|
}
|
|
|
|
const btn = this.querySelector('.btn-login');
|
|
btn.textContent = '登录中...';
|
|
btn.disabled = true;
|
|
|
|
setTimeout(() => {
|
|
window.location.href = 'project-initiation.html';
|
|
}, 800);
|
|
});
|
|
</script>
|
|
<script src="common.js"></script>
|
|
</body>
|
|
</html>
|
|
|