英文版本配置,二并一(配置)不弹窗BUG修改
This commit is contained in:
@ -81,14 +81,14 @@ export default {
|
||||
const province = []
|
||||
if (data.length) {
|
||||
data.forEach((el) => {
|
||||
el.value = [el.latitude, el.longitude]
|
||||
el.value = [el.longitude, el.latitude]
|
||||
el.symbol = 'image://' + blue
|
||||
el.cityCode = 1000
|
||||
province.push(el)
|
||||
})
|
||||
this.pointData = province
|
||||
} else {
|
||||
this.pointData = [{ symbol: 'image://' + blue, cityCode: 1000, value: [118.8062, 31.9208], name: '江苏' }]
|
||||
this.pointData = [{ symbol: 'image://' + blue, cityCode: 1000, value: [30.787045, 103.923008], name: 'Sichuan' }]
|
||||
}
|
||||
} finally {
|
||||
this.loading = false
|
||||
@ -97,21 +97,12 @@ export default {
|
||||
},
|
||||
getInitMap() {
|
||||
this.$echarts.registerMap('world', worldJson)
|
||||
// this.$echarts.registerMap('china', chinaMap)
|
||||
// this.$echarts.registerMap('chinaMapOutline', chinaMapOutline)
|
||||
this.pointData = [
|
||||
{ name: 'Beijing', value: [116.4074, 39.9042] }, // 北京
|
||||
{ name: 'New York', value: [-74.0060, 40.7128] }, // 纽约
|
||||
{ name: 'London', value: [-0.1278, 51.5074] } // 伦敦
|
||||
]
|
||||
var series = [
|
||||
{
|
||||
// map: 'china',
|
||||
name: '国家',
|
||||
map: 'world',
|
||||
type: 'map',
|
||||
roam: false,
|
||||
// zoom: 1.65,
|
||||
zoom: 1.1,
|
||||
label: {
|
||||
normal: {
|
||||
@ -126,7 +117,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// top: '29%',
|
||||
top: '10%',
|
||||
tooltip: {
|
||||
show: false
|
||||
@ -144,8 +134,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// data: this.mapData
|
||||
data: [{ name: 'China', value: 100 }]
|
||||
data: this.mapData
|
||||
},
|
||||
|
||||
{
|
||||
@ -164,10 +153,11 @@ export default {
|
||||
shadowColor: '#333'
|
||||
}
|
||||
},
|
||||
symbolSize: 10,
|
||||
data: [this.pointData[this.pointIndex]]
|
||||
symbolSize: 24,
|
||||
symbolOffset: [0, '-50%'], // 或 [0, -12] 更精确
|
||||
data: [this.pointData[this.pointIndex]],
|
||||
|
||||
// showEffectOn: 'render' // 加载完毕显示特效
|
||||
showEffectOn: 'render' // 加载完毕显示特效
|
||||
}
|
||||
]
|
||||
|
||||
@ -197,25 +187,25 @@ export default {
|
||||
trigger: 'item',
|
||||
alwaysShowContent: true,
|
||||
backgroundColor: 'transparent',
|
||||
position: 'top',
|
||||
position: 'bottom',
|
||||
triggerOn: 'click',
|
||||
enterable: true,
|
||||
formatter: params => {
|
||||
// 获取xAxis data中的数据
|
||||
let dataStr = `<div></div>`
|
||||
dataStr += `<div>
|
||||
<span style="padding-left:10px;font-weight:bold;margin-left:20px;margin-top:5px;font-size="14px">${params.name}</span>
|
||||
<span style="padding-left:20px;font-weight:bold;margin-left:20px;margin-top:5px;font-size="14px">${params.name}</span>
|
||||
</div>`
|
||||
dataStr += `<div style="margin-top:15px">
|
||||
<span style="padding-left:10px;">投运时间</span>
|
||||
<span style="padding-left:10px;">${this.$t('screen.comTime')}</span>
|
||||
<span style="margin-left:5px;margin-right:10px;color:rgba(245, 221, 0, 1);font-family:DIN;">${params.data.createTime}</span>
|
||||
</div>`
|
||||
dataStr += `<div style="margin-top:2px;">
|
||||
<span style="padding-left:10px;">装机容量</span>
|
||||
<span style="padding-left:10px;">${this.$t('screen.capacity')}</span>
|
||||
<span style="margin-left:5px;margin-right:5px;color:rgba(245, 221, 0, 1);font-family:DIN;">${params.data.capacity}</span>
|
||||
<span style="color:rgba(245, 221, 0, 1);">kWh</span>
|
||||
</div>`
|
||||
const div = `<div style='max-width:220px;height:85px;
|
||||
const div = `<div style='height:85px;
|
||||
background-image:url(${require('../../../assets/new-screen/tooltip-bg.png')});background-repeat: no-repeat;background-size:100% 100%;' >${dataStr}</div>`
|
||||
return div
|
||||
}
|
||||
@ -224,11 +214,8 @@ export default {
|
||||
geo: [
|
||||
{
|
||||
silent: true,
|
||||
// map: 'chinaMapOutline',
|
||||
map: 'world',
|
||||
|
||||
zoom: 1.1,
|
||||
// top: '10%',
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
@ -266,7 +253,6 @@ export default {
|
||||
{
|
||||
silent: true,
|
||||
map: 'chinaMapOutline',
|
||||
// zoom: 1.1,
|
||||
zoom: 1.2,
|
||||
top: '7%',
|
||||
label: {
|
||||
|
||||
Reference in New Issue
Block a user