diff --git a/backend/src/main/java/io/dataease/auth/service/impl/AuthUserServiceImpl.java b/backend/src/main/java/io/dataease/auth/service/impl/AuthUserServiceImpl.java index ea7226946a..804e87126d 100644 --- a/backend/src/main/java/io/dataease/auth/service/impl/AuthUserServiceImpl.java +++ b/backend/src/main/java/io/dataease/auth/service/impl/AuthUserServiceImpl.java @@ -1,6 +1,5 @@ package io.dataease.auth.service.impl; -import com.google.gson.Gson; import io.dataease.auth.api.dto.CurrentRoleDto; import io.dataease.auth.entity.SysUserEntity; import io.dataease.base.domain.SysUser; @@ -34,7 +33,7 @@ public class AuthUserServiceImpl implements AuthUserService { @Resource private SysUserMapper sysUserMapper; @Resource - private ExtPluginSysMenuMapper extPluginSysMenuMapper; + private DynamicMenuServiceImpl dynamicMenuService; /** * 此处需被F2CRealm登录认证调用 也就是说每次请求都会被调用 所以最好加上缓存 @@ -66,7 +65,7 @@ public class AuthUserServiceImpl implements AuthUserService { @Override public List permissions(Long userId){ // 用户登录获取菜单权限时同时更新插件菜单表 - this.syncPluginMenu(); + dynamicMenuService.syncPluginMenu(); List permissions; SysUser sysUser = sysUserMapper.selectByPrimaryKey(userId); if(sysUser.getIsAdmin()!=null&&sysUser.getIsAdmin()){ @@ -103,15 +102,4 @@ public class AuthUserServiceImpl implements AuthUserService { LogUtil.info("正在清除用户缓存【{}】",userId); } - @Transactional - public void syncPluginMenu() { - List pluginSysMenuList = PluginUtils.pluginMenus(); - int i = extPluginSysMenuMapper.deletePluginMenu(); - LogUtil.info("删除插件菜单记录数{}", i); - - if(CollectionUtils.isNotEmpty(pluginSysMenuList)){ - LogUtil.info("待插入插件菜单记录是"+new Gson().toJson(pluginSysMenuList)); - extPluginSysMenuMapper.savePluginMenu(pluginSysMenuList); - } - } } diff --git a/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java b/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java index fde40b65c2..58369dedcf 100644 --- a/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java +++ b/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java @@ -6,11 +6,15 @@ import io.dataease.auth.service.DynamicMenuService; import io.dataease.base.domain.SysMenu; import io.dataease.base.domain.SysMenuExample; import io.dataease.base.mapper.SysMenuMapper; +import io.dataease.base.mapper.ext.ExtPluginSysMenuMapper; import io.dataease.plugins.common.dto.PluginSysMenu; import io.dataease.plugins.util.PluginUtils; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -22,6 +26,9 @@ public class DynamicMenuServiceImpl implements DynamicMenuService { @Autowired(required = false) private SysMenuMapper sysMenuMapper; + @Resource + private ExtPluginSysMenuMapper extPluginSysMenuMapper; + @Override public List load(String userId) { SysMenuExample sysMenuExample = new SysMenuExample(); @@ -109,4 +116,13 @@ public class DynamicMenuServiceImpl implements DynamicMenuService { private Boolean isParent(Long pid){ return null == pid || pid==0L; } + + @Transactional + public void syncPluginMenu() { + List pluginSysMenuList = PluginUtils.pluginMenus(); + extPluginSysMenuMapper.deletePluginMenu(); + if(CollectionUtils.isNotEmpty(pluginSysMenuList)){ + extPluginSysMenuMapper.savePluginMenu(pluginSysMenuList); + } + } } diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java index eb2b7be871..61078a9da0 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java @@ -6,6 +6,7 @@ import io.dataease.dto.chart.ChartCustomFilterDTO; import io.dataease.dto.chart.ChartViewFieldDTO; import io.dataease.provider.QueryProvider; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -366,6 +367,9 @@ public class DorisQueryProvider extends QueryProvider { for (ChartCustomFilterDTO request : requestList) { String value = request.getValue(); DatasetTableField field = request.getField(); + if (ObjectUtils.isEmpty(field)) { + continue; + } if (field.getDeType() == 1 && field.getDeExtractType() != 1) { filter.append(" AND FROM_UNIXTIME(cast(") .append(field.getDataeaseName()) diff --git a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java index 13910bb78d..03cf85e294 100644 --- a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java @@ -6,6 +6,7 @@ import io.dataease.dto.chart.ChartCustomFilterDTO; import io.dataease.dto.chart.ChartViewFieldDTO; import io.dataease.provider.QueryProvider; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -374,6 +375,9 @@ public class MysqlQueryProvider extends QueryProvider { for (ChartCustomFilterDTO request : requestList) { String value = request.getValue(); DatasetTableField field = request.getField(); + if (ObjectUtils.isEmpty(field)) { + continue; + } if (field.getDeType() == 1 && field.getDeExtractType() != 1) { filter.append(" AND FROM_UNIXTIME(cast(") .append(field.getOriginName()) diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 469a1a2478..a9941bc122 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -261,4 +261,4 @@ i18n_custom_ds_delete=自定義數據集所關聯數據被刪除,無法正常 i18n_sql_add_not_matching=增量添加 sql 的數據列與數據集不匹配, i18n_sql_delete_not_matching=增量刪除 sql 的數據列與數據集不匹配, i18n_cst_ds_tb_or_field_deleted=自定義數據集所關聯數據被刪除或字段發生變化,無法正常顯示 -i18n_no_all_delete_privilege_folder=该目录下存在没有管理权限或查看权限的资源,无法删除 +i18n_no_all_delete_privilege_folder=該目錄下存在沒有管理權限或查看權限的資源,無法刪除 diff --git a/frontend/src/api/dataset/dataset.js b/frontend/src/api/dataset/dataset.js index 610b9981f2..7045b0b9da 100644 --- a/frontend/src/api/dataset/dataset.js +++ b/frontend/src/api/dataset/dataset.js @@ -68,11 +68,12 @@ export function listDatasource() { }) } -export function getTable(id) { +export function getTable(id, hideMsg = false) { return request({ url: '/dataset/table/get/' + id, loading: true, - method: 'post' + method: 'post', + hideMsg: hideMsg }) } diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 3523d325d2..c4fe2cc750 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -3,13 +3,13 @@
- - 矩阵设计 + + {{ $t('panel.matrix_design') }}
- - 自适应画布区域 + + {{ $t('panel.canvas_self_adaption') }}
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 9e2ad05a7d..f61cbdcc22 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -999,6 +999,7 @@ export default { default_panel_name: 'Default Dashboard Name', source_panel_name: 'Source Dashboard Name', content_style: 'Content Style', + canvas_self_adaption: 'Canvas Self Adaption' }, plugin: { local_install: 'Local installation', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index bb54340629..962c9e3e77 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -37,31 +37,31 @@ export default { 'menu1-3': '菜單 1-3', menu2: '菜單 2', Table: 'Table', - dynamicTable: '动态 Table', + dynamicTable: '動態 Table', dragTable: '拖拽 Table', - inlineEditTable: 'Table 内編輯', - complexTable: '综合 Table', + inlineEditTable: 'Table 內編輯', + complexTable: '綜合 Table', tab: 'Tab', - form: '表单', - createArticle: '创建文章', + form: '表單', + createArticle: '創建文章', editArticle: '編輯文章', articleList: '文章列表', - errorPages: '错误页面', + errorPages: '錯誤頁面', page401: '401', page404: '404', - errorLog: '错误日志', + errorLog: '錯誤日誌', excel: 'Excel', - exportExcel: '导出 Excel', - selectExcel: '导出 已選擇项', - mergeHeader: '导出 多级表头', - uploadExcel: '上传 Excel', + exportExcel: '導出 Excel', + selectExcel: '導出 已選擇項', + mergeHeader: '導出 多級表頭', + uploadExcel: '上傳 Excel', zip: 'Zip', pdf: 'PDF', exportZip: 'Export Zip', - theme: '换膚', + theme: '換膚', clipboardDemo: 'Clipboard', i18n: '國際化', - externalLink: '外链', + externalLink: '外鏈', profile: '個人中心' }, navbar: { @@ -69,7 +69,7 @@ export default { github: '項目地址', logOut: '退出登陸', profile: '個人中心', - theme: '换膚', + theme: '換膚', size: '佈局大小' }, login: { @@ -80,15 +80,15 @@ export default { password: '密碼', any: '任意字符', thirdparty: '第三方登陸', - thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', - expires: '登陸信息过期,请重新登陸', - tokenError: '信息错误,请重新登陸', + thirdpartyTips: '本地不能模擬,請結合自己業務進行模擬!!!', + expires: '登陸信息過期,請重新登陸', + tokenError: '信息錯誤,請重新登陸', username_error: '請輸入正確的 ID', password_error: '密碼不小於 8 位' }, commons: { switch_lang: '切換語言成功', - close: '关闭', + close: '關閉', icon: '圖標', all: '全部', enable: '啟用', @@ -115,7 +115,7 @@ export default { examples: '示例', help_documentation: '幫助文檔', api_help_documentation: 'API文檔', - delete_cancelled: '已取消删除', + delete_cancelled: '已取消刪除', workspace: '工作空開你', organization: '組織', menu: '菜單', @@ -130,23 +130,23 @@ export default { save: '保存', update: '更新', save_success: '保存成功', - delete_success: '删除成功', + delete_success: '刪除成功', copy_success: '複製成功', modify_success: '修改成功', - delete_cancel: '已取消删除', + delete_cancel: '已取消刪除', confirm: '確定', cancel: '取消', prompt: '提示', operating: '操作', input_limit: '長度在 {0} 到 {1} 個字符', login: '登陸', - welcome: '一站式開源數據分析平台', + welcome: '一站式開源數據分析平臺', username: '姓名', password: '密碼', input_username: '請輸入用戶姓名', input_password: '請輸入密碼', test: '測試', - create_time: '创建時間', + create_time: '創建時間', update_time: '更新時間', add: '添加', member: '成員', @@ -164,18 +164,18 @@ export default { system: '系統', personal_setting: '個人設置', test_resource_pool: '測試資源池', - system_setting: '系统設置', + system_setting: '系統設置', input_content: '請輸入內容', create: '新建', edit: '編輯', copy: '複製', refresh: '刷新', remark: '備註', - delete: '删除', + delete: '刪除', reduction: '恢復', not_filled: '未填寫', - please_select: '请選擇', - search_by_name: '根据名稱搜索', + please_select: '請選擇', + search_by_name: '根據名稱搜索', personal_information: '個人信息', exit_system: '退出系統', verification: '驗證', @@ -205,24 +205,24 @@ export default { connection_successful: '連接成功', connection_failed: '連接失敗', save_failed: '保存失敗', - host_cannot_be_empty: '主机不能為空', - port_cannot_be_empty: '端口号不能為空', - account_cannot_be_empty: '帐户不能為空', + host_cannot_be_empty: '主機不能為空', + port_cannot_be_empty: '端口號不能為空', + account_cannot_be_empty: '帳戶不能為空', remove: '移除', remove_cancel: '移除取消', remove_success: '移除成功', tips: '認證信息已過期,請重新登陸', not_performed_yet: '尚未執行', incorrect_input: '輸入內容不正確', - delete_confirm: '請輸入以下內容,確認删除:', + delete_confirm: '請輸入以下內容,確認刪除:', login_username: 'ID 或 郵箱', input_login_username: '請輸入用戶 ID 或 郵箱', input_name: '請輸入名稱', - please_upload: '请上傳文件', - please_fill_path: '请填寫url 路徑', + please_upload: '請上傳文件', + please_fill_path: '請填寫url 路徑', formatErr: '格式錯誤', - please_save: '请先保存', - reference_documentation: '参考文檔', + please_save: '請先保存', + reference_documentation: '參考文檔', id: 'ID', millisecond: '毫秒', cannot_be_null: '不能為空', @@ -231,56 +231,56 @@ export default { modifier: '修改人', validate: '校驗', batch_add: '批量添加', - tag_tip: '输入回车添加标签', + tag_tip: '輸入回車添加標簽', table: { - select_tip: '已选中 {0} 条數据' + select_tip: '已選中 {0} 條數據' }, date: { select_date: '選擇日期', - start_date: '开始日期', - end_date: '结束日期', + start_date: '開始日期', + end_date: '結束日期', select_date_time: '選擇日期時間', - start_date_time: '开始日期時間', - end_date_time: '结束日期時間', + start_date_time: '開始日期時間', + end_date_time: '結束日期時間', range_separator: '至', - data_time_error: '开始日期不能大與结束日期' + data_time_error: '開始日期不能大與結束日期' }, adv_search: { - title: '高级搜索', - combine: '组合查询', - test: '所属测试', - project: '所属项目', - search: '查询', + title: '高級搜索', + combine: '組合查詢', + test: '所屬測試', + project: '所屬項目', + search: '查詢', reset: '重置', and: '所有', - or: '任意一个', + or: '任意一個', operators: { is_empty: '空', is_not_empty: '非空', like: '包含', not_like: '不包含', - in: '属與', - not_in: '不属與', + in: '屬與', + not_in: '不屬與', gt: '大與', ge: '大與等與', lt: '小與', le: '小與等與', equals: '等與', not_equals: '不等與', - between: '之间', - current_user: '是当前用戶' + between: '之間', + current_user: '是當前用戶' }, message_box: { alert: '警告', confirm: '確認' } }, - monitor: '监控', - image: '镜像', - tag: '标签', + monitor: '監控', + image: '鏡像', + tag: '標簽', module: { - select_module: '選擇模块', - default_module: '默认模块' + select_module: '選擇模塊', + default_module: '默認模塊' }, datasource: '數據源', char_can_not_more_50: '不能超過50字符', @@ -301,23 +301,23 @@ export default { editPermission: '編輯權限', roles: '你的權限', switchRoles: '切換權限', - tips: '在某些情况下,不适合使用 v-permission。例如:Element-UI 的 el-tab 或 el-table-column 以及其它动态渲染 dom 的场景。你只能通过手动设置 v-if 来实现。', - delete: '删除', + tips: '在某些情況下,不適合使用 v-permission。例如:Element-UI 的 el-tab 或 el-table-column 以及其它動態渲染 dom 的場景。你只能通過手動設置 v-if 來實現。', + delete: '刪除', confirm: '確定', cancel: '取消' }, guide: { - description: '引导页对與一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基與', - button: '打开引导' + description: '引導頁對與一些第一次進入項目的人很有用,你可以簡單介紹下項目的功能。本 Demo 是基與', + button: '打開引導' }, components: { documentation: '文檔', - tinymceTips: '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在選擇富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下選擇了Tinymce。更详细的富文本比较和介绍见', - dropzoneTips: '由與我司业务有特殊需求,而且要传七牛 所以没用第三方,選擇了自己封装。代码非常的简单,具体代码你可以在这里看到 @/components/Dropzone', - stickyTips: '当页面滚动到预设的位置会吸附在顶部', - backToTopTips1: '页面滚动到指定位置会在右下角出现返回顶部按钮', - backToTopTips2: '可自定义按钮的样式、show/hide、出现的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素', - imageUploadTips: '由與我在使用时它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的话,优先还是使用官方版本。' + tinymceTips: '富文本是管理後臺一個核心的功能,但同時又是一個有很多坑的地方。在選擇富文本的過程中我也走了不少的彎路,市面上常見的富文本都基本用過了,最終權衡了一下選擇了Tinymce。更詳細的富文本比較和介紹見', + dropzoneTips: '由與我司業務有特殊需求,而且要傳七牛 所以沒用第三方,選擇了自己封裝。代碼非常的簡單,具體代碼你可以在這裏看到 @/components/Dropzone', + stickyTips: '當頁面滾動到預設的位置會吸附在頂部', + backToTopTips1: '頁面滾動到指定位置會在右下角出現返回頂部按鈕', + backToTopTips2: '可自定義按鈕的樣式、show/hide、出現的高度、返回的位置 如需文字提示,可在外部使用Element的el-tooltip元素', + imageUploadTips: '由與我在使用時它只有vue@1版本,而且和mockjs不兼容,所以自己改造了一下,如果大家要使用的話,優先還是使用官方版本。' }, table: { dynamicTips1: '固定標頭,按照表頭順序排序', @@ -346,28 +346,28 @@ export default { confirm: '確定' }, example: { - warning: '创建和編輯页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基與 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见' + warning: '創建和編輯頁面是不能被 keep-alive 緩存的,因為keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基與 component name 來進行緩存的。如果你想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見' }, errorLog: { - tips: '请点击右上角bug小图标', - description: '现在的管理后台基本都是spa的形式了,它增强了用戶体验,但同时也会增加页面出问题的可能性,可能一个小小的疏忽就导致整个页面的死锁。好在 Vue 官网提供了一个方法来捕获处理异常,你可以在其中进行错误处理或者异常上报。', - documentation: '文檔介绍' + tips: '請點擊右上角bug小圖標', + description: '現在的管理後臺基本都是spa的形式了,它增強了用戶體驗,但同時也會增加頁面出問題的可能性,可能一個小小的疏忽就導致整個頁面的死鎖。好在 Vue 官網提供了一個方法來捕獲處理異常,你可以在其中進行錯誤處理或者異常上報。', + documentation: '文檔介紹' }, excel: { export: '導出', - selectedExport: '導出已選擇项', - placeholder: '請輸入文件名(默认excel-list)' + selectedExport: '導出已選擇項', + placeholder: '請輸入文件名(默認excel-list)' }, zip: { export: '導出', - placeholder: '請輸入文件名(默认file)' + placeholder: '請輸入文件名(默認file)' }, pdf: { tips: '這裏使用 window.print() 來實現下載pdf的功能' }, theme: { change: '換膚', - documentation: '换膚文檔', + documentation: '換膚文檔', tips: 'Tips: 它區別於 navbar 上的 theme-pick, 是兩種不同的換膚方法,各自有不同的應用場景,具體請參考文檔。' }, tagsView: { @@ -387,7 +387,7 @@ export default { i18n_no_license_record: '沒有 License 紀錄', i18n_license_is_empty: 'License 為空', title: '授權管理', - corporation: '客户名稱', + corporation: '客戶名稱', time: '授權時間', product: '產品名稱', edition: '產品版本', @@ -404,9 +404,9 @@ export default { member: { create: '添加成員', modify: '修改成員', - delete_confirm: '这个用戶確定要删除吗?', - please_choose_member: '请選擇成員', - search_by_name: '根据名稱搜索', + delete_confirm: '這個用戶確定要刪除嗎?', + please_choose_member: '請選擇成員', + search_by_name: '根據名稱搜索', modify_personal_info: '修改個人信息', edit_password: '修改密碼', edit_information: '編輯信息', @@ -415,15 +415,15 @@ export default { special_characters_are_not_supported: '不支持特殊字符', mobile_number_format_is_incorrect: '手機號碼格式不正確', email_format_is_incorrect: '郵箱格式不正確', - password_format_is_incorrect: '有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可选)', - old_password: '旧密碼', + password_format_is_incorrect: '有效密碼:8-30位,英文大小寫字母+數字+特殊字符(可選)', + old_password: '舊密碼', new_password: '新密碼', repeat_password: '確認密碼', - inconsistent_passwords: '两次输入的密碼不一致', - remove_member: '確定要移除该成員吗', - org_remove_member: '確定要移除该成員吗?', + inconsistent_passwords: '兩次輸入的密碼不一致', + remove_member: '確定要移除該成員嗎', + org_remove_member: '確定要移除該成員嗎?', input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱', - no_such_user: '无此用戶信息, 請輸入正确的用戶 ID 或者 用戶郵箱!' + no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!' }, user: { create: '新建用戶', @@ -433,12 +433,12 @@ export default { input_email: '請輸入郵箱', input_password: '請輸入密碼', input_phone: '請輸入電話號碼', - input_roles: '请選擇角色', + input_roles: '請選擇角色', special_characters_are_not_supported: '不支持特殊字符', mobile_number_format_is_incorrect: '手機號碼格式不正確', email_format_is_incorrect: '郵箱格式不正確', - delete_confirm: '这个用戶確定要删除吗?', - apikey_delete_confirm: '这个 API Key 確定要删除吗?', + delete_confirm: '這個用戶確定要刪除嗎?', + apikey_delete_confirm: '這個 API Key 確定要刪除嗎?', input_id_placeholder: '請輸入ID (不支持中文)', source: '用戶來源', choose_org: '選擇組織', @@ -452,16 +452,16 @@ export default { }, role: { menu_authorization: '菜單授權', - data_authorization: '數据授權', - please_choose_role: '请選擇角色', + data_authorization: '數據授權', + please_choose_role: '請選擇角色', admin: '系統管理員', - org_admin: '組織管理员', + org_admin: '組織管理員', org_member: '組織成員', add: '新建角色', - delete: '删除角色', + delete: '刪除角色', modify: '修改角色', tips: '提示', - confirm_delete: '確認删除角色 ', + confirm_delete: '確認刪除角色 ', role_name: '角色名稱', search_by_name: '按名稱搜索', pls_input_name: '請輸入名稱' @@ -469,7 +469,7 @@ export default { menu: { parent_category: '上級目錄', module_name: '組件名稱', - module_path: '組件路径', + module_path: '組件路徑', route_addr: '路由地址', menu_sort: '菜單排序', authority_identification: '權限標識', @@ -479,8 +479,8 @@ export default { tile: '菜單標題', create: '創建菜單', modify: '修改菜單', - delete: '删除菜單', - delete_confirm: '確定删除菜單吗?', + delete: '刪除菜單', + delete_confirm: '確定刪除菜單嗎?', menu_type: '菜單類型' }, organization: { @@ -493,11 +493,11 @@ export default { create_time: '創建日期', create: '新建組織', modify: '修改組織', - delete: '删除組織', - delete_confirm: '删除該組織會關聯刪除該組織的下屬組織,確定要删除吗?', + delete: '刪除組織', + delete_confirm: '刪除該組織會關聯刪除該組織的下屬組織,確定要刪除嗎?', input_name: '請輸入組織名稱', - select_organization: '请選擇組織', - search_by_name: '根据名稱搜索', + select_organization: '請選擇組織', + search_by_name: '根據名稱搜索', special_characters_are_not_supported: '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)', select: '選擇組織' }, @@ -518,7 +518,7 @@ export default { tip: ' 提示: 僅用來作為測試郵件收件人' }, chart: { - save_snapshot: '保存缩略图', + save_snapshot: '保存縮略圖', datalist: '視圖', add_group: '添加分組', add_scene: '添加場景', @@ -667,7 +667,7 @@ export default { rose_radius: '園角', view_name: '視圖標題', name_can_not_empty: '名稱不能為空', - template_can_not_empty: '请选择仪表板', + template_can_not_empty: '請選擇儀表板', custom_count: '記錄數', table_title_fontsize: '表頭字體大小', table_item_fontsize: '表格字體大小', @@ -781,7 +781,7 @@ export default { execute_rate: '執行頻率', execute_once: '立即執行', cron_config: '表達時設定', - no_limit: '無限制', + no_limit: '無限製', set_end_time: '設定結束時間', operate: '操作', save_success: '保存成功', @@ -892,7 +892,7 @@ export default { delete: '刪除', move_to: '移動到', rename: '重命名', - import: '导入模板', + import: '導入模板', tips: '提示', confirm_delete: '確認刪除', delete_success: '刪除成功', @@ -917,14 +917,14 @@ export default { photo: '圖片', default_panel: '默認儀表板', create_public_links: '創建公共鏈接', - to_default: '另存为默认', - to_default_panel: '另存为默认儀表板', + to_default: '另存為默認', + to_default_panel: '另存為默認儀表板', store: '收藏', save_to_panel: '保存為模板', export_to_panel: '導出為模板', preview: '預覽', - fullscreen_preview: '全屏预览', - new_tab_preview: '新Tab页预览', + fullscreen_preview: '全屏預覽', + new_tab_preview: '新Tab頁預覽', select_panel_from_left: '請從左側選擇儀表板', template_nale: '模板名稱', template: '模板', @@ -940,7 +940,7 @@ export default { select_by_table: '列表選擇', data_list: '數據列表', component_list: '組件列表', - custom_scope: '自定義控制範圍', + custom_scope: '自定義控製範圍', multiple_choice: '多選', single_choice: '單選', field: '字段', @@ -954,51 +954,52 @@ export default { insert_picture: '插入圖片', redo: '重做', undo: '撤銷', - panelNull: '这是个空的儀表板,可以通过编辑来丰富内容', - copy: '复制', - paste: '粘贴', + panelNull: '這是個空的儀表板,可以通過編輯來豐富內容', + copy: '復製', + paste: '粘貼', cut: '剪切', - lock: '锁定', - topComponent: '置于顶层', - bottomComponent: '置于底层', - upComponent: '上移一层', - downComponent: '下移一层', - open_aided_design: '打开组件辅助设计', - close_aided_design: '关闭组件辅助设计', - open_style_design: '打开样式设计', - close_style_design: '关闭样式设计', - matrix_design: '矩阵设计', - left: 'x 坐标', - top: 'y 坐标', + lock: '鎖定', + topComponent: '置於頂層', + bottomComponent: '置於底層', + upComponent: '上移一層', + downComponent: '下移一層', + open_aided_design: '打開組件輔助設計', + close_aided_design: '關閉組件輔助設計', + open_style_design: '打開樣式設計', + close_style_design: '關閉樣式設計', + matrix_design: '矩陣設計', + left: 'x 坐標', + top: 'y 坐標', height: '高', - width: '宽', - color: '颜色', + width: '寬', + color: '顏色', backgroundColor: '背景色', - borderStyle: '边框风格', - borderWidth: '边框宽度', - borderColor: '边框颜色', - borderRadius: '边框半径', - fontSize: '字体大小', - fontWeight: '字体粗细', + borderStyle: '邊框風格', + borderWidth: '邊框寬度', + borderColor: '邊框顏色', + borderRadius: '邊框半徑', + fontSize: '字體大小', + fontWeight: '字體粗細', lineHeight: '行高', - letterSpacing: '字间距', - textAlign: '左右对齐', + letterSpacing: '字間距', + textAlign: '左右對齊', opacity: '透明度', - verticalAlign: '上下对齐', - text_align_left: '左对齐', + verticalAlign: '上下對齊', + text_align_left: '左對齊', text_align_center: '左右居中', - text_align_right: '右对齐', - vertical_align_top: '上对齐', - vertical_align_middle: '居中对齐', - vertical_align_bottom: '下对齐', - border_style_solid: '实线', - border_style_dashed: '虚线', - select_component: '请选择组件', + text_align_right: '右對齊', + vertical_align_top: '上對齊', + vertical_align_middle: '居中對齊', + vertical_align_bottom: '下對齊', + border_style_solid: '實線', + border_style_dashed: '虛線', + select_component: '請選擇組件', other_module: '其他', - content: '内容', - default_panel_name: '默认仪表板名称', - source_panel_name: '原仪表板名称', - content_style: '内容样式' + content: '內容', + default_panel_name: '默認儀表板名稱', + source_panel_name: '原儀表板名稱', + content_style: '內容樣式', + canvas_self_adaption: '自適應畫布區域' }, plugin: { local_install: '本地安裝', @@ -1026,7 +1027,7 @@ export default { auth: { authConfig: '權限配置', authQuickConfig: '權限快捷配置', - dept: '组织', + dept: '組織', role: '角色', user: '用戶', linkAuth: '數據源權限', @@ -1034,7 +1035,7 @@ export default { chartAuth: '視圖權限', panelAuth: '儀表板權限', menuAuth: '菜單和操作權限', - deptHead: '所有组织', + deptHead: '所有組織', roleHead: '所有角色', userHead: '所有用戶', linkAuthHead: '所有數據源', @@ -1061,10 +1062,10 @@ export default { update_success: '更新成功' }, template: { - exit_same_template_check: '当前存在相同名称模板,是否覆盖?', - override: '覆盖', + exit_same_template_check: '當前存在相同名稱模板,是否覆蓋?', + override: '覆蓋', cancel: '取消', - confirm_upload: '上传确认' + confirm_upload: '上傳確認' }, cron: { second: '秒', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index bcd83a886a..a7f0fa5671 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -998,7 +998,8 @@ export default { content: '内容', default_panel_name: '默认仪表板名称', source_panel_name: '原仪表板名称', - content_style: '内容样式' + content_style: '内容样式', + canvas_self_adaption: '自适应画布区域' }, plugin: { local_install: '本地安装', diff --git a/frontend/src/store/modules/permission.js b/frontend/src/store/modules/permission.js index 5b70a388ec..260db2ad06 100644 --- a/frontend/src/store/modules/permission.js +++ b/frontend/src/store/modules/permission.js @@ -53,6 +53,7 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由 router.component = loadView(component) } } + router.name && fillMeta(router) if (router.children && router.children.length) { router.children = filterAsyncRouter(router.children) } @@ -66,6 +67,14 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由 }) } +// 后台设计时未考虑activeMenu字段 这里先前端处理一下 +export const fillMeta = (router) => { + router.name.includes('system-user-form') && (router.meta.activeMenu = '/system/user') + router.name.includes('system-role-form') && (router.meta.activeMenu = '/system/role') + router.name.includes('system-dept-form') && (router.meta.activeMenu = '/system/dept') + // return router +} + // 包装一层父级目录 export const decorate = (router) => { const parent = { diff --git a/frontend/src/views/dataset/data/ViewTable.vue b/frontend/src/views/dataset/data/ViewTable.vue index 4f24f2e784..ee41a2b5af 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -1,5 +1,6 @@