From 48b86f75b69cf32bcfe1e2bb2052bf8e066c374a Mon Sep 17 00:00:00 2001 From: "Mr.Z" Date: Wed, 20 Sep 2023 14:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=B1=E7=8A=B6=E5=9B=BE=E4=B8=8E=E6=9F=B1?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E6=95=B0=E5=80=BC=E8=AE=BE=E5=AE=9A=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=99=BE=E5=88=86=E5=8F=B7=E7=9A=84=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/configure/barCharts/widget-barchart.js | 8 ++++++++ .../barlineCharts/widget-barlinechart.js | 16 ++++++++++++++++ .../designer/widget/bar/widgetBarchart.vue | 2 ++ .../widget/barline/widgetBarlinechart.vue | 2 ++ 4 files changed, 28 insertions(+) diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js index f8f0b9fd..87435a35 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js @@ -544,6 +544,14 @@ export const widgetBarchart = { placeholder: '', value: true }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSign', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '距离', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js index 8bef3bbe..3f4185fb 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js @@ -713,6 +713,14 @@ export const widgetBarlinechart = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSignLine', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '距离', @@ -764,6 +772,14 @@ export const widgetBarlinechart = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSignBar', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '距离', diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue index 4501758a..1341a049 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue @@ -371,6 +371,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; // 获取颜色样式 if (optionsSetup.colorStyle == 'same') { @@ -454,6 +455,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; // 获取颜色样式 if (optionsSetup.colorStyle == 'same') { diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue index 47e463aa..12859cf3 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue @@ -337,6 +337,7 @@ export default { fontSize: optionsSetup.fontSizeLine, color: optionsSetup.subTextColorLine, fontWeight: optionsSetup.fontWeightLine, + formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}' }; } } @@ -355,6 +356,7 @@ export default { fontSize: optionsSetup.fontSizeBar, color: optionsSetup.subTextColorBar, fontWeight: optionsSetup.fontWeightBar, + formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}' }; series[key].barWidth = optionsSetup.maxWidth; series[key].barMinHeight = optionsSetup.minHeight;