wangkang3 преди 4 години
родител
ревизия
f8ed07b43d

+ 2 - 1
ebc-middle-platform/src/constants.js

12
export const RESPONSE_BOUNDARY_PHONE = 600 // 响应式布局手机宽度边界值(像素)
12
export const RESPONSE_BOUNDARY_PHONE = 600 // 响应式布局手机宽度边界值(像素)
13
export const LANG_CN = 'zh-CN' // 简体中文
13
export const LANG_CN = 'zh-CN' // 简体中文
14
export const LANG_US = 'en-US' // 美式英文
14
export const LANG_US = 'en-US' // 美式英文
15
export const GIS_SEA_URL = 'http://192.168.74.189:9999/tdtvector' // 海图地址
15
export const GIS_SEA_LAYER_URL = 'http://192.168.74.189:9999/tdtvector' // 海图layer地址
16
export const GIS_SEA_URL = 'http://192.168.74.216:5071/gisserver/dzht/dzht/wmts' // 海图地址

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

52
</template>
52
</template>
53
<script>
53
<script>
54
import './current.scss'
54
import './current.scss'
55
import {GIS_SEA_LAYER_URL, GIS_SEA_URL} from '../../constants'
55
export default {
56
export default {
56
  data() {
57
  data() {
57
    return {
58
    return {
110
  mounted() {
111
  mounted() {
111
    window.Vue = this
112
    window.Vue = this
112
    this.map = new Ai.Map('current-map', {
113
    this.map = new Ai.Map('current-map', {
113
      ak: 'MTYwMTMMTAwMU1UWXdNVE0wTlRNMU16WTBNeU14TnpRdw__',
114
      ak: this.$store.getters.getGisToken,
114
      center: [39.915599, 116.406568],
115
      center: [39.915599, 116.406568],
115
      zoom: 5
116
      zoom: 5
116
    })
117
    })
117
    var maplayer = null
118
    var maplayer = null
118
    maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
119
    maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
119
    this.map.addLayer(maplayer)
120
    this.map.addLayer(maplayer)
120
    var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht/dzht/wmts')
121
    var la = Ai.WMTSLayer(GIS_SEA_URL)
121
    this.map.addLayer(la)
122
    this.map.addLayer(la)
122
    if (this.map.hasLayer(this.alarmPoint)) {
123
    if (this.map.hasLayer(this.alarmPoint)) {
123
      this.map.removeLayer(this.alarmPoint)
124
      this.map.removeLayer(this.alarmPoint)
130
    }
131
    }
131
    var icon = Ai.Icon({
132
    var icon = Ai.Icon({
132
      // 设置图标URL路径
133
      // 设置图标URL路径
133
      iconUrl: '/static/images/worker(1).png',
134
      iconUrl: '/static/images/outlineworker.png',
134
      // 设置图标大小
135
      // 设置图标大小
135
      iconSize: [20, 20],
136
      iconSize: [20, 20],
136
      // 设置点对象和图标的相对偏移量
137
      // 设置点对象和图标的相对偏移量
180
    // 报警人员弹窗
181
    // 报警人员弹窗
181
    this.rescuePoint = Ai.Point([29.388158098102554, 122.45361328125], {icon: Ai.Icon({
182
    this.rescuePoint = Ai.Point([29.388158098102554, 122.45361328125], {icon: Ai.Icon({
182
      // 设置图标URL路径
183
      // 设置图标URL路径
183
      iconUrl: '/static/images/worker.png',
184
      iconUrl: '/static/images/sosworker.png',
184
      // 设置图标大小
185
      // 设置图标大小
185
      iconSize: [20, 20],
186
      iconSize: [20, 20],
186
      // 设置点对象和图标的相对偏移量
187
      // 设置点对象和图标的相对偏移量

+ 1 - 10
ebc-middle-platform/src/modules/layouts/BasicLayout.vue

44
<script>
44
<script>
45
import GlobalLayout from '../page/GlobalLayout.vue'
45
import GlobalLayout from '../page/GlobalLayout.vue'
46
import IpuStomp from '../../ipu-stomp'
46
import IpuStomp from '../../ipu-stomp'
47
import services from '../../conf/services'
48
import EventBus from '../../bus'
47
import EventBus from '../../bus'
49
export default {
48
export default {
50
  name: 'BasicLayout',
49
  name: 'BasicLayout',
62
    }
61
    }
63
  },
62
  },
64
  mounted() {
63
  mounted() {
65
    this.$test
66
      .post(services.mapTag.GET_TOKEN, '')
67
      .then((res) => {
68
        this.$store.commit('setGisToken', res.data.result.ak)
69
      })
70
      .catch((res) => {
71
        // 请求失败处理...
72
      })
73
    // 镜屏调用
64
    // 镜屏调用
74
    var client
65
    var client
75
    var callbacks = {}
66
    var callbacks = {}
84
    }
75
    }
85
    client = IpuStomp(
76
    client = IpuStomp(
86
      {
77
      {
87
        url: 'ws://192.168.137.178:7100/stomp',
78
        url: 'ws://10.13.13.43:7100/stomp',
88
        name: 'zhangsan',
79
        name: 'zhangsan',
89
        passcode: '123456',
80
        passcode: '123456',
90
        UUID: 'zhangsan'
81
        UUID: 'zhangsan'

+ 1 - 1
ebc-middle-platform/src/modules/menu/topMenu.vue

1
<template>
1
<template>
2
  <div class="layout-header-left">
2
  <div class="layout-header-left">
3
    <logo/>
3
    <logo/>
4
    <t-navs ref="navs" :type="light" :threshold="threshold" :active-name.sync="currentActiveName" class="ml-auto" mode="horizontal" @on-select="$_onSelect">
4
    <t-navs ref="navs" :type="'light'" :threshold="threshold" :active-name.sync="currentActiveName" class="ml-auto" mode="horizontal" @on-select="$_onSelect">
5
      <t-navs-item v-for="menu in menus" :key="menu.name" :name="menu.name">
5
      <t-navs-item v-for="menu in menus" :key="menu.name" :name="menu.name">
6
        <template v-if="menu.children">
6
        <template v-if="menu.children">
7
          <div slot="title"><t-icon :icon="menu.meta.icon"></t-icon>{{ menu.meta.title }}</div>
7
          <div slot="title"><t-icon :icon="menu.meta.icon"></t-icon>{{ menu.meta.title }}</div>

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

69
    .label{
69
    .label{
70
      position: absolute;
70
      position: absolute;
71
      z-index: 10;
71
      z-index: 10;
72
      right: 90px;
72
      right: 150px;
73
      bottom: 77px;
73
      bottom: 77px;
74
      background-color: #59748A;
74
      background-color: #59748A;
75
      font-size: 12px;
75
      font-size: 12px;
351
        text-align: left;
351
        text-align: left;
352
      }
352
      }
353
    }
353
    }
354
    .sos{
355
      color: #F5222D;
356
    }
357
    .outline{
358
      color: #DA9D23;
359
    }
354
  }
360
  }
355
  .point-out{
361
  .point-out{
356
    color: #fff;
362
    color: #fff;

+ 142 - 41
ebc-middle-platform/src/modules/orientation/orientation.vue

162
162
163
<script>
163
<script>
164
import './orientation.scss'
164
import './orientation.scss'
165
import { forEach, filter, find } from 'lodash'
165
import {GIS_SEA_LAYER_URL, GIS_SEA_URL} from '../../constants'
166
import services from '../../conf/services'
166
import services from '../../conf/services'
167
import IpuStomp from '../../ipu-stomp'
168
import EventBus from '../../bus'
167
import EventBus from '../../bus'
169
export default {
168
export default {
170
  filters: {
169
  filters: {
318
      fitBounds: []
317
      fitBounds: []
319
    }
318
    }
320
  },
319
  },
321
  computed: {
322
    normalData: function () {
323
      return filter(this.dataList, function (o) {
324
        return o.type == '正常'
325
      })
326
    },
327
    alertData: function () {
328
      return filter(this.dataList, function (o) {
329
        return o.type == '落水告警'
330
      })
331
    },
332
    offlineData: function () {
333
      return filter(this.dataList, function (o) {
334
        return o.type == '离线'
335
      })
336
    }
337
  },
338
  mounted() {
320
  mounted() {
339
    this.initMap()
340
    this.initTrackMap()
321
    this.getGisToken().then(() => {
322
      this.initMap()
323
      this.initTrackMap()
324
    })
341
    setInterval(() => {
325
    setInterval(() => {
342
      this.nowDate = new Date()
326
      this.nowDate = new Date()
343
    }, 1000)
327
    }, 1000)
346
    })
330
    })
347
  },
331
  },
348
  methods: {
332
  methods: {
333
    async getGisToken() {
334
      await this.$test
335
        .post(services.mapTag.GET_TOKEN, '')
336
        .then((res) => {
337
          this.$store.commit('setGisToken', res.data.result.ak)
338
        })
339
        .catch((res) => {
340
          // 请求失败处理...
341
        })
342
    },
349
    changeLocation(msg) {
343
    changeLocation(msg) {
350
      var obj = JSON.parse(msg.body)
344
      var obj = JSON.parse(msg.body)
351
      this.layer.normalLayer.eachLayer((e) => {
345
      this.layer.normalLayer.eachLayer((e) => {
352
        console.log(e)
353
        if (e.options.id == obj.deviceId) {
346
        console.log(e.getAttributes().deviceNo)
347
        if (e.getAttributes().deviceId == obj.deviceId) {
348
          console.log(obj.latitude, obj.longitude)
349
          e.setLatLng([obj.latitude, obj.longitude])
350
          e.off()
351
          this.popupContent(obj, e)
352
        }
353
      })
354
      this.layer.offLineLayer.eachLayer((e) => {
355
        console.log(e.getAttributes().deviceNo)
356
        if (e.getAttributes().deviceId == obj.deviceId) {
357
          console.log(obj.latitude, obj.longitude)
358
          e.setLatLng([obj.latitude, obj.longitude])
359
          e.off()
360
          this.popupContent(obj, e)
361
        }
362
      })
363
      this.layer.outLineLayer.eachLayer((e) => {
364
        console.log(e.getAttributes().deviceNo)
365
        if (e.getAttributes().deviceId == obj.deviceId) {
354
          console.log(obj.latitude, obj.longitude)
366
          console.log(obj.latitude, obj.longitude)
355
          e.setLatLng([obj.latitude, obj.longitude])
367
          e.setLatLng([obj.latitude, obj.longitude])
368
          e.off()
369
          this.popupContent(obj, e)
356
        }
370
        }
357
      })
371
      })
372
      this.layer.sosLayer.eachLayer((e) => {
373
        console.log(e.getAttributes().deviceNo)
374
        if (e.getAttributes().deviceId == obj.deviceId) {
375
          console.log(obj.latitude, obj.longitude)
376
          e.setLatLng([obj.latitude, obj.longitude])
377
          e.off()
378
          this.popupContent(obj, e)
379
        }
380
      })
381
    },
382
    popupContent(e, point) {
383
      console.log(e, point)
384
      var icon, tips
385
      var callHelp = ''
386
      var other = ''
387
      if (e.locationStatus == '0') {
388
        icon = '/static/images/normalworker.png'
389
        tips = '<div class="normal">正常</div>'
390
      } else if (e.locationStatus == '1') {
391
        icon = '/static/images/offlineworker.png'
392
        tips = '<div class="offline">离线</div>'
393
      } else if (e.locationStatus == '2' || e.locationStatus == '3') {
394
        icon = '/static/images/outlineworker.png'
395
        tips = '<div class="outline">违规</div>'
396
        if (e.locationStatus == '2') {
397
          other = '<div class="row outline">' +
398
                  '<div>定点停留超时</div>' +
399
                  '<div>' + e.fixedLong + '</div>' +
400
                  '</div>'
401
        } else {
402
          other = '<div class="row outline">' +
403
                  '<div>进入时间</div>' +
404
                  '<div>' + e.inDate + '</div>' +
405
                  '</div>'
406
        }
407
      } else if (e.locationStatus == '4' || e.locationStatus == '5') {
408
        icon = '/static/images/sosworker.png'
409
        other = '<div class="row sos">' +
410
                  '<div>求救时间</div>' +
411
                  '<div>' + e.alarmDate + '</div>' +
412
                  '</div>' + '<div class="row sos">' +
413
                  '<div>求救时长</div>' +
414
                  '<div>' + e.alarmLong + '</div>' +
415
                  '</div>'
416
        tips = '<div class="sos">SOS</div>'
417
        callHelp = '<div style="display:flex;">' +
418
                  '<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
419
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
420
                  '</div>'
421
      }
422
      point.setIcon(Ai.Icon({
423
        // 设置图标URL路径
424
        iconUrl: icon,
425
        // 设置图标大小
426
        iconSize: [20, 20],
427
        // 设置点对象和图标的相对偏移量
428
        iconAnchor: [0, 0]
429
      }))
430
      point.on('click', (pointE) => {
431
        var content =
432
                  '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>' + e.userName + '</div>' + tips + '</div><div class="middle"><div class="row">' +
433
                  '<div>终端编号</div>' +
434
                  '<div>' + e.deviceNo + '</div>' +
435
                  '</div>' +
436
                  '<div class="row">' +
437
                  '<div>经度</div>' +
438
                  '<div>' + e.longitude + '</div>' +
439
                  '</div>' +
440
                  '<div class="row">' +
441
                  '<div>纬度</div>' +
442
                  '<div>' + e.latitude + '</div>' +
443
                  '</div>' + other +
444
                  '<div class="row">' +
445
                  '<div>最新定位时间</div>' +
446
                  '<div>' + e.newDate + '</div>' +
447
                  '</div></div></div>' + callHelp +
448
                  '</div></div>'
449
        Ai.Popup({
450
          minWidth: 300,
451
          offset: [0, -10],
452
          autoClose: true
453
        })
454
        // 设置弹出框弹出位置
455
          .setLatLng(point.getLatLng())
456
        // 设置弹出框弹出内容
457
          .setContent(content)
458
          .openOn(this.map)
459
      })
358
    },
460
    },
359
    initMap() {
461
    initMap() {
360
      if (this.map != null && this.map != '') {
462
      if (this.map != null && this.map != '') {
365
        center: [39.915599, 122.406568]
467
        center: [39.915599, 122.406568]
366
      })
468
      })
367
      var maplayer
469
      var maplayer
368
      maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
470
      maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
369
      var la = Ai.WMTSLayer(
471
      var la = Ai.WMTSLayer(
370
        'http://192.168.74.216:5071/gisserver/dzht/dzht/wmts',
472
        GIS_SEA_URL,
371
        { opacity: 0.5 }
473
        { opacity: 0.5 }
372
      )
474
      )
373
      this.map.addLayer(maplayer)
475
      this.map.addLayer(maplayer)
399
        .then((res) => {
501
        .then((res) => {
400
          // 请求成功处理...
502
          // 请求成功处理...
401
          res.data.dataList.forEach((e) => {
503
          res.data.dataList.forEach((e) => {
402
            if (e.MAP_TAG_TYPE === '1') { // 电子围栏
504
            if (e.MAP_TAG_TYPE === '3') { // 电子围栏
403
              var polygon = Ai.Polygon(e.MAP_TAG_SHAPE, {
505
              var polygon = Ai.Polygon(e.MAP_TAG_SHAPE, {
404
                color: '#A74B5C',
506
                color: '#A74B5C',
405
                opacity: 1.0,
507
                opacity: 1.0,
490
          res.data.dataList.forEach((e) => {
592
          res.data.dataList.forEach((e) => {
491
            var icon, tips
593
            var icon, tips
492
            var callHelp = ''
594
            var callHelp = ''
493
            if (e.LOCATION_STATUS === '0') {
595
            if (e.locationStatus === '0') {
494
              icon = '/static/images/normalworker.png'
596
              icon = '/static/images/normalworker.png'
495
              layer = this.layer.normalLayer
597
              layer = this.layer.normalLayer
496
              tips = '<div class="normal">正常</div>'
598
              tips = '<div class="normal">正常</div>'
497
            } else if (e.LOCATION_STATUS === '1') {
599
            } else if (e.locationStatus === '1') {
498
              icon = '/static/images/offlineworker.png'
600
              icon = '/static/images/offlineworker.png'
499
              layer = this.layer.offLineLayer
601
              layer = this.layer.offLineLayer
500
              tips = '<div class="offline">离线</div>'
602
              tips = '<div class="offline">离线</div>'
501
            } else if (e.LOCATION_STATUS === '2') {
603
            } else if (e.locationStatus === '2' || e.locationStatus === '3') {
502
              icon = '/static/images/outlineworker.png'
604
              icon = '/static/images/outlineworker.png'
503
              layer = this.layer.outLineLayer
605
              layer = this.layer.outLineLayer
504
              tips = '<div class="outline">违规</div>'
606
              tips = '<div class="outline">违规</div>'
505
            } else if (e.LOCATION_STATUS === '3' || e.LOCATION_STATUS === '4') {
607
            } else if (e.locationStatus === '4' || e.locationStatus === '5') {
506
              icon = '/static/images/sosworker.png'
608
              icon = '/static/images/sosworker.png'
507
              layer = this.layer.sosLayer
609
              layer = this.layer.sosLayer
508
              tips = '<div class="sos">SOS</div>'
610
              tips = '<div class="sos">SOS</div>'
511
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
613
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
512
                  '</div>'
614
                  '</div>'
513
            }
615
            }
514
            var point = Ai.Point([e.LATITUDE, e.LONGITUDE], {
616
            var point = Ai.Point([e.latitude, e.longitude], {
515
              icon: Ai.Icon({
617
              icon: Ai.Icon({
516
                // 设置图标URL路径
618
                // 设置图标URL路径
517
                iconUrl: icon,
619
                iconUrl: icon,
519
                iconSize: [20, 20],
621
                iconSize: [20, 20],
520
                // 设置点对象和图标的相对偏移量
622
                // 设置点对象和图标的相对偏移量
521
                iconAnchor: [0, 0]
623
                iconAnchor: [0, 0]
522
              }),
523
              id: e.DEVICE_NO
624
              })
524
            })
625
            })
626
            point.setAttributes(e)
525
            point.on('click', (pointE) => {
627
            point.on('click', (pointE) => {
526
              var content =
628
              var content =
527
                  '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>' + e.PARTY_NAME + '</div>' + tips + '</div><div class="middle"><div class="row">' +
629
                  '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>' + e.userName + '</div>' + tips + '</div><div class="middle"><div class="row">' +
528
                  '<div>终端编号</div>' +
630
                  '<div>终端编号</div>' +
529
                  '<div>' + e.DEVICE_NO + '</div>' +
631
                  '<div>' + e.deviceNo + '</div>' +
530
                  '</div>' +
632
                  '</div>' +
531
                  '<div class="row">' +
633
                  '<div class="row">' +
532
                  '<div>经度</div>' +
634
                  '<div>经度</div>' +
533
                  '<div>' + e.LONGITUDE + '</div>' +
635
                  '<div>' + e.longitude + '</div>' +
534
                  '</div>' +
636
                  '</div>' +
535
                  '<div class="row">' +
637
                  '<div class="row">' +
536
                  '<div>纬度</div>' +
638
                  '<div>纬度</div>' +
537
                  '<div>' + e.LATITUDE + '</div>' +
639
                  '<div>' + e.latitude + '</div>' +
538
                  '</div>' +
640
                  '</div>' +
539
                  '<div class="row">' +
641
                  '<div class="row">' +
540
                  '<div>最新定位时间</div>' +
642
                  '<div>最新定位时间</div>' +
541
                  '<div>' + e.LOCATION_DATE + '</div>' +
643
                  '<div>' + e.newDate + '</div>' +
542
                  '</div></div></div>' + callHelp +
644
                  '</div></div></div>' + callHelp +
543
                  '</div></div>'
645
                  '</div></div>'
544
              Ai.Popup({
646
              Ai.Popup({
558
          this.map.addLayer(this.layer.outLineLayer)
660
          this.map.addLayer(this.layer.outLineLayer)
559
          this.map.addLayer(this.layer.offLineLayer)
661
          this.map.addLayer(this.layer.offLineLayer)
560
          this.map.addLayer(this.layer.normalLayer)
662
          this.map.addLayer(this.layer.normalLayer)
561
          this.map.fitBoundsForLayers(this.layer.normalLayer)
562
        })
663
        })
563
        .catch((res) => {
664
        .catch((res) => {
564
          // 请求失败处理...
665
          // 请求失败处理...
585
        center: [39.915599, 122.406568]
686
        center: [39.915599, 122.406568]
586
      })
687
      })
587
      var maplayer = null
688
      var maplayer = null
588
      maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
589
      var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht/dzht/wmts', {opacity: 0.5})
689
      maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
690
      var la = Ai.WMTSLayer(GIS_SEA_URL, {opacity: 0.5})
590
      this.trackMap.addLayer(maplayer)
691
      this.trackMap.addLayer(maplayer)
591
      this.trackMap.addLayer(la)
692
      this.trackMap.addLayer(la)
592
693

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

186
<script>
186
<script>
187
import './map-mark.scss'
187
import './map-mark.scss'
188
import services from '../../conf/services'
188
import services from '../../conf/services'
189
import {GIS_SEA_LAYER_URL, GIS_SEA_URL} from '../../constants'
189
export default {
190
export default {
190
  data() {
191
  data() {
191
    return {
192
    return {
199
      },
200
      },
200
      queryCondition: {
201
      queryCondition: {
201
        type: '',
202
        type: '',
202
        alarmPerson: ''
203
        alarmPerson: '',
204
        userName: ''
203
      },
205
      },
204
      rangeDate: '',
206
      rangeDate: '',
205
      addMark: false,
207
      addMark: false,
231
    }
233
    }
232
  },
234
  },
233
  created() {
235
  created() {
234
    this.getList(1, 20, '')
236
    this.getList()
235
  },
237
  },
236
  mounted() {
238
  mounted() {
237
    // 请求成功处理...
238
    this.map = new Ai.Map('modalMap', {
239
      ak: this.$store.getters.getGisToken,
240
      center: [39.915599, 116.406568],
241
      zoom: 5
242
    })
243
    var maplayer = null
244
    maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
245
    this.map.addLayer(maplayer)
246
    var la = Ai.WMTSLayer(
247
      'http://192.168.74.216:5071/gisserver/dzht/dzht/wmts',
248
      { opacity: 0.5 }
249
    )
250
    this.map.addLayer(la)
251
    var options = {
252
      guideLayers: [] // 导向(吸附)图层对象,当距离相隔很近的时候会与导向对象重合
253
    }
254
    this.polygonDrawer = Ai.DrawPolygon(this.map, options) // 初始化多边形绘制工具
255
    this.polygonDrawer.enable() // 激活多边形绘制工具
256
    this.map.on(AiDrawEvent.CREATED, (e) => {
257
      // debugger
258
      console.log(1)
259
      this.layer = this.polygonDrawer.polygon(e) // 获取多边形信息
260
      // console.log(this.polygonDrawer.getPoints())
261
      this.modalData = this.layer._latlngs[0]
262
      this.polygonDrawer.editing(this.layer)
263
      this.polygonDrawer.disable()
264
      this.map.addLayer(this.layer)
265
    })
239
    this.loadMap()
266
  },
240
  },
267
  methods: {
241
  methods: {
268
    getList(pageNum, pageSize, MAP_TAG_NAME) {
242
    loadMap() {
243
      this.map = new Ai.Map('modalMap', {
244
        ak: this.$store.getters.getGisToken,
245
        center: [39.915599, 116.406568],
246
        zoom: 5
247
      })
248
      this.map.addLayer(Ai.TileLayer(GIS_SEA_LAYER_URL))
249
      this.map.addLayer(Ai.WMTSLayer(
250
        GIS_SEA_URL,
251
        { opacity: 0.5 }
252
      ))
253
      this.loadPolygonDrawer()
254
    },
255
    loadPolygonDrawer() {
256
      var options = {
257
        guideLayers: [] // 导向(吸附)图层对象,当距离相隔很近的时候会与导向对象重合
258
      }
259
      this.polygonDrawer = Ai.DrawPolygon(this.map, options) // 初始化多边形绘制工具
260
      this.polygonDrawer.enable() // 激活多边形绘制工具
261
      this.map.on(AiDrawEvent.CREATED, (e) => {
262
      // debugger
263
        console.log(1)
264
        this.layer = this.polygonDrawer.polygon(e) // 获取多边形信息
265
        // console.log(this.polygonDrawer.getPoints())
266
        this.modalData = this.layer._latlngs[0]
267
        this.polygonDrawer.editing(this.layer)
268
        this.polygonDrawer.disable()
269
        this.map.addLayer(this.layer)
270
      })
271
    },
272
    getList() {
269
      var params = new FormData()
273
      var params = new FormData()
270
      params.append(
274
      params.append(
271
        'data',
275
        'data',
272
        JSON.stringify({
276
        JSON.stringify({
273
          pageNum: pageNum,
274
          pageSize: pageSize,
275
          mapTagName: MAP_TAG_NAME
277
          pageNum: this.table.pager.currentPage,
278
          pageSize: this.table.pager.size,
279
          mapTagName: this.queryCondition.userName
276
        })
280
        })
277
      )
281
      )
278
      this.$test
282
      this.$test
281
          // 请求成功处理...
285
          // 请求成功处理...
282
          this.table.data = res.data.dataList
286
          this.table.data = res.data.dataList
283
          this.table.pager.total = res.data.dataNum
287
          this.table.pager.total = res.data.dataNum
284
          this.table.pager.currentPage = pageNum
288
          // this.table.pager.currentPage = pageNum
285
        })
289
        })
286
        .catch((res) => {
290
        .catch((res) => {
287
          // 请求失败处理...
291
          // 请求失败处理...
292
    },
296
    },
293
    onReset() {
297
    onReset() {
294
      this.queryCondition.userName = ''
298
      this.queryCondition.userName = ''
295
      this.getList(1, this.table.pager.size, this.queryCondition.userName)
299
      this.table.pager.currentPage = 1
300
      this.getList()
296
    },
301
    },
297
    onSearch() {
302
    onSearch() {
298
      this.getList(1, this.table.pager.size, this.queryCondition.userName)
303
      this.table.pager.currentPage = 1
304
      this.getList()
299
    },
305
    },
300
    toExport() {
306
    toExport() {
301
      var params = new FormData()
307
      var params = new FormData()
405
          .post(services.mapTag.UPD_MAP_TAG, params)
411
          .post(services.mapTag.UPD_MAP_TAG, params)
406
          .then((res) => {
412
          .then((res) => {
407
            // 请求成功处理...
413
            // 请求成功处理...
408
            this.getList(
409
              this.table.pager.currentPage,
410
              this.table.pager.size,
411
              this.queryCondition.userName
412
            )
414
            this.getList()
413
            this.polygonDrawer.disable()
415
            this.polygonDrawer.disable()
414
            this.modalData = []
416
            this.modalData = []
415
            this.markName = ''
417
            this.markName = ''
442
            this.modalData = []
444
            this.modalData = []
443
            this.markName = ''
445
            this.markName = ''
444
            this.residenceTimeLength = ''
446
            this.residenceTimeLength = ''
445
            this.getList(
446
              this.table.pager.currentPage,
447
              this.table.pager.size,
448
              this.queryCondition.userName
449
            )
447
            this.getList()
450
          })
448
          })
451
          .catch((res) => {
449
          .catch((res) => {
452
            // 请求失败处理...
450
            // 请求失败处理...
472
      this.modalData = []
470
      this.modalData = []
473
    },
471
    },
474
    onPagerChange(page) {
472
    onPagerChange(page) {
475
      this.getList(page, this.table.pager.size, this.queryCondition.userName)
473
      this.table.pager.currentPage = page
474
      this.getList()
476
    },
475
    },
477
    onSizeChange(number) {
476
    onSizeChange(number) {
478
      this.getList(1, number, this.queryCondition.userName)
477
      this.table.pager.currentPage = 1
478
      this.table.pager.size = number
479
      this.getList()
479
    },
480
    },
480
    handleClick(row) {
481
    handleClick(row) {
481
      var params = new FormData()
482
      var params = new FormData()
614
              // 请求成功处理...
615
              // 请求成功处理...
615
              // debugger
616
              // debugger
616
              this.$Message.success('操作成功')
617
              this.$Message.success('操作成功')
617
              that.getList(
618
                that.table.pager.currentPage,
619
                that.table.pager.size,
620
                that.queryCondition.userName
621
              )
618
              that.getList()
622
            })
619
            })
623
            .catch((res) => {
620
            .catch((res) => {
624
              // 请求失败处理...
621
              // 请求失败处理...