diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 6a6bb27..c216a47 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -418,7 +418,6 @@ export default { // }); const translatedData = this.translateMenuLabels(response.data); // this.menuOptions = response.data - // this.menuOptions = listMenu this.menuOptions = translatedData }) }, diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index fafbb9e..7cb1f61 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -19,29 +19,29 @@ - - + + - - + + - - + + - - + + - {{ $t('systemManagement_RoleManagement.btnSearch') }} + {{ $t('systemManagement_UserManagement.btnSearch') }} - {{ $t('systemManagement_RoleManagement.btnReset') }} + {{ $t('systemManagement_UserManagement.btnReset') }} @@ -51,23 +51,23 @@ - {{ $t('systemManagement_RoleManagement.btnAdd') }} + {{ $t('systemManagement_UserManagement.btnAdd') }} - {{ $t('systemManagement_RoleManagement.btnEdit') }} + {{ $t('systemManagement_UserManagement.btnEdit') }} - {{ $t('systemManagement_RoleManagement.btnDelete') }} + {{ $t('systemManagement_UserManagement.btnDelete') }} - {{ $t('systemManagement_RoleManagement.btnImport') }} + {{ $t('systemManagement_UserManagement.btnImport') }} - {{ $t('systemManagement_RoleManagement.btnExport') }} + {{ $t('systemManagement_UserManagement.btnExport') }} @@ -75,42 +75,42 @@ - + - + - + - + - + - + - + - + @@ -129,57 +129,57 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + {{ dict.label }} @@ -189,16 +189,16 @@ - - + + - - + + @@ -207,17 +207,17 @@ - - + + @@ -226,23 +226,23 @@ -
{{ $t('systemManagement_RoleManagement.textDragOrClick1') }}{{ $t('systemManagement_RoleManagement.textDragOrClick2') }}
+
{{ $t('systemManagement_UserManagement.textDragOrClick1') }}{{ $t('systemManagement_UserManagement.textDragOrClick2') }}
- {{ $t('systemManagement_RoleManagement.textUpdateExistingData') }} + {{ $t('systemManagement_UserManagement.textUpdateExistingData') }}
- {{ $t('systemManagement_RoleManagement.textUploadTip') }} + {{ $t('systemManagement_UserManagement.textUploadTip') }} - {{ $t('systemManagement_RoleManagement.textDownloadTemplate') }} + {{ $t('systemManagement_UserManagement.textDownloadTemplate') }}
@@ -327,45 +327,45 @@ export default { // 列信息 columns: [ // 用户编号 - { key: 0, label: this.$t('systemManagement_RoleManagement.userId'), visible: true }, + { key: 0, label: this.$t('systemManagement_UserManagement.userId'), visible: true }, // 用户名称 - { key: 1, label: this.$t('systemManagement_RoleManagement.userName'), visible: true }, + { key: 1, label: this.$t('systemManagement_UserManagement.userName'), visible: true }, // 用户昵称 - { key: 2, label: this.$t('systemManagement_RoleManagement.nickName'), visible: true }, + { key: 2, label: this.$t('systemManagement_UserManagement.nickName'), visible: true }, // 部门 - { key: 3, label: this.$t('systemManagement_RoleManagement.deptName'), visible: true }, + { key: 3, label: this.$t('systemManagement_UserManagement.deptName'), visible: true }, // 手机号码 - { key: 4, label: this.$t('systemManagement_RoleManagement.phoneNumber'), visible: true }, + { key: 4, label: this.$t('systemManagement_UserManagement.phoneNumber'), visible: true }, // 状态 - { key: 5, label: this.$t('systemManagement_RoleManagement.status'), visible: true }, + { key: 5, label: this.$t('systemManagement_UserManagement.status'), visible: true }, // 创建时间 - { key: 6, label: this.$t('systemManagement_RoleManagement.createTime'), visible: true } + { key: 6, label: this.$t('systemManagement_UserManagement.createTime'), visible: true } ], // 表单校验 rules: { userName: [ // 校验:用户名称不能为空 - { required: true, message: this.$t('systemManagement_RoleManagement.checkUserNameIsNull'), trigger: "blur" }, + { required: true, message: this.$t('systemManagement_UserManagement.checkUserNameIsNull'), trigger: "blur" }, // 校验:用户名称长度 - { min: 2, max: 20, message: this.$t('systemManagement_RoleManagement.checkUserNameLength'), trigger: 'blur' } + { min: 2, max: 20, message: this.$t('systemManagement_UserManagement.checkUserNameLength'), trigger: 'blur' } ], nickName: [ // 校验:用户昵称不能为空 - { required: true, message: this.$t('systemManagement_RoleManagement.checkNickNameIsNull'), trigger: "blur" } + { required: true, message: this.$t('systemManagement_UserManagement.checkNickNameIsNull'), trigger: "blur" } ], password: [ // 校验:用户密码不能为空 - { required: true, message: this.$t('systemManagement_RoleManagement.checkPasswordIsNull'), trigger: "blur" }, + { required: true, message: this.$t('systemManagement_UserManagement.checkPasswordIsNull'), trigger: "blur" }, // 校验:用户密码长度 - { min: 5, max: 20, message: this.$t('systemManagement_RoleManagement.checkPasswordLength'), trigger: 'blur' }, + { min: 5, max: 20, message: this.$t('systemManagement_UserManagement.checkPasswordLength'), trigger: 'blur' }, // 校验:用户密码不能包含非法字符 - { pattern: /^[^<>"'|\\]+$/, message: this.$t('systemManagement_RoleManagement.checkPasswordCharacter'), trigger: "blur" } + { pattern: /^[^<>"'|\\]+$/, message: this.$t('systemManagement_UserManagement.checkPasswordCharacter'), trigger: "blur" } ], email: [ // 校验:邮箱格式 { type: "email", - message: this.$t('systemManagement_RoleManagement.checkEmailFormat'), + message: this.$t('systemManagement_UserManagement.checkEmailFormat'), trigger: ["blur", "change"] } ], @@ -373,7 +373,7 @@ export default { // 校验:手机号码格式 { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, - message: this.$t('systemManagement_RoleManagement.checkPhoneNumberFormat'), + message: this.$t('systemManagement_UserManagement.checkPhoneNumberFormat'), trigger: "blur" } ] @@ -436,13 +436,13 @@ export default { // 用户状态修改 handleStatusChange(row) { // 文本:启用/停用 - let text = row.status === "0" ? this.$t('systemManagement_RoleManagement.textEnable') : this.$t('systemManagement_RoleManagement.textDisable') + let text = row.status === "0" ? this.$t('systemManagement_UserManagement.textEnable') : this.$t('systemManagement_UserManagement.textDisable') // 文本:确认要启用/停用用户吗? - this.$modal.confirm(this.$t('systemManagement_RoleManagement.textUserConfirm1') + text + '""' + row.userName + this.$t('systemManagement_RoleManagement.textUserConfirm2')).then(function() { + this.$modal.confirm(this.$t('systemManagement_UserManagement.textUserConfirm1') + text + '""' + row.userName + this.$t('systemManagement_UserManagement.textUserConfirm2')).then(function() { return changeUserStatus(row.userId, row.status) }).then(() => { // 文本:【启用/停用】成功 - this.$modal.msgSuccess(text + this.$t('systemManagement_RoleManagement.textSuccess')) + this.$modal.msgSuccess(text + this.$t('systemManagement_UserManagement.textSuccess')) }).catch(function() { row.status = row.status === "0" ? "1" : "0" }) @@ -510,7 +510,7 @@ export default { this.roleOptions = response.roles this.open = true //文本提示:新增成功 - this.title = this.$t('systemManagement_RoleManagement.addUserItem') + this.title = this.$t('systemManagement_UserManagement.addUserItem') this.form.password = this.initPassword }) }, @@ -526,32 +526,32 @@ export default { this.$set(this.form, "roleIds", response.roleIds) this.open = true // 文本提示:编辑成功 - this.title = this.$t('systemManagement_RoleManagement.editUserItem') + this.title = this.$t('systemManagement_UserManagement.editUserItem') this.form.password = "" }) }, /** 重置密码按钮操作 */ handleResetPwd(row) { // 文本提示:请输入【用户名称】的新密码 提示 - this.$prompt(this.$t('systemManagement_RoleManagement.textInputPassword1') + row.userName + this.$t('systemManagement_RoleManagement.textInputPassword2'), this.$t('systemManagement_RoleManagement.textTips'), { + this.$prompt(this.$t('systemManagement_UserManagement.textInputPassword1') + row.userName + this.$t('systemManagement_UserManagement.textInputPassword2'), this.$t('systemManagement_UserManagement.textTips'), { // 文本:确定 - confirmButtonText: this.$t('systemManagement_RoleManagement.textConfirm'), + confirmButtonText: this.$t('systemManagement_UserManagement.textConfirm'), // 文本:取消 - cancelButtonText: this.$t('systemManagement_RoleManagement.textCancel'), + cancelButtonText: this.$t('systemManagement_UserManagement.textCancel'), closeOnClickModal: false, inputPattern: /^.{5,20}$/, // 文本:用户密码长度必须介于 5 和 20 之间 - inputErrorMessage: this.$t('systemManagement_RoleManagement.checkPasswordLength'), + inputErrorMessage: this.$t('systemManagement_UserManagement.checkPasswordLength'), inputValidator: (value) => { if (/<|>|"|'|\||\\/.test(value)) { // 文本:不能包含非法字符:< > " ' \\\ | - return this.$t('systemManagement_RoleManagement.checkPasswordCharacter') + return this.$t('systemManagement_UserManagement.checkPasswordCharacter') } }, }).then(({ value }) => { resetUserPwd(row.userId, value).then(response => { // 文本提示:修改成功,新密码是: - this.$modal.msgSuccess(this.$t('systemManagement_RoleManagement.textResetPassword') + value) + this.$modal.msgSuccess(this.$t('systemManagement_UserManagement.textResetPassword') + value) }) }).catch(() => {}) }, @@ -567,14 +567,14 @@ export default { if (this.form.userId != undefined) { updateUser(this.form).then(response => { // 文本提示:修改成功 - this.$modal.msgSuccess(this.$t('systemManagement_RoleManagement.editSuccessInfo')) + this.$modal.msgSuccess(this.$t('systemManagement_UserManagement.editSuccessInfo')) this.open = false this.getList() }) } else { addUser(this.form).then(response => { // 文本提示:新增成功 - this.$modal.msgSuccess(this.$t('systemManagement_RoleManagement.addSuccessInfo')) + this.$modal.msgSuccess(this.$t('systemManagement_UserManagement.addSuccessInfo')) this.open = false this.getList() }) @@ -586,12 +586,12 @@ export default { handleDelete(row) { const userIds = row.userId || this.ids // 文本提示:是否删除用户编号为" + userIds + "的数据项? - this.$modal.confirm(this.$t('systemManagement_RoleManagement.textDeleteConfirm1') + userIds + this.$t('systemManagement_RoleManagement.textDeleteConfirm2')).then(function() { + this.$modal.confirm(this.$t('systemManagement_UserManagement.textDeleteConfirm1') + userIds + this.$t('systemManagement_UserManagement.textDeleteConfirm2')).then(function() { return delUser(userIds) }).then(() => { this.getList() // 文本提示:删除成功 - this.$modal.msgSuccess(this.$t('systemManagement_RoleManagement.deleteSuccessInfo')) + this.$modal.msgSuccess(this.$t('systemManagement_UserManagement.deleteSuccessInfo')) }).catch(() => {}) }, /** 导出按钮操作 */ @@ -603,7 +603,7 @@ export default { /** 导入按钮操作 */ handleImport() { // 标题:用户导入 - this.upload.title = this.$t('systemManagement_RoleManagement.textImportTitle') + this.upload.title = this.$t('systemManagement_UserManagement.textImportTitle') this.upload.open = true }, /** 下载模板操作 */ @@ -621,7 +621,7 @@ export default { this.upload.isUploading = false this.$refs.upload.clearFiles() // 文本:导入结果 - this.$alert("
" + response.msg + "
", this.$t('systemManagement_RoleManagement.textImportResult'), { dangerouslyUseHTMLString: true }) + this.$alert("
" + response.msg + "
", this.$t('systemManagement_UserManagement.textImportResult'), { dangerouslyUseHTMLString: true }) this.getList() }, // 提交上传文件