wangkang3 лет назад: 4
Родитель
Сommit
9b893df7e3

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

68
    GETBYNAMESEARCHORG: '/org/queryOrg/', // 根据NAME查组织
68
    GETBYNAMESEARCHORG: '/org/queryOrg/', // 根据NAME查组织
69
    STAFF: '/staff', // 根据组织id新建post, 修改put,删除delete员工信息
69
    STAFF: '/staff', // 根据组织id新建post, 修改put,删除delete员工信息
70
    SEARCHSTAFF: '/staff/staffId/', // 根据组织id新建post, 修改put,删除delete员工信息
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
  position: {
77
  position: {
74
    POSITION: '/position/', // 新增post,修改put,删除delete岗位信息
78
    POSITION: '/position/', // 新增post,修改put,删除delete岗位信息

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

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

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

36
          "
36
          "
37
        >轨迹</t-button
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
      </div>
40
      </div>
41
    </div>
41
    </div>
42
    <div id="div1" style="height: 100%"></div>
42
    <div id="div1" style="height: 100%"></div>
102
            style="width: 200px"
102
            style="width: 200px"
103
          ></t-input>
103
          ></t-input>
104
          <div>
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
          </div>
106
          </div>
107
        </div>
107
        </div>
108
        <div class="track-modal-right">
108
        <div class="track-modal-right">
127
              placeholder="请选择时间"
127
              placeholder="请选择时间"
128
              @date-change="onChangeDate">
128
              @date-change="onChangeDate">
129
            </t-date-picker>
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
              <div>速度</div>
131
              <div>速度</div>
140
              <t-select>
132
              <t-select>
141
                <t-option>1x</t-option>
133
                <t-option>1x</t-option>
177
import './orientation.scss'
169
import './orientation.scss'
178
import services from '../../conf/services'
170
import services from '../../conf/services'
179
import EventBus from '../../bus'
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
export default {
173
export default {
182
  filters: {
174
  filters: {
183
    dateFormat(value) {
175
    dateFormat(value) {
337
      personList: [],
329
      personList: [],
338
      rescuer: [],
330
      rescuer: [],
339
      appointAlarmId: '',
331
      appointAlarmId: '',
340
      trackPerson: ''
332
      trackPerson: '',
333
      orgId: ''
341
    }
334
    }
342
  },
335
  },
343
  mounted() {
336
  mounted() {
378
        center: this.$store.getters.getMapParam.center,
371
        center: this.$store.getters.getMapParam.center,
379
        zoom: this.$store.getters.getMapParam.zoom
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
      var la = Ai.WMTSLayer(
376
      var la = Ai.WMTSLayer(
384
        GIS_SEA_URL,
377
        GIS_SEA_URL,
385
        { opacity: 0.5 }
378
        { opacity: 0.5 }
386
      )
379
      )
387
      this.map.addLayer(maplayer)
388
      this.map.addLayer(la)
380
      this.map.addLayer(la)
389
381
390
      Ai.Scale({ position: 'bottomright' }).addTo(this.map)
382
      Ai.Scale({ position: 'bottomright' }).addTo(this.map)
391
      Ai.Zoom({ type: 'small' }).addTo(this.map)
383
      Ai.Zoom({ type: 'small' }).addTo(this.map)
392
      this.loadMapArea()
384
      this.loadMapArea()
385
      this.loadMapView()
393
    },
386
    },
394
    loadMapView() {
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
    loadMapArea() {
433
    loadMapArea() {
406
      // data.forEach(element => {
434
      // data.forEach(element => {
422
          // 设置图标大小
450
          // 设置图标大小
423
          iconSize: [20, 20],
451
          iconSize: [20, 20],
424
          // 设置点对象和图标的相对偏移量
452
          // 设置点对象和图标的相对偏移量
425
          iconAnchor: [0, 0]
453
          iconAnchor: [100, 100]
426
        })
454
        })
427
      })
455
      })
428
      var layer = new Ai.FeatureGroup()
456
      var layer = new Ai.FeatureGroup()
432
      var popup = Ai.Popup({
460
      var popup = Ai.Popup({
433
        minWidth: 300,
461
        minWidth: 300,
434
        offset: [0, -40],
462
        offset: [0, -40],
435
        autoClose: true,
463
        autoClose: false,
436
        closeButton: false
464
        closeButton: false
437
      })
465
      })
438
      var content =
466
      var content =
469
        ak: this.$store.getters.getGisToken,
497
        ak: this.$store.getters.getGisToken,
470
        center: [39.915599, 122.406568]
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
      var la = Ai.WMTSLayer(GIS_SEA_URL, {opacity: 0.5})
501
      var la = Ai.WMTSLayer(GIS_SEA_URL, {opacity: 0.5})
475
      this.trackMap.addLayer(maplayer)
502
      this.trackMap.addLayer(maplayer)
476
      this.trackMap.addLayer(la)
503
      this.trackMap.addLayer(la)
477
504
478
      Ai.Scale({position: 'bottomright'}).addTo(this.trackMap)
505
      Ai.Scale({position: 'bottomright'}).addTo(this.trackMap)
479
      Ai.Zoom({type: 'small'}).addTo(this.trackMap)
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
    onChangeDate() { // 轨迹时间选择
544
    onChangeDate() { // 轨迹时间选择
482
    },
545
    },
560
    },
623
    },
561
    personTrack(item) {
624
    personTrack(item) {
562
      console.log(item)
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
    playback() {
646
    playback() {
566
      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]]
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
  }
44
  }
45
}
45
}
46
.loading--fix{
46
.loading--fix{
47
  position: absolute;
48
  color: #000;
47
  color: #000;
49
  background-color: rgba(255, 255, 255, 0.8);
48
  background-color: rgba(255, 255, 255, 0.8);
50
}
49
}

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

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

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

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