diff --git a/src/components/MySelect/search_select.vue b/src/components/MySelect/search_select.vue index c732dcc0d76dfef8fe5386ede30f7175a7ecfd2c..205cc412ac1a637225b08b2f8c0593dc1f07a818 100644 --- a/src/components/MySelect/search_select.vue +++ b/src/components/MySelect/search_select.vue @@ -2,7 +2,7 @@ .container { max-width: 400px; + > :last-child { + flex: 1; + } } .label { color: rgba(0, 0, 0, 0.85); - width: 6em; text-align: right; margin-right: 1em; diff --git a/src/components/table/table.vue b/src/components/table/table.vue index dc767b2dd41a099168031c4f8c48159bc127df03..fe159139eca829337c2d815ee53a2de1c1973f3a 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -13,10 +13,10 @@ - 更多查询 + {{ $t('table.moreSearch') }} - 重置 - 查询 + {{ $t('table.reset') }} + {{ $t('table.search') }} @@ -24,7 +24,7 @@ - {{ newBtn.text || '新增' }} + {{ newBtn.text || $t('table.add') }} @@ -42,7 +42,7 @@ > @@ -65,7 +65,7 @@ :width="dWidth" @close="hidden" :maskClosable="false" - :title="title" + :title="drawerTitle" :afterVisibleChange="afterVisibleChange" > @@ -83,8 +83,6 @@ const initQuery = { pageNum: 1, }; -const defaultTitle = '新增'; - export default { props: { url: String, @@ -123,7 +121,7 @@ export default { loading: false, total: 0, visible: false, - title: newBtn.title ?? defaultTitle, + title: null, drawerStyle: { display: 'flex', flexDirection: 'column', @@ -160,7 +158,7 @@ export default { newButtons() { return this.buttons ? Array.isArray(this.buttons) - ? { data: this.buttons, title: '操作' } + ? { data: this.buttons } : this.buttons : null; }, @@ -188,6 +186,9 @@ export default { } : {}; }, + drawerTitle() { + return this.title ?? this.addBtn?.title ?? this.$t('table.add'); + }, }, methods: { @@ -228,7 +229,7 @@ export default { }, afterVisibleChange(visible) { if (!visible) { - this.title = this.addBtn?.title ?? defaultTitle; + this.title = null; this.type = null; this.row = null; this.dWidth = this.drawerWidth; diff --git a/src/components/tool/Drawer.vue b/src/components/tool/Drawer.vue index f3810e98ced004461859934ffbdcbeb8c6057590..8d2ec5f04d33e854442baeac452bc61950fa3057 100644 --- a/src/components/tool/Drawer.vue +++ b/src/components/tool/Drawer.vue @@ -1,64 +1,68 @@ diff --git a/src/components/upload/index.vue b/src/components/upload/index.vue index 55368c410f212b5c626aa5de2c4f2005f358f0fa..2b9f80586fad616e4b1879181deeb0153e631c50 100644 --- a/src/components/upload/index.vue +++ b/src/components/upload/index.vue @@ -1,7 +1,7 @@ diff --git a/src/local/index.js b/src/local/index.js index 2fd0f73bf1f0b1d80f70e74f9d848cdd277fad87..14d8a5241201181013e74d7446ac1f605ac590ad 100644 --- a/src/local/index.js +++ b/src/local/index.js @@ -1,4 +1,6 @@ import selectLang from './select'; +import TableLang from './table'; +import UserLang from './user'; const zh_CN = {}; const en_US = {}; @@ -12,5 +14,7 @@ function formatLang(langObject) { } formatLang(selectLang); +formatLang(TableLang); +formatLang(UserLang); export { en_US, zh_CN }; diff --git a/src/local/select.js b/src/local/select.js index dfc7e71974123f3b7a90efc6d295b9e5c36ed35e..0d326678069019a031ec80e27c888bfeec6606a6 100644 --- a/src/local/select.js +++ b/src/local/select.js @@ -1,4 +1,15 @@ // 0 中文, 1 英文 export default { 'select.placeholder': ['请选择', 'Please Select'], + 'select.startTime': ['开始时间', 'Start Time'], + 'select.endTime': ['结束时间', 'End Time'], + 'select.region': ['地区', 'Region'], + 'select.speciality': ['专业', 'Speciality'], + 'select.shiftTypeName': ['班组', 'ShiftTypeName'], + export: ['导出', 'Export'], + 'select.routes': ['线路', 'Routes'], + 'select.examine': ['巡检状态', 'Examine Status'], + 'select.taskType': ['任务类型', 'Task Type'], + 'select.examiner': ['巡检人', 'Examiner'], + 'select.routeName': ['线路名称', 'RouteName'], }; diff --git a/src/local/table.js b/src/local/table.js new file mode 100644 index 0000000000000000000000000000000000000000..8b5e3245d15a6c54804e459a6f574551745445ed --- /dev/null +++ b/src/local/table.js @@ -0,0 +1,21 @@ +export default { + 'table.operation': ['操作', 'Operation'], + 'table.moreSearch': ['更多查询', 'More Search'], + 'table.reset': ['重置', 'Reset'], + 'table.add': ['新增', 'Add'], + 'table.search': ['查询', 'Search'], + 'input.placeholder': ['请输入', 'Please Input'], + 'table.jobTime': ['任务时间', 'Job Time'], + 'table.inspectionStartTime': ['巡检开始时间', 'InspectionStartTime'], + 'table.inspectionEndTime': ['巡检结束时间', 'InspectionEndTime'], + 'table.newTemporaryTask': ['新建临时任务', 'New Temporary Task'], + 'table.detail': ['详情', 'Detail'], + 'table.progress': ['进度', 'Progress'], + 'table.pleaseSelect': ['请选择需要导出的数据', 'Please select the data to export'], + 'table.taskDetail': ['任务明细', 'Task Detail'], + 'table.taskProgress': ['任务进度', 'Task Progress'], + title: ['标题', 'Title'], + content: ['内容', 'Content'], + sender: ['发送者', 'Sender'], + recipient: ['接受者', 'Recipient'], +}; diff --git a/src/local/user.js b/src/local/user.js new file mode 100644 index 0000000000000000000000000000000000000000..5e5742279dbfdd3a9cc0ff3fc558934e9afda020 --- /dev/null +++ b/src/local/user.js @@ -0,0 +1,21 @@ +export default { + profile: ['个人中心', 'Profile'], + setting: ['个人设置', 'Setting'], + loginOut: ['退出登录', 'Login Out'], + tabNotice: ['通知', 'Notice'], + tabTodo: ['待办', 'Todo'], + 'user.modifyPassword': ['修改密码', 'ModifyPassword'], + 'user.account': ['用户账户', 'Account'], + 'user.name': ['姓名', 'Name'], + 'user.email': ['电子邮箱', 'Email'], + 'user.fixedPhone': ['固定电话', 'Fixed Telephone'], + 'user.mobilePhone': ['移动电话', 'Mobile Phone'], + 'user.updateInfo': ['更新信息', 'Update Info'], + 'user.avator': ['头像', 'Avator'], + 'user.upload': ['上传', 'Upload'], + 'table.createTime': ['创建时间', 'Create Time'], + 'table.hasRead': ['是否已读', 'hasRead'], + 'table.read': ['已读', 'Read'], + 'table.unread': ['未读', 'Unread'], + 'user.readTime': ['已读时间', 'Read Time'], +}; diff --git a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue index ac2d6901452eb3ad65ffff0f845f9fcaeef57e67..a2c445a462c83bfa3ccdb4576441af79f487b7c0 100644 --- a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue +++ b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue @@ -20,12 +20,10 @@ \ No newline at end of file diff --git a/src/pages/user/components/page_todo.vue b/src/pages/user/components/page_todo.vue new file mode 100644 index 0000000000000000000000000000000000000000..2f82f8577a097d2edd010782e0d69a921650d8a0 --- /dev/null +++ b/src/pages/user/components/page_todo.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/pages/user/components/todo.vue b/src/pages/user/components/todo.vue deleted file mode 100644 index e29d93ff5fc182411c3d5bae5b06ef566f357624..0000000000000000000000000000000000000000 --- a/src/pages/user/components/todo.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue index 89f7aa684d0c629bccb242740af9c0cd7dde1e19..73978757075a56ec1624ed7e67e6c8ecfed5db27 100644 --- a/src/pages/user/index.vue +++ b/src/pages/user/index.vue @@ -1,10 +1,10 @@