From defe66a1525b6047f43715919ebe41f47cc3dd2b Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Wed, 29 Apr 2026 08:44:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cclqms-vue/src/i18n/locales/cn.js | 93 ++++++ cclqms-vue/src/i18n/locales/en.js | 93 ++++++ .../views/modules/sys/role-add-or-update.vue | 36 +-- cclqms-vue/src/views/modules/sys/role.vue | 70 ++--- .../views/modules/sys/user-add-or-update.vue | 88 +++--- cclqms-vue/src/views/modules/sys/user.vue | 294 +++++++++--------- 6 files changed, 430 insertions(+), 244 deletions(-) diff --git a/cclqms-vue/src/i18n/locales/cn.js b/cclqms-vue/src/i18n/locales/cn.js index 52abdeb..d79d7a1 100644 --- a/cclqms-vue/src/i18n/locales/cn.js +++ b/cclqms-vue/src/i18n/locales/cn.js @@ -86,6 +86,99 @@ module.exports = { goHome: '进入首页' } }, + sys: { + common: { + search: '查询', + add: '新增', + edit: '修改', + delete: '删除', + operation: '操作', + createTime: '创建时间', + tip: '提示', + confirm: '确定', + cancel: '取消', + close: '关闭', + operationSuccess: '操作成功' + }, + role: { + roleName: '角色名称', + remark: '备注', + authorize: '权限授权', + viewUsers: '查看用户', + userList: '用户列表', + userAccount: '用户账号', + userName: '用户名', + filterPlaceholder: '输入菜单或按钮名称进行过滤', + roleNameRequired: '角色名称不能为空', + confirmDeleteRecord: '确定删除当前记录?' + }, + user: { + userAccount: '用户账号', + userNo: '人员编码', + userName: '用户名', + email: '邮箱', + mobile: '手机号', + status: '状态', + disabled: '禁用', + normal: '正常', + password: '密码', + confirmPassword: '确认密码', + factoryAuthorization: '工厂授权', + buAuthorization: 'BU授权', + deptAuthorization: '部门授权', + businessRoleAuthorization: '岗位角色', + machineResourceAuthorization: '机台授权', + basicInfo: '基本信息', + contactInfo: '联系方式', + roleConfig: '角色配置', + statusConfig: '状态设置', + role: '角色', + factory: '工厂', + inputLoginAccount: '请输入登录账号', + inputUserNo: '请输入人员编码', + inputUserName: '请输入用户名', + chooseFactory: '请选择工厂', + inputPassword: '请输入密码', + confirmInputPassword: '请确认密码', + inputEmail: '请输入邮箱', + inputMobile: '请输入手机号', + confirmDelete: '确定对[id={ids}]进行[{action}]操作?', + batchDelete: '批量删除', + availableFactory: '可选工厂', + existingFactory: '已有工厂', + factoryCode: '工厂编码', + factoryName: '工厂名称', + buCode: 'BU编码', + buName: 'BU名称', + availableBu: '可选BU', + existingBu: '已有BU', + dept: '部门', + deptCode: '部门编码', + deptName: '部门名称', + availableDept: '可选部门', + existingDept: '已有部门', + roleCode: '角色编码', + availableRole: '可选角色', + existingRole: '已有角色', + machineCode: '机台编码', + machineDesc: '机台描述', + availableMachine: '可选机台', + existingMachine: '已有机台', + addToRight: '添加>>', + removeToLeft: '删除<<', + selectAvailableFactory: '请选择可选工厂!', + selectExistingFactory: '请选择已有工厂!', + selectAvailableBu: '请选择可选BU!', + selectExistingBu: '请选择已有BU!', + selectAvailableDept: '请选择可选部门!', + selectExistingDept: '请选择已有部门!', + selectAvailableRole: '请选择可选角色!', + selectExistingRole: '请选择已有角色!', + selectAvailableMachine: '请选择可选机台!', + selectExistingMachine: '请选择已有机台!', + error: '错误' + } + }, // // 公用属性 // common: { diff --git a/cclqms-vue/src/i18n/locales/en.js b/cclqms-vue/src/i18n/locales/en.js index d689679..f079af3 100644 --- a/cclqms-vue/src/i18n/locales/en.js +++ b/cclqms-vue/src/i18n/locales/en.js @@ -88,6 +88,99 @@ module.exports = { goHome: 'Go Home' } }, + sys: { + common: { + search: 'Search', + add: 'Add', + edit: 'Edit', + delete: 'Delete', + operation: 'Operation', + createTime: 'Created Time', + tip: 'Tip', + confirm: 'Confirm', + cancel: 'Cancel', + close: 'Close', + operationSuccess: 'Operation successful' + }, + role: { + roleName: 'Role Name', + remark: 'Remark', + authorize: 'Authorization', + viewUsers: 'View Users', + userList: 'User List', + userAccount: 'User Account', + userName: 'User Name', + filterPlaceholder: 'Enter menu or button name to filter', + roleNameRequired: 'Role name is required', + confirmDeleteRecord: 'Confirm deleting current record?' + }, + user: { + userAccount: 'User Account', + userNo: 'Personnel Code', + userName: 'User Name', + email: 'Email', + mobile: 'Mobile', + status: 'Status', + disabled: 'Disabled', + normal: 'Normal', + password: 'Password', + confirmPassword: 'Confirm Password', + factoryAuthorization: 'Factory Authorization', + buAuthorization: 'BU Authorization', + deptAuthorization: 'Department Authorization', + businessRoleAuthorization: 'Position Role', + machineResourceAuthorization: 'Machine Authorization', + basicInfo: 'Basic Information', + contactInfo: 'Contact Information', + roleConfig: 'Role Configuration', + statusConfig: 'Status Configuration', + role: 'Role', + factory: 'Factory', + inputLoginAccount: 'Please enter login account', + inputUserNo: 'Please enter personnel code', + inputUserName: 'Please enter user name', + chooseFactory: 'Please select factory', + inputPassword: 'Please enter password', + confirmInputPassword: 'Please confirm password', + inputEmail: 'Please enter email', + inputMobile: 'Please enter mobile', + confirmDelete: 'Confirm [{action}] for [id={ids}]?', + batchDelete: 'Batch Delete', + availableFactory: 'Available Factories', + existingFactory: 'Assigned Factories', + factoryCode: 'Factory Code', + factoryName: 'Factory Name', + buCode: 'BU Code', + buName: 'BU Name', + availableBu: 'Available BUs', + existingBu: 'Assigned BUs', + dept: 'Department', + deptCode: 'Department Code', + deptName: 'Department Name', + availableDept: 'Available Departments', + existingDept: 'Assigned Departments', + roleCode: 'Role Code', + availableRole: 'Available Roles', + existingRole: 'Assigned Roles', + machineCode: 'Machine Code', + machineDesc: 'Machine Description', + availableMachine: 'Available Machines', + existingMachine: 'Assigned Machines', + addToRight: 'Add >>', + removeToLeft: 'Remove <<', + selectAvailableFactory: 'Please select available factory!', + selectExistingFactory: 'Please select assigned factory!', + selectAvailableBu: 'Please select available BU!', + selectExistingBu: 'Please select assigned BU!', + selectAvailableDept: 'Please select available department!', + selectExistingDept: 'Please select assigned department!', + selectAvailableRole: 'Please select available role!', + selectExistingRole: 'Please select assigned role!', + selectAvailableMachine: 'Please select available machine!', + selectExistingMachine: 'Please select assigned machine!', + error: 'Error' + } + }, // common: { // search: "search", // add: "add", diff --git a/cclqms-vue/src/views/modules/sys/role-add-or-update.vue b/cclqms-vue/src/views/modules/sys/role-add-or-update.vue index 28debad..80e3573 100644 --- a/cclqms-vue/src/views/modules/sys/role-add-or-update.vue +++ b/cclqms-vue/src/views/modules/sys/role-add-or-update.vue @@ -1,27 +1,27 @@ @@ -86,13 +86,13 @@ export default { fullControl: 'N' }, buttons: { - close: '关闭', - submit: '确定', - add: '添加', - edit: '编辑', - authorize: '授权', - roleName: '角色名称', - remark: '备注', + close: this.$t('sys.common.close'), + submit: this.$t('sys.common.confirm'), + add: this.$t('sys.common.add'), + edit: this.$t('sys.common.edit'), + authorize: this.$t('sys.role.authorize'), + roleName: this.$t('sys.role.roleName'), + remark: this.$t('sys.role.remark'), }, dataForm: { id: 0, @@ -101,7 +101,7 @@ export default { }, dataRule: { roleName: [ - {required: true, message: '角色名称不能为空', trigger: 'blur'} + {required: true, message: this.$t('sys.role.roleNameRequired'), trigger: 'blur'} ] }, tempKey: -666666 // 临时key, 用于解决tree半选中状态项不能传给后台接口问题. # 待优化 @@ -249,7 +249,7 @@ export default { }) }).then(({data}) => { if (data && data.code === 0) { - this.$message.success('操作成功') + this.$message.success(this.$t('sys.common.operationSuccess')) this.visible = false this.$emit('refreshDataList') } else { diff --git a/cclqms-vue/src/views/modules/sys/role.vue b/cclqms-vue/src/views/modules/sys/role.vue index b281941..b9ad506 100644 --- a/cclqms-vue/src/views/modules/sys/role.vue +++ b/cclqms-vue/src/views/modules/sys/role.vue @@ -2,11 +2,11 @@
- + - {{buttons.search ||'查询' }} - {{buttons.add|| '新增'}} + {{buttons.search || $t('sys.common.search') }} + {{buttons.add|| $t('sys.common.add')}} + :label="buttons.roleName||$t('sys.role.roleName')"> + :label="buttons.remark||$t('sys.role.remark')"> + :label="buttons.createTime||$t('sys.common.createTime')"> + :label="buttons.cz||$t('sys.common.operation')"> @@ -78,19 +78,19 @@ - + - + - + - + - {{'查询' }} + {{ $t('sys.common.search') }} + :label="$t('sys.role.userAccount')"> + :label="$t('sys.role.userName')"> - 关闭 + {{ $t('sys.common.close') }} @@ -142,15 +142,15 @@ import { dataListSelections: [], addOrUpdateVisible: false, buttons: { - cz: '操作', - search: '查询', - add: '添加', - edit: '权限授权', - delete: '删除', - reportRole:'报表赋权', - roleName: '角色名称', - remark: '备注', - createTime: '创建时间', + cz: this.$t('sys.common.operation'), + search: this.$t('sys.common.search'), + add: this.$t('sys.common.add'), + edit: this.$t('sys.role.authorize'), + delete: this.$t('sys.common.delete'), + reportRole: this.$t('sys.role.authorize'), + roleName: this.$t('sys.role.roleName'), + remark: this.$t('sys.role.remark'), + createTime: this.$t('sys.common.createTime'), }, modalFlag: false, modalData: { @@ -253,9 +253,9 @@ import { let ids = id ? [id] : this.dataListSelections.map(item => { return item.roleId }) - this.$confirm(`确定删除当前记录?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('sys.role.confirmDeleteRecord'), this.$t('sys.common.tip'), { + confirmButtonText: this.$t('sys.common.confirm'), + cancelButtonText: this.$t('sys.common.cancel'), type: 'warning' }).then(() => { this.$http({ @@ -264,7 +264,7 @@ import { data: this.$http.adornData(ids, false) }).then(({data}) => { if (data && data.code === 0) { - this.$message.success('操作成功') + this.$message.success(this.$t('sys.common.operationSuccess')) this.getDataList() } else { this.$message.error(data.msg) diff --git a/cclqms-vue/src/views/modules/sys/user-add-or-update.vue b/cclqms-vue/src/views/modules/sys/user-add-or-update.vue index 44bc39c..411ccaa 100644 --- a/cclqms-vue/src/views/modules/sys/user-add-or-update.vue +++ b/cclqms-vue/src/views/modules/sys/user-add-or-update.vue @@ -3,48 +3,48 @@
-
基本信息
+
{{ $t('sys.user.basicInfo') }}
- - + + - - + + - - + + - 工厂 - + {{ $t('sys.user.factory') }} + - - + + - - + + @@ -52,16 +52,16 @@
-
联系方式
+
{{ $t('sys.user.contactInfo') }}
- - + + - - + + @@ -69,8 +69,8 @@
-
角色配置
- +
{{ $t('sys.user.roleConfig') }}
+
-
状态设置
- +
{{ $t('sys.user.statusConfig') }}
+ - 正常 - 禁用 + {{ $t('sys.user.normal') }} + {{ $t('sys.user.disabled') }}
- 取消 - 确定 + {{ $t('sys.common.cancel') }} + {{ $t('sys.common.confirm') }} @@ -140,22 +140,22 @@ export default { userDisplay: '' }, buttons: { - add: '添加', - edit: '编辑', - username: '用户账号', - userNo: '人员编码', - userDisplay: '用户名', - email: '邮箱', - mobile: '手机号', - status: '状态', - disable: '禁用', - normal: '正常', - password:'密码', - comfirmPassword:'确认密码', - submit: '确定', - close: '取消', - site: '工厂', - language: '语言', + add: this.$t('sys.common.add'), + edit: this.$t('sys.common.edit'), + username: this.$t('sys.user.userAccount'), + userNo: this.$t('sys.user.userNo'), + userDisplay: this.$t('sys.user.userName'), + email: this.$t('sys.user.email'), + mobile: this.$t('sys.user.mobile'), + status: this.$t('sys.user.status'), + disable: this.$t('sys.user.disabled'), + normal: this.$t('sys.user.normal'), + password: this.$t('sys.user.password'), + comfirmPassword: this.$t('sys.user.confirmPassword'), + submit: this.$t('sys.common.confirm'), + close: this.$t('sys.common.cancel'), + site: this.$t('sys.user.factory'), + language: this.$t('main.languageSetting'), }, } }, @@ -262,7 +262,7 @@ export default { }) }).then(({data}) => { if (data && data.code === 0) { - this.$message.success( '操作成功') + this.$message.success(this.$t('sys.common.operationSuccess')) this.visible = false this.$emit('refreshDataList') } else { diff --git a/cclqms-vue/src/views/modules/sys/user.vue b/cclqms-vue/src/views/modules/sys/user.vue index 64d043f..9100e20 100644 --- a/cclqms-vue/src/views/modules/sys/user.vue +++ b/cclqms-vue/src/views/modules/sys/user.vue @@ -2,22 +2,22 @@
- + - + - + - {{ buttons.search || '查询' }} - {{ buttons.add || '新增' }} - {{ buttons.factoryAuthorization || '工厂授权' }} - {{ buttons.buAuthorization || 'BU授权' }} - {{ buttons.deptAuthorization || '部门授权' }} - {{ buttons.businessRoleAuthorization || '岗位角色' }} - {{ buttons.machineResourceAuthorization || '机台授权' }} + {{ buttons.search || $t('sys.common.search') }} + {{ buttons.add || $t('sys.common.add') }} + {{ buttons.factoryAuthorization || $t('sys.user.factoryAuthorization') }} + {{ buttons.buAuthorization || $t('sys.user.buAuthorization') }} + {{ buttons.deptAuthorization || $t('sys.user.deptAuthorization') }} + {{ buttons.businessRoleAuthorization || $t('sys.user.businessRoleAuthorization') }} + {{ buttons.machineResourceAuthorization || $t('sys.user.machineResourceAuthorization') }} @@ -34,40 +34,40 @@ prop="username" header-align="center" align="center" - :label="buttons.username||'用户账号'"> + :label="buttons.username||$t('sys.user.userAccount')"> + :label="buttons.userNo||$t('sys.user.userNo')"> + :label="buttons.userDisplay||$t('sys.user.userName')"> + :label="buttons.email||$t('sys.user.email')"> + :label="buttons.mobile||$t('sys.user.mobile')"> + :label="buttons.status||$t('sys.user.status')"> + :label="buttons.createTime||$t('sys.common.createTime')"> + :label="buttons.cz||$t('sys.common.operation')"> @@ -105,23 +105,23 @@ - +
- + - + - 查询 + {{ $t('sys.common.search') }}
- 可选工厂 + {{ $t('sys.user.availableFactory') }} + :label="$t('sys.user.factoryCode')"> + :label="$t('sys.user.factoryName')">
- 添加>> + {{ $t('sys.user.addToRight') }}
- 删除<< + {{ $t('sys.user.removeToLeft') }}
- 已有工厂 + {{ $t('sys.user.existingFactory') }} + :label="$t('sys.user.factoryCode')"> + :label="$t('sys.user.factoryName')">
- 关闭 + {{ $t('sys.common.close') }}
@@ -204,23 +204,23 @@
- + - + - + - 查询 + {{ $t('sys.common.search') }}
- 可选BU + {{ $t('sys.user.availableBu') }} + :label="$t('sys.user.factoryCode')"> + :label="$t('sys.user.buCode')"> + :label="$t('sys.user.buName')">
- 添加>> + {{ $t('sys.user.addToRight') }}
- 删除<< + {{ $t('sys.user.removeToLeft') }}
- 已有BU + {{ $t('sys.user.existingBu') }} + :label="$t('sys.user.factoryCode')"> + :label="$t('sys.user.buCode')"> + :label="$t('sys.user.buName')">
- 关闭 + {{ $t('sys.common.close') }}
- +
- + - + - 查询 + {{ $t('sys.common.search') }}
- 可选部门 + {{ $t('sys.user.availableDept') }} + :label="$t('sys.user.deptCode')"> + :label="$t('sys.user.deptName')">
- 添加>> + {{ $t('sys.user.addToRight') }}
- 删除<< + {{ $t('sys.user.removeToLeft') }}
- 已有部门 + {{ $t('sys.user.existingDept') }} + :label="$t('sys.user.deptCode')"> + :label="$t('sys.user.deptName')">
- 关闭 + {{ $t('sys.common.close') }}
- +
- + - + - 查询 + {{ $t('sys.common.search') }}
- 可选角色 + {{ $t('sys.user.availableRole') }} + :label="$t('sys.user.roleCode')"> + :label="$t('sys.role.roleName')">
- 添加>> + {{ $t('sys.user.addToRight') }}
- 删除<< + {{ $t('sys.user.removeToLeft') }}
- 已有角色 + {{ $t('sys.user.existingRole') }} + :label="$t('sys.user.roleCode')"> + :label="$t('sys.role.roleName')">
- 关闭 + {{ $t('sys.common.close') }}
- +
- + - + - + - 查询 + {{ $t('sys.common.search') }}
- 可选机台 + {{ $t('sys.user.availableMachine') }} + :label="$t('sys.user.machineCode')"> + :label="$t('sys.user.machineDesc')">
- 添加>> + {{ $t('sys.user.addToRight') }}
- 删除<< + {{ $t('sys.user.removeToLeft') }}
- 已有机台 + {{ $t('sys.user.existingMachine') }} + :label="$t('sys.user.machineCode')"> + :label="$t('sys.user.machineDesc')">
- 关闭 + {{ $t('sys.common.close') }}
@@ -661,29 +661,29 @@ export default { userDisplay: '' }, buttons: { - cz: '操作', - search: '查询', - add: '添加', - edit: '编辑', - delete: '删除', - specialCompetencies: '特殊权限', - factoryAuthorization: '工厂授权', - buAuthorization: 'BU授权', - deptAuthorization: '部门授权', - businessRoleAuthorization: '岗位角色', - machineResourceAuthorization: '机台授权', - createTime: '创建时间', - username: '用户账号', - userNo: '人员编码', - userDisplay: '用户名', - email: '邮箱', - mobile: '手机号', - status: '状态', - disable: '禁用', - normal: '正常', - auth: '审核', - allAuth: '所有权限', - currentAuth: '当前权限' + cz: this.$t('sys.common.operation'), + search: this.$t('sys.common.search'), + add: this.$t('sys.common.add'), + edit: this.$t('sys.common.edit'), + delete: this.$t('sys.common.delete'), + specialCompetencies: this.$t('sys.role.authorize'), + factoryAuthorization: this.$t('sys.user.factoryAuthorization'), + buAuthorization: this.$t('sys.user.buAuthorization'), + deptAuthorization: this.$t('sys.user.deptAuthorization'), + businessRoleAuthorization: this.$t('sys.user.businessRoleAuthorization'), + machineResourceAuthorization: this.$t('sys.user.machineResourceAuthorization'), + createTime: this.$t('sys.common.createTime'), + username: this.$t('sys.user.userAccount'), + userNo: this.$t('sys.user.userNo'), + userDisplay: this.$t('sys.user.userName'), + email: this.$t('sys.user.email'), + mobile: this.$t('sys.user.mobile'), + status: this.$t('sys.user.status'), + disable: this.$t('sys.user.disabled'), + normal: this.$t('sys.user.normal'), + auth: this.$t('sys.role.authorize'), + allAuth: this.$t('sys.role.authorize'), + currentAuth: this.$t('sys.role.authorize') }, dataList: [], selectUser: {}, @@ -846,9 +846,9 @@ export default { let userIds = id ? [id] : this.dataListSelections.map(item => { return item.userId }) - this.$confirm(`确定对[id=${userIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('sys.user.confirmDelete', { ids: userIds.join(','), action: id ? this.$t('sys.common.delete') : this.$t('sys.user.batchDelete') }), this.$t('sys.common.tip'), { + confirmButtonText: this.$t('sys.common.confirm'), + cancelButtonText: this.$t('sys.common.cancel'), type: 'warning' }).then(() => { this.$http({ @@ -857,7 +857,7 @@ export default { data: this.$http.adornData(userIds, false) }).then(({data}) => { if (data && data.code === 0) { - this.$message.success('操作成功') + this.$message.success(this.$t('sys.common.operationSuccess')) this.getDataList() } else { this.$message.error(data.msg) @@ -919,7 +919,7 @@ export default { // 添加site addSite () { if(this.siteSelections1 == null || this.siteSelections1.length === 0){ - this.$message.warning('请选择可选工厂!') + this.$message.warning(this.$t('sys.user.selectAvailableFactory')) return } let inData = { @@ -934,8 +934,8 @@ export default { }) this.siteSelections1 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -944,7 +944,7 @@ export default { // 删除site deleteSite () { if(this.siteSelections2 == null || this.siteSelections2.length === 0){ - this.$message.warning('请选择已有工厂!') + this.$message.warning(this.$t('sys.user.selectExistingFactory')) return } let inData = { @@ -959,8 +959,8 @@ export default { }) this.siteSelections2 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1017,7 +1017,7 @@ export default { // 添加bu addBu () { if (this.buSelections1 == null || this.buSelections1.length === 0) { - this.$message.warning('请选择可选BU!') + this.$message.warning(this.$t('sys.user.selectAvailableBu')) return } let inData = { @@ -1032,8 +1032,8 @@ export default { }) this.buSelections1 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1042,7 +1042,7 @@ export default { // 删除bu deleteBu () { if (this.buSelections2 == null || this.buSelections2.length === 0) { - this.$message.warning('请选择已有BU!') + this.$message.warning(this.$t('sys.user.selectExistingBu')) return } let inData = { @@ -1057,8 +1057,8 @@ export default { }) this.buSelections2 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1116,7 +1116,7 @@ export default { // 添加部门 addDept () { if (this.deptSelections1 == null || this.deptSelections1.length === 0) { - this.$message.warning('请选择可选部门!') + this.$message.warning(this.$t('sys.user.selectAvailableDept')) return } let inData = { @@ -1131,8 +1131,8 @@ export default { }) this.deptSelections1 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1141,7 +1141,7 @@ export default { // 删除部门 deleteDept () { if (this.deptSelections2 == null || this.deptSelections2.length === 0) { - this.$message.warning('请选择已有部门!') + this.$message.warning(this.$t('sys.user.selectExistingDept')) return } let inData = { @@ -1156,8 +1156,8 @@ export default { }) this.deptSelections2 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1214,7 +1214,7 @@ export default { //添加角色 addBusinessRole () { if (this.businessRoleSelections1 == null || this.businessRoleSelections1.length === 0) { - this.$message.warning('请选择可选角色!') + this.$message.warning(this.$t('sys.user.selectAvailableRole')) return } let inData = { @@ -1229,8 +1229,8 @@ export default { }) this.businessRoleSelections1 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1239,7 +1239,7 @@ export default { //删除角色 deleteBusinessRole () { if (this.businessRoleSelections2 == null || this.businessRoleSelections2.length === 0) { - this.$message.warning('请选择已有角色!') + this.$message.warning(this.$t('sys.user.selectExistingRole')) return } let inData = { @@ -1254,8 +1254,8 @@ export default { }) this.businessRoleSelections2 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1312,7 +1312,7 @@ export default { // 添加机台 addMachineResource () { if (this.machineResourceSelections1 == null || this.machineResourceSelections1.length === 0) { - this.$message.warning('请选择可选机台!') + this.$message.warning(this.$t('sys.user.selectAvailableMachine')) return } let inData = { @@ -1327,8 +1327,8 @@ export default { }) this.machineResourceSelections1 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } }) @@ -1337,7 +1337,7 @@ export default { // 删除机台 deleteMachineResource () { if (this.machineResourceSelections2 == null || this.machineResourceSelections2.length === 0) { - this.$message.warning('请选择已有机台!') + this.$message.warning(this.$t('sys.user.selectExistingMachine')) return } let inData = { @@ -1352,8 +1352,8 @@ export default { }) this.machineResourceSelections2 = [] } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' + this.$alert(data.msg, this.$t('sys.user.error'), { + confirmButtonText: this.$t('sys.common.confirm') }) } })