chenxr3 4 anni fa
parent
commit
4756df9027

+ 2 - 0
ebc-middle-platform/.aid/aid.js

@ -55,5 +55,7 @@ module.exports = {
55 55
    }
56 56
    return result
57 57
  },
58
  imagePrefix: '/energy/',
59
  staticPrefix: '/energy/',
58 60
  outputPrefix: '/energy/' // 构建后index.html中资源路径的前缀
59 61
}

+ 2 - 0
ebc-middle-platform/src/conf/services.js

@ -70,6 +70,8 @@ export default {
70 70
    SEARCHSTAFF: '/staff/staffId/', // 根据组织id新建post, 修改put,删除delete员工信息
71 71
    QUERYSTAFF: '/staff/queryStaff', // 根据组织id查找员工列表
72 72
    MAP_LOCATION_VIEW: '/locationManagement/loadMapLocationView', // 初始化人员定位页面的数据
73
    INIT_STATUS_COUNT: '/locationManagement/loadEmployeeStatusCount', // 初始化顶部状态人数统计
74
    INIT_LOCATION_DETAILS: '/locationManagement/loadLocationDetails', // 位置信息,围栏数据的初始化
73 75
    BIND_DEVICE: '/workEmployee/queryEmployeeBindDeviceList', // 查询绑定的人员列表
74 76
    FENCE_BY_DEPARTMENT: '/mapTag/queryAllMapTagByOrg', // 按部门查询查询围栏
75 77
    EQUIPMENT_NOT_BIND: '/equipment/queryAllEquipmentNotBind' // 查询所有未绑定的设备

+ 13 - 15
ebc-middle-platform/src/modules/orientation/orientation.scss

@ -1,8 +1,8 @@
1 1
.orientation-container{
2 2
    width: 100%;
3
    height: 88%;
4
    padding-left: 40px;
5
    padding-right: 40px;
3
    height: 90%;
4
    padding-left: 0px;
5
    padding-right: 0px;
6 6
    box-sizing: border-box;
7 7
    .top-container{
8 8
      display: flex;
@ -27,25 +27,25 @@
27 27
            height: 10px;
28 28
            margin-top: 15px;
29 29
            background-color: #19BB20;
30
          }  
30
          }
31 31
          .off-line{
32 32
            width: 10px;
33 33
            height: 10px;
34 34
            margin-top: 15px;
35 35
            background-color: #2B3944;
36
          } 
36
          }
37 37
          .out-line{
38 38
            width: 10px;
39 39
            height: 10px;
40 40
            margin-top: 15px;
41 41
            background-color: #FAAD14;
42
          } 
42
          }
43 43
          .sos{
44 44
            width: 10px;
45 45
            height: 10px;
46 46
            margin-top: 15px;
47 47
            background-color:#F5222D;
48
          } 
48
          }
49 49
        }
50 50
        .time{
51 51
          font-size: 16px;
@ -77,7 +77,7 @@
77 77
    .label{
78 78
      position: absolute;
79 79
      z-index: 10;
80
      right: 150px;
80
      right: 50px;
81 81
      bottom: 77px;
82 82
      background-color: #59748A;
83 83
      font-size: 12px;
@ -123,7 +123,7 @@
123 123
            width: 10px;
124 124
            height: 10px;
125 125
            background-size: 100% 100%;
126
            background-image: url('/static/images/风机.png');
126
            background-image: url('/static/images/fan.png');
127 127
            margin-top: 10px;
128 128
            margin-right: 5px;
129 129
          }
@ -131,7 +131,7 @@
131 131
            width: 10px;
132 132
            height: 10px;
133 133
            background-size: 100% 100%;
134
            background-image: url('/static/images/升压站画面.png');
134
            background-image: url('/static/images/booster.png');
135 135
            margin-top: 10px;
136 136
            margin-right: 5px;
137 137
          }
@ -139,7 +139,6 @@
139 139
            width: 10px;
140 140
            height: 10px;
141 141
            background-size: 100% 100%;
142
            background-image: url('/static/images/船舶.png');
143 142
            margin-top: 10px;
144 143
            margin-right: 5px;
145 144
          }
@ -153,7 +152,6 @@
153 152
          .dzwl{
154 153
            width: 10px;
155 154
            height: 10px;
156
            background-color: #A74B5C;
157 155
            margin-top: 10px;
158 156
            margin-right: 5px;
159 157
          }
@ -238,7 +236,7 @@ background: #344979!important;
238 236
.aimap-popup-tip{
239 237
  background-color: #344979;
240 238
}
241
} 
239
}
242 240
.point-out{
243 241
  color: #fff;
244 242
  background-color: #147BD1;
@ -300,7 +298,7 @@ background: #344979!important;
300 298
      width: 25px;
301 299
      height: 25px;
302 300
      background-size: 100% 100%;
303
      background-image: url(/static/images/风机.png);
301
      background-image: url(/static/images/fan.png);
304 302
      margin-top: 7.5px;
305 303
    }
306 304
    .alarm{
@ -459,4 +457,4 @@ background: #344979!important;
459 457
    background-color: #D9D9D9;
460 458
    color: #000000;
461 459
  }
462
}
460
}

+ 192 - 42
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -2,22 +2,22 @@
2 2
  <div class="orientation-container">
3 3
    <div class="top-container">
4 4
      <div class="person-info">
5
        <div>全部<span class="number">{{ personStatistics.all }}</span>人</div>
5
        <div>全部<span class="number">{{ personStatistics.allNum }}</span>人</div>
6 6
        <div>
7 7
          <div class="normal"></div>
8
          正常<span class="number">{{ personStatistics.normal }}</span>人
8
          正常<span class="number">{{ personStatistics.normalNum }}</span>人
9 9
        </div>
10 10
        <div>
11 11
          <div class="off-line"></div>
12
          离线<span class="number">{{ personStatistics.offLine }}</span>人
12
          离线<span class="number">{{ personStatistics.offlineNum }}</span>人
13 13
        </div>
14 14
        <div>
15 15
          <div class="out-line"></div>
16
          违规<span class="number">{{ personStatistics.outLine }}</span>人
16
          违规<span class="number">{{ personStatistics.violationNum }}</span>人
17 17
        </div>
18 18
        <div>
19 19
          <div class="sos"></div>
20
          SOS<span class="number">{{ personStatistics.sos }}</span>人
20
          SOS<span class="number">{{ personStatistics.sosNum }}</span>人
21 21
        </div>
22 22
        <div class="time">当前时间:{{ nowDate | dateFormat }}</div>
23 23
      </div>
@ -42,45 +42,33 @@
42 42
    <div id="div1" style="height: 100%"></div>
43 43
    <div class="label">
44 44
      <div class="item">
45
        <div :class="mapShow.sos?'':'cancel'" @click="showOrHide(layer.personLayer,'sos',['4','5'])">
45
        <div :class="mapShow.sos?'':'cancel'">
46 46
          <div class="sos"></div>
47 47
          <div>SOS</div>
48 48
        </div>
49
        <div :class="mapShow.offLine?'':'cancel'" @click="showOrHide(layer.personLayer,'offLine',['1'])">
49
        <div :class="mapShow.offLine?'':'cancel'">
50 50
          <div class="offline"></div>
51 51
          <div>离线</div>
52 52
        </div>
53
        <div :class="mapShow.outLine?'':'cancel'" @click="showOrHide(layer.personLayer,'outLine',['2','3'])">
53
        <div :class="mapShow.outLine?'':'cancel'">
54 54
          <div class="outline"></div>
55 55
          <div>违规</div>
56 56
        </div>
57
        <div :class="mapShow.normal?'':'cancel'" @click="showOrHide(layer.personLayer,'normal',['0'])">
57
        <div :class="mapShow.normal?'':'cancel'">
58 58
          <div class="normal"></div>
59 59
          <div>正常</div>
60 60
        </div>
61 61
      </div>
62 62
      <div class="item">
63
        <div :class="mapShow.fenji?'':'cancel'" @click="showOrHide(layer.equipmentLayer,'fenji',['002'])">
64
          <div class="fenji"></div>
65
          <div>风机</div>
66
        </div>
67
        <div :class="mapShow.shengyazhan?'':'cancel'" @click="showOrHide(layer.equipmentLayer,'shengyazhan',['003'])">
68
          <div class="shengyazhan"></div>
69
          <div>升压站</div>
70
        </div>
71
        <div :class="mapShow.chuanbo?'':'cancel'" @click="showOrHide(layer.equipmentLayer,'chuanbo',['001'])">
72
          <div class="chuanbo"></div>
73
          <div>船舶</div>
63
        <div v-for="(item, index) in toolTypes" :key="index" :class="item.show?'':'cancel'" @click="showOrHide(layer.equipmentLayer,item)">
64
          <div :style="{ 'background-image': 'url('+item.iconUrl+')' }" class="chuanbo"></div>
65
          <div>{{ item.name }}</div>
74 66
        </div>
75 67
      </div>
76 68
      <div class="item">
77
        <div :class="mapShow.zyqy?'':'cancel'" @click="showOrHide(layer.areaLayer,'zyqy',['2'])">
78
          <div class="zyqy"></div>
79
          <div>作业区域</div>
80
        </div>
81
        <div :class="mapShow.dzwl?'':'cancel'" @click="showOrHide(layer.areaLayer,'dzwl',['3'])">
82
          <div class="dzwl"></div>
83
          <div>电子围栏</div>
69
        <div v-for="(item, index) in markTypes" :key="index" :class="item.show?'':'cancel'" @click="showOrHide(layer.areaLayer,item)">
70
          <div :style="{ background: item.color}" class="dzwl"></div>
71
          <div>{{ item.name }}</div>
84 72
        </div>
85 73
      </div>
86 74
    </div>
@ -206,6 +194,12 @@ export default {
206 194
    return {
207 195
      map: null,
208 196
      pointsarr: null,
197
      markTypes: [],
198
      toolTypes: [],
199
      aggregatedMapAreaList: {
200
        mapAreas: [], // 围栏集合
201
        coreEntitys: [] // 聚合设备集合
202
      },
209 203
      personStatistics: {
210 204
        all: 0,
211 205
        offLine: 0,
@ -334,9 +328,12 @@ export default {
334 328
    }
335 329
  },
336 330
  mounted() {
331
    this.getTagType()
332
    this.getToolType()
337 333
    this.getGisToken().then(() => { // 获取gistoken后加载地图
338 334
      this.initMap()
339 335
      this.initTrackMap()
336
      this.initStatusCount()
340 337
    })
341 338
    setInterval(() => { // 当前时间
342 339
      this.nowDate = new Date()
@ -362,6 +359,32 @@ export default {
362 359
          // 请求失败处理...
363 360
        })
364 361
    },
362
    getTagType: function () {
363
      this.$test
364
        .post(services.mapTag.MAP_TAG_TYPE, {})
365
        .then((res) => {
366
          // 请求成功处理...
367
          this.markTypes = res.data
368
          this.markTypes.forEach(e => {
369
            e.show = true
370
          })
371
        })
372
        .catch((res) => {
373
          // 请求失败处理...
374
        })
375
    },
376
    getToolType: function () {
377
      this.$test.post(services.equipment.EQUIPMENT_TYPE, {}
378
      ).then(res => {
379
        // 请求成功处理...
380
        this.toolTypes = res.data
381
        this.toolTypes.forEach(e => {
382
          e.show = true
383
        })
384
      }).catch(res => {
385
        // 请求失败处理...
386
      })
387
    },
365 388
    initMap() { // 加载主屏地图
366 389
      if (this.map != null && this.map != '') {
367 390
        this.map.remove()
@ -378,11 +401,118 @@ export default {
378 401
        { opacity: 0.5 }
379 402
      )
380 403
      this.map.addLayer(la)
381
382 404
      Ai.Scale({ position: 'bottomright' }).addTo(this.map)
383 405
      Ai.Zoom({ type: 'small' }).addTo(this.map)
384
      this.loadMapArea()
385
      this.loadMapView()
406
      this.$test.post(services.organization.INIT_LOCATION_DETAILS, {}
407
      ).then(res => {
408
        // 请求成功处理...
409
        res.data.aggregatedMapAreaList.forEach(e => {
410
          if (e.businessType) {
411
            this.aggregatedMapAreaList.mapAreas.push(e)
412
          } else {
413
            this.aggregatedMapAreaList.coreEntitys.push(e)
414
          }
415
        })
416
        this.loadMapArea()
417
        this.loadCoreEntity()
418
        this.loadMapView()
419
      }).catch(res => {
420
        // 请求失败处理...
421
      })
422
    },
423
    loadMapArea() {
424
      this.map.addLayer(this.layer.areaLayer)
425
      this.aggregatedMapAreaList.mapAreas.forEach(e => {
426
        var coverWktStr = e.mapAreaContent
427
        var coverLayer = Ai.Polygon(coverWktStr, {color: e.areaColor, opacity: 1.0})
428
        coverLayer.setAttributes({'mapAreaBusinessType': e.businessType})
429
        this.layer.areaLayer.addLayer(coverLayer)
430
        if (e.ebcEntityPositionList.length > 0) {
431
          var la = coverLayer.getCenter()
432
          var classStr = this.getClassByStatus(e.locationStatus)
433
          var point = Ai.Point(la, {
434
            icon: Ai.DivIcon({
435
              html: '<div class="' + classStr + '">' + e.ebcEntityPositionList.length + '人</div>',
436
              className: 'person-count',
437
              // 设置图标大小
438
              // iconSize: [20, 20],
439
              // 设置点对象和图标的相对偏移量
440
              iconAnchor: [15, 15]
441
            })
442
          })
443
          this.layer.areaLayer.addLayer(point)
444
          var businessTypeName
445
          this.markTypes.forEach(m => {
446
            if (m.mapAreaBusinessType == e.businessType) {
447
              businessTypeName = m.name
448
            }
449
          })
450
          this.getPopup(point, e.ebcEntityPositionList, businessTypeName, e.mapAreaName)
451
          point.setAttributes({'mapAreaBusinessType': e.businessType})
452
        }
453
      })
454
    },
455
    getClassByStatus(status) {
456
      // "060";  // 救援人员 ------ 黄色
457
      // "050";  // 自动告警 ------ 红色
458
      // "040";  // 手动告警 ------ 红色
459
      // "030";  // 离线 ------ 灰色
460
      // "020";  // 进入了禁入区域 ------ 黄色
461
      // "010";  // 在限制区域超时 ------ 黄色
462
      // "015";  // 进入限制区域(尚未超时) ------ 绿色
463
      // "000";  // 正常 ------ 绿色
464
      switch (status) {
465
        case '060':
466
          return 'outline'
467
          break
468
        case '050':
469
          return 'sso'
470
          break
471
        case '040':
472
          return 'sso'
473
          break
474
        case '030':
475
          return 'offline'
476
          break
477
        case '020':
478
          return 'outline'
479
          break
480
        case '010':
481
          return 'outline'
482
          break
483
        case '000':
484
          return 'normal'
485
          break
486
        case '015':
487
          return 'normal'
488
          break
489
        default:
490
          return 'normal'
491
      }
492
    },
493
    getPopup(point, positionList, type, name) {
494
      var popup = Ai.Popup({
495
        minWidth: 300,
496
        offset: [0, -10],
497
        // autoClose: true,
498
        closeButton: true
499
      })
500
      var content = '<div class="tips-item"><div class="top"><div>' + type + ':</div><div>' + name + '</div></div><div class="container">'
501
      positionList.forEach(e => {
502
        content +=
503
            '<div class="' + this.getClassByStatus(e.locationStatus) + '">' + e.name + '</div>'
504
      })
505
      content += '</div></div>'
506
      // 设置弹出框弹出位置
507
      popup.setLatLng(point.getLatLng())
508
      // 设置弹出框弹出内容
509
      popup.setContent(content)
510
      popup.openOn(this.map)
511
      point.popup = popup
512
      point.on('click', (e) => {
513
        point.popup.openOn(this.map)
514
      })
515
      return popup
386 516
    },
387 517
    loadMapView() {
388 518
      this.$test
@ -430,9 +560,7 @@ export default {
430 560
    },
431 561
    loadAggregated(dataList) {
432 562
    },
433
    loadMapArea() {
434
      // data.forEach(element => {
435
      // })
563
    loadCoreEntity() {
436 564
      var point = Ai.Point([32.04533333333333, 125.4221944444444], {
437 565
        icon: Ai.DivIcon({
438 566
          html: '<div class="sos">4人</div>',
@ -446,22 +574,24 @@ export default {
446 574
      var point2 = Ai.Point([32.04533333333333, 125.4221944444444], {
447 575
        icon: Ai.Icon({
448 576
          // 设置图标URL路径
449
          iconUrl: '/static/images/风机.png',
577
          iconUrl: '/static/images/fan.png',
450 578
          // 设置图标大小
451 579
          iconSize: [20, 20],
452 580
          // 设置点对象和图标的相对偏移量
453 581
          iconAnchor: [100, 100]
454 582
        })
455 583
      })
456
      var layer = new Ai.FeatureGroup()
584
      point.setAttributes({'resourceToolType': '002'})
585
      point2.setAttributes({'resourceToolType': '002'})
586
      var layer = this.layer.equipmentLayer
457 587
      layer.addLayer(point)
458 588
      layer.addLayer(point2)
459 589
      this.map.addLayer(layer)
460 590
      var popup = Ai.Popup({
461 591
        minWidth: 300,
462 592
        offset: [0, -40],
463
        autoClose: false,
464
        closeButton: false
593
        // autoClose: true,
594
        closeButton: true
465 595
      })
466 596
      var content =
467 597
                  '<div class="tips-item"><div class="top"><div class="fengji"></div><div>风机</div><div>FJ001</div></div><div class="container">' +
@ -472,16 +602,26 @@ export default {
472 602
      // 设置弹出框弹出内容
473 603
      popup.setContent(content)
474 604
      popup.openOn(this.map)
605
      this.popup = popup
606
      point.on('click', (e) => {
607
        this.popup.openOn(this.map)
608
      })
475 609
    },
476
    showOrHide(layer, type, arr) { // 地图设备人员围栏显示和隐藏
610
    showOrHide(layer, item) { // 地图设备人员围栏显示和隐藏
611
      item.show = !item.show
477 612
      layer.eachLayer((e) => {
478
        if (arr.indexOf(e.getAttributes().locationStatus) != -1 || arr.indexOf(e.getAttributes().FACILITY_TYPE) != -1 || arr.indexOf(e.getAttributes().MAP_TAG_TYPE) != -1) {
613
        if ((e.getAttributes().resourceToolType == item.resourceToolType && item.resourceToolType != undefined) || (e.getAttributes().mapAreaBusinessType == item.mapAreaBusinessType && item.mapAreaBusinessType != undefined)) {
479 614
          if (this.map.hasLayer(e)) {
480 615
            this.map.removeLayer(e)
481
            this.mapShow[type] = false
616
            debugger
617
            if (e.popup) {
618
              this.map.closePopup(e.popup)
619
            }
482 620
          } else {
483 621
            this.map.addLayer(e)
484
            this.mapShow[type] = true
622
            if (e.popup) {
623
              e.popup.openOn(this.map)
624
            }
485 625
          }
486 626
        }
487 627
      })
@ -518,6 +658,16 @@ export default {
518 658
          // 请求失败处理...
519 659
        })
520 660
    },
661
    initStatusCount() {
662
      this.$test
663
        .post(services.organization.INIT_STATUS_COUNT, {})
664
        .then((res) => {
665
          this.personStatistics = res.data
666
        })
667
        .catch((res) => {
668
          // 请求失败处理...
669
        })
670
    },
521 671
    loadNotBindEquipment() {
522 672
      this.$test
523 673
        .post(services.organization.EQUIPMENT_NOT_BIND, {})
@ -527,7 +677,7 @@ export default {
527 677
            var point = Ai.Point([e.latitude, e.longitude], {
528 678
              icon: Ai.Icon({
529 679
                // 设置图标URL路径
530
                iconUrl: '/static/images/风机.png',
680
                iconUrl: '/static/images/fan.png',
531 681
                // 设置图标大小
532 682
                iconSize: [20, 20],
533 683
                // 设置点对象和图标的相对偏移量

+ 1 - 1
ebc-middle-platform/src/modules/system-management/map-mark.vue

@ -134,7 +134,7 @@
134 134
            ></t-input>
135 135
          </div>
136 136
        </div>
137
        <div v-show="markType == 4">
137
        <div v-show="markType == 'LIM'">
138 138
          <div class="label">停留时长:</div>
139 139
          <div class="input-rule">
140 140
            <t-input

BIN
ebc-middle-platform/static/images/升压站画面.png


BIN
ebc-middle-platform/static/images/船舶.png


BIN
ebc-middle-platform/static/images/风机.png