wangkang3 4 年之前
父節點
當前提交
9b893df7e3

+ 5 - 1
ebc-middle-platform/src/conf/services.js

@ -68,7 +68,11 @@ export default {
68 68
    GETBYNAMESEARCHORG: '/org/queryOrg/', // 根据NAME查组织
69 69
    STAFF: '/staff', // 根据组织id新建post, 修改put,删除delete员工信息
70 70
    SEARCHSTAFF: '/staff/staffId/', // 根据组织id新建post, 修改put,删除delete员工信息
71
    QUERYSTAFF: '/staff/queryStaff' // 根据组织id查找员工列表
71
    QUERYSTAFF: '/staff/queryStaff', // 根据组织id查找员工列表
72
    MAP_LOCATION_VIEW: '/locationManagement/loadMapLocationView', // 初始化人员定位页面的数据
73
    BIND_DEVICE: '/workEmployee/queryEmployeeBindDeviceList', // 查询绑定的人员列表
74
    FENCE_BY_DEPARTMENT: '/mapTag/queryAllMapTagByOrg', // 按部门查询查询围栏
75
    EQUIPMENT_NOT_BIND: '/equipment/queryAllEquipmentNotBind' // 查询所有未绑定的设备
72 76
  },
73 77
  position: {
74 78
    POSITION: '/position/', // 新增post,修改put,删除delete岗位信息

+ 3 - 1
ebc-middle-platform/src/modules/orientation/orientation.scss

@ -11,9 +11,10 @@
11 11
      .person-info{
12 12
        display: flex;
13 13
        font-size: 16px;
14
        div{
14
        >div{
15 15
          margin-right: 10px;
16 16
          display: flex;
17
          min-width: 85px;
17 18
          .number{
18 19
            color: #2373D2;
19 20
            font-size: 24px;
@ -49,6 +50,7 @@
49 50
        .time{
50 51
          font-size: 16px;
51 52
          margin-left: 50px;
53
          min-width: 230px;
52 54
        }
53 55
      }
54 56
      .right-content{

+ 111 - 30
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -36,7 +36,7 @@
36 36
          "
37 37
        >轨迹</t-button
38 38
        >
39
        <div>悬浮窗<t-switch rounded></t-switch></div>
39
        <div style="min-width:100px">悬浮窗<t-switch rounded></t-switch></div>
40 40
      </div>
41 41
    </div>
42 42
    <div id="div1" style="height: 100%"></div>
@ -102,7 +102,7 @@
102 102
            style="width: 200px"
103 103
          ></t-input>
104 104
          <div>
105
            <div v-for="(item,index) in personList" :class="trackPerson==item.deviceId?'active':''" :key="index" @click="personTrack(item)">{{ item.userName }}</div>
105
            <div v-for="(item,index) in personList" :class="trackPerson==item.code?'active':''" :key="index" @click="personTrack(item)">{{ item.name }}</div>
106 106
          </div>
107 107
        </div>
108 108
        <div class="track-modal-right">
@ -127,15 +127,7 @@
127 127
              placeholder="请选择时间"
128 128
              @date-change="onChangeDate">
129 129
            </t-date-picker>
130
            <!-- <t-date-picker
131
              :class="trackQueryCondition.currentIndex === 3?'':'hidden'"
132
              v-model="rangeDate"
133
              style="width: 250px"
134
              type="dateRange"
135
              placeholder="请选择时间"
136
              @date-change="onChangeDate"
137
            ></t-date-picker> -->
138
            <div style="display: flex;line-height:32.5px">
130
            <div style="display: flex;line-height:32.5px;width: 120px;">
139 131
              <div>速度</div>
140 132
              <t-select>
141 133
                <t-option>1x</t-option>
@ -177,7 +169,7 @@
177 169
import './orientation.scss'
178 170
import services from '../../conf/services'
179 171
import EventBus from '../../bus'
180
import { GIS_SEA_LAYER_URL, GIS_SEA_URL } from '@/constants'
172
import { GIS_SEA_LAYER_URL, GIS_SEA_URL } from '../../constants'
181 173
export default {
182 174
  filters: {
183 175
    dateFormat(value) {
@ -337,7 +329,8 @@ export default {
337 329
      personList: [],
338 330
      rescuer: [],
339 331
      appointAlarmId: '',
340
      trackPerson: ''
332
      trackPerson: '',
333
      orgId: ''
341 334
    }
342 335
  },
343 336
  mounted() {
@ -378,29 +371,64 @@ export default {
378 371
        center: this.$store.getters.getMapParam.center,
379 372
        zoom: this.$store.getters.getMapParam.zoom
380 373
      })
381
      var maplayer
382
      maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
374
      var maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
375
      this.map.addLayer(maplayer)
383 376
      var la = Ai.WMTSLayer(
384 377
        GIS_SEA_URL,
385 378
        { opacity: 0.5 }
386 379
      )
387
      this.map.addLayer(maplayer)
388 380
      this.map.addLayer(la)
389 381
390 382
      Ai.Scale({ position: 'bottomright' }).addTo(this.map)
391 383
      Ai.Zoom({ type: 'small' }).addTo(this.map)
392 384
      this.loadMapArea()
385
      this.loadMapView()
393 386
    },
394 387
    loadMapView() {
395
      // this.$test
396
      //   .post(services.mapTag.GET_MAP_PARAM, {})
397
      //   .then((res) => {
398
      //     if (res.data.success) {
399
      //     }
400
      //   })
401
      //   .catch((res) => {
402
      //     // 请求失败处理...
403
      //   })
388
      this.$test
389
        .post(services.organization.MAP_LOCATION_VIEW, {})
390
        .then((res) => {
391
          console.log(res)
392
          this.loadUnaggregated(res.data.unaggregatedEntityPositionList)
393
        })
394
        .catch((res) => {
395
          // 请求失败处理...
396
        })
397
    },
398
    loadUnaggregated(dataList) { // 加载不聚合的人
399
      var points = []
400
      dataList.forEach(element => {
401
        var point = Ai.Point([element.latitude, element.longitude], {
402
          icon: Ai.DivIcon({
403
            html: '<div class="sos">1人</div>',
404
            className: 'person-count',
405
            // 设置图标大小
406
            // iconSize: [20, 20],
407
            // 设置点对象和图标的相对偏移量
408
            iconAnchor: [15, 15]
409
          })
410
        })
411
        this.map.addLayer(point)
412
        var popup = Ai.Popup({
413
          minWidth: 100,
414
          offset: [0, -10],
415
          autoClose: false,
416
          closeButton: false
417
        })
418
        var content =
419
                  '<div class="tips-item"><div class="container">' +
420
                  '<div class="sos">' + element.name + '</div>' +
421
                 '</div></div>'
422
        // 设置弹出框弹出位置
423
        popup.setLatLng(point.getLatLng())
424
        // 设置弹出框弹出内容
425
        popup.setContent(content)
426
        popup.openOn(this.map)
427
        points.push(point)
428
      })
429
      this.map.setViewPort([points])
430
    },
431
    loadAggregated(dataList) {
404 432
    },
405 433
    loadMapArea() {
406 434
      // data.forEach(element => {
@ -422,7 +450,7 @@ export default {
422 450
          // 设置图标大小
423 451
          iconSize: [20, 20],
424 452
          // 设置点对象和图标的相对偏移量
425
          iconAnchor: [0, 0]
453
          iconAnchor: [100, 100]
426 454
        })
427 455
      })
428 456
      var layer = new Ai.FeatureGroup()
@ -432,7 +460,7 @@ export default {
432 460
      var popup = Ai.Popup({
433 461
        minWidth: 300,
434 462
        offset: [0, -40],
435
        autoClose: true,
463
        autoClose: false,
436 464
        closeButton: false
437 465
      })
438 466
      var content =
@ -469,14 +497,49 @@ export default {
469 497
        ak: this.$store.getters.getGisToken,
470 498
        center: [39.915599, 122.406568]
471 499
      })
472
      var maplayer = null
473
      maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
500
      var maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
474 501
      var la = Ai.WMTSLayer(GIS_SEA_URL, {opacity: 0.5})
475 502
      this.trackMap.addLayer(maplayer)
476 503
      this.trackMap.addLayer(la)
477 504
478 505
      Ai.Scale({position: 'bottomright'}).addTo(this.trackMap)
479 506
      Ai.Zoom({type: 'small'}).addTo(this.trackMap)
507
      this.loadBindDevicePerson()
508
      this.loadNotBindEquipment()
509
    },
510
    loadBindDevicePerson() {
511
      this.$test
512
        .post(services.organization.BIND_DEVICE, {})
513
        .then((res) => {
514
          console.log(res)
515
          this.personList = res.data
516
        })
517
        .catch((res) => {
518
          // 请求失败处理...
519
        })
520
    },
521
    loadNotBindEquipment() {
522
      this.$test
523
        .post(services.organization.EQUIPMENT_NOT_BIND, {})
524
        .then((res) => {
525
          console.log(res)
526
          res.data.forEach(e => {
527
            var point = Ai.Point([e.latitude, e.longitude], {
528
              icon: Ai.Icon({
529
                // 设置图标URL路径
530
                iconUrl: '/static/images/风机.png',
531
                // 设置图标大小
532
                iconSize: [20, 20],
533
                // 设置点对象和图标的相对偏移量
534
                iconAnchor: [0, 0]
535
              })
536
            })
537
            this.trackMap.addLayer(point)
538
          })
539
        })
540
        .catch((res) => {
541
          // 请求失败处理...
542
        })
480 543
    },
481 544
    onChangeDate() { // 轨迹时间选择
482 545
    },
@ -560,7 +623,25 @@ export default {
560 623
    },
561 624
    personTrack(item) {
562 625
      console.log(item)
563
      this.trackPerson = item.deviceId
626
      this.trackPerson = item.code
627
      if (this.orgId !== item.orgId) {
628
        this.$test
629
          .post(services.organization.FENCE_BY_DEPARTMENT, {entityId: item.orgId})
630
          .then((res) => {
631
            this.orgId = item.orgId
632
            console.log(res)
633
            var la = new Ai.FeatureGroup()
634
            res.data.forEach(e => {
635
              var wktstr = e.mapAreaContent
636
              var polygon = Ai.Polygon(wktstr, {color: 'red'})
637
              la.addLayer(polygon)
638
            })
639
            this.trackMap.addLayer(la)
640
          })
641
          .catch((res) => {
642
          // 请求失败处理...
643
          })
644
      }
564 645
    },
565 646
    playback() {
566 647
      var coords = [[40.026037, 116.323928, '1'], [40.017886, 116.328048], [40.00763, 116.336631], [39.99132, 116.338348], [39.97527, 116.341094], [39.96685, 116.346244], [39.96633, 116.354827], [39.96580, 116.37233], [39.96659, 116.38538], [39.96685, 116.40048], [39.96685, 116.41834], [39.96028, 116.419029], [39.95501, 116.41937], [39.92501, 116.41937], [39.91501, 116.41937], [39.90501, 116.41937], [39.87501, 116.41937]]

+ 0 - 1
ebc-middle-platform/src/modules/system-management/equipment-management.scss

@ -44,7 +44,6 @@
44 44
  }
45 45
}
46 46
.loading--fix{
47
  position: absolute;
48 47
  color: #000;
49 48
  background-color: rgba(255, 255, 255, 0.8);
50 49
}

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

@ -47,7 +47,6 @@
47 47
  }
48 48
}
49 49
.loading--fix{
50
  position: absolute;
51 50
  color: #000;
52 51
  background-color: rgba(255, 255, 255, 0.8);
53 52
}

+ 0 - 1
ebc-middle-platform/src/modules/system-management/terminal-management.scss

@ -92,7 +92,6 @@
92 92
  color: #ffffff;
93 93
}
94 94
.loading--fix{
95
  position: absolute;
96 95
  color: #000;
97 96
  background-color: rgba(255, 255, 255, 0.8);
98 97
}