Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
8a682618
提交
8a682618
authored
8月 24, 2024
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:
1. 修正电池显示错误 2. 全局翻页组件样式 3. 开始任务事件销毁未注销 4. 机库增加接管判断 5. 接管历史补充 6. 接管判断修正
上级
d00ec496
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
222 行增加
和
34 行删除
+222
-34
index.vue
src/components/MMCDataTransferPanel/index.vue
+16
-2
index.vue
...eft/components/airwayList/components/normalTask/index.vue
+5
-4
index.vue
...components/controlPanel/components/controlRight/index.vue
+9
-3
jieguan.svg
...components/list/components/item/assets/images/jieguan.svg
+19
-0
jieguan_active.svg
...nts/list/components/item/assets/images/jieguan_active.svg
+19
-0
index.vue
...mponents/hangar/components/list/components/item/index.vue
+71
-1
index.vue
...omponents/controlPanel/components/controlBottom/index.vue
+13
-10
index.vue
...el/components/controlLeft/components/airwayList/index.vue
+2
-1
index.vue
...anel/components/controlLeft/components/taskList/index.vue
+2
-1
index.vue
.../components/controlRight/components/controlList/index.vue
+1
-1
takeOverRecords.vue
...anel/components/controlTop/components/takeOverRecords.vue
+32
-7
index.vue
...ponents/uavList/components/list/components/item/index.vue
+2
-2
index.vue
src/components/MMCFlightControlCenter/index.vue
+12
-0
hangar.js
src/components/MMCFlightControlCenter/store/hangar.js
+18
-1
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+1
-1
没有找到文件。
src/components/MMCDataTransferPanel/index.vue
浏览文件 @
8a682618
...
@@ -42,8 +42,22 @@ export default {
...
@@ -42,8 +42,22 @@ export default {
velocityX
:
0
,
// 使用NED(北-东-下)坐标系,飞机在x方向上的当前速度,以米
velocityX
:
0
,
// 使用NED(北-东-下)坐标系,飞机在x方向上的当前速度,以米
velocityY
:
0
,
// 使用NED(北-东-下)坐标系,飞机在y方向上的当前速度,以米
velocityY
:
0
,
// 使用NED(北-东-下)坐标系,飞机在y方向上的当前速度,以米
velocityZ
:
0
,
//爬升率
velocityZ
:
0
,
//爬升率
accelerator
:
this
.
uavRealTimeData
.
accelerator
,
//油门值
accelerator
:
0
,
//油门值
batteryList
:
this
.
uavRealTimeData
.
batteryList
,
//电池列表
batteryList
:
[],
//电池列表
obstacle
:
null
/* {
// 避障信息(#272)
minDistance: 100, // 壁障最小距离单位(cm)
maxDistance: 2000, // 壁障最大距离单位(cm)
distances: [
// distances[36],360度避障距离,每隔10度一个距离
3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
],
enable: true, // true触发避障,false未触发
obsDistance: 100, // 避障使能距离单位(m)
type: 0, // 感器类型
} */
,
}),
}),
},
},
// 无人机设备信息
// 无人机设备信息
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/normalTask/index.vue
浏览文件 @
8a682618
...
@@ -132,6 +132,7 @@ export default {
...
@@ -132,6 +132,7 @@ export default {
this
.
getAirwayList
();
this
.
getAirwayList
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
bus
.
$off
(
"startTask"
,
this
.
onStartTask
);
this
.
clearAirwayEntities
();
this
.
clearAirwayEntities
();
},
},
methods
:
{
methods
:
{
...
@@ -140,7 +141,7 @@ export default {
...
@@ -140,7 +141,7 @@ export default {
"clearAirwayEntities"
,
"clearAirwayEntities"
,
"apiPointsToFKZXPoints"
,
"apiPointsToFKZXPoints"
,
]),
]),
...
mapActions
(
"MMCFlightControlCenter/
uav"
,
[
"isTakeOver"
]),
...
mapActions
(
"MMCFlightControlCenter/
hangar"
,
[
"hangar"
,
"isTakeOver"
]),
/**
/**
* 更新任务列表
* 更新任务列表
*/
*/
...
@@ -165,10 +166,10 @@ export default {
...
@@ -165,10 +166,10 @@ export default {
*/
*/
async
onStartTask
()
{
async
onStartTask
()
{
// 判断是否已接管
// 判断是否已接管
/*
if (!(await this.isTakeOver())) {
if
(
!
(
await
this
.
isTakeOver
()))
{
this.$message.warning("请先接管
无人机
");
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
*/
}
// 判断是否选择了航线
// 判断是否选择了航线
if
(
this
.
selectedAirway
.
id
===
-
1
)
{
if
(
this
.
selectedAirway
.
id
===
-
1
)
{
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlRight/index.vue
浏览文件 @
8a682618
...
@@ -126,16 +126,18 @@ export default {
...
@@ -126,16 +126,18 @@ export default {
},
},
watch
:
{
watch
:
{
// 打开航线编辑时关闭所有窗口
// 打开航线编辑时关闭所有窗口
showAirwayEdit
(
newVal
){
showAirwayEdit
(
newVal
)
{
if
(
newVal
)
{
if
(
newVal
)
{
this
.
showHangar
=
false
;
this
.
showHangar
=
false
;
this
.
showLogger
=
false
;
this
.
showLogger
=
false
;
this
.
showMonitor
=
false
;
this
.
showMonitor
=
false
;
}
}
}
}
,
},
},
methods
:
{
methods
:
{
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
,
"isTakeOver"
,
"out"
,
"out"
,
"in"
,
"in"
,
"chargeStart"
,
"chargeStart"
,
...
@@ -157,6 +159,10 @@ export default {
...
@@ -157,6 +159,10 @@ export default {
* @param {number} i this.ctrlList被点击元素的索引
* @param {number} i this.ctrlList被点击元素的索引
*/
*/
async
onClickCMD
(
i
)
{
async
onClickCMD
(
i
)
{
if
(
!
await
this
.
isTakeOver
()){
this
.
$message
.
warning
(
"请先接管设备"
);
return
;
}
let
item
=
this
.
ctrlList
[
i
];
let
item
=
this
.
ctrlList
[
i
];
let
label
=
item
.
label
;
let
label
=
item
.
label
;
let
key
=
item
.
key
;
let
key
=
item
.
key
;
...
...
src/components/MMCFlightControlCenter/components/hangar/components/list/components/item/assets/images/jieguan.svg
0 → 100644
浏览文件 @
8a682618
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"18px"
height=
"18px"
viewBox=
"0 0 18 18"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
编组 12备份
</title>
<g
id=
"页面-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"接管中"
transform=
"translate(-1267.000000, -201.000000)"
>
<g
id=
"编组-25"
transform=
"translate(641.000000, 172.000000)"
>
<g
transform=
"translate(0.000000, -60.000000)"
id=
"编组-12备份"
>
<g
transform=
"translate(626.000000, 89.000000)"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"18"
height=
"18"
></rect>
<g
id=
"编组"
transform=
"translate(0.000000, 1.000000)"
fill=
"#B3C9CB"
fill-rule=
"nonzero"
>
<path
d=
"M17.850016,13.5103629 C17.5788626,12.8481305 16.9357273,12.4165056 16.2228035,12.4182979 C15.7931026,12.4195874 15.3790797,12.5805555 15.0605089,12.8701869 L13.163344,11.763059 L13.163344,7.47764569 L9.47399584,5.33870477 L9.47399584,3.50102313 C10.3177515,3.28747031 10.8817508,2.48954009 10.8042077,1.61907713 C10.7266645,0.748614175 10.0305891,0.0639190733 9.16248966,0.00420007209 C8.29439023,-0.0555189291 7.51186606,0.527459147 7.31687937,1.37917401 C7.12189267,2.23088887 7.57230367,3.09860323 8.37918928,3.42570831 L8.37918928,5.33117328 L4.71233711,7.47764569 L4.71233711,11.6500868 L2.98764183,12.6818998 C2.40679718,12.1116776 1.51039599,12.0210201 0.82802338,12.4634868 C0.113289308,12.9100641 -0.1850107,13.8034942 0.117159798,14.5925747 C0.419330296,15.3816552 1.23683126,15.8440536 2.06530479,15.6944927 C2.89243426,15.5317097 3.48747791,14.8012523 3.48255439,13.9547203 C3.48992794,13.8670091 3.48992794,13.7788297 3.48255439,13.6911184 L5.21474835,12.6894313 L8.96408594,14.8810926 L12.6234394,12.7496832 L14.5206042,13.8492795 C14.4924107,13.9703061 14.4773257,14.094039 14.4756122,14.2183222 C14.4708638,14.9381924 14.9007044,15.5892294 15.5627925,15.8649668 C16.2248806,16.1407041 16.9872866,15.9861975 17.4911185,15.4741788 C17.9949504,14.96216 18.1398132,14.1946555 17.8575147,13.5329573 L17.850016,13.5103629 Z M11.5136355,7.81656238 L8.94908859,9.32285881 L6.36204565,7.81656238 L8.92659257,6.31026596 L11.5136355,7.81656238 Z M12.0460414,8.77306061 L12.0460414,11.7856535 L9.47399584,13.2919499 L9.47399584,10.279357 L12.0460414,8.77306061 Z"
id=
"形状"
></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/list/components/item/assets/images/jieguan_active.svg
0 → 100644
浏览文件 @
8a682618
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"18px"
height=
"18px"
viewBox=
"0 0 18 18"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
编组 12备份
</title>
<g
id=
"页面-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"接管中"
transform=
"translate(-1267.000000, -201.000000)"
>
<g
id=
"编组-25"
transform=
"translate(641.000000, 172.000000)"
>
<g
transform=
"translate(0.000000, -60.000000)"
id=
"编组-12备份"
>
<g
transform=
"translate(626.000000, 89.000000)"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"18"
height=
"18"
></rect>
<g
id=
"编组"
transform=
"translate(0.000000, 1.000000)"
fill=
"#00ffff"
fill-rule=
"nonzero"
>
<path
d=
"M17.850016,13.5103629 C17.5788626,12.8481305 16.9357273,12.4165056 16.2228035,12.4182979 C15.7931026,12.4195874 15.3790797,12.5805555 15.0605089,12.8701869 L13.163344,11.763059 L13.163344,7.47764569 L9.47399584,5.33870477 L9.47399584,3.50102313 C10.3177515,3.28747031 10.8817508,2.48954009 10.8042077,1.61907713 C10.7266645,0.748614175 10.0305891,0.0639190733 9.16248966,0.00420007209 C8.29439023,-0.0555189291 7.51186606,0.527459147 7.31687937,1.37917401 C7.12189267,2.23088887 7.57230367,3.09860323 8.37918928,3.42570831 L8.37918928,5.33117328 L4.71233711,7.47764569 L4.71233711,11.6500868 L2.98764183,12.6818998 C2.40679718,12.1116776 1.51039599,12.0210201 0.82802338,12.4634868 C0.113289308,12.9100641 -0.1850107,13.8034942 0.117159798,14.5925747 C0.419330296,15.3816552 1.23683126,15.8440536 2.06530479,15.6944927 C2.89243426,15.5317097 3.48747791,14.8012523 3.48255439,13.9547203 C3.48992794,13.8670091 3.48992794,13.7788297 3.48255439,13.6911184 L5.21474835,12.6894313 L8.96408594,14.8810926 L12.6234394,12.7496832 L14.5206042,13.8492795 C14.4924107,13.9703061 14.4773257,14.094039 14.4756122,14.2183222 C14.4708638,14.9381924 14.9007044,15.5892294 15.5627925,15.8649668 C16.2248806,16.1407041 16.9872866,15.9861975 17.4911185,15.4741788 C17.9949504,14.96216 18.1398132,14.1946555 17.8575147,13.5329573 L17.850016,13.5103629 Z M11.5136355,7.81656238 L8.94908859,9.32285881 L6.36204565,7.81656238 L8.92659257,6.31026596 L11.5136355,7.81656238 Z M12.0460414,8.77306061 L12.0460414,11.7856535 L9.47399584,13.2919499 L9.47399584,10.279357 L12.0460414,8.77306061 Z"
id=
"形状"
></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/list/components/item/index.vue
浏览文件 @
8a682618
...
@@ -60,6 +60,10 @@
...
@@ -60,6 +60,10 @@
<div
class=
"icon-box"
>
<div
class=
"icon-box"
>
<span
class=
"type fr"
v-if=
"device.status"
>
{{
typeName
(
device
.
status
)
}}
</span>
<span
class=
"type fr"
v-if=
"device.status"
>
{{
typeName
(
device
.
status
)
}}
</span>
<span
@
click=
"onLocation(device)"
class=
"iconfont fr icon-dingwei1"
v-hover
></span>
<span
@
click=
"onLocation(device)"
class=
"iconfont fr icon-dingwei1"
v-hover
></span>
<span
class=
"takeover"
title=
"接管"
@
click=
"onTakeOver(device)"
v-hover
>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -90,7 +94,7 @@ export default {
...
@@ -90,7 +94,7 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
...
mapState
(
"MMCFlightControlCenter"
,
[
"listCollapse"
,
"cesiumViewer"
]),
...
mapState
(
"MMCFlightControlCenter"
,
[
"listCollapse"
,
"cesiumViewer"
,
"userInfo"
]),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"showPanel"
,
"hangar"
]),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"showPanel"
,
"hangar"
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uav"
]),
},
},
...
@@ -243,6 +247,59 @@ export default {
...
@@ -243,6 +247,59 @@ export default {
this
.
$message
.
warning
(
"该机库没有经纬度"
);
this
.
$message
.
warning
(
"该机库没有经纬度"
);
}
}
},
},
/**
* 接管无人机
*/
async
onTakeOver
(
hangar
)
{
if
(
!
hangar
.
currentOperator
)
{
let
res
=
await
Control_API
.
setUavControlOn
({
deviceId
:
hangar
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`请开始操作
${
hangar
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
else
if
(
// 判断当前接管人是不是自已, 是则提示退出接管, 不是则提示是否强制接管
hangar
.
currentOperator
===
this
.
userInfo
.
id
)
{
try
{
await
this
.
$confirm
(
`请确认是否退出接管
${
hangar
.
name
}
?`
,
"安全确认"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
customClass
:
"uav_controlPane"
,
showClose
:
false
,
});
let
res
=
await
Control_API
.
setUavControlOff
({
deviceId
:
hangar
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`已退出接管
${
hangar
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
catch
(
e
)
{}
}
else
{
try
{
await
this
.
$confirm
(
`
${
hangar
.
name
}
已被接管, 请确认是否强制接管?`
,
"安全确认"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
customClass
:
"uav_controlPane"
,
showClose
:
false
,
}
);
let
res
=
await
Control_API
.
setUavControlOnForce
({
deviceId
:
hangar
.
id
,
});
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
`请开始操作
${
hangar
.
name
}
`
);
this
.
$emit
(
"refresh"
);
}
}
catch
(
e
)
{}
}
},
},
},
};
};
</
script
>
</
script
>
...
@@ -397,6 +454,19 @@ export default {
...
@@ -397,6 +454,19 @@ export default {
.icon-box
{
.icon-box
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
gap
:
8px
;
.takeover
{
width
:
20px
;
cursor
:
pointer
;
height
:
20px
;
background-size
:
100%
100%
;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
}
}
}
}
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlBottom/index.vue
浏览文件 @
8a682618
...
@@ -78,11 +78,14 @@ export default {
...
@@ -78,11 +78,14 @@ export default {
*/
*/
async
isTakeOver
()
{
async
isTakeOver
()
{
if
(
this
.
isHangar
)
{
if
(
this
.
isHangar
)
{
return
true
;
return
await
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/hangar/isTakeOver"
);
}
else
{
return
await
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/isTakeOver"
);
}
}
return
await
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/isTakeOver"
);
},
},
// 一键任务
// 一键任务
onStartTask
()
{
onStartTask
()
{
...
@@ -92,7 +95,7 @@ export default {
...
@@ -92,7 +95,7 @@ export default {
async
onReturnFlight
()
{
async
onReturnFlight
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
$confirm
(
"请确认是否进行一键返航操作?"
,
"安全确认"
,
{
this
.
$confirm
(
"请确认是否进行一键返航操作?"
,
"安全确认"
,
{
...
@@ -112,7 +115,7 @@ export default {
...
@@ -112,7 +115,7 @@ export default {
async
onTaskEnd
()
{
async
onTaskEnd
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
$confirm
(
"请确认是否进行任务结束操作?"
,
"安全确认"
,
{
this
.
$confirm
(
"请确认是否进行任务结束操作?"
,
"安全确认"
,
{
...
@@ -132,7 +135,7 @@ export default {
...
@@ -132,7 +135,7 @@ export default {
async
onLand
()
{
async
onLand
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
$confirm
(
"请确认是否进行紧急降落操作?"
,
"安全确认"
,
{
this
.
$confirm
(
"请确认是否进行紧急降落操作?"
,
"安全确认"
,
{
...
@@ -154,7 +157,7 @@ export default {
...
@@ -154,7 +157,7 @@ export default {
async
onModeManual
()
{
async
onModeManual
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/modeManual"
,
{
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/modeManual"
,
{
...
@@ -170,7 +173,7 @@ export default {
...
@@ -170,7 +173,7 @@ export default {
async
onModeAuto
()
{
async
onModeAuto
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/modeAuto"
,
{
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/uav/modeAuto"
,
{
...
@@ -185,7 +188,7 @@ export default {
...
@@ -185,7 +188,7 @@ export default {
async
onModeKeyboard
()
{
async
onModeKeyboard
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
this
.
controlType
=
2
;
this
.
controlType
=
2
;
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/airwayList/index.vue
浏览文件 @
8a682618
...
@@ -144,6 +144,7 @@ export default {
...
@@ -144,6 +144,7 @@ export default {
this
.
getAirwayList
();
this
.
getAirwayList
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
bus
.
$off
(
"startTask"
,
this
.
onStartTask
);
this
.
clearAirwayEntities
();
this
.
clearAirwayEntities
();
},
},
methods
:
{
methods
:
{
...
@@ -177,7 +178,7 @@ export default {
...
@@ -177,7 +178,7 @@ export default {
async
onStartTask
()
{
async
onStartTask
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/taskList/index.vue
浏览文件 @
8a682618
...
@@ -130,6 +130,7 @@ export default {
...
@@ -130,6 +130,7 @@ export default {
this
.
bus
.
$on
(
"startTask"
,
this
.
onStartTask
);
this
.
bus
.
$on
(
"startTask"
,
this
.
onStartTask
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
bus
.
$off
(
"startTask"
,
this
.
onStartTask
);
this
.
clearAirwayEntities
();
this
.
clearAirwayEntities
();
},
},
methods
:
{
methods
:
{
...
@@ -158,7 +159,7 @@ export default {
...
@@ -158,7 +159,7 @@ export default {
async
onStartTask
()
{
async
onStartTask
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
(
await
this
.
isTakeOver
()))
{
if
(
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
;
return
;
}
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlRight/components/controlList/index.vue
浏览文件 @
8a682618
...
@@ -211,7 +211,7 @@ export default {
...
@@ -211,7 +211,7 @@ export default {
async
isTake
()
{
async
isTake
()
{
// 判断是否已接管
// 判断是否已接管
if
(
!
this
.
isHangar
&&
!
(
await
this
.
isTakeOver
()))
{
if
(
!
this
.
isHangar
&&
!
(
await
this
.
isTakeOver
()))
{
this
.
$message
.
warning
(
"请先接管
无人机
"
);
this
.
$message
.
warning
(
"请先接管
设备
"
);
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlTop/components/takeOverRecords.vue
浏览文件 @
8a682618
...
@@ -6,39 +6,63 @@
...
@@ -6,39 +6,63 @@
<div
class=
"dialog-header__close"
@
click=
"$emit('close')"
>
关闭
</div>
<div
class=
"dialog-header__close"
@
click=
"$emit('close')"
>
关闭
</div>
</div>
</div>
<div
class=
"dialog-content"
>
<div
class=
"dialog-content"
>
<el-table
:data=
"list"
>
<el-table
:data=
"list"
height=
"200px"
>
<el-table-column
label=
"无人机名称"
align=
"center"
prop=
"deviceName"
></el-table-column>
<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=
"无人机所属单位"
align=
"center"
prop=
"deviceDeptName"
></el-table-column>
<el-table-column
label=
"接管状态"
align=
"center"
prop=
"takeStats"
></el-table-column>
<el-table-column
label=
"接管状态"
align=
"center"
prop=
"takeStats"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
takeStats
?
'接管中'
:
'未接管'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"当前控制单位"
align=
"center"
prop=
"takeUserName"
></el-table-column>
<el-table-column
label=
"当前控制单位"
align=
"center"
prop=
"takeUserName"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
prop=
"name"
>
<el-table-column
label=
"操作"
align=
"center"
prop=
"name"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"onExit(scope.row)"
type=
"text"
size=
"small"
>
退出接管
</el-button>
<el-button
@
click=
"onExit(scope.row)"
type=
"text"
size=
"small"
v-if=
"scope.takeStats"
>
退出接管
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
<el-pagination
layout=
"prev, pager, next"
:total=
"page.total"
:page-size=
"page.pageSize"
@
current-change=
"onPageChange"
:current-page=
"page.pageNo"
></el-pagination>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
Control_API
}
from
"../../../../../../../api"
;
import
{
Control_API
}
from
"../../../../../../../api"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
export
default
{
name
:
"TakeOverRecords"
,
name
:
"TakeOverRecords"
,
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:
[],
page
:
{
pageNo
:
1
,
pageSize
:
10
,
total
:
0
,
},
};
};
},
},
computed
:
{
...
mapState
(
"MMCFlightControlCenter/hangar"
),
},
mounted
()
{
mounted
()
{
this
.
init
();
this
.
init
();
},
},
methods
:
{
methods
:
{
async
init
()
{
async
init
()
{
let
res
=
await
Control_API
.
getTakeRecord
({});
let
res
=
await
Control_API
.
getTakeRecord
({
deviceType
:
this
.
hangar
?
2
:
1
,
pageNo
:
this
.
page
.
pageNo
,
pageSize
:
this
.
page
.
pageSize
,
});
this
.
list
=
res
.
data
;
this
.
list
=
res
.
data
;
console
.
log
(
'接管记录'
,
this
.
list
);
console
.
log
(
"接管记录"
,
this
.
list
);
},
},
onExit
(
item
)
{
onExit
(
item
)
{
this
.
$confirm
(
"确认退出该用户接管?"
,
"提示"
,
{
this
.
$confirm
(
"确认退出该用户接管?"
,
"提示"
,
{
...
@@ -55,6 +79,7 @@ export default {
...
@@ -55,6 +79,7 @@ export default {
});
});
});
});
},
},
onPageChange
()
{},
},
},
};
};
</
script
>
</
script
>
...
@@ -62,17 +87,17 @@ export default {
...
@@ -62,17 +87,17 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.dialog1027
::v-deep
{
.dialog1027
::v-deep
{
width
:
700px
;
width
:
700px
;
height
:
180px
;
position
:
absolute
!important
;
position
:
absolute
!important
;
left
:
50%
;
left
:
50%
;
top
:
calc
(
100%
+
25px
);
top
:
calc
(
100%
+
25px
);
margin-left
:
-350px
;
margin-left
:
-350px
;
padding
:
0
!important
;
padding
:
0
!important
;
height
:
300px
;
.el-table
{
.el-table
{
background-color
:
transparent
;
background-color
:
transparent
;
*
{
*
{
background-color
:
transparent
;
background-color
:
transparent
!important
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/uavList/components/list/components/item/index.vue
浏览文件 @
8a682618
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
@
click=
"onShowPanel(device)"
@
click=
"onShowPanel(device)"
v-hover
v-hover
></div>
></div>
<div
class=
"
jieg"
title=
"接管无人机
"
@
click=
"onTakeOver(device)"
v-hover
>
<div
class=
"
takeover"
title=
"接管
"
@
click=
"onTakeOver(device)"
v-hover
>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan_active.svg"
v-if=
"device.currentOperator"
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
<img
src=
"./assets/images/jieguan.svg"
v-else
/>
</div>
</div>
...
@@ -472,7 +472,7 @@ export default {
...
@@ -472,7 +472,7 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.
jieg
{
.
takeover
{
width
:
20px
;
width
:
20px
;
cursor
:
pointer
;
cursor
:
pointer
;
height
:
20px
;
height
:
20px
;
...
...
src/components/MMCFlightControlCenter/index.vue
浏览文件 @
8a682618
...
@@ -619,5 +619,16 @@ export default {
...
@@ -619,5 +619,16 @@ export default {
background-color
:
#4472d5
;
background-color
:
#4472d5
;
}
}
}
}
.el-pagination
{
text-align
:
center
;
.el-pager
li
{
background
:
transparent
!important
;
}
button
{
background
:
transparent
!important
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/store/hangar.js
浏览文件 @
8a682618
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
{
TaskInfo
}
from
"../api"
;
import
{
Control_API
,
TaskInfo
}
from
"../api"
;
function
initHangarRealTimeData
(){
function
initHangarRealTimeData
(){
return
{
return
{
...
@@ -329,6 +329,23 @@ const actions = {
...
@@ -329,6 +329,23 @@ const actions = {
data
?.
callback
&&
data
.
callback
(
false
);
data
?.
callback
&&
data
.
callback
(
false
);
}
}
},
},
/**
* 判断是否已接管
* @param { Number } data.id 无人机id
*/
async
isTakeOver
({
state
},
data
)
{
let
res
=
await
Control_API
.
getDeviceDetail
({
id
:
data
?.
id
||
state
.
hangar
.
id
,
});
if
(
res
.
data
.
currentOperator
&&
res
.
data
.
currentOperator
===
window
.
$mmc
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
id
)
{
return
true
;
}
return
false
;
},
};
};
export
default
{
export
default
{
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
8a682618
...
@@ -1303,7 +1303,7 @@ const actions = {
...
@@ -1303,7 +1303,7 @@ const actions = {
if
(
if
(
res
.
data
.
currentOperator
&&
res
.
data
.
currentOperator
&&
res
.
data
.
currentOperator
===
res
.
data
.
currentOperator
===
window
.
$mmc
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
userI
d
window
.
$mmc
.
$store
.
state
.
MMCFlightControlCenter
.
userInfo
.
i
d
)
{
)
{
return
true
;
return
true
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论