fix 登录密码不可复制;用户管理-岗位英文修改;混入中分页添加空格
This commit is contained in:
@@ -235,7 +235,7 @@ module.exports = {
|
|||||||
heads: 'Heads',
|
heads: 'Heads',
|
||||||
account: 'Account',
|
account: 'Account',
|
||||||
userName: 'User Name',
|
userName: 'User Name',
|
||||||
post: 'post',
|
post: 'Post',
|
||||||
selectedAccount: 'Selected account?',
|
selectedAccount: 'Selected account?',
|
||||||
// 新增、编辑用户
|
// 新增、编辑用户
|
||||||
loginPassword: 'Login Password',
|
loginPassword: 'Login Password',
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const JeroListMixin = {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
|
||||||
},
|
},
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
@@ -417,7 +417,14 @@ export const JeroListMixin = {
|
|||||||
if (info.file.response.success) {
|
if (info.file.response.success) {
|
||||||
// this.$message.success(`${info.file.name} 文件上传成功`);
|
// this.$message.success(`${info.file.name} 文件上传成功`);
|
||||||
if (info.file.response.code === 201) {
|
if (info.file.response.code === 201) {
|
||||||
const { message, result: { msg, fileUrl, fileName } } = info.file.response
|
const {
|
||||||
|
message,
|
||||||
|
result: {
|
||||||
|
msg,
|
||||||
|
fileUrl,
|
||||||
|
fileName
|
||||||
|
}
|
||||||
|
} = info.file.response
|
||||||
const href = window._CONFIG.domianURL + fileUrl
|
const href = window._CONFIG.domianURL + fileUrl
|
||||||
this.$warning({
|
this.$warning({
|
||||||
title: message,
|
title: message,
|
||||||
|
|||||||
+173
-106
@@ -12,7 +12,7 @@
|
|||||||
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
|
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="请输入帐号">
|
placeholder="请输入帐号">
|
||||||
<a-icon slot="prefix" type="user" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
<a-icon slot="prefix" type="user" :style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -28,10 +28,21 @@
|
|||||||
:type="passwordType"
|
:type="passwordType"
|
||||||
autocomplete="false"
|
autocomplete="false"
|
||||||
placeholder="请输入密码"
|
placeholder="请输入密码"
|
||||||
|
@paste.native.capture.prevent="handleOperate"
|
||||||
>
|
>
|
||||||
<a-icon title="显示密码" @click="passwordType='text'" slot="suffix" v-if="passwordType==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
<a-icon title="显示密码"
|
||||||
<a-icon title="隐藏密码" @click="passwordType='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
@click="passwordType='text'"
|
||||||
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
slot="suffix"
|
||||||
|
v-if="passwordType==='password'"
|
||||||
|
type="eye"
|
||||||
|
:style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
|
<a-icon title="隐藏密码"
|
||||||
|
@click="passwordType='password'"
|
||||||
|
slot="suffix"
|
||||||
|
v-else
|
||||||
|
type="eye-invisible"
|
||||||
|
:style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
|
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -48,13 +59,21 @@
|
|||||||
@change="inputCodeChange"
|
@change="inputCodeChange"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入验证码">
|
placeholder="请输入验证码">
|
||||||
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}"/>
|
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6" style="text-align: right">
|
<a-col :span="6" style="text-align: right">
|
||||||
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode" alt=""/>
|
<img v-if="requestCodeSuccess"
|
||||||
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode" alt=""/>
|
style="margin-top: 2px;"
|
||||||
|
:src="randCodeImage"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
alt="" />
|
||||||
|
<img v-else
|
||||||
|
style="margin-top: 2px;"
|
||||||
|
src="../../assets/checkcode.png"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
alt="" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="3"></a-col>
|
<a-col :span="3"></a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -86,7 +105,7 @@
|
|||||||
:loading="loginBtn"
|
:loading="loginBtn"
|
||||||
@click.stop.prevent="handleSubmit"
|
@click.stop.prevent="handleSubmit"
|
||||||
:disabled="loginBtn">
|
:disabled="loginBtn">
|
||||||
{{ loginBtn ? "登录中" : "登录" }}
|
{{ loginBtn ? '登录中' : '登录' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -94,7 +113,11 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
<a-form v-if="mobile" :form="form" class="user-layout-login user-layout-login-mobile" ref="formLogin" id="formLogin">
|
<a-form v-if="mobile"
|
||||||
|
:form="form"
|
||||||
|
class="user-layout-login user-layout-login-mobile"
|
||||||
|
ref="formLogin"
|
||||||
|
id="formLogin">
|
||||||
<div class="user-box user-box-mobile">
|
<div class="user-box user-box-mobile">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -104,7 +127,7 @@
|
|||||||
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
|
v-decorator="['username',{initialValue:'', rules: validatorRules.username.rules,validateTrigger: 'blur'}]"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="请输入帐号">
|
placeholder="请输入帐号">
|
||||||
<a-icon slot="prefix" type="user" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
<a-icon slot="prefix" type="user" :style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -119,7 +142,7 @@
|
|||||||
autocomplete="false"
|
autocomplete="false"
|
||||||
placeholder="请输入密码"
|
placeholder="请输入密码"
|
||||||
>
|
>
|
||||||
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -133,19 +156,28 @@
|
|||||||
type="text"
|
type="text"
|
||||||
@change="inputCodeChange"
|
@change="inputCodeChange"
|
||||||
placeholder="请输入验证码">
|
placeholder="请输入验证码">
|
||||||
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}"/>
|
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="10" style="text-align: right">
|
<a-col :span="10" style="text-align: right">
|
||||||
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode" alt=""/>
|
<img v-if="requestCodeSuccess"
|
||||||
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode" alt=""/>
|
style="margin-top: 2px;"
|
||||||
|
:src="randCodeImage"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
alt="" />
|
||||||
|
<img v-else
|
||||||
|
style="margin-top: 2px;"
|
||||||
|
src="../../assets/checkcode.png"
|
||||||
|
@click="handleChangeCheckCode"
|
||||||
|
alt="" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]">自动登录</a-checkbox>
|
<a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]">自动登录
|
||||||
|
</a-checkbox>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="4"></a-col>
|
<a-col :span="4"></a-col>
|
||||||
@@ -168,7 +200,7 @@
|
|||||||
:loading="loginBtn"
|
:loading="loginBtn"
|
||||||
@click.stop.prevent="handleSubmit"
|
@click.stop.prevent="handleSubmit"
|
||||||
:disabled="loginBtn">
|
:disabled="loginBtn">
|
||||||
{{ loginBtn ? "登录中" : "登录" }}
|
{{ loginBtn ? '登录中' : '登录' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -203,11 +235,32 @@ export default {
|
|||||||
smsSendBtn: false
|
smsSendBtn: false
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
username: { rules: [{ required: true, message: '请输入用户名!' }, { validator: this.handleUsernameOrEmail }] },
|
username: {
|
||||||
password: { rules: [{ required: true, message: '请输入密码!', validator: 'click' }] },
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入用户名!'
|
||||||
|
}, { validator: this.handleUsernameOrEmail }]
|
||||||
|
},
|
||||||
|
password: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入密码!',
|
||||||
|
validator: 'click'
|
||||||
|
}]
|
||||||
|
},
|
||||||
mobile: { rules: [{ validator: this.validateMobile }] },
|
mobile: { rules: [{ validator: this.validateMobile }] },
|
||||||
captcha: { rule: [{ required: true, message: '请输入验证码!' }] },
|
captcha: {
|
||||||
inputCode: { rules: [{ required: true, message: '请输入验证码!' }] }
|
rule: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入验证码!'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
inputCode: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入验证码!'
|
||||||
|
}]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
velorifiedCode: '',
|
velorifiedCode: '',
|
||||||
inputCodeContent: '',
|
inputCodeContent: '',
|
||||||
@@ -273,39 +326,39 @@ export default {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
const that = this
|
const that = this
|
||||||
this.form.validateFields(['mobile'], { force: true }, (err, values) => {
|
this.form.validateFields(['mobile'], { force: true }, (err, values) => {
|
||||||
if (!values.mobile) {
|
if (!values.mobile) {
|
||||||
that.cmsFailed('请输入手机号')
|
that.cmsFailed('请输入手机号')
|
||||||
} else if (!err) {
|
} else if (!err) {
|
||||||
this.state.smsSendBtn = true
|
this.state.smsSendBtn = true
|
||||||
const interval = window.setInterval(() => {
|
const interval = window.setInterval(() => {
|
||||||
if (that.state.time-- <= 0) {
|
if (that.state.time-- <= 0) {
|
||||||
that.state.time = 60
|
that.state.time = 60
|
||||||
that.state.smsSendBtn = false
|
that.state.smsSendBtn = false
|
||||||
window.clearInterval(interval)
|
window.clearInterval(interval)
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
const hide = this.$message.loading('验证码发送中..', 0)
|
|
||||||
const smsParams = {}
|
|
||||||
smsParams.mobile = values.mobile
|
|
||||||
smsParams.smsmode = '0'
|
|
||||||
postAction('/sys/sms', smsParams)
|
|
||||||
.then(res => {
|
|
||||||
if (!res.success) {
|
|
||||||
setTimeout(hide, 0)
|
|
||||||
this.cmsFailed(res.message)
|
|
||||||
}
|
}
|
||||||
setTimeout(hide, 500)
|
}, 1000)
|
||||||
})
|
|
||||||
.catch(err => {
|
const hide = this.$message.loading('验证码发送中..', 0)
|
||||||
setTimeout(hide, 1)
|
const smsParams = {}
|
||||||
clearInterval(interval)
|
smsParams.mobile = values.mobile
|
||||||
that.state.time = 60
|
smsParams.smsmode = '0'
|
||||||
that.state.smsSendBtn = false
|
postAction('/sys/sms', smsParams)
|
||||||
this.requestFailed(err)
|
.then(res => {
|
||||||
})
|
if (!res.success) {
|
||||||
|
setTimeout(hide, 0)
|
||||||
|
this.cmsFailed(res.message)
|
||||||
|
}
|
||||||
|
setTimeout(hide, 500)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
setTimeout(hide, 1)
|
||||||
|
clearInterval(interval)
|
||||||
|
that.state.time = 60
|
||||||
|
that.state.smsSendBtn = false
|
||||||
|
this.requestFailed(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
handleChangeCheckCode () {
|
handleChangeCheckCode () {
|
||||||
@@ -331,7 +384,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loginSuccess () {
|
loginSuccess () {
|
||||||
this.$router.push({ path: '/' }).catch((/* res */) => {})
|
this.$router.push({ path: '/' }).catch((/* res */) => {
|
||||||
|
})
|
||||||
this.$notification.success({
|
this.$notification.success({
|
||||||
message: '欢迎',
|
message: '欢迎',
|
||||||
description: `${timeFix()},欢迎回来`
|
description: `${timeFix()},欢迎回来`
|
||||||
@@ -388,9 +442,14 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 密码禁止粘贴
|
||||||
|
handleOperate () {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断当前设备
|
// 判断当前设备
|
||||||
function isMobile () {
|
function isMobile () {
|
||||||
const userAgentInfo = navigator.userAgent
|
const userAgentInfo = navigator.userAgent
|
||||||
@@ -418,63 +477,71 @@ function isMobile () {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.ant-input-affix-wrapper/deep/ .ant-input:not(:first-child){
|
.ant-input-affix-wrapper /deep/ .ant-input:not(:first-child) {
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
}
|
}
|
||||||
.ant-row{
|
|
||||||
margin-bottom: 4%;
|
.ant-row {
|
||||||
}
|
margin-bottom: 4%;
|
||||||
.main{
|
}
|
||||||
height: 100%;
|
|
||||||
.user-layout-login{
|
.main {
|
||||||
z-index: 99;
|
height: 100%;
|
||||||
width: 24%;
|
|
||||||
height: 50%;
|
.user-layout-login {
|
||||||
padding: 3% 0 3% 0;
|
z-index: 99;
|
||||||
min-width: 332px;
|
width: 24%;
|
||||||
min-height: 460px;
|
height: 50%;
|
||||||
background: #fff;
|
padding: 3% 0 3% 0;
|
||||||
border-radius: 20px;
|
min-width: 332px;
|
||||||
position: absolute;
|
min-height: 460px;
|
||||||
right: 8%;
|
background: #fff;
|
||||||
top: 50%;
|
border-radius: 20px;
|
||||||
transform: translateY(-50%);
|
position: absolute;
|
||||||
.user-box{
|
right: 8%;
|
||||||
width: 100%;
|
top: 50%;
|
||||||
height: 100%;
|
transform: translateY(-50%);
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
.user-box {
|
||||||
justify-content: space-between;
|
|
||||||
flex-direction: column;
|
|
||||||
.title{
|
|
||||||
display: block;
|
|
||||||
color: #1891FF;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 500;
|
|
||||||
margin: 0 0 5% 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.login-btn{
|
|
||||||
margin-bottom: 0;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.user-layout-login-mobile{
|
|
||||||
right: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0 !important;
|
height: 100%;
|
||||||
height: 46% !important;
|
overflow: hidden;
|
||||||
background: transparent;
|
display: flex;
|
||||||
min-height: 0;
|
justify-content: space-between;
|
||||||
padding: 0 2rem 0 2rem;
|
flex-direction: column;
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
.title {
|
||||||
margin-top: 6rem;
|
display: block;
|
||||||
transform: translateY(-50%);
|
color: #1891FF;
|
||||||
.ant-row{
|
font-size: 28px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 0 0 5% 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-layout-login-mobile {
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0 !important;
|
||||||
|
height: 46% !important;
|
||||||
|
background: transparent;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 0 2rem 0 2rem;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: 6rem;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user