chenxr3 4 年 前
コミット
c65072f9be
共有2 個のファイルを変更した27 個の追加26 個の削除を含む
  1. 4 4
      ebc-middle-platform/src/modules/call-help/current.vue
  2. 23 22
      ebc-middle-platform/src/modules/orientation/orientation.vue

+ 4 - 4
ebc-middle-platform/src/modules/call-help/current.vue

@ -466,11 +466,11 @@ export default {
466 466
            .then((res) => {
467 467
              this.modal = false
468 468
              this.personLayer.eachLayer(layer => {
469
                this.map.removeLayer(layer)
470
                this.map.closePopup()
471 469
                if (layer.lineLayer && this.map.hasLayer(layer.lineLayer)) {
472 470
                  this.map.removeLayer(layer.lineLayer)
473 471
                }
472
                this.map.removeLayer(layer)
473
                this.map.closePopup()
474 474
              })
475 475
              this.load()
476 476
            })
@ -491,11 +491,11 @@ export default {
491 491
            .then((res) => {
492 492
              console.log(res)
493 493
              this.personLayer.eachLayer(layer => {
494
                this.map.removeLayer(layer)
495
                this.map.closePopup()
496 494
                if (layer.lineLayer && this.map.hasLayer(layer.lineLayer)) {
497 495
                  this.map.removeLayer(layer.lineLayer)
498 496
                }
497
                this.map.removeLayer(layer)
498
                this.map.closePopup()
499 499
              })
500 500
              this.load()
501 501
            })

+ 23 - 22
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -224,7 +224,7 @@ export default {
224 224
        currentIndex: 0
225 225
      },
226 226
      trackMap: null,
227
	  trackPath: null,
227
	    trackPath: null,
228 228
      rangeDate: '',
229 229
      rescueModal: false,
230 230
      formValidate: {
@ -414,7 +414,7 @@ export default {
414 414
              })
415 415
            })
416 416
            this.map.addLayer(point)
417
            this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -40])
417
            this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -40], url)
418 418
            coreEntity.point = point
419 419
          }
420 420
        }
@ -448,7 +448,7 @@ export default {
448 448
              businessTypeName = m.name
449 449
            }
450 450
          })
451
          this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -10])
451
          this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -10], '')
452 452
        }
453 453
      })
454 454
    },
@ -517,7 +517,7 @@ export default {
517 517
                    businessTypeName = m.name
518 518
                  }
519 519
                })
520
                this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -10])
520
                this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -10], '')
521 521
              }
522 522
            }
523 523
          })
@ -545,23 +545,24 @@ export default {
545 545
                })
546 546
                this.map.addLayer(point)
547 547
                var businessTypeName = '设备'
548
                var url
548 549
                this.toolTypes.forEach(t => {
549 550
                  if (e.coreEntityType == t.resourceToolType) {
551
                    url = t.iconUrl
550 552
                    businessTypeName = t.name
551 553
                  }
552 554
                })
553
                this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -40])
555
                this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName, [0, -40], url)
554 556
                la.point = point
555 557
              }
556 558
            }
557
            console.log('..............')
558 559
          })
559 560
        }
560 561
      })
561 562
      // this.loadMapArea()
562 563
      // this.loadCoreEntity()
563 564
    },
564
    getPopup(point, positionList, type, name, offset) {
565
    getPopup(point, positionList, type, name, offset, url) {
565 566
      // if (point.popup) {
566 567
      //   point.popup.remove()
567 568
      //   point.popup = null
@ -580,7 +581,11 @@ export default {
580 581
      })
581 582
      var content = '<div class="tips-item">'
582 583
      if (type) {
583
        content += '<div class="top"><div><b>' + type + '</b></div><div>' + name + '</div></div>'
584
        content += '<div class="top">'
585
        if (url) {
586
          content += '<div><img src="' + url + '" width="20" height="20"></div>'
587
        }
588
        content += '<div>' + name + '</div></div>'
584 589
        content += '<div class="container">'
585 590
        positionList.forEach(e => {
586 591
          content +=
@ -638,7 +643,7 @@ export default {
638 643
        point.setAttributes({'elementId': element.entityId})
639 644
        this.layer.personLayer.addLayer(point)
640 645
        // this.map.addLayer(point)
641
        this.getPopup(point, [element], '', '', [0, -10])
646
        this.getPopup(point, [element], '', '', [0, -10], '')
642 647
      })
643 648
      // this.map.setViewPort([points])
644 649
    },
@ -665,7 +670,7 @@ export default {
665 670
            // point.setAttributes({'elementId': element.entityId})
666 671
            // this.layer.personLayer.addLayer(point)
667 672
            // this.map.addLayer(point)
668
            this.getPopup(la, [element], '', '', [0, -10])
673
            this.getPopup(la, [element], '', '', [0, -10], '')
669 674
          }
670 675
        })
671 676
        if (is) {
@ -684,7 +689,7 @@ export default {
684 689
          point.setAttributes({'elementId': element.entityId})
685 690
          this.layer.personLayer.addLayer(point)
686 691
          // this.map.addLayer(point)
687
          this.getPopup(point, [element], '', '', [0, -10])
692
          this.getPopup(point, [element], '', '', [0, -10], '')
688 693
        }
689 694
      })
690 695
      // this.map.setViewPort([points])
@ -706,30 +711,22 @@ export default {
706 711
    },
707 712
    getClassByStatus(status) {
708 713
      switch (status) {
709
        case '060': // 救援人员 ------ 黄色
710
          return 'outline'
711
          break
712 714
        case '050': // 自动告警 ------ 红色
713
          return 'sos'
714
          break
715 715
        case '040': // 手动告警 ------ 红色
716 716
          return 'sos'
717 717
          break
718 718
        case '030': // 离线 ------ 灰色
719 719
          return 'offline'
720 720
          break
721
        case '060': // 救援人员 ------ 黄色
721 722
        case '020': // 进入了禁入区域 ------ 黄色
723
        case '015': // 在限制区域超时 ------ 黄色
722 724
          return 'outline'
723 725
          break
724
        case '010': // 限制区域超时 ------ 
725
          return 'outline'
726
          break
726
        case '010': // 进入限制区域(尚未超时 ------ 绿
727 727
        case '000': // 正常 ------ 绿色
728 728
          return 'normal'
729 729
          break
730
        case '015': // 进入限制区域(尚未超时) ------ 绿色
731
          return 'normal'
732
          break
733 730
        default:
734 731
          return 'normal'
735 732
      }
@ -946,6 +943,10 @@ export default {
946 943
      }
947 944
    },
948 945
    playback() {
946
      if (this.trackMap.hasLayer(this.trackPath)) {
947
        this.trackMap.removeLayer(this.trackPath)
948
        this.trackPath.hideTraceFrom(this.trackMap)
949
      }
949 950
      console.log(this.trackQueryCondition.currentIndex)
950 951
      var params = {}
951 952
      if (this.trackQueryCondition.currentIndex === 3) {