Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
04d9bfa7
提交
04d9bfa7
authored
1月 18, 2025
作者:
温凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:无人机任务回显
上级
857a97de
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
27 行增加
和
23 行删除
+27
-23
index.vue
...el/components/controlLeft/components/airwayList/index.vue
+4
-3
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+23
-20
没有找到文件。
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/airwayList/index.vue
浏览文件 @
04d9bfa7
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
"useSTLAirway"
,
"useSTLAirway"
,
"useTask"
,
"useTask"
,
]),
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
,
"uavRealTimeData"
]),
// 选择的任务
// 选择的任务
selectedTask
()
{
selectedTask
()
{
let
find
=
this
.
taskList
.
find
((
item
)
=>
{
let
find
=
this
.
taskList
.
find
((
item
)
=>
{
...
@@ -129,7 +129,7 @@ export default {
...
@@ -129,7 +129,7 @@ export default {
"uavRealTimeData.isFlying"
:
{
"uavRealTimeData.isFlying"
:
{
handler
:
function
(
newVal
,
oldVal
)
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
oldVal
===
false
&&
newVal
===
true
)
{
if
(
oldVal
===
false
&&
newVal
===
true
)
{
this
.
getTaskInfoRecord
()
;
this
.
getTaskInfoRecord
()
}
}
},
},
deep
:
true
,
deep
:
true
,
...
@@ -176,6 +176,7 @@ export default {
...
@@ -176,6 +176,7 @@ export default {
this
.
bus
.
$on
(
"refreshAirway"
,
this
.
getAirwayList
);
this
.
bus
.
$on
(
"refreshAirway"
,
this
.
getAirwayList
);
await
this
.
getTaskList
();
await
this
.
getTaskList
();
await
this
.
getAirwayList
();
await
this
.
getAirwayList
();
console
.
log
(
this
.
uavRealTimeData
,
'this.uavRealTimeData'
);
// 获取正在飞行的航线
// 获取正在飞行的航线
if
(
this
.
uavRealTimeData
.
isFlying
)
{
if
(
this
.
uavRealTimeData
.
isFlying
)
{
this
.
getTaskInfoRecord
();
this
.
getTaskInfoRecord
();
...
@@ -192,7 +193,7 @@ export default {
...
@@ -192,7 +193,7 @@ export default {
"clearAirwayEntities"
,
"clearAirwayEntities"
,
"apiPointsToFKZXPoints"
,
"apiPointsToFKZXPoints"
,
]),
]),
...
mapActions
(
"MMCFlightControlCenter/uav"
,
[
"isTakeOver"
,
"uavRealTimeData"
]),
...
mapActions
(
"MMCFlightControlCenter/uav"
,
[
"isTakeOver"
,
"
Init
uavRealTimeData"
]),
/**
/**
* 获取任务列表
* 获取任务列表
*/
*/
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
04d9bfa7
...
@@ -355,16 +355,16 @@ const actions = {
...
@@ -355,16 +355,16 @@ const actions = {
type260
.
grade
<=
2
type260
.
grade
<=
2
?
"[危险]"
?
"[危险]"
:
type260
.
grade
==
3
:
type260
.
grade
==
3
?
"[错误]"
?
"[错误]"
:
type260
.
grade
==
4
:
type260
.
grade
==
4
?
"[警告]"
?
"[警告]"
:
type260
.
grade
==
5
:
type260
.
grade
==
5
?
"[通知]"
?
"[通知]"
:
type260
.
grade
==
6
:
type260
.
grade
==
6
?
"[正常]"
?
"[正常]"
:
type260
.
grade
==
7
:
type260
.
grade
==
7
?
"[调试]"
?
"[调试]"
:
"AUTO"
,
:
"AUTO"
,
text
:
type260
.
msg
,
text
:
type260
.
msg
,
time
:
moment
(
type260
.
timestamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
time
:
moment
(
type260
.
timestamp
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
timestamp
:
type260
.
timestamp
,
timestamp
:
type260
.
timestamp
,
...
@@ -499,15 +499,15 @@ const actions = {
...
@@ -499,15 +499,15 @@ const actions = {
if
(
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
)
{
if
(
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
)
{
if
(
if
(
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
===
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
===
defaultPos
.
longitude
&&
defaultPos
.
longitude
&&
state
.
uavRealTimeData
.
locationCoordinate3D
.
latitude
===
state
.
uavRealTimeData
.
locationCoordinate3D
.
latitude
===
defaultPos
.
latitude
defaultPos
.
latitude
)
{
)
{
// 默认坐标不记录
// 默认坐标不记录
}
else
{
}
else
{
// const posData = UAVDataParser(state.uavRealTimeData); // 这种写法在执行rollup混淆压缩后, posData对象会变成elementUI的对象,原因未知
// const posData = UAVDataParser(state.uavRealTimeData); // 这种写法在执行rollup混淆压缩后, posData对象会变成elementUI的对象,原因未知
// 更新轨迹
// 更新轨迹
let
flag
=
positions
.
some
(
val
=>
val
.
x
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
x
&&
val
.
y
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
y
)
let
flag
=
positions
.
some
(
val
=>
val
.
x
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
x
&&
val
.
y
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
y
)
if
(
!
flag
)
{
if
(
!
flag
)
{
positions
.
push
(
UAVDataParser
(
state
.
uavRealTimeData
).
position
);
positions
.
push
(
UAVDataParser
(
state
.
uavRealTimeData
).
position
);
}
}
...
@@ -516,7 +516,7 @@ const actions = {
...
@@ -516,7 +516,7 @@ const actions = {
if
(
if
(
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
!==
state
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
!==
defaultPos
.
longitude
&&
defaultPos
.
longitude
&&
!
state
.
uavModelEntity
!
state
.
uavModelEntity
)
{
)
{
dispatch
(
"createUavModel"
);
dispatch
(
"createUavModel"
);
...
@@ -704,7 +704,7 @@ const actions = {
...
@@ -704,7 +704,7 @@ const actions = {
if
(
state
.
uav
.
network
==
2
)
{
if
(
state
.
uav
.
network
==
2
)
{
try
{
try
{
let
flightSortieId
;
let
flightSortieId
;
if
(
data
.
taskInfoId
)
{
if
(
data
.
taskInfoId
)
{
flightSortieId
=
await
TaskInfo
.
createTaskRecord
({
flightSortieId
=
await
TaskInfo
.
createTaskRecord
({
taskInfoId
:
data
.
taskInfoId
||
undefined
,
taskInfoId
:
data
.
taskInfoId
||
undefined
,
deviceId
:
state
.
uav
.
deviceId
,
deviceId
:
state
.
uav
.
deviceId
,
...
@@ -717,7 +717,7 @@ const actions = {
...
@@ -717,7 +717,7 @@ const actions = {
reouteId
:
state
.
airlineData
.
id
,
reouteId
:
state
.
airlineData
.
id
,
});
});
}
}
/* const flightSortieId = {
/* const flightSortieId = {
data: `tmj-v4-${Date.now()}`
data: `tmj-v4-${Date.now()}`
} */
} */
...
@@ -738,7 +738,7 @@ const actions = {
...
@@ -738,7 +738,7 @@ const actions = {
maxFlightSpeed
:
12
,
maxFlightSpeed
:
12
,
},
},
},
},
callback
()
{},
callback
()
{
},
});
});
// 告诉飞控开始任务,并且把架次号和 任务id传过去
// 告诉飞控开始任务,并且把架次号和 任务id传过去
...
@@ -751,7 +751,7 @@ const actions = {
...
@@ -751,7 +751,7 @@ const actions = {
flightSortiesID
:
flightSortieId
.
data
,
flightSortiesID
:
flightSortieId
.
data
,
},
},
},
},
callback
()
{},
callback
()
{
},
});
});
// 起飞指令
// 起飞指令
...
@@ -1344,6 +1344,9 @@ const actions = {
...
@@ -1344,6 +1344,9 @@ const actions = {
});
});
}
}
},
},
async
showUavRealTimeData
({
state
},
data
)
{
return
state
.
isFlying
;
},
/**
/**
* 判断是否已接管
* 判断是否已接管
* @param { Number } data.id 无人机id
* @param { Number } data.id 无人机id
...
@@ -1355,7 +1358,7 @@ const actions = {
...
@@ -1355,7 +1358,7 @@ const actions = {
if
(
if
(
res
.
data
.
currentOperator
&&
res
.
data
.
currentOperator
&&
res
.
data
.
currentOperator
===
res
.
data
.
currentOperator
===
window
.
$mmc_stl
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
id
window
.
$mmc_stl
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
id
)
{
)
{
return
true
;
return
true
;
}
}
...
@@ -1373,7 +1376,7 @@ const actions = {
...
@@ -1373,7 +1376,7 @@ const actions = {
type
:
window
.
$mmc_stl
.
$store
.
state
.
MMCMQTT
.
orders
.
链路切换
,
type
:
window
.
$mmc_stl
.
$store
.
state
.
MMCMQTT
.
orders
.
链路切换
,
data
,
data
,
},
},
callback
()
{},
callback
()
{
},
});
});
},
},
// 键盘控制
// 键盘控制
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论