From 13007cb248cd51fdd3ab4c92829ccded70c3206d Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 8 Sep 2023 15:33:19 +0800 Subject: [PATCH] =?UTF-8?q?feat--=E6=B0=94=E6=B3=A1=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E8=AF=AD=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapCharts/widget-airbubble-map.js | 21 ++++++++++++++++ .../widget/map/widgetAirBubbleMap.vue | 25 +++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/mapCharts/widget-airbubble-map.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/mapCharts/widget-airbubble-map.js index 8de5eb0a..fd086af6 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/mapCharts/widget-airbubble-map.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/mapCharts/widget-airbubble-map.js @@ -291,6 +291,27 @@ export const widgetAirbubbleMap = { }, ], }, + { + name: '提示语设置', + list: [ + { + type: 'el-input-number', + label: '字体字号', + name: 'tipsFontSize', + required: false, + placeholder: '', + value: 16 + }, + { + type: 'vue-color', + label: '字体颜色', + name: 'tipsColor', + required: false, + placeholder: '', + value: '#00FEFF' + }, + ], + }, ], ], data: [ diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetAirBubbleMap.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetAirBubbleMap.vue index fcac7b6a..55bb2226 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetAirBubbleMap.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetAirBubbleMap.vue @@ -448,7 +448,8 @@ export default { //this.setOptionDataValue(); this.setOptionsData(); this.setOptionAirSize(); - this.setOptionMapBlocak(); + this.setOptionsTooltip(); + this.setOptionMapBlock(); }, // 标题设置 setOptionsTitle() { @@ -484,7 +485,7 @@ export default { }; label["normal"] = normal; }, - setOptionMapBlocak() { + setOptionMapBlock() { const optionsSetup = this.optionsSetup; const itemStyle = this.options.series[0]["itemStyle"]; const normal = { @@ -534,6 +535,26 @@ export default { maxSize4Pin = this.optionsSetup.fontmaxSize4Pin; minSize4Pin = this.optionsSetup.fontminSize4Pin; }, + // tooltip 设置 + setOptionsTooltip() { + const optionsSetup = this.optionsSetup; + const tooltip = { + trigger: "item", + show: true, + textStyle: { + color: optionsSetup.tipsColor, + fontSize: optionsSetup.tipsFontSize, + }, + formatter: function (params) { + if (params.value.length > 1) { + return params.data.name + "" + params.data.value[2]; + } else { + return params.name; + } + }, + }; + this.options.tooltip = tooltip; + }, //数据解析 setOptionsData(e, paramsConfig) { const optionsData = this.optionsData; // 数据类型 静态 or 动态