Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcjg-web
Showing
1 changed file
with
45 additions
and
27 deletions
... | @@ -38,21 +38,8 @@ export default { | ... | @@ -38,21 +38,8 @@ export default { |
38 | handler (newData) { | 38 | handler (newData) { |
39 | let _this = this; | 39 | let _this = this; |
40 | // 设置点的位置(经纬度) | 40 | // 设置点的位置(经纬度) |
41 | const geoCoordMap = { | ||
42 | 汉台区: [107.03187, 33.06774, 20], | ||
43 | 南郑区: [106.94024, 33.00299, 20], | ||
44 | 城固县: [107.33367, 33.15661, 20], | ||
45 | 洋县: [107.545837, 33.222739, 20], | ||
46 | 西乡县: [107.76867, 32.98411, 20], | ||
47 | 镇巴县: [107.89648, 32.53487, 20], | ||
48 | 勉县: [106.673221, 33.153553, 20], | ||
49 | 留坝县: [106.92233, 33.61606, 20], | ||
50 | 佛坪县: [107.98974, 33.52496, 20], | ||
51 | 宁强县: [106.25958, 32.82881, 20], | ||
52 | 略阳县: [106.15399, 33.33009, 20], | ||
53 | }; | ||
54 | this.options = { | 41 | this.options = { |
55 | showLegendSymbol: true, | 42 | showLegendSymbol: false, |
56 | tooltip: { | 43 | tooltip: { |
57 | trigger: "item", | 44 | trigger: "item", |
58 | textStyle: { | 45 | textStyle: { |
... | @@ -72,18 +59,19 @@ export default { | ... | @@ -72,18 +59,19 @@ export default { |
72 | visualMap: { | 59 | visualMap: { |
73 | min: 0, | 60 | min: 0, |
74 | max: _this.max, | 61 | max: _this.max, |
75 | bottom: "12%", | 62 | bottom: "6%", |
76 | left: 50, | 63 | left: 50, |
77 | splitNumber: 6, | 64 | splitNumber: 6, |
78 | seriesIndex: [0], | 65 | seriesIndex: [0], |
79 | itemWidth: 20, // 每个图元的宽度 | 66 | itemWidth: 20, // 每个图元的宽度 |
80 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px | 67 | itemGap: 4, // 每两个图元之间的间隔距离,单位为px |
68 | selectedMode: false, // 是否允许点击 | ||
81 | pieces: [ | 69 | pieces: [ |
82 | // 自定义每一段的范围,以及每一段的文字 | 70 | // 自定义每一段的范围,以及每一段的文字 |
83 | { gte: 100, label: "5000以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 | 71 | { gte: 5000, label: "≥5000", color: "#056BEC" }, // 不指定 max,表示 max 为无限大(Infinity)。 |
84 | { gte: 50, lte: 6000, label: "1000-5000", color: "#3375e4" }, | 72 | { gte: 1000, lte: 5000, label: "1000-5000", color: "#48BDE3" }, |
85 | { gte: 20, lte: 2000, label: "500-1000", color: "#6797ef" }, | 73 | { gte: 500, lte: 1000, label: "500-1000", color: "#0494F3" }, |
86 | { gte: 1, lte: 1000, label: "0-500", color: "#96b5ef" }, | 74 | { gte: 0, lte: 500, label: "≤500", color: "#1872CC" }, |
87 | ], | 75 | ], |
88 | textStyle: { | 76 | textStyle: { |
89 | color: "#737373", | 77 | color: "#737373", |
... | @@ -99,11 +87,11 @@ export default { | ... | @@ -99,11 +87,11 @@ export default { |
99 | itemStyle: { | 87 | itemStyle: { |
100 | normal: { | 88 | normal: { |
101 | //阴影 | 89 | //阴影 |
102 | areaColor: "#5689FD ", | 90 | areaColor: "#5689FD", |
103 | shadowColor: "#21371d", | 91 | shadowColor: "#21371d", |
104 | borderWidth: 0, | 92 | borderWidth: 0, |
105 | shadowOffsetX: 2, | 93 | shadowOffsetX: 2, |
106 | shadowOffsetY: 25, | 94 | shadowOffsetY: 20, |
107 | }, | 95 | }, |
108 | }, | 96 | }, |
109 | }, | 97 | }, |
... | @@ -117,13 +105,37 @@ export default { | ... | @@ -117,13 +105,37 @@ export default { |
117 | left: "10%", | 105 | left: "10%", |
118 | itemStyle: { | 106 | itemStyle: { |
119 | normal: { | 107 | normal: { |
120 | areaColor: "rgba(19,54,162,.5)", | 108 | areaColor: "rgba(19,54,162,.1)", |
121 | borderColor: "rgba(0,242,252,.5)", | 109 | borderWidth: 1, |
122 | borderWidth: 2, | 110 | shadowBlur: 2, |
123 | shadowBlur: 1, | ||
124 | borderColor: "rgb(155, 200, 200)", | 111 | borderColor: "rgb(155, 200, 200)", |
125 | shadowColor: "#44f2fc", | 112 | shadowColor: "#44f2fc", |
126 | }, | 113 | }, |
114 | emphasis: { | ||
115 | // itemStyle:{ | ||
116 | // 地图区域的高亮颜色 | ||
117 | areaColor: { | ||
118 | type: 'linear', | ||
119 | x: 0, | ||
120 | y: 0, | ||
121 | x2: 0, | ||
122 | y2: 1, | ||
123 | colorStops: [{ | ||
124 | offset: 0, color: '#4DD1B4' // 0% 处的颜色 | ||
125 | }, { | ||
126 | offset: 1, color: '#15BFCE' // 100% 处的颜色 | ||
127 | }], | ||
128 | global: false // 缺省为 false | ||
129 | }, | ||
130 | borderType: 'dottod', | ||
131 | borderWidth: 0, | ||
132 | borderColor:'#F8F071', | ||
133 | shadowColor: '#4DD1B4', | ||
134 | shadowBlur: 1, | ||
135 | shadowOffsetY:-3 | ||
136 | // } | ||
137 | |||
138 | } | ||
127 | }, | 139 | }, |
128 | label: { | 140 | label: { |
129 | formatter: (params) => { | 141 | formatter: (params) => { |
... | @@ -141,12 +153,18 @@ export default { | ... | @@ -141,12 +153,18 @@ export default { |
141 | }, | 153 | }, |
142 | }, | 154 | }, |
143 | }, | 155 | }, |
156 | // 选中区域颜色 | ||
157 | // select:{ | ||
158 | // itemStyle:{ | ||
159 | // areaColor:'red' | ||
160 | // } | ||
161 | // }, | ||
144 | data: newData, | 162 | data: newData, |
145 | }, | 163 | }, |
146 | ], | 164 | ], |
147 | }; | 165 | }; |
148 | // 重新选择区域 | 166 | // 重新选择区域 |
149 | this.handleMapRandomSelect(); | 167 | // this.handleMapRandomSelect(); |
150 | }, | 168 | }, |
151 | 169 | ||
152 | immediate: true, | 170 | immediate: true, | ... | ... |
-
Please register or sign in to post a comment