|
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
|
// 请求失败处理...
|