20251126修改登录界面
This commit is contained in:
BIN
src/assets/images/background.png
Normal file
BIN
src/assets/images/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 MiB |
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<img
|
<img
|
||||||
style="position: fixed; width: 100%; height: 100%; z-index: -1; left: 0"
|
style="position: fixed; width: 100%; height: 100%; z-index: -1; left: 0; top: 0; object-fit: cover; object-position: center"
|
||||||
src="../../assets/images/background.jpg"
|
src="../../assets/images/background.png"
|
||||||
/>
|
/>
|
||||||
|
<h1 class="main-title">天津市林草资源专项调查管理平台</h1>
|
||||||
<el-form
|
<el-form
|
||||||
autocomplete="on"
|
autocomplete="on"
|
||||||
:model="loginForm"
|
:model="loginForm"
|
||||||
@@ -13,23 +14,18 @@
|
|||||||
label-width="0px"
|
label-width="0px"
|
||||||
class="card-box login-form"
|
class="card-box login-form"
|
||||||
>
|
>
|
||||||
<p class="title">{{ myname }}</p>
|
<p class="title">任务调度系统</p>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<span class="svg-container svg-container_login">
|
|
||||||
<svg-icon icon-class="user" />
|
|
||||||
</span>
|
|
||||||
<el-input
|
<el-input
|
||||||
name="username"
|
name="username"
|
||||||
type="text"
|
type="text"
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
autocomplete="on"
|
autocomplete="on"
|
||||||
placeholder="用户名"
|
placeholder="用户名"
|
||||||
|
prefix-icon="el-icon-user"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<span class="svg-container">
|
|
||||||
<svg-icon icon-class="password"></svg-icon>
|
|
||||||
</span>
|
|
||||||
<el-input
|
<el-input
|
||||||
name="password"
|
name="password"
|
||||||
:type="pwdType"
|
:type="pwdType"
|
||||||
@@ -37,22 +33,26 @@
|
|||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
autocomplete="on"
|
autocomplete="on"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
></el-input>
|
prefix-icon="el-icon-lock"
|
||||||
<span class="show-pwd" @click="showPwd">
|
>
|
||||||
<svg-icon v-show="pwdType == 'password'" icon-class="eye" />
|
<i
|
||||||
<svg-icon v-show="pwdType == ''" icon-class="eye2" />
|
slot="suffix"
|
||||||
</span>
|
:class="pwdType === 'password' ? 'el-icon-view' : 'el-icon-hide'"
|
||||||
|
@click="showPwd"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
></i>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
class="loginbutton"
|
class="login-button"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>登录</el-button
|
>登录</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button class="loginbutton" @click.native.prevent="toRegister"
|
<el-button class="register-button" @click.native.prevent="toRegister"
|
||||||
>注册</el-button
|
>注册</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span style="position: fixed; bottom: 10px; left: 10px; color: lightgray"
|
<span style="position: fixed; bottom: 10px; left: 10px; color: lightgray"
|
||||||
>6.12</span
|
>v20251113beta</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -137,6 +137,7 @@ export default {
|
|||||||
if (response.data.success == true) {
|
if (response.data.success == true) {
|
||||||
sessionStorage.setItem("access-user", response.data.data.role);
|
sessionStorage.setItem("access-user", response.data.data.role);
|
||||||
sessionStorage.setItem("access-id", response.data.data.id);
|
sessionStorage.setItem("access-id", response.data.data.id);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
sessionStorage.getItem("access-user") == "Admin" ||
|
sessionStorage.getItem("access-user") == "Admin" ||
|
||||||
sessionStorage.getItem("access-user") == "SuperAdmin" ||
|
sessionStorage.getItem("access-user") == "SuperAdmin" ||
|
||||||
@@ -213,120 +214,338 @@ body {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.svg-container {
|
|
||||||
color: #264672;
|
|
||||||
vertical-align: middle;
|
|
||||||
padding: 6px 0px 6px 0px;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 14.5px;
|
|
||||||
display: inline-block;
|
|
||||||
&_login {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.title {
|
.title {
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 20px;
|
font-size: 24px;
|
||||||
color: #264672;
|
font-weight: 600;
|
||||||
background: rgba(157, 187, 231, 0.1);
|
color: #2c3e50;
|
||||||
width: 402px;
|
background: linear-gradient(135deg, rgba(157, 187, 231, 0.15) 0%, rgba(157, 187, 231, 0.05) 100%);
|
||||||
height: 80px;
|
width: 100%;
|
||||||
line-height: 80px;
|
height: 70px;
|
||||||
margin-top: 0px;
|
line-height: 70px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 16px 16px 0 0;
|
||||||
|
border-bottom: 1px solid rgba(157, 187, 231, 0.2);
|
||||||
}
|
}
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-left: 21px;
|
margin-left: 30px;
|
||||||
margin-top: 24px;
|
margin-right: 30px;
|
||||||
width: 360px;
|
margin-top: 0;
|
||||||
height: 50px;
|
margin-bottom: 0;
|
||||||
background: rgba(157, 187, 231, 0.3) !important;
|
width: calc(100% - 60px);
|
||||||
border-radius: 4px !important;
|
height: auto;
|
||||||
|
min-height: 50px;
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
&:hover {
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
&:focus-within {
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
&:first-of-type {
|
||||||
|
margin-top: 24px;
|
||||||
|
}
|
||||||
|
&:not(:first-of-type):not(:nth-of-type(3)):not(:nth-of-type(4)) {
|
||||||
|
margin-top: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item__content {
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.el-form-item__error {
|
||||||
|
padding-left: 32px !important;
|
||||||
|
margin-left: 32px !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
.el-input {
|
.el-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 47px;
|
height: 50px;
|
||||||
width: 85%;
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
background: transparent;
|
background: transparent !important;
|
||||||
border: 0px;
|
border: 0px !important;
|
||||||
padding: 12px 0px 12px 10.8px;
|
padding: 14px 0px 14px 12px;
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
color: #264672;
|
color: #2c3e50;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
}
|
}
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: #264672;
|
color: #889aa4;
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
&:focus {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main-title {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 45px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: "PingFang SC", "Microsoft YaHei", "SimHei", "STHeiti", "Helvetica Neue", Arial, sans-serif;
|
||||||
|
font-size: 48px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #264672;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
text-shadow: 0 2px 8px rgba(38, 70, 114, 0.2),
|
||||||
|
0 4px 16px rgba(38, 70, 114, 0.15),
|
||||||
|
0 8px 32px rgba(38, 70, 114, 0.1);
|
||||||
|
letter-spacing: 5px;
|
||||||
|
line-height: 1.4;
|
||||||
|
padding: 0 30px 25px 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
animation: titleFadeIn 0.8s ease-out;
|
||||||
|
position: relative;
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
bottom: 0;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 150px;
|
||||||
|
height: 4px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(91, 141, 239, 0.3) 20%,
|
||||||
|
#5b8def 50%,
|
||||||
|
rgba(91, 141, 239, 0.3) 80%,
|
||||||
|
transparent 100%);
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0 2px 8px rgba(91, 141, 239, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes titleFadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-30px) scale(0.95);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0) scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-form {
|
.login-form {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: 150px auto;
|
margin: 120px auto;
|
||||||
//opacity: 0.9;
|
background: rgba(255, 255, 255, 0.85);
|
||||||
background: rgba(247, 248, 241, 0.9);
|
backdrop-filter: blur(20px);
|
||||||
box-shadow: 0 2px 40px 0 rgba(157, 187, 231, 0.5);
|
-webkit-backdrop-filter: blur(20px);
|
||||||
border-radius: 4px;
|
box-shadow: 0 8px 32px rgba(38, 70, 114, 0.15),
|
||||||
border-radius: 4px;
|
0 2px 8px rgba(0, 0, 0, 0.1),
|
||||||
width: 402px;
|
inset 0 1px 0 rgba(255, 255, 255, 0.6);
|
||||||
height: 438px;
|
border-radius: 20px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||||
|
width: 420px;
|
||||||
|
min-height: 450px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
animation: slideUp 0.6s ease-out;
|
||||||
}
|
}
|
||||||
.loginbutton {
|
@keyframes slideUp {
|
||||||
width: 360px;
|
from {
|
||||||
height: 50px;
|
opacity: 0;
|
||||||
margin-bottom: 24px;
|
transform: translateY(30px);
|
||||||
margin-top: 0px;
|
}
|
||||||
background: #9dbbe7 !important;
|
to {
|
||||||
border-color: #9dbbe7 !important;
|
opacity: 1;
|
||||||
border-radius: 4px;
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 按钮容器的间距调整
|
||||||
|
.el-form-item:nth-of-type(3) {
|
||||||
|
margin-top: 24px !important;
|
||||||
|
}
|
||||||
|
.el-form-item:nth-of-type(4) {
|
||||||
|
margin-top: 12px !important;
|
||||||
|
}
|
||||||
|
.login-button {
|
||||||
|
width: 100%;
|
||||||
|
height: 46px;
|
||||||
|
margin: 0;
|
||||||
|
background: linear-gradient(135deg, #5b8def 0%, #4a7dd8 100%) !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 12px !important;
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #ffffff;
|
font-weight: 600;
|
||||||
letter-spacing: 0;
|
color: #ffffff !important;
|
||||||
|
letter-spacing: 1px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow: 0 4px 14px rgba(91, 141, 239, 0.4),
|
||||||
|
0 2px 4px rgba(91, 141, 239, 0.2);
|
||||||
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 6px 20px rgba(91, 141, 239, 0.5),
|
||||||
|
0 4px 8px rgba(91, 141, 239, 0.3);
|
||||||
|
background: linear-gradient(135deg, #6b9dff 0%, #5a8de8 100%) !important;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
box-shadow: 0 3px 10px rgba(91, 141, 239, 0.35),
|
||||||
|
0 1px 3px rgba(91, 141, 239, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.register-button {
|
||||||
|
width: 100%;
|
||||||
|
height: 46px;
|
||||||
|
margin: 0;
|
||||||
|
background: rgba(255, 255, 255, 0.95) !important;
|
||||||
|
border: 1.5px solid #5b8def !important;
|
||||||
|
border-radius: 12px !important;
|
||||||
|
font-family: PingFangSC-Regular;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #5b8def !important;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 2px 8px rgba(91, 141, 239, 0.2),
|
||||||
|
0 1px 3px rgba(91, 141, 239, 0.1);
|
||||||
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
background: rgba(91, 141, 239, 0.08) !important;
|
||||||
|
border-color: #6b9dff !important;
|
||||||
|
border-width: 1.5px !important;
|
||||||
|
box-shadow: 0 4px 14px rgba(91, 141, 239, 0.3),
|
||||||
|
0 2px 6px rgba(91, 141, 239, 0.15);
|
||||||
|
color: #6b9dff !important;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
box-shadow: 0 2px 6px rgba(91, 141, 239, 0.25),
|
||||||
|
0 1px 2px rgba(91, 141, 239, 0.15);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.login-text1 {
|
.login-text1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 21px;
|
left: 30px;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
color: #aaa;
|
color: #7a8ba3;
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
&:hover {
|
||||||
|
color: #264672;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.login-text {
|
.login-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 21px;
|
right: 30px;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
color: #aaa;
|
color: #7a8ba3;
|
||||||
font-family: PingFangSC-Regular;
|
font-family: PingFangSC-Regular;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
&:hover {
|
||||||
|
color: #264672;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.show-pwd {
|
// Element UI 输入框图标样式
|
||||||
position: absolute;
|
.el-input__prefix,
|
||||||
right: 10px;
|
.el-input__suffix {
|
||||||
top: 7px;
|
color: #7a8ba3;
|
||||||
font-size: 16px;
|
transition: all 0.3s ease;
|
||||||
color: #889aa4;
|
}
|
||||||
|
.el-form-item:focus-within .el-input__prefix,
|
||||||
|
.el-form-item:focus-within .el-input__suffix {
|
||||||
|
color: #264672;
|
||||||
|
}
|
||||||
|
.el-input__suffix {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
&:hover {
|
||||||
|
color: #264672;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.extra-text {
|
.extra-text {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 0;
|
margin: 16px 30px 0 30px;
|
||||||
padding-left: 2px;
|
padding: 0;
|
||||||
|
width: calc(100% - 60px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media all and (max-width: 480px) {
|
@media all and (max-width: 480px) {
|
||||||
.login-form {
|
.main-title {
|
||||||
width: 300px !important;
|
font-size: 28px;
|
||||||
|
top: 40px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
padding: 0 20px;
|
||||||
|
line-height: 1.4;
|
||||||
|
&::before {
|
||||||
|
width: 80px;
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.login-container .loginbutton {
|
.login-form {
|
||||||
width: 260px !important;
|
width: 90% !important;
|
||||||
|
max-width: 340px !important;
|
||||||
|
margin: 180px auto;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.login-container .login-button,
|
||||||
|
.login-container .register-button {
|
||||||
|
width: 100% !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
.login-container .login-button {
|
||||||
|
margin-top: 32px !important;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
height: 46px !important;
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
.login-container .register-button {
|
||||||
|
margin-top: 16px !important;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
height: 46px !important;
|
||||||
|
font-size: 16px !important;
|
||||||
}
|
}
|
||||||
.login-container .el-form-item {
|
.login-container .el-form-item {
|
||||||
width: 260px !important;
|
width: calc(100% - 40px) !important;
|
||||||
|
margin-left: 20px !important;
|
||||||
|
margin-right: 20px !important;
|
||||||
|
}
|
||||||
|
.login-container .extra-text {
|
||||||
|
margin-left: 20px !important;
|
||||||
|
margin-right: 20px !important;
|
||||||
|
width: calc(100% - 40px) !important;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
border-radius: 16px 16px 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import SvgIcon from '@/components/SvgIcon'// svg组件
|
import SvgIcon from '@/components/SvgIcon'// svg组件
|
||||||
|
|
||||||
|
// 导入所有 SVG 图标
|
||||||
|
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||||
|
const req = require.context('./svg', false, /\.svg$/)
|
||||||
|
requireAll(req)
|
||||||
|
|
||||||
Vue.component('svg-icon', SvgIcon)
|
Vue.component('svg-icon', SvgIcon)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user