大屏英文版代码

This commit is contained in:
2025-08-14 14:36:48 +08:00
parent 2963a635cf
commit a7fb35d600
15 changed files with 274 additions and 160 deletions

View File

@ -14,8 +14,9 @@
</div>
</template>
<script>
import chinaMap from '@/assets/mapJson/chinaMap.json'
import { chinaMapOutline } from '@/assets/mapJson/chinaMapOut.js'
// import chinaMap from '@/assets/mapJson/chinaMap.json'
import worldJson from 'echarts/map/json/world.json'
// import { chinaMapOutline } from '@/assets/mapJson/chinaMapOut.js'
import blue from '../../../assets/new-screen/map-blue.png'
import { GetStationInfo, GetCapacity, GetRegionalDistribution } from '@/api/screen/zzScreen'
export default {
@ -95,15 +96,23 @@ export default {
this.getInitMap()
},
getInitMap() {
this.$echarts.registerMap('china', chinaMap)
this.$echarts.registerMap('chinaMapOutline', chinaMapOutline)
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',
// map: 'china',
name: '国家',
map: 'world',
type: 'map',
roam: false,
zoom: 1.65,
// zoom: 1.65,
zoom: 1.1,
label: {
normal: {
show: false,
@ -117,7 +126,8 @@ export default {
}
}
},
top: '29%',
// top: '29%',
top: '10%',
tooltip: {
show: false
},
@ -134,7 +144,8 @@ export default {
}
}
},
data: this.mapData
// data: this.mapData
data: [{ name: 'China', value: 100 }]
},
{
@ -150,11 +161,10 @@ export default {
itemStyle: {
normal: {
color: '#F4E925',
shadowColor: '#333'
}
},
symbolSize: 50,
symbolSize: 10,
data: [this.pointData[this.pointIndex]]
// showEffectOn: 'render' // 加载完毕显示特效
@ -167,7 +177,7 @@ export default {
max: Math.max(...this.stationNum),
right: 'right',
top: 'bottom',
text: ['高(电站个数)', '低(电站个数)'],
text: [this.$t('screen.high') + '(' + this.$t('screen.stationNum') + ')', this.$t('screen.low') + '(' + this.$t('screen.stationNum') + ')'],
calculable: true,
inRange: {
// color: ['#5edfd6', '#37d4cf', '#14c9c9', '#0da5aa', '#07828b']
@ -214,10 +224,11 @@ export default {
geo: [
{
silent: true,
map: 'chinaMapOutline',
// map: 'chinaMapOutline',
map: 'world',
zoom: 1.1,
top: '10%',
// top: '10%',
label: {
normal: {
show: false,
@ -255,8 +266,8 @@ export default {
{
silent: true,
map: 'chinaMapOutline',
zoom: 1.1,
// zoom: 1.1,
zoom: 1.2,
top: '7%',
label: {
normal: {