feat:全局替换 key为password以及pwd的属性 换为 pin
This commit is contained in:
@@ -127,7 +127,7 @@
|
|||||||
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="101-3">
|
<el-menu-item index="101-3">
|
||||||
<div @click="showPwdDialog" id="header-to-changepwd">{{$t('overall.changePwd')}}</div>
|
<div @click="showPinDialog" id="header-to-changepin">{{$t('overall.changePin')}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="101-4">
|
<el-menu-item index="101-4">
|
||||||
<div @click="logout" id="header-to-logout">{{$t('overall.signOut')}}</div>
|
<div @click="logout" id="header-to-logout">{{$t('overall.signOut')}}</div>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<dc-box @close="closeDcBox" :dc="dc" :user-data="userData" @reload="getAssetData" v-if="rightBox.dc.show"></dc-box>
|
<dc-box @close="closeDcBox" :dc="dc" :user-data="userData" @reload="getAssetData" v-if="rightBox.dc.show"></dc-box>
|
||||||
</transition>
|
</transition>
|
||||||
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -162,11 +162,11 @@
|
|||||||
import bus from '../../libs/bus'
|
import bus from '../../libs/bus'
|
||||||
import dcBox from './rightBox/dcBox' // dc弹框
|
import dcBox from './rightBox/dcBox' // dc弹框
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
import changePwd from '../page/config/changePwd'
|
import changePin from '../page/config/changePin'
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
components: {
|
components: {
|
||||||
'change-password': changePwd,
|
'change-password': changePin,
|
||||||
'dc-box': dcBox
|
'dc-box': dcBox
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -283,7 +283,7 @@ export default {
|
|||||||
permission: 'header_add_rule'
|
permission: 'header_add_rule'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
showChangePwd: false
|
showChangePin: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -338,10 +338,10 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
username: '',
|
username: '',
|
||||||
security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv
|
security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv
|
||||||
password: '',
|
pinrd: '',
|
||||||
auth_protocol: 'MD5', // MD5/SHA
|
auth_protocol: 'MD5', // MD5/SHA
|
||||||
priv_protocol: 'DES', // DES/AES
|
priv_protocol: 'DES', // DES/AES
|
||||||
priv_password: '',
|
priv_pin: '',
|
||||||
context_name: ''
|
context_name: ''
|
||||||
}
|
}
|
||||||
} else if (item.type == 3) {
|
} else if (item.type == 3) {
|
||||||
@@ -483,11 +483,11 @@ export default {
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showPwdDialog () {
|
showPinDialog () {
|
||||||
this.showChangePwd = true
|
this.showChangePin = true
|
||||||
},
|
},
|
||||||
dialogClosed () {
|
dialogClosed () {
|
||||||
this.showChangePwd = false
|
this.showChangePin = false
|
||||||
},
|
},
|
||||||
cancel () {
|
cancel () {
|
||||||
this.jumpTo(this.$route.path.slice(1, this.$route.path.length))
|
this.jumpTo(this.$route.path.slice(1, this.$route.path.length))
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const cn = {
|
|||||||
active: '活跃',
|
active: '活跃',
|
||||||
type: '类别',
|
type: '类别',
|
||||||
detail: '详细信息',
|
detail: '详细信息',
|
||||||
changePwd: '修改密码',
|
changePin: '修改密码',
|
||||||
createCabinet: '创建机柜',
|
createCabinet: '创建机柜',
|
||||||
createModel: '创建型号',
|
createModel: '创建型号',
|
||||||
createModule: '创建模块',
|
createModule: '创建模块',
|
||||||
@@ -145,8 +145,8 @@ const cn = {
|
|||||||
finish: '完成',
|
finish: '完成',
|
||||||
invalidDb: '数据库配置可能存在一些错误',
|
invalidDb: '数据库配置可能存在一些错误',
|
||||||
invalidRedis: 'Redis的配置可能有一些错误',
|
invalidRedis: 'Redis的配置可能有一些错误',
|
||||||
invalidpin: 'Redis的密码可能错误',
|
invalidPin: 'Redis的密码可能错误',
|
||||||
requirepin: 'Redis可能需要密码',
|
requirePin: 'Redis可能需要密码',
|
||||||
wait: '配置已保存,请耐心等待生效',
|
wait: '配置已保存,请耐心等待生效',
|
||||||
reloadTimeout: '重新启动服务器花了太多时间,安装可能有一些问题',
|
reloadTimeout: '重新启动服务器花了太多时间,安装可能有一些问题',
|
||||||
hadConfig: '已经有人开始配置系统',
|
hadConfig: '已经有人开始配置系统',
|
||||||
@@ -538,8 +538,8 @@ const cn = {
|
|||||||
userTip: '用户名提示',
|
userTip: '用户名提示',
|
||||||
pinTip: '密码提示',
|
pinTip: '密码提示',
|
||||||
reloginpinTip: 'RELOGIN提示',
|
reloginpinTip: 'RELOGIN提示',
|
||||||
userPwdIntroduce: '请指定用户名和密码提示以便TELNET登录过程可自动运行',
|
userPinIntroduce: '请指定用户名和密码提示以便TELNET登录过程可自动运行',
|
||||||
reLoginPwdIntroduce: '请指定密码提示以便RELOGIN登录过程可自动运行',
|
reLoginPinIntroduce: '请指定密码提示以便RELOGIN登录过程可自动运行',
|
||||||
username: '用户名',
|
username: '用户名',
|
||||||
port: '端口',
|
port: '端口',
|
||||||
upload: '上传',
|
upload: '上传',
|
||||||
@@ -616,15 +616,15 @@ const cn = {
|
|||||||
editUser: '编辑用户',
|
editUser: '编辑用户',
|
||||||
notCurrentlySupport: '暂不支持',
|
notCurrentlySupport: '暂不支持',
|
||||||
pin: '密码',
|
pin: '密码',
|
||||||
oldPwd: '旧密码',
|
oldPin: '旧密码',
|
||||||
inputOldPwd: '请输入旧密码',
|
inputOldPin: '请输入旧密码',
|
||||||
newPwd: '新密码',
|
newPin: '新密码',
|
||||||
inputNewPwd: '请输入新密码',
|
inputNewPin: '请输入新密码',
|
||||||
confirmPwd: '确认密码',
|
confirmPin: '确认密码',
|
||||||
inputConfirmPwd: '请再次输入密码',
|
inputConfirmPin: '请再次输入密码',
|
||||||
invalidPwd: '无效的密码,最少6个字符',
|
invalidPin: '无效的密码,最少6个字符',
|
||||||
confirmPwdErr: '两次密码输入不一致',
|
confirmPinErr: '两次密码输入不一致',
|
||||||
reinputPwd: '请再次输入密码',
|
reinputPin: '请再次输入密码',
|
||||||
notification: '通知',
|
notification: '通知',
|
||||||
mobile: '电话'
|
mobile: '电话'
|
||||||
},
|
},
|
||||||
@@ -866,14 +866,14 @@ const cn = {
|
|||||||
smtpHost: 'SMTP主机',
|
smtpHost: 'SMTP主机',
|
||||||
smtpPort: 'SMTP端口',
|
smtpPort: 'SMTP端口',
|
||||||
smtpAccount: 'SMTP账号',
|
smtpAccount: 'SMTP账号',
|
||||||
smtpPwd: 'SMTP密码',
|
smtpPin: 'SMTP密码',
|
||||||
sendAccount: '发送账号',
|
sendAccount: '发送账号',
|
||||||
timeout: '超时时间',
|
timeout: '超时时间',
|
||||||
testAccount: '测试账号',
|
testAccount: '测试账号',
|
||||||
useSSL: 'SSL',
|
useSSL: 'SSL',
|
||||||
useTLS: 'TLS',
|
useTLS: 'TLS',
|
||||||
testConnection: '测试连接',
|
testConnection: '测试连接',
|
||||||
pwdTip: '提示:一些邮件提供商需要输入的是Token',
|
pinTip: '提示:一些邮件提供商需要输入的是Token',
|
||||||
sendAccountTip: '提示:发送邮件账号,默认使用SMTP账号作为发送账号',
|
sendAccountTip: '提示:发送邮件账号,默认使用SMTP账号作为发送账号',
|
||||||
testAccountTip: '提示:仅用来作为测试邮件收件人',
|
testAccountTip: '提示:仅用来作为测试邮件收件人',
|
||||||
sslTip: '如果SMTP端口是465,通常需要启用SSL',
|
sslTip: '如果SMTP端口是465,通常需要启用SSL',
|
||||||
@@ -892,7 +892,7 @@ const cn = {
|
|||||||
ldap: 'LDAP',
|
ldap: 'LDAP',
|
||||||
address: 'LDAP地址',
|
address: 'LDAP地址',
|
||||||
dn: 'Bind DN',
|
dn: 'Bind DN',
|
||||||
pwd: '密码',
|
pin: '密码',
|
||||||
ou: '用户OU',
|
ou: '用户OU',
|
||||||
ouTip: '使用符号 "|" 分隔OU',
|
ouTip: '使用符号 "|" 分隔OU',
|
||||||
filter: '用户过滤器',
|
filter: '用户过滤器',
|
||||||
@@ -932,11 +932,11 @@ const cn = {
|
|||||||
reset: {
|
reset: {
|
||||||
reset: '重置',
|
reset: '重置',
|
||||||
type: '类型',
|
type: '类型',
|
||||||
pwd: '密码',
|
pin: '密码',
|
||||||
metric: '指标',
|
metric: '指标',
|
||||||
alert: '告警',
|
alert: '告警',
|
||||||
sysConfig: '系统设置',
|
sysConfig: '系统设置',
|
||||||
pwdTip: '请输入密码',
|
pinTip: '请输入密码',
|
||||||
promptTitle: '确认密码',
|
promptTitle: '确认密码',
|
||||||
yes: '是',
|
yes: '是',
|
||||||
no: '否'
|
no: '否'
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ const en = {
|
|||||||
back: 'Back', // 返回
|
back: 'Back', // 返回
|
||||||
unavailable: 'Unavailable',
|
unavailable: 'Unavailable',
|
||||||
available: 'Available',
|
available: 'Available',
|
||||||
changePwd: 'Change password', // 修改密码
|
changePin: 'Change password', // 修改密码
|
||||||
createChart: 'Create chart',
|
createChart: 'Create chart',
|
||||||
createProject: 'Create project',
|
createProject: 'Create project',
|
||||||
createEndpoint: 'Create endpoint',
|
createEndpoint: 'Create endpoint',
|
||||||
@@ -153,8 +153,8 @@ const en = {
|
|||||||
finish: 'Finish',
|
finish: 'Finish',
|
||||||
invalidDb: 'There may be some errors in the configuration of the database',
|
invalidDb: 'There may be some errors in the configuration of the database',
|
||||||
invalidRedis: 'There may be some errors in the configuration of the Redis',
|
invalidRedis: 'There may be some errors in the configuration of the Redis',
|
||||||
invalidpin: "Redis's password may be wrong",
|
invalidPin: "Redis's password may be wrong",
|
||||||
requirepin: 'The password may be required by the Redis',
|
requirePin: 'The password may be required by the Redis',
|
||||||
wait: 'The configuration has been saved, please wait patiently for it to take effect',
|
wait: 'The configuration has been saved, please wait patiently for it to take effect',
|
||||||
reloadTimeout: 'It took too much time to restart the server, there may be some problems when you install',
|
reloadTimeout: 'It took too much time to restart the server, there may be some problems when you install',
|
||||||
hadConfig: 'Someone has started to configure the system',
|
hadConfig: 'Someone has started to configure the system',
|
||||||
@@ -542,9 +542,9 @@ const en = {
|
|||||||
telnetProtocol: 'Telnet',
|
telnetProtocol: 'Telnet',
|
||||||
userTip: 'User tip', // 用户名提示
|
userTip: 'User tip', // 用户名提示
|
||||||
pinTip: 'Password tip', // 密码提示
|
pinTip: 'Password tip', // 密码提示
|
||||||
reloginpinTip: 'Relogin tip', // 密码提示
|
reloginPinTip: 'Relogin tip', // 密码提示
|
||||||
userPwdIntroduce: 'Please specify a user name and password so that the telenet login process can automatically log in',
|
userPinIntroduce: 'Please specify a user name and password so that the telenet login process can automatically log in',
|
||||||
reLoginPwdIntroduce: 'Please specify the password prompt so that the login process can run automatically',
|
reLoginPinIntroduce: 'Please specify the password prompt so that the login process can run automatically',
|
||||||
username: 'Username', // '用户名'
|
username: 'Username', // '用户名'
|
||||||
port: 'Port', // '端口'
|
port: 'Port', // '端口'
|
||||||
upload: 'Upload', // '上传'
|
upload: 'Upload', // '上传'
|
||||||
@@ -625,15 +625,15 @@ const en = {
|
|||||||
editUser: 'Edit user', // "编辑用户"
|
editUser: 'Edit user', // "编辑用户"
|
||||||
notCurrentlySupport: 'Not available', // '暂不支持'
|
notCurrentlySupport: 'Not available', // '暂不支持'
|
||||||
pin: 'Password', // '密码'
|
pin: 'Password', // '密码'
|
||||||
oldPwd: 'Old password',
|
oldPin: 'Old password',
|
||||||
inputOldPwd: 'Please input old password',
|
inputOldPin: 'Please input old password',
|
||||||
newPwd: 'New password',
|
newPin: 'New password',
|
||||||
inputNewPwd: 'Please input new password',
|
inputNewPin: 'Please input new password',
|
||||||
confirmPwd: 'Confirm password',
|
confirmPin: 'Confirm password',
|
||||||
inputConfirmPwd: 'Please input confirm password',
|
inputConfirmPin: 'Please input confirm password',
|
||||||
invalidPwd: 'invalide password,the length at least 6',
|
invalidPin: 'invalide password,the length at least 6',
|
||||||
confirmPwdErr: 'The two passwords are inconsistent',
|
confirmPinErr: 'The two passwords are inconsistent',
|
||||||
reinputPwd: 'Enter password again',
|
reinputPin: 'Enter password again',
|
||||||
notification: 'Notification',
|
notification: 'Notification',
|
||||||
mobile: 'Mobile'
|
mobile: 'Mobile'
|
||||||
},
|
},
|
||||||
@@ -883,14 +883,14 @@ const en = {
|
|||||||
smtpHost: 'SMTP host',
|
smtpHost: 'SMTP host',
|
||||||
smtpPort: 'SMTP port',
|
smtpPort: 'SMTP port',
|
||||||
smtpAccount: 'SMTP account',
|
smtpAccount: 'SMTP account',
|
||||||
smtpPwd: 'SMTP password',
|
smtpPin: 'SMTP password',
|
||||||
sendAccount: 'Send account',
|
sendAccount: 'Send account',
|
||||||
timeout: 'Timeout',
|
timeout: 'Timeout',
|
||||||
testAccount: 'Test account',
|
testAccount: 'Test account',
|
||||||
useSSL: 'SSL',
|
useSSL: 'SSL',
|
||||||
useTLS: 'TLS',
|
useTLS: 'TLS',
|
||||||
testConnection: 'Test connection',
|
testConnection: 'Test connection',
|
||||||
pwdTip: 'Tip:Some email providers need to enter token',
|
pinTip: 'Tip:Some email providers need to enter token',
|
||||||
sendAccountTip: 'Tip:The SMTP account is used as the sending account by default',
|
sendAccountTip: 'Tip:The SMTP account is used as the sending account by default',
|
||||||
testAccountTip: 'Tip:Used only as test mail recipient',
|
testAccountTip: 'Tip:Used only as test mail recipient',
|
||||||
sslTip: 'If the SMTP port is 465, you usually need to enable SSL',
|
sslTip: 'If the SMTP port is 465, you usually need to enable SSL',
|
||||||
@@ -909,7 +909,7 @@ const en = {
|
|||||||
ldap: 'LDAP',
|
ldap: 'LDAP',
|
||||||
address: 'LDAP address',
|
address: 'LDAP address',
|
||||||
dn: 'Bind DN',
|
dn: 'Bind DN',
|
||||||
pwd: 'Password',
|
pin: 'Password',
|
||||||
ou: 'User OU',
|
ou: 'User OU',
|
||||||
ouTip: 'Use the "|" symbol to separate OU',
|
ouTip: 'Use the "|" symbol to separate OU',
|
||||||
filter: 'User filter',
|
filter: 'User filter',
|
||||||
@@ -952,11 +952,11 @@ const en = {
|
|||||||
reset: {
|
reset: {
|
||||||
reset: 'Reset',
|
reset: 'Reset',
|
||||||
type: 'Type',
|
type: 'Type',
|
||||||
pwd: 'Password',
|
pin: 'Password',
|
||||||
metric: 'Metric',
|
metric: 'Metric',
|
||||||
alert: 'Alert',
|
alert: 'Alert',
|
||||||
sysConfig: 'System config',
|
sysConfig: 'System config',
|
||||||
pwdTip: 'Please input your password',
|
pinTip: 'Please input your password',
|
||||||
promptTitle: 'Confirm',
|
promptTitle: 'Confirm',
|
||||||
yes: 'Yes',
|
yes: 'Yes',
|
||||||
no: 'No'
|
no: 'No'
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ export default {
|
|||||||
// 登录成功,记录用户名、token和lang
|
// 登录成功,记录用户名、token和lang
|
||||||
sessionStorage.setItem('nz-username', this.loginData.username)
|
sessionStorage.setItem('nz-username', this.loginData.username)
|
||||||
localStorage.setItem('nz-username', this.loginData.username)
|
localStorage.setItem('nz-username', this.loginData.username)
|
||||||
|
localStorage.setItem('nz-prometheus-federation-enabled', res.data.prometheusFederationEnabled)
|
||||||
localStorage.setItem('nz-language', this.lang)
|
localStorage.setItem('nz-language', this.lang)
|
||||||
this.$i18n.locale = this.lang
|
this.$i18n.locale = this.lang
|
||||||
this.loginSuccess(res)
|
this.loginSuccess(res)
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ export default {
|
|||||||
labelModule: [],
|
labelModule: [],
|
||||||
basic_auth: {
|
basic_auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
pin: ''
|
||||||
},
|
},
|
||||||
bearer_token: ''
|
bearer_token: ''
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
<!--password-->
|
<!--password-->
|
||||||
<el-form-item :label="$t('config.user.pin')" prop="pin">
|
<el-form-item :label="$t('config.user.pin')" prop="pin">
|
||||||
<el-input id="account-input-password" v-model="editUser.pin" maxlength="16" placeholder=""
|
<el-input id="account-input-password" v-model="editUser.pin" maxlength="16" placeholder=""
|
||||||
show-word-limit size="small" type="password" @blur="passwordBlur"></el-input>
|
show-word-limit size="small" type="password" @blur="pinBlur"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--passwordChange-->
|
<!--pinChange-->
|
||||||
<el-form-item :label="$t('config.user.confirmPwd')" label-width="200px" prop="pinChange">
|
<el-form-item :label="$t('config.user.confirmPin')" label-width="200px" prop="pinChange">
|
||||||
<el-input id="account-input-passwordChange" v-model="editUser.pinChange" maxlength="16" placeholder=""
|
<el-input id="account-input-pinChange" v-model="editUser.pinChange" maxlength="16" placeholder=""
|
||||||
show-word-limit size="small" type="password"></el-input>
|
show-word-limit size="small" type="password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--email-->
|
<!--email-->
|
||||||
@@ -90,11 +90,11 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
const vm = this
|
const vm = this
|
||||||
const validatePassword = (rule, value, callback) => { // 确认密码的二次校验
|
const validatePin = (rule, value, callback) => { // 确认密码的二次校验
|
||||||
if (value === '' && this.editUser.pin) {
|
if (value === '' && this.editUser.pin) {
|
||||||
callback(new Error(this.$t('config.user.inputConfirmPwd')))
|
callback(new Error(this.$t('config.user.inputConfirmPin')))
|
||||||
} else if (value !== this.editUser.pin) {
|
} else if (value !== this.editUser.pin) {
|
||||||
callback(new Error(this.$t('config.user.confirmPwdErr')))
|
callback(new Error(this.$t('config.user.confirmPinErr')))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ export default {
|
|||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pinChange: [
|
pinChange: [
|
||||||
{ validator: validatePassword, trigger: 'blur' },
|
{ validator: validatePin, trigger: 'blur' },
|
||||||
{ required: true, message: '', trigger: 'blur' }
|
{ required: true, message: '', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
roleIds: [
|
roleIds: [
|
||||||
@@ -129,7 +129,7 @@ export default {
|
|||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pinChange: [
|
pinChange: [
|
||||||
{ validator: validatePassword, trigger: 'blur' }
|
{ validator: validatePin, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
roleIds: [
|
roleIds: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
@@ -166,9 +166,9 @@ export default {
|
|||||||
this.$emit('close', refresh)
|
this.$emit('close', refresh)
|
||||||
},
|
},
|
||||||
/* 密码失去焦点 检验确认密码 */
|
/* 密码失去焦点 检验确认密码 */
|
||||||
passwordBlur () {
|
pinBlur () {
|
||||||
if (this.editUser.pin && this.editUser.pinChange) {
|
if (this.editUser.pin && this.editUser.pinChange) {
|
||||||
this.$refs.accountForm.validateField('passwordChange')
|
this.$refs.accountForm.validateField('pinChange')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRoles () {
|
getRoles () {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
agent2: agent2,
|
agent2: agent2,
|
||||||
|
agentPrometheusEnabled: localStorage.getItem('nz-prometheus-federation-enabled'),
|
||||||
rules: {
|
rules: {
|
||||||
'dc.name': [
|
'dc.name': [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
||||||
|
|||||||
@@ -395,10 +395,10 @@ export default {
|
|||||||
port: 22,
|
port: 22,
|
||||||
params: {
|
params: {
|
||||||
user: '',
|
user: '',
|
||||||
method: 'password',
|
method: 'pin',
|
||||||
password: '',
|
pin: '',
|
||||||
key: '',
|
key: '',
|
||||||
keyPassword: ''
|
keyPin: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (type == 'TELNET') {
|
} else if (type == 'TELNET') {
|
||||||
@@ -407,9 +407,9 @@ export default {
|
|||||||
port: 23,
|
port: 23,
|
||||||
params: {
|
params: {
|
||||||
user: '',
|
user: '',
|
||||||
password: '',
|
pin: '',
|
||||||
userTip: '',
|
userTip: '',
|
||||||
passwordTip: '',
|
pinTip: '',
|
||||||
reloginTip: ''
|
reloginTip: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -422,8 +422,8 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
securityName: '',
|
securityName: '',
|
||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
password: '',
|
pin: '',
|
||||||
privPassword: '',
|
privPin: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
contextName: ''
|
contextName: ''
|
||||||
|
|||||||
@@ -544,10 +544,10 @@ export default {
|
|||||||
port: 22,
|
port: 22,
|
||||||
params: {
|
params: {
|
||||||
user: '',
|
user: '',
|
||||||
method: 'password',
|
method: 'pin',
|
||||||
password: '',
|
pin: '',
|
||||||
key: '',
|
key: '',
|
||||||
passwordKey: ''
|
pinKey: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (type == 'TELNET') {
|
} else if (type == 'TELNET') {
|
||||||
@@ -556,9 +556,9 @@ export default {
|
|||||||
port: 23,
|
port: 23,
|
||||||
params: {
|
params: {
|
||||||
user: '',
|
user: '',
|
||||||
password: '',
|
pin: '',
|
||||||
userTip: '',
|
userTip: '',
|
||||||
passwordTip: '',
|
pinTip: '',
|
||||||
reloginTip: ''
|
reloginTip: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -571,8 +571,8 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
securityName: '',
|
securityName: '',
|
||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
password: '',
|
pin: '',
|
||||||
privPassword: '',
|
privPin: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
contextName: ''
|
contextName: ''
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ export default {
|
|||||||
labelModule: [],
|
labelModule: [],
|
||||||
basic_auth: {
|
basic_auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
pin: ''
|
||||||
},
|
},
|
||||||
bearer_token: ''
|
bearer_token: ''
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--host-->
|
<!--host-->
|
||||||
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
||||||
<el-input placeholder="" v-model.number="editEndpoint.configs.host" size="small" id="module-box-input-host"></el-input>
|
<el-input placeholder="" v-model="editEndpoint.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<div v-show="showAllBasicOption" >
|
<div v-show="showAllBasicOption" >
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label='$t("project.endpoint.pin")' prop="authtype" v-if="authType === 1" class="half-form-item">
|
<el-form-item :label='$t("project.endpoint.pin")' prop="authtype" v-if="authType === 1" class="half-form-item">
|
||||||
<el-input placeholder='' v-model.number="editEndpoint.configs.basic_auth.password" size="small" id="module-box-input-password"></el-input>
|
<el-input placeholder='' v-model.number="editEndpoint.configs.basic_auth.pin" size="small" id="module-box-input-password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!--authtype 2-->
|
<!--authtype 2-->
|
||||||
@@ -454,7 +454,7 @@ export default {
|
|||||||
params.configs = JSON.stringify(params.configs)
|
params.configs = JSON.stringify(params.configs)
|
||||||
if (this.authType === 2 && !this.editEndpoint.configs.bearer_token) {
|
if (this.authType === 2 && !this.editEndpoint.configs.bearer_token) {
|
||||||
this.$message.error("'token' is required")
|
this.$message.error("'token' is required")
|
||||||
} else if (this.authType === 1 && !(this.editEndpoint.configs.basic_auth.username && this.editEndpoint.configs.basic_auth.password)) {
|
} else if (this.authType === 1 && !(this.editEndpoint.configs.basic_auth.username && this.editEndpoint.configs.basic_auth.pin)) {
|
||||||
this.$message.error("'username' and 'password' is required")
|
this.$message.error("'username' and 'password' is required")
|
||||||
} else {
|
} else {
|
||||||
this.authType = 0
|
this.authType = 0
|
||||||
@@ -608,7 +608,7 @@ export default {
|
|||||||
this.editEndpoint.configs.bearer_token = ''
|
this.editEndpoint.configs.bearer_token = ''
|
||||||
this.editEndpoint.configs.basic_auth = {
|
this.editEndpoint.configs.basic_auth = {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
pin: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
copyValue () {
|
copyValue () {
|
||||||
@@ -717,7 +717,7 @@ export default {
|
|||||||
if (params.basic_auth && !params.basic_auth.username) {
|
if (params.basic_auth && !params.basic_auth.username) {
|
||||||
delete params.basic_auth
|
delete params.basic_auth
|
||||||
}
|
}
|
||||||
if (params.basic_auth && !params.basic_auth.password) {
|
if (params.basic_auth && !params.basic_auth.pin) {
|
||||||
delete params.basic_auth
|
delete params.basic_auth
|
||||||
}
|
}
|
||||||
if (params.param && !Object.keys(params.param).length) {
|
if (params.param && !Object.keys(params.param).length) {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--host-->
|
<!--host-->
|
||||||
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
||||||
<el-input placeholder="" v-model.number="editModule.configs.host" size="small" id="module-box-input-host"></el-input>
|
<el-input placeholder="" v-model="editModule.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<div v-show="showAllBasicOption" >
|
<div v-show="showAllBasicOption" >
|
||||||
@@ -292,10 +292,10 @@ export default {
|
|||||||
username: [
|
username: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
password: [
|
pin: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
priv_password: [
|
priv_pin: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
max_repetitions: [
|
max_repetitions: [
|
||||||
@@ -448,7 +448,7 @@ export default {
|
|||||||
params.configs = JSON.stringify(params.configs)
|
params.configs = JSON.stringify(params.configs)
|
||||||
if (this.authType === 2 && !this.editModule.configs.bearer_token) {
|
if (this.authType === 2 && !this.editModule.configs.bearer_token) {
|
||||||
this.$message.error("'token' is required")
|
this.$message.error("'token' is required")
|
||||||
} else if (this.authType === 1 && !(this.editModule.configs.basic_auth.username && this.editModule.configs.basic_auth.password)) {
|
} else if (this.authType === 1 && !(this.editModule.configs.basic_auth.username && this.editModule.configs.basic_auth.pin)) {
|
||||||
this.$message.error("'username' and 'password' is required")
|
this.$message.error("'username' and 'password' is required")
|
||||||
} else {
|
} else {
|
||||||
this.authType = 0
|
this.authType = 0
|
||||||
@@ -588,7 +588,7 @@ export default {
|
|||||||
this.editModule.configs.bearer_token = ''
|
this.editModule.configs.bearer_token = ''
|
||||||
this.editModule.configs.basic_auth = {
|
this.editModule.configs.basic_auth = {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
pin: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
copyValue () {
|
copyValue () {
|
||||||
@@ -696,7 +696,7 @@ export default {
|
|||||||
if (params.basic_auth && !params.basic_auth.username) {
|
if (params.basic_auth && !params.basic_auth.username) {
|
||||||
delete params.basic_auth
|
delete params.basic_auth
|
||||||
}
|
}
|
||||||
if (params.basic_auth && !params.basic_auth.password) {
|
if (params.basic_auth && !params.basic_auth.pin) {
|
||||||
delete params.basic_auth
|
delete params.basic_auth
|
||||||
}
|
}
|
||||||
if (params.param && !Object.keys(params.param).length) {
|
if (params.param && !Object.keys(params.param).length) {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
},
|
},
|
||||||
configs: [
|
configs: [
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
},
|
},
|
||||||
configs: [
|
configs: [
|
||||||
{
|
{
|
||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
},
|
},
|
||||||
configs: [
|
configs: [
|
||||||
{
|
{
|
||||||
@@ -240,7 +240,7 @@ export default {
|
|||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configs.forEach(item => {
|
configs.forEach(item => {
|
||||||
@@ -269,7 +269,7 @@ export default {
|
|||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
},
|
},
|
||||||
configs: [
|
configs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.password" id="traffic-setting-password"></el-input>
|
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.pin" id="traffic-setting-password"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -101,10 +101,10 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privPassword')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('project.module.privPin')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPassword" id="traffic-setting-privPassword"></el-input>
|
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPin" id="traffic-setting-privPassword"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<!--password-->
|
<!--password-->
|
||||||
<el-form-item :label="$t('config.account.pin')" prop="pin">
|
<el-form-item :label="$t('config.account.pin')" prop="pin">
|
||||||
<el-input id="account-input-password" v-model="editUser.pin" autocomplete="new-password" maxlength="16" placeholder=""
|
<el-input id="account-input-password" v-model="editUser.pin" autocomplete="new-password" maxlength="16" placeholder=""
|
||||||
show-word-limit size="small" type="password" @blur="passwordBlur"></el-input>
|
show-word-limit size="small" type="password" @blur="pinBlur"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--passwordChange-->
|
<!--pinChange-->
|
||||||
<el-form-item :label="$t('config.account.confirmPwd')" label-width="200px" prop="passwordChange">
|
<el-form-item :label="$t('config.account.confirmPin')" label-width="200px" prop="pinChange">
|
||||||
<el-input id="account-input-passwordChange" v-model="editUser.pinChange" autocomplete="new-password" maxlength="16" placeholder=""
|
<el-input id="account-input-pinChange" v-model="editUser.pinChange" autocomplete="new-password" maxlength="16" placeholder=""
|
||||||
show-word-limit size="small" type="password"></el-input>
|
show-word-limit size="small" type="password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--email-->
|
<!--email-->
|
||||||
@@ -109,11 +109,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
const validatePassword = (rule, value, callback) => { // 确认密码的二次校验
|
const validatepin = (rule, value, callback) => { // 确认密码的二次校验
|
||||||
if (value === '' && this.editUser.pin) {
|
if (value === '' && this.editUser.pin) {
|
||||||
callback(new Error(this.$t('config.account.inputConfirmPwd')))
|
callback(new Error(this.$t('config.account.inputConfirmPin')))
|
||||||
} else if (value !== this.editUser.pin) {
|
} else if (value !== this.editUser.pin) {
|
||||||
callback(new Error(this.$t('config.account.confirmPwdErr')))
|
callback(new Error(this.$t('config.account.confirmPinErr')))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pinChange: [
|
pinChange: [
|
||||||
{ validator: validatePassword, trigger: 'blur' },
|
{ validator: validatepin, trigger: 'blur' },
|
||||||
{ required: true, message: '', trigger: 'blur' }
|
{ required: true, message: '', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
roleIds: [
|
roleIds: [
|
||||||
@@ -143,7 +143,7 @@ export default {
|
|||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
pinChange: [
|
pinChange: [
|
||||||
{ validator: validatePassword, trigger: 'blur' }
|
{ validator: validatepin, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
roleIds: [
|
roleIds: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
@@ -228,9 +228,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
/* 密码失去焦点 检验确认密码 */
|
/* 密码失去焦点 检验确认密码 */
|
||||||
passwordBlur () {
|
pinBlur () {
|
||||||
if (this.editUser.pin && this.editUser.pinChange) {
|
if (this.editUser.pin && this.editUser.pinChange) {
|
||||||
this.$refs.accountForm.validateField('passwordChange')
|
this.$refs.accountForm.validateField('pinChange')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getScripts () {
|
getScripts () {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'authType'">
|
<template v-else-if="item.prop === 'authType'">
|
||||||
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.password')}}</span>
|
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.pin')}}</span>
|
||||||
<span v-else-if="scope.row.authType == 2">{{$t('config.terminallog.key')}}</span>
|
<span v-else-if="scope.row.authType == 2">{{$t('config.terminallog.key')}}</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<div class='login-user header-menu--item'>{{username}} <i class="nz-icon nz-icon-arrow-down"></i></div>
|
<div class='login-user header-menu--item'>{{username}} <i class="nz-icon nz-icon-arrow-down"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-changepwd" @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
<div id="header-to-changepin" @click="showPinDialog">{{$t('overall.changePin')}}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-logout" @click="logout">{{$t('overall.signOut')}}</div>
|
<div id="header-to-logout" @click="logout">{{$t('overall.signOut')}}</div>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<dc-box v-if="rightBox.dc.show" :dc="dc" :user-data="userData" @close="closeDcBox" @reload="getAssetData"></dc-box>
|
<dc-box v-if="rightBox.dc.show" :dc="dc" :user-data="userData" @close="closeDcBox" @reload="getAssetData"></dc-box>
|
||||||
</transition>
|
</transition>
|
||||||
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -83,11 +83,11 @@
|
|||||||
import bus from '../../libs/bus'
|
import bus from '../../libs/bus'
|
||||||
import dcBox from '../common/rightBox/dcBox' // dc弹框
|
import dcBox from '../common/rightBox/dcBox' // dc弹框
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
import changePwd from '../page/config/changePwd'
|
import changePin from '../page/config/changePin'
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
components: {
|
components: {
|
||||||
'change-password': changePwd,
|
'change-password': changePin,
|
||||||
'dc-box': dcBox
|
'dc-box': dcBox
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -203,7 +203,7 @@ export default {
|
|||||||
permission: 'header_add_rule'
|
permission: 'header_add_rule'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
showChangePwd: false
|
showChangePin: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -258,10 +258,10 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
username: '',
|
username: '',
|
||||||
security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv
|
security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv
|
||||||
password: '',
|
pin: '',
|
||||||
auth_protocol: 'MD5', // MD5/SHA
|
auth_protocol: 'MD5', // MD5/SHA
|
||||||
priv_protocol: 'DES', // DES/AES
|
priv_protocol: 'DES', // DES/AES
|
||||||
priv_password: '',
|
priv_pin: '',
|
||||||
context_name: ''
|
context_name: ''
|
||||||
}
|
}
|
||||||
} else if (item.type == 3) {
|
} else if (item.type == 3) {
|
||||||
@@ -403,11 +403,11 @@ export default {
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showPwdDialog () {
|
showPinDialog () {
|
||||||
this.showChangePwd = true
|
this.showChangePin = true
|
||||||
},
|
},
|
||||||
dialogClosed () {
|
dialogClosed () {
|
||||||
this.showChangePwd = false
|
this.showChangePin = false
|
||||||
},
|
},
|
||||||
cancel () {
|
cancel () {
|
||||||
this.jumpTo(this.$route.path.slice(1, this.$route.path.length))
|
this.jumpTo(this.$route.path.slice(1, this.$route.path.length))
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'password'">
|
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'password'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="ssh-account-password"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="ssh-account-password"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.ssh')" v-if="account.params.method == 'key'" prop="file">
|
<el-form-item :label="$t('asset.ssh')" v-if="account.params.method == 'key'" prop="file">
|
||||||
<el-input rows="4" type="textarea" placeholder="" v-model="account.params.key" size="small" id="ssh-account-key"></el-input>
|
<el-input rows="4" type="textarea" placeholder="" v-model="account.params.key" size="small" id="ssh-account-key"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'key'">
|
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'key'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPassword" id="ssh-account-keyPassword"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPin" id="ssh-account-keyPin"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
||||||
<el-input size="small" v-model.number="account.port" id="ssh-account-port"/>
|
<el-input size="small" v-model.number="account.port" id="ssh-account-port"/>
|
||||||
@@ -31,12 +31,12 @@
|
|||||||
<el-input autocomplete="new-password" size="small" v-model="account.params.userTip" id="telnet-account-userTip"/>
|
<el-input autocomplete="new-password" size="small" v-model="account.params.userTip" id="telnet-account-userTip"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.pin')">
|
<el-form-item :label="$t('asset.pin')">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="telnet-account-password"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="telnet-account-pin"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.pinTip')">
|
<el-form-item :label="this.$t('asset.pinTip')">
|
||||||
<el-input size="small" v-model="account.params.passwordTip" id="telnet-account-passwordTip"/>
|
<el-input size="small" v-model="account.params.pinTip" id="telnet-account-pinTip"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.reloginpinTip')" prop="reloginTip">
|
<el-form-item :label="$t('asset.reloginPinTip')" prop="reloginTip">
|
||||||
<el-input size="small" v-model="account.params.reloginTip" id="telnet-account-reloginTip"/>
|
<el-input size="small" v-model="account.params.reloginTip" id="telnet-account-reloginTip"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
<el-radio-button label="authPriv"></el-radio-button>
|
<el-radio-button label="authPriv"></el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('login.pin')" prop="params.password" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
<el-form-item :label="$t('login.pin')" prop="params.pin" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="snmp-account-password"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="snmp-account-password"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('project.module.authProtocol')" prop="params.authProtocol" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
<el-form-item :label="$t('project.module.authProtocol')" prop="params.authProtocol" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||||
<el-radio-group v-model="account.params.authProtocol" size="small" id="snmp-account-authProtocol">
|
<el-radio-group v-model="account.params.authProtocol" size="small" id="snmp-account-authProtocol">
|
||||||
@@ -86,8 +86,8 @@
|
|||||||
<el-radio-button label="AES"></el-radio-button>
|
<el-radio-button label="AES"></el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('project.module.privpin')" prop="params.privPassword" v-if="account.params.securityLevel == 'authPriv'">
|
<el-form-item :label="$t('project.module.privPin')" prop="params.privPin" v-if="account.params.securityLevel == 'authPriv'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPassword" id="snmp-account-privPassword"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPin" id="snmp-account-privPin"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -123,24 +123,24 @@ export default {
|
|||||||
user: '',
|
user: '',
|
||||||
authType: 1,
|
authType: 1,
|
||||||
protocol: 'SSH',
|
protocol: 'SSH',
|
||||||
pwd: '',
|
pin: '',
|
||||||
port: null,
|
port: null,
|
||||||
privateKey: null,
|
privateKey: null,
|
||||||
userTip: '',
|
userTip: '',
|
||||||
passwordTip: '',
|
pinTip: '',
|
||||||
reloginPasswordTip: ''
|
reloginPinTip: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isShowTelnetOption () {
|
isShowTelnetOption () {
|
||||||
this.showTelnetOption = !this.showTelnetOption
|
this.showTelnetOption = !this.showTelnetOption
|
||||||
if (!this.showTelnetOption) {
|
if (!this.showTelnetOption) {
|
||||||
this.account.userTip = ''
|
this.account.userTip = ''
|
||||||
this.account.passwordTip = ''
|
this.account.pinTip = ''
|
||||||
this.account.reloginPasswordTip = ''
|
this.account.reloginPinTip = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
telnetOptionState () {
|
telnetOptionState () {
|
||||||
if (this.account.userTip != '' || this.account.passwordTip != '' || this.account.reloginPasswordTip != '') {
|
if (this.account.userTip != '' || this.account.pinTip != '' || this.account.reloginPinTip != '') {
|
||||||
this.showTelnetOption = true
|
this.showTelnetOption = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -155,8 +155,8 @@ export default {
|
|||||||
},
|
},
|
||||||
clearTelnetOptions () {
|
clearTelnetOptions () {
|
||||||
this.account.userTip = ''
|
this.account.userTip = ''
|
||||||
this.account.passwordTip = ''
|
this.account.pinTip = ''
|
||||||
this.account.reloginPasswordTip = ''
|
this.account.reloginPinTip = ''
|
||||||
},
|
},
|
||||||
handleChange (file, fileList) {
|
handleChange (file, fileList) {
|
||||||
if (fileList.length > 0) {
|
if (fileList.length > 0) {
|
||||||
@@ -182,7 +182,7 @@ export default {
|
|||||||
this.clearPrivateKey()
|
this.clearPrivateKey()
|
||||||
}
|
}
|
||||||
if (n.authType == 2) { // 公钥登录
|
if (n.authType == 2) { // 公钥登录
|
||||||
this.account.pwd = ''
|
this.account.pin = ''
|
||||||
}
|
}
|
||||||
if (n.protocol == 'SSH') {
|
if (n.protocol == 'SSH') {
|
||||||
this.showTelnetOption = false
|
this.showTelnetOption = false
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="nz-dialog" :title="$t('overall.changePwd')" :visible.sync="visible" @open="dialogOpened" :modal-append-to-body='false' @closed="dialogClosed" width="600px" :show-close="false" >
|
<el-dialog class="nz-dialog" :title="$t('overall.changePin')" :visible.sync="visible" @open="dialogOpened" :modal-append-to-body='false' @closed="dialogClosed" width="600px" :show-close="false" >
|
||||||
<el-form :model="user" label-position = "top" label-width="150px" :rules="rules" ref="changePwdForm" size="mini">
|
<el-form :model="user" label-position = "top" label-width="150px" :rules="rules" ref="changePinForm" size="mini">
|
||||||
<el-form-item :label="$t('config.user.account')" prop="username" v-show="curUser != sysUser">
|
<el-form-item :label="$t('config.user.account')" prop="username" v-show="curUser != sysUser">
|
||||||
<el-input type="text" autocomplete="false" v-model="user.username" disabled id="change-pwd-username"></el-input>
|
<el-input type="text" autocomplete="false" v-model="user.username" disabled id="change-pin-username"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.user.oldPwd')" prop="pwd">
|
<el-form-item :label="$t('config.user.oldPin')" prop="pin">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pwd" maxlength="20" :placeholder="$t('config.user.inputOldPwd')" id="change-pwd-pwd"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pin" maxlength="20" :placeholder="$t('config.user.inputOldPin')" id="change-pin-pin"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.user.newPwd')" prop="newPwd">
|
<el-form-item :label="$t('config.user.newPin')" prop="newPin">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPwd" maxlength="20" :placeholder="$t('config.user.inputNewPwd')" id="change-pwd-newPwd"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPin" maxlength="20" :placeholder="$t('config.user.inputNewPin')" id="change-pin-newPin"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.user.confirmPwd')" prop="confirmPwd">
|
<el-form-item :label="$t('config.user.confirmPin')" prop="confirmPin">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPwd" maxlength="20" :placeholder="$t('config.user.inputConfirmPwd')" id="change-pwd-confirmPwd"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPin" maxlength="20" :placeholder="$t('config.user.inputConfirmPin')" id="change-pin-confirmPin"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--底部按钮-->
|
<!--底部按钮-->
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="right-box-bottom-btns" >
|
<div class="right-box-bottom-btns" >
|
||||||
<button @click="close" id="change-pwd-esc"
|
<button @click="close" id="change-pin-esc"
|
||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="changePwd" id="change-pwd-save"
|
<button @click="changePin" id="change-pin-save"
|
||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'changePwd',
|
name: 'changePin',
|
||||||
props: {
|
props: {
|
||||||
curUser: { type: String },
|
curUser: { type: String },
|
||||||
showDialog: { type: Boolean, default: false }
|
showDialog: { type: Boolean, default: false }
|
||||||
@@ -46,28 +46,28 @@ export default {
|
|||||||
if (value && value != '') {
|
if (value && value != '') {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(temp.$t('config.user.invalidPwd')))
|
callback(new Error(temp.$t('config.user.invalidPin')))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const validateConfirmPass = (rule, value, callback) => {
|
const validateConfirmPass = (rule, value, callback) => {
|
||||||
if (value && value != '' && value == temp.user.newPwd) {
|
if (value && value != '' && value == temp.user.newPin) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(temp.$t('config.user.confirmPwdErr')))
|
callback(new Error(temp.$t('config.user.confirmPinErr')))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
user: {
|
user: {
|
||||||
username: '',
|
username: '',
|
||||||
pwd: '',
|
pin: '',
|
||||||
newPwd: '',
|
newPin: '',
|
||||||
confirmPwd: ''
|
confirmPin: ''
|
||||||
},
|
},
|
||||||
sysUser: sessionStorage.getItem('nz-username'),
|
sysUser: sessionStorage.getItem('nz-username'),
|
||||||
rules: {
|
rules: {
|
||||||
pwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
newPwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }],
|
newPin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }],
|
||||||
confirmPwd: [{ required: true, message: this.$t('config.user.reinputPwd'), trigger: 'blur' }, { validator: validateConfirmPass, trigger: 'blur' }]
|
confirmPin: [{ required: true, message: this.$t('config.user.reinputPin'), trigger: 'blur' }, { validator: validateConfirmPass, trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
@@ -77,8 +77,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dialogOpened: function () {
|
dialogOpened: function () {
|
||||||
if (this.$refs.changePwdForm) {
|
if (this.$refs.changePinForm) {
|
||||||
this.$refs.changePwdForm.resetFields()
|
this.$refs.changePinForm.resetFields()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialogClosed: function () {
|
dialogClosed: function () {
|
||||||
@@ -87,12 +87,12 @@ export default {
|
|||||||
close: function () {
|
close: function () {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
changePwd: function () {
|
changePin: function () {
|
||||||
this.$refs.changePwdForm.validate((valid) => {
|
this.$refs.changePinForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const paramObj = {
|
const paramObj = {
|
||||||
pin: this.user.pwd,
|
pin: this.user.pin,
|
||||||
newPin: this.user.newPwd
|
newPin: this.user.newPin
|
||||||
}
|
}
|
||||||
this.$get('/sys/user/pin?oldPin=' + paramObj.pin + '&newPin=' + paramObj.newPin).then(response => {
|
this.$get('/sys/user/pin?oldPin=' + paramObj.pin + '&newPin=' + paramObj.newPin).then(response => {
|
||||||
if (response && response.code == 200) {
|
if (response && response.code == 200) {
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.password" id="mib-browser-password"></el-input>
|
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.pin" id="mib-browser-pin"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -118,10 +118,10 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privpin')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('project.module.privPin')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPassword" id="mib-browser-privPassword"></el-input>
|
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPin" id="mib-browser-privPassword"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -285,11 +285,11 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
auth: {
|
auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
pin: '',
|
||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
},
|
},
|
||||||
type: '',
|
type: '',
|
||||||
value: ''
|
value: ''
|
||||||
@@ -303,11 +303,11 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
auth: {
|
auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
pin: '',
|
||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
operationData: ['get', 'walk', 'getnext', 'set'],
|
operationData: ['get', 'walk', 'getnext', 'set'],
|
||||||
@@ -453,11 +453,11 @@ export default {
|
|||||||
community: 'public',
|
community: 'public',
|
||||||
auth: {
|
auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
pin: '',
|
||||||
securityLevel: '',
|
securityLevel: '',
|
||||||
authProtocol: '',
|
authProtocol: '',
|
||||||
privProtocol: '',
|
privProtocol: '',
|
||||||
privPassword: ''
|
privPin: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -481,10 +481,10 @@ export default {
|
|||||||
if (this.searchParamPop.version == 3) {
|
if (this.searchParamPop.version == 3) {
|
||||||
this.searchParamPop.auth.username = snmpAccount.params.username
|
this.searchParamPop.auth.username = snmpAccount.params.username
|
||||||
this.searchParamPop.auth.securityLevel = snmpAccount.params.securityLevel
|
this.searchParamPop.auth.securityLevel = snmpAccount.params.securityLevel
|
||||||
this.searchParamPop.auth.password = snmpAccount.params.password
|
this.searchParamPop.auth.pin = snmpAccount.params.pin
|
||||||
this.searchParamPop.auth.authProtocol = snmpAccount.params.authProtocol
|
this.searchParamPop.auth.authProtocol = snmpAccount.params.authProtocol
|
||||||
if (this.searchParamPop.auth.securityLevel == 'authPriv') { this.searchParamPop.auth.privProtocol = snmpAccount.params.privProtocol }
|
if (this.searchParamPop.auth.securityLevel == 'authPriv') { this.searchParamPop.auth.privProtocol = snmpAccount.params.privProtocol }
|
||||||
this.searchParamPop.auth.privPassword = snmpAccount.params.privPassword
|
this.searchParamPop.auth.privPin = snmpAccount.params.privPin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,9 +312,9 @@ export default {
|
|||||||
this.activeStep = 2
|
this.activeStep = 2
|
||||||
this.step = 2
|
this.step = 2
|
||||||
if (response.code == 574004) { // 密码无效
|
if (response.code == 574004) { // 密码无效
|
||||||
this.$alert(this.$t('setup.invalidpin'), { type: 'warning' })
|
this.$alert(this.$t('setup.invalidPin'), { type: 'warning' })
|
||||||
} else if (response.code == 574005) {
|
} else if (response.code == 574005) {
|
||||||
this.$alert(this.$t('setup.requirepin'), { type: 'warning' })
|
this.$alert(this.$t('setup.requirePin'), { type: 'warning' })
|
||||||
} else if (response.code == 574002) {
|
} else if (response.code == 574002) {
|
||||||
this.$alert(this.$t('setup.invalidCode', { page: this.$t('setup.welcomePage') }), { type: 'warning' })
|
this.$alert(this.$t('setup.invalidCode', { page: this.$t('setup.welcomePage') }), { type: 'warning' })
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -106,9 +106,9 @@
|
|||||||
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_auth_account">
|
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_auth_account">
|
||||||
<el-input v-model="email.email_auth_account" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_account"> autocomplete="off"</el-input>
|
<el-input v-model="email.email_auth_account" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_account"> autocomplete="off"</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.email.smtpPwd')" class="has-tip" prop="email_auth_password">
|
<el-form-item :label="$t('config.system.email.smtpPin')" class="has-tip" prop="email_auth_pin">
|
||||||
<el-input v-model="email.email_auth_password" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off" id="system-email-email_smtp_password"></el-input>
|
<el-input v-model="email.email_auth_pin" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off" id="system-email-email_smtp_password"></el-input>
|
||||||
<div class="el-form-item__tip">{{$t("config.system.email.pwdTip")}}</div>
|
<div class="el-form-item__tip">{{$t("config.system.email.pinTip")}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.email.sendAccount')" class="has-tip" prop="email_send_account">
|
<el-form-item :label="$t('config.system.email.sendAccount')" class="has-tip" prop="email_send_account">
|
||||||
<el-input v-model="email.email_send_account" :disabled="email.email_enable == 'off'" id="system-email-email_send_account"></el-input>
|
<el-input v-model="email.email_send_account" :disabled="email.email_enable == 'off'" id="system-email-email_send_account"></el-input>
|
||||||
@@ -170,8 +170,8 @@
|
|||||||
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
||||||
<el-input v-model="ldap.ldap_dn" id="system-ldap-ldap_dn"></el-input>
|
<el-input v-model="ldap.ldap_dn" id="system-ldap-ldap_dn"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.ldap.pwd')" prop="ldap_password">
|
<el-form-item :label="$t('config.system.ldap.pin')" prop="ldap_pin">
|
||||||
<el-input v-model="ldap.ldap_password" type="password" id="system-ldap-ldap_password"></el-input>
|
<el-input v-model="ldap.ldap_pin" type="password" id="system-ldap-ldap_pin"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.ldap.ou')" class="has-tip" prop="ldap_ou">
|
<el-form-item :label="$t('config.system.ldap.ou')" class="has-tip" prop="ldap_ou">
|
||||||
<el-input v-model="ldap.ldap_ou" id="system-ldap-ldap_ou"></el-input>
|
<el-input v-model="ldap.ldap_ou" id="system-ldap-ldap_ou"></el-input>
|
||||||
@@ -229,8 +229,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.reset.pwd')" prop="password">
|
<el-form-item :label="$t('config.system.reset.pin')" prop="pin">
|
||||||
<el-input id="system-reset-password" v-model="reset.password" type="password"></el-input>
|
<el-input id="system-reset-pin" v-model="reset.pin" type="password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button @click="resetSys()" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_reset_reset'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.reset')}}</button>
|
<button @click="resetSys()" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_reset_reset'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.reset')}}</button>
|
||||||
@@ -294,7 +294,7 @@ export default {
|
|||||||
email_port: 25,
|
email_port: 25,
|
||||||
email_timeout: 10,
|
email_timeout: 10,
|
||||||
email_auth_account: '',
|
email_auth_account: '',
|
||||||
email_auth_password: '',
|
email_auth_pin: '',
|
||||||
email_send_account: '',
|
email_send_account: '',
|
||||||
email_test_account: '',
|
email_test_account: '',
|
||||||
email_security_type: 'NONE'
|
email_security_type: 'NONE'
|
||||||
@@ -330,7 +330,7 @@ export default {
|
|||||||
ldap: {
|
ldap: {
|
||||||
ldap_address: '',
|
ldap_address: '',
|
||||||
ldap_dn: '',
|
ldap_dn: '',
|
||||||
ldap_password: '',
|
ldap_pin: '',
|
||||||
ldap_ou: '',
|
ldap_ou: '',
|
||||||
ldap_user_filter: '',
|
ldap_user_filter: '',
|
||||||
ldap_mapping: '',
|
ldap_mapping: '',
|
||||||
@@ -346,7 +346,7 @@ export default {
|
|||||||
},
|
},
|
||||||
reset: {
|
reset: {
|
||||||
type: [],
|
type: [],
|
||||||
password: ''
|
pin: ''
|
||||||
},
|
},
|
||||||
linkTemp: {
|
linkTemp: {
|
||||||
name: '', url: ''
|
name: '', url: ''
|
||||||
@@ -376,7 +376,7 @@ export default {
|
|||||||
},
|
},
|
||||||
resetRules: {
|
resetRules: {
|
||||||
type: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
type: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||||
password: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
resetOptions: [
|
resetOptions: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
labels: '',
|
labels: '',
|
||||||
basic_auth: {
|
basic_auth: {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
pin: ''
|
||||||
},
|
},
|
||||||
bearer_token: ''
|
bearer_token: ''
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user