弹出层国际化调整

This commit is contained in:
joylink_cuiweidong 2019-09-16 11:17:42 +08:00
parent 711f3195e3
commit 87637e89ae
4 changed files with 67 additions and 87 deletions

View File

@ -175,40 +175,30 @@ export default {
confirm: 'Confirm',
close: 'Close',
// 工号
// 用户名
// 密码
// 确认密码
// 确定
// 取 消
// 请输入工号
// 请输入用户名
// 请输入密码
// 请再次输入密码
// 增加用户
// 二次输入密码不一致
jobNumber: 'JobNumber:',
userName: 'User Name:',
password: 'Password:',
confirmPassword: 'Confirm Password:',
inputJobNumber: 'Please enter job number',
inputUserName: 'Please enter user name',
inputPassword: 'Please enter password',
inputPasswordAgain: 'Please enter password again',
addUser: 'Add User',
passwordInconsistent: 'Inconsistent input password',
determine: 'Determine',
determine: 'Confirm',
cancel: 'Cancel',
deleteUser: 'Delete User',
selectTips: 'The selected username or job number is empty.'
selectTips: 'The selected username or job number is empty.',
// 工号
// 用户名
// 原始密码
// 密码
// 确认密码
// 确定
// 取 消
// 请输入工号
// 请输入用户名
// 请输入原始密码
// 请输入新密码
// 请再次输入新密码
// 用户编辑页面
// 原始密码错误
// 二次输入的密码错误
// 老密码和新密相同
originalPassword: 'Original Password:',
inputOriginal: 'Please enter original password',
inputNewPassword: 'Please enter new password',
inputNewAgain: 'Please enter new password again',
userEditPage: 'User Edit Page',
originalPasswordError: 'Original password error',
passwordError: 'Second entered password error',
passwordSame: 'Old password is the same as new password'
},
platform: 'Platform',
arrivalTime: 'Arrival time',

View File

@ -172,40 +172,30 @@ export default {
confirm: '确认',
close: '关闭',
// 工号
// 用户名
// 密码
// 确认密码
// 确定
// 取 消
// 请输入工号
// 请输入用户名
// 请输入密码
// 请再次输入密码
// 增加用户
// 二次输入密码不一致
jobNumber: '工号:',
userName: '用户名:',
password: '密码:',
confirmPassword: '确认密码:',
inputJobNumber: '请输入工号',
inputUserName: '请输入用户名',
inputPassword: '请输入密码',
inputPasswordAgain: '请再次输入密码',
addUser: '增加用户',
passwordInconsistent: '二次输入密码不一致',
determine: '确定',
cancel: '取 消',
deleteUser: '删除用户',
selectTips: '选择的用户名或工号为空'
selectTips: '选择的用户名或工号为空',
// 工号
// 用户名
// 原始密码
// 密码
// 确认密码
// 确定
// 取 消
// 请输入工号
// 请输入用户名
// 请输入原始密码
// 请输入新密码
// 请再次输入新密码
// 用户编辑页面
// 原始密码错误
// 二次输入的密码错误
// 老密码和新密相同
originalPassword: '原始密码:',
inputOriginal: '请输入原始密码',
inputNewPassword: '请输入新密码',
inputNewAgain: '请再次输入新密码',
userEditPage: '用户编辑页面',
originalPasswordError: '原始密码错误',
passwordError: '二次输入的密码错误',
passwordSame: '老密码和新密相同'
},
platform: '站台',
arrivalTime: '到点',

View File

@ -3,16 +3,16 @@
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber"></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</el-form-item>
@ -20,10 +20,10 @@
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.determine')}}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.cancel')}}</el-button>
</el-col>
</el-row>
</el-dialog>
@ -52,16 +52,16 @@
},
rules: {
jobNumber: [
{ required: true, message: '请输入工号', trigger: 'blur' }
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'change' }
{ required: true, message: this.$t('menu.menuChildDialog.inputPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入密码', trigger: 'change' }
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
],
},
}
@ -80,7 +80,7 @@
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '增加用户'
return this.$t('menu.menuChildDialog.addUser')
}
},
mounted() {
@ -126,7 +126,7 @@
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox('二次输入密码不一致');
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
})

View File

@ -3,19 +3,19 @@
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" disabled></el-input>
</el-form-item>
<el-form-item label="原始密码:" prop="oldPassword">
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</el-form-item>
@ -23,10 +23,10 @@
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.determine')}}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.cancel')}}</el-button>
</el-col>
</el-row>
</el-dialog>
@ -57,19 +57,19 @@
},
rules: {
jobNumber: [
{ required: true, message: '请输入工号', trigger: 'blur' }
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
oldPassword: [
{ required: true, message: '请输入原始密码', trigger: 'change' }
{ required: true, message: this.$t('menu.menuChildDialog.inputOriginal'), trigger: 'change' }
],
password: [
{ required: true, message: '请输入新密码', trigger: 'change' }
{ required: true, message: this.$t('menu.menuChildDialog.inputNewPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入新密码', trigger: 'change' }
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
],
},
}
@ -88,7 +88,7 @@
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '用户编辑页面'
return this.$t('menu.menuChildDialog.userEditPage')
}
},
mounted() {
@ -136,11 +136,11 @@
this.loading = false;
if (valid)
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox('原始密码错误');
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
this.$messageBox('二次输入的密码错误');
this.$messageBox(this.$t('menu.menuChildDialog.passwordError'));
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox('老密码和新密相同');
this.$messageBox(this.$t('menu.menuChildDialog.passwordSame'));
} else {
this.doClose();
this.$emit('operateUser', this.model);