From 67583af34079976b8eb9679e4352812ebac6225a Mon Sep 17 00:00:00 2001 From: "zhu.yawen" Date: Thu, 21 Sep 2023 15:14:23 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B93D=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=9F=B1=E7=8A=B6=E5=9B=BE=E6=95=B0=E6=8D=AE=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Echarts/3D图/3D基础柱状图.js | 104 +++++++++---- data-room-ui/packages/EchartsRender/index.vue | 140 ++++-------------- 2 files changed, 104 insertions(+), 140 deletions(-) diff --git a/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js b/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js index 8e30b265..73334756 100644 --- a/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js +++ b/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js @@ -1,4 +1,3 @@ -import * as echarts from 'echarts' // 配置版本号 const version = '2023091901' // 标题 @@ -65,7 +64,16 @@ const setting = [ groupName: 'graph' }, { - label: '柱子背景顶部颜色', + label: '阴影柱子颜色', + type: 'colorPicker', // 设置组件类型 + field: 'seriesCustom_shadowColor', // 字段 + optionField: 'seriesCustom.shadowColor', // 对应options中的字段 + value: '#041133', + tabName: 'custom', + groupName: 'graph' + }, + { + label: '阴影柱子顶部颜色', type: 'colorPicker', // 设置组件类型 field: 'seriesCustom_shadowTopColor', // 字段 optionField: 'seriesCustom.shadowTopColor', // 对应options中的字段 @@ -74,25 +82,62 @@ const setting = [ groupName: 'graph' }, { - label: '阴影柱子颜色', + label: '数据标签', + type: 'switch', // 设置组件类型 + field: 'series_barColor_label_show', // 字段 + optionField: 'series.barColor.label.show', // 对应options中的字段 + value: 0, + active: 1, + inactive: 0, + tabName: 'custom', + groupName: 'graph' + }, + { + label: '数据标签位置', + type: 'select', // 设置组件类型 + field: 'series_barColor_label_position', // 字段 + optionField: 'series.barColor.label.position', // 对应options中的字段 + // 是否多选 + multiple: false, + value: 'inside', + tabName: 'custom', + options: [ + { + label: '顶部', + value: 'top' + }, + { + label: '居中', + value: 'inside' + }, + { + label: '底部', + value: 'bottom' + } + ], + groupName: 'graph' + }, + { + label: '数据标签颜色', type: 'colorPicker', // 设置组件类型 - field: 'seriesCustom_shadowColor', // 字段 - optionField: 'seriesCustom.shadowColor', // 对应options中的字段 - value: '#041133', + field: 'series_barColor_label_color', // 字段 + optionField: 'series.barColor.label.color', // 对应options中的字段 + value: '#ffffff', + tabName: 'custom', + groupName: 'graph' + }, + { + label: '数据标签大小', + // 设置组件类型 + type: 'inputNumber', + // 字段 + field: 'series_barColor_label_fontSize', + // 对应options中的字段 + optionField: 'series.barColor.label.fontSize', + value: 12, tabName: 'custom', groupName: 'graph' }, - // { - // label: '数据标签', - // type: 'switch', // 设置组件类型 - // field: 'label_style_opacity', // 字段 - // // optionField: 'series', // 对应options中的字段 - // value: 0, - // active: 1, - // inactive: 0, - // tabName: 'custom', - // groupName: 'graph' - // }, // x轴 xAxis { label: '显示', @@ -509,13 +554,7 @@ const option = { symbolPosition: 'end', z: 12, label: { - normal: { - show: false, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } + show: false }, color: '#2DB1EF', tooltip: { @@ -536,6 +575,9 @@ const option = { tooltip: { show: false }, + label: { + show: false + }, data: yData }, // 柱子 @@ -562,6 +604,12 @@ const option = { // shadowBlur: 0 // 阴影模糊值 // } // }, + label: { + show: true, + position: 'inside', + color: '#fff', + fontSize: 12 + }, data: yData }, // 阴影柱子 @@ -597,13 +645,7 @@ const option = { symbolPosition: 'end', z: 12, label: { - normal: { - show: false, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } + show: false }, color: '#142f5a', tooltip: { diff --git a/data-room-ui/packages/EchartsRender/index.vue b/data-room-ui/packages/EchartsRender/index.vue index 5989be20..9b36211b 100644 --- a/data-room-ui/packages/EchartsRender/index.vue +++ b/data-room-ui/packages/EchartsRender/index.vue @@ -75,7 +75,6 @@ export default { 'config.w': { handler (val) { if (val) { - // console.log('this.config',this.config); const chartDom = document.getElementById(this.chatId) this.observeChart(chartDom, this.chart, this.config.option) } @@ -195,6 +194,30 @@ export default { option = option[field] } }) + } else if (optionField[0] === 'series') { + // 存储要修改的series对象 + let changeObject = {} + // 存储改变后的series对象 + let changedObject = {} + optionField.forEach((field, index) => { + if (index === 0) { + option = option[field] + } else if (index === 1) { + // 根据id找到对应的type + changeObject = option.find(obj => obj.id === field) + changedObject = changeObject + option = option.filter(obj => obj.id !== field) + } else if (index === optionField.length - 1) { + // 数据配置时,必须有值才更新 + if ((set.tabName === type && type === 'data' && set.value) || (set.tabName === type && type === 'custom')) { + changeObject[field] = set.value + } + } else { + changeObject = changeObject[field] + } + }) + changeObject = { ...changeObject, ...changedObject } + option.push(changeObject) } else { optionField.forEach((field, index) => { if (index === optionField.length - 1) { @@ -213,7 +236,6 @@ export default { return config }, dataFormatting (config, data) { - console.log('dataFormatting') // 数据返回成功则赋值 if (data.success) { data = data.data @@ -257,15 +279,12 @@ export default { }, // 格式化echarts的配置 echartsOptionFormatting (config, data) { - console.log('echartsOptionFormatting'); const option = config.option // 分组字段 const xField = config.setting.find(item => item.optionField === 'xField')?.value const yField = config.setting.find(item => item.optionField === 'yField')?.value const hasSeries = config.setting.find(item => item.optionField === 'seriesField' && item.value !== '') const { xData, yData } = this.getxDataAndYData(xField, yField, data, hasSeries) - // const xData = [...new Set(data.map(item => item[xField]))] - // const yData = data.map(item => item[yField]) const maxY = Math.max(...yData) + Math.max(...yData) * 0.2 // 生成阴影柱子的值 const shadowData = Array.from({ length: xData.length }, () => maxY) @@ -393,110 +412,14 @@ export default { option.series.push(...seriesItem) } } else { - option.series = [ - { - id: 'barTopColor', // 用于区分是图表的什么部分 - type: 'pictorialBar', // 象形柱图 - symbol: 'diamond', - symbolOffset: [0, '-50%'], // 上部菱形 - symbolSize: [30, 15], - // symbolOffset: [0, -6], // 上部椭圆 - symbolPosition: 'end', - z: 12, - label: { - normal: { - show: true, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } - }, - color: option.seriesCustom.barTopColor, - data: yData - }, - { - id: 'barBottomColor', // 用于区分是图表的什么部分 - type: 'pictorialBar', - symbol: 'diamond', - symbolSize: [30, 15], - symbolOffset: ['0%', '50%'], // 下部菱形 - // symbolOffset: [0, 7], // 下部椭圆 - z: 12, - color: option.seriesCustom.barBottomColor, - data: yData - }, - { - id: 'barColor', // 用于区分是图表的什么部分 - type: 'bar', - barWidth: 30, - z: 10, - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: option.seriesCustom.barColor1 - }, - { - offset: 1, - color: option.seriesCustom.barColor2 - } - ]), - opacity: 0.8, - shadowColor: 'rgba(0, 0, 0, 0.5)', // 阴影颜色 - shadowBlur: 0 // 阴影模糊值 - } - }, - data: yData - }, - { - id: 'shadowColor', // 用于区分是图表的什么部分 - type: 'bar', - barWidth: 30, - xAxisIndex: 1, - itemStyle: { - normal: { - color: option.seriesCustom.shadowColor, - opacity: 0.8, - shadowColor: 'rgba(0, 0, 0, 0.5)', // 阴影颜色 - shadowBlur: 0 // 阴影模糊值 - } - }, - label: { - show: false - }, - tooltip: { - show: false - }, - data: shadowData - }, - { - id: 'shadowTopColor', // 用于区分是图表的什么部分 - type: 'pictorialBar', // 象形柱图 - xAxisIndex: 1, - symbol: 'diamond', - symbolOffset: [0, '-50%'], // 上部菱形 - symbolSize: [30, 15], - // symbolOffset: [0, -6], // 上部椭圆 - symbolPosition: 'end', - z: 12, - label: { - normal: { - show: false, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } - }, - color: option.seriesCustom.shadowTopColor, - tooltip: { - show: false - }, - data: shadowData + // 没有分组,不需要修改配置,直接修改series中每个对象的series + option.series.forEach(item => { + if (item.id.includes('shadow')) { + item.data = shadowData + } else { + item.data = yData } - ] + }) } return option }, @@ -542,7 +465,6 @@ export default { }, // 组件的样式改变,返回改变后的config changeStyle (config, isUpdateTheme) { - console.log('changeStyle'); config = { ...this.config, ...config } config = this.transformSettingToOption(config, 'custom') // 这里定义了option和setting是为了保证在执行eval时,optionHandler、dataHandler里面可能会用到, From 0831e6dd8f09a5d0da202469f5bfa2fe264cd421 Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Thu, 21 Sep 2023 15:18:20 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化大屏预览数据处理 --- .../manage/service/impl/DataRoomPagePreviewServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/manage/service/impl/DataRoomPagePreviewServiceImpl.java b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/manage/service/impl/DataRoomPagePreviewServiceImpl.java index 1448abeb..8cd8b082 100644 --- a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/manage/service/impl/DataRoomPagePreviewServiceImpl.java +++ b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/manage/service/impl/DataRoomPagePreviewServiceImpl.java @@ -6,6 +6,7 @@ import com.gccloud.common.exception.GlobalException; import com.gccloud.common.utils.BeanConvertUtils; import com.gccloud.dataroom.core.module.basic.dao.DataRoomPagePreviewDao; import com.gccloud.dataroom.core.module.basic.entity.PagePreviewEntity; +import com.gccloud.dataroom.core.module.chart.bean.Chart; import com.gccloud.dataroom.core.module.manage.dto.DataRoomPageDTO; import com.gccloud.dataroom.core.module.manage.service.IDataRoomPagePreviewService; import com.gccloud.dataroom.core.utils.CodeGenerateUtils; @@ -32,6 +33,7 @@ public class DataRoomPagePreviewServiceImpl extends ServiceImpl Date: Thu, 21 Sep 2023 15:56:31 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feat:3D=E5=9F=BA=E7=A1=80=E6=9F=B1=E7=8A=B6?= =?UTF-8?q?=E5=9B=BE=E6=B7=BB=E5=8A=A0=E7=BD=91=E6=A0=BC=E7=BA=BF=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Echarts/3D图/3D基础柱状图.js | 76 ++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js b/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js index 73334756..72a8a45e 100644 --- a/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js +++ b/data-room-ui/packages/Echarts/3D图/3D基础柱状图.js @@ -138,6 +138,36 @@ const setting = [ tabName: 'custom', groupName: 'graph' }, + // 网格线 + { + label: '分隔线', + type: 'switch', + field: 'yAxis_splitLine_show', + optionField: 'yAxis.splitLine.show', + value: 0, + active: 1, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, + { + label: '宽度', + type: 'inputNumber', + field: 'yAxis_splitLine_lineStyle_width', + optionField: 'yAxis.splitLine.lineStyle.width', + value: 2, + tabName: 'custom', + groupName: 'grid' + }, + { + label: '颜色', + type: 'colorPicker', + field: 'yAxis_splitLine_lineStyle_color', + optionField: 'yAxis.splitLine.lineStyle.color', + value: '#fff', + tabName: 'custom', + groupName: 'grid' + }, // x轴 xAxis { label: '显示', @@ -297,6 +327,39 @@ const setting = [ tabName: 'custom', groupName: 'yAxis' }, + { + label: '刻度显示', + type: 'switch', + field: 'yAxis_axisTick_show', + optionField: 'yAxis.axisTick.show', + value: 1, + active: 1, + inactive: 0, + tabName: 'custom', + groupName: 'yAxis' + }, + { + label: '刻度颜色', + type: 'colorPicker', + field: 'yAxis_axisTick_lineStyle_color', + optionField: 'yAxis.axisTick.lineStyle.color', + // 是否多选 + multiple: false, + value: '#fff', + tabName: 'custom', + groupName: 'yAxis' + }, + { + label: '刻度宽度', + type: 'inputNumber', + field: 'yAxis_axisTick_lineStyle_width', + optionField: 'yAxis.axisTick.lineStyle.width', + // 是否多选 + multiple: false, + value: 1, + tabName: 'custom', + groupName: 'yAxis' + }, { label: '标签显示', type: 'switch', @@ -516,9 +579,20 @@ const option = { }, margin: 10 }, + axisTick: { + show: true, + lineStyle: { + color: '#fff', + width: 1 + } + }, // 分隔线 splitLine: { - show: false // yAxis.show配置为true时,该配置才有效 + show: true, // yAxis.show配置为true时,该配置才有效 + lineStyle: { + color: '#fff', + width: 2 + } }, // y轴轴线是否显示 axisLine: { From 70a218b03f75f5cffdda0ef282811cc1a72c51a0 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Thu, 21 Sep 2023 16:01:55 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=99=A8=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicComponents/ThemeSelect/index.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/ThemeSelect/index.vue b/data-room-ui/packages/BasicComponents/ThemeSelect/index.vue index 9bdc46e3..7e755abc 100644 --- a/data-room-ui/packages/BasicComponents/ThemeSelect/index.vue +++ b/data-room-ui/packages/BasicComponents/ThemeSelect/index.vue @@ -111,13 +111,20 @@ export default { } // 自定义dropdown的样式 .theme-dropdown-menu{ - //background-color: var(--bs-background-2)!important; - //border: 1px solid var(--bs-border-1); + background-color: var(--bs-background-2)!important; + border: 1px solid var(--bs-border-1); + /deep/ .popper__arrow{ + background-color: var(--bs-background-2)!important; + &:after{ + border-bottom-color: var(--bs-background-2)!important; + } + } /deep/ .el-dropdown-menu__item{ - //background-color: var(--bs-background-2)!important; + background-color: var(--bs-background-2)!important; + color: rgb(188, 201, 212)!important; &:hover { - //color: var(--bs-el-color-primary) !important; - //background-color: var(--bs-el-background-3) !important; + color: var(--bs-el-color-primary) !important; + background-color: var(--bs-el-background-3) !important; } } From fc59f0217fd4b2f19d2674263aacedd3ba14e352 Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Thu, 21 Sep 2023 16:35:24 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E7=89=87=E5=92=8C=E9=A1=B5=E9=9D=A2=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E8=83=8C=E6=99=AF=E8=89=B2=E6=9C=89=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data-room-ui/packages/BizComponent/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data-room-ui/packages/BizComponent/index.vue b/data-room-ui/packages/BizComponent/index.vue index c71b6799..27b3820d 100644 --- a/data-room-ui/packages/BizComponent/index.vue +++ b/data-room-ui/packages/BizComponent/index.vue @@ -408,7 +408,9 @@ export default { const node = document.querySelector('.remote-preview-inner-wrap') // 获取node下的第一个子节点 const childrenNode = node.children[0] - toPng(childrenNode) + // 为childrenNode添加一个背景颜色 + childrenNode.style.backgroundColor = 'var(--bs-background-1)' + toJpeg(childrenNode) .then((dataUrl) => { const link = document.createElement('a') link.download = `${this.form.name}.png` From 94e0b99de23b4c036a0c4f7cf3aaba4ec3b2fd40 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Thu, 21 Sep 2023 17:33:42 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E6=BC=8F=E6=96=97?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E8=BD=AC=E5=8C=96=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/G2Plots/漏斗图/分面漏斗图.js | 6 ++++-- .../packages/G2Plots/漏斗图/基础漏斗图.js | 11 +++++++---- .../packages/G2Plots/漏斗图/对比漏斗图.js | 6 ++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js b/data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js index b9f23c18..1c7ede39 100644 --- a/data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js +++ b/data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js @@ -229,7 +229,8 @@ const data = [ const optionHandler = `option.legend = option.legendEnable ? {position: option.legendPosition}: false; window.conversionTagName = option.conversionTagName option.conversionTag.formatter = (datum) => { - return window.conversionTagName + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return window.conversionTagName + (percentage * 100).toFixed(2) + '%' } if (option.legendEnable) { option.legend.itemName = option.legendItemName @@ -277,7 +278,8 @@ const option = { fontSize: 12 }, formatter: (datum) => { - return option.conversionTagName + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return '转化率' + (percentage * 100).toFixed(2) + '%' } } } diff --git a/data-room-ui/packages/G2Plots/漏斗图/基础漏斗图.js b/data-room-ui/packages/G2Plots/漏斗图/基础漏斗图.js index eb216830..78803cf8 100644 --- a/data-room-ui/packages/G2Plots/漏斗图/基础漏斗图.js +++ b/data-room-ui/packages/G2Plots/漏斗图/基础漏斗图.js @@ -1,6 +1,7 @@ +import { Funnel } from '@antv/g2plot' // 配置版本号 -const version = '2023071001' +const version = '2023071002' // 分类 const category = 'Funnel' // 标题 @@ -211,7 +212,7 @@ const setting = [ value: '#595959', tabName: 'custom', groupName: 'legend' - }, + } // 边距 padding ] @@ -228,7 +229,8 @@ const data = [ const optionHandler = `option.legend = option.legendEnable ? {position: option.legendPosition}: false; window.conversionTagName = option.conversionTagName option.conversionTag.formatter = (datum) => { - return window.conversionTagName + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return window.conversionTagName + (percentage * 100).toFixed(2) + '%' } if (option.legendEnable) { option.legend.itemName = option.legendItemName @@ -275,7 +277,8 @@ const option = { fontSize: 12 }, formatter: (datum) => { - return '转化率' + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return '转化率' + (percentage * 100).toFixed(2) + '%' } } } diff --git a/data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js b/data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js index c8ecafd8..46f59cda 100644 --- a/data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js +++ b/data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js @@ -229,7 +229,8 @@ const data = [ const optionHandler = `option.legend = option.legendEnable ? {position: option.legendPosition}: false; window.conversionTagName = option.conversionTagName option.conversionTag.formatter = (datum) => { - return window.conversionTagName + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return window.conversionTagName + (percentage * 100).toFixed(2) + '%' } if (option.legendEnable) { option.legend.itemName = option.legendItemName @@ -277,7 +278,8 @@ const option = { fontSize: 12 }, formatter: (datum) => { - return option.conversionTagName + datum.$$percentage$$.toFixed(2) * 100 + '%' + const percentage = parseFloat(datum.$$percentage$$) + return '转化率' + (percentage * 100).toFixed(2) + '%' } } } From ed475bc96fe67e2f6bba29de30514fe2971667f4 Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Thu, 21 Sep 2023 17:51:43 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix:=20=E9=80=89=E6=8B=A9=E5=99=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=96=B0=E5=A2=9Eplaceholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 选择器组件新增placeholder --- .../core/module/chart/components/ScreenSelectChart.java | 3 +++ .../core/module/chart/components/ScreenTimePickerChart.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenSelectChart.java b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenSelectChart.java index 6da18e8c..85231611 100644 --- a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenSelectChart.java +++ b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenSelectChart.java @@ -49,6 +49,9 @@ public class ScreenSelectChart extends Chart { @ApiModelProperty("激活项字体颜色") private String activeFontColor; + @ApiModelProperty("占位提示") + private String placeholder; + } diff --git a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenTimePickerChart.java b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenTimePickerChart.java index 9d6514ce..6661d00e 100644 --- a/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenTimePickerChart.java +++ b/DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/module/chart/components/ScreenTimePickerChart.java @@ -56,6 +56,9 @@ public class ScreenTimePickerChart extends Chart { @ApiModelProperty(notes = "绑定值的格式") private String valueFormat; + @ApiModelProperty("占位提示") + private String placeholder; + } From 874ab066b0a4c3c956fcb81a812b13727b90854e Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Thu, 21 Sep 2023 17:57:40 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8placeholder=E8=8E=B7=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=96=B9=E5=BC=8F=EF=BC=8C=E5=8E=BB=E9=99=A4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E4=BF=9D=E5=AD=98data=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/BasicComponents/Select/index.vue | 45 +------------------ .../BasicComponents/Select/settingConfig.js | 1 + .../RightSetting/DataSetting.vue | 9 +++- 3 files changed, 10 insertions(+), 45 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/Select/index.vue b/data-room-ui/packages/BasicComponents/Select/index.vue index 8282d454..7391856d 100644 --- a/data-room-ui/packages/BasicComponents/Select/index.vue +++ b/data-room-ui/packages/BasicComponents/Select/index.vue @@ -4,7 +4,7 @@ v-model="value" :popper-class="'basic-component-select select-popper-' + config.code" :class="['basic-component-select', `select-${config.code}`]" - :placeholder="`请选择${placeholder || newPlaceholder}`" + :placeholder="config.customize.placeholder" clearable :filterable="filterable" @visible-change="visibleChange" @@ -21,10 +21,8 @@