操作限制相关国际化添加国际化

uat_us
DESKTOP-6C3NK6N\WXS 2024-07-30 09:32:00 +08:00
parent e16a02eaff
commit 84a8f6ec75
1 changed files with 16 additions and 12 deletions

View File

@ -130,7 +130,8 @@ Vue.prototype.$validatePassword = (rule, value, callback) => {
/* eslint-disable */
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
if (!reg1.test(value)) {
callback(lang === 'zh' ? new Error("密码必须包含18 32 个字符2至少1个数字3) 至少1个大写字母4至少1个小写字母5至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
callback(
new Error(_vm.$t('env:regExp:formatPassword')))
} else {
callback();
}
@ -306,7 +307,7 @@ async function VueInit() {
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
window.location.href = `/login`
zzSessionStorage.removeItem('lastWorkbench')
_vm.$alert(lang === 'en' ? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
_vm.$alert(_vm.$t("env:sso:tip"), {
type: 'warning',
})
}
@ -367,7 +368,7 @@ async function VueInit() {
}
_vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login`
if(_vm.$msgbox){
if (_vm.$msgbox) {
_vm.$msgbox.close();
}
isOpen = false
@ -375,7 +376,10 @@ async function VueInit() {
zzSessionStorage.removeItem('isLock')
router.push("/login")
}).then(() => {
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
// _vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
// type: 'warning',
// })
_vm.$alert(_vm.$t("env:loginOut"), {
type: 'warning',
})
})
@ -399,17 +403,17 @@ async function VueInit() {
isOpen = true
zzSessionStorage.setItem('isLock', 'true')
_vm.$msgbox({
title: lang === 'zh' ? '已锁定' : 'Locked',
confirmButtonText: lang === 'zh' ? '解锁' : 'Unlock',
title: _vm.$t("env:lock:msgBox:title"),
confirmButtonText: _vm.$t("env:lock:msgBox:confirmButtonText"),
showClose: false,
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (!_vm.unlock.my_username) {
_vm.$alert(lang === 'zh' ? '请输入您的用户名解锁' : 'Please enter your user name to unlock.')
_vm.$alert(_vm.$t("env:lock:msgBox:iupUser"))
return
}
if (!_vm.unlock.my_password) {
_vm.$alert(lang === 'zh' ? '请输入您的密码解锁' : 'Please enter the correct password to unlock.')
_vm.$alert(_vm.$t("env:lock:msgBox:inpPassword"))
return
}
var my_username = zzSessionStorage.getItem('my_username')
@ -420,7 +424,7 @@ async function VueInit() {
resetReadingRestTime().then(() => {
})
const closeLock = (_vm) => {
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
_vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
_vm.unlock = {
my_username: null,
my_password: null
@ -455,7 +459,7 @@ async function VueInit() {
} else {
// console.log(111)
_vm.$message.error(lang === 'zh' ? '请输入正确用户名密码' : 'Please enter the correct password.')
_vm.$message.error(_vm.$t('env:lock:msgBox:userFail'))
}
}
},
@ -464,7 +468,7 @@ async function VueInit() {
props: { labelWidth: "80px" }
}, [
h('el-form-item', {
props: { label: lang === 'zh' ? '用户名' : 'Username' },
props: { label: _vm.$t("env:lock:msgBox:form:username") },
}, [
h('input', {
props: {
@ -486,7 +490,7 @@ async function VueInit() {
})
]),
h('el-form-item', {
props: { label: lang === 'zh' ? '密码' : 'Password' },
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
}, [
h('input', {
props: {