From 8a614cedd9decd047fa67301df8829c12a56272f Mon Sep 17 00:00:00 2001 From: shuiluo Date: Tue, 20 Jul 2021 23:07:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BD=E9=99=85=E5=8C=96=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/index.js | 15 ++++++ src/components/table/index.vue | 30 +++++------ src/components/table/table.vue | 2 - src/local/index.js | 10 ++-- src/local/system.js | 6 +++ src/local/table.js | 7 ++- src/local/user.js | 5 ++ .../organization/jobsmanagement/Jobs.vue | 54 +++++++++---------- .../organization/jobsmanagement/form.vue | 49 +++++++++++------ .../organization/usermanagement/User.vue | 45 ++++++++-------- src/router/config.js | 4 +- 11 files changed, 135 insertions(+), 92 deletions(-) create mode 100644 src/components/table/index.js create mode 100644 src/local/system.js diff --git a/src/components/table/index.js b/src/components/table/index.js new file mode 100644 index 0000000..09cb4f6 --- /dev/null +++ b/src/components/table/index.js @@ -0,0 +1,15 @@ +import Wraper from './wraper.vue'; +import Table from './table.vue'; +import MoreItem from './more_item.vue'; + +export const WraperMixins = { + props: { hidden: Function, row: Object, type: String, refresh: Function }, + components: { Wraper }, + data() { + return { + form: {}, + }; + }, +}; + +export { Wraper, Table, MoreItem }; diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 9f4a2db..caba50a 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -1,16 +1,14 @@ @@ -188,7 +188,7 @@ export default { this.addVisible = true; this.type = 0; this.noFooter = false; - this.title = '新增'; + this.title = this.$t('table.add'); }, addDrawerClose() { this.addVisible = false; @@ -206,13 +206,13 @@ export default { }, show({ type, title, noFooter } = {}) { if (type === 0) { - this.title = '新增'; + this.title = this.$t('table.add'); } if (type === 1) { - this.title = '编辑'; + this.title = this.$t('table.edit'); } if (type === 2) { - this.title = '查看'; + this.title = this.$t('table.view'); } if (title) { this.title = title; diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 4f04690..4ca9ddb 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -18,7 +18,6 @@ {{ $t('table.reset') }} {{ $t('table.search') }} - @@ -113,7 +112,6 @@ export default { }, data() { - const newBtn = this.addBtn ? (typeof this.addBtn === 'object' ? this.addBtn : {}) : this.addBtn; return { initQuery: { ...initQuery, diff --git a/src/local/index.js b/src/local/index.js index 14d8a52..b336acb 100644 --- a/src/local/index.js +++ b/src/local/index.js @@ -1,6 +1,7 @@ import selectLang from './select'; -import TableLang from './table'; -import UserLang from './user'; +import tableLang from './table'; +import userLang from './user'; +import systemLang from './system'; const zh_CN = {}; const en_US = {}; @@ -14,7 +15,8 @@ function formatLang(langObject) { } formatLang(selectLang); -formatLang(TableLang); -formatLang(UserLang); +formatLang(tableLang); +formatLang(userLang); +formatLang(systemLang); export { en_US, zh_CN }; diff --git a/src/local/system.js b/src/local/system.js new file mode 100644 index 0000000..914b836 --- /dev/null +++ b/src/local/system.js @@ -0,0 +1,6 @@ +export default { + 'system.jobName': ['任务名称', 'Job Name'], + 'system.jobName.add': ['请输入@:system.jobName', 'Please Input @:system.jobName'], + 'system.department': ['所属部门', 'Department'], + 'system.userTitleName': ['用户职称', 'User Title Name'], +}; diff --git a/src/local/table.js b/src/local/table.js index 05b151e..728de0a 100644 --- a/src/local/table.js +++ b/src/local/table.js @@ -27,5 +27,10 @@ export default { 'table.confirm': ['确认', 'Confirm'], 'table.cancel': ['取消', 'Cancel'], 'table.delete': ['删除', 'Delete'], - 'table.confirmDelete': ['确认是否删除', 'Confirm To Delete'] + 'table.confirmDelete': ['确认是否删除', 'Confirm To Delete'], + 'table.describe': ['描述', 'Describe'], + 'table.describe.add': ['请输入描述信息', 'Please Input @:table.describe'], + 'table.confirmReset': ['确认是否重置', 'Confirm Reset'], + 'table.hasSelectedSome': ['已选择{num}项', '{num} have been selected'], + 'table.view': ['查看', 'View'], }; diff --git a/src/local/user.js b/src/local/user.js index 9b89419..4e8bd18 100644 --- a/src/local/user.js +++ b/src/local/user.js @@ -24,4 +24,9 @@ export default { 'user.twoInconsistent': ['两次密码不一致', 'The two passwords are inconsistent'], 'user.modifiedSuccessfully': ['修改成功', 'Modified successfully'], 'user.serverException': ['服务器异常', 'Server exception'], + 'user.isLocked': ['是否锁定', 'Is Locked'], + 'user.deblocking': ['解锁', 'Deblocking'], + 'user.confirmUnlock': ['确认是否解锁', 'Confirm Whether To Unlock'], + 'user.locking': ['锁定', 'Locking'], + 'user.confirmLocked': ['确认是否锁定', 'Confirm Locked'], }; diff --git a/src/pages/system/organization/jobsmanagement/Jobs.vue b/src/pages/system/organization/jobsmanagement/Jobs.vue index 4bd4e93..b13c725 100644 --- a/src/pages/system/organization/jobsmanagement/Jobs.vue +++ b/src/pages/system/organization/jobsmanagement/Jobs.vue @@ -1,44 +1,40 @@