diff --git a/jero-web/package-lock.json b/jero-web/package-lock.json index 180289ee0..eac72318f 100644 --- a/jero-web/package-lock.json +++ b/jero-web/package-lock.json @@ -11271,8 +11271,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "optional": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pify": { "version": "2.3.0", @@ -14311,8 +14310,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true, - "optional": true + "dev": true }, "rx-lite-aggregates": { "version": "4.0.8", @@ -16206,9 +16204,9 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, "vue-i18n": { - "version": "8.22.4", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz", - "integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q==" + "version": "8.26.8", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz", + "integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A==" }, "vue-loader": { "version": "15.9.6", diff --git a/jero-web/package.json b/jero-web/package.json index 1948abb03..3390f5504 100644 --- a/jero-web/package.json +++ b/jero-web/package.json @@ -34,7 +34,7 @@ "vue": "^2.6.10", "vue-area-linkage": "^5.1.0", "vue-cropper": "^0.5.4", - "vue-i18n": "^8.7.0", + "vue-i18n": "^8.26.8", "vue-loader": "^15.7.0", "vue-ls": "^3.2.0", "vue-photo-preview": "^1.1.3", diff --git a/jero-web/src/App.vue b/jero-web/src/App.vue index 9f4f7a8fb..7be0eaa18 100644 --- a/jero-web/src/App.vue +++ b/jero-web/src/App.vue @@ -1,18 +1,29 @@ diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js new file mode 100644 index 000000000..82eb56ddb --- /dev/null +++ b/jero-web/src/common/lang/en-us.js @@ -0,0 +1,214 @@ +module.exports = { + home: 'home', + account: 'account', + EnterAccountFuzzyQuery:'enter account fuzzy query', + Gender:'gender', + pleaseSelect:'please select', + male:'male', + female:'female', + RealName:'real name', + pleaseEnter:'please enter', + phoneNumber:'phone number', + query:'query', + userStatues:'user status', + normal:'normal', + frozen:'frozen', + reset:'reset', + putAway:'Put away', + open:'open', + addUser:'add user', + userInformation:'user information', + export:'export', + import:'import', + recycleBin:'recycle bin', + delete:'delete', + thaw:'thaw', + batchOperation:'batch operation', + selected:'selected', + term:'term', + empty:'empty', + edit:'edit', + more:'更多', + areYouSure:'Are you sure to delete?', + details:'details', + password:'password', + freezePassword:'Are you sure to freeze?', + youThaw:'Are you sure to thaw?', + freezePasManagementPage:'This is the user management page?', + serialNumber:'serial number', + userAccount:'user account', + userName:'User name', + department:'department', + status:'state', + operation:'operation', + aRcord:'a rcord', + operationAllowedAccount:'This operation is not allowed for administrator account, please select again!', + confirm:'confirm', + selectedAccount:'selected account?', + whether:'whether', + adminDoNotAllowOperation:'The administrator account does not allow this operation!', + advancedQuery:'advanced query', + constructor:'constructor', + advancedQueryEffective:'Advanced query criteria are already effective', + preservation:'preservation', + condition:'condition', + close:'close', + no:'no', + click:'click', + add:'add', + FilterMatching:'Filter condition matching', + AllMatching:'(All conditions require matching)', + AnyOneMatches:'(Any one of the conditions matches)', + SelectQueryField:'select query field', + matchRules:'matching rules', + beEqualTo:'be equal to', + contain:'contain', + withStart:'With start', + withEnd:'with ending', + in:'in', + notEqual:'not equal to', + granter:'greater than', + greaterOrEqual:'greater than or equal to', + less:'less than', + lessOrEqual:'less than or equal to', + user:'user', + numericalValue:'numerical value', + not:'no', + EnterValue:'Please enter a value', + SavedQuery:'saved query', + NoQueriesSaved:'No queries were saved', + SavedName:'saved name', + CannotQueryEmpty:'Cannot query empty condition', + EmptyCannotSaved:'Empty condition cannot be saved', + cannotEmpty:'cannot be empty', + name:'name', + AlreadyExists:'Already exists, overwrite?', + SavedSuccessfully:'Saved successfully', + DeleteQuery:'Delete current query?', + VersionNotSupported:'Version not supported', + SaveQueryCriteria:'Save query criteria', + roleName:'role name', + newRole:'new role', + RoleManagement:'Role management', + toGrantAuthorization:'to grant authorization', + newUser:'new user', + ExistingUsers:'Existing users', + total:'total', + strip:'', + RoleCode:'Role code', + createTime:'create time', + userName:'user name', + selectOneRule:'Please select a role!', + setAttribute:'Please set the url.list2 attribute!', + setDelAttribute:'Please set the url.delete2 attribute!', + setDelBatAttribute:'Please set the url.deleteBatch2 attribute!', + selectARecored:'Please select a record!', + confirmDeletion:'confirm deletion', + deleteAData:'Delete selected data?', + AddDepartment:'Add Department', + AddSubordinate:'Add subordinate', + DepartmentInformation:'Department information', + BatchDelete:'Batch delete', + DeleteMultiplePiecesData:'Delete multiple pieces of data', + CurrentSelection:'Current selection', + Deselect:'Deselect', + enterDepartmentName:'Please enter department name', + addTo:'add to', + cancel:'cancel', + checkAll:'check all', + DeselectAll:'Deselect all', + ExpandAll:'Expand all', + MergeAll:'Merge all', + TreeOperation:'Tree operation', + essentialInformation:'essential information', + OrganizationName:'Organization name', + EnterOrganizationDepartment:'Please enter organization / department name', + SuperiorDepartment:'Superior department', + enterOrganizationCode:'Please enter organization code', + nothing:'nothing', + OrganizationType:'Organization type', + PleaseSelectOrganizationType:'Please select organization type', + company:'company', + post:'post', + sort:'sort', + enterMobileNumber:'Please enter your mobile phone number', + enterAddress:'Please enter the address', + address:'address', + remarks:'remarks', + enterComments:'Please enter comments', + selectDepartmentFirst:'Please select a department first!', + OrganizationCode:'Organization code', + fax:'fax', + enterOrganizationType:'Please enter organization type', + sureDeleteSelected:'Are you sure you want to delete the selected', + pieceData:'piece of data and child node data?', + selectSuperiorDepartmentFirst:'Please click to select the superior department first', + deleteDepartmentData:'Are you sure you want to delete this department and child node data?', + DeleteSucceeded:'Delete succeeded', + DeletionFailed:'Deletion failed', + departmentInformationDepartment:'There is no valid department information under your department', + permissionTemporrily:'This permission is temporarily granted to ordinary employees', + DepartmentRole:'Department role', + DictionaryName:'Dictionary name', + enterDictionary:'Please enter a dictionary name', + DictionaryNumber:'Dictionary number', + enterDictionaryNumber:'Please enter the dictionary number', + DictionaryInformation:'Dictionary information', + RefreshCache:'Refresh cache', + recycleBin:'recycle bin', + DictionaryConfiguration:'Dictionary configuration', + dataDictionaryPage:'This is the data dictionary page', + describe:'describe', + DescriptionRefreshCache:'Description refresh cache complete!', + FailedRefreshCache:'Failed to refresh cache!', + refreshFailed:'refresh failed', + ClassificationDictionary:'Classification dictionary', + ClassifManagementPage:'Classification dictionary management page', + ClassificationName:'Classification name', + ClassificationCode:'Classification code', + AddSubcategory:'Add subcategory', + DataRules:'Data rules', + menuMnagementPage:'This is the menu management page', + MenuName:'Menu name', + MenuType:'Menu type', + menu:'menu', + ButtonsPermissions:'Buttons / permissions', + assembly:'assembly', + route:'route', + AddSubmenu:'Add submenu', + NoPicture:'No picture', + noFile:'no file', + adadManagementPage:'adad management page', + TenantName:'Tenant name', + TenantNumber:'Tenant number', + startTime:'start time', + endTime:'end time', + LoginLog:'Login log', + OperationLog:'Operation log', + SearchLog:'Search log', + enterSearchKeyword:'Please enter a search keyword', + OperationType:'Operation type', + selectOperationType:'Please select operation type', + RequestMethod:'Request method', + RequestParameters:'Request parameters', + logManagementPage:'This is the log management page', + LogContent:'Log content', + OperatorID:'Operator ID', + OperatorName:'Operator name', + ElapsedTime:'Elapsed time (MS)', + LogType:'Log type', + tableName:'table name', + enterTableName:'Please enter a table name', + DataID:'Data ID', + enterID:'Please enter ID', + DataComparison:'Data comparison', + DataLogManagementPage:'Data log management page', + VersionNumber:'Version number', + DataContent:'Data content', + creator:'creator', + selectTwoPiecesData:'Please select two pieces of data', + selectSameDatabase:'Please select the same database table and data ID for comparison', + DataComparison:'Data comparison', + PromptInformation:'Prompt information', + +} \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js new file mode 100644 index 000000000..090f3669c --- /dev/null +++ b/jero-web/src/common/lang/zh-cn.js @@ -0,0 +1,215 @@ +module.exports = { + home: '首页', + account: '账号', + EnterAccountFuzzyQuery:'输入账号模糊查询', + Gender:'性别', + pleaseSelect:'请选择', + male:'男', + female:'女', + RealName:'真实姓名', + pleaseEnter:'请输入', + phoneNumber:'手机号码', + query:'查询', + userStatues:'用户状态', + normal:'正常', + frozen:'冻结', + reset:'重置', + putAway:'收起', + open:'展开', + addUser:'添加用户', + userInformation:'用户信息', + export:'导出', + import:'导入', + recycleBin:'回收站', + delete:'删除', + thaw:'解冻', + batchOperation:'批量操作', + selected:'已选择', + term:'项', + empty:'清空', + edit:'编辑', + more:'更多', + areYouSure:'确定删除吗?', + details:'详情', + password:'密码', + freezePassword:'确定冻结吗?', + youThaw:'确定解冻吗', + freezePasManagementPage:'这是用户管理页面?', + serialNumber:'序号', + userAccount:'用户账号', + userName:'用户姓名', + department:'部门', + status:'状态', + operation:'操作', + aRcord:'一条记录', + operationAllowedAccount:'管理员账号不允许此操作,请重新选择!', + confirm:'确认', + selectedAccount:'选中账号?', + whether:'是否', + adminDoNotAllowOperation:'管理员账号不允许此操作!', + advancedQuery:'高级查询', + constructor:'构造器', + advancedQueryEffective:'已有高级查询条件生效', + preservation:'保存', + condition:'条件', + close:'关闭', + no:'没有任何', + click:'点击', + add:'新增', + FilterMatching:'过滤条件匹配', + AllMatching:'(所有条件都要求匹配)', + AnyOneMatches:'(条件中的任意一个匹配)', + SelectQueryField:'选择查询字段', + matchRules:'匹配规则', + beEqualTo:'等于', + contain:'包含', + withStart:'以..开始', + withEnd:'以..结尾', + in:'在...中', + notEqual:'不等于', + granter:'大于', + greaterOrEqual:'大于等于', + less:'小于', + lessOrEqual:'小于等于', + user:'用户', + numericalValue:'数值', + yes:'是', + not:'否', + EnterValue:'请输入值', + SavedQuery:'保存的查询', + NoQueriesSaved:'没有保存任何查询', + SavedName:'保存的名称', + CannotQueryEmpty:'不能查询空条件', + EmptyCannotSaved:'空条件不能保存', + cannotEmpty:'不能为空', + name:'名称', + AlreadyExists:'已存在,是否覆盖?', + SavedSuccessfully:'保存成功', + DeleteQuery:'是否删除当前查询', + VersionNotSupported:'版本不支持', + SaveQueryCriteria:'保存查询条件', + roleName:'角色名称', + newRole:'新建角色', + RoleManagement:'角色管理', + toGrantAuthorization:'授权', + newUser:'新增用户', + ExistingUsers:'已有用户', + total:'共', + strip:'条', + RoleCode:'角色编码', + createTime:'创建时间', + userName:'用户名称', + selectOneRule:'请选择一个角色!', + setAttribute:'请设置url.list2属性!', + setDelAttribute:'请设置url.delete2 属性!', + setDelBatAttribute:'请设置url.deleteBatch2 属性!', + selectARecored:'请选择一条记录!', + confirmDeletion:'确认删除', + deleteAData:'是否删除选中数据?', + AddDepartment:'添加部门', + AddSubordinate:'添加下级', + DepartmentInformation:'部门信息', + BatchDelete:'批量删除', + DeleteMultiplePiecesData:'删除多条数据', + CurrentSelection:'当前选择', + Deselect:'取消选择', + enterDepartmentName:'请输入部门名称', + addTo:'添加', + cancel:'取消', + checkAll:"全部勾选", + DeselectAll:'取消全选', + ExpandAll:'展开所有', + MergeAll:'合并所有', + TreeOperation:'树操作', + essentialInformation:'基本信息', + OrganizationName:'机构名称', + EnterOrganizationDepartment:'请输入机构/部门名称', + SuperiorDepartment:'上级部门', + enterOrganizationCode:'请输入机构编码', + nothing:'无', + OrganizationType:'机构类型', + PleaseSelectOrganizationType:'请选择机构类型', + company:'公司', + post:'岗位', + sort:'排序', + enterMobileNumber:'请输入手机号', + enterAddress:'请输入地址', + address:'地址', + remarks:'备注', + enterComments:'请输入备注', + selectDepartmentFirst:'请先选择一个部门!', + OrganizationCode:'机构编码', + fax:'传真', + enterOrganizationType:'请输入机构类型', + sureDeleteSelected:'确定要删除所选中的', + pieceData:'条数据,以及子节点数据吗?', + selectSuperiorDepartmentFirst:'请先点击选中上级部门', + deleteDepartmentData:'确定要删除此部门以及子节点数据吗?', + DeleteSucceeded:'删除成功', + DeletionFailed:'删除失败', + departmentInformationDepartment:'您的部门下暂无有效部门信息', + permissionTemporrily:'普通员工暂此权限', + DepartmentRole:'部门角色', + DictionaryName:'字典名称', + enterDictionary:'请输入字典名称', + DictionaryNumber:'字典编号', + enterDictionaryNumber:'请输入字典编号', + DictionaryInformation:'字典信息', + RefreshCache:'刷新缓存', + recycleBin:'回收站', + DictionaryConfiguration:'字典配置', + dataDictionaryPage:'这是数据字典页面', + describe:'描述', + DescriptionRefreshCache:'刷新缓存完成!', + FailedRefreshCache:'刷新缓存失败!', + refreshFailed:'刷新失败', + ClassificationDictionary:'分类字典', + ClassifManagementPage:'分类字典管理页面', + ClassificationName:'分类名称', + ClassificationCode:'分类编码', + AddSubcategory:'添加子分类', + DataRules:'数据规则', + menuMnagementPage:'这是菜单管理页面', + MenuName:'菜单名称', + MenuType:'菜单类型', + menu:'菜单', + ButtonsPermissions:'按钮/权限', + assembly:'组件', + route:'路径', + AddSubmenu:'添加子菜单', + NoPicture:'无图片', + noFile:'无文件', + adadManagementPage:'adad管理页面', + TenantName:'租户名称', + TenantNumber:'租户编号', + startTime:'开始时间', + endTime:'结束时间', + LoginLog:'登录日志', + OperationLog:'操作日志', + SearchLog:'搜索日志', + enterSearchKeyword:'请输入搜索关键词', + OperationType:'操作类型', + selectOperationType:'请选择操作类型', + RequestMethod:'请求方法', + RequestParameters:'请求参数', + logManagementPage:'这是日志管理页面', + LogContent:'日志内容', + OperatorID:'操作人ID', + OperatorName:'操作人名称', + ElapsedTime:'耗时(毫秒)', + LogType:'日志类型', + tableName:'表名', + enterTableName:'请输入表名', + DataID:'数据ID', + enterID:'请输入ID', + DataComparison:'数据比较', + DataLogManagementPage:'数据日志管理页面', + VersionNumber:'版本号', + DataContent:'数据内容', + creator:'创建人', + selectTwoPiecesData:'请选择两条数据', + selectSameDatabase:'请选择相同的数据库表和数据ID进行比较', + DataComparison:'数据比较', + PromptInformation:'提示信息', + +} \ No newline at end of file diff --git a/jero-web/src/components/jero/JSuperQuery.vue b/jero-web/src/components/jero/JSuperQuery.vue index 4d6c9d1c0..318ca6421 100644 --- a/jero-web/src/components/jero/JSuperQuery.vue +++ b/jero-web/src/components/jero/JSuperQuery.vue @@ -7,23 +7,23 @@ {{tooltipProps}} - 高级查询 + {{$t('advancedQuery')}} - 高级查询 + {{$t('advancedQuery')}}
- 重置 - 保存查询条件 + {{$t('reset')}} + {{$t('SaveQueryCriteria')}}
- 关闭 - 查询 + {{$t('close')}} + {{$t('query')}} @@ -48,9 +48,9 @@
- 没有任何查询条件 + {{$t('no')}}+{{$t('query')}}+{{$t('condition')}} - 点击新增 + {{$t('click')}}+{{$t('add')}}
@@ -58,10 +58,10 @@ - + - AND(所有条件都要求匹配) - OR(条件中的任意一个匹配) + AND{{$t('AllMatching')}} + OR{{$t('AnyOneMatches')}} @@ -75,7 +75,7 @@ v-model="item.field" :treeData="fieldTreeData" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" - placeholder="选择查询字段" + :placeholder="$t('SelectQueryField')" allowClear treeDefaultExpandAll :getPopupContainer="node=>node.parentNode" @@ -86,17 +86,17 @@ - - 等于 - 包含 - 以..开始 - 以..结尾 - 在...中 - 不等于 - 大于 - 大于等于 - 小于 - 小于等于 + + {{$t('beEqualTo')}} + {{$t('contain')}} + {{$t('withStart')}} + {{$t('withEnd')}} + {{$t('in')}} + {{$t('notEqual')}} + {{$t('granter')}} + {{$t('greaterOrEqual')}} + {{$t('less')}} + {{$t('lessOrEqual')}} @@ -105,8 +105,8 @@ - - + + - - - - + + + {{$t('yes')}} + {{$t('not')}} - + @@ -186,10 +186,10 @@
- 保存的查询 + {{$t('SavedQuery')}}
- + - + @@ -376,7 +376,7 @@ } this.emitCallback(event) } else { - this.$message.warn("不能查询空条件") + this.$message.warn(this.$t('CannotQueryEmpty')) } }, emitCallback(event = {}) { @@ -434,7 +434,7 @@ handleSave() { let queryParams = this.removeEmptyObject(this.queryParamsModel) if (this.isNullArray(queryParams)) { - this.$message.warning('空条件不能保存') + this.$message.warning(this.$t('EmptyCannotSaved')) } else { this.prompt.value = '' this.prompt.visible = true @@ -443,7 +443,7 @@ handlePromptOk() { let { value } = this.prompt if(!value){ - this.$message.warning('保存名称不能为空') + this.$message.warning(this.$t('preservation')+this.$t('name')+this.$t('cannotEmpty')) return } // 取出查询条件 @@ -452,12 +452,12 @@ let filterList = this.saveTreeData.filter(i => i.originTitle === value) if (filterList.length > 0) { this.$confirm({ - content: `${value} 已存在,是否覆盖?`, + content: `${value} `+this.$t('AlreadyExists'), onOk: () => { this.prompt.visible = false filterList[0].records = records this.saveToLocalStore() - this.$message.success('保存成功') + this.$message.success(this.$t('SavedSuccessfully')) } }) } else { @@ -471,7 +471,7 @@ })) // 保存到 LocalStore this.saveToLocalStore() - this.$message.success('保存成功') + this.$message.success(this.$t('SavedSuccessfully')) } }, handleTreeSelect(idx, event) { @@ -487,7 +487,7 @@ event.stopPropagation() this.$confirm({ - content: '是否删除当前查询?', + content: this.$t('DeleteQuery'), onOk: () => { let { eventKey } = vNode this.saveTreeData.splice(Number.parseInt(eventKey.substring(2)), 1) diff --git a/jero-web/src/components/page/GlobalHeader.vue b/jero-web/src/components/page/GlobalHeader.vue index 56c629ef3..e46e0b177 100644 --- a/jero-web/src/components/page/GlobalHeader.vue +++ b/jero-web/src/components/page/GlobalHeader.vue @@ -19,7 +19,6 @@ 欢迎进入 Jero-Boot 平台 Jero-Boot - diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index d92eda9d7..02a51edb7 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -32,6 +32,10 @@ +
+ English + 中文 +
@@ -101,6 +105,12 @@ import { getFileAccessHttpUrl,getAction } from "@/api/manage" import Vue from 'vue' import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" + import moment from 'moment' + import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN' + import 'moment/locale/zh-cn' + moment.locale('zh-cn') + const EN = 'en-us' + const ZH = 'zh-cn' export default { name: "UserMenu", @@ -111,6 +121,8 @@ searchMenuOptions:[], searchMenuComp: 'span', searchMenuVisible: false, + locale: zhCN, + localeval: 'zh-cn' // update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 -------------- } }, @@ -251,8 +263,26 @@ this.$message.warn("刷新缓存失败!"); console.log("刷新失败",e) }) - } + }, /*update_end author:liushaoqian date:20200507 for: 刷新缓存*/ + moment, + changeLocale (localeval) { + this.localeval = localeval + if (localeval === EN) { + moment.locale(EN) + this.$i18n.locale = EN + this.locale = null + localStorage.setItem('language', EN) + // location.reload(); + } else { + moment.locale(ZH) + this.$i18n.locale = ZH + this.locale = zhCN + localStorage.setItem('language', ZH) + // location.reload(); + } + console.log('this.locale',this.locale) + } } } diff --git a/jero-web/src/main.js b/jero-web/src/main.js index dedf0134b..95aee4fa0 100644 --- a/jero-web/src/main.js +++ b/jero-web/src/main.js @@ -19,6 +19,10 @@ console.log('ant-design-vue version:', version) import Viser from 'viser-vue' import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less' +import VueI18n from 'vue-i18n' +import LangENUS from './common/lang/en-us' +import LangZHCN from './common/lang/zh-cn' + import '@/permission' // permission control import '@/utils/filter' // base filtermybatis-plus import Print from 'vue-print-nb-jeecg' @@ -62,6 +66,15 @@ Vue.use(preview) Vue.use(vueBus); Vue.use(JeroComponents); Vue.use(VueAreaLinkage); +Vue.use(VueI18n) + +const i18n = new VueI18n({ + locale: 'zh-cn', + messages: { + 'en-us': LangENUS, + 'zh-cn': LangZHCN + } +}) SSO.init(() => { main() @@ -71,6 +84,7 @@ function main() { new Vue({ router, store, + i18n, mounted() { store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true)) store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme)) diff --git a/jero-web/src/views/system/DataLogList.vue b/jero-web/src/views/system/DataLogList.vue index 78ea7e6ce..fabf15cf5 100644 --- a/jero-web/src/views/system/DataLogList.vue +++ b/jero-web/src/views/system/DataLogList.vue @@ -5,20 +5,20 @@ - - + + - - + + - 查询 - 重置 + {{$t('query')}} + {{$t('reset')}} @@ -27,15 +27,15 @@
- 数据比较 + {{$t('DataComparison')}}
- 已选择 {{ selectedRowKeys.length }}项   - 清空 + {{$t('selected')}} {{ selectedRowKeys.length }}{{$t('term')}}   + {{$t('empty')}}  
- 添加部门 - 添加下级 - 导出 + {{$t('AddDepartment')}} + {{$t('AddSubordinate')}} + {{$t('export')}} - 导入 + {{$t('import')}} - 批量删除 + {{$t('BatchDelete')}}
- 当前选择:{{ getCurrSelectedTitle() }} - 取消选择 + {{$t('CurrentSelection')}}:{{ getCurrSelectedTitle() }} + {{$t('Deselect')}}
- + @@ -57,13 +57,13 @@ - 全部勾选 - 取消全选 - 展开所有 - 合并所有 + {{$t('checkAll')}} + {{$t('DeselectAll')}} + {{$t('ExpandAll')}} + {{$t('MergeAll')}} - 树操作 + {{$t('TreeOperation')}}
@@ -71,49 +71,49 @@ - + - + :label="$t('OrganizationName')"> + - + + :placeholder="$t('nothing')"> - + + :label="$t('OrganizationType')"> @@ -121,43 +121,43 @@ + :label="$t('sort')"> - + :label="$t('phoneNumber')"> + - + :label="$t('address')"> + - + :label="$t('remarks')"> +
- 重置 - 保存 + {{$t('reset')}} + {{$t('preservation')}}
- 请先选择一个部门! + {{$t('selectDepartmentFirst')}}
- +
@@ -174,44 +174,7 @@ import {JeroListMixin} from '@/mixins/JeroListMixin' import DepartAuthModal from './modules/DepartAuthModal' // 表头 - const columns = [ - { - title: '机构名称', - dataIndex: 'departName' - }, - { - title: '机构类型', - align: 'center', - dataIndex: 'orgType' - }, - { - title: '机构编码', - dataIndex: 'orgCode', - }, - { - title: '手机号', - dataIndex: 'mobile' - }, - { - title: '传真', - dataIndex: 'fax' - }, - { - title: '地址', - dataIndex: 'address' - }, - { - title: '排序', - align: 'center', - dataIndex: 'departOrder' - }, - { - title: '操作', - align: 'center', - dataIndex: 'action', - scopedSlots: {customRender: 'action'} - } - ] + export default { name: 'DepartList', mixins: [JeroListMixin], @@ -237,7 +200,44 @@ model: {}, dropTrigger: '', depart: {}, - columns: columns, + columns:[ + { + title: this.$t('OrganizationName'), + dataIndex: 'departName' + }, + { + title: this.$t('OrganizationType'), + align: 'center', + dataIndex: 'orgType' + }, + { + title: this.$t('OrganizationCode'), + dataIndex: 'orgCode', + }, + { + title: this.$t('phoneNumber'), + dataIndex: 'mobile' + }, + { + title: this.$t('fax'), + dataIndex: 'fax' + }, + { + title: this.$t('address'), + dataIndex: 'address' + }, + { + title: this.$t('sort'), + align: 'center', + dataIndex: 'departOrder' + }, + { + title: this.$t('operation'), + align: 'center', + dataIndex: 'action', + scopedSlots: {customRender: 'action'} + } + ], disableSubmit: false, checkedKeys: [], selectedKeys: [], @@ -261,9 +261,9 @@ edges: [] }, validatorRules: { - departName: {rules: [{required: true, message: '请输入机构/部门名称!'}]}, - orgCode: {rules: [{required: true, message: '请输入机构编码!'}]}, - orgCategory: {rules: [{required: true, message: '请输入机构类型!'}]}, + departName: {rules: [{required: true, message: this.$t('EnterOrganizationDepartment')}]}, + orgCode: {rules: [{required: true, message: this.$t('enterOrganizationCode')}]}, + orgCategory: {rules: [{required: true, message: this.$t('enterOrganizationType')}]}, mobile: {rules: [{validator: this.validateMobile}]} }, url: { @@ -350,7 +350,7 @@ batchDel: function () { console.log(this.checkedKeys) if (this.checkedKeys.length <= 0) { - this.$message.warning('请选择一条记录!') + this.$message.warning(this.$t('selectARecored')) } else { var ids = '' for (var a = 0; a < this.checkedKeys.length; a++) { @@ -358,8 +358,8 @@ } var that = this this.$confirm({ - title: '确认删除', - content: '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?', + title: this.$t('confirmDeletion'), + content: this.$t('sureDeleteSelected') + this.checkedKeys.length + this.$t('pieceData'), onOk: function () { deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { if (res.success) { @@ -473,7 +473,7 @@ console.log('Received values of form: ', formData) httpAction(this.url.edit, formData, 'put').then((res) => { if (res.success) { - this.$message.success('保存成功!') + this.$message.success(this.$t('SavedSuccessfully')) this.loadTree() } else { this.$message.error(res.message) @@ -502,27 +502,27 @@ } else if (num == 2) { let key = this.currSelected.key if (!key) { - this.$message.warning('请先点击选中上级部门!') + this.$message.warning(this.$t('selectSuperiorDepartmentFirst')) return false } this.$refs.departModal.add(this.selectedKeys) - this.$refs.departModal.title = '新增' + this.$refs.departModal.title = this.$t('add') } else { this.$refs.departModal.add(this.rightClickSelectedKey) - this.$refs.departModal.title = '新增' + this.$refs.departModal.title = this.$t('add') } }, handleDelete() { var that = this this.$confirm({ - title: '确认删除', - content: '确定要删除此部门以及子节点数据吗?', + title: this.$t('confirmDeletion'), + content: this.$t('deleteDepartmentData'), onOk: function () { deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => { if (resp.success) { //删除成功后,去除已选中中的数据 that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); - that.$message.success('删除成功!') + that.$message.success(this.$t('DeleteSucceeded')) that.loadTree() //删除后同步清空右侧基本信息内容 let orgCode=that.form.getFieldValue("orgCode"); @@ -530,14 +530,14 @@ that.onClearSelected() } } else { - that.$message.warning('删除失败!') + that.$message.warning(this.$t('DeletionFailed')) } }) } }) }, selectDirectiveOk(record) { - console.log('选中指令数据', record) + // console.log('选中指令数据', record) this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode}) this.currSelected.sysCode = record.sysCode }, diff --git a/jero-web/src/views/system/DepartUserList.vue b/jero-web/src/views/system/DepartUserList.vue index 70a426619..c72245c57 100644 --- a/jero-web/src/views/system/DepartUserList.vue +++ b/jero-web/src/views/system/DepartUserList.vue @@ -3,7 +3,7 @@
- +
-

您的部门下暂无有效部门信息

+

{{$t('departmentInformationDepartment')}}

-

普通员工暂此权限

+

{{$t('permissionTemporrily')}}

- + - + - + diff --git a/jero-web/src/views/system/DictList.vue b/jero-web/src/views/system/DictList.vue index 58da62844..bfcc44322 100644 --- a/jero-web/src/views/system/DictList.vue +++ b/jero-web/src/views/system/DictList.vue @@ -6,33 +6,33 @@ - - + + - - + + - 查询 - 重置 + {{$t('query')}} + {{$t('reset')}}
- 添加 - 导出 + {{$t('addTo')}} + {{$t('export')}} - 导入 + {{$t('import')}} - 刷新缓存 + {{$t('RefreshCache')}}} - 回收站 + {{$t('recycleBin')}}
- 编辑 + {{$t('edit')}} - 字典配置 + {{$t('DictionaryConfiguration')}} - 删除 + {{$t('delete')}} @@ -81,7 +81,7 @@ components: {DictModal, DictItemList,DictDeleteList}, data() { return { - description: '这是数据字典页面', + description: this.$t('dataDictionaryPage'), visible: false, // 查询条件 queryParam: { @@ -101,22 +101,22 @@ } }, { - title: '字典名称', + title: this.$t('DictionaryName'), align: "left", dataIndex: 'dictName', }, { - title: '字典编号', + title: this.$t('DictionaryNumber'), align: "left", dataIndex: 'dictCode', }, { - title: '描述', + title: this.$t('describe'), align: "left", dataIndex: 'description', }, { - title: '操作', + title: this.$t('operation'), dataIndex: 'action', align: "center", scopedSlots: {customRender: 'action'}, @@ -188,11 +188,11 @@ Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) } }) - this.$message.success("刷新缓存完成!"); + this.$message.success(this.$t('DescriptionRefreshCache')); } }).catch(e=>{ - this.$message.warn("刷新缓存失败!"); - console.log("刷新失败",e) + this.$message.warn(this.$t('FailedRefreshCache')); + console.log(this.$t('refreshFailed'),e) }) } }, diff --git a/jero-web/src/views/system/LogList.vue b/jero-web/src/views/system/LogList.vue index 6d0d050be..dafa1dbf8 100644 --- a/jero-web/src/views/system/LogList.vue +++ b/jero-web/src/views/system/LogList.vue @@ -3,8 +3,8 @@
- - + +
@@ -14,33 +14,33 @@ - - + + - + - - + + - 查询 - 重置 + {{$t('query')}} + {{$t('reset')}} @@ -60,8 +60,8 @@ @change="handleTableChange">
-
请求方法:{{ record.method }}
-
请求参数:{{ record.requestParam }}
+
{{$t('RequestMethod')}}:{{ record.method }}
+
{{$t('RequestParameters')}}:{{ record.requestParam }}
@@ -85,7 +85,7 @@ }, data () { return { - description: '这是日志管理页面', + description: this.$t('logManagementPage'), // 查询条件 queryParam: { ipInfo:'', @@ -106,20 +106,20 @@ } }, { - title: '日志内容', + title: this.$t('LogContent'), align:"left", dataIndex: 'logContent', scopedSlots: { customRender: 'logContent' }, sorter: true }, { - title: '操作人ID', + title: this.$t('OperatorID'), dataIndex: 'userid', align:"center", sorter: true }, { - title: '操作人名称', + title: this.$t('OperatorName'), dataIndex: 'username', align:"center", sorter: true @@ -131,13 +131,13 @@ sorter: true }, { - title: '耗时(毫秒)', + title: this.$t('ElapsedTime'), dataIndex: 'costTime', align:"center", sorter: true }, { - title: '日志类型', + title: this.$t('LogType'), dataIndex: 'logType_dictText', /*customRender:function (text) { if(text==1){ @@ -151,7 +151,7 @@ align:"center", }, { - title: '创建时间', + title: this.$t('createTime'), dataIndex: 'createTime', align:"center", sorter: true @@ -159,7 +159,7 @@ ], operateColumn: { - title: '操作类型', + title: this.$t('OperationType'), dataIndex: 'operateType_dictText', align:"center", }, diff --git a/jero-web/src/views/system/PermissionList.vue b/jero-web/src/views/system/PermissionList.vue index 0f8df7999..cf5439299 100644 --- a/jero-web/src/views/system/PermissionList.vue +++ b/jero-web/src/views/system/PermissionList.vue @@ -3,13 +3,13 @@
- 新增 + {{$t('add')}} 批量删除 + icon="delete">{{$t('BatchDelete')}}
@@ -17,9 +17,9 @@
- 已选择 {{ - selectedRowKeys.length }}项   - 清空 + {{$t('selected')}} {{ + selectedRowKeys.length }}{{$t('term')}} + {{$t('empty')}}
- 编辑 + {{$t('edit')}} - 更多 + {{$t('more')}} - 详情 + {{$t('details')}} - 添加下级 + {{$t('AddSubordinate')}} - 数据规则 + {{$t('DataRules')}} - - 删除 + + {{$t('delete')}} @@ -86,61 +86,7 @@ import PermissionDataRuleList from './PermissionDataRuleList' import JEllipsis from '@/components/jero/JEllipsis' - const columns = [ - { - title: '菜单名称', - dataIndex: 'name', - key: 'name' - }, { - title: '菜单类型', - dataIndex: 'menuType', - key: 'menuType', - customRender: function(text) { - if (text == 0) { - return '菜单' - } else if (text == 1) { - return '菜单' - } else if (text == 2) { - return '按钮/权限' - } else { - return text - } - } - },/*{ - title: '权限编码', - dataIndex: 'perms', - key: 'permissionCode', - },*/{ - title: 'icon', - dataIndex: 'icon', - key: 'icon' - }, - { - title: '组件', - dataIndex: 'component', - key: 'component', - scopedSlots: { customRender: 'component' } - }, - { - title: '路径', - dataIndex: 'url', - key: 'url', - scopedSlots: { customRender: 'url' } - }, - { - title: '排序', - dataIndex: 'sortNo', - key: 'sortNo' - }, - { - title: '操作', - dataIndex: 'action', - fixed: 'right', - scopedSlots: { customRender: 'action' }, - align: 'center', - width: 150 - } - ] + export default { name: 'PermissionList', @@ -152,9 +98,53 @@ }, data() { return { - description: '这是菜单管理页面', + description: this.$t('menuMnagementPage'), // 表头 - columns: columns, + columns: [ + { + title: this.$t('MenuName'), + dataIndex: 'name', + key: 'name' + }, { + title: this.$t('MenuType'), + dataIndex: 'menuType', + key: 'menuType', + customRender: this.text + },/*{ + title: '权限编码', + dataIndex: 'perms', + key: 'permissionCode', + },*/{ + title: 'icon', + dataIndex: 'icon', + key: 'icon' + }, + { + title: this.$t('assembly'), + dataIndex: 'component', + key: 'component', + scopedSlots: { customRender: 'component' } + }, + { + title: this.$t('route'), + dataIndex: 'url', + key: 'url', + scopedSlots: { customRender: 'url' } + }, + { + title: this.$t('sort'), + dataIndex: 'sortNo', + key: 'sortNo' + }, + { + title: this.$t('operation'), + dataIndex: 'action', + fixed: 'right', + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 150 + } + ], loading: false, // 展开的行,受控属性 expandedRowKeys: [], @@ -165,6 +155,20 @@ } } }, + computed:{ + text:function(){ + if (text == 0) { + return this.$t('menu') + } else if (text == 1) { + return this.$t('menu') + } else if (text == 2) { + return this.$t('ButtonsPermissions') + } else { + return text + } + + } + }, methods: { loadData() { this.dataSource = [] @@ -180,7 +184,7 @@ this.$refs.PermissionDataRuleList.edit(record) }, handleAddSub(record) { - this.$refs.modalForm.title = "添加子菜单"; + this.$refs.modalForm.title = this.$t('AddSubmenu'); this.$refs.modalForm.localMenuType = 1; this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.edit({status:'1',permsType:'1',route:true,'parentId':record.id}); diff --git a/jero-web/src/views/system/RoleUserList.vue b/jero-web/src/views/system/RoleUserList.vue index 8b6b8f2be..bebeb12e5 100644 --- a/jero-web/src/views/system/RoleUserList.vue +++ b/jero-web/src/views/system/RoleUserList.vue @@ -8,7 +8,7 @@ - + @@ -23,8 +23,8 @@ --> - 查询 - 重置 + {{$t('query')}} + {{$t('reset')}} @@ -32,18 +32,18 @@
- 新建角色 + {{$t('newRole')}} - 导入 + {{$t('import')}} - 导出 + {{$t('export')}}
- 已选择 {{ selectedRowKeys1.length }}项 - 清空 + {{$t('selected')}} {{ selectedRowKeys1.length }}{{$t('term')}} + {{$t('empty')}}
@@ -60,7 +60,7 @@ :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" @change="handleTableChange"> - 用户 + {{$t('user')}} @@ -69,14 +69,14 @@ - 授权 + {{$t('toGrantAuthorization')}} - 编辑 + {{$t('edit')}} - - 删除 + + {{$t('delete')}} @@ -100,14 +100,14 @@ - + - 查询 - 重置 + {{$t('query')}} + {{$t('reset')}} @@ -116,18 +116,18 @@
- 新增用户 + {{$t('newUser')}} - 已有用户 + {{$t('ExistingUsers')}} - 删除 + {{$t('delete')}} - 批量操作 + {{$t('batchOperation')}} @@ -135,9 +135,9 @@
- 已选择 {{ - selectedRowKeys2.length }}项 - 清空 + {{$t('selected')}} {{ + selectedRowKeys2.length }}{{$t('term')}} + {{$t('empty')}}
- 编辑 + {{$t('edit')}} @@ -160,8 +160,8 @@ - - 删除 + + {{$t('delete')}} @@ -211,7 +211,7 @@ pageSize: 10, pageSizeOptions: ['10', '20', '30'], showTotal: (total, range) => { - return range[0] + '-' + range[1] + ' 共' + total + '条' + return range[0] + '-' + range[1] + ' '+this.$t('total') + total + this.$t('strip') }, showQuickJumper: true, showSizeChanger: true, @@ -222,7 +222,7 @@ pageSize: 10, pageSizeOptions: ['10', '20', '30'], showTotal: (total, range) => { - return range[0] + '-' + range[1] + ' 共' + total + '条' + return range[0] + '-' + range[1] + ' '+this.$t('total') + total + this.$t('strip') }, showQuickJumper: true, showSizeChanger: true, @@ -249,17 +249,17 @@ columns: [ { - title: '角色编码', + title: this.$t('RoleCode'), align: 'center', dataIndex: 'roleCode' }, { - title: '角色名称', + title: this.$t('roleName'), align: 'center', dataIndex: 'roleName' }, { - title: '创建时间', + title: this.$t('createTime'), dataIndex: 'createTime', align:"center", sorter: true, @@ -268,33 +268,33 @@ } }, { - title: '操作', + title: this.$t('operation'), dataIndex: 'action', align: 'center', scopedSlots: { customRender: 'action' } } ], columns2: [{ - title: '用户账号', + title: this.$t('userAccount'), align: 'center', dataIndex: 'username', width: 120 }, { - title: '用户名称', + title: this.$t('userName'), align: 'center', width: 100, dataIndex: 'realname' }, { - title: '状态', + title: this.$t('status'), align: 'center', width: 80, dataIndex: 'status_dictText' }, { - title: '操作', + title: this.$t('operation'), dataIndex: 'action', scopedSlots: { customRender: 'action' }, align: 'center', @@ -375,20 +375,20 @@ return str }, handleEdit2: function(record) { - this.$refs.modalForm2.title = '编辑' + this.$refs.modalForm2.title = this.$t('edit') this.$refs.modalForm2.roleDisabled = true this.$refs.modalForm2.edit(record) }, handleAdd2: function() { if (this.currentRoleId == '') { - this.$message.error('请选择一个角色!') + this.$message.error(this.$t('selectOneRule')) } else { this.$refs.modalForm2.roleDisabled = true this.$refs.modalForm2.selectedRole = [this.currentRoleId] this.$refs.modalForm2.add() - this.$refs.modalForm2.title = '新增' + this.$refs.modalForm2.title = this.$t('add') } }, modalFormOk2() { @@ -397,7 +397,7 @@ }, loadData2(arg) { if (!this.url.list2) { - this.$message.error('请设置url.list2属性!') + this.$message.error(this.$t('setAttribute')) return } //加载数据 若传入参数1则加载第一页的内容 @@ -425,7 +425,7 @@ }, handleDelete2: function(id) { if (!this.url.delete2) { - this.$message.error('请设置url.delete2属性!') + this.$message.error(this.$t('setDelAttribute')) return } var that = this @@ -441,11 +441,11 @@ batchDel2: function() { if (!this.url.deleteBatch2) { - this.$message.error('请设置url.deleteBatch2属性!') + this.$message.error(this.$t('setDelBatAttribute')) return } if (this.selectedRowKeys2.length <= 0) { - this.$message.warning('请选择一条记录!') + this.$message.warning(this.$t('selectARecored')) return } else { var ids = '' @@ -455,8 +455,8 @@ var that = this console.log(this.currentDeptId) this.$confirm({ - title: '确认删除', - content: '是否删除选中数据?', + title: this.$t('confirmDeletion'), + content: this.$t('deleteAData'), onOk: function() { deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => { if (res.success) { @@ -491,7 +491,7 @@ handleAddUserRole() { if (this.currentRoleId == '') { - this.$message.error('请选择一个角色!') + this.$message.error(this.$t('selectOneRule')) } else { this.$refs.selectUserModal.visible = true } diff --git a/jero-web/src/views/system/SysCategoryList.vue b/jero-web/src/views/system/SysCategoryList.vue index 157b2d0e2..2387815f9 100644 --- a/jero-web/src/views/system/SysCategoryList.vue +++ b/jero-web/src/views/system/SysCategoryList.vue @@ -3,24 +3,25 @@
- 新增 - 导出 + {{$t('add')}} + {{$t('export')}} - 导入 + {{$t('import')}} - 删除 + + {{$t('delete')}} - 批量操作 + {{$t('batchOperation')}}
- 编辑 + {{$t('edit')}} - - 删除 + + {{$t('delete')}} - 添加下级 + {{$t('AddSubordinate')}} @@ -68,21 +69,21 @@ }, data () { return { - description: '分类字典管理页面', + description: this.$t('ClassifManagementPage'), // 表头 columns: [ { - title:'分类名称', + title:this.$t('ClassificationName'), align:"left", dataIndex: 'name' }, { - title:'分类编码', + title:this.$t('ClassificationCode'), align:"left", dataIndex: 'code' }, { - title: '操作', + title: this.$t('operation'), dataIndex: 'action', align:"center", scopedSlots: { customRender: 'action' }, @@ -260,7 +261,7 @@ this.subExpandedKeys = []; this.getExpandKeysByPid(record.id,this.dataSource,this.dataSource) this.$refs.modalForm.subExpandedKeys = this.subExpandedKeys; - this.$refs.modalForm.title = "添加子分类"; + this.$refs.modalForm.title = this.$t('AddSubcategory'); this.$refs.modalForm.edit({'pid':record.id}); this.$refs.modalForm.disableSubmit = false; }, diff --git a/jero-web/src/views/system/TenantList.vue b/jero-web/src/views/system/TenantList.vue index fcf86421d..df0779df2 100644 --- a/jero-web/src/views/system/TenantList.vue +++ b/jero-web/src/views/system/TenantList.vue @@ -11,20 +11,21 @@
- 新增 + {{$t('add')}} - 删除 + + {{$t('delete')}} - 批量操作 + {{$t('batchOperation')}}
- 已选择 {{ selectedRowKeys.length }}项 - 清空 + {{$t('selected')}} {{ selectedRowKeys.length }}{{$t('term')}} + {{$t('empty')}}