26767fed by xiaomiao
2 parents 9ceadfaa 034f7a82
......@@ -38,21 +38,8 @@ export default {
handler (newData) {
let _this = this;
// 设置点的位置(经纬度)
const geoCoordMap = {
汉台区: [107.03187, 33.06774, 20],
南郑区: [106.94024, 33.00299, 20],
城固县: [107.33367, 33.15661, 20],
洋县: [107.545837, 33.222739, 20],
西乡县: [107.76867, 32.98411, 20],
镇巴县: [107.89648, 32.53487, 20],
勉县: [106.673221, 33.153553, 20],
留坝县: [106.92233, 33.61606, 20],
佛坪县: [107.98974, 33.52496, 20],
宁强县: [106.25958, 32.82881, 20],
略阳县: [106.15399, 33.33009, 20],
};
this.options = {
showLegendSymbol: true,
showLegendSymbol: false,
tooltip: {
trigger: "item",
textStyle: {
......@@ -72,18 +59,19 @@ export default {
visualMap: {
min: 0,
max: _this.max,
bottom: "12%",
bottom: "6%",
left: 50,
splitNumber: 6,
seriesIndex: [0],
itemWidth: 20, // 每个图元的宽度
itemGap: 2, // 每两个图元之间的间隔距离,单位为px
itemGap: 4, // 每两个图元之间的间隔距离,单位为px
selectedMode: false, // 是否允许点击
pieces: [
// 自定义每一段的范围,以及每一段的文字
{ gte: 100, label: "5000以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。
{ gte: 50, lte: 6000, label: "1000-5000", color: "#3375e4" },
{ gte: 20, lte: 2000, label: "500-1000", color: "#6797ef" },
{ gte: 1, lte: 1000, label: "0-500", color: "#96b5ef" },
{ gte: 5000, label: "≥5000", color: "#056BEC" }, // 不指定 max,表示 max 为无限大(Infinity)。
{ gte: 1000, lte: 5000, label: "1000-5000", color: "#48BDE3" },
{ gte: 500, lte: 1000, label: "500-1000", color: "#0494F3" },
{ gte: 0, lte: 500, label: "≤500", color: "#1872CC" },
],
textStyle: {
color: "#737373",
......@@ -99,11 +87,11 @@ export default {
itemStyle: {
normal: {
//阴影
areaColor: "#5689FD ",
areaColor: "#5689FD",
shadowColor: "#21371d",
borderWidth: 0,
shadowOffsetX: 2,
shadowOffsetY: 25,
shadowOffsetY: 20,
},
},
},
......@@ -117,13 +105,37 @@ export default {
left: "10%",
itemStyle: {
normal: {
areaColor: "rgba(19,54,162,.5)",
borderColor: "rgba(0,242,252,.5)",
borderWidth: 2,
shadowBlur: 1,
areaColor: "rgba(19,54,162,.1)",
borderWidth: 1,
shadowBlur: 2,
borderColor: "rgb(155, 200, 200)",
shadowColor: "#44f2fc",
},
emphasis: {
// itemStyle:{
// 地图区域的高亮颜色
areaColor: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: '#4DD1B4' // 0% 处的颜色
}, {
offset: 1, color: '#15BFCE' // 100% 处的颜色
}],
global: false // 缺省为 false
},
borderType: 'dottod',
borderWidth: 0,
borderColor:'#F8F071',
shadowColor: '#4DD1B4',
shadowBlur: 1,
shadowOffsetY:-3
// }
}
},
label: {
formatter: (params) => {
......@@ -141,12 +153,18 @@ export default {
},
},
},
// 选中区域颜色
// select:{
// itemStyle:{
// areaColor:'red'
// }
// },
data: newData,
},
],
};
// 重新选择区域
this.handleMapRandomSelect();
// this.handleMapRandomSelect();
},
immediate: true,
......