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