|
|
@ -7,25 +7,31 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<LoginBox>
|
|
|
|
<LoginBox>
|
|
|
|
<div class="login-page-content-style">
|
|
|
|
<div class="login-page-content-style">
|
|
|
|
<div class="close-top-style"><a-icon type="close" class="icon-style" @click="closePanel" title="取消"/></div>
|
|
|
|
<div class="close-top-style">
|
|
|
|
|
|
|
|
<a-icon type="close" class="icon-style" @click="closePanel" title="取消"/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="login-page-title-style">用户登录</div>
|
|
|
|
<div class="login-page-title-style">用户登录</div>
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<a-input ref="userNameInput" v-model="account" placeholder="用户名" class="login-input-style" @change="accountChange">
|
|
|
|
<a-input ref="userNameInput" v-model="account" placeholder="用户名" class="login-input-style"
|
|
|
|
|
|
|
|
@change="accountChange">
|
|
|
|
<my-icon slot="prefix" type="icon-jiaoshixinxi" class="icon-style"/>
|
|
|
|
<my-icon slot="prefix" type="icon-jiaoshixinxi" class="icon-style"/>
|
|
|
|
|
|
|
|
|
|
|
|
</a-input>
|
|
|
|
</a-input>
|
|
|
|
<span class="error-tips-style">{{accountErrorTips}}</span>
|
|
|
|
<span class="error-tips-style">{{accountErrorTips}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<a-input-password ref="passWordInput" v-model="password" placeholder="密码" class="login-input-style" @change="passwordChange">
|
|
|
|
<a-input-password ref="passWordInput" v-model="password" placeholder="密码" class="login-input-style"
|
|
|
|
|
|
|
|
@change="passwordChange">
|
|
|
|
<a-icon slot="prefix" type="lock" class="icon-style"/>
|
|
|
|
<a-icon slot="prefix" type="lock" class="icon-style"/>
|
|
|
|
|
|
|
|
|
|
|
|
</a-input-password>
|
|
|
|
</a-input-password>
|
|
|
|
<span class="error-tips-style">{{passwordErrorTips}}</span>
|
|
|
|
<span class="error-tips-style">{{passwordErrorTips}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<div class="login-item-row-style">
|
|
|
|
<a-button v-if="!isLogining" class="login-button-style" @click="login">登录</a-button>
|
|
|
|
<a-button v-if="!isLogining" class="login-button-style" @click="login">登录</a-button>
|
|
|
|
<div v-if="isLogining"><a-spin/><span style="margin-left: 0.5rem">登录中,请稍后...</span></div>
|
|
|
|
<div v-if="isLogining">
|
|
|
|
|
|
|
|
<a-spin/>
|
|
|
|
|
|
|
|
<span style="margin-left: 0.5rem">登录中,请稍后...</span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</LoginBox>
|
|
|
|
</LoginBox>
|
|
|
@ -37,10 +43,11 @@
|
|
|
|
* */
|
|
|
|
* */
|
|
|
|
import ModalPanel from '../../../../../components/common/modal/ModalPanel';
|
|
|
|
import ModalPanel from '../../../../../components/common/modal/ModalPanel';
|
|
|
|
import LoginBox from './loginBox.vue';
|
|
|
|
import LoginBox from './loginBox.vue';
|
|
|
|
import {Icon,Input,Button,Spin} from 'ant-design-vue';
|
|
|
|
import {Icon, Input, Button, Spin} from 'ant-design-vue';
|
|
|
|
import CommonInter from '../../../api/commonInter';
|
|
|
|
import CommonInter from '../../../api/commonInter';
|
|
|
|
import AInputPassword from "ant-design-vue/es/input/Password";
|
|
|
|
import AInputPassword from "ant-design-vue/es/input/Password";
|
|
|
|
import InterfaceConfig from '../../../../../commonInterface/interfaceConfig';
|
|
|
|
import InterfaceConfig from '../../../../../commonInterface/interfaceConfig';
|
|
|
|
|
|
|
|
import StaticParams from '../../../../../global-llibs/staticParams';
|
|
|
|
export default{
|
|
|
|
export default{
|
|
|
|
data(){
|
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -51,6 +58,18 @@
|
|
|
|
passwordErrorTips: "",//密码错误提示
|
|
|
|
passwordErrorTips: "",//密码错误提示
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
created(){
|
|
|
|
|
|
|
|
//回车按键登陆
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
document.onkeydown = function (e) {
|
|
|
|
|
|
|
|
let key = window.event.keyCode;
|
|
|
|
|
|
|
|
if (key == 13) {
|
|
|
|
|
|
|
|
if (StaticParams.trim(_this.account) !== "" || StaticParams.trim(_this.password) !== "") {
|
|
|
|
|
|
|
|
_this.login();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
showPanel: {
|
|
|
|
showPanel: {
|
|
|
|
type: Boolean,
|
|
|
|
type: Boolean,
|
|
|
@ -58,7 +77,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
closePanel:function () {
|
|
|
|
closePanel: function () {
|
|
|
|
this.$bus.emit("hide-login-panel");
|
|
|
|
this.$bus.emit("hide-login-panel");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -77,7 +96,7 @@
|
|
|
|
this.passwordErrorTips = "";
|
|
|
|
this.passwordErrorTips = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
login:function () {
|
|
|
|
login: function () {
|
|
|
|
let _this = this;
|
|
|
|
let _this = this;
|
|
|
|
if (this.account.trim() == "") {
|
|
|
|
if (this.account.trim() == "") {
|
|
|
|
this.accountErrorTips = "账号不能为空";
|
|
|
|
this.accountErrorTips = "账号不能为空";
|
|
|
@ -117,11 +136,11 @@
|
|
|
|
// this.isLogining = false;
|
|
|
|
// this.isLogining = false;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
this.passwordErrorTips = result[0].data.info;
|
|
|
|
this.passwordErrorTips = result[0].data.info;
|
|
|
|
this.isLogining = false;
|
|
|
|
this.isLogining = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
this.isLogining = false;
|
|
|
|
this.isLogining = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -129,26 +148,26 @@
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 构建BaseConfig基本信息
|
|
|
|
* 构建BaseConfig基本信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
buildBaseInfo:function () {
|
|
|
|
buildBaseInfo: function () {
|
|
|
|
//存储BaseConfig中的userInfo
|
|
|
|
//存储BaseConfig中的userInfo
|
|
|
|
this.BaseConfig.userInfo.identity_id_cookie = this.Cookie.get('identity_id');
|
|
|
|
this.BaseConfig.userInfo.identity_id_cookie = this.Cookie.get('identity_id');
|
|
|
|
this.BaseConfig.userInfo.person_id_cookie = this.Cookie.get('person_id');
|
|
|
|
this.BaseConfig.userInfo.person_id_cookie = this.Cookie.get('person_id');
|
|
|
|
this.BaseConfig.userInfo.identity_id = this.Cookie.get('identity_id');
|
|
|
|
this.BaseConfig.userInfo.identity_id = this.Cookie.get('identity_id');
|
|
|
|
this.BaseConfig.userInfo.person_id = this.Cookie.get('person_id');
|
|
|
|
this.BaseConfig.userInfo.person_id = this.Cookie.get('person_id');
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
url:InterfaceConfig.getValueByKey.url,
|
|
|
|
url: InterfaceConfig.getValueByKey.url,
|
|
|
|
params:{key:'common.server.location'},
|
|
|
|
params: {key: 'common.server.location'},
|
|
|
|
method:InterfaceConfig.getValueByKey.method,
|
|
|
|
method: InterfaceConfig.getValueByKey.method,
|
|
|
|
isTestLogin:InterfaceConfig.getValueByKey.isTestLogin
|
|
|
|
isTestLogin: InterfaceConfig.getValueByKey.isTestLogin
|
|
|
|
}],(res)=>{
|
|
|
|
}], (res) => {
|
|
|
|
if (res[0].status === 200){
|
|
|
|
if (res[0].status === 200) {
|
|
|
|
let env = res[0].data;
|
|
|
|
let env = res[0].data;
|
|
|
|
this.BaseConfig.pt_type = env["common.server.location"];
|
|
|
|
this.BaseConfig.pt_type = env["common.server.location"];
|
|
|
|
window.pt_type = env["common.server.location"];
|
|
|
|
window.pt_type = env["common.server.location"];
|
|
|
|
this.BaseConfig.ConfigFn.setParamsValue();
|
|
|
|
this.BaseConfig.ConfigFn.setParamsValue();
|
|
|
|
this.BaseConfig.ConfigFn.getPersonInfo_I();
|
|
|
|
this.BaseConfig.ConfigFn.getPersonInfo_I();
|
|
|
|
let interval = setInterval(()=>{
|
|
|
|
let interval = setInterval(() => {
|
|
|
|
if (window.person_info_my){
|
|
|
|
if (window.person_info_my) {
|
|
|
|
clearInterval(interval);
|
|
|
|
clearInterval(interval);
|
|
|
|
//store存储
|
|
|
|
//store存储
|
|
|
|
this.$store.commit('userStore/setUser', {
|
|
|
|
this.$store.commit('userStore/setUser', {
|
|
|
@ -159,7 +178,7 @@
|
|
|
|
this.isLogining = false;
|
|
|
|
this.isLogining = false;
|
|
|
|
this.$bus.emit("hide-login-panel");
|
|
|
|
this.$bus.emit("hide-login-panel");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},500)
|
|
|
|
}, 500)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -208,31 +227,32 @@
|
|
|
|
AInputPassword,
|
|
|
|
AInputPassword,
|
|
|
|
ModalPanel,
|
|
|
|
ModalPanel,
|
|
|
|
LoginBox,
|
|
|
|
LoginBox,
|
|
|
|
AIcon:Icon,
|
|
|
|
AIcon: Icon,
|
|
|
|
AInput:Input,
|
|
|
|
AInput: Input,
|
|
|
|
AButton:Button,
|
|
|
|
AButton: Button,
|
|
|
|
ASpin:Spin
|
|
|
|
ASpin: Spin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
@import "../../../assets/scss/style";
|
|
|
|
@import "../../../assets/scss/style";
|
|
|
|
/deep/ .login-modal-style{
|
|
|
|
|
|
|
|
|
|
|
|
/deep/ .login-modal-style {
|
|
|
|
width: auto !important;
|
|
|
|
width: auto !important;
|
|
|
|
.ant-modal-content{
|
|
|
|
.ant-modal-content {
|
|
|
|
background-color: transparent !important;
|
|
|
|
background-color: transparent !important;
|
|
|
|
border: none !important;
|
|
|
|
border: none !important;
|
|
|
|
box-shadow: none !important;
|
|
|
|
box-shadow: none !important;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
.login-page-content-style{
|
|
|
|
.login-page-content-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
color: white;
|
|
|
|
color: white;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
flex-direction: column;
|
|
|
|
.close-top-style{
|
|
|
|
.close-top-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 20px;
|
|
|
|
height: 20px;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
@ -240,13 +260,13 @@
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 10px;
|
|
|
|
padding: 0 10px;
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-top: 8px;
|
|
|
|
.icon-style{
|
|
|
|
.icon-style {
|
|
|
|
color: $color-default-bright;
|
|
|
|
color: $color-default-bright;
|
|
|
|
font-size: 16px;
|
|
|
|
font-size: 16px;
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.login-page-title-style{
|
|
|
|
.login-page-title-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 50px;
|
|
|
|
height: 50px;
|
|
|
|
line-height: 50px;
|
|
|
|
line-height: 50px;
|
|
|
@ -256,7 +276,7 @@
|
|
|
|
font-size: 25px;
|
|
|
|
font-size: 25px;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.login-item-row-style{
|
|
|
|
.login-item-row-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 65px;
|
|
|
|
height: 65px;
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-top: 10px;
|
|
|
@ -265,16 +285,16 @@
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 100px;
|
|
|
|
padding: 0 100px;
|
|
|
|
.login-input-style{
|
|
|
|
.login-input-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 45px;
|
|
|
|
height: 45px;
|
|
|
|
.ant-input-prefix{
|
|
|
|
.ant-input-prefix {
|
|
|
|
.icon-style{
|
|
|
|
.icon-style {
|
|
|
|
color: #1379c8;
|
|
|
|
color: #1379c8;
|
|
|
|
font-size: 20px;
|
|
|
|
font-size: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ant-input{
|
|
|
|
.ant-input {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 45px;
|
|
|
|
height: 45px;
|
|
|
|
line-height: 45px;
|
|
|
|
line-height: 45px;
|
|
|
@ -291,7 +311,7 @@
|
|
|
|
line-height: 20px;
|
|
|
|
line-height: 20px;
|
|
|
|
font-size: 16px;
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.login-button-style{
|
|
|
|
.login-button-style {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 45px;
|
|
|
|
height: 45px;
|
|
|
|
line-height: 45px;
|
|
|
|
line-height: 45px;
|
|
|
|