显示设备实时位置和告警点位
This commit is contained in:
@@ -34,7 +34,7 @@ import * as interaction from 'ol/interaction'; // 交互
|
||||
import {OL as ol} from "plot-ol/plottingol";
|
||||
import GeoJSON from 'ol/format/GeoJSON'
|
||||
import service from "@/utils/service";
|
||||
import {appInit,getStatisFileUrl} from "../utils/publicFun";
|
||||
import {appInit, getStatisFileUrl} from "../utils/publicFun";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -81,7 +81,9 @@ export default {
|
||||
drawPlanningPathLayer: null,
|
||||
draw: null,
|
||||
snap: null,
|
||||
pcDrawType: ""
|
||||
pcDrawType: "",
|
||||
equipmentLayer: {},
|
||||
alarmLayer: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -459,10 +461,10 @@ export default {
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
this.drawPlanningPathLayer.getSource().clear();
|
||||
// this.map.removeLayer(this.drawPlanningPathLayer)
|
||||
// this.map.addLayer(this.drawPlanningPathLayer)
|
||||
// on cancel
|
||||
this.drawPlanningPathLayer.getSource().clear();
|
||||
// this.map.removeLayer(this.drawPlanningPathLayer)
|
||||
// this.map.addLayer(this.drawPlanningPathLayer)
|
||||
});
|
||||
// this.map.removeInteraction(draw); // 在此处清除交互会触发地图默认的双击放大
|
||||
});
|
||||
@@ -477,6 +479,18 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 50
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.status == 200) {
|
||||
res.data.result.records.map(record => {
|
||||
try {
|
||||
if (record.leastLocation.length > 0) {
|
||||
this.map.removeInteraction(record.leastLocation, "equipment")
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
queryAlarmList() {
|
||||
@@ -486,10 +500,26 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 50
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.status == 200) {
|
||||
res.data.result.records.map(record => {
|
||||
try {
|
||||
if (record.location.length > 0) {
|
||||
this.map.removeInteraction(record.location, "alarm")
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
switchFullScreen() {
|
||||
location.href = "uniwebview://action?function=switchBigScreen"
|
||||
},
|
||||
addPointWidthCoordinate(coordinate, type) {
|
||||
console.log("addPointWidthCoordinate", type, coordinate)
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user