diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 22af8894..f7cd578a 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -396,13 +396,18 @@ const local: App.I18n.Schema = { dept: { empty: 'No department information', title: 'Department List', + parentId: 'Parent Department', deptName: 'Department Name', + orderNum: 'Order Num', + deptCategory: 'Department Category', leader: 'Leader', phone: 'Phone', email: 'Email', status: 'Status', sort: 'Sort', createTime: 'Create Time', + expandAll: 'Expand All', + collapseAll: 'Collapse All', form: { parentId: { required: 'Please select Parent Department', @@ -412,6 +417,14 @@ const local: App.I18n.Schema = { required: 'Please enter Department Name', invalid: 'Department Name cannot be empty' }, + orderNum: { + required: 'Please enter Order Num', + invalid: 'Order num cannot be empty' + }, + deptCategory: { + required: 'Please enter Department Category', + invalid: 'Department category cannot be empty' + }, leader: { required: 'Please enter Leader', invalid: 'Leader cannot be empty' @@ -431,8 +444,21 @@ const local: App.I18n.Schema = { sort: { required: 'Please enter Sort', invalid: 'Sort cannot be empty' + }, + deptId: { + required: 'Please enter deptId', + invalid: 'Dept Id cannot be empty' } }, + error: { + getDeptDataFail: 'Get dept data fail', + getDeptUserDataFail: 'Get dept user data fail' + }, + placeholder: { + defaultLeaderPlaceHolder: 'Please select leader', + addDataLeaderPlaceHolder: 'Department leader can be selected only when updating', + deptUserIsEmptyLeaderPlaceHolder: 'Current dept no leader' + }, addDept: 'Add Department', editDept: 'Edit Department' }, diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 9b7b9e4c..e751d6e0 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -396,13 +396,18 @@ const local: App.I18n.Schema = { dept: { empty: '暂无部门信息', title: '部门列表', + parentId: '上级部门', deptName: '部门名称', + orderNum: '排序', + deptCategory: '类别编码', leader: '负责人', phone: '联系电话', email: '邮箱', status: '状态', sort: '排序', createTime: '创建时间', + expandAll: '全部展开', + collapseAll: '全部收起', form: { parentId: { required: '请选择上级部门', @@ -412,6 +417,14 @@ const local: App.I18n.Schema = { required: '请输入部门名称', invalid: '部门名称不能为空' }, + orderNum: { + required: '请输入排序', + invalid: '排序不能为空' + }, + deptCategory: { + required: '请输入类别编码', + invalid: '类别编码不能为空' + }, leader: { required: '请输入负责人', invalid: '负责人不能为空' @@ -431,8 +444,21 @@ const local: App.I18n.Schema = { sort: { required: '请输入排序', invalid: '排序不能为空' + }, + deptId: { + required: '请输入部门id', + invalid: '部门id不能为空' } }, + error: { + getDeptDataFail: '获取部门用户数据失败', + getDeptUserDataFail: '获取部门用户数据失败' + }, + placeholder: { + defaultLeaderPlaceHolder: '请选择负责人', + addDataLeaderPlaceHolder: '仅在更新时可选择部门负责人', + deptUserIsEmptyLeaderPlaceHolder: '该部门没有负责人' + }, addDept: '新增部门', editDept: '编辑部门' }, diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index f06d1535..87a326e4 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -568,21 +568,38 @@ declare namespace App { dept: { empty: string; title: string; + parentId: string; deptName: string; + orderNum: string; + deptCategory: string; leader: string; phone: string; email: string; status: string; sort: string; createTime: string; + expandAll: string; + collapseAll: string; form: { parentId: FormMsg; deptName: FormMsg; + orderNum: FormMsg; + deptCategory: FormMsg; leader: FormMsg; phone: FormMsg; email: FormMsg; status: FormMsg; sort: FormMsg; + deptId: FormMsg; + }; + error: { + getDeptDataFail: string; + getDeptUserDataFail: string; + }; + placeholder: { + defaultLeaderPlaceHolder: string; + addDataLeaderPlaceHolder: string; + deptUserIsEmptyLeaderPlaceHolder: string; }; addDept: string; editDept: string; @@ -896,13 +913,21 @@ declare namespace App { interface $T { (key: I18nKey): string; + (key: I18nKey, plural: number, options?: TranslateOptions): string; + (key: I18nKey, defaultMsg: string, options?: TranslateOptions): string; + (key: I18nKey, list: unknown[], options?: TranslateOptions): string; + (key: I18nKey, list: unknown[], plural: number): string; + (key: I18nKey, list: unknown[], defaultMsg: string): string; + (key: I18nKey, named: Record, options?: TranslateOptions): string; + (key: I18nKey, named: Record, plural: number): string; + (key: I18nKey, named: Record, defaultMsg: string): string; } } diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 8acb7c4e..46e47842 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -44,25 +44,25 @@ const { columns: () => [ { key: 'deptName', - title: '部门名称', + title: $t('page.system.dept.deptName'), align: 'center', minWidth: 120 }, { key: 'deptCategory', - title: '类别编码', + title: $t('page.system.dept.deptCategory'), align: 'center', minWidth: 120 }, { key: 'orderNum', - title: '排序', + title: $t('page.system.dept.sort'), align: 'center', minWidth: 60 }, { key: 'status', - title: '部门状态', + title: $t('page.system.dept.status'), align: 'center', minWidth: 120, render(row) { @@ -71,7 +71,7 @@ const { }, { key: 'createTime', - title: '创建时间', + title: $t('page.system.dept.createTime'), align: 'center', minWidth: 120 }, @@ -163,7 +163,7 @@ async function addInRow(row: TableDataWithIndex) {