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', 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',
+9 -2
View File
@@ -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,
+82 -15
View File
@@ -28,9 +28,20 @@
: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'"
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 slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }" />
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -53,8 +64,16 @@
</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">
@@ -138,14 +161,23 @@
</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: '',
@@ -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
@@ -421,11 +480,14 @@ function isMobile () {
.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 { .ant-row {
margin-bottom: 4%; margin-bottom: 4%;
} }
.main { .main {
height: 100%; height: 100%;
.user-layout-login { .user-layout-login {
z-index: 99; z-index: 99;
width: 24%; width: 24%;
@@ -439,6 +501,7 @@ function isMobile () {
right: 8%; right: 8%;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
.user-box { .user-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -446,6 +509,7 @@ function isMobile () {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
.title { .title {
display: block; display: block;
color: #1891FF; color: #1891FF;
@@ -454,12 +518,14 @@ function isMobile () {
margin: 0 0 5% 0; margin: 0 0 5% 0;
text-align: center; text-align: center;
} }
.login-btn { .login-btn {
margin-bottom: 0; margin-bottom: 0;
font-size: 10px; font-size: 10px;
} }
} }
} }
.user-layout-login-mobile { .user-layout-login-mobile {
right: 0; right: 0;
width: 100%; width: 100%;
@@ -472,6 +538,7 @@ function isMobile () {
top: 50%; top: 50%;
margin-top: 6rem; margin-top: 6rem;
transform: translateY(-50%); transform: translateY(-50%);
.ant-row { .ant-row {
margin-bottom: 0; margin-bottom: 0;
} }