feat: 修改登录页

This commit is contained in:
2025-03-05 20:43:03 +08:00
parent 64a7502568
commit 930a9ca564
2 changed files with 145 additions and 60 deletions

View File

@@ -41,18 +41,22 @@
"bpmn-js-token-simulation": "0.10.0", "bpmn-js-token-simulation": "0.10.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "3.25.3", "core-js": "3.25.3",
"diagram-js": "^15.2.4",
"echarts": "5.4.0", "echarts": "5.4.0",
"element-ui": "2.15.12", "element-ui": "2.15.12",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "10.5.0", "highlight.js": "10.5.0",
"husky": "^9.1.7",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"serve-static": "^1.16.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"throttle-debounce": "^5.0.2",
"v-emoji-picker": "^2.3.3", "v-emoji-picker": "^2.3.3",
"vue": "2.6.12", "vue": "2.6.12",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
@@ -70,6 +74,9 @@
"@vue/cli-service": "4.4.6", "@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"bpmn-js": "7.5.0",
"bpmn-js-properties-panel": "0.37.2",
"camunda-bpmn-moddle": "4.4.1",
"chalk": "4.1.0", "chalk": "4.1.0",
"compression-webpack-plugin": "5.0.2", "compression-webpack-plugin": "5.0.2",
"connect": "3.6.6", "connect": "3.6.6",
@@ -81,10 +88,7 @@
"sass-loader": "10.1.1", "sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5", "script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12", "vue-template-compiler": "2.6.12"
"bpmn-js": "7.5.0",
"bpmn-js-properties-panel": "0.37.2",
"camunda-bpmn-moddle": "4.4.1"
}, },
"engines": { "engines": {
"node": ">=8.9", "node": ">=8.9",

View File

@@ -1,59 +1,66 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <div class="left">
<h3 class="title">福安德综合办公系统</h3> <h1>福安德综合办公系统</h1>
<el-form-item prop="username"> </div>
<el-input <div class="right">
v-model="loginForm.username" <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
type="text" <h3 class="title">福安德综合办公系统</h3>
auto-complete="off" <el-form-item prop="username">
placeholder="账号" <el-input
> v-model="loginForm.username"
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> type="text"
</el-input> auto-complete="off"
</el-form-item> placeholder="账号"
<el-form-item prop="password"> >
<el-input <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
v-model="loginForm.password" </el-input>
type="password" </el-form-item>
auto-complete="off" <el-form-item prop="password">
placeholder="密码" <el-input
@keyup.enter.native="handleLogin" v-model="loginForm.password"
> type="password"
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> auto-complete="off"
</el-input> placeholder="密码"
</el-form-item> @keyup.enter.native="handleLogin"
<el-form-item prop="code" v-if="captchaEnabled"> >
<el-input <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
v-model="loginForm.code" </el-input>
auto-complete="off" </el-form-item>
placeholder="验证码" <el-form-item prop="code" v-if="captchaEnabled">
style="width: 63%" <el-input
@keyup.enter.native="handleLogin" v-model="loginForm.code"
> auto-complete="off"
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> placeholder="验证码"
</el-input> style="width: 63%"
<div class="login-code"> @keyup.enter.native="handleLogin"
<img :src="codeUrl" @click="getCode" class="login-code-img"/> >
</div> <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-form-item> </el-input>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> <div class="login-code">
<el-form-item style="width:100%;"> <img :src="codeUrl" @click="getCode" class="login-code-img"/>
<el-button </div>
:loading="loading" </el-form-item>
size="medium" <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
type="primary" <el-form-item style="width:100%;">
style="width:100%;" <el-button
@click.native.prevent="handleLogin" :loading="loading"
> size="medium"
<span v-if="!loading"> </span> type="primary"
<span v-else> 中...</span> style="width:100%;"
</el-button> class="login-button"
<div style="float: right;" v-if="register"> @click.native.prevent="handleLogin"
<router-link class="link-type" :to="'/register'">立即注册</router-link> >
</div> <span v-if="!loading" > </span>
</el-form-item> <span v-else> 中...</span>
</el-form> </el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
</div>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2024 spark All Rights Reserved.</span> <span>Copyright © 2024 spark All Rights Reserved.</span>
@@ -161,20 +168,70 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
width: 100vw;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/images/login-background.jpg");
background-size: cover; background-size: cover;
} }
.left {
flex: 2;
height: 100vh;
position: relative;
display: block;
h1 {
position: absolute;
top: 30px;
left: 40px;
color: white;
font-size: 36px;
font-weight: 500;
}
}
.right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #191d3490;
box-sizing: border-box;
color: #04c4dc;
padding: 30px;
height: 100vh;
}
.title { .title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #04c4dc;
} }
.el-form-item:focus-within {
border-color: #00e5ff;
box-shadow: 0 0 20rpx rgba(0, 229, 255, 0.3);
}
input {
flex: 1;
height: 100%;
margin-left: 20rpx;
color: #fff;
font-size: 28rpx;
}
.placeholder {
color: rgba(255, 255, 255, 0.4);
}
.login-form { .login-form {
border-radius: 6px; border-radius: 6px;
background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
border-radius: 20rpx;
backdrop-filter: blur(10px);
border: 2px solid rgba(0, 229, 255, 0.1);
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
@@ -216,4 +273,28 @@ export default {
.login-code-img { .login-code-img {
height: 38px; height: 38px;
} }
.login-button {
width: 100%;
height: 90rpx;
background: linear-gradient(45deg, #00e5ff, #b400ff);
border-radius: 45rpx;
color: #fff;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 40rpx;
border: none;
position: relative;
overflow: hidden;
}
.login-button::after {
border: none;
}
.login-button:active {
transform: scale(0.98);
}
</style> </style>