显示设备实时位置和告警点位

This commit is contained in:
2023-10-19 19:53:15 +08:00
parent bf48ed20fc
commit ae6a2de2c1
2 changed files with 38 additions and 6 deletions

View File

@@ -1,5 +1,7 @@
- Vue2脚手架搭建项目流程(脚手架、sass、router、vant、axiso、vuex)
https://blog.csdn.net/weixin_53934815/article/details/129093796 https://blog.csdn.net/weixin_53934815/article/details/129093796
- Vue2创建移动端项目实战教程创建移动端项目保姆级教程接上一篇创建Vue2项目
https://blog.csdn.net/qq_51055690/article/details/126948901 https://blog.csdn.net/qq_51055690/article/details/126948901
https://blog.csdn.net/qq_40323256/article/details/120019157 https://blog.csdn.net/qq_40323256/article/details/120019157

View File

@@ -81,7 +81,9 @@ export default {
drawPlanningPathLayer: null, drawPlanningPathLayer: null,
draw: null, draw: null,
snap: null, snap: null,
pcDrawType: "" pcDrawType: "",
equipmentLayer: {},
alarmLayer: {}
}; };
}, },
mounted() { mounted() {
@@ -477,6 +479,18 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 50 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() { queryAlarmList() {
@@ -486,10 +500,26 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 50 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() { switchFullScreen() {
location.href = "uniwebview://action?function=switchBigScreen" location.href = "uniwebview://action?function=switchBigScreen"
},
addPointWidthCoordinate(coordinate, type) {
console.log("addPointWidthCoordinate", type, coordinate)
} }
}, },
}; };