NEZ-1052 feat: user 编辑页面 增加 language 属性
This commit is contained in:
@@ -315,7 +315,7 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.el-table__fixed-body-wrapper {
|
||||
top: 42px !important;
|
||||
top: 41px !important;
|
||||
}
|
||||
.el-table__body-wrapper, .el-table__fixed-body-wrapper {
|
||||
box-shadow: 1px 0 $--right-box-border-color;
|
||||
|
||||
@@ -52,6 +52,21 @@
|
||||
<el-form-item :label="$t('config.user.mobile')" prop="mobile">
|
||||
<el-input id="account-input-mobile" v-model="editUser.mobile" maxlength="64" show-word-limit placeholder="" size="small" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<!--language-->
|
||||
<el-form-item :label="$t('config.user.language')" prop="lang">
|
||||
<el-select id="account-input-language"
|
||||
class="right-box__select"
|
||||
v-model="editUser.lang"
|
||||
clearable
|
||||
collapse-tags
|
||||
placeholder=""
|
||||
popper-class="right-box-select-top right-public-box-dropdown-top prevent-clickoutside"
|
||||
size="small">
|
||||
<template v-for="item in languageList">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--roles-->
|
||||
<el-form-item :label="$t('config.user.roles')" prop="roleIds">
|
||||
<el-select id="account-input-roleIds"
|
||||
@@ -171,6 +186,10 @@ export default {
|
||||
{ value: 0, label: this.$t('config.user.disable') },
|
||||
{ value: 1, label: this.$t('config.user.enableMfa') },
|
||||
{ value: 2, label: this.$t('config.user.forceEnable') }
|
||||
],
|
||||
languageList: [
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'cn', label: '简体中文' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -144,6 +144,11 @@ export default {
|
||||
prop: 'source',
|
||||
show: true,
|
||||
width: 150
|
||||
}, {
|
||||
label: this.$t('config.user.language'),
|
||||
prop: 'lang',
|
||||
show: true,
|
||||
width: 150
|
||||
}, {
|
||||
label: this.$t('config.user.enable'),
|
||||
prop: 'status',
|
||||
|
||||
@@ -159,21 +159,23 @@ export default {
|
||||
label: this.$t('profile.role'),
|
||||
prop: '',
|
||||
icon: 'nz-icon nz-icon-role profile-role'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
id: 2,
|
||||
label: this.$t('profile.email'),
|
||||
prop: '',
|
||||
icon: 'nz-icon nz-icon-email profile-email'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
id: 3,
|
||||
label: this.$t('profile.mobile'),
|
||||
prop: '',
|
||||
icon: 'nz-icon nz-icon-mobile profile-mobile'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
id: 4,
|
||||
label: this.$t('config.user.language'),
|
||||
prop: '',
|
||||
icon: 'nz-icon nz-icon-language-change'
|
||||
}, {
|
||||
id: 5,
|
||||
label: this.$t('profile.source'),
|
||||
prop: '',
|
||||
icon: 'nz-icon nz-icon-laiyuan profile-laiyuan'
|
||||
@@ -210,7 +212,12 @@ export default {
|
||||
this.tableProfile[0].prop = this.userList.roles[0].i18n
|
||||
this.tableProfile[1].prop = this.userList.email
|
||||
this.tableProfile[2].prop = this.userList.mobile
|
||||
this.tableProfile[3].prop = this.userList.source
|
||||
if (this.userList.lang == 'cn') {
|
||||
this.tableProfile[3].prop = '简体中文'
|
||||
} else {
|
||||
this.tableProfile[3].prop = 'English'
|
||||
}
|
||||
this.tableProfile[4].prop = this.userList.source
|
||||
const name = this.userList.name.substr(0, 1)
|
||||
this.profileName = name
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ export default {
|
||||
receiver: [],
|
||||
roleIds: '',
|
||||
roles: [],
|
||||
lang: '',
|
||||
notifications: [],
|
||||
mfaLevel: 0
|
||||
mfaLevel: 0,
|
||||
lang: 'English'
|
||||
},
|
||||
tableId: 'userTable',
|
||||
searchMsg: { // 给搜索框子组件传递的信息
|
||||
|
||||
Reference in New Issue
Block a user