Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
c167407b
提交
c167407b
authored
8月 27, 2024
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:
1. 去除无用日志 2. 缺少任务结束提示 3. 无用代码删除 4. 缺少挂载录像操作提示 5. 机库接管接口参数修正
上级
a01d02eb
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
30 行增加
和
282 行删除
+30
-282
index.vue
...onents/MMCDataTransferPanel/components/obstacle/index.vue
+0
-1
index.vue
...eft/components/airwayList/components/normalTask/index.vue
+1
-1
index.vue
...onents/MMCFlightControlCenter/components/hangar/index.vue
+9
-0
index.vue
...lPanel/components/controlRight/components/mount/index.vue
+5
-7
index.vue
...components/controlPanel/components/controlRight/index.vue
+1
-0
takeOverRecords.vue
...anel/components/controlTop/components/takeOverRecords.vue
+3
-3
index.vue
...CFlightControlCenter/components/uavApplications/index.vue
+10
-269
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+1
-0
index.vue
...rnel/uav/components/control/components/obstacle/index.vue
+0
-1
没有找到文件。
src/components/MMCDataTransferPanel/components/obstacle/index.vue
浏览文件 @
c167407b
...
...
@@ -39,7 +39,6 @@ export default {
*/
triggerList
(){
if
(
!
this
.
obstacle
){
console
.
log
(
'if(!this.obstacle)'
)
return
[];
}
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/normalTask/index.vue
浏览文件 @
c167407b
...
...
@@ -141,7 +141,7 @@ export default {
"clearAirwayEntities"
,
"apiPointsToFKZXPoints"
,
]),
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
"
hangar"
,
"
isTakeOver"
]),
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
"isTakeOver"
]),
/**
* 更新任务列表
*/
...
...
src/components/MMCFlightControlCenter/components/hangar/index.vue
浏览文件 @
c167407b
...
...
@@ -24,6 +24,15 @@ export default {
},
computed
:
{
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"showPanel"
,
"hangar"
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uavRealTimeData"
]),
},
watch
:
{
'uavRealTimeData.isFlying'
(
newVal
,
oldVal
){
// 监听飞机降落然后进行任务结束的提示
if
(
oldVal
===
true
&&
newVal
===
false
){
this
.
$message
.
success
(
'任务结束'
)
}
}
},
beforeDestroy
()
{
this
.
$store
.
commit
(
'MMCFlightControlCenter/setState'
,
{
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/mount/index.vue
浏览文件 @
c167407b
...
...
@@ -119,13 +119,11 @@ export default {
window
.
$mmc
.
$store
.
dispatch
(
"MMCMQTT/publish"
,
{
topic
:
"PX4/OBTAIN/"
+
this
.
uav
.
deviceId
,
data
:
streamData
,
callback
:
(
isOk
)
=>
{
if
(
isOk
)
{
if
(
streamData
.
data
.
data
.
recordControl
)
{
this
.
$message
.
success
(
`录像开始`
);
}
else
{
this
.
$message
.
success
(
`录像结束`
);
}
callback
:
()
=>
{
if
(
streamData
.
data
.
data
.
recordControl
)
{
this
.
$message
.
success
(
`录像开始`
);
}
else
{
this
.
$message
.
success
(
`录像结束`
);
}
},
});
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/index.vue
浏览文件 @
c167407b
...
...
@@ -183,6 +183,7 @@ export default {
gap
:
3px
;
cursor
:
pointer
;
box-sizing
:
border-box
;
overflow
:
hidden
;
>
img
{
width
:
24px
;
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlTop/components/takeOverRecords.vue
浏览文件 @
c167407b
...
...
@@ -7,8 +7,8 @@
</div>
<div
class=
"dialog-content"
>
<el-table
:data=
"list"
height=
"200px"
>
<el-table-column
label=
"无人机名称
"
align=
"center"
prop=
"deviceName"
></el-table-column>
<el-table-column
label=
"无人机所属单位
"
align=
"center"
prop=
"deviceDeptName"
></el-table-column>
<el-table-column
:label=
"`$
{hangar ? '机库' : '无人机'}名称`
" align="center" prop="deviceName">
</el-table-column>
<el-table-column
:label=
"`$
{hangar ? '机库' : '无人机'}所属单位`
" align="center" prop="deviceDeptName">
</el-table-column>
<el-table-column
label=
"接管状态"
align=
"center"
prop=
"takeStats"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
takeStats
?
'接管中'
:
'未接管'
}}
...
...
@@ -49,7 +49,7 @@ export default {
};
},
computed
:
{
...
mapState
(
"MMCFlightControlCenter/hangar"
),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
]
),
},
mounted
()
{
this
.
init
();
...
...
src/components/MMCFlightControlCenter/components/uavApplications/index.vue
浏览文件 @
c167407b
...
...
@@ -29,11 +29,7 @@ export default {
inject
:
[
'bus'
],
data
()
{
return
{
pointListFlag
:
false
,
aiPopup
:
null
,
//识别图标
keyFlag
:
false
,
//NX状态
videoItem
:
0
,
showCenter
:
false
,
isFlying
:
false
,
};
},
computed
:
{
...
...
@@ -41,14 +37,18 @@ export default {
"uav"
,
"showPlayer"
,
"showPanel"
,
"uavRealTimeData"
]),
},
watch
:
{
'uavRealTimeData.isFlying'
(
newVal
,
oldVal
){
// 监听飞机降落然后进行任务结束的提示
if
(
oldVal
===
true
&&
newVal
===
false
){
this
.
$message
.
success
(
'任务结束'
)
}
}
},
created
()
{
// 等待航线上传成功在执行
// 判断是否以一键任务
/* Bus.$on("off_take", () => {
this.takeOff = true;
}); */
},
mounted
()
{},
beforeDestroy
()
{
...
...
@@ -59,265 +59,6 @@ export default {
},
methods
:
{
getcanvas
(
val
,
item
)
{
let
data
=
null
;
if
(
item
.
jsonData
)
{
data
=
JSON
.
parse
(
item
.
jsonData
);
}
else
{
data
=
item
;
}
// let targets = data.targets;
setTimeout
(()
=>
{
this
.
canvas
=
this
.
$refs
.
canvas
;
this
.
canvas
.
width
=
1000
;
this
.
canvas
.
height
=
500
;
this
.
image
=
new
Image
();
this
.
image
.
src
=
val
;
this
.
image
.
onload
=
()
=>
{
if
(
this
.
aiType
>=
4
&&
this
.
aiType
!=
13
)
{
this
.
drawImage
(
data
.
targets
);
}
else
if
(
this
.
aiType
==
1
)
{
this
.
drawImage
(
data
.
detections
);
}
else
if
(
this
.
aiType
==
2
)
{
this
.
drawImage
(
data
.
aiPlateShiJuResultInfoDtoList
);
}
else
if
(
this
.
aiType
==
3
||
this
.
aiType
==
13
)
{
this
.
drawImage
(
data
);
}
};
},
50
);
},
drawImage
(
list
)
{
this
.
ctx
=
this
.
canvas
.
getContext
(
"2d"
);
this
.
ctx
.
drawImage
(
this
.
image
,
0
,
0
,
this
.
canvas
.
width
,
this
.
canvas
.
height
);
this
.
ctx
.
lineWidth
=
2
;
this
.
ctx
.
strokeStyle
=
"red"
;
if
(
this
.
aiType
>=
4
&&
this
.
aiType
!=
13
)
{
list
.
forEach
((
targets
)
=>
{
let
plate_detection
=
{
x
:
0
,
y
:
0
,
h
:
0
,
w
:
0
,
};
plate_detection
.
x
=
(
this
.
canvas
.
width
*
targets
.
bbox
.
box
.
left_top_x
)
/
this
.
image
.
width
;
plate_detection
.
y
=
(
this
.
canvas
.
height
*
targets
.
bbox
.
box
.
left_top_y
)
/
this
.
image
.
height
;
plate_detection
.
h
=
(
this
.
canvas
.
height
*
(
targets
.
bbox
.
box
.
right_bottom_y
-
targets
.
bbox
.
box
.
left_top_y
))
/
this
.
image
.
height
;
plate_detection
.
w
=
(
this
.
canvas
.
width
*
(
targets
.
bbox
.
box
.
right_bottom_x
-
targets
.
bbox
.
box
.
left_top_x
))
/
this
.
image
.
width
;
this
.
ctx
.
strokeRect
(
plate_detection
.
x
,
plate_detection
.
y
,
plate_detection
.
w
,
plate_detection
.
h
);
this
.
ctx
.
fillStyle
=
"rgba(0,0,0,0.8)"
;
let
text
=
targets
.
bbox
.
label
+
":"
+
(
targets
.
bbox
.
prob
*
100
).
toFixed
(
2
)
+
"%(相似度)"
;
let
offX
=
0
;
let
offY
=
0
;
if
(
plate_detection
.
x
+
text
.
length
*
11
>
1000
)
{
offX
=
1000
-
text
.
length
*
11
;
}
else
{
offX
=
plate_detection
.
x
-
5
;
}
if
(
plate_detection
.
y
-
20
<
0
)
{
offY
=
plate_detection
.
y
+
plate_detection
.
h
;
}
else
{
offY
=
plate_detection
.
y
-
22
;
}
this
.
ctx
.
fillRect
(
// plate_detection.x - 5,
offX
,
offY
,
text
.
length
*
11
,
20
);
this
.
ctx
.
fillStyle
=
"white"
;
// 设置文本颜色
this
.
ctx
.
font
=
"16px Arial"
;
// 设置文本字体大小和样式
this
.
ctx
.
fillText
(
text
,
// plate_detection.x - 5,
offX
,
offY
+
15
);
// 绘制文本
});
}
else
if
(
this
.
aiType
==
1
)
{
list
.
forEach
((
targets
)
=>
{
let
plate_detection
=
{
x
:
0
,
y
:
0
,
h
:
0
,
w
:
0
,
};
plate_detection
.
x
=
(
this
.
canvas
.
width
*
targets
.
x
)
/
this
.
image
.
width
;
plate_detection
.
y
=
(
this
.
canvas
.
height
*
targets
.
y
)
/
this
.
image
.
height
;
plate_detection
.
h
=
(
this
.
canvas
.
height
*
targets
.
h
)
/
this
.
image
.
height
;
plate_detection
.
w
=
(
this
.
canvas
.
width
*
targets
.
w
)
/
this
.
image
.
width
;
this
.
ctx
.
strokeRect
(
plate_detection
.
x
,
plate_detection
.
y
,
plate_detection
.
w
,
plate_detection
.
h
);
this
.
ctx
.
fillStyle
=
"rgba(0,0,0,0.5)"
;
this
.
ctx
.
fillRect
(
plate_detection
.
x
-
5
,
plate_detection
.
y
-
22
,
20
,
20
);
this
.
ctx
.
fillStyle
=
"white"
;
// 设置文本颜色
this
.
ctx
.
font
=
"12px Arial"
;
// 设置文本字体大小和样式
this
.
ctx
.
fillText
(
"人"
,
plate_detection
.
x
-
3
,
plate_detection
.
y
-
8
);
// 绘制文本
});
}
else
if
(
this
.
aiType
==
2
)
{
list
.
forEach
((
targets
)
=>
{
let
plate_detection
=
{
x
:
0
,
y
:
0
,
h
:
0
,
w
:
0
,
};
plate_detection
.
x
=
(
this
.
canvas
.
width
*
targets
.
yiSaPlateDetection
.
x
)
/
this
.
image
.
width
;
plate_detection
.
y
=
(
this
.
canvas
.
height
*
targets
.
yiSaPlateDetection
.
y
)
/
this
.
image
.
height
;
plate_detection
.
h
=
(
this
.
canvas
.
height
*
targets
.
yiSaPlateDetection
.
h
)
/
this
.
image
.
height
;
plate_detection
.
w
=
(
this
.
canvas
.
width
*
targets
.
yiSaPlateDetection
.
w
)
/
this
.
image
.
width
;
this
.
ctx
.
strokeRect
(
plate_detection
.
x
,
plate_detection
.
y
,
plate_detection
.
w
,
plate_detection
.
h
);
this
.
ctx
.
fillStyle
=
"rgba(0,0,0,0.5)"
;
this
.
ctx
.
fillRect
(
plate_detection
.
x
-
5
,
plate_detection
.
y
-
22
,
60
,
20
);
this
.
ctx
.
fillStyle
=
"white"
;
// 设置文本颜色
this
.
ctx
.
font
=
"12px Arial"
;
// 设置文本字体大小和样式
this
.
ctx
.
fillText
(
targets
.
plateNum
,
plate_detection
.
x
-
3
,
plate_detection
.
y
-
8
);
// 绘制文本
});
}
else
if
(
this
.
aiType
==
3
)
{
list
.
forEach
((
targets
)
=>
{
let
plate_detection
=
{
x
:
0
,
y
:
0
,
h
:
0
,
w
:
0
,
};
plate_detection
.
x
=
(
this
.
canvas
.
width
*
targets
.
bbox
[
0
])
/
this
.
image
.
width
;
plate_detection
.
y
=
(
this
.
canvas
.
height
*
targets
.
bbox
[
1
])
/
this
.
image
.
height
;
plate_detection
.
h
=
(
this
.
canvas
.
height
*
(
targets
.
bbox
[
3
]
-
targets
.
bbox
[
1
]))
/
this
.
image
.
height
;
plate_detection
.
w
=
(
this
.
canvas
.
width
*
(
targets
.
bbox
[
2
]
-
targets
.
bbox
[
0
]))
/
this
.
image
.
width
;
this
.
ctx
.
strokeRect
(
plate_detection
.
x
,
plate_detection
.
y
,
plate_detection
.
w
,
plate_detection
.
h
);
this
.
ctx
.
fillStyle
=
"rgba(0,0,0,0.5)"
;
this
.
ctx
.
fillRect
(
plate_detection
.
x
-
5
,
plate_detection
.
y
-
22
,
20
,
20
);
this
.
ctx
.
fillStyle
=
"white"
;
// 设置文本颜色
this
.
ctx
.
font
=
"16px Arial"
;
// 设置文本字体大小和样式
this
.
ctx
.
fillText
(
"人"
,
plate_detection
.
x
-
3
,
plate_detection
.
y
-
8
);
// 绘制文本
});
}
else
if
(
this
.
aiType
==
13
)
{
list
.
crowdDensityDataList
.
forEach
((
targets
)
=>
{
let
plate_detection
=
{
x
:
0
,
y
:
0
,
h
:
0
,
w
:
0
,
};
plate_detection
.
x
=
(
this
.
canvas
.
width
*
targets
.
bbox
[
0
])
/
this
.
image
.
width
;
plate_detection
.
y
=
(
this
.
canvas
.
height
*
targets
.
bbox
[
1
])
/
this
.
image
.
height
;
plate_detection
.
h
=
(
this
.
canvas
.
height
*
(
targets
.
bbox
[
3
]
-
targets
.
bbox
[
1
]))
/
this
.
image
.
height
;
plate_detection
.
w
=
(
this
.
canvas
.
width
*
(
targets
.
bbox
[
2
]
-
targets
.
bbox
[
0
]))
/
this
.
image
.
width
;
this
.
ctx
.
strokeRect
(
plate_detection
.
x
,
plate_detection
.
y
,
plate_detection
.
w
,
plate_detection
.
h
);
this
.
ctx
.
fillStyle
=
"rgba(0,0,0,0.5)"
;
let
text
=
targets
.
desc
;
let
offX
=
0
;
let
offY
=
0
;
if
(
plate_detection
.
x
+
text
.
length
*
11
>
1000
)
{
offX
=
1000
-
text
.
length
*
11
;
}
else
{
offX
=
plate_detection
.
x
-
5
;
}
if
(
plate_detection
.
y
-
20
<
0
)
{
offY
=
plate_detection
.
y
+
plate_detection
.
h
;
}
else
{
offY
=
plate_detection
.
y
-
22
;
}
this
.
ctx
.
fillRect
(
offX
,
offY
,
text
.
length
*
11
,
20
);
this
.
ctx
.
fillStyle
=
"white"
;
// 设置文本颜色
this
.
ctx
.
font
=
"11px Arial"
;
// 设置文本字体大小和样式
this
.
ctx
.
fillText
(
text
,
offX
,
offY
+
15
);
// 绘制文本
});
}
},
onPlayerClose
(){
this
.
$store
.
commit
(
'MMCFlightControlCenter/uav/setState'
,
{
key
:
'uav'
,
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
c167407b
...
...
@@ -18,6 +18,7 @@ const defaultPos = {
function
initUavRealTimeData
()
{
return
{
isFlying
:
false
,
// true 飞机处于飞行中,电动机解锁后,飞机就处于飞行中
attitude
:
{
roll
:
0
,
// 飞机的俯仰值:向前为正,向后为负。单位为度。
pitch
:
0
,
// 飞机的横滚值:正向为正,反向为负。单位为度。
...
...
src/observe/fckernel/uav/components/control/components/obstacle/index.vue
浏览文件 @
c167407b
...
...
@@ -40,7 +40,6 @@ export default {
*/
triggerList
(){
if
(
!
this
.
obstacle
){
console
.
log
(
'if(!this.obstacle)'
)
return
[];
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论