|
|
@ -89,7 +89,8 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="m-pagination"> |
|
|
|
<el-pagination hide-on-single-page :current-page="demand.pageNo" |
|
|
|
<el-pagination hide-on-single-page |
|
|
|
:current-page="demand.pageNo" |
|
|
|
:page-size="demand.pageSize" |
|
|
|
:total="demand.total" |
|
|
|
background |
|
|
@ -369,30 +370,28 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
// import 'ol/ol.css' |
|
|
|
import { Map, View } from 'ol' |
|
|
|
import { Map, View } from 'ol'; |
|
|
|
import Feature from "ol/Feature.js"; |
|
|
|
import Overlay from 'ol/Overlay'; |
|
|
|
import { boundingExtent } from 'ol/extent.js'; |
|
|
|
import GeoJSON from 'ol/format/GeoJSON.js'; |
|
|
|
import Point from "ol/geom/Point.js"; |
|
|
|
import { DoubleClickZoom, Select } from 'ol/interaction.js'; |
|
|
|
import TileLayer from 'ol/layer/Tile.js'; |
|
|
|
import ImageLayer from 'ol/layer/Image'; |
|
|
|
import { Raster as RasterSource } from 'ol/source'; |
|
|
|
import XYZ from 'ol/source/XYZ.js'; |
|
|
|
import VectorLayer from 'ol/layer/Vector.js'; |
|
|
|
import VectorSource from 'ol/source/Vector.js'; |
|
|
|
import GeoJSON from 'ol/format/GeoJSON.js'; |
|
|
|
import Point from "ol/geom/Point.js"; |
|
|
|
import Feature from "ol/Feature.js"; |
|
|
|
import Overlay from 'ol/Overlay'; |
|
|
|
import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/interaction.js'; |
|
|
|
import { getCenter, boundingExtent } from 'ol/extent.js'; |
|
|
|
import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js'; |
|
|
|
import XYZ from 'ol/source/XYZ.js'; |
|
|
|
import { Fill, Icon, Stroke, Style, Text } from 'ol/style.js'; |
|
|
|
|
|
|
|
import nextTick from 'dai-js/tools/nextTick' |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import { requestGet, requestPost } from "@/js/dai/request"; |
|
|
|
import nextTick from 'dai-js/tools/nextTick'; |
|
|
|
import { Loading } from 'element-ui'; //引入Loading服务 |
|
|
|
import { requestPost, requestGet } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
|
|
|
|
|
|
|
import cptTb from "@/views/modules/visual/cpts/tb"; |
|
|
|
import cptCard from "@/views/modules/visual/cpts/card"; |
|
|
|
import ScreenLoading from "@/views/modules/visual/cpts/loading"; |
|
|
|
import cptTb from "@/views/modules/visual/cpts/tb"; |
|
|
|
import People from "../../basicinfo/people"; |
|
|
|
|
|
|
|
var centerPointGlobal = [120.664619, 36.504963] |
|
|
@ -513,7 +512,7 @@ let reverseFunc = function (pixelsTemp) { |
|
|
|
|
|
|
|
const vueGis = { |
|
|
|
name: 'HomeMap', |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
centerPoint: [],//中心点位置 |
|
|
|
zoom: 14,//缩放范围:区14 |
|
|
@ -679,7 +678,7 @@ const vueGis = { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
async mounted() { |
|
|
|
|
|
|
|
//加载组织数据 |
|
|
|
await this.loadOrgData() |
|
|
@ -714,12 +713,12 @@ const vueGis = { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
toPeople () { |
|
|
|
toPeople() { |
|
|
|
this.showPeopleInfo = true |
|
|
|
}, |
|
|
|
|
|
|
|
//添加覆盖层 |
|
|
|
addOverlay () { |
|
|
|
addOverlay() { |
|
|
|
// 使用变量存储弹窗所需的 DOM 对象 |
|
|
|
var container = document.getElementById("popup"); |
|
|
|
var closer = document.getElementById("popup-closer"); |
|
|
@ -751,7 +750,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//注册地图点击事件 |
|
|
|
addMapClick () { |
|
|
|
addMapClick() { |
|
|
|
let _that = this |
|
|
|
|
|
|
|
map.on("click", function (evt) { |
|
|
@ -768,7 +767,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//点击项目 |
|
|
|
async clickMapVolunteer (info) { |
|
|
|
async clickMapVolunteer(info) { |
|
|
|
|
|
|
|
if (!info.id) { |
|
|
|
return false |
|
|
@ -816,7 +815,7 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async loadResi (info) { |
|
|
|
async loadResi(info) { |
|
|
|
const url = "/epmetuser/icresiuser/resi-brief/" + info.id |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" |
|
|
|
|
|
|
@ -868,7 +867,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadPublicService (info) { |
|
|
|
async loadPublicService(info) { |
|
|
|
const url = "/gov/org/icPublicService/detail" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icPublicService/detail" |
|
|
|
|
|
|
@ -896,7 +895,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadEvent (info) { |
|
|
|
async loadEvent(info) { |
|
|
|
const url = "/governance/icEvent/detail"; |
|
|
|
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/eventDetail/" + this.eventId; |
|
|
|
|
|
|
@ -917,7 +916,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadDangerousChemicals (info) { |
|
|
|
async loadDangerousChemicals(info) { |
|
|
|
const url = "/gov/org/icDangerousChemicals/detail" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icDangerousChemicals/detail" |
|
|
|
|
|
|
@ -948,7 +947,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadCityManagement (info) { |
|
|
|
async loadCityManagement(info) { |
|
|
|
const url = "/gov/org/icCityManagement/detail" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icCityManagement/detail" |
|
|
|
|
|
|
@ -976,7 +975,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadCommunityOrg (info) { |
|
|
|
async loadCommunityOrg(info) { |
|
|
|
// const url = "/gov/org/icCityManagement/detail" |
|
|
|
const url = "/heart/iccommunityselforganization/community-self-org-detail/" + info.id |
|
|
|
|
|
|
@ -1004,7 +1003,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadSuperiorResource (info) { |
|
|
|
async loadSuperiorResource(info) { |
|
|
|
const url = "/gov/org/icSuperiorResource/detail" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/icSuperiorResource/detail" |
|
|
|
|
|
|
@ -1032,7 +1031,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async loadEnterprisePartrol (info) { |
|
|
|
async loadEnterprisePartrol(info) { |
|
|
|
const url = "/gov/org/enterprise/detail/" + info.id |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/enterprise/detail" |
|
|
|
|
|
|
@ -1048,7 +1047,7 @@ const vueGis = { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async loadGroupRent (info) { |
|
|
|
async loadGroupRent(info) { |
|
|
|
const url = "/gov/org/ichouse/" + info.id |
|
|
|
|
|
|
|
const { data, code, msg } = await requestGet(url) |
|
|
@ -1064,7 +1063,7 @@ const vueGis = { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async loadPartyUnit (info) { |
|
|
|
async loadPartyUnit(info) { |
|
|
|
const url = '/heart/icpartyunit/detail' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail' |
|
|
|
let params = { |
|
|
@ -1089,7 +1088,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleShowPopup (coordinate) { |
|
|
|
handleShowPopup(coordinate) { |
|
|
|
|
|
|
|
// console.log(this.overlay.getElement()) |
|
|
|
let content = document.getElementById("popup-content"); |
|
|
@ -1102,14 +1101,14 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
// 关闭弹窗 |
|
|
|
handleClosePopup () { |
|
|
|
handleClosePopup() { |
|
|
|
this.overlay.setPosition(undefined); |
|
|
|
document.getElementById("popup-closer").blur(); |
|
|
|
return false; |
|
|
|
}, |
|
|
|
|
|
|
|
//点击图层 |
|
|
|
async handleClickCoverage (index) { |
|
|
|
async handleClickCoverage(index) { |
|
|
|
this.demand.pageNo = 1 |
|
|
|
this.coverageTypesList[index].select = !this.coverageTypesList[index].select |
|
|
|
let item = this.coverageTypesList[index] |
|
|
@ -1130,7 +1129,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//点击类别 |
|
|
|
async handleClickCategory (index, colIndex) { |
|
|
|
async handleClickCategory(index, colIndex) { |
|
|
|
this.demand.pageNo = 1 |
|
|
|
this.categoryListshow[index][colIndex].sel = !this.categoryListshow[index][colIndex].sel |
|
|
|
|
|
|
@ -1154,13 +1153,13 @@ const vueGis = { |
|
|
|
this.getTable(); |
|
|
|
this.getMapTable(); |
|
|
|
}, |
|
|
|
handleSearch () { |
|
|
|
handleSearch() { |
|
|
|
this.demand.pageNo = 1 |
|
|
|
this.getTable(); |
|
|
|
this.getMapTable(); |
|
|
|
}, |
|
|
|
// |
|
|
|
handleClickRow (index) { |
|
|
|
handleClickRow(index) { |
|
|
|
let selData = this.tableList[index] |
|
|
|
if (selData.longitude && selData.latitude) { |
|
|
|
mapView.setCenter([selData.longitude, selData.latitude]); |
|
|
@ -1171,12 +1170,12 @@ const vueGis = { |
|
|
|
// alert(index) |
|
|
|
}, |
|
|
|
|
|
|
|
handlePageNoChange_demand (val) { |
|
|
|
handlePageNoChange_demand(val) { |
|
|
|
this.demand.pageNo = val; |
|
|
|
this.getTable(); |
|
|
|
}, |
|
|
|
|
|
|
|
async loadCategoryList () { |
|
|
|
async loadCategoryList() { |
|
|
|
const url = "/gov/org/coverage/categoryList" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/coverage/categoryList" |
|
|
|
let params = { |
|
|
@ -1219,7 +1218,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载组织数据 |
|
|
|
async getTable () { |
|
|
|
async getTable() { |
|
|
|
this.demand.loading = true |
|
|
|
const url = "/data/aggregator/coverage/dataList"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/coverage/dataList"; |
|
|
@ -1265,7 +1264,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
//加载组织数据 |
|
|
|
async getMapTable () { |
|
|
|
async getMapTable() { |
|
|
|
|
|
|
|
const url = "/data/aggregator/coverage/dataList"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/coverage/dataList"; |
|
|
@ -1298,7 +1297,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载icon图标 |
|
|
|
loadIcon () { |
|
|
|
loadIcon() { |
|
|
|
|
|
|
|
iconSource.clear()//清空多边形标注 |
|
|
|
if (this.iconArrays && this.iconArrays.length > 0) { |
|
|
@ -1346,7 +1345,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//刷新地图 |
|
|
|
async refreshMap (isRefreshView) { |
|
|
|
async refreshMap(isRefreshView) { |
|
|
|
|
|
|
|
//加载组织数据 |
|
|
|
await this.loadOrgData() |
|
|
@ -1368,7 +1367,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//设置地图定位的中心点和缩放级别 |
|
|
|
setMapLocation () { |
|
|
|
setMapLocation() { |
|
|
|
if (!this.zoom) { |
|
|
|
this.setZoom(this.orgData.agencyLevel) |
|
|
|
} |
|
|
@ -1419,7 +1418,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//返回所选组织 |
|
|
|
handleClickRouter (index) { |
|
|
|
handleClickRouter(index) { |
|
|
|
|
|
|
|
this.showPeopleInfo = false |
|
|
|
|
|
|
@ -1428,7 +1427,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载组织数据 |
|
|
|
async loadOrgData () { |
|
|
|
async loadOrgData() { |
|
|
|
|
|
|
|
const url = "/gov/org/agency/maporg" |
|
|
|
let params = { |
|
|
@ -1458,7 +1457,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载父级组织多边形 |
|
|
|
loadParentPolygon () { |
|
|
|
loadParentPolygon() { |
|
|
|
parentSource.clear()//清空标注 |
|
|
|
|
|
|
|
let featureData = []//标注数据 |
|
|
@ -1519,7 +1518,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载当前园区的标注 |
|
|
|
loadPolygon (subAgencyArray) { |
|
|
|
loadPolygon(subAgencyArray) { |
|
|
|
polygonSource.clear()//清空多边形标注 |
|
|
|
iconSource.clear()//清空多边形标注 |
|
|
|
|
|
|
@ -1629,7 +1628,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//根据组织层级设置缩放级别 |
|
|
|
setZoom (agencyLevel) { |
|
|
|
setZoom(agencyLevel) { |
|
|
|
if (agencyLevel === 'district') { |
|
|
|
this.zoom = 12 |
|
|
|
} else if (agencyLevel === 'street') { |
|
|
@ -1642,7 +1641,7 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
firstCenterMap () { |
|
|
|
firstCenterMap() { |
|
|
|
this.centerPoint = [] |
|
|
|
if (this.orgData.longitude && this.orgData.latitude) { |
|
|
|
this.centerPoint.push(this.orgData.longitude) |
|
|
@ -1657,7 +1656,7 @@ const vueGis = { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
initMap () { |
|
|
|
initMap() { |
|
|
|
this.firstCenterMap() |
|
|
|
|
|
|
|
gaodeMapLayer = new TileLayer({ |
|
|
@ -1707,7 +1706,7 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
//添加标注图层 |
|
|
|
addParentLayer () { |
|
|
|
addParentLayer() { |
|
|
|
parentSource = new VectorSource({ |
|
|
|
//features: (new GeoJSON()).readFeatures(geojsonObject) |
|
|
|
}); |
|
|
@ -1725,7 +1724,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//添加标注图层 |
|
|
|
addPolygonLayer () { |
|
|
|
addPolygonLayer() { |
|
|
|
polygonSource = new VectorSource({ |
|
|
|
//features: (new GeoJSON()).readFeatures(geojsonObject) |
|
|
|
}); |
|
|
@ -1777,7 +1776,7 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
addIconLayer () { |
|
|
|
addIconLayer() { |
|
|
|
iconSource = new VectorSource({ |
|
|
|
//features: (new GeoJSON()).readFeatures(geojsonObject) |
|
|
|
}); |
|
|
@ -1792,7 +1791,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//开启加载动画 |
|
|
|
startLoading () { |
|
|
|
startLoading() { |
|
|
|
loading = Loading.service({ |
|
|
|
lock: true, //是否锁定 |
|
|
|
text: '正在加载……', //加载中需要显示的文字 |
|
|
@ -1802,7 +1801,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
|
|
|
|
//结束加载动画 |
|
|
|
endLoading () { |
|
|
|
endLoading() { |
|
|
|
//clearTimeout(timer); |
|
|
|
if (loading) { |
|
|
|
loading.close(); |
|
|
@ -1818,7 +1817,7 @@ const vueGis = { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
|
|
|
|
mapHeight () { |
|
|
|
mapHeight() { |
|
|
|
|
|
|
|
return this.clientHeight - 120; |
|
|
|
|
|
|
|