908
        if (!this.rangeDate) {
909
          this.$Message.warning('请选择时间!')
910
          return
911
        } else {
912
          params = {
913
            entityId: this.trackPerson.workEmployeeId,
914
            timeType: (this.trackQueryCondition.currentIndex + 1),
915
            startTime: this.rangeDate[0],
916
            endTime: this.rangeDate[1]
917
          }
918
        }
919
      } else {
920
        params = {
921
          entityId: this.trackPerson.workEmployeeId,
922
          timeType: (this.trackQueryCondition.currentIndex + 1)
920 923
        }
921 924
      }
922
      var path = new Ai.DynamicPath(coords, defaultOptions)
923
      this.trackMap.addLayer(path)
924
      path.playTraceOn(this.trackMap)
925
      // path1.playTraceOn(this.trackMap)
926
      var params = new FormData()
927
      params.append('data', JSON.stringify({
928
        deviceId: '981453',
929
        timeType: 4,
930
        pageNum: 1,
931
        pageSize: 20,
932
        beginTime: '2020-11-05 14:01:01',
933
        endTime: '2020-11-05 14:18:14'
934
      }))
925
      console.log(this.rangeDate)
935 926
      this.$test
936
        .post(services.device.DEVICE_TRACK, params)
927
        .post(services.organization.EMPLOYEE_TRACE, params)
937 928
        .then((res) => {
938
          console.log(res.data)
929
          console.log(res)
930
          var coords = res.data.coordArray
931
          var defaultOptions = {
932
            paused: false,
933
            reverse: false,
934
            delay: 800,
935
            dashArray: [10, 20],
936
            weight: 5,
937
            opacity: 0.9,
938
            color: '#0000ff',
939
            pulseColor: '#FFFFFF',
940
            playerTrack: true,
941
            traceTitle: false,
942
            traceIcon: new Ai.Icon({
943
              iconUrl: '/static/images/normalworker.png',
944
              iconSize: [16, 16],
945
              iconAnchor: [8, 8]
946
            }),
947
            titleOptions: {
948
              className: 'trace_title',
949
              iconSize: null,
950
              iconAnchor: [48, 57]
951
            }
952
          }
953
          this.trackPath = new Ai.DynamicPath(coords, defaultOptions)
954
          this.trackMap.addLayer(this.trackPath)
955
          this.trackPath.playTraceOn(this.trackMap)
939 956
        })
940 957
        .catch((res) => {
941 958
          // 请求失败处理...

[FE]监控布局 · 0294a46aed - Nuosi Git Service
chenxr3 лет назад: 4
Родитель
Сommit
0294a46aed

+ 13 - 3
security-protection-platform/src/api/system/index.js

@ -81,7 +81,17 @@ const api = {
81 81
  },
82 82
  // 获取ai任务列表
83 83
  getAiTaskList(params) {
84
    return $default.get('/sp/sysConfigAiTask/queryPageAiTask?', params)
84
    return $default.get('/sp/sysConfigAiTask/queryPageAiTask', params)
85
  },
86
  // 根据ID获取ai任务
87
  getAiTaskById(params) {
88
    return $default.get('/sp/sysConfigAiTask/queryAiTask?', params)
89
  },
90
  deleteAiTaskData(params) {
91
    return $default.post(`sp/sysConfigAiTask/deleteAiTask`, params)
92
  },
93
  createAiTask(params) {
94
    return $default.post(`/sp/sysConfigAiTask/createAiTask`, params)
85 95
  },
86 96
  // 获取设备列表数据
87 97
  getDeviceData (data) {
@ -166,8 +176,8 @@ const api = {
166 176
    }
167 177
  },
168 178
  moveTerminalRelIndex(params) {
169
    params = keysMapping(params, mappingMonitor, false)
170
    return $default.put('/sp/monitorSceneTerminal/moveMonitorSceneTerminalRelIndex', {params})
179
    // params = keysMapping(params, mappingMonitor, false)
180
    return $default.put('/sp/monitorSceneTerminal/moveMonitorSceneTerminalRelIndex', params)
171 181
  },
172 182
  getOneMonitorScene(monitorSceneId) {
173 183
    return $default.get(`/sp/monitorSceneManagement/queryOneMonitorScene?monitorSceneId=${monitorSceneId}`)

+ 6 - 4
security-protection-platform/src/modules/system/monitor/VideoMonitor/index.vue

@ -340,10 +340,12 @@ export default {
340 340
    datadragEnd(evt) {
341 341
      if (evt.oldIndex !== evt.newIndex) {
342 342
        let params = {
343
          monitorSceneTerminalRelId: this.areaMonitorList[evt.oldIndex].monitorSceneTerminalRelId, // 场景与终端关联ID
344
          monitorSceneId: this.currenScene.monitorSceneId, // 场景ID
345
          resourceToolId: this.areaMonitorList[evt.oldIndex].resourceToolId, // 终端ID
346
          resourceToolIndex: this.areaMonitorList[evt.newIndex].resourceToolIndex // 移动位置序号
343
          params:{
344
            monitorSceneTerminalRelId: this.areaMonitorList[evt.oldIndex].monitorSceneTerminalRelId, // 场景与终端关联ID
345
            monitorSceneId: this.currenScene.monitorSceneId, // 场景ID
346
            resourceToolId: this.areaMonitorList[evt.oldIndex].resourceToolId, // 终端ID
347
            resourceToolIndex: this.areaMonitorList[evt.newIndex].resourceToolIndex // 移动位置序号
348
          }
347 349
        }
348 350
        sysapi.moveTerminalRelIndex(params).then((resp) => {})
349 351
          .catch((error) => {