|
|
|
@ -32,21 +32,21 @@
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
|
|
|
|
|
<Echart id="CenterMap" :options="options" ref="CenterMap"/>
|
|
|
|
|
<!-- <div class="mapFun" style="margin-top: 250px;">-->
|
|
|
|
|
<!-- <div class="nav text_right">-->
|
|
|
|
|
<!-- <ul>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_7"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="categoryClick();">产品品种</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_8"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="companyClick();">报备企业</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_4"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="warnClick();">预警信息</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- </ul>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="mapFun" style="margin-top: 250px;">-->
|
|
|
|
|
<!-- <div class="nav text_right">-->
|
|
|
|
|
<!-- <ul>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_7"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="categoryClick();">产品品种</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_8"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="companyClick();">报备企业</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- <li class="map_nav" style="width: 120px"><i class="nav_4"></i>-->
|
|
|
|
|
<!-- <a href="#" v-on:click="warnClick();">预警信息</a>-->
|
|
|
|
|
<!-- </li>-->
|
|
|
|
|
<!-- </ul>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
</dv-border-box-13>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -148,7 +148,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData(code) {
|
|
|
|
|
console.log("地图中间部分请求")
|
|
|
|
|
if (code == "350000")
|
|
|
|
|
this.curLoaction = "福建省"
|
|
|
|
|
currentGET("big8", {regionCode: code}).then((res) => {
|
|
|
|
@ -169,21 +168,22 @@ export default {
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
|
|
|
|
async getGeojson(name, mydata) {
|
|
|
|
|
// console.log("开始搜索地图楼{}",mydata)
|
|
|
|
|
console.log("开始搜索地图楼{}",name)
|
|
|
|
|
this.regionCode = name;
|
|
|
|
|
//如果要展示南海群岛并且展示的是中国的话
|
|
|
|
|
let geoname = name
|
|
|
|
|
if (this.isSouthChinaSea && name == "china") {
|
|
|
|
|
geoname = "chinaNanhai";
|
|
|
|
|
}
|
|
|
|
|
console.log('11', echarts.getMap(name))
|
|
|
|
|
//如果有注册地图的话就不用再注册 了
|
|
|
|
|
let mapjson = echarts.getMap(name);
|
|
|
|
|
|
|
|
|
|
if (mapjson) {
|
|
|
|
|
console.log('1111')
|
|
|
|
|
|
|
|
|
|
mapjson = mapjson.geoJSON;
|
|
|
|
|
} else {
|
|
|
|
|
mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then((res) => {
|
|
|
|
|
res = res.data
|
|
|
|
|
console.log("获取地图的信息{}",res)
|
|
|
|
|
return res;
|
|
|
|
|
});
|
|
|
|
@ -191,11 +191,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
let cityCenter = {};
|
|
|
|
|
let arr = mapjson.features;
|
|
|
|
|
console.log('mapjson===',mapjson)
|
|
|
|
|
|
|
|
|
|
//根据geojson获取省份中心点
|
|
|
|
|
// arr.map((item) => {
|
|
|
|
|
// cityCenter[item.properties.name] =
|
|
|
|
|
// item.properties.centroid || item.properties.center;
|
|
|
|
|
// });
|
|
|
|
|
arr.map((item) => {
|
|
|
|
|
cityCenter[item.properties.name] =
|
|
|
|
|
item.properties.centroid || item.properties.center;
|
|
|
|
|
});
|
|
|
|
|
let newData = [];
|
|
|
|
|
mydata.map((item) => {
|
|
|
|
|
if (cityCenter[item.cityName]) {
|
|
|
|
@ -452,10 +454,10 @@ export default {
|
|
|
|
|
font-weight: 900;
|
|
|
|
|
letter-spacing: 6px;
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
92deg,
|
|
|
|
|
#0072ff 0%,
|
|
|
|
|
#00eaff 48.8525390625%,
|
|
|
|
|
#01aaff 100%
|
|
|
|
|
92deg,
|
|
|
|
|
#0072ff 0%,
|
|
|
|
|
#00eaff 48.8525390625%,
|
|
|
|
|
#01aaff 100%
|
|
|
|
|
);
|
|
|
|
|
-webkit-background-clip: text;
|
|
|
|
|
-webkit-text-fill-color: transparent;
|
|
|
|
|