-
{{ item.text }}
@@ -15,7 +12,8 @@
- {
- echarts.registerMap('guangdong', propsVal.jsonData)
+ // console.log("propsval__>>>", propsVal.idType, propsVal)
+ const name = propsVal.jsonData.features[0].properties.name
+ echarts.registerMap(name, propsVal.jsonData)
nextTick(() => {
- const domitem = document.getElementById("mapEcharts" + propsVal.idType)
- const map = echarts.init(domitem, null, {
+ const domitem: any = document.getElementById("mapEcharts" + propsVal.idType)
+ if (echarts.getInstanceByDom(domitem)) {// 销毁之前的echarts实例
+ echarts.dispose(domitem);
+ }
+ const map = echarts.init(domitem, null, {// 初始化echarts实例
renderer: 'canvas',
})
const option = {
@@ -101,9 +106,14 @@ const initEcharts = () => {
trigger: 'item',//触发条件
},
geo: {
- map: 'guangdong',
+ map: name,
zoom: 1,
roam: true,
+ // 缩放限制
+ scaleLimit: {
+ min: 0.5,
+ max: 99
+ },
label: propsVal.labelInfo,
// 所有地图的区域颜色
itemStyle: propsVal.itemStyle,
@@ -120,7 +130,7 @@ const initEcharts = () => {
},
series: [
{
- name: 'Top 5',
+ name,
type: 'effectScatter',
colorBy: 'series',
effectType: 'ripple',
@@ -164,8 +174,7 @@ const chartClickEventListener = (mychart: any) => {
const chagneJSON = (item: any) => {
- console.log("propsval", propsVal)
- propsVal.idType = item.navId
+ // propsVal.idType = item.navId
setTimeout(() => {
initEcharts()
})
diff --git a/src/components/mapBaidu/mapLine.vue b/src/components/mapBaidu/mapLine.vue
index 8563b0b..d14d43d 100644
--- a/src/components/mapBaidu/mapLine.vue
+++ b/src/components/mapBaidu/mapLine.vue
@@ -35,13 +35,13 @@ const initMap = () => {
const startIcon = {
imgUrl: new URL('/src/assets/img/mapStart.png', import.meta.url).href,
position: [linePointList[0].lng, linePointList[0].lat],
- size: [60, 60]
+ size: [50, 50]
}
const endIcon = {
imgUrl: new URL('/src/assets/img/mapEnd.png', import.meta.url).href,
position: [linePointList[linePointList.length - 1].lng, linePointList[linePointList.length - 1].lat],
- size: [60, 60]
+ size: [50, 50]
}
initIcon(startIcon.imgUrl, startIcon.position, startIcon.size)
@@ -108,8 +108,8 @@ const initPolylineAnimation = () => {
}
const initIcon = (imgUrl: any, position: any, size: any) => {
- // var myIcon = new BMapGL.Icon("https://api.map.baidu.com/img/markers.png", new BMapGL.Size(60, 60));
- var myIcon = new BMapGL.Icon(imgUrl, new BMapGL.Size(60, 60));
+ // var myIcon = new BMapGL.Icon("https://api.map.baidu.com/img/markers.png", new BMapGL.Size(50, 50));
+ var myIcon = new BMapGL.Icon(imgUrl, new BMapGL.Size(50, 50));
// 创建Marker标注,使用小车图标
var pt = new BMapGL.Point(...position);
var marker = new BMapGL.Marker(pt, {
diff --git a/src/views/screen/sharePlatform.vue b/src/views/screen/sharePlatform.vue
index ef7a6ce..4a7644c 100644
--- a/src/views/screen/sharePlatform.vue
+++ b/src/views/screen/sharePlatform.vue
@@ -379,11 +379,11 @@ const barComPropsHorizontal = reactive({
const pie3DList = reactive({
list: [
// 假数据
- {name: 'Chrome', y: 61.41},
- {name: 'Internet Explorer', y: 11.84},
- {name: 'Firefox', y: 10.85},
- {name: 'Edge', y: 4.67},
- {name: 'Safari', y: 4.18},
+ // ['Chrome', 1],
+ // ['Internet Explorer', 2],
+ // ['Firefox', 3],
+ // ['Edge', 4],
+ // ['Safari', 5]
]
})
onMounted(() => {
@@ -440,6 +440,7 @@ const iniTapiMaDevInfoCompanyList = async () => {
resultList.push(item)
})
pie3DList.list = resultList
+ // console.log("pie3DList", pie3DList.list)
} catch (error) {
console.log(error)
}