|
|
@@ -341,7 +341,7 @@ export default {
|
|
|
})
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == '') {
|
|
|
- console.log(res.data.data)
|
|
|
+ console.log(res.data.data, '拿到结果')
|
|
|
var data = res.data.data
|
|
|
|
|
|
this.massagebox(data[0])
|
|
|
@@ -350,10 +350,13 @@ export default {
|
|
|
},
|
|
|
massagebox(info) {
|
|
|
// 创建信息弹框
|
|
|
- console.log(info, '--')
|
|
|
+ console.log(info, '--', this.typelist)
|
|
|
var type = this.typelist.filter((item) => {
|
|
|
return item.id == info.device_type_id
|
|
|
})
|
|
|
+ if (type.length == 0) {
|
|
|
+ return
|
|
|
+ }
|
|
|
console.log(type, 'type--')
|
|
|
const infoWindow = new AMap.InfoWindow({
|
|
|
content:
|
|
|
@@ -1194,19 +1197,7 @@ export default {
|
|
|
handleBack() {
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
- updateInfoWindowContent(blockId, infoWindow) {
|
|
|
- mapService.fetchMapBlockDetail({ blockId }).then((res) => {
|
|
|
- const { irrgtaskStatus } = res.data
|
|
|
-
|
|
|
- if (irrgtaskStatus !== TASK_STATUS_TYPE.PENDING) {
|
|
|
- clearInterval(this.timer)
|
|
|
- }
|
|
|
-
|
|
|
- const { content: markerContent } = this.createWindowContent(res.data)
|
|
|
|
|
|
- infoWindow.setContent(markerContent)
|
|
|
- })
|
|
|
- },
|
|
|
locateBlockBySearchVal(val) {
|
|
|
if (!val || !this.blockList.length) return
|
|
|
const matchedBlock = this.blockList.find(
|
|
|
@@ -1288,15 +1279,6 @@ export default {
|
|
|
const infoWindow = this.addMarkerInfoWindow(position, deviceInfo)
|
|
|
infoWindow.open(this.map)
|
|
|
window.currentInfoWindow = infoWindow
|
|
|
- },
|
|
|
-
|
|
|
- updateIntervalTask(blockId, infoWindow) {
|
|
|
- this.updateInfoWindowContent(blockId, infoWindow)
|
|
|
- clearInterval(this.timer)
|
|
|
-
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.updateInfoWindowContent(blockId, infoWindow)
|
|
|
- }, 10000)
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|