Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kd_control
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
kd_control
Commits
8d42e2f3
Commit
8d42e2f3
authored
Apr 18, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员轨迹回放
parent
75e238bf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
176 additions
and
21 deletions
+176
-21
config.json
public/config/config.json
+15
-2
Map2.vue
src/components/mars3d/Map2.vue
+9
-9
Map5.vue
src/components/mars3d/Map5.vue
+8
-4
index.vue
src/views/personnelPositioning/peopleLogData/index.vue
+144
-6
No files found.
public/config/config.json
View file @
8d42e2f3
...
@@ -107,6 +107,20 @@
...
@@ -107,6 +107,20 @@
}
}
]
]
},
},
{
"pid"
:
10
,
"name"
:
"高德影像"
,
"type"
:
"group"
,
"icon"
:
"http://mars3d.cn/example/img/basemaps/gaode_img.png"
,
"layers"
:
[
{
"name"
:
"底图"
,
"type"
:
"gaode"
,
"layer"
:
"img_d"
}
],
"show"
:
true
},
{
{
"pid"
:
10
,
"pid"
:
10
,
"name"
:
"高德影像"
,
"name"
:
"高德影像"
,
...
@@ -123,8 +137,7 @@
...
@@ -123,8 +137,7 @@
"type"
:
"gaode"
,
"type"
:
"gaode"
,
"layer"
:
"img_z"
"layer"
:
"img_z"
}
}
],
]
"show"
:
true
},
},
{
{
"pid"
:
10
,
"pid"
:
10
,
...
...
src/components/mars3d/Map2.vue
View file @
8d42e2f3
src/components/mars3d/Map5.vue
View file @
8d42e2f3
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
:id=
"`mars3d-container$
{mapKey}`"
<div
:id=
"`mars3d-container$
{mapKey}`"
:class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]">
</div>
:class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]">
</div>
<div
class=
"infoview"
>
<div
class=
"infoview"
v-show=
"!clockAnimate"
>
<div
style=
"display: inline-block;color:red;font-weight:bolder;"
>
点击地图设置坐标
</div>
<div
style=
"display: inline-block;color:red;font-weight:bolder;"
>
点击地图设置坐标
</div>
</div>
</div>
...
@@ -50,7 +50,10 @@
...
@@ -50,7 +50,10 @@
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
},
clockAnimate
:
{
type
:
Boolean
,
default
:
false
},
// 自定义参数
// 自定义参数
options
:
Object
,
options
:
Object
,
...
@@ -92,8 +95,9 @@
...
@@ -92,8 +95,9 @@
...
options
,
...
options
,
...
this
.
options
,
...
this
.
options
,
control
:
{
control
:
{
defaultContextMenu
:
false
,
//右键菜单
clockAnimate
:
this
.
clockAnimate
,
// 时钟动画控制(左下角)
},
timeline
:
this
.
clockAnimate
// 是否显示时间线控件
}
}
}
// 创建三维地球场景
// 创建三维地球场景
map
=
new
mars3d
.
Map
(
`mars3d-container
${
this
.
mapKey
}
`
,
mapOptions
);
map
=
new
mars3d
.
Map
(
`mars3d-container
${
this
.
mapKey
}
`
,
mapOptions
);
...
...
src/views/personnelPositioning/peopleLogData/index.vue
View file @
8d42e2f3
...
@@ -19,20 +19,19 @@
...
@@ -19,20 +19,19 @@
<el-button
size=
"mini"
icon=
"el-icon-refresh"
@
click=
"clearLimit"
>
重置
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-refresh"
@
click=
"clearLimit"
>
重置
</el-button>
</div>
</div>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
<div
class=
"panel-bottom page-row"
>
<div
class=
"panel-bottom page-row"
>
<div
class=
"ctin-box"
>
<div
class=
"ctin-box"
>
<div
class=
"content-within"
>
<div
class=
"content-within"
>
<div
class=
"content-fix"
>
<div
class=
"content-fix"
>
<div
class=
"toolbar"
>
<div
class=
"toolbar"
>
<!--
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
-->
<!--
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"toAdd"
>
新增
</el-button>
-->
<el-button
size=
"mini"
icon=
"el-icon-document"
@
click=
"downloadFile"
>
导出
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-document"
@
click=
"downloadFile"
>
导出
</el-button>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
style=
"width:auto"
>
<el-table-column
prop=
"safetyhatmac"
label=
"安全帽MAC"
align=
"center"
></el-table-column>
<el-table-column
prop=
"safetyhatmac"
label=
"安全帽MAC"
align=
"center"
></el-table-column>
<!--
<el-table-column
prop=
"cameraid"
label=
"摄像头id"
align=
"center"
></el-table-column>
-->
<!--
<el-table-column
prop=
"cameraid"
label=
"摄像头id"
align=
"center"
></el-table-column>
-->
<el-table-column
prop=
"type"
label=
"工种"
align=
"center"
>
<el-table-column
prop=
"type"
label=
"工种"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
type
==
'
1
'
?
'
访客
'
:
'
员工
'
}}
</span>
<span>
{{
scope
.
row
.
type
==
'
1
'
?
'
访客
'
:
'
员工
'
}}
</span>
...
@@ -42,7 +41,7 @@
...
@@ -42,7 +41,7 @@
<el-table-column
prop=
"phone"
label=
"电话"
align=
"center"
></el-table-column>
<el-table-column
prop=
"phone"
label=
"电话"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
class=
"link-cell"
>
轨迹回放
</span>
<span
class=
"link-cell"
@
click=
"openTrailView(scope.row)"
>
轨迹回放
</span>
<span
class=
"link-cell"
@
click=
"openPosView(scope.row)"
>
轨迹数据
</span>
<span
class=
"link-cell"
@
click=
"openPosView(scope.row)"
>
轨迹数据
</span>
<span
v-show=
"scope.row.userid"
class=
"link-cell"
@
click=
"openvideoView(scope.row)"
>
视频回放
</span>
<span
v-show=
"scope.row.userid"
class=
"link-cell"
@
click=
"openvideoView(scope.row)"
>
视频回放
</span>
<span
v-show=
"scope.row.userid"
class=
"link-cell"
@
click=
"openPhotoView(scope.row)"
>
相册
</span>
<span
v-show=
"scope.row.userid"
class=
"link-cell"
@
click=
"openPhotoView(scope.row)"
>
相册
</span>
...
@@ -58,6 +57,25 @@
...
@@ -58,6 +57,25 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 轨迹回放 -->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible=
"trailView"
title=
"轨迹回放"
width=
"1200px"
>
<div
class=
"head-container"
>
<label
class=
"el-form-item-label"
style=
"font-weight: 500;"
>
日期
</label>
<el-date-picker
v-model=
"trailDate"
type=
"datetimerange"
value-format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"至"
:default-time=
"['00:00:00', '23:59:59']"
>
start-placeholder="查询开始时间"
end-placeholder="查询结束时间">
</el-date-picker>
<el-button
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"drawTrail"
>
查询
</el-button>
</div>
<div
id=
"centerDiv"
class=
"mapcontainer"
>
<mars3dViewerMap
:url=
"configUrl"
@
onload=
"onMapload"
ref=
"mars3dViewerMapMethod"
mapKey=
"peopleTrailView"
:clockAnimate=
"true"
/>
</div>
</el-dialog>
<!-- 轨迹数据 -->
<!-- 轨迹数据 -->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible=
"posView"
title=
"轨迹数据"
width=
"900px"
>
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible=
"posView"
title=
"轨迹数据"
width=
"900px"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
...
@@ -142,9 +160,16 @@ import {JSWebrtc} from '@/assets/js/jswebrtc.js';
...
@@ -142,9 +160,16 @@ import {JSWebrtc} from '@/assets/js/jswebrtc.js';
import
'
video.js/dist/video-js.css
'
import
'
video.js/dist/video-js.css
'
import
videojs
from
'
video.js
'
import
videojs
from
'
video.js
'
import
'
videojs-contrib-hls
'
import
'
videojs-contrib-hls
'
import
mars3dViewerMap
from
"
../../../components/mars3d/Map5.vue
"
;
import
*
as
mars3d
from
"
mars3d
"
;
import
*
as
Cesium
from
"
mars3d-cesium
"
;
import
peopleIcon
from
"
../../../assets/images/point.png
"
;
export
default
{
export
default
{
name
:
'
peopleLogData
'
,
name
:
'
peopleLogData
'
,
components
:
{
mars3dViewerMap
,
},
data
()
{
data
()
{
const
basePathUrl
=
window
.
basePathUrl
||
''
const
basePathUrl
=
window
.
basePathUrl
||
''
return
{
return
{
...
@@ -158,6 +183,7 @@ export default {
...
@@ -158,6 +183,7 @@ export default {
videoDia
:
false
,
videoDia
:
false
,
videoRtc
:
false
,
videoRtc
:
false
,
posView
:
false
,
posView
:
false
,
trailView
:
false
,
page
:
1
,
page
:
1
,
size
:
10
,
size
:
10
,
total
:
0
,
total
:
0
,
...
@@ -180,6 +206,7 @@ export default {
...
@@ -180,6 +206,7 @@ export default {
pagePos
:
1
,
pagePos
:
1
,
sizePos
:
10
,
sizePos
:
10
,
totalPos
:
0
,
totalPos
:
0
,
trailDate
:
[],
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -206,12 +233,109 @@ export default {
...
@@ -206,12 +233,109 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
onMapload
(
map
)
{
map
.
unbindContextMenu
();
var
graphicLayer
=
new
mars3d
.
layer
.
GraphicLayer
();
map
.
addLayer
(
graphicLayer
);
this
.
map
=
map
;
this
.
graphicLayer
=
graphicLayer
;
},
drawTrail
()
{
let
map
=
this
.
map
;
let
graphicLayer
=
this
.
graphicLayer
;
if
(
!
(
this
.
trailDate
&&
this
.
trailDate
.
length
))
{
this
.
$message
({
message
:
'
请输入查询时间范围
'
});
return
;
}
let
param
=
{
safetyhatmac
:
this
.
peoItem
.
safetyhatmac
,
page
:
0
,
size
:
43200
,
sort
:
`date,asc`
};
param
.
daterange
=
this
.
trailDate
.
join
(
'
,
'
);
this
.
$nextTick
(()
=>
{
HttpReq
.
truckDispatching
.
propleGetLocus
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
body
){
let
trailList
=
res
.
body
.
list
;
const
property
=
new
Cesium
.
SampledPositionProperty
()
property
.
forwardExtrapolationType
=
Cesium
.
ExtrapolationType
.
HOLD
let
start
,
stop
,
position
;
for
(
let
i
=
0
,
len
=
trailList
.
length
;
i
<
len
;
i
++
)
{
const
item
=
trailList
[
i
];
position
=
Cesium
.
Cartesian3
.
fromDegrees
(
Number
(
item
.
y
),
Number
(
item
.
x
),
200
);
let
juliaDate
=
Cesium
.
JulianDate
.
fromDate
(
new
Date
(
item
.
time
.
replace
(
/-/g
,
"
/
"
)));
property
.
addSample
(
juliaDate
,
position
);
if
(
i
===
0
)
{
start
=
juliaDate
}
else
if
(
i
===
len
-
1
)
{
stop
=
juliaDate
}
const
graphic
=
new
mars3d
.
graphic
.
PointPrimitive
({
position
:
position
,
style
:
{
pixelSize
:
4
,
color
:
"
#cccccc
"
},
popup
:
"
id编号:
"
+
item
.
id
+
"
<br/>时间:
"
+
item
.
time
});
graphicLayer
.
addGraphic
(
graphic
);
}
// 设置时钟属性
map
.
clock
.
startTime
=
start
.
clone
()
map
.
clock
.
stopTime
=
stop
.
clone
()
map
.
clock
.
currentTime
=
start
.
clone
()
map
.
clock
.
clockRange
=
Cesium
.
ClockRange
.
LOOP_STOP
map
.
clock
.
multiplier
=
5
map
.
controls
.
timeline
.
zoomTo
(
start
,
stop
)
// 创建path对象
let
pathEntity
=
new
mars3d
.
graphic
.
PathEntity
({
position
:
property
,
orientation
:
new
Cesium
.
VelocityOrientationProperty
(
property
),
style
:
{
resolution
:
1
,
leadTime
:
0
,
trailTime
:
3600
,
color
:
"
#ff0000
"
,
width
:
3
},
label
:
{
text
:
this
.
peoItem
.
name
,
font_size
:
18
,
font_family
:
"
楷体
"
,
color
:
"
#ff0000
"
,
outline
:
true
,
outlineColor
:
"
#000000
"
,
visibleDepth
:
false
,
outlineWidth
:
5
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
25
)
// 偏移量
},
billboard
:
{
image
:
peopleIcon
,
scale
:
0.5
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
visibleDepth
:
false
}
})
graphicLayer
.
addGraphic
(
pathEntity
)
this
.
map
.
setCameraView
({
lat
:
trailList
[
0
].
x
,
lng
:
trailList
[
0
].
y
,
alt
:
300
});
}
}
})
})
},
loadData
()
{
loadData
()
{
var
param
=
this
.
query
;
var
param
=
this
.
query
;
param
.
page
=
this
.
page
-
1
;
param
.
page
=
this
.
page
-
1
;
param
.
size
=
this
.
size
;
param
.
size
=
this
.
size
;
param
.
vague
=
{
safetyhatmac
:
param
.
safetyhatmac
||
undefined
,
name
:
param
.
name
||
undefined
};
param
.
vague
=
{
safetyhatmac
:
param
.
safetyhatmac
||
undefined
,
name
:
param
.
name
||
undefined
};
param
.
exact
=
{
type
:
param
.
type
};
param
.
exact
=
{
type
:
param
.
type
};
param
.
sort
=
`date,desc`
;
param
.
sort
=
`date,desc`
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
//获取安检信息
//获取安检信息
...
@@ -360,6 +484,11 @@ export default {
...
@@ -360,6 +484,11 @@ export default {
let
d
=
time
?
new
Date
(
time
*
1000
)
:
new
Date
();
let
d
=
time
?
new
Date
(
time
*
1000
)
:
new
Date
();
return
`
${
d
.
getFullYear
()}
/
${(
'
0
'
+
(
d
.
getMonth
()
+
1
)).
substr
(
-
2
)}
/
${(
'
0
'
+
(
d
.
getDate
())).
substr
(
-
2
)}
${(
'
0
'
+
(
d
.
getHours
())).
substr
(
-
2
)}
:
${(
'
0
'
+
(
d
.
getMinutes
())).
substr
(
-
2
)}
:
${(
'
0
'
+
(
d
.
getSeconds
())).
substr
(
-
2
)}
`
;
return
`
${
d
.
getFullYear
()}
/
${(
'
0
'
+
(
d
.
getMonth
()
+
1
)).
substr
(
-
2
)}
/
${(
'
0
'
+
(
d
.
getDate
())).
substr
(
-
2
)}
${(
'
0
'
+
(
d
.
getHours
())).
substr
(
-
2
)}
:
${(
'
0
'
+
(
d
.
getMinutes
())).
substr
(
-
2
)}
:
${(
'
0
'
+
(
d
.
getSeconds
())).
substr
(
-
2
)}
`
;
},
},
openTrailView
(
item
)
{
this
.
trailView
=
true
;
this
.
peoItem
=
item
;
this
.
trailDate
=
[];
},
openPosView
(
item
)
{
openPosView
(
item
)
{
this
.
posView
=
true
;
this
.
posView
=
true
;
this
.
peoItem
=
item
;
this
.
peoItem
=
item
;
...
@@ -444,6 +573,10 @@ export default {
...
@@ -444,6 +573,10 @@ export default {
this
.
videoView
=
false
;
this
.
videoView
=
false
;
this
.
videoDia
=
false
;
this
.
videoDia
=
false
;
this
.
posView
=
false
;
this
.
posView
=
false
;
if
(
this
.
trailView
)
{
this
.
graphicLayer
.
clear
();
}
this
.
trailView
=
false
;
},
},
// 点击搜索
// 点击搜索
toSearch
()
{
toSearch
()
{
...
@@ -561,4 +694,9 @@ div::-webkit-scrollbar{
...
@@ -561,4 +694,9 @@ div::-webkit-scrollbar{
width
:
308px
;
width
:
308px
;
height
:
173px
;
height
:
173px
;
}
}
.mapcontainer
{
height
:
60vh
;
width
:
1160px
;
overflow
:
hidden
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment