|
|
@ -1,7 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="login">
|
|
|
|
<div class="login" :class="loginClass">
|
|
|
|
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
|
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
|
<h3 class="title">甘蔗育种大数据平台</h3>
|
|
|
|
<h3 class="title">甘蔗育种大数据平台</h3>
|
|
|
|
|
|
|
|
<el-divider content-position="center">欢迎登录</el-divider>
|
|
|
|
<el-form-item prop="username">
|
|
|
|
<el-form-item prop="username">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="loginForm.username"
|
|
|
|
v-model="loginForm.username"
|
|
|
@ -10,7 +11,9 @@
|
|
|
|
auto-complete="off"
|
|
|
|
auto-complete="off"
|
|
|
|
placeholder="账号"
|
|
|
|
placeholder="账号"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
|
|
|
<template #prefix>
|
|
|
|
|
|
|
|
<svg-icon icon-class="user" class="el-input__icon input-icon"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="password">
|
|
|
|
<el-form-item prop="password">
|
|
|
@ -19,10 +22,13 @@
|
|
|
|
type="password"
|
|
|
|
type="password"
|
|
|
|
size="large"
|
|
|
|
size="large"
|
|
|
|
auto-complete="off"
|
|
|
|
auto-complete="off"
|
|
|
|
|
|
|
|
show-password
|
|
|
|
placeholder="密码"
|
|
|
|
placeholder="密码"
|
|
|
|
@keyup.enter="handleLogin"
|
|
|
|
@keyup.enter="handleLogin"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
|
|
|
|
<template #prefix>
|
|
|
|
|
|
|
|
<svg-icon icon-class="password" class="el-input__icon input-icon"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item prop="code" v-if="captchaEnabled">
|
|
|
|
<el-form-item prop="code" v-if="captchaEnabled">
|
|
|
@ -34,15 +40,18 @@
|
|
|
|
style="width: 63%"
|
|
|
|
style="width: 63%"
|
|
|
|
@keyup.enter="handleLogin"
|
|
|
|
@keyup.enter="handleLogin"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
|
|
|
|
<template #prefix>
|
|
|
|
|
|
|
|
<svg-icon icon-class="validCode" class="el-input__icon input-icon"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
<div class="login-code">
|
|
|
|
<div class="login-code">
|
|
|
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
|
|
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
|
|
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
|
|
|
<el-form-item style="width:100%;">
|
|
|
|
<el-form-item style="width:60%;margin: 20px auto">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
round
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
size="large"
|
|
|
|
size="large"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
@ -59,7 +68,7 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<!-- 底部 -->
|
|
|
|
<!-- 底部 -->
|
|
|
|
<div class="el-login-footer">
|
|
|
|
<div class="el-login-footer">
|
|
|
|
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
|
|
|
|
<span>中国科学院计算技术研究所 研制</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -69,12 +78,18 @@ import { getCodeImg } from "@/api/login";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import {encrypt, decrypt} from "@/utils/jsencrypt";
|
|
|
|
import {encrypt, decrypt} from "@/utils/jsencrypt";
|
|
|
|
import useUserStore from '@/store/modules/user'
|
|
|
|
import useUserStore from '@/store/modules/user'
|
|
|
|
|
|
|
|
import useAppStore from "@/store/modules/app.js";
|
|
|
|
|
|
|
|
import {useWindowSize} from "@vueuse/core";
|
|
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
const userStore = useUserStore()
|
|
|
|
const route = useRoute();
|
|
|
|
const route = useRoute();
|
|
|
|
const router = useRouter();
|
|
|
|
const router = useRouter();
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
|
|
|
|
|
const {width, height} = useWindowSize();
|
|
|
|
|
|
|
|
const WIDTH = 992; // refer to Bootstrap's responsive design
|
|
|
|
|
|
|
|
const loginClass = computed(() => ({
|
|
|
|
|
|
|
|
desktop: width.value - 1 > WIDTH
|
|
|
|
|
|
|
|
}))
|
|
|
|
const loginForm = ref({
|
|
|
|
const loginForm = ref({
|
|
|
|
username: "admin",
|
|
|
|
username: "admin",
|
|
|
|
password: "admin123",
|
|
|
|
password: "admin123",
|
|
|
@ -168,11 +183,24 @@ getCookie();
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-image: url("../assets/images/login-background.jpg");
|
|
|
|
//背景图片居中显示
|
|
|
|
|
|
|
|
background-position: center;
|
|
|
|
|
|
|
|
//登录页背景图片
|
|
|
|
|
|
|
|
background-image: url("../assets/images/v2_rxo8qp.png") ;
|
|
|
|
background-size: cover;
|
|
|
|
background-size: cover;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//pc网页登录控件居右
|
|
|
|
|
|
|
|
.desktop {
|
|
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
.el-form {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
right: 10%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
.title {
|
|
|
|
margin: 0px auto 30px auto;
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
|
|
margin: 20px auto 50px auto;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
color: #707070;
|
|
|
|
color: #707070;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -182,46 +210,56 @@ getCookie();
|
|
|
|
background: #ffffff;
|
|
|
|
background: #ffffff;
|
|
|
|
width: 400px;
|
|
|
|
width: 400px;
|
|
|
|
padding: 25px 25px 5px 25px;
|
|
|
|
padding: 25px 25px 5px 25px;
|
|
|
|
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
.el-input {
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
input {
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.input-icon {
|
|
|
|
.input-icon {
|
|
|
|
height: 39px;
|
|
|
|
height: 39px;
|
|
|
|
width: 14px;
|
|
|
|
width: 14px;
|
|
|
|
margin-left: 0px;
|
|
|
|
margin-left: 0px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.login-tip {
|
|
|
|
.login-tip {
|
|
|
|
font-size: 13px;
|
|
|
|
font-size: 13px;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
color: #bfbfbf;
|
|
|
|
color: #bfbfbf;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.login-code {
|
|
|
|
.login-code {
|
|
|
|
width: 33%;
|
|
|
|
width: 33%;
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
float: right;
|
|
|
|
float: right;
|
|
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
img {
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
vertical-align: middle;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-login-footer {
|
|
|
|
.el-login-footer {
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
line-height: 40px;
|
|
|
|
line-height: 40px;
|
|
|
|
position: fixed;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
bottom: 10px;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
font-family: Arial;
|
|
|
|
font-family: Arial;
|
|
|
|
font-size: 12px;
|
|
|
|
font-size: 18px;
|
|
|
|
letter-spacing: 1px;
|
|
|
|
letter-spacing: 1px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.login-code-img {
|
|
|
|
.login-code-img {
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
padding-left: 12px;
|
|
|
|
padding-left: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|