diff --git a/backend/src/main/resources/db/migration/V38__1.13.sql b/backend/src/main/resources/db/migration/V38__1.13.sql index 5d3e9f0ba5..82eb9a14dd 100644 --- a/backend/src/main/resources/db/migration/V38__1.13.sql +++ b/backend/src/main/resources/db/migration/V38__1.13.sql @@ -66,7 +66,7 @@ update area_mapping_global set county_code = concat('156', county_code); COMMIT; -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (202, 0, 0, 1, '模板市场', 'template-market', 'panel/templateMarket/index', 7, 'dashboard', '/templateMarket', 0, 0, 0, null, NULL, NULL, NULL, 1620444227389); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (202, 0, 0, 1, '模板市场', 'template-market', 'panel/templateMarket/index', 5, 'dashboard', '/templateMarket', 0, 0, 0, null, NULL, NULL, NULL, 1620444227389); INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateAccessKey', 'dataease', 'text', NULL); INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('basic.templateMarketUlr', 'https://dataease.io/templates', 'text', 4); diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico index 3bfb47b230..ffc2c831b5 100644 Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ diff --git a/frontend/src/api/templateMarket/index.js b/frontend/src/api/templateMarket/index.js index 74534221d3..56e34cce8d 100644 --- a/frontend/src/api/templateMarket/index.js +++ b/frontend/src/api/templateMarket/index.js @@ -15,6 +15,6 @@ export function getCategories() { url: '/template/market/categories', method: 'get', hideMsg: true, - loading: false + loading: true }) } diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 56b45d5e42..ef5975f605 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -128,6 +128,8 @@ import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import PluginCom from '@/views/system/plugin/PluginCom' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import { viewPropsSave } from '@/api/chart/chart' +import { checkAddHttp } from '@/utils/urlUtils' + export default { name: 'UserView', components: { LabelNormalText, PluginCom, ChartComponentS2, EditBarView, ChartComponent, TableNormal, LabelNormal, DrillPath, ChartComponentG2 }, @@ -678,7 +680,8 @@ export default { } } else { const colList = [...param.dimensionList, ...param.quotaList] - const url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList) + let url = this.setIdValueTrans('id', 'value', jumpInfo.content, colList) + url = checkAddHttp(url) window.open(url, jumpInfo.jumpType) } } else { diff --git a/frontend/src/icons/svg/no_result.svg b/frontend/src/icons/svg/no_result.svg new file mode 100644 index 0000000000..78a9df2c8f --- /dev/null +++ b/frontend/src/icons/svg/no_result.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 601ede8cb5..fd02cbac02 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -131,6 +131,7 @@ export default { default_login: 'Normal' }, commons: { + no_result: 'No Result', manage_member: 'Managing members', user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?', confirm_remove_cancel: 'Are you sure to delete the role?', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 80e5737eb0..8bc3716a97 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -131,6 +131,7 @@ export default { default_login: '普通登錄' }, commons: { + no_result: '没有找到相关内容', manage_member: '管理成員', user_confirm_remove_cancel: '確定將該用戶從角色中移除嗎?', confirm_remove_cancel: '確定刪除該角色嗎?', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 36c5806397..cb557a7e8e 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -131,6 +131,7 @@ export default { default_login: '普通登录' }, commons: { + no_result: '没有找到相关内容', manage_member: '管理成员', confirm_remove_cancel: '确定删除该角色吗?', user_confirm_remove_cancel: '确定将该用户从角色中移除吗?', diff --git a/frontend/src/views/panel/LinkJumpSet/index.vue b/frontend/src/views/panel/LinkJumpSet/index.vue index b05ea27d76..e64f89b917 100644 --- a/frontend/src/views/panel/LinkJumpSet/index.vue +++ b/frontend/src/views/panel/LinkJumpSet/index.vue @@ -236,7 +236,6 @@ import { queryPanelJumpInfo, queryWithViewId, updateJumpSet } from '@/api/panel/ import { groupTree } from '@/api/panel/panel' import { detailList } from '@/api/panel/panelView' import { mapState } from 'vuex' -import { checkAddHttp } from '@/utils/urlUtils' import draggable from 'vuedraggable' import { codemirror } from 'vue-codemirror' @@ -397,7 +396,6 @@ export default { }, save() { this.codemirrorShow = false - this.linkJumpInfo.content = checkAddHttp(this.linkJumpInfo.content) this.linkJumpInfoArray.forEach(jumpInfo => { jumpInfo.content = this.setNameIdTrans('sourceFieldName', 'sourceFieldId', jumpInfo.content) }) diff --git a/frontend/src/views/panel/templateMarket/component/MarketPreview.vue b/frontend/src/views/panel/templateMarket/component/MarketPreview.vue index 546e06ace3..c27648e5b1 100644 --- a/frontend/src/views/panel/templateMarket/component/MarketPreview.vue +++ b/frontend/src/views/panel/templateMarket/component/MarketPreview.vue @@ -5,7 +5,7 @@ - {{$t('panel.template_preview')}} + {{ $t('panel.template_preview') }} @@ -41,12 +41,19 @@ :active="active(templateItem)" @previewTemplate="previewTemplate" /> + + + + + {{ $t('commons.no_result') }} + + {{ curTemplate.title }} - {{$t('panel.apply_this_template')}} + {{ $t('panel.apply_this_template') }} @@ -73,6 +80,7 @@ export default { }, data() { return { + hasResult: true, extFilterActive: false, asideActive: true, previewVisible: false, @@ -165,8 +173,12 @@ export default { }, initTemplateShow() { + this.hasResult = false this.currentMarketTemplateShowList.forEach(template => { template.showFlag = this.templateShow(template) + if (template.showFlag) { + this.hasResult = true + } }) }, templateShow(templateItem) { @@ -273,14 +285,15 @@ export default { } .custom-position { - height: 80vh; + height: 70vh; flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; flex-flow: row nowrap; - color: #9ea6b2; + color: #646A73; + font-weight: 400; } .aside-active { @@ -288,7 +301,7 @@ export default { height: calc(100vh - 56px); overflow-x: hidden; overflow-y: auto; - border-right: 1px solid rgba(31,31,31,0.15); + background: #fff; } .aside-inActive{ @@ -366,8 +379,9 @@ export default { } .img-main{ border-radius: 4px; - box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15); - border: solid 2px #fff; + background: #0F1114; + overflow-x: auto; + overflow-y: hidden; height: calc(100% - 50px)!important; } .open-button{ @@ -378,6 +392,11 @@ export default { top: 16px; z-index: 2; } + +//.open-button:hover{ +// transition: 0.5s; +// width: 50px; +//} .open-button:hover{ color: #3a8ee6; } diff --git a/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue b/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue index d9dbec95b0..79168ea8c2 100644 --- a/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue +++ b/frontend/src/views/panel/templateMarket/component/TemplateMarketItem.vue @@ -66,7 +66,7 @@ export default { .testcase-template { position: relative; display: inline-block; - margin: 24px 0 0 24px; + margin: 24px 0 0 0; box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15); border: solid 2px #fff; box-sizing: border-box; diff --git a/frontend/src/views/panel/templateMarket/component/TemplateMarketPreviewItem.vue b/frontend/src/views/panel/templateMarket/component/TemplateMarketPreviewItem.vue index 0e1588b8be..8ae016594f 100644 --- a/frontend/src/views/panel/templateMarket/component/TemplateMarketPreviewItem.vue +++ b/frontend/src/views/panel/templateMarket/component/TemplateMarketPreviewItem.vue @@ -78,7 +78,7 @@ export default { } .template-item-main-active{ - border: 2px solid #3370FF ; + border: 2px solid #3370FF!important; ; } .template-item-img{ @@ -106,7 +106,7 @@ export default { } .template-item-main:hover { - border: solid 2px gray; + border: solid 1px #3370FF; } diff --git a/frontend/src/views/panel/templateMarket/index.vue b/frontend/src/views/panel/templateMarket/index.vue index 09d7b88894..8f5dc9ba4f 100644 --- a/frontend/src/views/panel/templateMarket/index.vue +++ b/frontend/src/views/panel/templateMarket/index.vue @@ -17,20 +17,30 @@ - - + + - + - + + + + + {{ $t('commons.no_result') }} + + + {{ $t('panel.market_network_tips') }} @@ -72,15 +82,18 @@ import { searchMarket, getCategories } from '@/api/templateMarket' import TemplateMarketItem from '@/views/panel/templateMarket/component/TemplateMarketItem' import { groupTree, panelSave } from '@/api/panel/panel' -import bus from '@/utils/bus' import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel' import MarketPreview from '@/views/panel/templateMarket/component/MarketPreview' +import elementResizeDetectorMaker from 'element-resize-detector' export default { name: 'TemplateMarket', components: { MarketPreview, TemplateMarketItem }, data() { return { + hasResult: true, + templateMiniWidth: 350, + templateSpan: '25%', previewModel: false, previewVisible: false, templatePreviewId: '', @@ -119,6 +132,16 @@ export default { mounted() { this.initMarketTemplate() this.getGroupTree() + const _this = this + const erd = elementResizeDetectorMaker() + const templateMainDom = document.getElementById('template-main') + // 监听div变动事件 + erd.listenTo(templateMainDom, element => { + _this.$nextTick(() => { + _this.templateSpan = (100 / Math.trunc(templateMainDom.offsetWidth / _this.templateMiniWidth)) + '%' + console.log('templateSpan=' + _this.templateSpan) + }) + }) }, methods: { initMarketTemplate() { @@ -181,9 +204,16 @@ export default { }, initTemplateShow() { + let tempHasResult = false this.currentMarketTemplateShowList.forEach(template => { template.showFlag = this.templateShow(template) + if (template.showFlag) { + tempHasResult = true + } }) + if (this.currentMarketTemplateShowList.length > 0) { + this.hasResult = tempHasResult + } }, templateShow(templateItem) { let categoryMarch = false @@ -211,11 +241,13 @@ export default {