wangkang3 4 ans auparavant
Parent
commit
657320fadd

+ 1 - 1
ebc-middle-platform/src/components/loginer.vue

@ -9,7 +9,7 @@
9 9
    <h2 v-else class="d-flex align-items-center justify-content-center mb-36 text-nowrap">
10 10
      <img v-if="theme === 'dark'" src="/static/images/aid-logo.png" alt="" style="height: 25px;"/>
11 11
      <img v-else src="/static/images/aid-logo-dark.png" alt="" style="height: 25px;"/>
12
      <strong class="text-dark ml-12">AI Design Pro</strong>
12
      <strong class="text-dark ml-12">人员定位与搜救系统</strong>
13 13
    </h2>
14 14
    <t-form ref="loginForm" :model="loginForm" :rules="loginFormRules">
15 15
      <t-form-item prop="userName">

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

@ -166,7 +166,8 @@ export default {
166 166
    DEL_DEVICE: '/device/deleteDeviceInfo', // 删除
167 167
    UNBIND_DEVICE: '/device/unbindDevice', // 解绑
168 168
    BIND_DEVICE: '/device/bindDevice', // 绑定
169
    VERIFY_ASSOCIATINFO: '/device/verifyUserOrBoatAssociatInfo' // 验证用户或者船舶是否有终端关联
169
    VERIFY_ASSOCIATINFO: '/device/verifyUserOrBoatAssociatInfo', // 验证用户或者船舶是否有终端关联
170
    DEVICE_TRACK: '/device/queryOneDeviceLocationInfo' // 查询设备轨迹
170 171
  },
171 172
  trackAnalysis: {
172 173
    GET_TRACKANALYSIS: '/trackAnalysis/queryTrackAnalysisInfo' // 查询轨迹分析
@ -180,5 +181,11 @@ export default {
180 181
  },
181 182
  excel: {
182 183
    EXPROT_MAP_TAG: '/ExportToExcel/exportMapTagInfoToExcel' // 导出地图标记信息
184
  },
185
  rescue: {
186
    CLOSE_RESCUE: '/rescue/closeRescue', // 关闭救援信息
187
    RESCUE_LOCATION: 'rescue/queryCurrentRescueLocationInfo', // 获取所有报警人、救援人位置信息
188
    RESCUER_LIST: '/rescue/queryListRescuerInfo', // 获取救援者的下拉列表
189
    ASSIGN_RESCUER: '/rescue/assignRescuer' // 指派救援者
183 190
  }
184 191
}

+ 2 - 2
ebc-middle-platform/src/i18n.js

@ -45,11 +45,11 @@ class I18nManager {
45 45
   * @param  {VueI18n} i18n `VueI18n`实例对象
46 46
   */
47 47
  constructor() {
48
    let browserLanguage = navigator.language
48
    // let browserLanguage = navigator.language
49 49
    let localLanguage = window.localStorage.getItem(STORAGE_KEY)
50 50
51 51
    if (!localLanguage) {
52
      localLanguage = ((SUPORTED_LIST.indexOf(browserLanguage) >= 0) ? browserLanguage : DEFAULT_LANG)
52
      localLanguage = DEFAULT_LANG
53 53
    }
54 54
55 55
    /**

+ 1 - 1
ebc-middle-platform/src/index.html

@ -3,7 +3,7 @@
3 3
<head>
4 4
  <meta charset="UTF-8">
5 5
  <meta http-equiv="x-ua-compatible" content="IE=Edge">
6
  <title>AI Design Pro</title>
6
  <title>人员定位与搜救系统</title>
7 7
  <link rel="icon" href="/static/images/aid-favicon.png" type="image/x-icon" />
8 8
  <!-- <link rel="shortcut icon" href="/static/images/aid-favicon-dark.png" type="image/x-icon" /> -->
9 9
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

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

@ -53,6 +53,7 @@
53 53
<script>
54 54
import './current.scss'
55 55
import {GIS_SEA_LAYER_URL, GIS_SEA_URL} from '../../constants'
56
import services from '../../conf/services'
56 57
export default {
57 58
  data() {
58 59
    return {
@ -105,7 +106,8 @@ export default {
105 106
      map: null,
106 107
      alarmPoint: null,
107 108
      rescuePoint: null,
108
      polyline: null
109
      polyline: null,
110
      personLayer: new Ai.FeatureGroup()
109 111
    }
110 112
  },
111 113
  mounted() {
@ -120,124 +122,98 @@ export default {
120 122
    this.map.addLayer(maplayer)
121 123
    var la = Ai.WMTSLayer(GIS_SEA_URL)
122 124
    this.map.addLayer(la)
123
    if (this.map.hasLayer(this.alarmPoint)) {
124
      this.map.removeLayer(this.alarmPoint)
125
    }
126
    if (this.map.hasLayer(this.rescuePoint)) {
127
      this.map.removeLayer(this.rescuePoint)
128
    }
129
    if (this.map.hasLayer(this.polyline)) {
130
      this.map.removeLayer(this.polyline)
131
    }
132
    var icon = Ai.Icon({
133
      // 设置图标URL路径
134
      iconUrl: '/static/images/outlineworker.png',
135
      // 设置图标大小
136
      iconSize: [20, 20],
137
      // 设置点对象和图标的相对偏移量
138
      iconAnchor: [0, 0]
139
    })
140
    // 救援人员弹窗
141
    this.alarmPoint = Ai.Point([29.86089241772908, 122.09930419921876], {icon: icon})
142
    this.alarmPoint.on('click', (e) => {
143
      var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="hand-alarm">救援人员</div></div><div class="middle"><div class="row">' +
144
           '<div>终端编号</div>' +
145
           '<div>ZDBH0001</div>' +
146
         '</div>' +
147
         '<div class="row">' +
148
           '<div>最新定位时间</div>' +
149
           '<div>2020.08.13 08:24:32</div>' +
150
         '</div></div></div>' +
151
         '<div style="display:flex;">' +
152
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
153
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
154
        '</div></div></div>'
155
      var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
156
      // 设置弹出框弹出位置
157
        .setLatLng({lat: 29.86089241772908, lng: 122.09930419921876})
158
      // 设置弹出框弹出内容
159
        .setContent(content)
160
        .openOn(this.map)
161
    })
162
    var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="hand-alarm">救援人员</div></div><div class="middle"><div class="row">' +
163
           '<div>终端编号</div>' +
164
           '<div>ZDBH0001</div>' +
165
         '</div>' +
166
         '<div class="row">' +
167
           '<div>最新定位时间</div>' +
168
           '<div>2020.08.13 08:24:32</div>' +
169
           '</div></div></div>' +
170
           '<div style="display:flex;">' +
171
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
172
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
173
         '</div></div></div>'
174
    var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
175
      // 设置弹出框弹出位置
176
      .setLatLng({lat: 29.86089241772908, lng: 122.09930419921876})
177
      // 设置弹出框弹出内容
178
      .setContent(content)
179
      .openOn(this.map)
180
    this.map.addLayer(this.alarmPoint)
181
    // 报警人员弹窗
182
    this.rescuePoint = Ai.Point([29.388158098102554, 122.45361328125], {icon: Ai.Icon({
183
      // 设置图标URL路径
184
      iconUrl: '/static/images/sosworker.png',
185
      // 设置图标大小
186
      iconSize: [20, 20],
187
      // 设置点对象和图标的相对偏移量
188
      iconAnchor: [0, 0]
189
    })})
190
    var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="alarm">报警人员</div></div><div class="middle"><div class="row">' +
191
           '<div>终端编号</div>' +
192
           '<div>ZDBH0001</div>' +
193
         '</div>' +
194
         '<div class="row">' +
195
           '<div>最新定位时间</div>' +
196
           '<div>2020.08.13 08:24:32</div>' +
197
            '</div></div></div>' +
198
           '<div style="display:flex;">' +
199
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
200
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
201
         '</div></div></div>'
202
    var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
203
      // 设置弹出框弹出位置
204
      .setLatLng({lat: 29.388158098102554, lng: 122.45361328125})
205
      // 设置弹出框弹出内容
206
      .setContent(content)
207
      .openOn(this.map)
208
209
    this.rescuePoint.on('click', (e) => {
210
      console.log(e)
211
      var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="alarm">报警人员</div></div><div class="middle"><div class="row">' +
212
           '<div>终端编号</div>' +
213
           '<div>ZDBH0001</div>' +
214
         '</div>' +
215
         '<div class="row">' +
216
           '<div>最新定位时间</div>' +
217
           '<div>2020.08.13 08:24:32</div>' +
218
            '</div></div></div>' +
219
           '<div style="display:flex;">' +
220
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
221
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
222
         '</div></div></div>'
223
      var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
224
      // 设置弹出框弹出位置
225
        .setLatLng({lat: 29.388158098102554, lng: 122.45361328125})
226
      // 设置弹出框弹出内容
227
        .setContent(content)
228
        .openOn(this.map)
229
    })
230
    this.map.addLayer(this.rescuePoint)
231
    var lineWktstr = 'LINESTRING ( 122.09930419921876 29.86089241772908,122.18582153320314 29.6913335169976,122.21878051757814 29.42494595179543,122.45361328125 29.388158098102554)'
232
    this.polyline = Ai.Polyline(lineWktstr, {color: 'red'})
233
    this.map.addLayer(this.polyline)
234
    this.map.on('click', function(evt) {
235
      var lat = evt.latlng.lat // 点击地图时的纬度
236
      var lng = evt.latlng.lng // 点击地图时的经度
237
      console.log(lng, lat)
238
    })
125
    this.load()
239 126
  },
240 127
  methods: {
128
    load() {
129
      this.$test
130
        .post(services.rescue.RESCUE_LOCATION, '')
131
        .then((res) => {
132
          console.log(res)
133
          res.data.dataList.forEach(element => {
134
            this.point(element.alarm)
135
            if (element.rescuer) {
136
              this.point(element.rescuer)
137
            }
138
          })
139
          this.map.addLayer(this.personLayer)
140
        })
141
        .catch((res) => {
142
          // 请求失败处理...
143
        })
144
    },
145
    point(e) {
146
      var icon, tips
147
      var callHelp = ''
148
      var other = ''
149
      if (e.locationStatus === '4' || e.locationStatus === '5') {
150
        icon = '/static/images/sosworker.png'
151
        tips = '<div class="alarm">报警人员</div>'
152
        other = '<div class="row sos">' +
153
                  '<div>求救时间</div>' +
154
                  '<div>' + e.alarmDate + '</div>' +
155
                  '</div>' + '<div class="row sos">' +
156
                  '<div>求救时长</div>' +
157
                  '<div>' + e.alarmLong + 'min</div>' +
158
                  '</div>'
159
        if (e.isNewAlarm === '1') {
160
          callHelp = '<div style="display:flex;">' +
161
                  "<button class='point-out' onClick='window.Vue.appoint(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-user-outline'></i>指派</button>" +
162
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
163
                  '</div>'
164
        } else {
165
          callHelp = '<div style="display:flex;justify-content: flex-end;">' +
166
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
167
                  '</div>'
168
        }
169
      } else if (e.locationStatus === '6') {
170
        icon = '/static/images/outlineworker.png'
171
        tips = '<div class="hand-alarm">救援人员</div>'
172
      }
173
      var point = Ai.Point([e.latitude, e.longitude], {
174
        icon: Ai.Icon({
175
          // 设置图标URL路径
176
          iconUrl: icon,
177
          // 设置图标大小
178
          iconSize: [20, 20],
179
          // 设置点对象和图标的相对偏移量
180
          iconAnchor: [0, 0]
181
        })
182
      })
183
      point.setAttributes(e)
184
      point.on('click', (pointE) => {
185
        var content =
186
                  '<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">' +
187
                  '<div>终端编号</div>' +
188
                  '<div>' + e.deviceNo + '</div>' +
189
                  '</div>' +
190
                  '<div class="row">' +
191
                  '<div>经度</div>' +
192
                  '<div>' + e.longitude + '</div>' +
193
                  '</div>' +
194
                  '<div class="row">' +
195
                  '<div>纬度</div>' +
196
                  '<div>' + e.latitude + '</div>' +
197
                  '</div>' + other +
198
                  '<div class="row">' +
199
                  '<div>最新定位时间</div>' +
200
                  '<div>' + e.newDate + '</div>' +
201
                  '</div></div></div>' + callHelp +
202
                  '</div></div>'
203
        var popup = Ai.Popup({
204
          minWidth: 300,
205
          offset: [0, -10],
206
          autoClose: true
207
        })
208
        // 设置弹出框弹出位置
209
        popup.setLatLng(point.getLatLng())
210
        // 设置弹出框弹出内容
211
        popup.setContent(content)
212
        popup.openOn(this.map)
213
        point.getAttributes().popup = popup
214
      })
215
      this.personLayer.addLayer(point)
216
    },
241 217
    showModal(item) {
242 218
      this.modal = true
243 219
    },

+ 7 - 5
ebc-middle-platform/src/modules/call-help/history.vue

@ -87,6 +87,7 @@
87 87
</template>
88 88
<script>
89 89
import './history.scss'
90
import { GIS_SEA_LAYER_URL, GIS_SEA_URL } from '@/constants'
90 91
export default {
91 92
  data() {
92 93
    return {
@ -214,14 +215,15 @@ export default {
214 215
  },
215 216
  mounted() {
216 217
    this.map = new Ai.Map('playback', {
217
      ak: 'MTYwMTEMTAwMU1UWXdNVEV3TXpRek16STVOU014TnpRdw__',
218
      center: [39.915599, 116.406568],
219
      zoom: 5
218
      ak: this.$store.getters.getGisToken,
219
      center: this.$store.getters.getMapParam.center,
220
      zoom: this.$store.getters.getMapParam.zoom
220 221
    })
221 222
    var maplayer = null
222
    maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
223
    maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
223 224
    this.map.addLayer(maplayer)
224
    var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht:dzht/wmts')
225
    var la = Ai.WMTSLayer(GIS_SEA_URL,
226
      { opacity: 0.5 })
225 227
    this.map.addLayer(la)
226 228
  },
227 229
  methods: {

+ 206 - 62
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -32,6 +32,7 @@
32 32
          @click="
33 33
            () => {
34 34
              trackModal = true;
35
              personTrack()
35 36
            }
36 37
          "
37 38
        >轨迹</t-button
@ -121,11 +122,20 @@
121 122
            <t-date-picker
122 123
              :class="trackQueryCondition.currentIndex === 3?'':'hidden'"
123 124
              v-model="rangeDate"
125
              align-right
126
              style="width:350px"
127
              type="dateTimeRange"
128
              placeholder="请选择时间"
129
              @date-change="onChangeDate">
130
            </t-date-picker>
131
            <!-- <t-date-picker
132
              :class="trackQueryCondition.currentIndex === 3?'':'hidden'"
133
              v-model="rangeDate"
124 134
              style="width: 250px"
125 135
              type="dateRange"
126 136
              placeholder="请选择时间"
127 137
              @date-change="onChangeDate"
128
            ></t-date-picker>
138
            ></t-date-picker> -->
129 139
            <div style="display: flex;line-height:32.5px">
130 140
              <div>速度</div>
131 141
              <t-select>
@ -152,14 +162,13 @@
152 162
      >
153 163
        <t-form-item label="救援人员" prop="rescue">
154 164
          <t-select v-model="formValidate.rescue" placeholder="请选择">
155
            <t-option>张三</t-option>
156
            <t-option>李四</t-option>
165
            <t-option v-for="(item, index) in rescuer" :key="index+'rescuer'" :value="item.id">{{ item.userName }}</t-option>
157 166
          </t-select>
158 167
        </t-form-item>
159 168
      </t-form>
160 169
      <div slot="footer">
161 170
        <t-button @click="cancel">取消</t-button>
162
        <t-button class="submit-button" @click="appoint()">指派</t-button>
171
        <t-button class="submit-button" @click="appointSubmit()">指派</t-button>
163 172
      </div>
164 173
    </t-modal>
165 174
  </div>
@ -169,7 +178,7 @@
169 178
import './orientation.scss'
170 179
import services from '../../conf/services'
171 180
import EventBus from '../../bus'
172
import { GIS_CENTER, GIS_ZOOM, GIS_SEA_LAYER_URL, GIS_SEA_URL } from '@/constants'
181
import { GIS_SEA_LAYER_URL, GIS_SEA_URL } from '@/constants'
173 182
export default {
174 183
  filters: {
175 184
    dateFormat(value) {
@ -298,7 +307,15 @@ export default {
298 307
          {
299 308
            required: true,
300 309
            message: '救援人员不能为空',
301
            trigger: 'blur'
310
            trigger: 'blur',
311
            validator(rule, value, callback) {
312
              console.log(value)
313
              if (!value) {
314
                callback(rule.message)
315
              } else {
316
                callback()
317
              }
318
            }
302 319
          }
303 320
        ]
304 321
      },
@ -318,7 +335,9 @@ export default {
318 335
        outLine: true,
319 336
        normal: true
320 337
      },
321
      personList: []
338
      personList: [],
339
      rescuer: [],
340
      appointAlarmId: ''
322 341
    }
323 342
  },
324 343
  mounted() {
@ -444,8 +463,8 @@ export default {
444 463
        icon = '/static/images/offlineworker.png'
445 464
        tips = '<div class="offline">离线</div>'
446 465
        callHelp = '<div style="display:flex;">' +
447
                  '<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
448
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
466
                  "<button class='point-out' onClick='window.Vue.appoint(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-user-outline'></i>指派</button>" +
467
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
449 468
                  '</div>'
450 469
        if (attributes.locationStatus !== e.locationStatus) {
451 470
          if (attributes.locationStatus == '0') {
@ -495,10 +514,16 @@ export default {
495 514
                  '<div>' + e.alarmLong + 'min</div>' +
496 515
                  '</div>'
497 516
        tips = '<div class="sos">SOS</div>'
498
        callHelp = '<div style="display:flex;">' +
499
                  '<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
500
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
517
        if (e.isNewAlarm === '1') {
518
          callHelp = '<div style="display:flex;">' +
519
                  "<button class='point-out' onClick='window.Vue.appoint(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-user-outline'></i>指派</button>" +
520
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
501 521
                  '</div>'
522
        } else {
523
          callHelp = '<div style="display:flex;justify-content: flex-end;">' +
524
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
525
                  '</div>'
526
        }
502 527
        if (attributes.locationStatus !== e.locationStatus) {
503 528
          if (attributes.locationStatus == '0') {
504 529
            this.personStatistics.sos++
@ -512,17 +537,18 @@ export default {
512 537
          }
513 538
        }
514 539
      }
515
      point.setIcon(Ai.Icon({
540
      if (!(e.locationStatus == '6')) {
541
        point.setIcon(Ai.Icon({
516 542
        // 设置图标URL路径
517
        iconUrl: icon,
518
        // 设置图标大小
519
        iconSize: [20, 20],
520
        // 设置点对象和图标的相对偏移量
521
        iconAnchor: [0, 0]
522
      }))
523
      point.setAttributes(e)
524
      point.on('click', (pointE) => {
525
        var content =
543
          iconUrl: icon,
544
          // 设置图标大小
545
          iconSize: [20, 20],
546
          // 设置点对象和图标的相对偏移量
547
          iconAnchor: [0, 0]
548
        }))
549
        point.setAttributes(e)
550
        point.on('click', (pointE) => {
551
          var content =
526 552
                  '<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">' +
527 553
                  '<div>终端编号</div>' +
528 554
                  '<div>' + e.deviceNo + '</div>' +
@ -540,17 +566,22 @@ export default {
540 566
                  '<div>' + e.newDate + '</div>' +
541 567
                  '</div></div></div>' + callHelp +
542 568
                  '</div></div>'
543
        Ai.Popup({
544
          minWidth: 300,
545
          offset: [0, -10],
546
          autoClose: true
569
          var popup = Ai.Popup({
570
            minWidth: 300,
571
            offset: [0, -10],
572
            autoClose: true
573
          })
574
          // 设置弹出框弹出位置
575
          popup.setLatLng(point.getLatLng())
576
          // 设置弹出框弹出内容
577
          popup.setContent(content)
578
          popup.openOn(this.map)
579
          point.getAttributes().popup = popup
547 580
        })
548
        // 设置弹出框弹出位置
549
          .setLatLng(point.getLatLng())
550
        // 设置弹出框弹出内容
551
          .setContent(content)
552
          .openOn(this.map)
553
      })
581
      }
582
      console.log(attributes.popup)
583
      var popup = attributes.popup
584
      popup.remove()
554 585
    },
555 586
    initMap() { // 加载主屏地图
556 587
      if (this.map != null && this.map != '') {
@ -702,8 +733,8 @@ export default {
702 733
              icon = '/static/images/offlineworker.png'
703 734
              tips = '<div class="offline">离线</div>'
704 735
              callHelp = '<div style="display:flex;">' +
705
                  '<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
706
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
736
                 "<button class='point-out' onClick='window.Vue.appoint(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-user-outline'></i>指派</button>" +
737
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
707 738
                  '</div>'
708 739
              this.personStatistics.offLine++
709 740
            } else if (e.locationStatus === '2' || e.locationStatus === '3') {
@ -731,25 +762,33 @@ export default {
731 762
                  '<div>求救时长</div>' +
732 763
                  '<div>' + e.alarmLong + 'min</div>' +
733 764
                  '</div>'
734
              callHelp = '<div style="display:flex;">' +
735
                  '<button class="point-out" onClick="window.Vue.rescueModal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
736
                  '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
765
              if (e.isNewAlarm === '1') {
766
                callHelp = '<div style="display:flex;">' +
767
                  "<button class='point-out' onClick='window.Vue.appoint(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-user-outline'></i>指派</button>" +
768
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
769
                  '</div>'
770
              } else {
771
                callHelp = '<div style="display:flex;justify-content: flex-end;">' +
772
                  "<button class='close-confirm' onClick='window.Vue.close(" + JSON.stringify(e) + ")'><i style='font-size: 20px;' class='aidicon aidicon-close'></i>关闭</button>" +
737 773
                  '</div>'
774
              }
775
738 776
              this.personStatistics.sos++
739 777
            }
740
            var point = Ai.Point([e.latitude, e.longitude], {
741
              icon: Ai.Icon({
778
            if (!(e.locationStatus === '6')) {
779
              var point = Ai.Point([e.latitude, e.longitude], {
780
                icon: Ai.Icon({
742 781
                // 设置图标URL路径
743
                iconUrl: icon,
744
                // 设置图标大小
745
                iconSize: [20, 20],
746
                // 设置点对象和图标的相对偏移量
747
                iconAnchor: [0, 0]
782
                  iconUrl: icon,
783
                  // 设置图标大小
784
                  iconSize: [20, 20],
785
                  // 设置点对象和图标的相对偏移量
786
                  iconAnchor: [0, 0]
787
                })
748 788
              })
749
            })
750
            point.setAttributes(e)
751
            point.on('click', (pointE) => {
752
              var content =
789
              point.setAttributes(e)
790
              point.on('click', (pointE) => {
791
                var content =
753 792
                  '<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">' +
754 793
                  '<div>终端编号</div>' +
755 794
                  '<div>' + e.deviceNo + '</div>' +
@ -767,20 +806,23 @@ export default {
767 806
                  '<div>' + e.newDate + '</div>' +
768 807
                  '</div></div></div>' + callHelp +
769 808
                  '</div></div>'
770
              Ai.Popup({
771
                minWidth: 300,
772
                offset: [0, -10],
773
                autoClose: true
774
              })
809
                var popup = Ai.Popup({
810
                  minWidth: 300,
811
                  offset: [0, -10],
812
                  autoClose: true
813
                })
775 814
                // 设置弹出框弹出位置
776
                .setLatLng(point.getLatLng())
815
                popup.setLatLng(point.getLatLng())
777 816
                // 设置弹出框弹出内容
778
                .setContent(content)
779
                .openOn(this.map)
780
            })
781
            this.layer.personLayer.addLayer(point)
817
                popup.setContent(content)
818
                popup.openOn(this.map)
819
                point.getAttributes().popup = popup
820
              })
821
              this.layer.personLayer.addLayer(point)
822
            }
782 823
          })
783 824
          this.map.addLayer(this.layer.personLayer)
825
          console.log(this.layer.personLayer)
784 826
        })
785 827
        .catch((res) => {
786 828
          // 请求失败处理...
@ -828,21 +870,80 @@ export default {
828 870
        title: '确认要关闭张三落水报警吗?',
829 871
        content: '关闭后将不再进行报警显示',
830 872
        ok: () => {
831
          console.log('点击了确定')
873
          console.log(item.alarmLogId)
874
          var params = new FormData()
875
          params.append('data', JSON.stringify({
876
            alarmLogId: item.alarmLogId
877
          }))
878
          this.$test
879
            .post(services.rescue.CLOSE_RESCUE, params)
880
            .then((res) => {
881
              console.log(res.data.result)
882
              if (res.data.result) {
883
                this.layer.personLayer.eachLayer(layer => {
884
                  if (layer.getAttributes().deviceId === item.deviceId) {
885
                    item.locationStatus = '0'
886
                    this.popupContent(item, layer)
887
                  }
888
                })
889
              }
890
            })
891
            .catch((res) => {
892
893
            })
832 894
        },
833 895
        cancel: () => {
834 896
          console.log('点击了取消')
835 897
        }
836 898
      })
837 899
    },
900
    appoint(item) { // 打开指派Modal
901
      console.log(item)
902
      this.$test
903
        .post(services.rescue.RESCUER_LIST, '')
904
        .then((res) => {
905
          this.rescueModal = true
906
          console.log(res)
907
          this.appointAlarmId = item.alarmLogId
908
          this.rescuer = res.data.dataList
909
        })
910
        .catch((res) => {
911
912
        })
913
    },
838 914
    cancel() {
839 915
      this.rescueModal = false
840 916
    },
841
    appoint() { // 指派
917
    appointSubmit() { // 指派
918
      console.log(this.formValidate.rescue)
919
      this.$refs['formValidate'].validate(valid => {
920
        console.log(valid)
921
        if (valid) {
922
          var params = new FormData()
923
          params.append('data', JSON.stringify({
924
            alarmLogId: this.appointAlarmId,
925
            rescuersId: this.formValidate.rescue
926
          }))
927
          this.$test
928
            .post(services.rescue.ASSIGN_RESCUER, params)
929
            .then((res) => {
930
              if (res.data.result) {
931
                this.$Message.success('指派成功!')
932
                this.rescueModal = false
933
              } else {
934
                this.$Message.danger('指派失败!')
935
                this.rescueModal = false
936
              }
937
            })
938
            .catch((res) => {
939
940
            })
941
        }
942
      })
842 943
    },
843 944
    personTrack(item) {
844
      item.checked = !item.checked
845
      var coords = [[40.026037, 116.323928], [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]]
945
      // item.checked = !item.checked
946
      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]]
846 947
      var defaultOptions = {
847 948
        paused: false,
848 949
        reverse: false,
@ -866,8 +967,51 @@ export default {
866 967
        }
867 968
      }
868 969
      var path = new Ai.DynamicPath(coords, defaultOptions)
970
      var coords1 = [[39.87501, 116.41937], [39.860736, 116.394740], [39.779519, 116.534789], [39.676013, 116.681703], [39.704545, 116.915117], [39.740458, 117.009856]]
971
      var defaultOptions1 = {
972
        paused: false,
973
        reverse: false,
974
        delay: 800,
975
        dashArray: [10, 20],
976
        weight: 5,
977
        opacity: 0.9,
978
        color: '#0000ff',
979
        pulseColor: '#FFFFFF',
980
        playerTrack: true,
981
        traceTitle: true,
982
        traceIcon: new Ai.Icon({
983
          iconUrl: 'http://192.168.74.189:9999/gisapi/images/man-or32.png',
984
          iconSize: [36, 36],
985
          iconAnchor: [18, 36]
986
        }),
987
        titleOptions: {
988
          className: 'trace_title',
989
          iconSize: null,
990
          iconAnchor: [48, 57]
991
        }
992
      }
993
      var path1 = new Ai.DynamicPath(coords1, defaultOptions1)
869 994
      this.trackMap.addLayer(path)
870 995
      path.playTraceOn(this.trackMap)
996
      this.trackMap.addLayer(path1)
997
      // path1.playTraceOn(this.trackMap)
998
      var params = new FormData()
999
      params.append('data', JSON.stringify({
1000
        deviceId: '981453',
1001
        timeType: 4,
1002
        pageNum: 1,
1003
        pageSize: 20,
1004
        beginTime: '2020-11-05 14:01:01',
1005
        endTime: '2020-11-05 14:18:14'
1006
      }))
1007
      this.$test
1008
        .post(services.device.DEVICE_TRACK, params)
1009
        .then((res) => {
1010
          console.log(res.data)
1011
        })
1012
        .catch((res) => {
1013
          // 请求失败处理...
1014
        })
871 1015
    }
872 1016
  }
873 1017
}

+ 1 - 1
ebc-middle-platform/src/modules/tools/Logo.vue

@ -2,7 +2,7 @@
2 2
  <div class="logo">
3 3
    <router-link :to="{name:'dashboard'}">
4 4
      <img :src="logoUrl" alt="logo" style="width: 32px; height: 18px">
5
      <h1>AI Design Pro</h1>
5
      <h1>人员定位与搜救系统</h1>
6 6
    </router-link>
7 7
  </div>
8 8
</template>