|
@@ -140,7 +140,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
this.queryParams.deptId = res.user.deptId;//loginDeptId |
|
|
this.queryParams.deptId = res.user.deptId;//loginDeptId |
|
|
//列表请求 |
|
|
//列表请求 |
|
|
this.getAllList(res.user.deptId); |
|
|
|
|
|
|
|
|
// this.getAllList(res.user.deptId); |
|
|
// 加载地图 |
|
|
// 加载地图 |
|
|
this.initMap(res.user.deptId); |
|
|
this.initMap(res.user.deptId); |
|
|
|
|
|
|
|
@@ -254,12 +254,13 @@ export default { |
|
|
// 加载地图 |
|
|
// 加载地图 |
|
|
initMap (deptId) { |
|
|
initMap (deptId) { |
|
|
gis = new GisUtils('map2') |
|
|
gis = new GisUtils('map2') |
|
|
gis.addTianDiTuLayer() |
|
|
|
|
|
gis.addAnnotationLayer() |
|
|
|
|
|
// // 获取资源列表 |
|
|
// // 获取资源列表 |
|
|
this.getResourceList(deptId); |
|
|
this.getResourceList(deptId); |
|
|
|
|
|
gis.addTianDiTuLayer() |
|
|
|
|
|
gis.addAnnotationLayer() |
|
|
let dept2 = this.addrOptions[0]; |
|
|
let dept2 = this.addrOptions[0]; |
|
|
//console.log(this.addrOptions, 'this.addrOptions'); |
|
|
//console.log(this.addrOptions, 'this.addrOptions'); |
|
|
|
|
|
console.log(dept2.deptLevel) |
|
|
if (dept2.deptLevel === '5') { |
|
|
if (dept2.deptLevel === '5') { |
|
|
// 登录身份为市级领导 |
|
|
// 登录身份为市级领导 |
|
|
this.userRole = 'cityLeader'; |
|
|
this.userRole = 'cityLeader'; |
|
@@ -274,7 +275,7 @@ export default { |
|
|
this.currentDeptLevel = '4'; |
|
|
this.currentDeptLevel = '4'; |
|
|
// 添加乡镇边界 |
|
|
// 添加乡镇边界 |
|
|
this.addTownBorder(dept2.children.map(item => item.id)); |
|
|
this.addTownBorder(dept2.children.map(item => item.id)); |
|
|
gis.getView().setZoom(11); |
|
|
|
|
|
|
|
|
gis.getView().setZoom(13); |
|
|
} else if (dept2.deptLevel === '3') { |
|
|
} else if (dept2.deptLevel === '3') { |
|
|
// 登录身份为镇级领导 |
|
|
// 登录身份为镇级领导 |
|
|
this.userRole = 'townLeader'; |
|
|
this.userRole = 'townLeader'; |
|
@@ -288,6 +289,9 @@ export default { |
|
|
if (dept2.children) { |
|
|
if (dept2.children) { |
|
|
this.addDeptLayer(dept2.children); |
|
|
this.addDeptLayer(dept2.children); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// gis.getMapContainer().getView().setCenter(fromLonLat([dept2.lng, dept2.lat])); |
|
|
|
|
|
|
|
|
gis.getMapContainer().on("click", (evt) => { |
|
|
gis.getMapContainer().on("click", (evt) => { |
|
|
let feature = gis.getMapContainer().forEachFeatureAtPixel( |
|
|
let feature = gis.getMapContainer().forEachFeatureAtPixel( |
|
|
evt.pixel, |
|
|
evt.pixel, |
|
|