Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
5c5c0f60
提交
5c5c0f60
authored
7月 01, 2024
作者:
cenweixin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口v3转v4:
1. 【无人机】航线列表(部分字段待确认) 2. 【机库】航线列表(部分字段待确认) 3. 【设备详情】判断无人机是否接管:由无人机详情接口更改为设备详情接口
上级
a0854f3e
流水线
#10322
已失败 于阶段
变更
5
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
55 行增加
和
36 行删除
+55
-36
uav_control.js
...ponents/MMCFlightControlCenter/api/modules/uav_control.js
+10
-1
index.vue
...kList/components/normalTask/components/lineList/index.vue
+19
-12
index.vue
...rolLeft/components/taskList/components/lineList/index.vue
+17
-12
index.vue
...ponents/uavList/components/list/components/item/index.vue
+5
-4
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+4
-7
没有找到文件。
src/components/MMCFlightControlCenter/api/modules/uav_control.js
浏览文件 @
5c5c0f60
...
...
@@ -37,7 +37,8 @@ class Control_API {
// 获取航线列表
static
getUavRouteList
(
params
)
{
return
request
({
url
:
"/dms/route/page"
,
// url: "/dms/route/page",
url
:
"/admin-api/uas/flight-line/page"
,
method
:
"get"
,
params
,
});
...
...
@@ -222,6 +223,14 @@ class Control_API {
params
});
}
// 设备详情详情
static
getDeviceDetail
(
params
)
{
return
request
({
url
:
`/admin-api/uas/device/get`
,
method
:
"get"
,
params
});
}
}
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/taskList/components/normalTask/components/lineList/index.vue
浏览文件 @
5c5c0f60
...
...
@@ -23,7 +23,7 @@
<div
class=
"tb-tr"
v-for=
"item in airwayData.records"
:key=
"item.id"
>
<div
class=
"td"
>
{{
item
.
id
||
"暂无"
}}
</div>
<div
class=
"td"
>
<div>
{{
item
.
n
ame
||
"暂无"
}}
</div>
<div>
{{
item
.
flightN
ame
||
"暂无"
}}
</div>
</div>
<div
class=
"td"
>
{{
item
.
organizationName
||
"暂无"
}}
</div>
<!-- 空域状态 -->
...
...
@@ -40,8 +40,8 @@
<!-- 安全状态 -->
<div
class=
"td"
:style=
"
{ color: item.
isS
afe == 1 ? '#19D864' : '' }"
>
{{
item
.
isS
afe
==
1
?
"安全"
:
"待确定"
}}
</div>
:style=
"
{ color: item.
s
afe == 1 ? '#19D864' : '' }"
>
{{
item
.
s
afe
==
1
?
"安全"
:
"待确定"
}}
</div>
<!-- 航线标签 -->
<div
class=
"td"
>
<!--
<span
v-for=
"item2 in item.labelList"
...
...
@@ -77,13 +77,14 @@ export default {
airwayData
:
{
current
:
1
,
records
:
[],
size
:
1
0
,
size
:
1
,
total
:
0
,
},
};
},
computed
:
{
...
mapState
(
"MMCFlightControlCenter"
,
[
"useSTLAirway"
]),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
]),
},
mounted
()
{
this
.
getAirway
();
...
...
@@ -91,7 +92,7 @@ export default {
methods
:
{
async
changeLine
(
item
)
{
try
{
if
(
item
.
isS
afe
!=
1
)
{
if
(
item
.
s
afe
!=
1
)
{
await
this
.
$confirm
(
"此航线为非安全航线,开始任务前请确认航线安全!"
,
"安全确认"
,
...
...
@@ -108,10 +109,11 @@ export default {
async
getAirway
()
{
if
(
this
.
useSTLAirway
)
{
let
res
=
await
Control_API
.
getUavRouteList
({
page
:
this
.
airwayData
.
current
,
page
No
:
this
.
airwayData
.
current
,
pageSize
:
this
.
airwayData
.
size
,
// nestId: this.hangar.id, // TODO 目前还没有新增航线操作
});
if
(
res
?.
code
===
20
0
)
{
if
(
res
?.
code
===
0
)
{
let
statusMap
=
{
1
:
"可用"
,
2
:
"待申请"
,
...
...
@@ -119,17 +121,22 @@ export default {
4
:
"通过"
,
5
:
"驳回"
,
};
this
.
airwayData
=
res
.
data
||
{
current
:
1
,
this
.
airwayData
=
res
.
data
.
list
&&
{
current
:
this
.
airwayData
.
current
,
records
:
res
.
data
.
list
,
size
:
this
.
airwayData
.
size
,
total
:
res
.
data
.
total
,
}
||
{
current
:
this
.
airwayData
.
current
,
records
:
[],
size
:
10
,
total
:
0
,
size
:
this
.
airwayData
.
size
,
total
:
this
.
airwayData
.
total
,
};
this
.
airwayData
.
records
=
this
.
airwayData
.
records
?.
map
((
item
)
=>
{
let
content
=
[];
try
{
content
=
JSON
.
parse
(
item
.
content
).
content
content
=
JSON
.
parse
(
item
.
content
).
content
// TODO 待确认字段
}
catch
(
e
){
console
.
log
(
e
);
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/taskList/components/lineList/index.vue
浏览文件 @
5c5c0f60
...
...
@@ -23,7 +23,7 @@
<div
class=
"tb-tr"
v-for=
"item in airwayData.records"
:key=
"item.id"
>
<div
class=
"td"
>
{{
item
.
id
||
"暂无"
}}
</div>
<div
class=
"td"
>
<div>
{{
item
.
n
ame
||
"暂无"
}}
</div>
<div>
{{
item
.
flightN
ame
||
"暂无"
}}
</div>
</div>
<div
class=
"td"
>
{{
item
.
organizationName
||
"暂无"
}}
</div>
<!-- 空域状态 -->
...
...
@@ -39,8 +39,8 @@
<!-- 安全状态 -->
<div
class=
"td"
:style=
"
{ color: item.
isS
afe == 1 ? '#19D864' : '' }"
>
{{
item
.
isS
afe
==
1
?
"安全"
:
"待确定"
}}
</div>
:style=
"
{ color: item.
s
afe == 1 ? '#19D864' : '' }"
>
{{
item
.
s
afe
==
1
?
"安全"
:
"待确定"
}}
</div>
<!-- 航线标签 -->
<div
class=
"td"
>
<!--
<span
v-for=
"item2 in item.labelList"
...
...
@@ -76,7 +76,7 @@ export default {
airwayData
:
{
current
:
1
,
records
:
[],
size
:
1
0
,
size
:
1
,
total
:
0
,
},
};
...
...
@@ -90,7 +90,7 @@ export default {
methods
:
{
async
changeLine
(
item
)
{
try
{
if
(
item
.
isS
afe
!=
1
)
{
if
(
item
.
s
afe
!=
1
)
{
await
this
.
$confirm
(
"此航线为非安全航线,开始任务前请确认航线安全!"
,
"安全确认"
,
...
...
@@ -107,10 +107,10 @@ export default {
async
getAirway
()
{
if
(
this
.
useSTLAirway
)
{
let
res
=
await
Control_API
.
getUavRouteList
({
page
:
this
.
airwayData
.
current
,
page
No
:
this
.
airwayData
.
current
,
pageSize
:
this
.
airwayData
.
size
,
});
if
(
res
?.
code
===
20
0
)
{
if
(
res
?.
code
===
0
)
{
let
statusMap
=
{
1
:
"可用"
,
2
:
"待申请"
,
...
...
@@ -118,17 +118,22 @@ export default {
4
:
"通过"
,
5
:
"驳回"
,
};
this
.
airwayData
=
res
.
data
||
{
current
:
1
,
this
.
airwayData
=
res
.
data
.
list
&&
{
current
:
this
.
airwayData
.
current
,
records
:
res
.
data
.
list
,
size
:
this
.
airwayData
.
size
,
total
:
res
.
data
.
total
,
}
||
{
current
:
this
.
airwayData
.
current
,
records
:
[],
size
:
10
,
total
:
0
,
size
:
this
.
airwayData
.
size
,
total
:
this
.
airwayData
.
total
,
};
this
.
airwayData
.
records
=
this
.
airwayData
.
records
?.
map
((
item
)
=>
{
let
content
=
[];
try
{
content
=
JSON
.
parse
(
item
.
content
).
content
content
=
JSON
.
parse
(
item
.
content
).
content
// TODO 待确认字段
}
catch
(
e
){
console
.
log
(
e
);
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/components/item/index.vue
浏览文件 @
5c5c0f60
...
...
@@ -49,7 +49,7 @@
:class=
"'blue'"
:title=
"device.name"
>
{{
device
.
name
}}
</span>
<span
style=
"color:#31DB24 "
class=
"dib"
v-if=
"
device.isOnline"
>
(在线)
</span>
<span
style=
"color:#31DB24 "
class=
"dib"
v-if=
"device.isOnline"
>
(在线)
</span>
<span
v-else
class=
"dib"
>
(离线)
</span>
<div
class=
"symbol-icon-box"
>
<!--
<template
v-if=
"device.modelName && device.modelName.includes('入云龙1')"
>
...
...
@@ -83,15 +83,16 @@
title=
"视频"
@
click=
"onShowPlayer(device)"
></div>
<div
v-if=
"device.isOnline"
class=
"iconfont icon-kongzhi_xianxing"
:class=
"{ active: uav && device.deviceId === uav.deviceId && uav.showPanel }"
title=
"控制面板"
@
click=
"onShowPanel(device)"
></div>
<div
class=
"jieg"
title=
"接管无人机 "
v-if=
"device.isOnline"
@
click=
"onTakeOver(device)"
>
<div
class=
"jieg"
title=
"接管无人机"
@
click=
"onTakeOver(device)"
>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
</div>
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
5c5c0f60
...
...
@@ -1190,14 +1190,11 @@ const actions = {
* @param { Number } data.id 无人机id
*/
async
isTakeOver
({
state
},
data
)
{
let
res
=
await
Control_API
.
uavDetail
({
id
:
data
?.
id
||
state
.
uav
.
id
});
if
(
res
.
data
.
currentOperator
!==
window
.
$mmc
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
id
)
{
return
false
;
let
res
=
await
Control_API
.
getDeviceDetail
({
id
:
data
?.
id
||
state
.
uav
.
id
});
if
(
res
.
data
.
currentOperator
===
window
.
$mmc
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
userId
)
{
return
true
;
}
return
tru
e
;
return
fals
e
;
},
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论