Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
fd265343
提交
fd265343
authored
2月 27, 2025
作者:
温凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:蛙跳飞行对接
上级
c996f127
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
1031 行增加
和
2 行删除
+1031
-2
App.vue
iframe/src/App.vue
+2
-0
无人机库.png
.../controlLeft/components/airwayList/assets/images/无人机库.png
+0
-0
index.vue
...ponents/leapFrogFligh/components/leapFrogDialog/index.vue
+284
-0
index.vue
...ts/leapFrogFligh/components/leapFrogFlighDialog/index.vue
+111
-0
index.vue
.../components/airwayList/components/leapFrogFligh/index.vue
+621
-0
index.vue
...eft/components/airwayList/components/normalTask/index.vue
+0
-1
index.vue
...el/components/controlLeft/components/airwayList/index.vue
+9
-1
index.vue
src/components/MMCFlightControlCenter/index.vue
+4
-0
没有找到文件。
iframe/src/App.vue
浏览文件 @
fd265343
...
...
@@ -24,6 +24,8 @@
@
airwayListGet=
"dispatchEvent('airwayListGet', $event)"
@
airwayGet=
"dispatchEvent('airwayGet', $event)"
@
taskListGet=
"dispatchEvent('taskListGet', $event)"
@
leapFrogFlighGet=
"dispatchEvent('leapFrogFlighGet', $event)"
@
apronUavSkipEvent=
"dispatchEvent('apronUavSkipEvent', $event)"
@
taskRecordPageGet=
"dispatchEvent('taskRecordPageGet', $event)"
@
taskInfoUpdateTime=
"dispatchEvent('taskInfoUpdateTime', $event)"
@
taskInfoRecordDel=
"dispatchEvent('taskInfoRecordDel', $event)"
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/assets/images/无人机库.png
0 → 100644
浏览文件 @
fd265343
2.4 KB
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/leapFrogFligh/components/leapFrogDialog/index.vue
0 → 100644
浏览文件 @
fd265343
<
template
>
<el-dialog
:visible
.
sync=
"localVisible"
:close-on-click-modal=
"false"
:modal-append-to-body=
"false"
:show-close=
"showClose"
@
close=
"handleClose"
:width=
"width"
>
<div
slot=
"title"
class=
"dialog-header"
>
<div
>
<img
src=
"../../../../../../assets/images/mount_head.png"
/>
<span
class=
"title vas"
>
{{
title
}}
</span>
</div>
</div>
<div
class=
"stl-timed-task"
>
<div
class=
"timed-task-header"
>
<div
class=
"header__column flex2"
>
序号
</div>
<div
class=
"header__column flex2"
>
机库名称
</div>
<div
class=
"header__column status"
>
状态
</div>
<div
class=
"header__column flex2"
>
距离(km)
</div>
</div>
<div
class=
"timed-task-main"
v-loading=
"loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<div
class=
"row"
:class=
"
{ single: i % 2 != 0 }" v-for="(item, i) in taskListAll" :key="item.id">
<div
class=
"row__column flex2"
>
<span
class=
"f12"
>
<span
class=
"mr10"
>
<el-checkbox
v-model=
"item.active"
:label=
"item.id"
:disabled=
"item.type === '忙碌'"
></el-checkbox>
</span>
{{
i
+
1
}}
</span>
</div>
<div
class=
"row__column flex2"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.name"
placement=
"top-start"
>
<span
class=
"f12"
>
{{
item
.
name
}}
</span>
</el-tooltip>
</div>
<div
class=
"row__column flex2"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.type"
placement=
"top-start"
>
<span
class=
"f12"
:class=
"
{ 'text-red': item.type === '忙碌', 'text-green': item.type == '空闲' }">
{{
item
.
type
}}
</span>
</el-tooltip>
</div>
<div
class=
"row__column status"
style=
"color: rgb(255, 189, 54)"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"String(item.distance)"
placement=
"top-start"
>
<span
class=
"f12"
>
{{
item
.
distance
}}
</span>
</el-tooltip>
</div>
</div>
</div>
<div
class=
"task-add-btn"
>
<div
class=
"task-add__btn"
>
生成航线
</div>
<div
class=
"task-add__btn"
>
一键任务
</div>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
export
default
{
name
:
'leapFrogDialog'
,
props
:
{
title
:
{
type
:
String
,
default
:
''
},
showClose
:
{
type
:
Boolean
,
default
:
true
},
visible
:
{
type
:
Boolean
,
default
:
false
},
width
:
{
type
:
String
,
default
:
'30%'
}
},
data
()
{
return
{
loading
:
false
,
taskListAll
:
[{
active
:
true
,
name
:
"机库1"
,
type
:
"空闲"
,
distance
:
10
},
{
active
:
true
,
name
:
"机库2"
,
type
:
"忙碌"
,
distance
:
12
}],
localVisible
:
this
.
visible
// 根据 prop 初始化本地状态
};
},
watch
:
{
visible
(
newVal
)
{
this
.
localVisible
=
newVal
;
// 监听 prop 的变化
}
},
methods
:
{
handleClose
()
{
this
.
localVisible
=
false
;
this
.
$emit
(
'update:visible'
,
false
);
// 通知父组件
},
confirm
()
{
this
.
$emit
(
'confirm'
);
this
.
handleClose
();
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
{
.el-dialog__header
{
padding
:
5px
;
}
.el-dialog__headerbtn
{
top
:
12px
;
}
.el-dialog__footer
{
text-align
:
center
;
}
}
.dialog-header
{
.title
{
font-size
:
20px
;
font-family
:
YouSheBiaoTiHei
;
color
:
#14faff
;
line-height
:
26px
;
text-shadow
:
0px
1px
1px
rgba
(
2
,
32
,
56
,
0.2
);
background
:
linear-gradient
(
135deg
,
#e3aa77
0%
,
#f5cda9
38%
,
#f9ecd3
58%
,
#fcdbb1
79%
,
#edb07a
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
}
.dialog-footer
{
.btn
{
color
:
#fff
;
background-color
:
#222222
;
}
}
.stl-timed-task
{
height
:
230px
;
display
:
flex
;
flex-direction
:
column
;
padding
:
16px
4px
;
gap
:
0px
;
box-sizing
:
border-box
;
position
:
relative
;
&::before
{
position
:
absolute
;
content
:
""
;
width
:
calc
(
100%
-
5px
);
height
:
calc
(
100%
-
24px
);
border-radius
:
4px
;
border
:
1px
solid
#4b4b4b
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
.timed-task-header
{
display
:
flex
;
flex-shrink
:
0
;
font-size
:
14px
;
height
:
42px
;
background
:
#343434
;
font-family
:
YouSheBiaoTiHei
;
font-size
:
16px
;
color
:
#ebf9ff
;
.header__column
{
flex
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
&.flex2
{
flex
:
2
;
}
&
.status
{
flex
:
initial
;
width
:
70px
;
}
}
}
.timed-task-main
{
color
:
#fff
;
overflow-y
:
auto
;
flex
:
1
;
z-index
:
1
;
.row
{
display
:
flex
;
color
:
#fff
;
min-height
:
52px
;
background-color
:
#222222
;
align-items
:
center
;
gap
:
3px
;
&.single
{
background-color
:
#343434
;
}
.row__column
{
font-size
:
14px
;
flex
:
1
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
.text-red
{
color
:
red
}
.text-green
{
color
:
green
;
}
&
.col-2
{
text-overflow
:
initial
;
font-size
:
14px
;
}
&
.flex2
{
flex
:
2
;
}
&
.ctrl
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
gap
:
5px
;
i
{
cursor
:
pointer
;
font-size
:
20px
;
&.loading
{
opacity
:
0.5
;
}
}
}
&
.status
{
flex
:
initial
;
width
:
70px
;
font-size
:
14px
;
}
}
}
}
.task-add-btn
{
display
:
flex
;
z-index
:
1
;
.task-add__btn
{
cursor
:
pointer
;
width
:
100px
;
height
:
28px
;
background
:
#3388ff
;
border-radius
:
2px
;
text-align
:
center
;
line-height
:
28px
;
margin
:
0
auto
;
margin-bottom
:
10px
;
color
:
#fff
;
}
}
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/leapFrogFligh/components/leapFrogFlighDialog/index.vue
0 → 100644
浏览文件 @
fd265343
<
template
>
<el-dialog
:modal=
'modal'
:visible
.
sync=
"localVisible"
:close-on-click-modal=
"false"
:modal-append-to-body=
"false"
:show-close=
"showClose"
@
close=
"handleClose"
:width=
"width"
>
<div
slot=
"title"
class=
"dialog-header"
>
<div
v-if=
"dialogType == 1"
>
<img
src=
"../../../../../../assets/images/mount_head.png"
/>
<span
class=
"title vas"
>
{{
title
}}
</span>
</div>
<span
v-else
class=
"dialog-header"
>
<div
class=
"cf tc vas"
>
{{
title
}}
</div>
</span>
</div>
<div>
<slot></slot>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"btn"
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
>
确定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
export
default
{
name
:
'LeapFrogFlighDialog'
,
props
:
{
modal
:
{
type
:
Boolean
,
default
:
true
},
title
:
{
type
:
String
,
default
:
''
},
dialogType
:
{
type
:
Number
,
default
:
1
},
showClose
:
{
type
:
Boolean
,
default
:
true
},
visible
:
{
type
:
Boolean
,
default
:
false
},
width
:
{
type
:
String
,
default
:
'30%'
}
},
data
()
{
return
{
localVisible
:
this
.
visible
// 根据 prop 初始化本地状态
};
},
watch
:
{
visible
(
newVal
)
{
this
.
localVisible
=
newVal
;
// 监听 prop 的变化
}
},
methods
:
{
handleClose
()
{
this
.
localVisible
=
false
;
this
.
$emit
(
'update:visible'
,
false
);
// 通知父组件
},
confirm
()
{
this
.
$emit
(
'confirm'
);
this
.
handleClose
();
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
{
.el-dialog__header
{
padding
:
5px
;
}
.el-dialog__headerbtn
{
top
:
12px
;
}
.el-dialog__footer
{
text-align
:
center
;
}
}
.dialog-header
{
.title
{
font-size
:
20px
;
font-family
:
YouSheBiaoTiHei
;
color
:
#14faff
;
line-height
:
26px
;
text-shadow
:
0px
1px
1px
rgba
(
2
,
32
,
56
,
0.2
);
background
:
linear-gradient
(
135deg
,
#e3aa77
0%
,
#f5cda9
38%
,
#f9ecd3
58%
,
#fcdbb1
79%
,
#edb07a
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
}
.dialog-footer
{
.btn
{
color
:
#fff
;
background-color
:
#222222
;
}
}
</
style
>
\ No newline at end of file
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/leapFrogFligh/index.vue
0 → 100644
浏览文件 @
fd265343
<
template
>
<div
class=
"stl-timed-task"
>
<div
class=
"timed-task-header"
>
<div
class=
"header__column flex2"
>
序号
</div>
<div
class=
"header__column flex2"
>
机库名称
</div>
<div
class=
"header__column status"
>
状态
</div>
<div
class=
"header__column flex2"
>
距离(km)
</div>
</div>
<div
class=
"timed-task-main"
v-loading=
"loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<div
class=
"row"
:class=
"
{ single: i % 2 != 0 }" v-for="(item, i) in skipList" :key="i">
<div
class=
"row__column flex2"
>
<span
class=
"f12"
>
<span
class=
"mr10"
>
<el-checkbox
@
change=
"changeFn(item)"
v-model=
"item.active"
:label=
"item.i"
:disabled=
"!item.masterStatus"
></el-checkbox>
</span>
{{
i
+
1
}}
</span>
</div>
<div
class=
"row__column flex2"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.name"
placement=
"top-start"
>
<span
class=
"f12"
>
{{
item
.
name
}}
</span>
</el-tooltip>
</div>
<div
class=
"row__column flex2"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top-start"
>
<span
class=
"f12"
:class=
"
{
'text-red': !item.masterStatus,
'text-green': item.masterStatus,
}">
{{
item
.
masterStatus
?
"空闲"
:
"忙碌"
}}
</span>
</el-tooltip>
</div>
<div
class=
"row__column status"
style=
"color: rgb(255, 189, 54)"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"String(item.targetDistance)"
placement=
"top-start"
>
<span
class=
"f12"
>
{{
item
.
targetDistance
}}
</span>
</el-tooltip>
</div>
</div>
</div>
<div
class=
"task-add-btn"
v-if=
"skipList.length > 0"
>
<div
class=
"task-add__btn"
@
click=
"creareLine"
>
生成航线
</div>
<div
class=
"task-add__btn"
@
click=
"oneClickTask"
>
一键任务
</div>
</div>
<div
class=
"overlay"
v-if=
"dialogVisible"
v-interact
>
<div
class=
"dialog-header"
>
<div>
<img
src=
"../../../../assets/images/mount_head.png"
/>
<span
class=
"title vas"
>
航线信息
</span>
</div>
<span
class=
"cp w40 h40 cf pt15"
@
click=
"handleClose"
>
X
</span>
</div>
<div
class=
"p10"
>
<div
class=
"stl-timed-task-ht wih100 f12 ml13 stl-timed-task-jk"
>
<div
class=
"wih100 tr"
>
<div
class=
"dib"
>
{{
uav
.
uav
&&
uav
.
uav
.
name
}}
---
{{
activeItem
.
name
}}
</div>
<span
style=
"color: #3388ff"
class=
"ml56 cp pr130"
@
click=
"showLine"
>
预览
</span>
</div>
</div>
<div
class=
"stl-timed-task-ht mt16 cf"
>
<div
class=
"lh34 f12"
>
飞行高度设置:
</div>
<div
class=
"bg"
>
<el-input
@
blur=
"isEditing.height = false"
size=
"mini"
v-if=
"isEditing.height"
v-model=
"flightHeight"
type=
"number"
/>
<span
v-else
class=
"indent"
>
{{
flightHeight
}}
m
</span>
</div>
<div
class=
"text ml10 cp lh34"
@
click=
"toggleEdit('height')"
>
编辑
</div>
</div>
<div
class=
"stl-timed-task-ht mt16"
>
<div
class=
"lh34 f12"
>
飞行速度设置:
</div>
<div
class=
"bg"
>
<el-input
@
blur=
"isEditing.speed = false"
size=
"mini"
v-if=
"isEditing.speed"
v-model=
"flightSpeed"
type=
"number"
/>
<span
class=
"indent"
v-else
>
{{
flightSpeed
}}
m/s
</span>
</div>
<div
class=
"text ml10 cp lh34"
@
click=
"toggleEdit('speed')"
>
编辑
</div>
</div>
<div
class=
"mt16"
>
飞行总距离:
{{
activeItem
.
targetDistance
}}
公里
</div>
</div>
<div
class=
"tc mt50"
>
<el-button
size=
"mini"
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleConfirm"
>
确定
</el-button>
</div>
</div>
<!--
<leapFrogFlighDialog
:showClose=
"false"
:dialogType=
"2"
width=
"420px"
title=
"低电量预警"
:visible
.
sync=
"dialogVisible"
@
confirm=
"handleConfirm"
>
<p
class=
"tc"
>
警告;低电量!!后续后续航程无法完成,当前未找到 合适机场充电,请确认是否进行返航!!
</p>
<div
class=
"tc mt20"
>
<span>
30s
</span><span
class=
"cred ml15"
>
强制返航
</span>
</div>
</leapFrogFlighDialog>
<leapFrogFlighDialog
:showClose=
"false"
:dialogType=
"2"
width=
"420px"
title=
"低电量预警"
:visible
.
sync=
"dialogVisible"
@
confirm=
"handleConfirm"
>
<p
class=
"tc"
>
警告;低电量!!当前已有合适机场充电,请确认
是否进行返航!!
</p>
<div
class=
"tc mt20"
>
<span>
30s
</span><span
class=
"cred ml15"
>
前往>>
</span>
</div>
</leapFrogFlighDialog>
-->
<leapFrogDialog
title=
"蛙跳飞行"
:visible
.
sync=
"leapFrogDialogVisible"
@
confirm=
"handleConfirm"
></leapFrogDialog>
</div>
</
template
>
<
script
>
import
{
mapState
,
mapActions
}
from
"vuex"
;
import
leapFrogFlighDialog
from
"./components/leapFrogFlighDialog"
;
import
leapFrogDialog
from
"./components/leapFrogDialog"
;
let
EntityList
=
[];
export
default
{
name
:
"hangarTimedTask"
,
components
:
{
leapFrogFlighDialog
,
leapFrogDialog
,
},
inject
:
[
"rootNode"
,
"bus"
],
props
:
{
type
:
{
type
:
Number
,
default
:
1
,
},
},
data
()
{
return
{
dialogVisible
:
false
,
// 当前选中要跳转的机
activeItem
:
{
},
descCodeList
:
{
0
:
'ok!'
,
4401
:
'降落点位置未设置!'
,
4402
:
'目标机库有无人机在舱内!'
,
4403
:
'主跳转机库无人机不在舱内!'
,
4404
:
'当前正在执行流程,非可跳跃状态!'
,
4405
:
'天气不宜飞行!'
,
4406
:
'电量不足已飞至目标机库!'
},
apronInfo
:
{
// chargeRemaining: 0,
// computeDistance: 0,
// descCode: 0,
// descText: "",
// deviceId: "",
// height: 0,
// latitude: 22.709333137094063,
// longitude: 113.90762329101564,
// masterStatus: true,
// slaveStatus: true,
// targetDistance: 0,
// uavDeviceId: "",
// name: "当前鹰巢11"
},
leapFrogDialogVisible
:
false
,
dialogVisible
:
false
,
selectedItems
:
[],
// 选中的项目
loading
:
false
,
skipList
:
[
// {
// active: false,
// name: "鹰巢1",
// chargeRemaining: 0,
// computeDistance: 0,
// descCode: 0,
// descText: "",
// deviceId: "LMMC3X2KUAV202311063",
// height: 120,
// latitude: 22.545458392873208,
// longitude: 113.88856887817384,
// masterStatus: true,
// slaveStatus: true,
// targetDistance: 123,
// uavDeviceId: "LMMC3X2KUAV202501112",
// },
// {
// active: false,
// name: "鹰巢2",
// chargeRemaining: 0,
// computeDistance: 0,
// descCode: 0,
// descText: "",
// deviceId: "LMMC3X2KUAV20231106311",
// height: 120,
// latitude: 23.4551254223,
// longitude: 120.2155112,
// masterStatus: false,
// slaveStatus: true,
// targetDistance: 123,
// uavDeviceId: "LMMC3X2KUAV202501112",
// },
],
flightHeight
:
100
,
flightSpeed
:
5
,
isEditing
:
{
height
:
false
,
speed
:
false
,
},
intervalId
:
null
,
};
},
watch
:
{
'uavRealTimeData.isFlying'
:
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
oldVal
===
false
&&
newVal
===
true
)
{
console
.
log
(
"飞行状态"
);
}
},
deep
:
true
,
immediate
:
true
,
},
},
computed
:
{
...
mapState
(
"MMCFlightControlCenter"
,
[
"uav"
,
"uavRealTimeData"
,
"airwayEntities"
]),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangarRealTimeData"
,
"hangar"
,
"taskList"
,
]),
// 选中的任务的飞行计划
selectTaskFlightPlan
()
{
return
[];
},
},
methods
:
{
isTakeOverHangar
()
{
return
this
.
$store
.
dispatch
(
"MMCFlightControlCenter/hangar/isTakeOver"
);
},
async
oneClickTask
()
{
if
(
!
(
await
this
.
isTakeOverHangar
()))
{
this
.
$message
.
warning
(
"请先接管设备"
);
return
;
}
// 执行前先校验主机库状态 0 未正常
if
(
this
.
apronInfo
&&
this
.
apronInfo
.
descCode
!=
0
)
{
let
{
descCode
}
=
this
.
apronInfo
return
this
.
$message
.
warning
(
this
.
descCodeList
[
descCode
]);
}
// 选择了调点再执行
let
data
=
this
.
skipList
.
filter
((
item
)
=>
item
.
active
);
if
(
data
.
length
>
0
)
{
this
.
activeItem
=
data
[
0
];
}
if
(
!
this
.
activeItem
.
deviceId
)
return
this
.
$message
.
warning
(
"请选择跳点"
);
let
{
flightSpeed
,
flightHeight
}
=
this
;
let
{
sn
}
=
this
.
uav
.
uav
;
this
.
rootNode
.
$emit
(
"apronUavSkipEvent"
,
{
// 主机库设备序列号
masterDeviceId
:
sn
,
// 从机库设备序列号
slaveDeviceId
:
this
.
activeItem
.
deviceId
,
altitude
:
flightHeight
,
speed
:
flightSpeed
,
callback
:
(
res
)
=>
{
resolve
();
},
});
},
// 改变飞行日志弹框状态
changeflyLogStatus
(
falg
)
{
this
.
$store
.
commit
(
"MMCFlightControlCenter/setState"
,
{
key
:
"flyLogStatus"
,
value
:
falg
,
});
},
showLine
()
{
let
{
height
,
latitude
,
longitude
,
name
}
=
this
.
activeItem
;
let
apronPosition
=
Cesium
.
Cartesian3
.
fromDegrees
(
this
.
apronInfo
.
longitude
,
this
.
apronInfo
.
latitude
,
this
.
apronInfo
.
height
)
// 创建一个带有图片的实体
const
apronEntity
=
window
.
$mmc_stl
.
viewer
.
entities
.
add
({
position
:
apronPosition
,
// 设置图片的位置(经纬度和高度)
label
:
{
text
:
this
.
apronInfo
.
name
,
font
:
'14pt monospace'
,
style
:
Cesium
.
LabelStyle
.
FILL_AND_OUTLINE
,
outlineWidth
:
2
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
pixelOffset
:
new
Cesium
.
Cartesian3
(
0.0
,
32
,
0.0
),
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
0.0
,
5000
),
disableDepthTestDistance
:
Number
.
POSITIVE_INFINITY
,
zIndex
:
5000
},
billboard
:
{
image
:
require
(
"../../assets/images/无人机库.png"
),
// 图片资源路径
width
:
50
,
// 图片宽度(可选,单位为像素)
height
:
60
,
// 图片高度(可选,单位为像素)
eyeOffset
:
new
Cesium
.
Cartesian3
(
0
,
0
,
-
10
),
// 图片与位置坐标的偏移量(可选)
scale
:
1
,
// 图片缩放比例(可选)
}
});
EntityList
.
push
(
apronEntity
);
let
imageEntityPosition
=
Cesium
.
Cartesian3
.
fromDegrees
(
longitude
,
latitude
,
height
)
// 创建一个带有图片的实体
const
imageEntity
=
window
.
$mmc_stl
.
viewer
.
entities
.
add
({
position
:
imageEntityPosition
,
// 设置图片的位置(经纬度和高度)
label
:
{
text
:
name
,
font
:
'14pt monospace'
,
style
:
Cesium
.
LabelStyle
.
FILL_AND_OUTLINE
,
outlineWidth
:
2
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
pixelOffset
:
new
Cesium
.
Cartesian3
(
0.0
,
32
,
0.0
),
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
0.0
,
10000
),
disableDepthTestDistance
:
Number
.
POSITIVE_INFINITY
,
zIndex
:
5000
},
polyline
:
new
Cesium
.
PolylineGraphics
({
positions
:
[
apronPosition
,
imageEntityPosition
],
width
:
4
,
material
:
Cesium
.
Color
.
RED
,
clampToGround
:
true
,
zIndex
:
5000
,
}),
billboard
:
{
image
:
require
(
"../../assets/images/无人机库.png"
),
// 图片资源路径
width
:
50
,
// 图片宽度(可选,单位为像素)
height
:
60
,
// 图片高度(可选,单位为像素)
eyeOffset
:
new
Cesium
.
Cartesian3
(
0
,
0
,
-
10
),
// 图片与位置坐标的偏移量(可选)
scale
:
1
,
// 图片缩放比例(可选)
}
});
EntityList
.
push
(
imageEntity
);
const
polyCenter
=
Cesium
.
BoundingSphere
.
fromPoints
([
apronPosition
,
imageEntityPosition
]).
center
;
console
.
log
(
"PolyCenter:"
,
polyCenter
);
// 调试信息
let
entityLabel
=
window
.
$mmc_stl
.
viewer
.
entities
.
add
({
position
:
polyCenter
,
label
:
{
text
:
this
.
activeItem
.
targetDistance
+
'km'
,
font
:
'14pt monospace'
,
style
:
Cesium
.
LabelStyle
.
FILL_AND_OUTLINE
,
outlineWidth
:
4
,
eyeOffset
:
new
Cesium
.
Cartesian3
(
0.0
,
0.0
,
-
10
),
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
0
)
},
});
EntityList
.
push
(
entityLabel
);
// 飞入到该实体位置
window
.
$mmc_stl
.
viewer
.
camera
.
flyTo
({
destination
:
Cesium
.
Cartesian3
.
fromDegrees
(
longitude
,
latitude
,
20000
),
// 设置相机目标位置
duration
:
2
// 飞行动画持续时间(秒)
});
},
changeFn
(
item
)
{
this
.
skipList
.
forEach
((
data
)
=>
{
if
(
data
.
deviceId
!=
item
.
deviceId
)
{
data
.
active
=
false
;
}
});
},
getTaskList
(
deviceId
)
{
return
new
Promise
((
resolve
)
=>
{
this
.
rootNode
.
$emit
(
"leapFrogFlighGet"
,
{
deviceId
,
callback
:
(
res
)
=>
{
if
(
res
.
skipList
)
{
this
.
skipList
=
res
.
skipList
.
map
((
item
)
=>
{
return
{
...
item
,
active
:
activeItem
.
deviceId
==
item
.
deviceId
,
};
});
}
if
(
res
.
apronInfo
)
{
this
.
apronInfo
=
res
.
apronInfo
;
}
this
.
$nextTick
(()
=>
{
resolve
();
});
},
});
});
},
toggleEdit
(
type
)
{
this
.
isEditing
[
type
]
=
!
this
.
isEditing
[
type
];
},
async
creareLine
()
{
if
(
!
(
await
this
.
isTakeOverHangar
()))
{
this
.
$message
.
warning
(
"请先接管设备"
);
return
;
}
let
data
=
this
.
skipList
.
filter
((
item
)
=>
item
.
active
);
if
(
data
.
length
>
0
)
{
this
.
activeItem
=
data
[
0
];
this
.
changeflyLogStatus
(
true
)
this
.
dialogVisible
=
true
;
}
else
{
this
.
$message
.
warning
(
"请选择跳点"
);
}
},
handleConfirm
()
{
this
.
clearEntity
()
this
.
dialogVisible
=
false
;
},
handleClose
()
{
this
.
dialogVisible
=
false
;
this
.
flightHeight
=
100
this
.
flightSpeed
=
5
this
.
clearEntity
()
},
clearEntity
()
{
if
(
EntityList
.
length
>
0
)
{
EntityList
.
forEach
((
item
)
=>
{
window
.
$mmc_stl
.
viewer
.
entities
.
remove
(
item
);
});
}
}
},
created
()
{
let
{
deviceId
}
=
this
.
uav
.
uav
;
this
.
intervalId
=
setInterval
(()
=>
{
this
.
getTaskList
(
deviceId
);
},
3000
);
},
beforeDestroy
()
{
clearInterval
(
this
.
intervalId
);
// 清除定时器
this
.
clearEntity
()
},
};
</
script
>
<
style
lang=
"scss"
>
.stl-timed-task
{
height
:
230px
;
display
:
flex
;
flex-direction
:
column
;
padding
:
16px
4px
;
gap
:
0px
;
box-sizing
:
border-box
;
position
:
relative
;
.overlay
{
position
:
fixed
;
top
:
20%
;
left
:
50%
;
width
:
526px
;
height
:
300px
;
color
:
#fff
;
background-color
:
#222222
;
transform
:
translate
(
-50%
,
-20%
);
.dialog-header
{
background
:
#3c3c3c
;
text-indent
:
1rem
;
height
:
40px
;
display
:
flex
;
justify-content
:
space-between
;
.title
{
font-size
:
20px
;
font-family
:
YouSheBiaoTiHei
;
color
:
#14faff
;
line-height
:
40px
;
text-shadow
:
0px
1px
1px
rgba
(
2
,
32
,
56
,
0.2
);
background
:
linear-gradient
(
135deg
,
#e3aa77
0%
,
#f5cda9
38%
,
#f9ecd3
58%
,
#fcdbb1
79%
,
#edb07a
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
}
}
.timed-task-header
{
display
:
flex
;
flex-shrink
:
0
;
font-size
:
14px
;
height
:
42px
;
background
:
#343434
;
font-family
:
YouSheBiaoTiHei
;
font-size
:
16px
;
color
:
#ebf9ff
;
.header__column
{
flex
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
&.flex2
{
flex
:
2
;
}
&
.status
{
flex
:
initial
;
width
:
70px
;
}
}
}
.timed-task-main
{
color
:
#fff
;
overflow-y
:
auto
;
flex
:
1
;
z-index
:
1
;
.row
{
display
:
flex
;
color
:
#fff
;
min-height
:
52px
;
background-color
:
#222222
;
align-items
:
center
;
gap
:
3px
;
&.single
{
background-color
:
#343434
;
}
.row__column
{
font-size
:
14px
;
flex
:
1
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
.text-red
{
color
:
red
;
}
.text-green
{
color
:
green
;
}
&
.col-2
{
text-overflow
:
initial
;
font-size
:
14px
;
}
&
.flex2
{
flex
:
2
;
}
&
.ctrl
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
gap
:
5px
;
i
{
cursor
:
pointer
;
font-size
:
20px
;
&.loading
{
opacity
:
0.5
;
}
}
}
&
.status
{
flex
:
initial
;
width
:
70px
;
font-size
:
14px
;
}
}
}
}
.task-add-btn
{
display
:
flex
;
z-index
:
1
;
.task-add__btn
{
cursor
:
pointer
;
width
:
100px
;
height
:
28px
;
background
:
#3388ff
;
border-radius
:
2px
;
text-align
:
center
;
line-height
:
28px
;
margin
:
0
auto
;
margin-bottom
:
10px
;
color
:
#fff
;
}
}
}
.cred
{
color
:
#f42e2e
;
}
.stl-timed-task-jk
{
overflow-x
:
auto
;
overflow-y
:
hidden
;
}
.stl-timed-task-ht
{
display
:
flex
;
color
:
"#fff"
;
.bg
{
background
:
#191919
;
width
:
364px
;
height
:
28px
;
line-height
:
28px
;
color
:
#86909c
;
.indent
{
text-indent
:
1rem
;
border
:
1px
solid
#4b4b4b
;
border-radius
:
5px
;
width
:
100%
;
display
:
inline-block
;
}
}
.text
{
font-family
:
SourceHanSansCN
,
SourceHanSansCN
;
font-weight
:
400
;
font-size
:
12px
;
color
:
#3388ff
;
text-align
:
center
;
font-style
:
normal
;
}
}
</
style
>
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/normalTask/index.vue
浏览文件 @
fd265343
...
...
@@ -172,7 +172,6 @@ export default {
*/
getTaskList
(
id
)
{
return
new
Promise
((
resolve
)
=>
{
console
.
log
(
"getTaskList"
,
this
.
taskListAll
);
this
.
rootNode
.
$emit
(
"taskListGet"
,
{
pageNo
:
1
,
pageSize
:
100
,
...
...
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/index.vue
浏览文件 @
fd265343
...
...
@@ -15,13 +15,18 @@
<div
class=
"task-list-header__item"
:class=
"
{active: tabIndex === 2}" @click="tabIndex = 2">
<label>
周期飞行
</label>
</div>
<div
class=
"task-list-header__item"
:class=
"
{active: tabIndex ===3}" @click="tabIndex = 3">
<label>
蛙跳飞行
</label>
</div>
</
template
>
</div>
<div
class=
"task-list-main"
>
<!-- 常态任务 -->
<NormalTask
v-if=
"tabIndex === 0"
></NormalTask>
<!-- 定时任务 --><!-- 周期任务 -->
<TimedTask
v-else
:type=
"tabIndex"
></TimedTask>
<TimedTask
v-else-if=
"tabIndex === 1 || tabIndex === 2 "
:type=
"tabIndex"
></TimedTask>
<!-- 蛙跳飞行 -->
<leapFrogFligh
v-else
></leapFrogFligh>
</div>
</div>
</template>
...
...
@@ -29,6 +34,8 @@
<
script
>
import
NormalTask
from
"./components/normalTask"
;
import
TimedTask
from
"./components/timedTask"
;
import
leapFrogFligh
from
"./components/leapFrogFligh"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
...
...
@@ -36,6 +43,7 @@ export default {
components
:
{
NormalTask
,
TimedTask
,
leapFrogFligh
},
data
()
{
return
{
...
...
src/components/MMCFlightControlCenter/index.vue
浏览文件 @
fd265343
...
...
@@ -257,6 +257,7 @@ export default {
const
content
=
JSON
.
parse
(
data
.
content
||
"{}"
);
const
msg
=
content
.
message
;
switch
(
type
)
{
// 接管申请
case
"uas-device-take-message"
:
//接管消息
...
...
@@ -344,6 +345,9 @@ export default {
const
content
=
JSON
.
parse
(
data
.
content
||
"{}"
);
const
msg
=
content
.
message
;
switch
(
type
)
{
case
"uas-device-take-message"
:
console
.
log
(
msg
,
'msg'
);
break
;
// 刷新无人机列表
case
"uas-device-getTree-message"
:
this
.
bus
.
$emit
(
"uas-device-getTree-message"
,
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论