|
@@ -1,83 +1,86 @@
|
|
|
<template>
|
|
|
<div class="login">
|
|
|
- <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
- <i class="el-icon-setting"
|
|
|
- @click="editHostEvent"
|
|
|
- style="float: right; margin-top: -17px; margin-right: -10px; cursor: pointer; display: none;"></i>
|
|
|
- <h3 class="title">{{ applicationName }}</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-form-item prop="ip">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.ip"
|
|
|
- type="text"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="IP地址"
|
|
|
- >
|
|
|
- <svg-icon slot="prefix" icon-class="ip" class="el-input__icon input-icon"/>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="port">
|
|
|
- <el-input
|
|
|
- v-model="loginForm.port"
|
|
|
- type="text"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="端口号"
|
|
|
- >
|
|
|
- <svg-icon slot="prefix" icon-class="port" class="el-input__icon input-icon"/>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-checkbox v-model="loginForm.rememberMe" v-if="rememberMeView" 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="login-bg">
|
|
|
+ <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
+ <i class="el-icon-setting"
|
|
|
+ @click="editHostEvent"
|
|
|
+ style="float: right; margin-top: -17px; margin-right: -10px; cursor: pointer; display: none;"></i>
|
|
|
+ <h3 class="title">{{ applicationName }}</h3>
|
|
|
+ <div class="title-bg"></div>
|
|
|
+ <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-form-item prop="ip">
|
|
|
+ <el-input
|
|
|
+ v-model="loginForm.ip"
|
|
|
+ type="text"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="IP地址"
|
|
|
+ >
|
|
|
+ <svg-icon slot="prefix" icon-class="ip" class="el-input__icon input-icon"/>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="port">
|
|
|
+ <el-input
|
|
|
+ v-model="loginForm.port"
|
|
|
+ type="text"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="端口号"
|
|
|
+ >
|
|
|
+ <svg-icon slot="prefix" icon-class="port" class="el-input__icon input-icon"/>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-checkbox v-model="loginForm.rememberMe" v-if="rememberMeView" 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 © {{ copyrightDate }} 重庆川仪控制系统有限公司版权所有</span>
|
|
@@ -287,25 +290,38 @@ export default {
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
.login {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
height: 100%;
|
|
|
- background-color: #2c3e50;
|
|
|
- //background-image: url("../assets/images/loginbg.png");
|
|
|
+ background-image: url("../assets/images/cqcybg.png");
|
|
|
background-size: cover;
|
|
|
}
|
|
|
|
|
|
.title {
|
|
|
- margin: 0px auto 30px auto;
|
|
|
+ margin: 0px auto 5px auto;
|
|
|
text-align: center;
|
|
|
- color: #707070;
|
|
|
+ font-weight: 600;
|
|
|
+ color: black;
|
|
|
+}
|
|
|
+
|
|
|
+.title-bg {
|
|
|
+ height: 4px;
|
|
|
+ width: 35px;
|
|
|
+ background: #1890ff;
|
|
|
+ margin: auto auto 25px;
|
|
|
+}
|
|
|
+
|
|
|
+.login-bg {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ height: 100%;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 10%;
|
|
|
}
|
|
|
|
|
|
.login-form {
|
|
|
border-radius: 6px;
|
|
|
background: #ffffff;
|
|
|
width: 400px;
|
|
|
+ height: 425px;
|
|
|
padding: 25px 25px 5px 25px;
|
|
|
|
|
|
.el-input {
|
|
@@ -347,7 +363,7 @@ export default {
|
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
- color: #fff;
|
|
|
+ color: #4a4a4a;
|
|
|
font-family: Arial;
|
|
|
font-size: 12px;
|
|
|
letter-spacing: 1px;
|