Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
a0854f3e
提交
a0854f3e
authored
6月 29, 2024
作者:
cenweixin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口v3转v4:
1. 【无人机】列表 2. 【无人机】接管 3. 【无人机】视频播放 4. 【机库】列表(设备状态待确认)
上级
8f756cf5
流水线
#10293
已失败 于阶段
变更
11
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
91 行增加
和
59 行删除
+91
-59
uav_control.js
...ponents/MMCFlightControlCenter/api/modules/uav_control.js
+26
-6
request.js
src/components/MMCFlightControlCenter/api/request.js
+1
-0
index.vue
...mponents/hangar/components/list/components/item/index.vue
+12
-12
index.vue
...ControlCenter/components/hangar/components/list/index.vue
+5
-8
angleControl.vue
.../components/mount/PagerP1_New/components/angleControl.vue
+2
-2
index.vue
...er/components/uavApplications/components/player/index.vue
+18
-4
index.vue
...ponents/uavList/components/list/components/item/index.vue
+22
-24
index.vue
...Applications/components/uavList/components/list/index.vue
+1
-1
index.vue
...r/components/uavApplications/components/uavList/index.vue
+2
-1
main.js
vue2/src/main.js
+1
-1
demo.vue
vue2/src/views/fkzxIframe/demo.vue
+1
-0
没有找到文件。
src/components/MMCFlightControlCenter/api/modules/uav_control.js
浏览文件 @
a0854f3e
...
...
@@ -17,7 +17,8 @@ class Control_API {
// 获取无人机树结构列表
static
getUavTree
(
params
)
{
return
request
({
url
:
"/admin-api/uas/drive/getTree"
,
url
:
"/admin-api/uas/drive/getDeptTree"
,
// url: "/admin-api/uas/drive/getTree",
// url: '/crm/personalCenter/list?id=4',
method
:
"get"
,
params
,
...
...
@@ -191,18 +192,37 @@ class Control_API {
// 接管无人机
static
setUavControlOn
(
params
)
{
return
request
({
url
:
`/dms/uav/takeOver/
${
params
.
id
}
`
,
method
:
'get'
,
// url: `/dms/uav/takeOver/${params.id}`,
url
:
`/admin-api/uas/device/controlUav`
,
method
:
'post'
,
params
});
}
// 强制接管无人机
static
setUavControlOnForce
(
params
)
{
return
request
({
url
:
`/admin-api/uas/device/forceControlUav`
,
method
:
'post'
,
params
});
}
// 解除无人机控制
static
setUavControlOff
(
id
)
{
static
setUavControlOff
(
params
)
{
return
request
({
url
:
`/dms/uav/cancelTakeOver/
${
id
}
`
,
method
:
'delete'
url
:
`/admin-api/uas/device/quitControlUav`
,
method
:
'post'
,
params
});
}
// 获取设备视频流
static
getDeviceStream
(
params
)
{
return
request
({
url
:
`/admin-api/uas/drive/getDeviceStream`
,
method
:
"get"
,
params
});
}
}
export
default
Control_API
;
src/components/MMCFlightControlCenter/api/request.js
浏览文件 @
a0854f3e
...
...
@@ -5,6 +5,7 @@ import router from "../router";
import
store
from
"../store"
;
let
prodUrl
=
"http://192.168.5.80:30080"
;
// let prodUrl = "http://192.168.3.12:48080"; // 戴嘉骏
let
devUrl
=
"http://192.168.5.80:30080"
;
const
$axios
=
axios
.
create
({
...
...
src/components/MMCFlightControlCenter/components/hangar/components/list/components/item/index.vue
浏览文件 @
a0854f3e
...
...
@@ -3,42 +3,42 @@
<div
class=
"nest-group_box"
>
<div
class=
"group-title_box"
>
<div
class=
"title-box"
>
<span
:title=
"data.
name"
class=
"title"
>
{{
data
.
n
ame
}}
</span>
<span
:title=
"data.
deptName"
class=
"title"
>
{{
data
.
deptN
ame
}}
</span>
</div>
<div
class=
"line-box w210"
>
(
<span
class=
"cf"
>
共
{{
data
.
on
line
+
data
.
offline
}}
架
</span>
<span
class=
"healthy--un ml5"
style=
"color: #31db24"
>
{{
data
.
on
line
}}
架在线
</span>
<span
class=
"cf"
>
共
{{
data
.
on
LineCount
+
data
.
offLineCount
}}
架
</span>
<span
class=
"healthy--un ml5"
style=
"color: #31db24"
>
{{
data
.
on
LineCount
}}
架在线
</span>
<span>
/
</span>
<span
class=
"healthy--total"
style=
"color: #cad8d9"
>
{{
data
.
off
line
}}
离线
</span>
)
<span
class=
"healthy--total"
style=
"color: #cad8d9"
>
{{
data
.
off
LineCount
}}
离线
</span>
)
</div>
</div>
</div>
<div
class=
"nest-children"
:class=
"
{ collapse: listCollapse }">
<template
v-if=
"data && data.
nests && data.nests
.length"
>
<template
v-if=
"data && data.
deviceDOList && data.deviceDOList
.length"
>
<div
class=
"nest-device-list"
>
<div
v-for=
"device in data.
nests
"
v-for=
"device in data.
deviceDOList
"
:key=
"`device_$
{device.id}`"
class="nest-device-item"
:class="{ online: device.
online === 1
}"
:class="{ online: device.
isOnline
}"
>
<!-- 最前面的选项框 -->
<div
class=
"title-box"
>
<el-tooltip
:content=
"device.
online === 1
? '在线' : '离线'"
:content=
"device.
isOnline
? '在线' : '离线'"
placement=
"top"
:enterable=
"false"
>
<el-checkbox
:disabled=
"device.
online !== 1
"
:disabled=
"device.
isOnline
"
:value=
"hangar && device.deviceId === hangar.deviceId && device.isCheck"
@
change=
"(e) => handClick(e, device)"
></el-checkbox>
</el-tooltip>
<span
:title=
"device.name"
class=
"title"
>
{{
device
.
name
}}
</span>
<span
class=
"li"
v-if=
"
device.online != 1
"
>
(离线)
</span>
<span
class=
"li"
v-if=
"
!device.isOnline
"
>
(离线)
</span>
<span
class=
"zai"
v-else
>
(在线)
</span>
<span
:title=
"device.comment || '异常'"
...
...
@@ -65,8 +65,8 @@
</div>
</div>
</
template
>
<div
class=
"nest-child_group_box"
v-if=
"data.child
s && data.childs
.length"
>
<Item
v-for=
"(item, i) in data.child
s
"
:data=
"item"
:key=
"`device_child_${i}`"
/>
<div
class=
"nest-child_group_box"
v-if=
"data.child
&& data.child
.length"
>
<Item
v-for=
"(item, i) in data.child"
:data=
"item"
:key=
"`device_child_${i}`"
/>
</div>
</div>
</div>
...
...
src/components/MMCFlightControlCenter/components/hangar/components/list/index.vue
浏览文件 @
a0854f3e
...
...
@@ -46,6 +46,7 @@ export default {
data
()
{
return
{
list
:
[],
deviceType
:
2
,
// 设备类型 2鹰巢
};
},
...
...
@@ -59,8 +60,8 @@ export default {
sumCount
:
0
,
};
this
.
list
.
forEach
((
item
)
=>
{
countObj
.
onlineCount
+=
item
?.
on
line
||
0
;
countObj
.
offlineCount
+=
item
?.
off
line
||
0
;
countObj
.
onlineCount
+=
item
?.
on
LineCount
||
0
;
countObj
.
offlineCount
+=
item
?.
off
LineCount
||
0
;
});
countObj
.
sumCount
=
countObj
.
onlineCount
+
countObj
.
offlineCount
;
return
countObj
;
...
...
@@ -85,12 +86,8 @@ export default {
},
methods
:
{
async
getList
()
{
let
res
=
await
Control_API
.
getUavNestList
({
name
:
""
,
});
if
(
res
.
code
===
200
)
{
this
.
list
=
res
.
data
;
}
let
res
=
await
Control_API
.
getUavTree
({
name
:
""
,
deviceType
:
this
.
deviceType
});
this
.
list
=
res
.
data
;
},
},
};
...
...
src/components/MMCFlightControlCenter/components/mount/PagerP1_New/components/angleControl.vue
浏览文件 @
a0854f3e
...
...
@@ -3,9 +3,9 @@
<div
class=
"angleControlBg w99 h99 dib"
>
<div
class=
"dib wih100 ht100 pr"
>
<div
class=
"angleControlLB tc w40 ml50 mt40 h30"
/>
<img
class=
"pa top0 left21"
src=
"./assets/
lbt
2.png"
alt
/>
<img
class=
"pa top0 left21"
src=
"./assets/
LBT
2.png"
alt
/>
<div
class=
"light pa left30 top20"
:style=
"`transform: rotate($
{90 - rotate}deg);`">
<img
src=
"./assets/
lb
2.png"
alt
/>
<img
src=
"./assets/
LB
2.png"
alt
/>
</div>
<div
class=
"iconfont icon-zuo1 pa top40 left15 c08c"
/>
<div
class=
"rolate iconfont icon-zuo1 pa top40 right15 c08c"
/>
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/player/index.vue
浏览文件 @
a0854f3e
...
...
@@ -619,17 +619,31 @@ export default {
streamOptions
()
{
let
streamOptions
=
[];
// this.streamSelect = "hlsUrl";
this
.
device
?.
streamConfiguration
?.
forEach
((
item1
)
=>
{
item1
.
streamUrlMessage
.
forEach
((
item2
)
=>
{
// 固定使用公网类型的视频地址 urlType 0公网
this
.
device
?.
streamConfiguration
?.
filter
(
i
=>
i
.
urlType
===
0
).
forEach
((
item1
)
=>
{
const
fields
=
[{
field
:
'originalUrl'
,
streamType
:
'ORIGINAL'
,
streamLabel
:
'原画'
,
},{
field
:
'fluencyUrl'
,
streamType
:
'FLV'
,
streamLabel
:
'流畅'
,
},{
field
:
'lowLatencyUrl'
,
streamType
:
'WEBRTC'
,
streamLabel
:
'低延迟'
,
}]
fields
.
filter
(
f
=>
item1
[
f
.
field
]).
forEach
((
item2
)
=>
{
let
brand
=
item1
.
videoSource
?.
toUpperCase
()
||
""
;
if
(
item2
.
streamType
===
"WEBRTC"
)
{
brand
=
"SRS"
;
}
streamOptions
.
unshift
({
label
:
item2
.
stream
Type
,
label
:
item2
.
stream
Label
,
value
:
item2
.
streamType
,
brand
,
url
:
item
2
.
streamUrl
,
url
:
item
1
[
item2
.
field
]
,
// 只有liveNVR支持fpvUrl
fpvUrl
:
""
,
});
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/components/item/index.vue
浏览文件 @
a0854f3e
...
...
@@ -7,7 +7,7 @@
<img
class=
"level-icon"
src=
"./assets/images/uav_item1_1.png"
v-if=
"level === 1"
/>
<img
class=
"level-icon"
src=
"./assets/images/uav_item2.svg"
v-if=
"level === 2"
/>
<img
class=
"level-icon"
src=
"./assets/images/uav_item3.svg"
v-if=
"level === 3"
/>
<div
class=
"org-name"
:title=
"data.
name"
>
{{
data
.
n
ame
}}
</div>
<div
class=
"org-name"
:title=
"data.
deptName"
>
{{
data
.
deptN
ame
}}
</div>
<i
class=
"refresh-icon el-icon-refresh-right"
v-if=
"level === 1"
...
...
@@ -27,15 +27,15 @@
<div
class=
"uav-item-child-box"
:class=
"
{ collapse: data.collapse }">
<Item
v-for=
"child in data.child"
:key=
"child.
i
d"
:key=
"child.
deptI
d"
:data=
"child"
:level=
"level+1"
@
refresh=
"$emit('refresh')"
/>
<div
class=
"device-item-box"
:class=
"
{ online: device.
status == 1
}"
v-for="device in data.d
riveMonitorReqV
OList"
:class=
"
{ online: device.
isOnline
}"
v-for="device in data.d
eviceD
OList"
:key="`device_${device.deviceId}`"
>
<div
class=
"device-name"
>
...
...
@@ -49,7 +49,7 @@
:class=
"'blue'"
:title=
"device.name"
>
{{
device
.
name
}}
</span>
<span
style=
"color:#31DB24 "
class=
"dib"
v-if=
" device.
status == 1
"
>
(在线)
</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')"
>
...
...
@@ -85,13 +85,13 @@
></div>
<div
v-if=
"device.
status
"
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.
status
"
@
click=
"onTakeOver(device)"
>
<div
class=
"jieg"
title=
"接管无人机 "
v-if=
"device.
isOnline
"
@
click=
"onTakeOver(device)"
>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
</div>
...
...
@@ -138,17 +138,15 @@ export default {
async
onTakeOver
(
uav
)
{
if
(
!
uav
.
currentOperator
)
{
let
res
=
await
Control_API
.
setUavControlOn
({
force
:
false
,
id
:
uav
.
id
,
uid
:
this
.
userInfo
.
id
,
deviceId
:
uav
.
id
});
if
(
res
.
code
===
20
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`请开始操作
${
uav
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
else
if
(
// 判断当前接管人是不是自已, 是则提示退出接管, 不是则提示是否强制接管
uav
.
currentOperator
===
this
.
userInfo
.
i
d
uav
.
currentOperator
===
this
.
userInfo
.
userI
d
)
{
try
{
await
this
.
$confirm
(
`请确认是否退出接管
${
uav
.
name
}
?`
,
"安全确认"
,
{
...
...
@@ -157,8 +155,10 @@ export default {
customClass
:
"uav_controlPane"
,
showClose
:
false
,
});
let
res
=
await
Control_API
.
setUavControlOff
(
uav
.
id
);
if
(
res
.
code
===
200
)
{
let
res
=
await
Control_API
.
setUavControlOff
({
deviceId
:
uav
.
id
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`已退出接管
${
uav
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
...
...
@@ -175,12 +175,10 @@ export default {
showClose
:
false
,
}
);
let
res
=
await
Control_API
.
setUavControlOn
({
force
:
false
,
id
:
uav
.
id
,
uid
:
this
.
userInfo
.
id
,
let
res
=
await
Control_API
.
setUavControlOnForce
({
deviceId
:
uav
.
id
});
if
(
res
.
code
===
20
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`请开始操作
${
uav
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
...
...
@@ -284,11 +282,11 @@ export default {
}
}
else
{
// 在未打开播放器的情况下,有uav信息,到此步时肯定已经展开了面板,判断是否有流媒体信息, 并显示播放器
if
(
!
this
.
uav
.
deviceStreamReqVOList
)
{
let
res
=
await
Control_API
.
uavDetail
({
if
(
!
this
.
uav
.
streamConfiguration
)
{
let
res
=
await
Control_API
.
getDeviceStream
({
id
:
item
.
id
,
});
item
.
deviceStreamReqVOList
=
res
.
data
.
deviceStreamReqVOList
;
item
.
streamConfiguration
=
res
.
data
;
}
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
key
:
"showPlayer"
,
...
...
@@ -317,10 +315,10 @@ export default {
}
// 获取该无人机视频流信息
let
res
=
await
Control_API
.
uavDetail
({
let
res
=
await
Control_API
.
getDeviceStream
({
id
:
item
.
id
,
});
item
.
deviceStreamReqVOList
=
res
.
data
.
deviceStreamReqVOList
;
item
.
streamConfiguration
=
res
.
data
;
this
.
$store
.
commit
(
"MMCFlightControlCenter/uav/setState"
,
{
key
:
"showPlayer"
,
value
:
true
,
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/index.vue
浏览文件 @
a0854f3e
...
...
@@ -6,7 +6,7 @@
<div
class=
"pl10 pb30 pr8"
>
<Item
v-for=
"item in wsList"
:key=
"item.
i
d"
:key=
"item.
deptI
d"
:data=
"item"
:level=
"1"
@
refresh=
"$emit('refresh')"
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/index.vue
浏览文件 @
a0854f3e
...
...
@@ -61,6 +61,7 @@ export default {
uavList
:
[],
// 无人机列表
uavSearchContent
:
""
,
// 无人机搜索内容
timeHandle
:
null
,
// 定时刷新句柄
deviceType
:
1
,
// 设备类型 1无人机
};
},
computed
:
{
...
...
@@ -88,7 +89,7 @@ export default {
},
methods
:
{
async
initList
()
{
let
res
=
await
Control_API
.
getUavTree
({
name
:
this
.
uavSearchContent
});
let
res
=
await
Control_API
.
getUavTree
({
serchKey
:
this
.
uavSearchContent
,
deviceType
:
this
.
deviceType
});
this
.
uavList
=
res
.
data
;
},
collapseFlagfn
()
{
...
...
vue2/src/main.js
浏览文件 @
a0854f3e
...
...
@@ -8,7 +8,7 @@ import "element-ui/lib/theme-chalk/index.css";
// import MMCSTL from 'mmc-stl-vue2-dist';
import
MMCSTL
from
'../../index'
;
// import MMCSTL from '../../dist/index';
import
'../../dist/style/index.css'
;
//
import '../../dist/style/index.css';
// Vue.config.productionTip = false
...
...
vue2/src/views/fkzxIframe/demo.vue
浏览文件 @
a0854f3e
...
...
@@ -191,6 +191,7 @@ export default {
this
.
account
=
"admin"
;
this
.
password
=
"mmc@123456"
;
this
.
baseUrl
=
"http://192.168.5.80:30080"
;
// this.baseUrl = "http://192.168.3.12:48080"; // 戴嘉骏
}
this
.
postIframe
({
type
:
"param"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论