From 9041866e9c7cbc5dd1d1b61d3d47c49e0bf587b8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 23 May 2022 13:23:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?refactor:=20=E6=89=B9=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserView.vue | 10 +- frontend/src/lang/en.js | 3 + frontend/src/lang/tw.js | 3 + frontend/src/lang/zh.js | 3 + frontend/src/store/index.js | 40 +- frontend/src/views/chart/chart/util.js | 1680 ++++++++++++++++- .../component-style/LegendSelector.vue | 43 +- .../component-style/LegendSelectorAntV.vue | 41 +- .../component-style/SplitSelector.vue | 57 +- .../component-style/SplitSelectorAntV.vue | 29 +- .../component-style/TitleSelector.vue | 45 +- .../component-style/TitleSelectorAntV.vue | 41 +- .../component-style/XAxisSelector.vue | 73 +- .../component-style/XAxisSelectorAntV.vue | 66 +- .../component-style/YAxisExtSelector.vue | 93 +- .../component-style/YAxisExtSelectorAntV.vue | 65 +- .../component-style/YAxisSelector.vue | 85 +- .../component-style/YAxisSelectorAntV.vue | 65 +- .../components/shape-attr/ColorSelector.vue | 61 +- .../components/shape-attr/LabelSelector.vue | 57 +- .../shape-attr/LabelSelectorAntV.vue | 48 +- .../components/shape-attr/SizeSelector.vue | 282 ++- .../shape-attr/SizeSelectorAntV.vue | 593 +++--- .../components/shape-attr/TooltipSelector.vue | 33 +- .../shape-attr/TooltipSelectorAntV.vue | 25 +- .../chart/components/shape-attr/TotalCfg.vue | 55 +- frontend/src/views/chart/view/ChartEdit.vue | 13 +- frontend/src/views/chart/view/ChartStyle.vue | 35 +- .../views/chart/view/ChartStyleBatchSet.vue | 4 +- 29 files changed, 2819 insertions(+), 829 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index ebc89f8173..e3c931960e 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -407,17 +407,17 @@ export default { const updateParams = { 'id': this.chart.id, 'stylePriority': 'view' } if (param.custom === 'customAttr') { const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr) - sourceCustomAttr[param.property] = param.value + sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr) this.chart.customAttr = this.sourceCustomAttrStr updateParams['customAttr'] = this.sourceCustomAttrStr } else if (param.custom === 'customStyle') { const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) // view's title use history - if (param.property === 'text') { - param.value.title = sourceCustomStyle.text.title - } - sourceCustomStyle[param.property] = param.value + // if (param.property === 'text') { + // param.value.title = sourceCustomStyle.text.title + // } + sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index f3fed2f1e4..348729085a 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -2024,5 +2024,8 @@ export default { port: 'Port', user: 'User', passwd: 'Password' + }, + plugin_style: { + border: 'Border' } } diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index b94053cb9b..bb3bf25c6a 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -2035,5 +2035,8 @@ export default { port: '端口', user: '用戶名', passwd: '密碼' + }, + plugin_style: { + border: '边框' } } diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 9a2d58c1f9..bcc4f0f0ea 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -2051,5 +2051,8 @@ export default { time: '操作时间', export: '导出', search_by_key: '搜索详情' + }, + plugin_style: { + border: '边框' } } diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 98eb050ce5..b11a992a94 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -119,6 +119,7 @@ const data = { // Currently selected components curBatchOptComponents: [], mixProperties: [], + mixPropertiesInner: {}, batchOptChartInfo: null, batchOptViews: {}, // properties changed @@ -552,15 +553,6 @@ const data = { const viewBaseInfo = state.componentViewsData[id] // get properties const viewConfig = state.allViewRender.filter(item => item.render === viewBaseInfo.render && item.value === viewBaseInfo.type) - const viewProperties = viewConfig ? viewConfig[0].properties : [] - if (state.mixProperties.length > 0) { - // If it exists , taking the intersection - state.mixProperties = state.mixProperties.filter(property => viewProperties.indexOf(property) > -1) - } else { - // If it doesn't exist, assignment directly - state.mixProperties = deepCopy(viewProperties) - } - if (viewConfig && viewConfig.length > 0) { state.batchOptViews[id] = viewConfig[0] this.commit('setBatchOptChartInfo') @@ -570,16 +562,27 @@ const data = { setBatchOptChartInfo(state) { let render = null let type = null + let allTypes = '' let isPlugin = null state.mixProperties = [] + state.mixPropertiesInner = {} + let mixPropertiesTemp = [] + let mixPropertyInnerTemp = {} if (state.batchOptViews && JSON.stringify(state.batchOptViews) !== '{}') { for (const key in state.batchOptViews) { - if (state.mixProperties.length > 0) { + if (mixPropertiesTemp.length > 0) { // If it exists , taking the intersection - state.mixProperties = state.mixProperties.filter(property => state.batchOptViews[key].properties.indexOf(property) > -1) + mixPropertiesTemp = mixPropertiesTemp.filter(property => state.batchOptViews[key].properties.indexOf(property) > -1) + // 根据当前的mixPropertiesTemp 再对 mixPropertyInnerTemp 进行过滤 + mixPropertiesTemp.forEach(propertyInnerItem => { + if (mixPropertyInnerTemp[propertyInnerItem] && state.batchOptViews[key].propertyInner[propertyInnerItem]) { + mixPropertyInnerTemp[propertyInnerItem] = mixPropertyInnerTemp[propertyInnerItem].filter(propertyInnerItemValue => state.batchOptViews[key].propertyInner[propertyInnerItem].indexOf(propertyInnerItemValue) > -1) + } + }) } else { // If it doesn't exist, assignment directly - state.mixProperties = deepCopy(state.batchOptViews[key].properties) + mixPropertiesTemp = deepCopy(state.batchOptViews[key].properties) + mixPropertyInnerTemp = deepCopy(state.batchOptViews[key].propertyInner) } if (render && render !== state.batchOptViews[key].render) { @@ -588,6 +591,7 @@ const data = { render = state.batchOptViews[key].render } + allTypes = allTypes + '-' + state.batchOptViews[key].value if (type && type !== state.batchOptViews[key].value) { type = 'mix' } else { @@ -600,6 +604,16 @@ const data = { isPlugin = state.batchOptViews[key].isPlugin } } + mixPropertiesTemp.forEach(property => { + if (mixPropertyInnerTemp[property] && mixPropertyInnerTemp[property].length) { + state.mixPropertiesInner[property] = mixPropertyInnerTemp[property] + state.mixProperties.push(property) + } + }) + + // if (type && type === 'mix') { + // type = type + '-' + allTypes + // } // Assembly history settings 'customAttr' & 'customStyle' state.batchOptChartInfo = { 'mode': 'batchOpt', @@ -618,6 +632,7 @@ const data = { // Currently selected components state.curBatchOptComponents = [] state.mixProperties = [] + state.mixPropertyInnder = {} state.batchOptChartInfo = null state.batchOptViews = {} state.changeProperties = { @@ -636,6 +651,7 @@ const data = { // Currently selected components state.curBatchOptComponents = [] state.mixProperties = [] + state.mixPropertyInnder = {} state.batchOptChartInfo = null state.batchOptViews = {} state.changeProperties = { diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index 86e3662b45..13aa623460 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -38,7 +38,33 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -50,7 +76,35 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tablePageMode', + 'tablePageSize', + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -63,7 +117,37 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'total-cfg', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'total-cfg': [ + 'row', + 'col' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -75,7 +159,27 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector-ant-v': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -87,7 +191,27 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector-ant-v': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -100,7 +224,31 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'label-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'gaugeMax', + 'gaugeStartAngle', + 'gaugeEndAngle' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -113,7 +261,32 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'label-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'liquidShape', + 'liquidMax', + 'liquidSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -130,7 +303,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -147,7 +374,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { @@ -165,7 +446,60 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -175,13 +509,67 @@ export const TYPE_CONFIGS = [ icon: 'bar-stack', properties: [ 'color-selector', + 'size-selector-ant-v', 'label-selector-ant-v', 'tooltip-selector-ant-v', 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -196,7 +584,49 @@ export const TYPE_CONFIGS = [ 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -213,7 +643,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -230,9 +714,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, - { render: 'antv', category: 'chart.chart_type_distribute', @@ -246,7 +784,42 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -261,7 +834,41 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -277,7 +884,42 @@ export const TYPE_CONFIGS = [ 'split-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'radarShape', + 'radarSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -291,7 +933,37 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -303,7 +975,25 @@ export const TYPE_CONFIGS = [ 'color-selector', 'tooltip-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { @@ -321,7 +1011,59 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'scatterSymbol', + 'scatterSymbolSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -335,7 +1077,38 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, /* 下面是echarts图表类型 */ { @@ -348,7 +1121,31 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'alpha' + ], + 'size-selector': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -360,6 +1157,33 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'alpha' + ] + }, + 'size-selector': [ + 'tablePageMode', + 'tablePageSize', + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' ] }, @@ -373,7 +1197,29 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -385,7 +1231,28 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -397,8 +1264,38 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'label-selector', - 'title-selector', - ] + 'title-selector' + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'gaugeMin', + 'gaugeMax', + 'gaugeStartAngle', + 'gaugeEndAngle' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter', + 'gaugeFormatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { @@ -416,7 +1313,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -433,7 +1386,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -451,7 +1460,77 @@ export const TYPE_CONFIGS = [ 'y-axis-ext-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap', + 'lineWidth', + 'lineType', + 'lineSymbol', + 'lineSymbolSize', + 'lineArea', + 'bubble_scatterSymbol', + 'bubble_scatterSymbolSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-ext-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -469,7 +1548,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -486,7 +1621,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -503,7 +1694,64 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -520,7 +1768,65 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -536,7 +1842,49 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector': [ + 'show', + 'labelLine', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -551,7 +1899,50 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'pieInnerRadius', + 'pieOuterRadius', + 'pieRoseType', + 'pieRoseRadius' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -567,7 +1958,55 @@ export const TYPE_CONFIGS = [ 'split-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'radarShape', + 'radarSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'split-selector': [ + 'name', + 'axisLine', + 'axisLabel', + 'splitLine', + 'splitArea' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -581,7 +2020,39 @@ export const TYPE_CONFIGS = [ 'label-selector', 'tooltip-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'treemapWidth', + 'treemapHeight' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { @@ -599,7 +2070,62 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'scatterSymbol', + 'scatterSymbolSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -614,7 +2140,47 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'funnelWidth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -629,7 +2195,39 @@ export const TYPE_CONFIGS = [ 'label-selector', 'tooltip-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } } ] diff --git a/frontend/src/views/chart/components/component-style/LegendSelector.vue b/frontend/src/views/chart/components/component-style/LegendSelector.vue index 87d475e4cb..924acb2d48 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelector.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelector.vue @@ -2,12 +2,12 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} -
- - +
+ + - - + + {{ $t('chart.horizontal') }} {{ $t('chart.vertical') }} - - + + - - + + - - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_right') }} - - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_bottom') }} @@ -63,6 +63,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -117,11 +124,15 @@ export default { } this.fontSize = arr }, - changeLegendStyle() { + changeLegendStyle(modifyName) { if (!this.legendForm.show) { this.isSetting = false } + this.legendForm['modifyName'] = modifyName this.$emit('onLegendChange', this.legendForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/LegendSelectorAntV.vue b/frontend/src/views/chart/components/component-style/LegendSelectorAntV.vue index 12ceb1d4ae..642f42c542 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelectorAntV.vue @@ -2,12 +2,12 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }}
- - + + - - + + {{ $t('chart.horizontal') }} {{ $t('chart.vertical') }} - - + + - - + + - - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_right') }} - - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_bottom') }} @@ -63,6 +63,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -115,11 +122,15 @@ export default { } this.fontSize = arr }, - changeLegendStyle() { + changeLegendStyle(modifyName) { if (!this.legendForm.show) { this.isSetting = false } + this.legendForm['modifyName'] = modifyName this.$emit('onLegendChange', this.legendForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/SplitSelector.vue b/frontend/src/views/chart/components/component-style/SplitSelector.vue index 12055a69d6..446eb5a783 100644 --- a/frontend/src/views/chart/components/component-style/SplitSelector.vue +++ b/frontend/src/views/chart/components/component-style/SplitSelector.vue @@ -2,42 +2,42 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} - - + + - - + + - - {{ $t('chart.show') }} + + {{ $t('chart.show') }} - - + + - - {{ $t('chart.show') }} + + {{ $t('chart.show') }} - - + + - - + + - - {{ $t('chart.show') }} + + {{ $t('chart.show') }} - - + + - - {{ $t('chart.show') }} + + {{ $t('chart.show') }} @@ -57,6 +57,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -105,11 +112,15 @@ export default { } this.fontSize = arr }, - changeSplitStyle() { + changeSplitStyle(modifyName) { if (!this.splitForm.show) { this.isSetting = false } + this.splitForm['modifyName'] = modifyName this.$emit('onChangeSplitForm', this.splitForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/SplitSelectorAntV.vue b/frontend/src/views/chart/components/component-style/SplitSelectorAntV.vue index 69ad6ae232..1494cdcc9d 100644 --- a/frontend/src/views/chart/components/component-style/SplitSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/SplitSelectorAntV.vue @@ -2,22 +2,22 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} - - + + - - + + - - + + @@ -57,6 +57,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -105,11 +112,15 @@ export default { } this.fontSize = arr }, - changeSplitStyle() { + changeSplitStyle(modifyName) { if (!this.splitForm.show) { this.isSetting = false } + this.splitForm['modifyName'] = modifyName this.$emit('onChangeSplitForm', this.splitForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index 7afa56d139..e2132d11a8 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -2,45 +2,45 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} -
- +
+ - - + + - - + + - - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_right') }} - - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_bottom') }} - - {{ $t('chart.italic') }} - {{ $t('chart.bolder') }} + + {{ $t('chart.italic') }} + {{ $t('chart.bolder') }}
@@ -63,6 +63,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -117,7 +124,7 @@ export default { } this.fontSize = arr }, - changeTitleStyle() { + changeTitleStyle(modifyName) { if (!this.batchOptStatus) { if (this.titleForm.title.length < 1) { this.$error(this.$t('chart.title_cannot_empty')) @@ -133,10 +140,14 @@ export default { if (!this.titleForm.show) { this.isSetting = false } + this.titleForm['modifyName'] = modifyName this.$emit('onTextChange', this.titleForm) }, inputOnInput: function(e) { this.$forceUpdate() + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue b/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue index 6d0d320d64..47c0119534 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelectorAntV.vue @@ -2,38 +2,38 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} -
- +
+ - - + + - - + + - - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_center') }} {{ $t('chart.text_pos_right') }} - - {{ $t('chart.italic') }} - {{ $t('chart.bolder') }} + + {{ $t('chart.italic') }} + {{ $t('chart.bolder') }}
@@ -56,6 +56,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -110,7 +117,7 @@ export default { } this.fontSize = arr }, - changeTitleStyle() { + changeTitleStyle(modifyName) { if (!this.batchOptStatus) { if (this.titleForm.title.length < 1) { this.$error(this.$t('chart.title_cannot_empty')) @@ -123,10 +130,14 @@ export default { return } } + this.titleForm['modifyName'] = modifyName this.$emit('onTextChange', this.titleForm) }, inputOnInput: function(e) { this.$forceUpdate() + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/XAxisSelector.vue b/frontend/src/views/chart/components/component-style/XAxisSelector.vue index e47a232526..07c4f5e6d7 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelector.vue @@ -2,28 +2,28 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }}
- - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_bottom') }} - - + + - - + + - - + + - + @@ -39,33 +39,33 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - + - + - + - - {{ $t('chart.axis_show') }} + + {{ $t('chart.axis_show') }} - + - + - + - + {{ $t('chart.axis_type_solid') }} {{ $t('chart.axis_type_dashed') }} {{ $t('chart.axis_type_dotted') }} @@ -73,25 +73,25 @@ - - {{ $t('chart.axis_label_show') }} + + {{ $t('chart.axis_label_show') }} - + - + - + - + - - - + + +
@@ -112,6 +112,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -167,11 +174,15 @@ export default { } this.fontSize = arr }, - changeXAxisStyle() { + changeXAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeXAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue index 26a0e70bb4..c8361fe754 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue @@ -2,28 +2,28 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }}
- - + + {{ $t('chart.text_pos_top') }} {{ $t('chart.text_pos_bottom') }} - - + + - - + + - - + + - + @@ -39,45 +39,45 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - + - + - + - - {{ $t('chart.axis_show') }} + + {{ $t('chart.axis_show') }} - + - + - + - - {{ $t('chart.axis_label_show') }} + + {{ $t('chart.axis_label_show') }} - + - + - + - + @@ -101,6 +101,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -156,7 +163,7 @@ export default { } this.fontSize = arr }, - changeXAxisStyle() { + changeXAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } @@ -167,8 +174,13 @@ export default { }) return } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeXAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } + } } diff --git a/frontend/src/views/chart/components/component-style/YAxisExtSelector.vue b/frontend/src/views/chart/components/component-style/YAxisExtSelector.vue index 8d8e3564d8..07cf585398 100644 --- a/frontend/src/views/chart/components/component-style/YAxisExtSelector.vue +++ b/frontend/src/views/chart/components/component-style/YAxisExtSelector.vue @@ -2,30 +2,30 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} -
- - +
+ + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_right') }} - + - - + + - - + + - + - + {{ $t('chart.axis_value') }} @@ -39,59 +39,59 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - - + + - - + + - - + + - - - {{ $t('chart.axis_show') }} + + + {{ $t('chart.axis_show') }} - - + + - - + + - - + + {{ $t('chart.axis_type_solid') }} {{ $t('chart.axis_type_dashed') }} {{ $t('chart.axis_type_dotted') }} - - - {{ $t('chart.axis_label_show') }} + + + {{ $t('chart.axis_label_show') }} - - - + + + - + - - + + - - - + + +
@@ -112,6 +112,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -170,11 +177,15 @@ export default { } this.fontSize = arr }, - changeYAxisStyle() { + changeYAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeYAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue index 602f3173b5..dd7a67f486 100644 --- a/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue @@ -2,28 +2,28 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }}
- - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_right') }} - - + + - - + + - - + + - + @@ -39,45 +39,45 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - + - + - + - - {{ $t('chart.axis_show') }} + + {{ $t('chart.axis_show') }} - + - + - + - - {{ $t('chart.axis_label_show') }} + + {{ $t('chart.axis_label_show') }} - + - + - + - + @@ -101,6 +101,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -159,7 +166,7 @@ export default { } this.fontSize = arr }, - changeYAxisStyle() { + changeYAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } @@ -170,7 +177,11 @@ export default { }) return } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeYAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/YAxisSelector.vue b/frontend/src/views/chart/components/component-style/YAxisSelector.vue index 9530e3ad09..122643654f 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelector.vue @@ -2,28 +2,28 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }} -
- - +
+ + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_right') }} - - + + - - + + - - + + - + @@ -39,59 +39,59 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - + - + - + - - {{ $t('chart.axis_show') }} + + {{ $t('chart.axis_show') }} - - + + - - + + - - + + {{ $t('chart.axis_type_solid') }} {{ $t('chart.axis_type_dashed') }} {{ $t('chart.axis_type_dotted') }} - - - {{ $t('chart.axis_label_show') }} + + + {{ $t('chart.axis_label_show') }} - - + + - - + + - - + + - - - + + +
@@ -112,6 +112,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -167,11 +174,15 @@ export default { } this.fontSize = arr }, - changeYAxisStyle() { + changeYAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeYAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue index ae83346a3c..0ea4ec660d 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue @@ -2,28 +2,28 @@
- - {{ $t('chart.show') }} + + {{ $t('chart.show') }}
- - + + {{ $t('chart.text_pos_left') }} {{ $t('chart.text_pos_right') }} - - + + - - + + - - + + - + @@ -39,14 +39,14 @@ - {{ $t('chart.axis_auto') }} + {{ $t('chart.axis_auto') }} - + - + @@ -60,35 +60,35 @@ - + - - {{ $t('chart.axis_show') }} + + {{ $t('chart.axis_show') }} - + - + - + - - {{ $t('chart.axis_label_show') }} + + {{ $t('chart.axis_label_show') }} - + - + - + - + @@ -112,6 +112,13 @@ export default { chart: { type: Object, required: true + }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } } }, data() { @@ -167,7 +174,7 @@ export default { } this.fontSize = arr }, - changeYAxisStyle() { + changeYAxisStyle(modifyName) { if (!this.axisForm.show) { this.isSetting = false } @@ -178,7 +185,11 @@ export default { }) return } + this.axisForm['modifyName'] = modifyName this.$emit('onChangeYAxisForm', this.axisForm) + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index 62cac156ee..08293c58b9 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -2,8 +2,8 @@
-
- +
+
{{ $t('chart.system_case') }} - +
@@ -45,34 +45,34 @@ - - + + - - + +
-
- - +
+ + - - + + - - + + - - + + - +
- - + + @@ -93,6 +93,13 @@ export default { type: Object, required: true }, + propertyInner: { + type: Array, + required: false, + default: function() { + return [] + } + }, sourceType: { type: String, default: 'view', @@ -206,7 +213,7 @@ export default { this.init() }, methods: { - changeColorOption() { + changeColorOption(modifyName = 'value') { const that = this const items = this.colorCases.filter(ele => { return ele.value === that.colorForm.value @@ -220,9 +227,12 @@ export default { this.customColor = this.colorForm.colors[0] this.colorIndex = 0 - this.changeColorCase() + this.changeColorCase(modifyName) }, - changeColorCase() { + changeColorCase(modifyName) { + this.colorForm['modifyName'] = modifyName + this.$emit('onColorChange', this.colorForm) + this.colorForm['modifyName'] = 'colors' this.$emit('onColorChange', this.colorForm) // this.customColor = null // this.colorIndex = 0 @@ -253,11 +263,16 @@ export default { }, switchColorCase() { this.colorForm.colors[this.colorIndex] = this.customColor + this.colorForm['modifyName'] = 'value' + this.$emit('onColorChange', this.colorForm) + this.colorForm['modifyName'] = 'colors' this.$emit('onColorChange', this.colorForm) }, - resetCustomColor() { this.changeColorOption() + }, + showProperty(property) { + return this.propertyInner.includes(property) } } } diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue index 9b1d2645bc..7724de194e 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue @@ -1,28 +1,28 @@