|
|
|
@ -1,54 +1,45 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="login">
|
|
|
|
|
<div class="loginleft">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
|
|
<h3 class="title">工业园区工业上楼项目</h3>
|
|
|
|
|
<el-form-item prop="username">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="loginForm.username"
|
|
|
|
|
type="text"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
placeholder="账号"
|
|
|
|
|
<img src="@/assets/images/logo@2x.png" alt="">
|
|
|
|
|
<div class="title">工业园区工业上楼项目系统</div>
|
|
|
|
|
<div class="logintabs">
|
|
|
|
|
<!-- @tab-click="handleClick" -->
|
|
|
|
|
<el-tabs
|
|
|
|
|
v-model="activeName"
|
|
|
|
|
:stretch="true"
|
|
|
|
|
color = "#216CDC"
|
|
|
|
|
>
|
|
|
|
|
<el-tab-pane label="企业用户登录" name="first"></el-tab-pane>
|
|
|
|
|
<el-tab-pane label="政务人员登录" name="second"></el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
<el-form-item prop="username" class="loginitem" style="margin-top: 1rem;">
|
|
|
|
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
|
|
|
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="password">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="loginForm.password"
|
|
|
|
|
type="password"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
placeholder="密码"
|
|
|
|
|
@keyup.enter.native="handleLogin"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item prop="password" class="loginitem">
|
|
|
|
|
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
|
|
|
|
@keyup.enter.native="handleLogin">
|
|
|
|
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="code" v-if="captchaEnabled">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="loginForm.code"
|
|
|
|
|
auto-complete="off"
|
|
|
|
|
placeholder="验证码"
|
|
|
|
|
style="width: 63%"
|
|
|
|
|
@keyup.enter.native="handleLogin"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item prop="code" v-if="captchaEnabled" class="loginitem">
|
|
|
|
|
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
|
|
|
|
|
@keyup.enter.native="handleLogin">
|
|
|
|
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
|
|
|
|
</el-input>
|
|
|
|
|
<div class="login-code">
|
|
|
|
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
|
|
|
|
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
|
|
|
|
<el-form-item style="width:100%;">
|
|
|
|
|
<el-button
|
|
|
|
|
:loading="loading"
|
|
|
|
|
size="medium"
|
|
|
|
|
type="primary"
|
|
|
|
|
style="width:100%;"
|
|
|
|
|
@click.native.prevent="handleLogin"
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:1rem 18.6rem 25px 0px;">记住密码</el-checkbox>
|
|
|
|
|
<el-form-item style="width:24rem;;margin-top: 1rem;">
|
|
|
|
|
<el-button :loading="loading" size="medium" type="primary" style="width:100%;background: #2B62F1;"
|
|
|
|
|
@click.native.prevent="handleLogin">
|
|
|
|
|
<span v-if="!loading">登 录</span>
|
|
|
|
|
<span v-else>登 录 中...</span>
|
|
|
|
|
</el-button>
|
|
|
|
@ -59,7 +50,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<div class="el-login-footer">
|
|
|
|
|
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
|
|
|
|
|
<span></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -73,6 +64,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
codeUrl: '',
|
|
|
|
|
activeName: 'second',
|
|
|
|
|
loginForm: {
|
|
|
|
|
username: 'admin',
|
|
|
|
|
password: 'admin123',
|
|
|
|
@ -142,7 +134,7 @@ export default {
|
|
|
|
|
Cookies.remove('rememberMe')
|
|
|
|
|
}
|
|
|
|
|
this.$store.dispatch('Login', this.loginForm).then(() => {
|
|
|
|
|
this.$router.push({ path: this.redirect || '/' }).catch(() => {})
|
|
|
|
|
this.$router.push({ path: this.redirect || '/' }).catch(() => { })
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
if (this.captchaEnabled) {
|
|
|
|
@ -157,59 +149,120 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
|
::v-deep .el-tabs__active-bar {
|
|
|
|
|
width: 2rem !important;
|
|
|
|
|
margin-left: 3rem;
|
|
|
|
|
background-color: #216CDC;
|
|
|
|
|
height: 0.21rem;
|
|
|
|
|
border-radius: 0.16rem;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-tabs__header {
|
|
|
|
|
border-bottom: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-tabs__item {
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
padding:0 20px;
|
|
|
|
|
color: #3D424C;
|
|
|
|
|
font-family: Alibaba PuHuiTi;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #3D424C;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-tabs__item.is-active {
|
|
|
|
|
color: #216CDC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-tabs__nav-wrap::after {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.login {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
border-radius: 6px 0 0 6px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background-image: url('../assets/images/loginbackground.png');
|
|
|
|
|
background-size: cover;
|
|
|
|
|
}
|
|
|
|
|
.loginleft{
|
|
|
|
|
width: 35rem ;
|
|
|
|
|
height: 23rem;
|
|
|
|
|
}.loginleft {
|
|
|
|
|
width: 35rem;
|
|
|
|
|
height: 40rem;
|
|
|
|
|
background-image: url('../assets/images/loginleft.jpg');
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
margin: 0 auto 30px;
|
|
|
|
|
width: 25.13rem;
|
|
|
|
|
height: 1.94rem;
|
|
|
|
|
font-family: Alibaba PuHuiTi;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
color: #292C33;
|
|
|
|
|
line-height: 3.5rem;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #707070;
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
}
|
|
|
|
|
.loginitem{
|
|
|
|
|
width: 24rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.login-form {
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
border-radius: 0 6px 6px 0;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
width: 400px;
|
|
|
|
|
width: 50rem;
|
|
|
|
|
height: 40rem;
|
|
|
|
|
padding: 25px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
width: 6.56rem;
|
|
|
|
|
height: 3.56rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
|
height: 38px;
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
height: 38px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input-icon {
|
|
|
|
|
height: 39px;
|
|
|
|
|
width: 14px;
|
|
|
|
|
margin-left: 2px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.login-tip {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #bfbfbf;
|
|
|
|
|
}
|
|
|
|
|
.logintabs{
|
|
|
|
|
margin-top: 2.88rem;
|
|
|
|
|
width: 18rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.login-code {
|
|
|
|
|
width: 33%;
|
|
|
|
|
height: 38px;
|
|
|
|
|
float: right;
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-login-footer {
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
@ -222,7 +275,16 @@ export default {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
letter-spacing: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.login-code-img {
|
|
|
|
|
height: 38px;
|
|
|
|
|
}
|
|
|
|
|
.el-tabs__item.is-active {
|
|
|
|
|
color: #216CDC;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding-bottom: 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|