From 7bdcee3ecdbd2c41d3fff8e0d51be007c9fc334d Mon Sep 17 00:00:00 2001
From: Kubbo <390378816@qq.com>
Date: Tue, 27 Aug 2024 23:09:28 +0800
Subject: [PATCH] BUG 20240827 1
---
src/views/AppMap.vue | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/views/AppMap.vue b/src/views/AppMap.vue
index 2cfc8ce..a468c92 100644
--- a/src/views/AppMap.vue
+++ b/src/views/AppMap.vue
@@ -64,6 +64,20 @@ export default {
{offset: 1, color: '#09E2F8'},
]
}
+ const label = {
+ show: true,
+ backgroundColor: {type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [{offset: 0, color: 'rgba(9,63,107,0.79)'}, {offset: 1, color: 'rgba(13,58,99,0.03)'}]},
+ borderRadius: 2,
+ padding: 8,
+ position: 'right',
+ formatter: params => {
+ const {name, value: [x, y, bakeStockAmt = 0, preSaleNum = 0]} = params
+ return `{a|${name}\n现烤库存金额:${bakeStockAmt}\n现烤销售机会:${preSaleNum}}`
+ },
+ rich: {
+ a: {color: '#fff', fontSize: 10, lineHeight: 14}
+ }
+ }
this.map.setOption({
geo: {
map: 'zhengzhou', roam: true, emphasis: {disabled: true},
@@ -75,14 +89,14 @@ export default {
],
},
series: [
- {type: 'scatter', coordinateSystem: 'geo', itemStyle: {color: '#66FFFF'}},
- {type: 'effectScatter', coordinateSystem: 'geo', itemStyle: {color: '#FFD15C'}}
+ {type: 'scatter', coordinateSystem: 'geo', itemStyle: {color: '#66FFFF'}, label},
+ {type: 'effectScatter', coordinateSystem: 'geo', itemStyle: {color: '#FFD15C'}, label}
],
tooltip: {
trigger: 'item', formatter: params => {
const {name, marker, value: [x, y, bakeStockAmt = 0, preSaleNum = 0]} = params
return `${marker} ${name}
现烤库存金额:${bakeStockAmt}
现烤销售机会:${preSaleNum}`
- }
+ },
},
})
this.map.on('click', evt => {