This commit is contained in:
shiziyuan9527 2020-05-26 16:35:33 +08:00
parent b61dbfe107
commit c8be28e2aa
6 changed files with 25 additions and 14 deletions

View File

@ -27,11 +27,11 @@
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
@close="handleClose">
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
<el-autocomplete
class="input-with-autocomplete"
v-model="form.memberSign"
placeholder="请输入用户 ID , 或者用户邮箱"
:placeholder="$t('member.input_id_or_email')"
:trigger-on-focus="false"
:fetch-suggestions="querySearch"
size="small"
@ -50,7 +50,7 @@
<el-option
v-for="item in form.roles"
:key="item.id"
:label="item.name"
:label="$t('role.' + item.id)"
:value="item.id">
</el-option>
</el-select>
@ -228,7 +228,7 @@
let email = this.form.memberSign;
let member = this.userList.find(user => user.id === email || user.email === email);
if (!member) {
this.$warning("未找到该用户信息请输入正确ID 或者 邮箱!");
this.$warning(this.$t('member.no_such_user'));
return false;
} else {
userId = member.id;
@ -283,4 +283,8 @@
width: 100%;
}
.select-width {
width: 100%;
}
</style>

View File

@ -75,11 +75,11 @@
@close="closeFunc">
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
size="small">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
<el-autocomplete
class="input-with-autocomplete"
v-model="memberForm.memberSign"
placeholder="请输入用户 ID , 或者用户邮箱"
:placeholder="$t('member.input_id_or_email')"
:trigger-on-focus="false"
:fetch-suggestions="querySearch"
size="small"
@ -99,7 +99,7 @@
<el-option
v-for="item in memberForm.roles"
:key="item.id"
:label="item.name"
:label="$t('role.' + item.id)"
:value="item.id">
</el-option>
</el-select>
@ -325,7 +325,7 @@
let email = this.memberForm.memberSign;
let member = this.userList.find(user => user.id === email || user.email === email);
if (!member) {
this.$warning("未找到该用户信息请输入正确ID 或者 邮箱!");
this.$warning(this.$t('member.no_such_user'));
return false;
} else {
userId = member.id;

View File

@ -28,11 +28,11 @@
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
@close="handleClose">
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: '请先选择正确的信息', trigger: 'change'}">
<el-form-item :label="$t('commons.member')" prop="memberSign" :rules="{required: true, message: $t('member.input_id_or_email'), trigger: 'change'}">
<el-autocomplete
class="input-with-autocomplete"
v-model="form.memberSign"
placeholder="请输入用户 ID , 或者用户邮箱"
:placeholder="$t('member.input_id_or_email')"
:trigger-on-focus="false"
:fetch-suggestions="querySearch"
size="small"
@ -51,7 +51,7 @@
<el-option
v-for="item in form.roles"
:key="item.id"
:label="item.name"
:label="$t('role.' + item.id)"
:value="item.id">
</el-option>
</el-select>
@ -239,7 +239,7 @@
let email = this.form.memberSign;
let member = this.userList.find(user => user.id === email || user.email === email);
if (!member) {
this.$warning("未找到该用户信息请输入正确ID 或者 邮箱!");
this.$warning(this.$t('member.no_such_user'));
return false;
} else {
userId = member.id;

View File

@ -146,7 +146,9 @@ export default {
'password_format_is_incorrect': 'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)',
'old_password': 'Old Password',
'new_password': 'New Password',
'remove_member': 'Are you sure you want to remove this member'
'remove_member': 'Are you sure you want to remove this member',
'input_id_or_email': 'Please enter user ID, or user Email',
'no_such_user': 'Without this user information, please enter the correct user ID or user Email!',
},
user: {
'create': 'Create',

View File

@ -144,7 +144,9 @@ export default {
'password_format_is_incorrect': '密码格式不正确(至少8-16个字符至少1个大写字母1个小写字母和1个数字)',
'old_password': '旧密码',
'new_password': '新密码',
'remove_member': '确定要移除该成员吗'
'remove_member': '确定要移除该成员吗',
'input_id_or_email': '请输入用户 ID, 或者 用户邮箱',
'no_such_user': '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!',
},
user: {
'create': '创建用户',

View File

@ -134,6 +134,9 @@ export default {
'password_format_is_incorrect': '密碼格式不正確(至少8-16個字符,至少1個大寫字母,1個小寫字母和1個數字)',
'old_password': '舊密碼',
'new_password': '新密碼',
'remove_member': '確定要移除該成員嗎',
'input_id_or_email': '請輸入用戶 ID, 或者 用戶郵箱',
'no_such_user': '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
},
user: {
'create': '創建用戶',