|
@@ -18,13 +18,14 @@
|
|
|
<!-- 面包屑 -->
|
|
|
<nav class="navigation">
|
|
|
<section class="crumbs" >
|
|
|
- <span>{{currentZoneData.cname}}</span>
|
|
|
+ <span>{{currentZone.cname}}</span>
|
|
|
<span v-for="(item , index) in crumbsHtml" :key="index" @click="navgateFromCrumbs(item[1], index)">{{item[0]}} <em v-if="index !== crumbsHtml.length - 1"> > </em></span>
|
|
|
</section>
|
|
|
<section>
|
|
|
<TreeSelect
|
|
|
width="280"
|
|
|
:hideClear="false"
|
|
|
+ :isReadOnly='false'
|
|
|
:caption="'选择管理分区'"
|
|
|
:data="regulateDistrictData"
|
|
|
:disabled="false"
|
|
@@ -122,7 +123,9 @@ import {login} from "@/api/login"
|
|
|
import {getPlazaInfoCount , querySystemCard , getCardList , queryEventStatus} from "@/api/homePage"
|
|
|
import { formatTime } from '@/utils/format.js'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
+import ChinaGeoJson from "../../assets/CHN.geo2.json";
|
|
|
import {sortBy} from "lodash"
|
|
|
+import OtherJson from "../../assets/regionData/other.json"
|
|
|
import moment from 'moment'
|
|
|
import L from "leaflet";
|
|
|
import "leaflet-contextmenu";
|
|
@@ -243,7 +246,7 @@ export default {
|
|
|
],
|
|
|
plazaInfoCount:{},
|
|
|
systemList:[],
|
|
|
- currentZoneData:{}, //
|
|
|
+ currentZone:{}, //
|
|
|
currentDistrictData:[], //当前管理分区数据
|
|
|
currentSelectedSys:{},
|
|
|
currentSysId:"",
|
|
@@ -260,7 +263,7 @@ export default {
|
|
|
9:{innder:2000,outer:4000, offset:0.08},
|
|
|
10:{innder:1000,outer:2000, offset:0.04},
|
|
|
11:{innder:1000,outer:2000, offset:0.04},
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -310,7 +313,7 @@ export default {
|
|
|
navgateFromCrumbs (id, index) {
|
|
|
let data = this.getDataByCityCcode(id)
|
|
|
if (!data) return ;
|
|
|
- this.currentZoneData = data
|
|
|
+ this.currentZone = data
|
|
|
let level = data.level //1集团 2中心 3区域 0广场
|
|
|
if (level === 1) {
|
|
|
this.pantGroupMap(data, this.currentSysId)
|
|
@@ -323,9 +326,8 @@ export default {
|
|
|
},
|
|
|
// 获取 区域/中心/项目
|
|
|
selectProjectItem (ids, data) {
|
|
|
- this.currentLevel = data.level
|
|
|
this.createNavpathByData(data)
|
|
|
- this.currentZoneData = data
|
|
|
+ this.currentZone = data
|
|
|
let JSONName = data.cname
|
|
|
let level = data.level // //1集团 2中心 3区域 0广场
|
|
|
if (level === 1) {
|
|
@@ -387,8 +389,8 @@ export default {
|
|
|
recursionData(res.treeData)
|
|
|
let data = res.treeData[0]
|
|
|
this.currentDistrictData = res.treeData
|
|
|
- this.currentZoneData = data
|
|
|
- this.currentLevel = data.level // 初始化的时候判断是哪一级 //1集团 2中心 3区域 0广场
|
|
|
+ this.currentZone = data
|
|
|
+ this.currentLevel = res.treeData[0].level // 初始化的时候判断是哪一级 //1集团 2中心 3区域 0广场
|
|
|
this.regulateDistrictData = [data]
|
|
|
this.initMap()
|
|
|
}
|
|
@@ -610,7 +612,7 @@ export default {
|
|
|
this.pantGroupMap(this.currentDistrictData[0], this.currentSysId)
|
|
|
} else if (this.currentLevel === 2) { // 2中心
|
|
|
this.pantZonesMap(this.currentDistrictData[0], this.currentSysId)
|
|
|
- } else if (this.currentLevel === 3) {
|
|
|
+ } else if (this.currentLevel === 0) {
|
|
|
this.pantProjectsMap(this.currentDistrictData[0], this.currentSysId)
|
|
|
}
|
|
|
},
|
|
@@ -641,18 +643,17 @@ export default {
|
|
|
* @params system:当前选择的系统
|
|
|
*/
|
|
|
getInfoOfProject (system) {
|
|
|
- console.log(this.currentLevel)
|
|
|
this.systemList.forEach(item=>{ item.selected = false})
|
|
|
system.selected = true
|
|
|
this.currentSelectedSys = system
|
|
|
this.currentSysId = system.smsxt
|
|
|
//1集团 2中心 3区域 0广场
|
|
|
if(this.currentLevel === 1) { //1集团 3区域 0广场
|
|
|
- this.pantGroupMap(this.currentZoneData, system.smsxt)
|
|
|
+ this.pantGroupMap(this.currentDistrictData[0], system.smsxt)
|
|
|
} else if (this.currentLevel === 2) { // 2中心
|
|
|
- this.pantZonesMap(this.currentZoneData, system.smsxt)
|
|
|
- } else if (this.currentLevel === 3) {
|
|
|
- this.pantProjectsMap(this.currentZoneData, system.smsxt)
|
|
|
+ this.pantZonesMap(this.currentDistrictData[0], system.smsxt)
|
|
|
+ } else if (this.currentLevel === 0) {
|
|
|
+ this.pantProjectsMap(this.currentDistrictData[0], system.smsxt)
|
|
|
}
|
|
|
},
|
|
|
// 用于绘制集团地图
|
|
@@ -802,7 +803,6 @@ export default {
|
|
|
* 用于绘制项目的点
|
|
|
*/
|
|
|
pantProjectsMap (data,sysId) {
|
|
|
- console.log(data,sysId)
|
|
|
this.clearAllLayers()
|
|
|
let geo = this.provinceCities[data.cname]
|
|
|
this.panTo(geo.center, geo.zoom)
|
|
@@ -893,7 +893,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return `<div class="leaflet-mypopup-content">
|
|
|
- <div class="title"><span>${that.currentSelectedSys.smsxtname}</span>-<span>${that.currentZoneData.cname}</span></div>
|
|
|
+ <div class="title"><span>${that.currentSelectedSys.smsxtname}</span>-<span>${that.currentZone.cname}</span></div>
|
|
|
${html}</div>`
|
|
|
} else {
|
|
|
return ""
|
|
@@ -913,7 +913,7 @@ export default {
|
|
|
})
|
|
|
this.crumbsHtml = newArr
|
|
|
}
|
|
|
- this.currentZoneData = data
|
|
|
+ this.currentZone = data
|
|
|
},
|
|
|
|
|
|
},
|
|
@@ -1243,6 +1243,9 @@ export default {
|
|
|
width: 20px;
|
|
|
margin-right: 12px;
|
|
|
}
|
|
|
+ em{
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|