diff --git a/core/core-backend/src/main/resources/db/desktop/V2.1__ddl.sql b/core/core-backend/src/main/resources/db/desktop/V2.1__ddl.sql index 22285c1330..3c819f9ae5 100644 --- a/core/core-backend/src/main/resources/db/desktop/V2.1__ddl.sql +++ b/core/core-backend/src/main/resources/db/desktop/V2.1__ddl.sql @@ -18,7 +18,7 @@ CREATE TABLE `visualization_template` ( BEGIN; INSERT INTO `core_menu` -VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 0, 1, 1); +VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 1, 1, 0); INSERT INTO `core_menu` VALUES (20, 15, 2, 'template-setting', 'system/template-setting', 4, 'icon_template', '/template-setting', 0, 1, 1); COMMIT; diff --git a/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql index b0130ce270..7919b0ebd3 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql @@ -20,7 +20,7 @@ CREATE TABLE `visualization_template` BEGIN; INSERT INTO `core_menu` -VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 0, 1, 1); +VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 1, 1, 0); INSERT INTO `core_menu` VALUES (20, 15, 2, 'template-setting', 'system/template-setting', 4, 'icon_template', '/template-setting', 0, 1, 1); COMMIT; diff --git a/core/core-frontend/src/views/system/template-setting/index.vue b/core/core-frontend/src/views/system/template-setting/index.vue index f017a2ebf1..94094b9119 100644 --- a/core/core-frontend/src/views/system/template-setting/index.vue +++ b/core/core-frontend/src/views/system/template-setting/index.vue @@ -1,10 +1,5 @@ - 模版管理 - - - - - + - - diff --git a/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue b/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue index 3d7fc30f82..a3cd07082b 100644 --- a/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue +++ b/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue @@ -9,12 +9,11 @@ - - {{ - t('visualization.template_preview') - }} - 预览 - + {{ + t('visualization.template_preview') + }} + 预览 + @@ -571,9 +570,13 @@ onMounted(() => { } .custom-breadcrumb-item { + font-size: 14px; cursor: pointer; - ::v-deep(.ed-breadcrumb__inner) { - color: rgba(100, 106, 115, 1); - } + color: rgba(100, 106, 115, 1); +} + +.custom-breadcrumb-item-to { + font-size: 14px; + color: rgba(31, 35, 41, 1); } diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue index 65bf6baed3..375174ae81 100644 --- a/core/core-frontend/src/views/template-market/index.vue +++ b/core/core-frontend/src/views/template-market/index.vue @@ -55,11 +55,21 @@ id="template-show-area" class="template-right" > + + + {{ + state.marketActiveTab + }} + {{ state.marketActiveTab }} + 的搜索结果是{{ searchResultCount }}个 + import { getCategoriesObject, searchMarket } from '@/api/templateMarket' import elementResizeDetectorMaker from 'element-resize-detector' -import { nextTick, reactive, watch, onMounted, ref } from 'vue' +import { nextTick, reactive, watch, onMounted, ref, computed } from 'vue' import { useI18n } from '@/hooks/web/useI18n' import { ElMessage } from 'element-plus-secondary' import { decompression } from '@/api/visualization/dataVisualization' @@ -180,6 +190,11 @@ watch( initTemplateShow() } ) + +const searchResultCount = computed( + () => state.currentMarketTemplateShowList.filter(template => template.showFlag).length +) + const nodeClick = data => { state.marketActiveTab = data.label initTemplateShow() @@ -317,10 +332,10 @@ onMounted(() => { if (templateMainDom) { erd.listenTo(templateMainDom, element => { nextTick(() => { - const curSeparator = Math.trunc(templateMainDom.offsetWidth / state.templateMiniWidth) - state.templateSpan = - 100 / Math.trunc(templateMainDom.offsetWidth / state.templateMiniWidth) + '%' - state.templateCurWidth = Math.trunc(templateMainDom.offsetWidth / curSeparator) - 33 + const offsetWidth = templateMainDom.offsetWidth - 26 + const curSeparator = Math.trunc(offsetWidth / state.templateMiniWidth) + state.templateSpan = 100 / Math.trunc(offsetWidth / state.templateMiniWidth) + '%' + state.templateCurWidth = Math.trunc(offsetWidth / curSeparator) - 33 }) }) } @@ -380,10 +395,11 @@ const previewInit = () => { } .template-right { flex: 1; - display: inherit; + display: inline; height: 100%; background: rgba(239, 240, 241, 1); overflow-y: auto; + padding: 16px 12px; } .template-empty { @@ -398,6 +414,41 @@ const previewInit = () => { } } } + +.main-head { + width: 100%; + float: left; + height: 24px; + display: inline; + .custom-split-line { + margin: 4px 8px 0 12px; + width: 2px; + height: 16px; + background: rgba(51, 112, 255, 1); + float: left; + } + .custom-category { + float: left; + font-weight: 500; + font-size: 16px; + color: rgba(31, 35, 41, 1); + } + .custom-search { + float: left; + font-weight: 500; + font-size: 16px; + color: rgba(51, 112, 255, 1); + margin-right: 8px; + } + + .custom-search-result { + float: left; + font-weight: 500; + font-size: 16px; + color: rgba(31, 35, 41, 1); + margin-right: 8px; + } +} diff --git a/core/core-frontend/src/views/template/index.vue b/core/core-frontend/src/views/template/index.vue index 97f85baaef..f869455626 100644 --- a/core/core-frontend/src/views/template/index.vue +++ b/core/core-frontend/src/views/template/index.vue @@ -1,88 +1,111 @@ - - - - - - - - - {{ state.currentTemplateLabel }} ({{ state.currentTemplateShowList.length }}) - - {{ t('visualization.import') }} - - - - - handleCommand(key, item)" - /> + + 模版管理 + + {{ t('visualization.import') }} + + + + + + + + + + + + + + + + + + + + {{ state.currentTemplateLabel }} ({{ + state.currentTemplateShowList.length + }}) + + {{ state.currentTemplateLabel }} + 的搜索结果 {{ currentTemplateShowListComputed.length }} 个 + + + + + handleCommand(key, item)" + /> + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - @@ -118,6 +141,7 @@ const roleValidator = (rule, value, callback) => { } const state = reactive({ + templateFilterText: '', showShare: false, currentTemplateShowList: [], noneImg: '@/assets/None.png', @@ -145,8 +169,8 @@ const state = reactive({ currentTemplateLabel: '', currentTemplateId: '', templateList: [], - templateMiniWidth: 286, - templateCurWidth: 286, + templateMiniWidth: 256, + templateCurWidth: 256, formType: '', originName: '', templateDialog: { @@ -156,6 +180,13 @@ const state = reactive({ } }) +const currentTemplateShowListComputed = computed(() => { + if (!state.templateFilterText) return [...state.currentTemplateShowList] + return state.currentTemplateShowList.filter(ele => + ele['name']?.includes(state.templateFilterText) + ) +}) + const nameList = computed(() => { const { nodeType } = state.templateEditForm || {} if (nodeType === 'template') { @@ -168,6 +199,18 @@ const nameList = computed(() => { return [] }) +const initStyle = () => { + nextTick(() => { + const tree = document.querySelector('.ed-tree') + // 创建横线元素 + const line = document.createElement('hr') + line.classList.add('custom-line') + + // 将横线元素插入到第一个选项后面 + tree.firstElementChild.appendChild(line) + }) +} + const nameRepeat = value => { if (!nameList.value) { return false @@ -334,11 +377,12 @@ onMounted(() => { // 监听div变动事件 erd.listenTo(templateMainDom, element => { nextTick(() => { - const curSeparator = Math.trunc(templateMainDom.offsetWidth / state.templateMiniWidth) - state.templateCurWidth = - Math.trunc(templateMainDom.offsetWidth / curSeparator) - 24 - curSeparator + const offsetWidth = templateMainDom.offsetWidth - 24 + const curSeparator = Math.trunc(offsetWidth / state.templateMiniWidth) + state.templateCurWidth = Math.trunc(offsetWidth / curSeparator) - 24 - curSeparator }) }) + initStyle() }) @@ -364,9 +408,8 @@ onMounted(() => { .de-tabs-right { flex: 1; - background: #fff; - padding: 24px 0 24px 24px; overflow: hidden; + background: rgba(239, 240, 241, 1); .template-box { display: flex; @@ -376,12 +419,12 @@ onMounted(() => { align-content: flex-start; height: calc(100% - 10px); width: 100%; - padding-bottom: 24px; + padding: 16px 0px 16px 24px; } .active-template { - margin: 4px 0 20px 0; - padding-right: 24px; + height: 56px; + padding: 0px 24px; font-family: 'PingFang SC'; font-style: normal; font-weight: 500; @@ -389,8 +432,45 @@ onMounted(() => { display: flex; align-items: center; justify-content: space-between; - color: var(--deTextPrimary, #1f2329); + color: rgba(31, 35, 41, 1); + background: #fff; + border-bottom: 1px solid rgba(31, 35, 41, 0.15); } } } + +.router-title { + color: #1f2329; + font-feature-settings: 'clig' off, 'liga' off; + font-family: PingFang SC; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: 28px; + float: left; +} +.sys-setting-p { + width: 100%; + background: #ffffff; + height: calc(100vh - 136px); + box-sizing: border-box; + margin-top: 12px; +} +.setting-auto-h { + height: auto !important; +} + +.container-sys-param { + height: 100%; + overflow-y: auto; +} + +.template-head { + height: 32px; +} +.template-search-class { + float: right; + width: 320px; + margin-right: 12px; +} diff --git a/pom.xml b/pom.xml index c856156989..90b930b54e 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.5.3.1 1.4.199 4.1.0 - 1.36.0 + 1.35.1 2.6.0 3.5.2 3.12.1 diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartCustomFilterItemDTO.java b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartCustomFilterItemDTO.java index 27a6e049aa..cdf0fbeeb3 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartCustomFilterItemDTO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartCustomFilterItemDTO.java @@ -1,5 +1,7 @@ package io.dataease.api.chart.dto; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import java.io.Serializable; @@ -9,6 +11,7 @@ import java.io.Serializable; */ @Data public class ChartCustomFilterItemDTO implements Serializable { + @JsonSerialize(using = ToStringSerializer.class) private Long fieldId; private String term; private String value; diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartQuotaDTO.java b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartQuotaDTO.java index ea3cd12391..fafe973ef9 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartQuotaDTO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartQuotaDTO.java @@ -1,5 +1,7 @@ package io.dataease.api.chart.dto; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; /** @@ -7,5 +9,6 @@ import lombok.Data; */ @Data public class ChartQuotaDTO { + @JsonSerialize(using = ToStringSerializer.class) private Long id; }
模版管理