BUG 20240827 1

This commit is contained in:
2024-08-27 23:09:28 +08:00
parent 468a405ff1
commit 7bdcee3ecd

View File

@@ -64,6 +64,20 @@ export default {
{offset: 1, color: '#09E2F8'}, {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({ this.map.setOption({
geo: { geo: {
map: 'zhengzhou', roam: true, emphasis: {disabled: true}, map: 'zhengzhou', roam: true, emphasis: {disabled: true},
@@ -75,14 +89,14 @@ export default {
], ],
}, },
series: [ series: [
{type: 'scatter', coordinateSystem: 'geo', itemStyle: {color: '#66FFFF'}}, {type: 'scatter', coordinateSystem: 'geo', itemStyle: {color: '#66FFFF'}, label},
{type: 'effectScatter', coordinateSystem: 'geo', itemStyle: {color: '#FFD15C'}} {type: 'effectScatter', coordinateSystem: 'geo', itemStyle: {color: '#FFD15C'}, label}
], ],
tooltip: { tooltip: {
trigger: 'item', formatter: params => { trigger: 'item', formatter: params => {
const {name, marker, value: [x, y, bakeStockAmt = 0, preSaleNum = 0]} = params const {name, marker, value: [x, y, bakeStockAmt = 0, preSaleNum = 0]} = params
return `${marker} ${name}<br/>现烤库存金额:${bakeStockAmt}<br/>现烤销售机会:${preSaleNum}` return `${marker} ${name}<br/>现烤库存金额:${bakeStockAmt}<br/>现烤销售机会:${preSaleNum}`
} },
}, },
}) })
this.map.on('click', evt => { this.map.on('click', evt => {