From 5335d5f9d4d532f0ad4566b6e51742b7217ddb39 Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 20 May 2022 19:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=9B=BD=E5=9C=B0=E5=9B=BE-=E8=B7=AF?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E5=A2=9E=E5=8A=A0=E5=9C=B0=E5=9B=BE=E5=9D=97?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/tools/configure/widget-map.js | 29 +++++++++++++++++++ .../designer/widget/map/widgetLineMap.vue | 26 ++++++++++++++--- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-map.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-map.js index 48e309ff..1980fa3b 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-map.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-map.js @@ -188,6 +188,35 @@ export const widgetMap = { }, ], }, + { + name: '地图颜色', + list: [ + { + type: 'vue-color', + label: '地图块颜色', + name: 'blockColor', + required: false, + placeholder: '', + value: '#073684' + }, + { + type: 'vue-color', + label: '边界颜色', + name: 'borderColor', + required: false, + placeholder: '', + value: '#061E3D' + }, + { + type: 'vue-color', + label: '高亮颜色', + name: 'highlightColor', + required: false, + placeholder: '', + value: '#2B91B7' + }, + ], + }, ] ], data: [ diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetLineMap.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetLineMap.vue index a6f968c0..8c5f74cb 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetLineMap.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/map/widgetLineMap.vue @@ -305,7 +305,8 @@ export default { value: dataItem.value, } ) - }; + } + ; } return res; }, @@ -313,6 +314,7 @@ export default { this.setOptionsTitle(); this.setOptionsText(); this.setOptionsPoint(); + this.setOptionsColor(); this.setOptionsData(); }, // 标题设置 @@ -336,7 +338,7 @@ export default { this.options.title = title; }, // 地图字体设置 - setOptionsText(){ + setOptionsText() { const optionsSetup = this.optionsSetup; const lable = this.options.series[2].label; const normal = { @@ -349,17 +351,33 @@ export default { lable["normal"] = normal; }, // 地图点设置 - setOptionsPoint(){ + setOptionsPoint() { const optionsSetup = this.optionsSetup; const series = this.options.series[2]; pointSize = optionsSetup.pointSize - const itemStyle= { + const itemStyle = { normal: { color: optionsSetup.pointColor, } }; series["itemStyle"] = itemStyle; }, + // 地图颜色设置 + setOptionsColor() { + const optionsSetup = this.optionsSetup; + const itemStyle = { + normal: { + // 地图的颜色 + areaColor: optionsSetup.blockColor, + borderColor: optionsSetup.borderColor, + }, + emphasis: { + // 地图块颜色 + areaColor: optionsSetup.highlightColor, + } + }; + this.options.geo["itemStyle"] = itemStyle; + }, //数据解析 setOptionsData() { const optionsData = this.optionsData; // 数据类型 静态 or 动态