|
@@ -1,59 +1,71 @@
|
|
|
<template>
|
|
|
<div class="login">
|
|
|
- <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="账号"
|
|
|
- >
|
|
|
- <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"
|
|
|
- >
|
|
|
- <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"
|
|
|
- >
|
|
|
- <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"/>
|
|
|
- </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"
|
|
|
- >
|
|
|
- <span v-if="!loading">登 录</span>
|
|
|
- <span v-else>登 录 中...</span>
|
|
|
- </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 class="loginCarousel">
|
|
|
+ <el-carousel height="calc(100vh)">
|
|
|
+ <el-carousel-item v-for="(item,index) in images" :key="index">
|
|
|
+ <div :key="index"
|
|
|
+ :style="{width:'100%',height:'calc(100vh)','background':'url('+item+') -2px -1px no-repeat','background-size': '100% 100%'}">
|
|
|
+ </div>
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ </div>
|
|
|
+ <div class="login-form-con flex justify-center">
|
|
|
+ <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="账号"
|
|
|
+ >
|
|
|
+ <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"
|
|
|
+ >
|
|
|
+ <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"
|
|
|
+ >
|
|
|
+ <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"/>
|
|
|
+ </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"
|
|
|
+ >
|
|
|
+ <span v-if="!loading">登 录</span>
|
|
|
+ <span v-else>登 录 中...</span>
|
|
|
+ </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">
|
|
|
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
|
|
@@ -66,6 +78,11 @@ import { getCodeImg } from "@/api/login";
|
|
|
import Cookies from "js-cookie";
|
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
|
|
|
|
|
+import bg1 from '../assets/images/login/bg1.jpg'
|
|
|
+import bg4 from '../assets/images/login/bg4.jpg'
|
|
|
+import bg5 from '../assets/images/login/bg5.jpg'
|
|
|
+import bg6 from '../assets/images/login/bg6.jpg'
|
|
|
+
|
|
|
export default {
|
|
|
name: "Login",
|
|
|
data() {
|
|
@@ -92,7 +109,8 @@ export default {
|
|
|
captchaEnabled: true,
|
|
|
// 注册开关
|
|
|
register: false,
|
|
|
- redirect: undefined
|
|
|
+ redirect: undefined,
|
|
|
+ images: [bg4, bg5, bg6, bg1]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -157,12 +175,23 @@ export default {
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
.login {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- height: 100%;
|
|
|
- background-image: url("../assets/images/login-background.jpg");
|
|
|
- background-size: cover;
|
|
|
+ position: relative;
|
|
|
+ //display: flex;
|
|
|
+ //justify-content: center;
|
|
|
+ //align-items: center;
|
|
|
+ //height: 100%;
|
|
|
+ //background-image: url("../assets/images/login-background.jpg");
|
|
|
+ //background-size: cover;
|
|
|
+}
|
|
|
+.login-form-con{
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 28vh;
|
|
|
+ z-index: 100;
|
|
|
+}
|
|
|
+.loginCarousel {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100vh);
|
|
|
}
|
|
|
.title {
|
|
|
margin: 0px auto 30px auto;
|