diff --git a/epmet-oper-web/src/views/modules/workSys/basicInfoMap.vue b/epmet-oper-web/src/views/modules/workSys/basicInfoMap.vue
new file mode 100644
index 0000000..21e995c
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/workSys/basicInfoMap.vue
@@ -0,0 +1,602 @@
+
+
+
+
+
组织路由
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-oper-web/src/views/modules/workSys/mapConfig.vue b/epmet-oper-web/src/views/modules/workSys/mapConfig.vue
index 46a996d..cd16d9d 100644
--- a/epmet-oper-web/src/views/modules/workSys/mapConfig.vue
+++ b/epmet-oper-web/src/views/modules/workSys/mapConfig.vue
@@ -165,7 +165,7 @@ const vueGis = {
this.addPolygonLayer()
//加载当前园区的标注
- this.loadPolygon()
+ this.loadPolygon(this.subAgencyArray)
},
methods: {
@@ -198,7 +198,7 @@ const vueGis = {
await this.loadOrgData()
//加载当前园区的标注
- await this.loadPolygon()
+ await this.loadPolygon(this.subAgencyArray)
//重置地图中心点
if (isRefreshView) {
@@ -266,14 +266,14 @@ const vueGis = {
},
//加载当前园区的标注
- loadPolygon () {
+ loadPolygon (subAgencyArray) {
polygonSource.clear()//清空变电站标注
let featureData = []//标注数据
- if (this.subAgencyArray && this.subAgencyArray.length > 0) {//判断是否存在下级标注
+ if (subAgencyArray && subAgencyArray.length > 0) {//判断是否存在下级标注
let oneData = {}
- this.subAgencyArray.forEach(agencyItem => {
+ subAgencyArray.forEach(agencyItem => {
if (agencyItem.coordinates && agencyItem.coordinates !== '') {//如果有坐标
oneData = {
@@ -421,6 +421,7 @@ const vueGis = {
})
+ //去除双击放大效果
const dblClickInteraction = map
.getInteractions()
.getArray()
@@ -538,30 +539,20 @@ const vueGis = {
if (this.method === 'mEditPolygon') {
this.method = ""
map.removeInteraction(draw);
+ this.loadPolygon(this.subAgencyArray)
} else {
- this.method = 'mEditPolygon';
- draw = new Draw({
- source: polygonSource,
- type: "Polygon"
- });
- map.addInteraction(draw);
- draw.on('drawend', feature => {
- this.polygonCoor = feature.feature.values_.geometry.flatCoordinates
- var coorString = ""
- for (var i = 0; i < this.polygonCoor.length; i++) {
- coorString = coorString + this.polygonCoor[i] + ","
- }
- if (this.polygonCoor.length > 0) {
- coorString = coorString.substring(0, coorString.length - 1)
- }
- console.log(coorString)
+ this.method = 'mEditPolygon';
+ //暂时隐藏要重新绘制的标注
+ this.hidePolygon()
- });
+ //绘制
+ this.drawPolygon()
}
},
+
//点击【删除标注】
handleDelPolygon () {
map.removeInteraction(draw);
@@ -587,6 +578,44 @@ const vueGis = {
},
+ //隐藏Polygon(前端隐藏,非删除)
+ hidePolygon () {
+ let polygonTempArray = []
+
+ this.subAgencyArray.forEach(element => {
+ if (element.id !== this.selAgencyId) {
+ polygonTempArray.push(element)
+ }
+ });
+
+ this.loadPolygon(polygonTempArray)
+
+ },
+
+ //绘制Polygon
+ drawPolygon () {
+ draw = new Draw({
+ source: polygonSource,
+ type: "Polygon"
+ });
+ map.addInteraction(draw);
+ draw.on('drawend', feature => {
+ this.polygonCoor = feature.feature.values_.geometry.flatCoordinates
+
+ let coorString = ""
+ for (let i = 0; i < this.polygonCoor.length; i++) {
+ coorString = coorString + this.polygonCoor[i] + ","
+ }
+ if (this.polygonCoor.length > 0) {
+ coorString = coorString.substring(0, coorString.length - 1)
+ }
+ console.log(coorString)
+ this.method = ""
+ map.removeInteraction(draw);
+ this.addPolygon(coorString)
+
+ });
+ },
//新增标注
async addPolygon (coorString) {
const url = "/gov/org/agency/mapaddarea"