|
@@ -65,7 +65,7 @@
|
|
|
realtime: false,
|
|
realtime: false,
|
|
|
calculable: true,
|
|
calculable: true,
|
|
|
inRange: {
|
|
inRange: {
|
|
|
- color: ['#ffffff', '#3FE6B8', '#9FE6B8','#96BFFF', '#9d96f5', '#FFDB5C', '#ff9f7f', '#E062AE']
|
|
|
|
|
|
|
+ color: ['#ffffff', '#3FE6B8', '#9FE6B8', '#96BFFF', '#9d96f5', '#FFDB5C', '#ff9f7f', '#E062AE']
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
series: [{
|
|
series: [{
|
|
@@ -112,7 +112,7 @@
|
|
|
}, {
|
|
}, {
|
|
|
name: '揭阳市',
|
|
name: '揭阳市',
|
|
|
value: 110
|
|
value: 110
|
|
|
- },{
|
|
|
|
|
|
|
+ }, {
|
|
|
name: '湛江市',
|
|
name: '湛江市',
|
|
|
value: 120
|
|
value: 120
|
|
|
}, {
|
|
}, {
|
|
@@ -194,10 +194,17 @@
|
|
|
|
|
|
|
|
clickMap(e) {
|
|
clickMap(e) {
|
|
|
let currentAcode;
|
|
let currentAcode;
|
|
|
- if (e.dataIndex < 0) {
|
|
|
|
|
|
|
+ if (!(e.data && e.data.name)) {
|
|
|
currentAcode = '';
|
|
currentAcode = '';
|
|
|
} else {
|
|
} else {
|
|
|
- currentAcode = mapJson.features[e.dataIndex].properties.adcode;
|
|
|
|
|
|
|
+ /** 通过名称匹配 */
|
|
|
|
|
+ for (let i = 0; i < mapJson.features.length; i++) {
|
|
|
|
|
+ let p = mapJson.features[i].properties;
|
|
|
|
|
+ if (p.name == e.data.name) {
|
|
|
|
|
+ currentAcode = p.adcode.toString().substring(0, 4);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (this.currentTab != 3 && this.areaCode != currentAcode) {
|
|
if (this.currentTab != 3 && this.areaCode != currentAcode) {
|
|
|
this.areaCode = currentAcode;
|
|
this.areaCode = currentAcode;
|