|
|
|
@ -4,37 +4,63 @@ |
|
|
|
|
<div class="form"> |
|
|
|
|
<h6 class="title">欢迎使用请登录</h6> |
|
|
|
|
<ul class="tab"> |
|
|
|
|
<li v-for="(item,index) in tabList" :key="index" :class="{active: form.distinguish == item.id}" @click="typeClick(item)">{{item.label}}</li> |
|
|
|
|
<li v-for="(item,index) in tabList" |
|
|
|
|
:key="index" |
|
|
|
|
:class="{active: form.distinguish == item.id}" |
|
|
|
|
@click="typeClick(item)">{{item.label}}</li> |
|
|
|
|
</ul> |
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" style="margin-top: 20px"> |
|
|
|
|
<el-form :model="form" |
|
|
|
|
:rules="rules" |
|
|
|
|
ref="form" |
|
|
|
|
style="margin-top: 20px"> |
|
|
|
|
<!-- 学号工号 --> |
|
|
|
|
<div v-show="!form.distinguish"> |
|
|
|
|
<el-form-item class="school-select" prop="schoolId"> |
|
|
|
|
<el-form-item class="school-select" |
|
|
|
|
prop="schoolId"> |
|
|
|
|
<label class="label school"></label> |
|
|
|
|
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校"> |
|
|
|
|
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
|
<el-select v-model="form.schoolId" |
|
|
|
|
clearable |
|
|
|
|
filterable |
|
|
|
|
placeholder="请选择学校"> |
|
|
|
|
<el-option v-for="(item, i) in schoolList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.schoolName" |
|
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item class="flex-1" prop="workNumber"> |
|
|
|
|
<el-form-item class="flex-1" |
|
|
|
|
prop="workNumber"> |
|
|
|
|
<label class="label account"></label> |
|
|
|
|
<el-input v-model.trim="form.workNumber" :placeholder="'请输入学号/工号'" @keyup.enter.native="submit"></el-input> |
|
|
|
|
<el-input v-model.trim="form.workNumber" |
|
|
|
|
:placeholder="'请输入学号/工号'" |
|
|
|
|
@keyup.enter.native="submit"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<!-- 手机号登录 --> |
|
|
|
|
<el-form-item v-show="form.distinguish === 1" prop="account"> |
|
|
|
|
<el-form-item v-show="form.distinguish === 1" |
|
|
|
|
prop="account"> |
|
|
|
|
<label class="label account"></label> |
|
|
|
|
<el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input> |
|
|
|
|
<el-input v-model.trim="form.account" |
|
|
|
|
placeholder="请输入账号" |
|
|
|
|
@keyup.enter.native="submit"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<template v-if="form.distinguish === 2"> |
|
|
|
|
<el-form-item prop="account"> |
|
|
|
|
<label class="label account"></label> |
|
|
|
|
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @keyup.enter.native="submit"></el-input> |
|
|
|
|
<el-input v-model.trim="form.account" |
|
|
|
|
placeholder="请输入手机号/邮箱" |
|
|
|
|
@keyup.enter.native="submit"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="code"> |
|
|
|
|
<label class="label code"></label> |
|
|
|
|
<div class="ver-code"> |
|
|
|
|
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" @keyup.enter.native="submit"></el-input> |
|
|
|
|
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }} |
|
|
|
|
<el-input v-model="form.code" |
|
|
|
|
placeholder="请输入验证码" |
|
|
|
|
maxlength="6" |
|
|
|
|
@keyup.enter.native="submit"></el-input> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="sendPhoneCodeLogin" |
|
|
|
|
:disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }} |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
@ -42,61 +68,89 @@ |
|
|
|
|
<template v-if="form.distinguish !== 2"> |
|
|
|
|
<el-form-item prop="password"> |
|
|
|
|
<label class="password label"></label> |
|
|
|
|
<el-input |
|
|
|
|
type="password" |
|
|
|
|
<el-input type="password" |
|
|
|
|
placeholder="请输入密码" |
|
|
|
|
v-model.trim="form.password" |
|
|
|
|
@keyup.enter.native="submit" |
|
|
|
|
> |
|
|
|
|
@keyup.enter.native="submit"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="code"> |
|
|
|
|
<label class="label code"></label> |
|
|
|
|
<el-input |
|
|
|
|
placeholder="请输入验证码" |
|
|
|
|
<el-input placeholder="请输入验证码" |
|
|
|
|
v-model.trim="form.code" |
|
|
|
|
@keyup.enter.native="submit" |
|
|
|
|
> |
|
|
|
|
@keyup.enter.native="submit"> |
|
|
|
|
</el-input> |
|
|
|
|
<img @click="getVerImg" :src="verificationIMG" class="ver-img" alt=""> |
|
|
|
|
<img @click="getVerImg" |
|
|
|
|
:src="verificationIMG" |
|
|
|
|
class="ver-img" |
|
|
|
|
alt=""> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
<div v-show="!form.distinguish" class="default-check"> |
|
|
|
|
<div v-show="!form.distinguish" |
|
|
|
|
class="default-check"> |
|
|
|
|
<el-checkbox v-model="setDefault">设置为默认学校</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<el-button class="submit" type="primary" @click="submit">登录</el-button> |
|
|
|
|
<el-button class="submit" |
|
|
|
|
type="primary" |
|
|
|
|
@click="submit">登录</el-button> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px"> |
|
|
|
|
<el-dialog title="绑定手机号" |
|
|
|
|
:visible.sync="phoneVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
width="576px"> |
|
|
|
|
<p class="tips">依据国家政策法规,需绑定手机号进行网络实名才可登录使用本平台</p> |
|
|
|
|
<el-form label-width="60px"> |
|
|
|
|
<el-form-item label="手机号"> |
|
|
|
|
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11" @change="phoneChange"></el-input> |
|
|
|
|
<el-input placeholder="请输入手机号" |
|
|
|
|
v-model="phone" |
|
|
|
|
maxlength="11" |
|
|
|
|
@change="phoneChange"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="验证码"> |
|
|
|
|
<div class="ver-code"> |
|
|
|
|
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> |
|
|
|
|
<el-button style="top: 1px" type="text" @click="sendPhoneCode(1)" :disabled="binding === '' || phoneDisabled">{{phoneBtnText}}</el-button> |
|
|
|
|
<el-input v-model="phoneCode" |
|
|
|
|
placeholder="请输入验证码" |
|
|
|
|
maxlength="6"></el-input> |
|
|
|
|
<el-button style="top: 1px" |
|
|
|
|
type="text" |
|
|
|
|
@click="sendPhoneCode(1)" |
|
|
|
|
:disabled="binding === '' || phoneDisabled">{{phoneBtnText}}</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" @click="phoneVisible = false">取 消</el-button> |
|
|
|
|
<el-button size="small" type="primary" @click="phoneSubmit">确 定</el-button> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="phoneVisible = false">取 消</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="phoneSubmit">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia" width="500px"> |
|
|
|
|
<el-dialog title="请选择您要登录的用户" |
|
|
|
|
:visible.sync="userVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
custom-class="user-dia" |
|
|
|
|
width="500px"> |
|
|
|
|
<p class="tips">该手机号已绑定以下用户信息</p> |
|
|
|
|
<ul class="users"> |
|
|
|
|
<li :class="{isEnable: !user.isEnable}" v-for="(user, i) in users" :key="i" @click="chooseUser(user)"> |
|
|
|
|
<li :class="{isEnable: !user.isEnable}" |
|
|
|
|
v-for="(user, i) in users" |
|
|
|
|
:key="i" |
|
|
|
|
@click="chooseUser(user)"> |
|
|
|
|
<span>{{ user.schoolName }},{{ user.userName }},{{ user.workNumber }}{{ user.isEnable ? '' : '(已禁用)'}}</span> |
|
|
|
|
<i class="el-icon-right"></i> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog :visible.sync="infoVisible" :close-on-click-modal="false" :show-close="false" custom-class="info-dia" width="400px"> |
|
|
|
|
<el-dialog :visible.sync="infoVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
:show-close="false" |
|
|
|
|
custom-class="info-dia" |
|
|
|
|
width="400px"> |
|
|
|
|
<div class="info-header"> |
|
|
|
|
<i class="el-icon-warning"></i> |
|
|
|
|
提示 |
|
|
|
@ -104,20 +158,26 @@ |
|
|
|
|
<div class="info-wrap"> |
|
|
|
|
<p class="tips">该手机号已与以下用户绑定</p> |
|
|
|
|
<ul class="users"> |
|
|
|
|
<li v-for="(user, i) in infos" :key="i"> |
|
|
|
|
<li v-for="(user, i) in infos" |
|
|
|
|
:key="i"> |
|
|
|
|
<span>{{ user.userName }}({{ user.schoolName }})</span> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div class="info-footer"> |
|
|
|
|
<el-button size="small" type="primary" @click="bindPhone">是本人,继续绑定</el-button> |
|
|
|
|
<el-button class="unbind" size="small" @click="unbindPhone">不是本人,解绑以上用户并绑定新用户</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="bindPhone">是本人,继续绑定</el-button> |
|
|
|
|
<el-button class="unbind" |
|
|
|
|
size="small" |
|
|
|
|
@click="unbindPhone">不是本人,解绑以上用户并绑定新用户</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<div class="footer"> |
|
|
|
|
<div class="copyright"> |
|
|
|
|
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20072679号</a> |
|
|
|
|
<a href="https://beian.miit.gov.cn/#/Integrated/index" |
|
|
|
|
target="_blank">粤ICP备20072679号</a> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -302,9 +362,13 @@ export default { |
|
|
|
|
this.setLogin() |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
form.code = '' |
|
|
|
|
util.errorMsg(message) |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.getVerImg() |
|
|
|
|
form.code = '' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -474,7 +538,7 @@ export default { |
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.wrap { |
|
|
|
|
min-height: 100%; |
|
|
|
|
background-color: #F3F6FA; |
|
|
|
|
background-color: #f3f6fa; |
|
|
|
|
} |
|
|
|
|
.ver-code { |
|
|
|
|
position: relative; |
|
|
|
@ -498,7 +562,7 @@ export default { |
|
|
|
|
justify-content: space-between; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 24px; |
|
|
|
|
border-bottom: 2px solid #E1E6F2; |
|
|
|
|
border-bottom: 2px solid #e1e6f2; |
|
|
|
|
li { |
|
|
|
|
padding: 18px 0; |
|
|
|
|
margin-bottom: -1px; |
|
|
|
@ -510,7 +574,7 @@ export default { |
|
|
|
|
margin-right: 0; |
|
|
|
|
} |
|
|
|
|
&.active { |
|
|
|
|
color: $main-color;; |
|
|
|
|
color: $main-color; |
|
|
|
|
border-bottom-color: $main-color; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -528,7 +592,7 @@ export default { |
|
|
|
|
.title { |
|
|
|
|
margin-bottom: 25px; |
|
|
|
|
font-size: 26px; |
|
|
|
|
color: #0B1D30; |
|
|
|
|
color: #0b1d30; |
|
|
|
|
letter-spacing: 4px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -540,8 +604,8 @@ export default { |
|
|
|
|
height: 52px; |
|
|
|
|
padding: 0 20px 0 34px; |
|
|
|
|
line-height: 50px; |
|
|
|
|
background-color: #FBFBFB; |
|
|
|
|
border: 1px solid #E1E6F2; |
|
|
|
|
background-color: #fbfbfb; |
|
|
|
|
border: 1px solid #e1e6f2; |
|
|
|
|
border-radius: 4px !important; |
|
|
|
|
} |
|
|
|
|
.default-check { |
|
|
|
@ -583,7 +647,7 @@ export default { |
|
|
|
|
top: 105%; |
|
|
|
|
left: auto; |
|
|
|
|
right: 0; |
|
|
|
|
color: #FFA94E; |
|
|
|
|
color: #ffa94e; |
|
|
|
|
} |
|
|
|
|
.submit { |
|
|
|
|
width: 100%; |
|
|
|
@ -601,12 +665,12 @@ export default { |
|
|
|
|
padding: 18px 0; |
|
|
|
|
font-size: 12px; |
|
|
|
|
text-align: center; |
|
|
|
|
background-color: #F3F6FA; |
|
|
|
|
background-color: #f3f6fa; |
|
|
|
|
a { |
|
|
|
|
color:#B1B4B8; |
|
|
|
|
color: #b1b4b8; |
|
|
|
|
font-size: 12px; |
|
|
|
|
&:hover { |
|
|
|
|
opacity: .8; |
|
|
|
|
opacity: 0.8; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|