Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
56c4a58f
提交
56c4a58f
authored
6月 19, 2025
作者:
“kai”
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(uav列表): 修复权限判断逻辑和样式问题
修复权限判断从菜单ID改为权限标识,修正视频播放按钮显示变量名 调整健康状态组件内边距,优化无人机列表国际化显示格式
上级
ec70f3f2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
54 行增加
和
53 行删除
+54
-53
ru.js
iframe/src/i18n/locales/ru.js
+1
-0
index.vue
...Panel/components/controlRight/components/health/index.vue
+1
-1
index.vue
...ponents/uavList/components/list/components/item/index.vue
+52
-52
没有找到文件。
iframe/src/i18n/locales/ru.js
浏览文件 @
56c4a58f
...
...
@@ -398,6 +398,7 @@ export default {
已取消操作
:
"Операция отменена"
,
},
controlMenu
:
{
当前高度创建航点动作可能不安全
:
"Возможно, что действие создания точки маршрута небезопасно в текущей высоте."
,
任务
:
"Задача"
,
智能识别
:
"ИИ распознавание"
,
人脸识别
:
"Распознавание лиц"
,
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/health/index.vue
浏览文件 @
56c4a58f
...
...
@@ -855,7 +855,7 @@ export default {
}
.nest_info
{
padding
:
1
6px
;
padding
:
6px
;
.btn
{
width
:
80px
;
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/components/item/index.vue
浏览文件 @
56c4a58f
...
...
@@ -33,12 +33,13 @@
/>
</div>
<div
class=
"online-info"
>
(
{{
$t
(
'common.共'
)
}}
{{
data
.
onLineCount
+
data
.
offLineCount
}}
{{
$t
(
'common.架'
)
}}
(
{{
$t
(
"common.共"
)
}}
{{
data
.
onLineCount
+
data
.
offLineCount
}}
{{
$t
(
"common.架"
)
}}
<span
class=
"ml10"
:class=
"
{ online: data.onLineCount }"
>
{{
data
.
onLineCount
}}
{{
$t
(
'common.在线'
)
}}
</span
>
{{
data
.
onLineCount
}}
{{
$t
(
"common.在线"
)
}}
</span
>
/
{{
data
.
offLineCount
}}
{{
$t
(
'common.离线'
)
}}
)
{{
data
.
offLineCount
}}
{{
$t
(
"common.离线"
)
}}
)
</div>
</div>
<div
class=
"uav-item-child-box"
:class=
"
{ collapse: data.collapse }">
...
...
@@ -69,9 +70,9 @@
>
{{
device
.
name
}}
</span
>
<span
style=
"color: #31db24"
class=
"dib"
v-if=
"device.isOnline"
>
(
{{
$t
(
'common.在线'
)
}}
)
</span
>
(
{{
$t
(
"common.在线"
)
}}
)
</span
>
<span
v-else
class=
"dib"
>
(
{{
$t
(
'common.离线'
)
}}
)
</span>
<span
v-else
class=
"dib"
>
(
{{
$t
(
"common.离线"
)
}}
)
</span>
<div
class=
"symbol-icon-box"
>
<!--
<template
v-if=
"device.modelName && device.modelName.includes('入云龙1')"
>
<div
class=
"uav_version status-icon cp"
>
...
...
@@ -100,12 +101,12 @@
</div>
<div
class=
"device-fns"
>
<div
v-if=
"isShowPlayerFlag"
class=
"iconfont icon-luxiang_xianxing"
:class=
"{
active:
uav && device.deviceId === uav.deviceId && uav.showPlayer,
}"
v-if=
"IsShowPlayer"
:title=
"$t('common.视频')"
@
click=
"onShowPlayer(device)"
v-hover
...
...
@@ -147,20 +148,26 @@
:close-on-click-modal=
"false"
@
close=
"takeLoading = false"
>
<span>
{{$t('common.是否请求接管')}} {{ departmentName }} {{$t('common.下的')}} {{ takeDevice.name }}
</span>
<span
>
{{ $t("common.是否请求接管") }} {{ departmentName }}
{{ $t("common.下的") }} {{ takeDevice.name }}
</span
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"takeOverVisible = false"
>
{{$t('common.取消')}}
</el-button>
<el-button
@
click=
"takeOverVisible = false"
>
{{
$t("common.取消")
}}
</el-button>
<el-button
@
click=
"onForceTakeOver"
type=
"danger"
:loading=
"forceTakeLoading"
>
{{
$t('common.强制接管')
}}
</el-button
>
{{
$t("common.强制接管")
}}
</el-button
>
<el-button
type=
"primary"
@
click=
"onApplyTakeOver"
:loading=
"takeLoading"
>
{{$t('common.确认')}}
</el-button>
>
{{ $t("common.确认") }}
</el-button
>
>
</span>
</el-dialog>
...
...
@@ -187,7 +194,7 @@ export default {
data
()
{
return
{
IsShowPane
:
false
,
IsShowPlayer
:
false
,
isShowPlayerFlag
:
false
,
isTakeOver
:
false
,
takeOverVisible
:
false
,
// 接管设备信息
...
...
@@ -242,37 +249,24 @@ export default {
created
()
{
let
tmjData
=
JSON
.
parse
(
localStorage
.
getItem
(
"tmj"
));
if
(
tmjData
)
{
const
userList
=
t
his
.
handleGetMenuList
(
tmjData
.
user
.
menuList
)
;
// 使用一个映射对象来存储权限
ID
和对应的标志
const
userList
=
t
mjData
.
user
.
permissions
;
// 使用一个映射对象来存储权限和对应的标志
const
permissionMap
=
{
3108
:
"IsShowPane"
,
// 控制面板
权限
3099
:
"isTakeOver"
,
// 接管
权限
3193
:
"isShowPlayer"
,
// 视频
权限
"uas:device-stream:query"
:
"isShowPlayerFlag"
,
// 视频
权限
"uas:device-take:query"
:
"IsShowPane"
,
// 控制面板
权限
"uas:device-take:update"
:
"isTakeOver"
,
// 接管
权限
};
// 遍历用户菜单列表,设置对应的标志
userList
.
forEach
((
item
)
=>
{
if
(
permissionMap
[
item
.
id
])
{
this
[
permissionMap
[
item
.
id
]]
=
true
;
}
});
userList
.
forEach
((
item
)
=>
{
if
(
permissionMap
[
item
])
{
this
.
$nextTick
(()
=>
{
this
[
permissionMap
[
item
]]
=
true
;
})
}
});
}
},
methods
:
{
handleGetMenuList
(
menuList
)
{
const
collector
=
[];
const
flattenMenu
=
(
items
)
=>
{
items
.
forEach
((
item
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
flattenMenu
(
item
.
children
);
}
else
{
collector
.
push
(
item
);
}
});
};
flattenMenu
(
menuList
);
return
collector
;
},
/**
* 同意接管事件
*/
...
...
@@ -281,7 +275,7 @@ export default {
//接管消息
if
(
content
.
isAgree
)
{
this
.
$notify
.
success
({
title
:
this
.
$t
(
'common.接管消息'
),
title
:
this
.
$t
(
"common.接管消息"
),
message
:
msg
,
duration
:
30000
,
offset
:
40
,
...
...
@@ -290,12 +284,12 @@ export default {
this
.
takeOverVisible
=
false
;
}
else
{
this
.
$notify
.
warning
({
title
:
this
.
$t
(
'common.接管消息'
),
title
:
this
.
$t
(
"common.接管消息"
),
message
:
msg
,
duration
:
30000
,
offset
:
40
,
});
this
.
$message
.
warning
(
this
.
$t
(
'common.申请接管拒绝'
));
this
.
$message
.
warning
(
this
.
$t
(
"common.申请接管拒绝"
));
}
this
.
takeLoading
=
false
;
this
.
bus
.
$off
(
"uas-device-take-agree-message"
,
this
.
onTakeAgree
);
...
...
@@ -314,12 +308,12 @@ export default {
this
.
bus
.
$on
(
"uas-device-take-agree-message"
,
this
.
onTakeAgree
);
this
.
bus
.
$on
(
"uas-device-take-refuse-message"
,
this
.
onTakeAgree
);
}
else
{
this
.
$message
.
warning
(
this
.
$t
(
'common.接管失败申请单位未同意'
));
this
.
$message
.
warning
(
this
.
$t
(
"common.接管失败申请单位未同意"
));
this
.
takeLoading
=
false
;
}
setTimeout
(()
=>
{
if
(
this
.
takeLoading
)
{
this
.
$message
.
error
(
this
.
$t
(
'common.接管失败申请单位未同意'
));
this
.
$message
.
error
(
this
.
$t
(
"common.接管失败申请单位未同意"
));
this
.
takeLoading
=
false
;
}
},
5500
);
...
...
@@ -334,7 +328,9 @@ export default {
deviceId
:
this
.
takeDevice
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`
${
this
.
$t
(
'common.请开始操作'
)}${
this
.
takeDevice
.
name
}
`
);
this
.
$message
.
success
(
`
${
this
.
$t
(
"common.请开始操作"
)}${
this
.
takeDevice
.
name
}
`
);
this
.
takeOverVisible
=
false
;
this
.
$emit
(
"refresh"
);
}
...
...
@@ -354,7 +350,7 @@ export default {
deviceId
:
uav
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`
${
this
.
$t
(
'common.请开始操作'
)}${
uav
.
name
}
`
);
this
.
$message
.
success
(
`
${
this
.
$t
(
"common.请开始操作"
)}${
uav
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
else
{
...
...
@@ -367,17 +363,21 @@ export default {
uav
.
currentOperator
===
this
.
userInfo
.
id
)
{
try
{
await
this
.
$confirm
(
`
${
this
.
$t
(
'common.请确认是否退出接管'
)}${
uav
.
name
}
?`
,
this
.
$t
(
'common.安全确认'
),
{
cancelButtonText
:
this
.
$t
(
'common.取消'
),
confirmButtonText
:
this
.
$t
(
'common.确认'
),
customClass
:
"uav_controlPane"
,
showClose
:
false
,
});
await
this
.
$confirm
(
`
${
this
.
$t
(
"common.请确认是否退出接管"
)}${
uav
.
name
}
?`
,
this
.
$t
(
"common.安全确认"
),
{
cancelButtonText
:
this
.
$t
(
"common.取消"
),
confirmButtonText
:
this
.
$t
(
"common.确认"
),
customClass
:
"uav_controlPane"
,
showClose
:
false
,
}
);
let
res
=
await
Control_API
.
setUavControlOff
({
deviceId
:
uav
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`
${
this
.
$t
(
'common.已退出接管'
)}${
uav
.
name
}
`
);
this
.
$message
.
success
(
`
${
this
.
$t
(
"common.已退出接管"
)}${
uav
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
catch
(
e
)
{}
...
...
@@ -401,10 +401,10 @@ export default {
password
:
this
.
mqttToken
,
})
.
then
(()
=>
{
console
.
log
(
this
.
$t
(
'common.mqtt连接成功'
));
console
.
log
(
this
.
$t
(
"common.mqtt连接成功"
));
});
}
catch
(
e
)
{
console
.
log
(
this
.
$t
(
'common.mqtt失败'
),
e
);
console
.
log
(
this
.
$t
(
"common.mqtt失败"
),
e
);
}
// setTimeout(() => {
// this.onShowPanel(item);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论