Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
8cd66e52
提交
8cd66e52
authored
10月 29, 2024
作者:
翁进城
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v4' into v4_master
上级
f99ce075
bf4fc4ba
隐藏空白字符变更
内嵌
并排
正在显示
32 个修改的文件
包含
498 行增加
和
2998 行删除
+498
-2998
index.vue
...s/MMCFlightControlCenter/components/cesiumLayer/index.vue
+4
-2
index.vue
...ntrolPanel/components/controlLeft/components/Jm/index.vue
+0
-203
index.vue
...ist/components/normalTask/components/airwayEdit/index.vue
+4
-4
index.vue
...trolPanel/components/controlLeft/components/car/index.vue
+0
-154
index.vue
...rolPanel/components/controlLeft/components/face/index.vue
+0
-283
index.vue
...nts/player/components/player/components/livenvr/index.vue
+1
-1
index.vue
.../components/controlLeft/components/player/inner/index.vue
+2
-3
index.vue
.../components/controlLeft/components/player/outer/index.vue
+2
-3
index.vue
...el/components/controlLeft/components/player/uav/index.vue
+1
-2
index.vue
...Panel/components/controlLeft/components/traffic/index.vue
+0
-228
btn-active.png
...ft/components/videoMapSwitch/assets/images/btn-active.png
+0
-0
btn.png
...ntrolLeft/components/videoMapSwitch/assets/images/btn.png
+0
-0
uav-active.png
...ft/components/videoMapSwitch/assets/images/uav-active.png
+0
-0
uav.png
...ntrolLeft/components/videoMapSwitch/assets/images/uav.png
+0
-0
index.vue
...omponents/controlLeft/components/videoMapSwitch/index.vue
+182
-0
index.vue
.../components/controlPanel/components/controlLeft/index.vue
+17
-93
index.vue
...MCFlightControlCenter/components/mapImageSwitch/index.vue
+83
-183
index.vue
...ntrolPanel/components/controlLeft/components/Jm/index.vue
+0
-203
index.vue
...trolPanel/components/controlLeft/components/car/index.vue
+0
-154
index.vue
...rolPanel/components/controlLeft/components/face/index.vue
+0
-283
index.vue
...Panel/components/controlLeft/components/traffic/index.vue
+0
-228
btn-active.png
...ft/components/videoMapSwitch/assets/images/btn-active.png
+0
-0
btn.png
...ntrolLeft/components/videoMapSwitch/assets/images/btn.png
+0
-0
uav-active.png
...ft/components/videoMapSwitch/assets/images/uav-active.png
+0
-0
uav.png
...ntrolLeft/components/videoMapSwitch/assets/images/uav.png
+0
-0
index.vue
...omponents/controlLeft/components/videoMapSwitch/index.vue
+175
-0
index.vue
.../components/controlPanel/components/controlLeft/index.vue
+6
-31
index.vue
...plications/components/player/components/livenvr/index.vue
+2
-2
index.vue
...er/components/uavApplications/components/player/index.vue
+2
-1
index.js
...onents/uavApplications/components/player/methods/index.js
+0
-69
zoomTo.js
...nents/uavApplications/components/player/methods/zoomTo.js
+0
-868
index.vue
src/components/MMCFlightControlCenter/index.vue
+17
-0
没有找到文件。
src/components/MMCFlightControlCenter/components/cesiumLayer/index.vue
浏览文件 @
8cd66e52
...
...
@@ -233,8 +233,6 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.cesium_layerBox
{
}
.cpt-cesium_layer
::v-deep
{
width
:
100%
;
...
...
@@ -254,6 +252,10 @@ export default {
.cesium-viewer-navigationContainer
{
display
:
none
;
}
.cesium-credit-logoContainer
{
display
:
none
;
}
}
.videoWallMapStyle
{
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/Jm/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"car dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
快速建模
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"() => $emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content w267"
>
<el-cascader
size=
"mini"
filterable
popper-class=
"cpt-observe-mspace-dashboard-airway_popper"
v-model=
"taskCateId"
:options=
"airway_list"
clearable
:show-all-levels=
"false"
placeholder=
"请选择任务"
:props=
"
{
children: 'children',
label: 'taskTitle',
value: 'id',
emitPath: false,
}">
<template
slot-scope=
"
{ data }">
<el-tooltip
:disabled=
"data.taskTitle.length
<
11
"
class=
"item"
effect=
"dark"
:content=
"data.taskTitle"
placement=
"top-start"
>
<span>
{{
data
.
taskTitle
}}
</span>
</el-tooltip>
</
template
>
</el-cascader>
<el-select
class=
"mt10"
v-model=
"type"
size=
"mini"
placeholder=
"请选择类型"
>
<el-option
label=
"图片"
:value=
"0"
></el-option>
<el-option
label=
"视频"
:value=
"1"
></el-option>
</el-select>
<div
class=
"jcsb w267 h30 mt30"
>
<div
class=
"dec mt5"
>
1
</div><span
class=
"dib cf ml10 lh30"
>
快速建模
</span>
<div
class=
"btn fr cf h30 lh30 w80 cp"
@
click=
"jmFn(1)"
>
启动
</div>
</div>
<div
class=
"jcsb mt18 w267 h30"
>
<div
class=
"dec mt5"
>
2
</div><span
class=
"dib cf lh30 ml10"
>
数据处理
</span>
<div
class=
"btn fr cf h30 lh30 w80 cp"
@
click=
"jmFn(2)"
>
启动
</div>
</div>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
device
:
{
type
:
Object
,
default
:
()
=>
({})
},
},
data
()
{
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[],
type
:
null
,
taskCateId
:
null
,
airway_list
:
[]
}
},
created
()
{
this
.
list_airway
();
},
methods
:
{
jmFn
(
num
)
{
let
{
deviceHardId
}
=
this
.
device
if
(
num
==
1
)
{
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
`MMCEagleEye:// `
a
.
click
()
}
else
{
if
(
!
this
.
taskCateId
)
return
this
.
$message
.
warning
(
'请选择任务!'
)
if
(
this
.
type
==
null
)
return
this
.
$message
.
warning
(
'请选择类型!'
)
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
`MMCPosTool://&deviceId=
${
deviceHardId
}
enddeviceId&taskId=
${
this
.
taskCateId
}
endtaskId&type=
${
this
.
type
}
endtype`
a
.
click
()
}
},
async
list_airway
()
{
/* let res = await API.AIRWAY.getApprovedTask();
if (res) {
let jqList = [],
ctList = [],
lsList = [];
for (let i = 0; i < res.length; i++) {
if (res[i].taskCateId == 1) {
jqList.push(res[i]);
}
if (res[i].taskCateId == 2) {
ctList.push(res[i]);
}
if (res[i].taskCateId == 3) {
lsList.push(res[i]);
}
}
let airway_list = [
{
id: "警情任务",
taskTitle: "警情任务",
children: jqList,
},
{
id: "常态任务",
taskTitle: "常态任务",
children: ctList,
},
{
id: "临时任务",
taskTitle: "临时任务",
children: lsList,
},
];
this.airway_list = airway_list;
} */
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.car
{
width
:
268px
;
}
.dialog-content
{
padding
:
20px
14px
12px
;
max-height
:
461px
;
overflow
:
auto
;
.dec
{
width
:
20px
;
height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
border-radius
:
50%
;
background
:
#06199b
;
}
.btn
{
text-align
:
center
;
border
:
1px
#315ec7
solid
;
border-radius
:
3px
;
background-color
:
#02173d
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#D2D9FF
;
cursor
:
pointer
;
}
.btn
:hover
{
background
:
#06199b
;
}
}
.car-img
{
position
:
relative
;
width
:
100%
;
height
:
135px
;
.car-img__img
{
width
:
100%
;
height
:
100%
;
}
.car-img__label
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
height
:
28px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
14px
;
color
:
#aee9ff
;
font-family
:
MicrosoftYaHeiUI
;
}
}
.car-form
{
padding
:
10px
0
0
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
>div
{
margin-bottom
:
8px
;
&:last-child
{
margin-bottom
:
0
;
}
}
}
.car-item
{
margin-bottom
:
24px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/normalTask/components/airwayEdit/index.vue
浏览文件 @
8cd66e52
...
...
@@ -264,10 +264,10 @@ export default {
speed
:
point
.
speed
,
pointActionSaveReqVOS
:
point
.
waypointActions
.
map
((
action
)
=>
{
let
actionValue
=
[];
actionValue
.
push
(
`param1:
${
action
.
param1
||
""
}
`
);
actionValue
.
push
(
`param2:
${
action
.
param2
||
""
}
`
);
actionValue
.
push
(
`param3:
${
action
.
param3
||
""
}
`
);
actionValue
.
push
(
`param4:
${
action
.
param4
||
""
}
`
);
action
.
param1
&&
action
Value
.
push
(
`param1:
${
action
.
param1
||
""
}
`
);
action
.
param2
&&
action
Value
.
push
(
`param2:
${
action
.
param2
||
""
}
`
);
action
.
param3
&&
action
Value
.
push
(
`param3:
${
action
.
param3
||
""
}
`
);
action
.
param4
&&
action
Value
.
push
(
`param4:
${
action
.
param4
||
""
}
`
);
return
{
actionType
:
action
.
actionType
,
actionValue
:
actionValue
.
join
(
";"
),
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/car/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"car dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
车辆识别
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
v-infinite-scroll=
"load"
>
<template
v-if=
"list.length > 0"
>
<div
v-for=
"(item, i) in list"
:key=
"i"
class=
"car-item"
>
<div
class=
"car-img"
>
<img
class=
"car-img__img"
:src=
"imgUrl + item.imageUrl"
/>
<div
class=
"car-img__label"
>
{{
item
.
plateNum
||
'暂无'
}}
</div>
</div>
<div
class=
"car-form"
>
<div>
地点:
{{
item
.
addr
||
item
.
findAddress
||
'暂无'
}}
</div>
<div>
时间:
{{
item
.
findTime
||
'暂无'
}}
</div>
</div>
</div>
</
template
>
<
template
v-else
>
<div
style=
"text-align: center; width: 100%;"
>
暂无数据
</div>
</
template
>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
''
}
},
data
(){
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[],
pageNo
:
1
,
pageSize
:
3
,
}
},
created
(){
this
.
getCarList
()
},
methods
:
{
async
load
(){
this
.
pageNo
++
/* let res = await API.HOME.getflightvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
})
for(let i = 0; i < res.length; i++){
let item = res[i];
if(item.lon){
let address = await API.MAP.AiRegeo({
location: `${item.lon},${item.lat}`
})
item.addr = address.province.value + address.city.value + address.dist.value + address.road.roadname + address.poi;
}
this.list.push(res[i])
}
console.log(this.list,"list"); */
},
async
getCarList
(){
if
(
!
this
.
uavId
){
this
.
$message
.
error
(
'请选择无人机'
);
return
;
}
let
res
=
await
API
.
HOME
.
getflightvideoMsg
({
uavId
:
this
.
uavId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
})
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
item
=
res
[
i
];
if
(
item
.
lon
){
let
address
=
await
API
.
MAP
.
AiRegeo
({
location
:
`
${
item
.
lon
}
,
${
item
.
lat
}
`
})
item
.
addr
=
address
.
province
.
value
+
address
.
city
.
value
+
address
.
dist
.
value
+
address
.
road
.
roadname
+
address
.
poi
;
}
this
.
list
.
push
(
res
[
i
])
}
// this.list = res || [];
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.car
{
width
:
268px
;
}
.dialog-content
{
padding
:
20px
14px
12px
;
max-height
:
461px
;
overflow
:
auto
;
}
.car-img
{
position
:
relative
;
width
:
100%
;
height
:
135px
;
.car-img__img
{
width
:
100%
;
height
:
100%
;
}
.car-img__label
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
height
:
28px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
14px
;
color
:
#aee9ff
;
font-family
:
MicrosoftYaHeiUI
;
}
}
.car-form
{
padding
:
10px
0
0
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
>div
{
margin-bottom
:
8px
;
&:last-child
{
margin-bottom
:
0
;
}
}
}
.car-item
{
margin-bottom
:
24px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/face/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"face dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
人脸识别
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
v-infinite-scroll=
"load"
>
<template
v-if=
"list.length > 0"
>
<div
class=
"result"
v-for=
"(item, i) in list"
:key=
"i"
>
<div
class=
"rate-box"
>
<div
class=
"rate-img"
>
<img
:src=
"imgUrl + item.recordImageUrl"
/>
</div>
<div
class=
"rate-round"
>
<div
class=
"rate-round__value"
>
{{
Number
(
item
.
similarity
).
toFixed
(
2
)
}}
%
</div>
<div
class=
"rate-routd__text"
@
click=
"onDetail(item)"
>
详情
</div>
</div>
<div
class=
"rate-img rate-img--contrary"
>
<img
:src=
"imgUrl + item.snapImageUrl"
/>
</div>
</div>
<div
class=
"rate-form"
v-if=
"item.show"
>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
姓名:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
userName
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
出生年份:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
birthday
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
发现时间:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
occurTime
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
发现地点:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
addr
||
item
.
address
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
身份证号:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
idCard
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
AI识别:
</div>
<div
class=
"rate=form-item__value"
>
<template
v-if=
"item.labels && item.labels.length"
>
<div
class=
"round-border"
v-for=
"(label, j) in item.labels"
:key=
"j"
>
{{
label
}}
</div>
</
template
>
<
template
v-else
>
暂无
</
template
>
</div>
</div>
</div>
</div>
</template>
<
template
v-else
>
<div
style=
"text-align: center; width: 100%;"
>
暂无数据
</div>
</
template
>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
''
}
},
data
(){
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[
/* {
userName: '人热二',
birthday: '1888-02-11',
occurTime: '2022-02-30 08:22:14',
address: '深圳市南山区',
idCard: '112313123123',
labels: ['省内人员'],
similarity: '63',
img: '',
imgs: '',
show: true
} */
],
pageNo
:
1
,
pageSize
:
4
,
}
},
created
(){
this
.
getFaceList
();
},
methods
:
{
async
load
(){
this
.
pageNo
++
/* let res = await API.HOME.getFaceuavvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
})
for(let i = 0; i < res.length; i++){
let item = res[i];
if(item.longi){
let address = await API.MAP.AiRegeo({
location: `${item.longi},${item.lati}`
})
item.addr = address.province.value + address.city.value + address.dist.value + address.road.roadname + address.poi;
}
this.list.push(res[i])
}
console.log(this.list,"list"); */
},
async
getFaceList
(){
if
(
!
this
.
uavId
){
this
.
$message
.
error
(
'请选择无人机'
);
return
;
}
let
res
=
await
API
.
HOME
.
getFaceuavvideoMsg
({
uavId
:
this
.
uavId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
})
||
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
item
=
res
[
i
];
if
(
item
.
longi
){
let
address
=
await
API
.
MAP
.
AiRegeo
({
location
:
`
${
item
.
longi
}
,
${
item
.
lati
}
`
})
item
.
addr
=
address
.
province
.
value
+
address
.
city
.
value
+
address
.
dist
.
value
+
address
.
road
.
roadname
+
address
.
poi
;
}
this
.
list
.
push
(
res
[
i
])
}
// this.list = res || [];
},
onDetail
(
item
){
this
.
$set
(
item
,
'show'
,
!
item
.
show
);
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.face
{
width
:
268px
;
}
.dialog-content
{
padding
:
14px
;
cursor
:
initial
;
max-height
:
461px
;
overflow-y
:
auto
;
}
.result
{
width
:
100%
;
margin-top
:
27px
;
&:first-child
{
margin-top
:
0
;
}
}
.rate-box
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
width
:
100%
;
.rate-img{
flex
:
1
;
height
:
75px
;
background-image
:
url('../../assets/images/faceAI_border1.png')
;
background-size
:
100%
100%
;
padding
:
7px
;
display
:
flex
;
align-items
:
center
;
&.rate-img--contrary
{
background-image
:
url('../../assets/images/faceAI_border2.png')
;
justify-content
:
right
;
}
img
{
width
:
70px
;
height
:
70px
;
border-radius
:
7px
;
overflow
:
hidden
;
}
}
.rate-round
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.rate-round__value{
color
:
#fb799d
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
}
.rate-routd__text
{
cursor
:
pointer
;
font-size
:
12px
;
color
:
#b9d7f0
;
font-family
:
MicrosoftYaHei
;
transform
:
scale
(
0.9
);
margin-top
:
3px
;
}
}
}
.rate-form
{
margin-top
:
10px
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
.rate-form-item
{
margin-bottom
:
12px
;
display
:
flex
;
&:last-child
{
margin-bottom
:
0
;
}
.rate-form-item__label
{
width
:
70px
;
text-align
:
right
;
flex-shrink
:
0
;
}
.rate-form-item__value
{
}
}
}
.round-border
{
padding
:
2px
8px
;
border-radius
:
11px
;
border
:
1px
solid
#ff4a4a
;
color
:
#ff4a4a
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/components/player/components/livenvr/index.vue
浏览文件 @
8cd66e52
...
...
@@ -35,7 +35,7 @@ export default {
// console.log('livenvr', value)
if
(
newVal
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"livePlayer"
].
play
();
this
.
$refs
[
"livePlayer"
]
?
.
play
();
});
}
},
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/inner/index.vue
浏览文件 @
8cd66e52
...
...
@@ -17,13 +17,12 @@ export default {
computed
:
{
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
]),
name
()
{
return
`
${
this
.
hangar
?.
name
||
""
}
机库
`
// return `
$
{
this
.
hangar
?.
name
||
""
}
机库无人机
`;
return
`
${
this
.
hangar
?.
name
||
""
}
`;
},
url() {
let find = this.hangar?.streamConfiguration
?.find((v) => v.urlType === 1)
return find?.originalUrl || '';
return find?.originalUrl ||
find?.lowLatencyUrl || find?.fluencyUrl ||
'';
},
},
};
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/outer/index.vue
浏览文件 @
8cd66e52
...
...
@@ -17,13 +17,12 @@ export default {
computed
:
{
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
]),
name
()
{
return
`
${
this
.
hangar
?.
name
||
""
}
机库
`;
// return `
$
{
this
.
hangar
?.
name
||
""
}
机库无人机
`;
return
`
${
this
.
hangar
?.
name
||
""
}
`;
},
url() {
let find = this.hangar?.streamConfiguration
?.find((v) => v.urlType === 2)
return find?.originalUrl || '';
return find?.originalUrl ||
find?.lowLatencyUrl || find?.fluencyUrl ||
'';
},
},
methods: {},
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/player/uav/index.vue
浏览文件 @
8cd66e52
...
...
@@ -41,8 +41,7 @@ export default {
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
]),
name
()
{
return
`
${
this
.
hangar
?.
name
||
""
}
机库
`;
// return `
$
{
this
.
hangar
?.
name
||
""
}
机库无人机
`;
return
`
${
this
.
uav
?.
name
||
""
}
`;
},
label() {
return this.hangar?.uav?.organizationName || "";
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/traffic/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"traffic dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
交通指引
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
>
<div
class=
"step active"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
1
</div>
<div
class=
"step-desc"
>
无人机飞往交通事故现场进行拍摄取证
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onTakePhoto"
>
取证
</div>
</div>
<div
class=
"imgList mt8"
v-if=
"xcimg"
>
<el-image
style=
"width: 110px;height: 88px"
:src=
"imgApi + xcimg"
fit=
"cover"
:preview-src-list=
"[imgApi + xcimg]"
></el-image>
</div>
</div>
<div
class=
"step"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
2
</div>
<div
class=
"step-desc"
>
激活事故绘制软件并上传事故图
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onActiveApp"
>
激活软件
</div>
<el-upload
class=
"dib"
accept=
".png, .jpg, .image, .jpeg"
:action=
"upLoadApi + '/upload/v2_uploads'"
:on-success=
"onSuccess"
multiple
name=
"uploadFiles"
:show-file-list=
"false"
>
<div
class=
"btn1027"
style=
"margin-right: 0"
>
上传事故图
</div>
</el-upload>
</div>
<div
class=
"imgList mt8"
v-if=
"image"
>
<el-image
style=
"width: 110px;height: 88px"
:src=
"imgApi + image"
fit=
"cover"
:preview-src-list=
"[imgApi + image]"
></el-image>
</div>
</div>
<div
class=
"step"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
3
</div>
<div
class=
"step-desc"
>
生成交通事故报告
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onExportReport"
>
导出报告
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
// import Bus from "@/assets/ligature.js";
import
{
saveAs
}
from
"file-saver"
;
import
Moment
from
"moment"
;
// import API from "@/api";
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
""
}
},
data
()
{
return
{
upLoadApi
:
process
.
env
.
VUE_APP_UPLOADS_URL
,
imgApi
:
process
.
env
.
VUE_APP_IMG_URL
,
imageUrl
:
[],
imageName
:
[],
baseList
:
[],
image
:
null
,
xcimg
:
null
};
},
computed
:
{
taskId
()
{
return
this
.
$store
.
state
.
fckernel
.
taskId
;
},
user_info
()
{
return
this
.
$store
.
state
.
user
.
user_info
;
}
},
methods
:
{
//拍照
async
onTakePhoto
()
{
console
.
log
(
"uav_take_photo emit"
);
Bus
.
$emit
(
"uav_take_photo"
,
{
callback
:
async
blob
=>
{
console
.
log
(
"uav_take_photo callback"
);
const
moment
=
new
Moment
();
const
dateTime
=
moment
.
format
(
"yyyyMMddhhmmss"
);
saveAs
(
blob
,
`
${
dateTime
}
.jpg`
);
let
fd2
=
new
FormData
();
fd2
.
append
(
"uploadFile"
,
blob
,
`拍照.png`
);
fd2
.
append
(
"taskId"
,
this
.
taskId
);
fd2
.
append
(
"deviceHardId"
,
this
.
uavId
);
let
res2
=
await
API
.
FCKERNEL
.
Upload
(
fd2
);
console
.
log
(
res2
,
"urlrel"
);
this
.
xcimg
=
'/uploads'
+
res2
.
fileKey
;
this
.
$message
.
success
(
"取证成功!"
);
this
.
imageUrl
.
push
(
this
.
xcimg
);
this
.
imageName
.
push
(
'拍照.png'
);
let
res1
=
await
API
.
ACCIDENT
.
createTaskWord
({
imageUrl
:
this
.
imageUrl
,
imageName
:
this
.
imageName
,
taskId
:
this
.
taskId
,
baseList
:
null
});
this
.
imageName
=
[];
this
.
imageUrl
=
[];
}
});
},
//激活程序
onActiveApp
()
{
window
.
open
(
`TrafficAccident://`
,
"_blank"
);
},
//导出报告
onExportReport
()
{
let
url
=
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/hawksystemserver/task/exportTaskWord?id=
${
this
.
taskId
}
&FLYINGSESSIONID=
${
this
.
user_info
.
FLYINGSESSIONID
}
&mmc-identity=
${
this
.
user_info
[
"mmc-identity"
]}
`
;
const
fileName
=
url
;
window
.
open
(
fileName
);
},
//图片上传成功
async
onSuccess
(
res
,
file
,
fileList
)
{
console
.
log
(
"onSuccess"
,
res
);
if
(
res
.
status
==
1
)
{
this
.
imageUrl
.
push
(
res
.
data
[
0
].
url
);
this
.
imageName
.
push
(
res
.
data
[
0
].
name
);
this
.
baseList
.
push
(
res
.
data
[
0
].
encode
);
this
.
image
=
res
.
data
[
0
].
url
;
let
res1
=
await
API
.
ACCIDENT
.
createTaskWord
({
imageUrl
:
this
.
imageUrl
,
imageName
:
this
.
imageName
,
taskId
:
this
.
taskId
,
baseList
:
this
.
baseList
});
this
.
imageName
=
[];
this
.
imageUrl
=
[];
this
.
baseList
=
[];
this
.
$message
.
success
(
"上传成功"
);
}
else
{
this
.
$message
.
error
(
res
.
msg
||
"上传失败"
);
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.traffic
{
width
:
268px
;
}
.dialog-content
{
padding
:
16px
!important
;
height
:
initial
!important
;
}
.step
{
font-size
:
14px
;
font-family
:
SourceHanSansCN-Medium
,
SourceHanSansCN
;
font-weight
:
500
;
color
:
#fff
;
width
:
100%
;
margin-bottom
:
24px
;
&:last-child
{
margin-bottom
:
0
;
}
&
.active
{
.step-icon
{
background
:
#1439ff
;
}
}
.step-box
{
display
:
flex
;
//
justify-content
:
space-between
;
align-items
:
baseline
;
}
.step-icon
{
width
:
18px
;
height
:
18px
;
background
:
#515050
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
border-radius
:
50%
;
margin-right
:
8px
;
flex-shrink
:
0
;
}
.step-desc
{
height
:
40px
;
line-height
:
20px
;
}
}
.btn-box1027
{
padding
:
0
!important
;
justify-content
:
right
;
}
.btn1027
{
padding
:
3px
8px
;
min-width
:
64px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/btn-active.png
0 → 100644
浏览文件 @
8cd66e52
685 Bytes
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/btn.png
0 → 100644
浏览文件 @
8cd66e52
694 Bytes
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/uav-active.png
0 → 100644
浏览文件 @
8cd66e52
540 Bytes
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/uav.png
0 → 100644
浏览文件 @
8cd66e52
451 Bytes
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/videoMapSwitch/index.vue
0 → 100644
浏览文件 @
8cd66e52
<
template
>
<div
class=
"vm-switch"
@
mousemove=
"onMousemove"
@
mouseleave=
"onMouseleave"
>
<div
class=
"vm-switch-btn"
></div>
<div
class=
"vm-switch-list"
v-show=
"showMenu"
>
<div
class=
"vm-switch-item uav"
:class=
"
{ active: activeIndex === 0 }"
@click="onClickItem(0)"
>
</div>
<div
class=
"vm-switch-item"
:class=
"
{ active: activeIndex === 1 }" @click="onClickItem(1)">舱内
</div>
<div
class=
"vm-switch-item"
:class=
"
{ active: activeIndex === 2 }" @click="onClickItem(2)">舱外
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"VideoMapSwitch"
,
data
()
{
return
{
showMenu
:
false
,
activeIndex
:
-
1
,
// 激活项
};
},
beforeDestroy
(){
console
.
log
(
'hangar videoMapSwitch beforeDestroy'
);
this
.
reset
();
},
methods
:
{
onMousemove
()
{
this
.
showMenu
=
true
;
clearTimeout
(
this
.
handler
);
},
onMouseleave
()
{
this
.
handler
=
setTimeout
(()
=>
{
this
.
showMenu
=
false
;
},
300
);
},
onClickItem
(
i
)
{
this
.
reset
();
if
(
this
.
activeIndex
===
i
)
{
this
.
activeIndex
=
-
1
;
}
else
{
this
.
activeIndex
=
i
;
let
cesiumParentEl
=
document
.
querySelector
(
"#layer-container"
);
let
cesiumEl
=
document
.
querySelector
(
".cesium-viewer"
);
cesiumParentEl
.
removeChild
(
cesiumEl
);
let
parentEl
;
let
el
;
switch
(
i
)
{
case
0
:
parentEl
=
document
.
querySelector
(
"#playerUavParent"
);
el
=
document
.
querySelector
(
"#playerUav"
);
break
;
case
1
:
parentEl
=
document
.
querySelector
(
"#playInnerParent"
);
el
=
document
.
querySelector
(
"#playInner"
);
break
;
case
2
:
parentEl
=
document
.
querySelector
(
"#playOutParent"
);
el
=
document
.
querySelector
(
"#playerOuter"
);
break
;
}
parentEl
.
removeChild
(
el
);
parentEl
.
appendChild
(
cesiumEl
);
cesiumParentEl
.
appendChild
(
el
);
}
},
reset
()
{
let
cesiumEl
=
document
.
querySelector
(
".cesium-viewer"
);
// 判断cesium的父元素是否是layer-container来确定当前是否已经切换, 未切换就退出
if
(
cesiumEl
.
parentElement
.
id
===
'layer-container'
){
return
;
}
let
cesiumParentEl
=
document
.
querySelector
(
"#layer-container"
);
let
uavParentEl
=
document
.
querySelector
(
"#playerUavParent"
);
let
uavEl
=
document
.
querySelector
(
"#playerUav"
);
let
innerParentEl
=
document
.
querySelector
(
"#playInnerParent"
);
let
innerEl
=
document
.
querySelector
(
"#playInner"
);
let
outParentEl
=
document
.
querySelector
(
"#playOutParent"
);
let
outEl
=
document
.
querySelector
(
"#playerOuter"
);
cesiumParentEl
.
innerHTML
=
""
;
uavParentEl
.
innerHTML
=
""
;
innerParentEl
.
innerHTML
=
""
;
outParentEl
.
innerHTML
=
""
;
cesiumParentEl
.
append
(
cesiumEl
);
uavParentEl
.
append
(
uavEl
);
innerParentEl
.
append
(
innerEl
);
outParentEl
.
append
(
outEl
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.vm-switch
{
position
:
fixed
;
left
:
73px
;
bottom
:
30px
;
display
:
flex
;
align-items
:
center
;
.vm-switch-btn
{
box-sizing
:
border-box
;
width
:
48px
;
height
:
48px
;
background-color
:
#000
;
border-radius
:
50%
;
border
:
2px
solid
#fff
;
background-image
:
url("./assets/images/btn.png")
;
background-size
:
26px
26px
;
background-repeat
:
no-repeat
;
background-position
:
center
;
cursor
:
pointer
;
&:hover
{
background-image
:
url("./assets/images/btn-active.png")
;
}
}
.vm-switch-list
{
background
:
#ffffff
;
border-radius
:
4px
;
gap
:
10px
;
padding
:
7px
9px
;
position
:
relative
;
margin-left
:
6px
;
height
:
fit-content
;
display
:
flex
;
&::before
{
content
:
""
;
position
:
absolute
;
left
:
-6px
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
)
rotate
(
-90deg
);
background-color
:
transparent
;
width
:
0
;
height
:
0
;
border-left
:
3px
solid
transparent
;
border-right
:
3px
solid
transparent
;
border-bottom
:
6px
solid
#fff
;
}
.vm-switch-item
{
width
:
34px
;
height
:
34px
;
background-color
:
#000
;
font-size
:
10px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#fff
;
background-repeat
:
no-repeat
;
background-position
:
center
;
border-radius
:
2px
;
cursor
:
pointer
;
&.active
{
color
:
#3388ff
;
}
&
.uav
{
background-image
:
url("./assets/images/uav.png")
;
background-size
:
24px
24px
;
&.active
{
background-image
:
url("./assets/images/uav-active.png")
;
}
}
}
}
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/index.vue
浏览文件 @
8cd66e52
...
...
@@ -5,30 +5,6 @@
<div
class=
"left-bar-item__text"
>
任务
</div>
</div>
<AirwayList
class=
"task-list"
v-if=
"openTask"
></AirwayList>
<!--
<div
class=
"left-bar-item item"
@
click=
"onClickAI"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/ai.svg"
/>
<div
class=
"left-bar-item__text"
>
智能识别
</div>
</div>
<div
class=
"ai-list"
:class=
"
{ active: openAIList }">
<div
class=
"left-bar-item item"
@
click
.
stop=
"switchAI(0)"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/face.svg"
/>
<div
class=
"left-bar-item__text"
>
人脸识别
</div>
</div>
<div
class=
"left-bar-item item"
@
click
.
stop=
"switchAI(1)"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/car.svg"
/>
<div
class=
"left-bar-item__text"
>
车辆识别
</div>
</div>
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openPlate = false"
/>
<Traffic
v-if=
"openTraffic"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openTraffic = false"
/>
<Jm
v-if=
"openModeling"
:device=
"device"
class=
"jm-dialog"
@
close=
"openModeling = false"
></Jm>
</div>
-->
<!-- 展示视频 -->
<div
class=
"left-video"
:class=
"
{collapse: playerCollapse}" v-if="hangar
&&
showPanel
&&
listCollapse">
<div
class=
"collapse-btn"
@
click=
"playerCollapse = !playerCollapse"
>
...
...
@@ -36,58 +12,48 @@
</div>
<div
class=
"left-video-header"
>
<div
class=
"left-video-header__title"
@
click=
"
listCollapse = false
"
>
机库列表
</div>
<div
class=
"left-video-header__title"
@
click=
"
openList
"
>
机库列表
</div>
<div
class=
"nest-name"
>
<span
class=
"nest-name__text"
>
{{
hangar
.
name
}}
</span>
<span
class=
"nest-name__text"
>
{{
hangar
.
name
}}
</span>
</div>
</div>
<div
class=
"left-video-nest"
>
<div
class=
"player1"
>
<PlayerInner
/>
<div
id=
"playInnerParent"
class=
"player1"
>
<PlayerInner
id=
"playInner"
/>
</div>
<div
class=
"player2"
>
<PlayerOuter
/>
<div
id=
"playOutParent"
class=
"player2"
>
<PlayerOuter
id=
"playerOuter"
/>
</div>
<div
class=
"player3"
>
<PlayerUav
/>
<div
id=
"playerUavParent"
class=
"player3"
>
<PlayerUav
id=
"playerUav"
/>
</div>
</div>
</div>
<VideoMapSwitch
ref=
"videoMapSwitch"
></VideoMapSwitch>
</div>
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
import
Car
from
"./components/car"
;
import
Face
from
"./components/face"
;
import
Jm
from
"./components/Jm"
;
import
AirwayList
from
"./components/airwayList"
;
import
Traffic
from
"./components/traffic"
;
import
PlayerInner
from
"./components/player/inner"
;
import
PlayerOuter
from
"./components/player/outer"
;
import
PlayerUav
from
"./components/player/uav"
;
import
VideoMapSwitch
from
'./components/videoMapSwitch'
;
export
default
{
name
:
"ControlLeft"
,
components
:
{
Car
,
Jm
,
AirwayList
,
Traffic
,
Face
,
PlayerInner
,
PlayerOuter
,
PlayerUav
,
VideoMapSwitch
},
data
()
{
return
{
openTask
:
true
,
//打开任务
openAIList
:
false
,
//打开AI列表
openTraffic
:
false
,
//打开交通指引
openFace
:
false
,
//打开人脸识别
openPlate
:
false
,
//车牌识别
openModeling
:
false
,
//打开建模
playerCollapse
:
false
,
//收起播放器
};
},
...
...
@@ -110,7 +76,6 @@ export default {
watch
:
{
hangar
(){
this
.
openTask
=
false
;
this
.
openAIList
=
false
;
this
.
$nextTick
(()
=>
{
this
.
openTask
=
true
;
})
...
...
@@ -122,52 +87,11 @@ export default {
methods
:
{
onClickTask
()
{
this
.
openTask
=
!
this
.
openTask
;
this
.
openAIList
=
false
;
this
.
closeAI
();
},
onClickAI
()
{
this
.
openTask
=
false
;
this
.
openAIList
=
!
this
.
openAIList
;
this
.
closeAI
();
},
/**
* 切换AI功能
*/
switchAI
(
type
)
{
this
.
openFace
=
false
;
this
.
openPlate
=
false
;
this
.
openTraffic
=
false
;
this
.
openModeling
=
false
;
switch
(
type
)
{
case
0
:
this
.
openFace
=
!
this
.
openFace
;
break
;
case
1
:
this
.
openPlate
=
!
this
.
openPlate
;
break
;
case
2
:
if
(
this
.
taskId
==
null
)
{
return
this
.
$message
.
error
(
"暂无绑定任务!"
);
}
this
.
openTraffic
=
!
this
.
openTraffic
;
break
;
case
3
:
this
.
openModeling
=
!
this
.
openModeling
;
break
;
}
},
/**
* 关闭所有ai
*/
closeAI
()
{
this
.
openFace
=
false
;
this
.
openPlate
=
false
;
this
.
openTraffic
=
false
;
this
.
openModeling
=
false
;
},
openList
(){
this
.
listCollapse
=
false
;
this
.
$refs
.
videoMapSwitch
.
reset
();
}
},
};
</
script
>
...
...
@@ -176,14 +100,14 @@ export default {
.task-list
{
position
:
absolute
;
left
:
60px
;
top
:
-3
0px
;
top
:
0px
;
cursor
:
initial
;
}
.control-left
{
position
:
absolute
;
z-index
:
2
;
left
:
430px
;
top
:
13%
;
top
:
28px
;
transition
:
0.3s
;
&.collapse
{
...
...
@@ -369,7 +293,7 @@ export default {
}
.player3
{
width
:
100%
;
height
:
2
40
;
height
:
2
35px
;
}
}
}
...
...
src/components/MMCFlightControlCenter/components/mapImageSwitch/index.vue
浏览文件 @
8cd66e52
<!-- 飞控地图选择 -->
<
template
>
<div
class=
"map-switch"
>
<div
class=
"map-switch-
wrap cp"
@
click=
"change"
@
mouseout=
"likai
"
>
<div
class=
"map-item
map-item-satellite
"
></div>
<div
class=
"map-switch"
@
mousemove=
"onMousemove"
@
mouseleave=
"onMouseleave"
>
<div
class=
"map-switch-
btn
"
>
<div
class=
"map-item
"
:class=
"selectIconClass
"
></div>
</div>
<div
class=
"
changeMapBox pa cp
"
>
<div
class=
"
dise"
@
mouseout=
"likai
"
>
<div
class=
"
map-list"
v-show=
"showMenu
"
>
<div
class=
"
map-item
"
>
<div
class=
"
bai
"
class=
"
dim
"
:class=
"
{ active: !is_3d }"
v-show="!is_3d"
@click="handle_change_3d(true)"
>2D
</div>
<div
class=
"
bai
"
class=
"
dim
"
:class=
"
{ active: is_3d }"
v-show="is_3d"
@click="handle_change_3d(false)"
>3D
</div>
</div>
<div
v-for=
"item in tabs"
:key=
"item.id"
class=
"dise"
@
mousemove=
"jinru(item.id)"
>
<div
:class=
"
{
'map-item': 1,
[item.class_name]: 1,
}"
@click="handle_change(item.id)"
style="position: relative; overflow: hidden"
>
<div
class=
"zimu"
:class=
"
{ sh: numId == item.id + 1 }">
{{
item
.
name
}}
</div>
</div>
<div
v-for=
"item in tabs"
:key=
"item.id"
class=
"map-item"
@
click=
"onSelect(item.class_name)"
>
<el-tooltip
effect=
"dark"
:content=
"item.name"
placement=
"top-start"
>
<div
class=
"map-item"
:class=
"item.class_name"
@
click=
"handle_change(item.id)"
style=
"position: relative; overflow: hidden"
></div>
</el-tooltip>
</div>
</div>
</div>
...
...
@@ -42,8 +40,8 @@ export default {
components
:
{},
data
()
{
return
{
numId
:
null
,
//鼠标悬浮效果
active
:
false
,
selectIconClass
:
"map-item-satellite"
,
showMenu
:
false
,
is_3d
:
true
,
current
:
1
,
tabs
:
[
...
...
@@ -68,6 +66,7 @@ export default {
class_name
:
"map-item-night-blue"
,
},
],
handler
:
null
,
};
},
computed
:
{
...
...
@@ -85,12 +84,18 @@ export default {
},
watch
:
{},
methods
:
{
// 鼠标悬浮效果
jinru
(
id
)
{
this
.
numId
=
id
+
1
;
onMousemove
()
{
this
.
showMenu
=
true
;
clearTimeout
(
this
.
handler
);
},
onMouseleave
()
{
this
.
handler
=
setTimeout
(()
=>
{
this
.
showMenu
=
false
;
},
300
);
},
likai
()
{
this
.
numId
=
null
;
// 选中的图标
onSelect
(
className
)
{
this
.
selectIconClass
=
className
;
},
handle_change_3d
(
bool
)
{
this
.
is_3d
=
bool
;
...
...
@@ -118,16 +123,6 @@ export default {
}
console
.
log
(
"this.cesiumImagesLayers"
,
this
.
cesiumImagesLayers
,
id
);
},
change
()
{
this
.
active
=
!
this
.
active
;
// global_leyers.forEach(promise => {
// promise.then((layer) =>{
// layer.visible = this.active;
// });
// })
// base_layer.BASIC && (base_layer.BASIC.show = !this.active)
// base_layer.SATELLITE && (base_layer.SATELLITE.show = this.active)
},
},
};
</
script
>
...
...
@@ -136,89 +131,40 @@ export default {
.map-switch
{
z-index
:
1
;
bottom
:
30px
;
.changeMapBox
{
position
:
absolute
;
width
:
201px
;
height
:
48px
;
background
:
rgba
(
9
,
32
,
87
,
0.7
);
border
:
1px
solid
#43deff
;
left
:
-159px
;
margin-top
:
3px
;
display
:
none
;
justify-content
:
space-around
;
align-items
:
center
;
//
display
:
flex
;
.map-item
{
width
:
30px
;
height
:
30px
;
color
:
#04d5da
;
text-align
:
right
;
line-height
:
49px
;
//
margin-top
:
5px
;
border-radius
:
4px
;
font-size
:
9px
;
border
:
1px
solid
#eee
;
cursor
:
pointer
;
}
.map-item-satellite
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
.map-item-street
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
.map-item-night-blue
{
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
}
.map-item-3d
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
.map-item-2d
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
position
:
absolute
;
right
:
14px
;
width
:
104px
;
height
:
78px
;
width
:
48px
;
height
:
48px
;
transition
:
0.2s
;
transform
:
translateX
(
0
);
.map-switch-wrap
{
.map-switch-btn
{
cursor
:
pointer
;
position
:
absolute
;
right
:
0
;
min-width
:
52px
;
height
:
52px
;
width
:
100%
;
height
:
100%
;
border-radius
:
2px
;
overflow
:
hidden
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
transition
:
width
0.25s
;
&.active
{
width
:
166px
;
}
.map-item
{
width
:
52px
;
height
:
52px
;
box-sizing
:
border-box
;
border-radius
:
50%
;
border
:
3px
solid
#fff
;
position
:
relative
;
width
:
100%
;
height
:
100%
;
&.map-item-satellite
{
//
background
:
url(./assets/images/3d.png)
center
no-repeat
;
background
:
url("./assets/images/ditu_icon.png")
center
no-repeat
;
background
:
url(./assets/images/3d.png)
center
no-repeat
;
//
background
:
url("./assets/images/ditu_icon.png")
center
no-repeat
;
background-size
:
112%
112%
;
}
...
...
@@ -259,103 +205,56 @@ export default {
}
}
.waterbox
{
height
:
48px
;
width
:
48px
;
.map-list
{
position
:
absolute
;
top
:
130px
;
right
:
0px
;
border
:
1px
solid
#04d5da
;
background
:
rgba
(
22
,
29
,
45
,
0.7
);
color
:
#43deff
;
font-size
:
20px
;
line-height
:
48px
;
}
.water_quality
{
width
:
459px
;
height
:
418px
;
background
:
rgba
(
0
,
23
,
79
,
0.7
);
box-shadow
:
0
2px
4px
0
rgba
(
1
,
162
,
255
,
0.35
),
inset
0
0
40px
0
rgba
(
0
,
184
,
255
,
0.5
);
border-radius
:
13px
;
}
}
.map-switch
:hover
{
.changeMapBox
{
background
:
#fff
;
right
:
60px
;
display
:
flex
;
}
}
justify-content
:
space-around
;
align-items
:
center
;
padding
:
6px
;
gap
:
6px
;
.dise
{
width
:
34px
;
height
:
34px
;
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#fff
;
}
//
display
:
flex
;
.map-item
{
width
:
42px
;
height
:
36px
;
cursor
:
pointer
;
.bai
{
text-align
:
center
;
line-height
:
30px
;
font-size
:
14px
;
color
:
#ffffff
!important
;
font-weight
:
700
;
width
:
30
px
;
height
:
30px
;
//
border
:
2px
solid
#fff
;
border-radius
:
4p
x
;
//
margin
:
5px
0
0
0
;
background
:
#000000
;
cursor
:
pointer
;
}
.dim
{
width
:
100%
;
height
:
100%
;
font-size
:
14px
;
color
:
#ffffff
;
font-weight
:
700
;
border-radius
:
4
px
;
background
:
#000000
;
cursor
:
pointer
;
display
:
fle
x
;
justify-content
:
center
;
align-items
:
center
;
}
}
.zimu
{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
height
:
18px
;
opacity
:
0.64
;
background
:
#fff
;
border-radius
:
0
0
4px
4px
;
width
:
100%
;
text-align
:
center
;
font-size
:
12px
;
font-family
:
MicrosoftYaHei
;
color
:
#000
;
line-height
:
16px
;
font-weight
:
400
;
display
:
none
;
pointer-events
:
auto
;
}
.map-item-satellite
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
@keyframes
fr
{
from
{
bottom
:
-60%
;
}
.map-item-street
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
to
{
bottom
:
0%
;
}
}
.map-item-night-blue
{
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
}
.sh
{
display
:
block
;
animation
:
fr
1s
linear
;
animation-fill-mode
:
forwards
;
pointer-events
:
auto
;
}
.map-item-3d
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
.anniu
{
width
:
48px
;
height
:
48px
;
background
:
#fff
;
border-radius
:
50%
;
display
:
flex
;
justify-content
:
center
;
align-content
:
center
;
.map-item-2d
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/Jm/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"car dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
快速建模
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"() => $emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content w267"
>
<el-cascader
size=
"mini"
filterable
popper-class=
"cpt-observe-mspace-dashboard-airway_popper"
v-model=
"taskCateId"
:options=
"airway_list"
clearable
:show-all-levels=
"false"
placeholder=
"请选择任务"
:props=
"
{
children: 'children',
label: 'taskTitle',
value: 'id',
emitPath: false,
}">
<template
slot-scope=
"
{ data }">
<el-tooltip
:disabled=
"data.taskTitle.length
<
11
"
class=
"item"
effect=
"dark"
:content=
"data.taskTitle"
placement=
"top-start"
>
<span>
{{
data
.
taskTitle
}}
</span>
</el-tooltip>
</
template
>
</el-cascader>
<el-select
class=
"mt10"
v-model=
"type"
size=
"mini"
placeholder=
"请选择类型"
>
<el-option
label=
"图片"
:value=
"0"
></el-option>
<el-option
label=
"视频"
:value=
"1"
></el-option>
</el-select>
<div
class=
"jcsb w267 h30 mt30"
>
<div
class=
"dec mt5"
>
1
</div><span
class=
"dib cf ml10 lh30"
>
快速建模
</span>
<div
class=
"btn fr cf h30 lh30 w80 cp"
@
click=
"jmFn(1)"
>
启动
</div>
</div>
<div
class=
"jcsb mt18 w267 h30"
>
<div
class=
"dec mt5"
>
2
</div><span
class=
"dib cf lh30 ml10"
>
数据处理
</span>
<div
class=
"btn fr cf h30 lh30 w80 cp"
@
click=
"jmFn(2)"
>
启动
</div>
</div>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
device
:
{
type
:
Object
,
default
:
()
=>
({})
},
},
data
()
{
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[],
type
:
null
,
taskCateId
:
null
,
airway_list
:
[]
}
},
created
()
{
this
.
list_airway
();
},
methods
:
{
jmFn
(
num
)
{
let
{
deviceHardId
}
=
this
.
device
if
(
num
==
1
)
{
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
`MMCEagleEye:// `
a
.
click
()
}
else
{
if
(
!
this
.
taskCateId
)
return
this
.
$message
.
warning
(
'请选择任务!'
)
if
(
this
.
type
==
null
)
return
this
.
$message
.
warning
(
'请选择类型!'
)
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
`MMCPosTool://&deviceId=
${
deviceHardId
}
enddeviceId&taskId=
${
this
.
taskCateId
}
endtaskId&type=
${
this
.
type
}
endtype`
a
.
click
()
}
},
async
list_airway
()
{
/* let res = await API.AIRWAY.getApprovedTask();
if (res) {
let jqList = [],
ctList = [],
lsList = [];
for (let i = 0; i < res.length; i++) {
if (res[i].taskCateId == 1) {
jqList.push(res[i]);
}
if (res[i].taskCateId == 2) {
ctList.push(res[i]);
}
if (res[i].taskCateId == 3) {
lsList.push(res[i]);
}
}
let airway_list = [
{
id: "警情任务",
taskTitle: "警情任务",
children: jqList,
},
{
id: "常态任务",
taskTitle: "常态任务",
children: ctList,
},
{
id: "临时任务",
taskTitle: "临时任务",
children: lsList,
},
];
this.airway_list = airway_list;
} */
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.car
{
width
:
268px
;
}
.dialog-content
{
padding
:
20px
14px
12px
;
max-height
:
461px
;
overflow
:
auto
;
.dec
{
width
:
20px
;
height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
border-radius
:
50%
;
background
:
#06199b
;
}
.btn
{
text-align
:
center
;
border
:
1px
#315ec7
solid
;
border-radius
:
3px
;
background-color
:
#02173d
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#D2D9FF
;
cursor
:
pointer
;
}
.btn
:hover
{
background
:
#06199b
;
}
}
.car-img
{
position
:
relative
;
width
:
100%
;
height
:
135px
;
.car-img__img
{
width
:
100%
;
height
:
100%
;
}
.car-img__label
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
height
:
28px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
14px
;
color
:
#aee9ff
;
font-family
:
MicrosoftYaHeiUI
;
}
}
.car-form
{
padding
:
10px
0
0
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
>div
{
margin-bottom
:
8px
;
&:last-child
{
margin-bottom
:
0
;
}
}
}
.car-item
{
margin-bottom
:
24px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/car/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"car dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
车辆识别
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
v-infinite-scroll=
"load"
>
<template
v-if=
"list.length > 0"
>
<div
v-for=
"(item, i) in list"
:key=
"i"
class=
"car-item"
>
<div
class=
"car-img"
>
<img
class=
"car-img__img"
:src=
"imgUrl + item.imageUrl"
/>
<div
class=
"car-img__label"
>
{{
item
.
plateNum
||
'暂无'
}}
</div>
</div>
<div
class=
"car-form"
>
<div>
地点:
{{
item
.
addr
||
item
.
findAddress
||
'暂无'
}}
</div>
<div>
时间:
{{
item
.
findTime
||
'暂无'
}}
</div>
</div>
</div>
</
template
>
<
template
v-else
>
<div
style=
"text-align: center; width: 100%;"
>
暂无数据
</div>
</
template
>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
''
}
},
data
(){
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[],
pageNo
:
1
,
pageSize
:
3
,
}
},
created
(){
this
.
getCarList
()
},
methods
:
{
async
load
(){
this
.
pageNo
++
/* let res = await API.HOME.getflightvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
})
for(let i = 0; i < res.length; i++){
let item = res[i];
if(item.lon){
let address = await API.MAP.AiRegeo({
location: `${item.lon},${item.lat}`
})
item.addr = address.province.value + address.city.value + address.dist.value + address.road.roadname + address.poi;
}
this.list.push(res[i])
}
console.log(this.list,"list"); */
},
async
getCarList
(){
if
(
!
this
.
uavId
){
this
.
$message
.
error
(
'请选择无人机'
);
return
;
}
let
res
=
await
API
.
HOME
.
getflightvideoMsg
({
uavId
:
this
.
uavId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
})
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
item
=
res
[
i
];
if
(
item
.
lon
){
let
address
=
await
API
.
MAP
.
AiRegeo
({
location
:
`
${
item
.
lon
}
,
${
item
.
lat
}
`
})
item
.
addr
=
address
.
province
.
value
+
address
.
city
.
value
+
address
.
dist
.
value
+
address
.
road
.
roadname
+
address
.
poi
;
}
this
.
list
.
push
(
res
[
i
])
}
// this.list = res || [];
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.car
{
width
:
268px
;
}
.dialog-content
{
padding
:
20px
14px
12px
;
max-height
:
461px
;
overflow
:
auto
;
}
.car-img
{
position
:
relative
;
width
:
100%
;
height
:
135px
;
.car-img__img
{
width
:
100%
;
height
:
100%
;
}
.car-img__label
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
height
:
28px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
14px
;
color
:
#aee9ff
;
font-family
:
MicrosoftYaHeiUI
;
}
}
.car-form
{
padding
:
10px
0
0
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
>div
{
margin-bottom
:
8px
;
&:last-child
{
margin-bottom
:
0
;
}
}
}
.car-item
{
margin-bottom
:
24px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/face/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"face dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
人脸识别
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
v-infinite-scroll=
"load"
>
<template
v-if=
"list.length > 0"
>
<div
class=
"result"
v-for=
"(item, i) in list"
:key=
"i"
>
<div
class=
"rate-box"
>
<div
class=
"rate-img"
>
<img
:src=
"imgUrl + item.recordImageUrl"
/>
</div>
<div
class=
"rate-round"
>
<div
class=
"rate-round__value"
>
{{
Number
(
item
.
similarity
).
toFixed
(
2
)
}}
%
</div>
<div
class=
"rate-routd__text"
@
click=
"onDetail(item)"
>
详情
</div>
</div>
<div
class=
"rate-img rate-img--contrary"
>
<img
:src=
"imgUrl + item.snapImageUrl"
/>
</div>
</div>
<div
class=
"rate-form"
v-if=
"item.show"
>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
姓名:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
userName
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
出生年份:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
birthday
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
发现时间:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
occurTime
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
发现地点:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
addr
||
item
.
address
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
身份证号:
</div>
<div
class=
"rate=form-item__value"
>
{{
item
.
idCard
||
'暂无'
}}
</div>
</div>
<div
class=
"rate-form-item"
>
<div
class=
"rate-form-item__label"
>
AI识别:
</div>
<div
class=
"rate=form-item__value"
>
<template
v-if=
"item.labels && item.labels.length"
>
<div
class=
"round-border"
v-for=
"(label, j) in item.labels"
:key=
"j"
>
{{
label
}}
</div>
</
template
>
<
template
v-else
>
暂无
</
template
>
</div>
</div>
</div>
</div>
</template>
<
template
v-else
>
<div
style=
"text-align: center; width: 100%;"
>
暂无数据
</div>
</
template
>
</div>
</div>
</template>
<
script
>
// import API from '@/api';
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
''
}
},
data
(){
return
{
imgUrl
:
process
.
env
.
VUE_APP_IMG_URL
,
list
:
[
/* {
userName: '人热二',
birthday: '1888-02-11',
occurTime: '2022-02-30 08:22:14',
address: '深圳市南山区',
idCard: '112313123123',
labels: ['省内人员'],
similarity: '63',
img: '',
imgs: '',
show: true
} */
],
pageNo
:
1
,
pageSize
:
4
,
}
},
created
(){
this
.
getFaceList
();
},
methods
:
{
async
load
(){
this
.
pageNo
++
/* let res = await API.HOME.getFaceuavvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
})
for(let i = 0; i < res.length; i++){
let item = res[i];
if(item.longi){
let address = await API.MAP.AiRegeo({
location: `${item.longi},${item.lati}`
})
item.addr = address.province.value + address.city.value + address.dist.value + address.road.roadname + address.poi;
}
this.list.push(res[i])
}
console.log(this.list,"list"); */
},
async
getFaceList
(){
if
(
!
this
.
uavId
){
this
.
$message
.
error
(
'请选择无人机'
);
return
;
}
let
res
=
await
API
.
HOME
.
getFaceuavvideoMsg
({
uavId
:
this
.
uavId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
})
||
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
item
=
res
[
i
];
if
(
item
.
longi
){
let
address
=
await
API
.
MAP
.
AiRegeo
({
location
:
`
${
item
.
longi
}
,
${
item
.
lati
}
`
})
item
.
addr
=
address
.
province
.
value
+
address
.
city
.
value
+
address
.
dist
.
value
+
address
.
road
.
roadname
+
address
.
poi
;
}
this
.
list
.
push
(
res
[
i
])
}
// this.list = res || [];
},
onDetail
(
item
){
this
.
$set
(
item
,
'show'
,
!
item
.
show
);
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.face
{
width
:
268px
;
}
.dialog-content
{
padding
:
14px
;
cursor
:
initial
;
max-height
:
461px
;
overflow-y
:
auto
;
}
.result
{
width
:
100%
;
margin-top
:
27px
;
&:first-child
{
margin-top
:
0
;
}
}
.rate-box
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
width
:
100%
;
.rate-img{
flex
:
1
;
height
:
75px
;
background-image
:
url('../../assets/images/faceAI_border1.png')
;
background-size
:
100%
100%
;
padding
:
7px
;
display
:
flex
;
align-items
:
center
;
&.rate-img--contrary
{
background-image
:
url('../../assets/images/faceAI_border2.png')
;
justify-content
:
right
;
}
img
{
width
:
70px
;
height
:
70px
;
border-radius
:
7px
;
overflow
:
hidden
;
}
}
.rate-round
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.rate-round__value{
color
:
#fb799d
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
}
.rate-routd__text
{
cursor
:
pointer
;
font-size
:
12px
;
color
:
#b9d7f0
;
font-family
:
MicrosoftYaHei
;
transform
:
scale
(
0.9
);
margin-top
:
3px
;
}
}
}
.rate-form
{
margin-top
:
10px
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#fff
;
.rate-form-item
{
margin-bottom
:
12px
;
display
:
flex
;
&:last-child
{
margin-bottom
:
0
;
}
.rate-form-item__label
{
width
:
70px
;
text-align
:
right
;
flex-shrink
:
0
;
}
.rate-form-item__value
{
}
}
}
.round-border
{
padding
:
2px
8px
;
border-radius
:
11px
;
border
:
1px
solid
#ff4a4a
;
color
:
#ff4a4a
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/traffic/index.vue
deleted
100644 → 0
浏览文件 @
f99ce075
<
template
>
<div
class=
"traffic dialog1027"
v-interact
>
<div
class=
"dialog-header"
>
<div
class=
"dialog-header__icon"
/>
<div
class=
"dialog-header__title"
>
交通指引
</div>
<div
class=
"dialog-header_close"
style=
"color:#fff"
@
click=
"()=>$emit('close')"
>
关闭
</div>
</div>
<div
class=
"dialog-content"
>
<div
class=
"step active"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
1
</div>
<div
class=
"step-desc"
>
无人机飞往交通事故现场进行拍摄取证
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onTakePhoto"
>
取证
</div>
</div>
<div
class=
"imgList mt8"
v-if=
"xcimg"
>
<el-image
style=
"width: 110px;height: 88px"
:src=
"imgApi + xcimg"
fit=
"cover"
:preview-src-list=
"[imgApi + xcimg]"
></el-image>
</div>
</div>
<div
class=
"step"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
2
</div>
<div
class=
"step-desc"
>
激活事故绘制软件并上传事故图
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onActiveApp"
>
激活软件
</div>
<el-upload
class=
"dib"
accept=
".png, .jpg, .image, .jpeg"
:action=
"upLoadApi + '/upload/v2_uploads'"
:on-success=
"onSuccess"
multiple
name=
"uploadFiles"
:show-file-list=
"false"
>
<div
class=
"btn1027"
style=
"margin-right: 0"
>
上传事故图
</div>
</el-upload>
</div>
<div
class=
"imgList mt8"
v-if=
"image"
>
<el-image
style=
"width: 110px;height: 88px"
:src=
"imgApi + image"
fit=
"cover"
:preview-src-list=
"[imgApi + image]"
></el-image>
</div>
</div>
<div
class=
"step"
>
<div
class=
"step-box"
>
<div
class=
"step-icon"
>
3
</div>
<div
class=
"step-desc"
>
生成交通事故报告
</div>
</div>
<div
class=
"btn-box1027"
>
<div
class=
"btn1027"
@
click=
"onExportReport"
>
导出报告
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
// import Bus from "@/assets/ligature.js";
import
{
saveAs
}
from
"file-saver"
;
import
Moment
from
"moment"
;
// import API from "@/api";
export
default
{
props
:
{
uavId
:
{
type
:
String
,
default
:
""
}
},
data
()
{
return
{
upLoadApi
:
process
.
env
.
VUE_APP_UPLOADS_URL
,
imgApi
:
process
.
env
.
VUE_APP_IMG_URL
,
imageUrl
:
[],
imageName
:
[],
baseList
:
[],
image
:
null
,
xcimg
:
null
};
},
computed
:
{
taskId
()
{
return
this
.
$store
.
state
.
fckernel
.
taskId
;
},
user_info
()
{
return
this
.
$store
.
state
.
user
.
user_info
;
}
},
methods
:
{
//拍照
async
onTakePhoto
()
{
console
.
log
(
"uav_take_photo emit"
);
Bus
.
$emit
(
"uav_take_photo"
,
{
callback
:
async
blob
=>
{
console
.
log
(
"uav_take_photo callback"
);
const
moment
=
new
Moment
();
const
dateTime
=
moment
.
format
(
"yyyyMMddhhmmss"
);
saveAs
(
blob
,
`
${
dateTime
}
.jpg`
);
let
fd2
=
new
FormData
();
fd2
.
append
(
"uploadFile"
,
blob
,
`拍照.png`
);
fd2
.
append
(
"taskId"
,
this
.
taskId
);
fd2
.
append
(
"deviceHardId"
,
this
.
uavId
);
let
res2
=
await
API
.
FCKERNEL
.
Upload
(
fd2
);
console
.
log
(
res2
,
"urlrel"
);
this
.
xcimg
=
'/uploads'
+
res2
.
fileKey
;
this
.
$message
.
success
(
"取证成功!"
);
this
.
imageUrl
.
push
(
this
.
xcimg
);
this
.
imageName
.
push
(
'拍照.png'
);
let
res1
=
await
API
.
ACCIDENT
.
createTaskWord
({
imageUrl
:
this
.
imageUrl
,
imageName
:
this
.
imageName
,
taskId
:
this
.
taskId
,
baseList
:
null
});
this
.
imageName
=
[];
this
.
imageUrl
=
[];
}
});
},
//激活程序
onActiveApp
()
{
window
.
open
(
`TrafficAccident://`
,
"_blank"
);
},
//导出报告
onExportReport
()
{
let
url
=
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/hawksystemserver/task/exportTaskWord?id=
${
this
.
taskId
}
&FLYINGSESSIONID=
${
this
.
user_info
.
FLYINGSESSIONID
}
&mmc-identity=
${
this
.
user_info
[
"mmc-identity"
]}
`
;
const
fileName
=
url
;
window
.
open
(
fileName
);
},
//图片上传成功
async
onSuccess
(
res
,
file
,
fileList
)
{
console
.
log
(
"onSuccess"
,
res
);
if
(
res
.
status
==
1
)
{
this
.
imageUrl
.
push
(
res
.
data
[
0
].
url
);
this
.
imageName
.
push
(
res
.
data
[
0
].
name
);
this
.
baseList
.
push
(
res
.
data
[
0
].
encode
);
this
.
image
=
res
.
data
[
0
].
url
;
let
res1
=
await
API
.
ACCIDENT
.
createTaskWord
({
imageUrl
:
this
.
imageUrl
,
imageName
:
this
.
imageName
,
taskId
:
this
.
taskId
,
baseList
:
this
.
baseList
});
this
.
imageName
=
[];
this
.
imageUrl
=
[];
this
.
baseList
=
[];
this
.
$message
.
success
(
"上传成功"
);
}
else
{
this
.
$message
.
error
(
res
.
msg
||
"上传失败"
);
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.traffic
{
width
:
268px
;
}
.dialog-content
{
padding
:
16px
!important
;
height
:
initial
!important
;
}
.step
{
font-size
:
14px
;
font-family
:
SourceHanSansCN-Medium
,
SourceHanSansCN
;
font-weight
:
500
;
color
:
#fff
;
width
:
100%
;
margin-bottom
:
24px
;
&:last-child
{
margin-bottom
:
0
;
}
&
.active
{
.step-icon
{
background
:
#1439ff
;
}
}
.step-box
{
display
:
flex
;
//
justify-content
:
space-between
;
align-items
:
baseline
;
}
.step-icon
{
width
:
18px
;
height
:
18px
;
background
:
#515050
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
border-radius
:
50%
;
margin-right
:
8px
;
flex-shrink
:
0
;
}
.step-desc
{
height
:
40px
;
line-height
:
20px
;
}
}
.btn-box1027
{
padding
:
0
!important
;
justify-content
:
right
;
}
.btn1027
{
padding
:
3px
8px
;
min-width
:
64px
;
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/btn-active.png
0 → 100644
浏览文件 @
8cd66e52
685 Bytes
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/btn.png
0 → 100644
浏览文件 @
8cd66e52
694 Bytes
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/uav-active.png
0 → 100644
浏览文件 @
8cd66e52
540 Bytes
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/videoMapSwitch/assets/images/uav.png
0 → 100644
浏览文件 @
8cd66e52
451 Bytes
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/videoMapSwitch/index.vue
0 → 100644
浏览文件 @
8cd66e52
<
template
>
<div
class=
"vm-switch"
@
mousemove=
"onMousemove"
@
mouseleave=
"onMouseleave"
>
<div
class=
"vm-switch-btn"
></div>
<div
class=
"vm-switch-list"
v-show=
"showMenu"
>
<div
class=
"vm-switch-item uav"
:class=
"
{ active: activeIndex === 0 }"
@click="onClickItem(0)"
>
</div>
</div>
<div
id=
"uavPlayerParent"
v-show=
"activeIndex === 0"
class=
"uav-video"
></div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"VideoMapSwitch"
,
data
()
{
return
{
showMenu
:
false
,
activeIndex
:
-
1
,
};
},
beforeDestroy
(){
console
.
log
(
'uav videoMapSwitch beforeDestroy'
);
this
.
reset
();
},
methods
:
{
onMousemove
()
{
this
.
showMenu
=
true
;
clearTimeout
(
this
.
handler
);
},
onMouseleave
()
{
this
.
handler
=
setTimeout
(()
=>
{
this
.
showMenu
=
false
;
},
300
);
},
onClickItem
(
i
)
{
this
.
reset
();
if
(
this
.
activeIndex
===
i
)
{
this
.
activeIndex
=
-
1
;
}
else
{
this
.
activeIndex
=
i
;
let
cesiumParentEl
=
document
.
querySelector
(
"#layer-container"
);
let
cesiumEl
=
document
.
querySelector
(
".cesium-viewer"
);
cesiumParentEl
.
removeChild
(
cesiumEl
);
let
parentEl
;
let
el
;
switch
(
i
)
{
case
0
:
parentEl
=
document
.
querySelector
(
"#uavPlayerParent"
);
el
=
document
.
querySelector
(
"#uavPlayer"
);
uavPlayerWrap
.
style
.
display
=
'none'
;
break
;
}
parentEl
.
appendChild
(
cesiumEl
);
cesiumParentEl
.
appendChild
(
el
);
}
},
reset
()
{
let
cesiumEl
=
document
.
querySelector
(
".cesium-viewer"
);
// 判断cesium的父元素是否是layer-container来确定当前是否已经切换, 未切换就退出
if
(
cesiumEl
.
parentElement
.
id
===
'layer-container'
){
return
;
}
let
cesiumParentEl
=
document
.
querySelector
(
"#layer-container"
);
let
uavParentEl
=
document
.
querySelector
(
"#uavPlayerParent"
);
let
uavEl
=
document
.
querySelector
(
"#uavPlayer"
);
let
uavPlayerWrap
=
document
.
querySelector
(
'#uavPlayerWrap'
);
let
uavPlayerParent
=
uavPlayerWrap
?.
querySelector
(
'.cpt_video'
);
cesiumParentEl
.
innerHTML
=
""
;
uavParentEl
.
innerHTML
=
""
;
cesiumParentEl
.
append
(
cesiumEl
);
uavPlayerParent
.
append
(
uavEl
);
uavPlayerWrap
.
style
.
display
=
''
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.vm-switch
{
position
:
fixed
;
left
:
73px
;
bottom
:
30px
;
display
:
flex
;
align-items
:
center
;
.vm-switch-btn
{
box-sizing
:
border-box
;
width
:
48px
;
height
:
48px
;
background-color
:
#000
;
border-radius
:
50%
;
border
:
2px
solid
#fff
;
background-image
:
url("./assets/images/btn.png")
;
background-size
:
26px
26px
;
background-repeat
:
no-repeat
;
background-position
:
center
;
cursor
:
pointer
;
&:hover
{
background-image
:
url("./assets/images/btn-active.png")
;
}
}
.vm-switch-list
{
background
:
#ffffff
;
border-radius
:
4px
;
gap
:
10px
;
padding
:
7px
9px
;
position
:
relative
;
margin-left
:
6px
;
height
:
fit-content
;
display
:
flex
;
&::before
{
content
:
""
;
position
:
absolute
;
left
:
-6px
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
)
rotate
(
-90deg
);
background-color
:
transparent
;
width
:
0
;
height
:
0
;
border-left
:
3px
solid
transparent
;
border-right
:
3px
solid
transparent
;
border-bottom
:
6px
solid
#fff
;
}
.vm-switch-item
{
width
:
34px
;
height
:
34px
;
background-color
:
#000
;
font-size
:
10px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#fff
;
background-repeat
:
no-repeat
;
background-position
:
center
;
border-radius
:
2px
;
cursor
:
pointer
;
&.active
{
color
:
#3388ff
;
}
&
.uav
{
background-image
:
url("./assets/images/uav.png")
;
background-size
:
24px
24px
;
&.active
{
background-image
:
url("./assets/images/uav-active.png")
;
}
}
}
}
.uav-video
{
position
:
absolute
;
bottom
:
100px
;
left
:
0px
;
width
:
388px
;
height
:
220px
;
}
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/index.vue
浏览文件 @
8cd66e52
...
...
@@ -6,50 +6,22 @@
</div>
<TaskList
class=
"task-list"
v-if=
"!useAirway && openTask"
></TaskList>
<AirwayList
class=
"task-list"
v-if=
"useAirway && openTask"
></AirwayList>
<!--
<div
class=
"left-bar-item item"
@
click=
"onClickAI"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/ai.svg"
/>
<div
class=
"left-bar-item__text"
>
智能识别
</div>
</div>
<div
class=
"ai-list"
:class=
"
{ active: openAIList }">
<div
class=
"left-bar-item item"
@
click
.
stop=
"switchAI(0)"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/face.svg"
/>
<div
class=
"left-bar-item__text"
>
人脸识别
</div>
</div>
<div
class=
"left-bar-item item"
@
click
.
stop=
"switchAI(1)"
>
<img
class=
"left-bar-item__icon"
src=
"./assets/images/car.svg"
/>
<div
class=
"left-bar-item__text"
>
车辆识别
</div>
</div>
<Face
v-if=
"openFace"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openFace = false"
/>
<Car
v-if=
"openPlate"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openPlate = false"
/>
<Traffic
v-if=
"openTraffic"
class=
"ai-dialog"
:uavId=
"uav.deviceId"
@
close=
"openTraffic = false"
/>
<Jm
v-if=
"openModeling"
:device=
"device"
class=
"jm-dialog"
@
close=
"openModeling = false"
></Jm>
</div>
-->
<VideoMapSwitch
ref=
"videoMapSwitch"
></VideoMapSwitch>
</div>
</
template
>
<
script
>
import
{
mapState
}
from
"vuex"
;
import
Car
from
"./components/car"
;
import
Face
from
"./components/face"
;
import
Jm
from
"./components/Jm"
;
import
TaskList
from
"./components/taskList"
;
import
AirwayList
from
"./components/airwayList"
;
import
Traffic
from
"./components/traffic"
;
import
VideoMapSwitch
from
'./components/videoMapSwitch'
;
export
default
{
name
:
"ControlLeft"
,
components
:
{
Car
,
Jm
,
TaskList
,
AirwayList
,
Traffic
,
Face
,
VideoMapSwitch
},
data
()
{
return
{
...
...
@@ -85,6 +57,9 @@ export default {
this
.
openTask
=
true
;
});
},
listCollapse
(){
this
.
$refs
.
videoMapSwitch
.
reset
();
}
},
methods
:
{
onClickTask
()
{
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/components/livenvr/index.vue
浏览文件 @
8cd66e52
...
...
@@ -86,10 +86,10 @@ export default {
if
(
value
.
vUrl
==
oldVal
?.
vUrl
)
{
return
;
}
// console.log('livenvr', value
)
console
.
log
(
'livenvr'
,
value
,
oldVal
)
if
(
value
&&
value
.
vUrl
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"livePlayer"
].
play
();
this
.
$refs
[
"livePlayer"
]
?
.
play
();
});
}
},
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/index.vue
浏览文件 @
8cd66e52
<
template
>
<!-- 清流融合 -->
<div
class=
"player"
:class=
"big"
v-interact
>
<div
id=
"uavPlayerWrap"
class=
"player"
:class=
"big"
v-interact
>
<div
ref=
"video"
class=
"video-wrap"
@
dblclick=
"screen"
>
<div
class=
"cpt_video"
@
click=
"lensControl"
v-if=
"showPlayer"
>
<Obstacle
v-if=
"!isStatus"
></Obstacle>
...
...
@@ -21,6 +21,7 @@
></videoModelChange>
-->
<components
id=
"uavPlayer"
:is=
"playerCom"
:smallFPV=
"smallFPV"
:isStatus=
"isStatus"
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/methods/index.js
deleted
100644 → 0
浏览文件 @
f99ce075
import
axios
from
'axios'
;
// import API from "../../../../../api";
export
default
{
interfaceAI
(
url
)
{
let
blob
=
this
.
screenShot
();
let
data
=
{
image
:
null
}
blobToBase64
(
blob
,
async
(
base64DataUrl
)
=>
{
data
.
image
=
base64DataUrl
let
res
=
await
axios
.
post
(
"http://32.128.6.151:9090/api/inflet/v1/tasks/3b2c435f-0652-418c-82d0-37efed27e9c1/predict"
,
data
)
// console.log(res);
console
.
log
(
res
.
data
.
data
,
"swiming"
);
// if(this.indexswim == 10){
if
(
res
.
data
.
data
.
targets
&&
res
.
data
.
data
.
targets
.
length
>
0
)
{
clearInterval
(
this
.
AISetInterval
)
this
.
AISetInterval
=
null
// this.$emit("fn", {data: "POSITION",type: 513});
// if (this.lineLableName.includes("河道")) {
this
.
$emit
(
"AIDialog"
,
true
,
"当前区域发现疑似游泳人员"
)
// }
let
fd
=
new
FormData
();
fd
.
append
(
"uploadFiles"
,
blob
,
`下载.jpeg`
);
let
res2
=
await
API
.
MAPMANAGE
.
fileUpload
(
fd
);
let
data2
=
{
imageUrl
:
res2
[
0
].
storage
,
deviceHardId
:
this
.
device
.
deviceHardId
,
jsonData
:
JSON
.
stringify
(
res
.
data
.
data
)
}
let
swimres
=
await
API
.
FCKERNEL
.
insertSwimmingMonitor
(
data2
)
// process.env.VUE_APP_IMG_URL +
let
imgshowurl
=
process
.
env
.
VUE_APP_IMG_URL
+
res2
[
0
].
url
;
this
.
$emit
(
"imgUrl"
,
imgshowurl
,
4
,
JSON
.
stringify
(
res
.
data
.
data
));
}
});
function
blobToBase64
(
blob
,
callback
)
{
let
reader
=
new
FileReader
()
reader
.
onload
=
()
=>
{
callback
(
reader
.
result
)
}
reader
.
readAsDataURL
(
blob
)
}
},
//人流识别
async
setIntervalFrame
()
{
let
blob
=
this
.
screenShot
();
let
fd
=
new
FormData
();
fd
.
append
(
"uploadFiles"
,
blob
,
`下载.jpeg`
);
let
res
=
await
API
.
MAPMANAGE
.
fileUpload
(
fd
);
let
data
=
{
// imageUrl:"http://32.128.6.52:9000/uploads/2023/05/26/2f183488-ad62-41c2-bb89-736ade5d8f36.png",
imageUrl
:
res
[
0
].
storage
,
deviceHardId
:
this
.
device
.
deviceHardId
,
};
let
res2
=
await
API
.
FCKERNEL
.
crowdDensity
(
data
);
if
(
res2
.
total
&&
res2
.
total
>
20
)
{
clearInterval
(
this
.
AISetInterval
)
this
.
AISetInterval
=
null
this
.
$emit
(
"fn"
,
{
data
:
"POSITION"
,
type
:
513
});
this
.
$emit
(
"AIDialog"
,
true
,
"当前区域人流聚集"
)
}
},
}
\ No newline at end of file
src/components/MMCFlightControlCenter/components/uavApplications/components/player/methods/zoomTo.js
deleted
100644 → 0
浏览文件 @
f99ce075
//CRC 校验表
var
crc_table
=
new
Array
(
0x00
,
0x31
,
0x62
,
0x53
,
0xc4
,
0xf5
,
0xa6
,
0x97
,
0xb9
,
0x88
,
0xdb
,
0xea
,
0x7d
,
0x4c
,
0x1f
,
0x2e
,
0x43
,
0x72
,
0x21
,
0x10
,
0x87
,
0xb6
,
0xe5
,
0xd4
,
0xfa
,
0xcb
,
0x98
,
0xa9
,
0x3e
,
0x0f
,
0x5c
,
0x6d
,
0x86
,
0xb7
,
0xe4
,
0xd5
,
0x42
,
0x73
,
0x20
,
0x11
,
0x3f
,
0x0e
,
0x5d
,
0x6c
,
0xfb
,
0xca
,
0x99
,
0xa8
,
0xc5
,
0xf4
,
0xa7
,
0x96
,
0x01
,
0x30
,
0x63
,
0x52
,
0x7c
,
0x4d
,
0x1e
,
0x2f
,
0xb8
,
0x89
,
0xda
,
0xeb
,
0x3d
,
0x0c
,
0x5f
,
0x6e
,
0xf9
,
0xc8
,
0x9b
,
0xaa
,
0x84
,
0xb5
,
0xe6
,
0xd7
,
0x40
,
0x71
,
0x22
,
0x13
,
0x7e
,
0x4f
,
0x1c
,
0x2d
,
0xba
,
0x8b
,
0xd8
,
0xe9
,
0xc7
,
0xf6
,
0xa5
,
0x94
,
0x03
,
0x32
,
0x61
,
0x50
,
0xbb
,
0x8a
,
0xd9
,
0xe8
,
0x7f
,
0x4e
,
0x1d
,
0x2c
,
0x02
,
0x33
,
0x60
,
0x51
,
0xc6
,
0xf7
,
0xa4
,
0x95
,
0xf8
,
0xc9
,
0x9a
,
0xab
,
0x3c
,
0x0d
,
0x5e
,
0x6f
,
0x41
,
0x70
,
0x23
,
0x12
,
0x85
,
0xb4
,
0xe7
,
0xd6
,
0x7a
,
0x4b
,
0x18
,
0x29
,
0xbe
,
0x8f
,
0xdc
,
0xed
,
0xc3
,
0xf2
,
0xa1
,
0x90
,
0x07
,
0x36
,
0x65
,
0x54
,
0x39
,
0x08
,
0x5b
,
0x6a
,
0xfd
,
0xcc
,
0x9f
,
0xae
,
0x80
,
0xb1
,
0xe2
,
0xd3
,
0x44
,
0x75
,
0x26
,
0x17
,
0xfc
,
0xcd
,
0x9e
,
0xaf
,
0x38
,
0x09
,
0x5a
,
0x6b
,
0x45
,
0x74
,
0x27
,
0x16
,
0x81
,
0xb0
,
0xe3
,
0xd2
,
0xbf
,
0x8e
,
0xdd
,
0xec
,
0x7b
,
0x4a
,
0x19
,
0x28
,
0x06
,
0x37
,
0x64
,
0x55
,
0xc2
,
0xf3
,
0xa0
,
0x91
,
0x47
,
0x76
,
0x25
,
0x14
,
0x83
,
0xb2
,
0xe1
,
0xd0
,
0xfe
,
0xcf
,
0x9c
,
0xad
,
0x3a
,
0x0b
,
0x58
,
0x69
,
0x04
,
0x35
,
0x66
,
0x57
,
0xc0
,
0xf1
,
0xa2
,
0x93
,
0xbd
,
0x8c
,
0xdf
,
0xee
,
0x79
,
0x48
,
0x1b
,
0x2a
,
0xc1
,
0xf0
,
0xa3
,
0x92
,
0x05
,
0x34
,
0x67
,
0x56
,
0x78
,
0x49
,
0x1a
,
0x2b
,
0xbc
,
0x8d
,
0xde
,
0xef
,
0x82
,
0xb3
,
0xe0
,
0xd1
,
0x46
,
0x77
,
0x24
,
0x15
,
0x3b
,
0x0a
,
0x59
,
0x68
,
0xff
,
0xce
,
0x9d
,
0xac
);
var
control_speed
=
20
;
var
cam_index
=
0
;
var
altitude
=
0
;
var
latitude
=
0
;
var
longitude
=
0
;
var
record_status
=
0
;
var
click_mode_status
=
1
;
var
goteuler2msg
=
false
;
var
gotstatus2
=
false
;
var
gotversion
=
false
;
var
pitch_move
=
false
;
var
yaw_move
=
false
;
var
gimbal_mode
=
1
;
var
IAMODE
=
0
;
var
backlight
=
false
;
var
defog
=
false
;
var
nightmode
=
false
;
var
finger_mode
=
0
;
var
photo_last
=
0
;
var
record_last
=
0
;
var
zoom_last
=
0
;
var
gimbal_mode_last
=
0
;
var
camera_mode_last
=
0
;
var
f1_last
=
0
;
var
f2_last
=
0
;
var
f3_last
=
0
;
var
f4_last
=
0
;
var
joint_control_status
=
0
;
var
pitch_last
=
0
;
var
yaw_last
=
0
;
////////////////////////////////viewpro viewlink protocol for MMC ////////////////////////////////////////////////////////
// viewlink protocol for MMC drone 2020-12
var
viewlink_cmdID
=
{
A1C1E1
:
0X30
,
A1C1E1S1
:
0X32
,
A2C2E2
:
0X31
,
A2C2E2S2
:
0X33
,
A1
:
0X1A
,
A2
:
0X2A
,
C1
:
0X1C
,
C2
:
0X2C
,
E1
:
0x1E
,
E2
:
0X2E
,
S1
:
0X16
,
S2
:
0X26
,
U
:
0X01
,
V
:
0X02
,
M_AHRS
:
0XB1
,
HEART_BEAT
:
0X10
,
SHAKE_HAND
:
0X00
,
T1F1B1D1
:
0x40
,
T2F2B2D2
:
0X41
,
FW
:
0XFF
}
var
viewlink_cmdLEN
=
{
// cmd_DATA_len + 3(len+cmdid+cs)
A1C1E1
:
17
,
A1C1E1S1
:
31
,
A2C2E2
:
13
,
A2C2E2S2
:
18
,
T1F1B1D1
:
44
,
T2F2B2D2
:
52
,
A1
:
12
,
A2
:
5
,
C1
:
5
,
C2
:
6
,
E1
:
6
,
E2
:
8
,
S1
:
17
,
S2
:
8
,
U
:
5
,
V
:
5
,
M_AHRS
:
45
,
HEART_BEAT
:
4
,
SHAKE_HAND
:
4
,
////FOLLOW CMD NOT +3
T1F1B1D1_DATA
:
41
,
T2F2B2D2_DATA
:
49
,
T1_DATA
:
22
,
F1_DATA
:
1
,
B1_DATA
:
6
,
D1_DATA
:
12
,
T2_DATA
:
18
,
F2_DATA
:
15
,
B2_DATA
:
11
,
D2_DATA
:
5
}
var
viewlinkheadlen
=
3
;
var
viewlinkFrameLen
=
{
// the position of checksum
A1C1E1
:
viewlink_cmdLEN
.
A1C1E1
+
viewlinkheadlen
,
A1C1E1S1
:
viewlink_cmdLEN
.
A1C1E1S1
+
viewlinkheadlen
,
A2C2E2
:
viewlink_cmdLEN
.
A2C2E2
+
viewlinkheadlen
,
A2C2E2S2
:
viewlink_cmdLEN
.
A2C2E2S2
+
viewlinkheadlen
,
A1
:
viewlink_cmdLEN
.
A1
+
viewlinkheadlen
,
A2
:
viewlink_cmdLEN
.
A2
+
viewlinkheadlen
,
C1
:
viewlink_cmdLEN
.
C1
+
viewlinkheadlen
,
C2
:
viewlink_cmdLEN
.
C2
+
viewlinkheadlen
,
E1
:
viewlink_cmdLEN
.
E1
+
viewlinkheadlen
,
E2
:
viewlink_cmdLEN
.
E2
+
viewlinkheadlen
,
S1
:
viewlink_cmdLEN
.
S1
+
viewlinkheadlen
,
S2
:
viewlink_cmdLEN
.
S2
+
viewlinkheadlen
,
U
:
viewlink_cmdLEN
.
U
+
viewlinkheadlen
,
V
:
viewlink_cmdLEN
.
V
+
viewlinkheadlen
,
M_AHRS
:
viewlink_cmdLEN
.
M_AHRS
+
viewlinkheadlen
,
HEART_BEAT
:
viewlink_cmdLEN
.
HEART_BEAT
+
viewlinkheadlen
,
SHAKE_HAND
:
viewlink_cmdLEN
.
SHAKE_HAND
+
viewlinkheadlen
,
}
var
viewlink_cs_pos
=
{
// the position of checksum
A1C1E1
:
viewlinkFrameLen
.
A1C1E1
-
1
,
A1C1E1S1
:
viewlinkFrameLen
.
A1C1E1S1
-
1
,
A2C2E2
:
viewlinkFrameLen
.
A2C2E2
-
1
,
A2C2E2S2
:
viewlinkFrameLen
.
A2C2E2S2
-
1
,
A1
:
viewlinkFrameLen
.
A1
-
1
,
A2
:
viewlinkFrameLen
.
A2
-
1
,
C1
:
viewlinkFrameLen
.
C1
-
1
,
C2
:
viewlinkFrameLen
.
C2
-
1
,
E1
:
viewlinkFrameLen
.
E1
-
1
,
E2
:
viewlinkFrameLen
.
E2
-
1
,
S1
:
viewlinkFrameLen
.
S1
-
1
,
S2
:
viewlinkFrameLen
.
S2
-
1
,
U
:
viewlinkFrameLen
.
U
-
1
,
V
:
viewlinkFrameLen
.
V
-
1
,
M_AHRS
:
viewlinkFrameLen
.
M_AHRS
-
1
,
HEART_BEAT
:
viewlinkFrameLen
.
HEART_BEAT
-
1
,
SHAKE_HAND
:
viewlinkFrameLen
.
SHAKE_HAND
-
1
,
}
var
mmcAddLen
=
2
;
//(len+cs)
var
mmcCmdLen
=
{
// the position of checksum
A1C1E1
:
viewlinkFrameLen
.
A1C1E1
+
mmcAddLen
,
A1C1E1S1
:
viewlinkFrameLen
.
A1C1E1S1
+
mmcAddLen
,
A2C2E2
:
viewlinkFrameLen
.
A2C2E2
+
mmcAddLen
,
A2C2E2S2
:
viewlinkFrameLen
.
A2C2E2S2
+
mmcAddLen
,
A1
:
viewlinkFrameLen
.
A1
+
mmcAddLen
,
A2
:
viewlinkFrameLen
.
A2
+
mmcAddLen
,
C1
:
viewlinkFrameLen
.
C1
+
mmcAddLen
,
C2
:
viewlinkFrameLen
.
C2
+
mmcAddLen
,
E1
:
viewlinkFrameLen
.
E1
+
mmcAddLen
,
E2
:
viewlinkFrameLen
.
E2
+
mmcAddLen
,
S1
:
viewlinkFrameLen
.
S1
+
mmcAddLen
,
S2
:
viewlinkFrameLen
.
S2
+
mmcAddLen
,
U
:
viewlinkFrameLen
.
U
+
mmcAddLen
,
V
:
viewlinkFrameLen
.
V
+
mmcAddLen
,
M_AHRS
:
viewlinkFrameLen
.
M_AHRS
+
mmcAddLen
,
HEART_BEAT
:
viewlinkFrameLen
.
HEART_BEAT
+
mmcAddLen
,
SHAKE_HAND
:
viewlinkFrameLen
.
SHAKE_HAND
+
mmcAddLen
,
}
var
mmcHeadLen
=
2
;
var
mmcFrameLen
=
{
// the position of checksum
A1C1E1
:
mmcCmdLen
.
A1C1E1
+
mmcHeadLen
,
A1C1E1S1
:
mmcCmdLen
.
A1C1E1S1
+
mmcHeadLen
,
A2C2E2
:
mmcCmdLen
.
A2C2E2
+
mmcHeadLen
,
A2C2E2S2
:
mmcCmdLen
.
A2C2E2S2
+
mmcHeadLen
,
A1
:
mmcCmdLen
.
A1
+
mmcHeadLen
,
A2
:
mmcCmdLen
.
A2
+
mmcHeadLen
,
C1
:
mmcCmdLen
.
C1
+
mmcHeadLen
,
C2
:
mmcCmdLen
.
C2
+
mmcHeadLen
,
E1
:
mmcCmdLen
.
E1
+
mmcHeadLen
,
E2
:
mmcCmdLen
.
E2
+
mmcHeadLen
,
S1
:
mmcCmdLen
.
S1
+
mmcHeadLen
,
S2
:
mmcCmdLen
.
S2
+
mmcHeadLen
,
U
:
mmcCmdLen
.
U
+
mmcHeadLen
,
V
:
mmcCmdLen
.
V
+
mmcHeadLen
,
M_AHRS
:
mmcCmdLen
.
M_AHRS
+
mmcHeadLen
,
HEART_BEAT
:
mmcCmdLen
.
HEART_BEAT
+
mmcHeadLen
,
SHAKE_HAND
:
mmcCmdLen
.
SHAKE_HAND
+
mmcHeadLen
,
}
var
mmc_cs_pos
=
{
// the position of checksum
A1C1E1
:
mmcFrameLen
.
A1C1E1
-
1
,
A1C1E1S1
:
mmcFrameLen
.
A1C1E1S1
-
1
,
A2C2E2
:
mmcFrameLen
.
A2C2E2
-
1
,
A2C2E2S2
:
mmcFrameLen
.
A2C2E2S2
-
1
,
A1
:
mmcFrameLen
.
A1
-
1
,
A2
:
mmcFrameLen
.
A2
-
1
,
C1
:
mmcFrameLen
.
C1
-
1
,
C2
:
mmcFrameLen
.
C2
-
1
,
E1
:
mmcFrameLen
.
E1
-
1
,
E2
:
mmcFrameLen
.
E2
-
1
,
S1
:
mmcFrameLen
.
S1
-
1
,
S2
:
mmcFrameLen
.
S2
-
1
,
U
:
mmcFrameLen
.
U
-
1
,
V
:
mmcFrameLen
.
V
-
1
,
M_AHRS
:
mmcFrameLen
.
M_AHRS
-
1
,
HEART_BEAT
:
mmcFrameLen
.
HEART_BEAT
-
1
,
SHAKE_HAND
:
mmcFrameLen
.
SHAKE_HAND
-
1
,
}
var
FW_data_len
=
0
;
var
viewlink_cmdLEN_FW
=
FW_data_len
+
3
;
var
viewlinkFrameLen_FW
=
viewlink_cmdLEN_FW
+
viewlinkheadlen
;
var
viewlink_cs_pos_FW
=
viewlinkFrameLen_FW
-
1
;
var
mmcCmdLen_FW
=
viewlinkFrameLen_FW
+
mmcAddLen
;
var
mmcFrameLen_FW
=
mmcCmdLen_FW
+
mmcHeadLen
;
var
mmc_cs_pos_FW
=
mmcFrameLen_FW
-
1
;
var
viewlink_cmd_ID_LEN
=
{
cmdID
:
viewlink_cmdID
.
A1
,
cmdLEN
:
viewlink_cmdLEN
.
A1
}
// A1
var
A1_SERVO_STATUS
=
{
motoroff
:
0x00
,
manualcontrol
:
0x01
,
followyaw
:
0x03
,
homeposition
:
0x04
,
trackmode
:
0x06
,
turntorelativeangle
:
0x09
,
lockyaw
:
0x0a
,
turntoframeangle
:
0x0b
,
rcmode
:
0x0d
,
movetofinger
:
0x0E
,
noaction
:
0x0f
,
lookdown
:
0x12
,
centeryaw
:
0x16
,
levelpitch
:
0x17
}
var
A1_PARAM_INT16
=
{
PARAM1
:
0x0000
,
PARAM2
:
0x0000
,
PARAM3
:
0x0000
,
PARAM4
:
0x0000
}
var
A1_CMD
=
{
server_status
:
A1_SERVO_STATUS
.
noaction
,
param1
:
A1_PARAM_INT16
.
PARAM1
,
param2
:
A1_PARAM_INT16
.
PARAM2
,
param3
:
A1_PARAM_INT16
.
PARAM3
,
param4
:
A1_PARAM_INT16
.
PARAM4
}
var
A1_CMD_RC
=
{
server_status
:
A1_SERVO_STATUS
.
noaction
,
param1
:
A1_PARAM_INT16
.
PARAM1
,
param2
:
A1_PARAM_INT16
.
PARAM2
,
param3
:
A1_PARAM_INT16
.
PARAM3
,
param4
:
A1_PARAM_INT16
.
PARAM4
}
var
A1_CMD_MOVE
=
{
server_status
:
A1_SERVO_STATUS
.
noaction
,
param1
:
A1_PARAM_INT16
.
PARAM1
,
param2
:
A1_PARAM_INT16
.
PARAM2
,
param3
:
A1_PARAM_INT16
.
PARAM3
,
param4
:
A1_PARAM_INT16
.
PARAM4
}
var
A1_CMD_ANGLE
=
{
server_status
:
A1_SERVO_STATUS
.
noaction
,
param1
:
A1_PARAM_INT16
.
PARAM1
,
param2
:
A1_PARAM_INT16
.
PARAM2
,
param3
:
A1_PARAM_INT16
.
PARAM3
,
param4
:
A1_PARAM_INT16
.
PARAM4
}
function
A1_to_array
(
A1_CMD
)
{
var
array
=
new
Array
();
array
[
0
]
=
A1_CMD
.
server_status
;
array
[
1
]
=
A1_CMD
.
param1
>>
8
;
array
[
2
]
=
A1_CMD
.
param1
&
0xff
;
array
[
3
]
=
A1_CMD
.
param2
>>
8
;
array
[
4
]
=
A1_CMD
.
param2
&
0xff
;
array
[
5
]
=
A1_CMD
.
param3
>>
8
;
array
[
6
]
=
A1_CMD
.
param3
&
0xff
;
array
[
7
]
=
A1_CMD
.
param4
>>
8
;
array
[
8
]
=
A1_CMD
.
param4
&
0xff
;
return
array
;
}
////////////////AI END//////////////////////
var
viewlink_A2_servo
=
{
noAction
:
0
,
yawZeroAdj
:
0x08
}
var
viewlink_A2_fdctr
=
{
disable
:
0
,
enable
:
1
}
var
viewlink_A2_framecount
=
{
counter
:
0
}
var
viewlink_A2_param
=
{
param1
:
0x00
}
var
A2_CMD
=
{
servo
:
viewlink_A2_servo
.
noAction
,
fdctr
:
viewlink_A2_fdctr
.
enable
,
framecounter
:
viewlink_A2_framecount
.
counter
,
param1
:
viewlink_A2_param
.
param1
}
function
A2_to_array
(
A2_CMD
)
{
var
array
=
new
Array
();
var
temp
=
0x0
;
temp
=
(
A2_CMD
.
servo
&
0x1f
)
|
((
A2_CMD
.
fdctr
&
0x01
)
<<
5
)
|
((
A2_CMD
.
framecounter
&
0x03
)
<<
6
);
array
[
0
]
=
temp
&
0xff
;
array
[
1
]
=
A2_CMD
.
param1
;
return
array
;
}
var
C1_VIDEO_SOURCE
=
{
noaction
:
0
,
EO
:
1
,
IR
:
2
,
EOir
:
3
,
IReo
:
4
,
fusion
:
5
}
var
C1_ZOOM_SPEED
=
{
noaction
:
0
,
zoomspeed1
:
1
,
zoomspeed2
:
2
,
zoomspeed3
:
3
,
zoomspeed4
:
4
,
zoomspeed5
:
5
,
zoomspeed6
:
6
,
zoomspeed7
:
7
}
var
C1_CAM_CTR
=
{
noaction
:
0x0000
,
stopfocus
:
0x0001
,
brightup
:
0x0002
,
brightdown
:
3
,
zoomout
:
8
,
zoomin
:
9
,
focusout
:
0x0a
,
focusin
:
0x0b
,
whitehot
:
0x0e
,
blackhot
:
0x0f
,
colorhot
:
0x12
,
takepicture
:
0x13
,
startrecord
:
0x14
,
stoprecord
:
0x15
,
topicturemode
:
0x16
,
torecordmode
:
0x17
,
invertmode
:
0x18
,
afon
:
0x19
,
afoff
:
0x1a
,
irdzoomin
:
0x1b
,
irdzoomout
:
0x1c
,
sdcardformat
:
0x1d
}
var
C1_LRF
=
{
noaction
:
0
,
onetimeLRF
:
1
,
LRFstart
:
2
,
LRFstart2
:
3
,
outsynLRF
:
4
,
stopLRF
:
5
}
var
C1_CMD
=
{
videosource
:
C1_VIDEO_SOURCE
.
noaction
,
zoom_speed
:
C1_ZOOM_SPEED
.
speed
,
camera_ctrl
:
C1_CAM_CTR
.
noaction
,
LRFctr
:
C1_LRF
.
noaction
}
function
C1_to_array
(
C1_CMD
)
{
var
array
=
new
Array
();
var
temp
=
0x0000
;
temp
=
(
C1_CMD
.
videosource
&
0x07
)
|
((
C1_CMD
.
zoom_speed
&
0x07
)
<<
3
)
|
((
C1_CMD
.
camera_ctrl
&
0x007f
)
<<
6
)
|
((
C1_CMD
.
LRFctr
&
0x07
)
<<
13
);
array
[
0
]
=
(
temp
>>
8
)
&
0xff
;
array
[
1
]
=
temp
&
0xff
;
return
array
;
}
//////////////////C1 END/////////////////
//////////////////////C2 ////////////////////
var
C2_ctrl
=
{
noaction
:
0
,
eodzoomon
:
6
,
eodzoomoff
:
7
,
eoVEon
:
0x10
,
eoVEoff
:
0x11
,
ircolorbaron
:
0x12
,
ircolorbaroff
:
0x13
,
eoflipoff
:
0x14
,
eoflipon
:
0x15
,
defogon
:
0x16
,
defogoff
:
0x17
,
osdon
:
0x18
,
osdoff
:
0x19
,
irflipoff
:
0x1a
,
irflipon
:
0x1b
,
eoICRon
:
0x4a
,
eoICRoff
:
0x4b
,
eozoomto
:
0x53
,
laserctrl
:
0x74
}
var
C2_laser_cmd
=
{
noaction
:
0
,
laseron
:
0X0100
,
laseroff
:
0X0200
,
laserzoomout
:
0X0400
,
laserzoomin
:
0X0500
,
synauto
:
0X0600
,
manulaser
:
0X0700
}
var
C2_CMD
=
{
ctrl
:
C2_ctrl
.
noaction
,
param
:
C2_laser_cmd
.
noaction
}
var
C2_CMD_ZOOM
=
{
ctrl
:
C2_ctrl
.
eozoomto
,
param
:
0x0000
};
function
C2_to_array
(
C2_CMD
)
{
var
array
=
new
Array
();
array
[
0
]
=
C2_CMD
.
ctrl
;
array
[
1
]
=
C2_CMD
.
param
>>
8
;
array
[
2
]
=
C2_CMD
.
param
&
0XFF
;
return
array
;
}
/////////////////////////////////C2 END//////////
//////////////E1 ///////////////////
var
E1_tracksource
=
{
noaction
:
0
,
eo1
:
1
,
ir
:
2
,
eo2
:
3
}
var
E1_param1
=
{
param1
:
0x00
}
var
E1_ctrl
=
{
noaction
:
0
,
stoptrack
:
1
,
searchobject
:
2
,
starttrack
:
3
,
re_track
:
4
,
ai_detec
:
5
,
ai_opendetec
:
0x01
,
ai_closedetec
:
0x00
,
smalltemplate
:
0x21
,
middletemplate
:
0x22
,
bigtemplate
:
0x23
,
midsmalltemplate
:
0x24
,
bigmidtemplate
:
0x26
,
autotemplate
:
0x28
}
var
E1_param2
=
{
param2
:
0x00
}
var
E1_CMD
=
{
tracksource
:
E1_tracksource
.
noaction
,
param1
:
A1_PARAM_INT16
.
PARAM1
,
ctrl
:
E1_ctrl
.
noaction
,
param2
:
E1_param2
.
param2
}
function
E1_to_array
(
E1_CMD
)
{
var
array
=
new
Array
();
var
temp
=
0x00
;
temp
=
(
E1_CMD
.
tracksource
)
|
(
E1_CMD
.
param1
<<
3
);
array
[
0
]
=
temp
;
array
[
1
]
=
E1_CMD
.
ctrl
;
array
[
2
]
=
E1_CMD
.
param2
;
return
array
;
}
/////////E1 END /////////////////
var
E2_ctr
=
{
noaction
:
0
,
fingertracktopos
:
0x0a
}
var
E2_CMD
=
{
ctr
:
E2_ctr
.
noaction
,
param1
:
0x0000
,
param2
:
0x0000
}
function
E2_to_array
(
E2_CMD
)
{
var
array
=
new
Array
();
array
[
0
]
=
E2_CMD
.
ctr
;
array
[
1
]
=
E2_CMD
.
param1
>>
8
;
array
[
2
]
=
E2_CMD
.
param1
&
0xff
;
array
[
3
]
=
E2_CMD
.
param2
>>
8
;
array
[
4
]
=
E2_CMD
.
param2
&
0xff
;
return
array
;
}
// var FW_CMD_data = new Array();
/* function FW_to_array(){
var array = new Array();
var i=0;
for(i=0;i< FW_data_len;i++){
array[i] = FW_CMD_data[i];
}
return array;
} */
//viewlink checksum data
function
viewlink_checksum
(
array
)
{
var
checksum
=
array
[
3
];
var
i
=
4
;
var
len
=
(
array
[
3
]
&
0x3f
)
-
2
;
while
(
len
--
)
{
checksum
=
checksum
^
array
[
i
];
i
++
;
}
return
checksum
;
}
function
pack_A1
(
A1CMD
)
{
var
A1_data_array
=
A1_to_array
(
A1CMD
);
//9
var
A1pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
A1pack_array
[
3
]
=
viewlink_cmdLEN
.
A1
;
//12
A1pack_array
[
4
]
=
viewlink_cmdID
.
A1
;
A1_data_array
.
forEach
(
function
(
item
)
{
// 将A1CMD的数据提取出,拼接在A1pack_array
A1pack_array
.
push
(
item
)
})
A1pack_array
[
viewlink_cs_pos
.
A1
]
=
viewlink_checksum
(
A1pack_array
);
return
A1pack_array
;
}
function
pack_C1
(
C1CMD
)
{
var
C1_data_array
=
C1_to_array
(
C1CMD
);
//9
var
C1pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
C1pack_array
[
3
]
=
viewlink_cmdLEN
.
C1
;
C1pack_array
[
4
]
=
viewlink_cmdID
.
C1
;
C1_data_array
.
forEach
(
function
(
item
)
{
C1pack_array
.
push
(
item
)
})
C1pack_array
[
viewlink_cs_pos
.
C1
]
=
viewlink_checksum
(
C1pack_array
);
return
C1pack_array
;
}
function
pack_E1
(
E1_CMD
)
{
var
E1_data_array
=
E1_to_array
(
E1_CMD
);
//9
var
E1pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
E1pack_array
[
3
]
=
viewlink_cmdLEN
.
E1
;
E1pack_array
[
4
]
=
viewlink_cmdID
.
E1
;
E1_data_array
.
forEach
(
function
(
item
)
{
E1pack_array
.
push
(
item
)
})
E1pack_array
[
viewlink_cs_pos
.
E1
]
=
viewlink_checksum
(
E1pack_array
);
return
E1pack_array
;
}
function
pack_S1
(
S1_CMD
)
{
var
S1_data_array
=
S1_to_array
(
S1_CMD
);
//9
var
S1pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
S1pack_array
[
3
]
=
viewlink_cmdLEN
.
S1
;
S1pack_array
[
4
]
=
viewlink_cmdID
.
S1
;
S1_data_array
.
forEach
(
function
(
item
)
{
S1pack_array
.
push
(
item
)
})
S1pack_array
[
viewlink_cs_pos
.
S1
]
=
viewlink_checksum
(
S1pack_array
);
return
S1pack_array
;
}
function
pack_A2
(
A2_CMD
)
{
var
A2_data_array
=
A2_to_array
(
A2_CMD
);
//9
var
A2pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
A2pack_array
[
3
]
=
viewlink_cmdLEN
.
A2
;
//12
A2pack_array
[
4
]
=
viewlink_cmdID
.
A2
;
A2_data_array
.
forEach
(
function
(
item
)
{
A2pack_array
.
push
(
item
)
})
A2pack_array
[
viewlink_cs_pos
.
A2
]
=
viewlink_checksum
(
A2pack_array
);
return
A2pack_array
;
}
function
pack_C2
(
C2_CMD
)
{
var
C2_data_array
=
C2_to_array
(
C2_CMD
);
//9
var
C2pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
C2pack_array
[
3
]
=
viewlink_cmdLEN
.
C2
;
C2pack_array
[
4
]
=
viewlink_cmdID
.
C2
;
C2_data_array
.
forEach
(
function
(
item
)
{
C2pack_array
.
push
(
item
)
})
C2pack_array
[
viewlink_cs_pos
.
C2
]
=
viewlink_checksum
(
C2pack_array
);
return
C2pack_array
;
}
function
pack_E2
(
E2_CMD
)
{
var
E2_data_array
=
E2_to_array
(
E2_CMD
);
//9
var
E2pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
E2pack_array
[
3
]
=
viewlink_cmdLEN
.
E2
;
E2pack_array
[
4
]
=
viewlink_cmdID
.
E2
;
E2_data_array
.
forEach
(
function
(
item
)
{
E2pack_array
.
push
(
item
)
})
E2pack_array
[
viewlink_cs_pos
.
E2
]
=
viewlink_checksum
(
E2pack_array
);
return
E2pack_array
;
}
function
pack_S2
(
S2_CMD
)
{
var
S2_data_array
=
S1_to_array
(
S2_CMD
);
//9
var
S2pack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
S2pack_array
[
3
]
=
viewlink_cmdLEN
.
S2
;
S2pack_array
[
4
]
=
viewlink_cmdID
.
S2
;
S2_data_array
.
forEach
(
function
(
item
)
{
S2pack_array
.
push
(
item
)
})
S2pack_array
[
viewlink_cs_pos
.
S2
]
=
viewlink_checksum
(
S2pack_array
);
return
S2pack_array
;
}
function
pack_FW
(
data
,
len
)
{
var
FW_data_array
=
data
;
//9
var
FWpack_array
=
[
0x55
,
0xaa
,
0xdc
,
0X00
,
0X00
];
var
viewlink_cmdLEN_FW
=
len
+
3
;
var
viewlinkFrameLen_FW
=
viewlink_cmdLEN_FW
+
viewlinkheadlen
;
var
viewlink_cs_pos_FW
=
viewlinkFrameLen_FW
-
1
;
FWpack_array
[
3
]
=
viewlink_cmdLEN_FW
;
FWpack_array
[
4
]
=
viewlink_cmdID
.
FW
;
FW_data_array
.
forEach
(
function
(
item
)
{
FWpack_array
.
push
(
item
)
})
FWpack_array
[
viewlink_cs_pos_FW
]
=
viewlink_checksum
(
FWpack_array
);
return
FWpack_array
;
}
//////////////A1C1E1 ///////////////
function
pack_A1C1E1
(
A1CMD
,
C1CMD
,
E1CMD
)
{
var
A1_array
=
A1_to_array
(
A1CMD
);
//9
var
C1_array
=
C1_to_array
(
C1CMD
);
//2
var
E1_array
=
E1_to_array
(
E1CMD
);
//3
//var temp_array1 = a1_array.concat(c1_array, e1_array);
var
A1C1E1_array
=
[
0x55
,
0xaa
,
0xdc
,
0X11
,
0X30
];
A1_array
.
forEach
(
function
(
item
)
{
A1C1E1_array
.
push
(
item
)
})
C1_array
.
forEach
(
function
(
item
)
{
A1C1E1_array
.
push
(
item
)
})
E1_array
.
forEach
(
function
(
item
)
{
A1C1E1_array
.
push
(
item
)
})
A1C1E1_array
[
19
]
=
viewlink_checksum
(
A1C1E1_array
);
return
A1C1E1_array
;
}
var
T1_1_012_LRFsource
=
{
noObject
:
0
,
LRFvalue
:
1
,
altitudevalue
:
2
,
rfvalue
:
3
}
var
T1_1_34_signal
=
{
nosignal
:
0
,
timelock
:
1
,
lock2D
:
2
,
lock3D
:
3
}
var
T1_1_567_GPS_H_signal
=
{
data
:
1
}
var
T1_2_012_GPS_V_signal
=
{
data
:
1
}
var
T1_2_3_S2
=
{
no
:
0
,
yes
:
1
}
var
T1_2_4567_N
=
{
gyrooffsetadj
:
0
}
var
T1_CMD
=
{
B1_bit012
:
T1_1_012_LRFsource
.
LRFvalue
,
B1_bit34
:
T1_1_34_signal
.
nosignal
,
B1_bit567
:
T1_1_567_GPS_H_signal
.
data
,
B2_bit012
:
T1_2_012_GPS_V_signal
.
data
,
B2_bit3
:
T1_2_3_S2
.
no
,
B2_bit4567
:
T1_2_4567_N
.
gyrooffsetadj
,
UAV_latitude
:
0x00000000
,
//1e7
UAV_longitude
:
0x00000000
,
UAV_altitude
:
0x0000
,
Target_latitude
:
0x00000000
,
Target_longitude
:
0x00000000
,
Target_altitude
:
0x0000
}
var
T2_2_year
=
{
year
:
2020
}
var
T2_2_month
=
{
month
:
12
}
var
T2_day
=
{
day
:
12
}
var
T2_time
=
{
time
:
0x00000000
}
var
T2_CMD
=
{
byte1res
:
0X00
,
year
:
T2_2_year
.
year
,
month
:
T2_2_month
.
month
,
day
:
T2_day
.
day
,
time
:
T2_time
.
time
,
yawGPS
:
0x0000
,
UAVyaw
:
0x0000
,
UAVpitch
:
0x0000
,
UAVroll
:
0x0000
,
res1516
:
0x0000
,
res1718
:
0x0000
}
var
T1F1B1D1_CMD
=
{
T1data
:
T1_CMD
,
}
var
F1_tracksensor
=
{
//跟踪传感器
eo1
:
0
,
ir
:
1
,
eo2
:
2
}
var
F1_trackstatus
=
{
//跟踪状态
stop
:
0
,
search
:
1
,
tracking
:
2
,
lost
:
3
}
var
F1_CMD
=
{
tracksource
:
F1_tracksensor
.
eo1
,
tracksource
:
F1_tracksensor
.
ir
,
tracksource
:
F1_tracksensor
.
eo2
,
trackstatus
:
F1_trackstatus
.
stop
,
trackstatus
:
F1_trackstatus
.
search
,
trackstatus
:
F1_trackstatus
.
tracking
,
trackstatus
:
F1_trackstatus
.
lost
}
var
B1_servo_status
=
{
motorsw
:
0x00
,
manualcontrol
:
0x01
,
followyaw
:
0x03
,
homeposition
:
0x04
,
trackmode
:
0x06
,
turntorelativeangle
:
0x09
,
lockyaw
:
0x0a
,
turntoframeangle
:
0x0b
,
RCcontrol
:
0x0d
,
fingerto
:
0x0e
,
error
:
0x0f
}
var
B1_CMD
=
{
GIMrollangle_8_11
:
0
,
servestatus
:
B1_servo_status
.
manualcontrol
,
GIMrollangle_0_7
:
0x00
,
GIMrollangle
:
0
,
GIMyawangle
:
0
,
GIMpitchangle
:
0
}
var
D1_CMD
=
{
SENSOR
:
0
,
//bit0-2
IR_DZOOM
:
0
,
//bit3-6
IR_WHITE_BLACK
:
0
,
//bit7
res
:
0x00
,
recstatus
:
0
,
// bit0-1
ir_gray_color
:
0
,
//bit2-5
eo_dzoom
:
0
,
//bit6-9
res
:
0
,
//bit10-15
lrf_value
:
0
,
//byte 5-6
v_fov
:
0
,
h_fov
:
0
,
eo_zoom
:
0
}
var
modeltype
=
0
;
//crc校验字节生成函数
function
cal_crc_table
(
array
)
{
var
crc
=
0
;
var
i
=
1
;
var
len
=
array
[
2
];
while
(
len
--
)
{
crc
=
crc_table
[
crc
^
array
[
i
]];
i
++
;
}
return
crc
;
}
//数据分包发送函数
function
package_send
(
buff
,
len
)
{
var
i
=
0
;
var
j
=
0
;
var
count
=
0
;
// var alen = len;
var
hexbuf
=
[];
var
sendbuf
=
[];
if
(
len
%
48
==
0
)
{
count
=
parseInt
(
len
/
48
,
10
);
}
else
{
count
=
parseInt
(
len
/
48
,
10
)
+
1
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
((
count
-
i
)
==
1
)
{
for
(
j
=
0
;
j
<
len
-
i
*
48
;
j
++
)
{
sendbuf
[
j
]
=
buff
[
i
*
48
+
j
];
hexbuf
[
j
]
=
Number
(
buff
[
i
*
48
+
j
]).
toString
(
16
);
}
return
sendbuf
}
else
{
for
(
j
=
0
;
j
<
48
;
j
++
)
{
sendbuf
[
j
]
=
buff
[
i
*
48
+
j
];
hexbuf
[
j
]
=
Number
(
buff
[
i
*
48
+
j
]).
toString
(
16
);
}
return
sendbuf
}
}
}
// EO zoomTo
export
function
zoomTo
(
value
)
{
var
zoom
=
value
var
buff
=
new
Array
(
0xA5
,
0x4f
,
0x00
);
buff
[
2
]
=
mmcCmdLen
.
C2
;
var
zoomRatio
=
zoom
;
C2_CMD_ZOOM
.
param
=
zoomRatio
*
10
;
console
.
log
(
"zoomRatio:"
+
zoomRatio
);
var
buff_arr
=
pack_C2
(
C2_CMD_ZOOM
);
console
.
log
(
"buff_arr:"
+
buff_arr
);
buff_arr
.
forEach
(
function
(
item
)
{
buff
.
push
(
item
)
})
buff
[
mmc_cs_pos
.
C2
]
=
cal_crc_table
(
buff
);
return
package_send
(
buff
,
mmcFrameLen
.
C2
);
}
src/components/MMCFlightControlCenter/index.vue
浏览文件 @
8cd66e52
...
...
@@ -638,5 +638,21 @@ export default {
background
:
transparent
!important
;
}
}
.cesium-viewer-bottom
{
display
:
none
;
}
.cesium-viewer-zoomIndicatorContainer
{
display
:
none
;
}
.cesium-viewer-navigationContainer
{
display
:
none
;
}
.cesium-credit-logoContainer
{
display
:
none
;
}
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论