fix 登录密码不可复制;用户管理-岗位英文修改;混入中分页添加空格

This commit is contained in:
赵霄
2024-06-25 11:31:58 +08:00
parent 84ec7d9f95
commit a0d9faaa51
3 changed files with 183 additions and 109 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ module.exports = {
heads: 'Heads',
account: 'Account',
userName: 'User Name',
post: 'post',
post: 'Post',
selectedAccount: 'Selected account?',
// 新增、编辑用户
loginPassword: 'Login Password',
+9 -2
View File
@@ -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,
+82 -15
View File
@@ -28,9 +28,20 @@
: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 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>
@@ -53,8 +64,16 @@
</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">
@@ -138,14 +161,23 @@
</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: '',
@@ -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
@@ -421,11 +480,14 @@ function isMobile () {
.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%;
@@ -439,6 +501,7 @@ function isMobile () {
right: 8%;
top: 50%;
transform: translateY(-50%);
.user-box {
width: 100%;
height: 100%;
@@ -446,6 +509,7 @@ function isMobile () {
display: flex;
justify-content: space-between;
flex-direction: column;
.title {
display: block;
color: #1891FF;
@@ -454,12 +518,14 @@ function isMobile () {
margin: 0 0 5% 0;
text-align: center;
}
.login-btn {
margin-bottom: 0;
font-size: 10px;
}
}
}
.user-layout-login-mobile {
right: 0;
width: 100%;
@@ -472,6 +538,7 @@ function isMobile () {
top: 50%;
margin-top: 6rem;
transform: translateY(-50%);
.ant-row {
margin-bottom: 0;
}