Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
0673a9bb
提交
0673a9bb
authored
12月 28, 2024
作者:
温凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:航线详情-预计时长未统计出来
上级
fb992f45
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
52 行增加
和
0 行删除
+52
-0
index.vue
...ist/components/normalTask/components/airwayEdit/index.vue
+26
-0
index.vue
...eft/components/airwayList/components/airwayEdit/index.vue
+26
-0
没有找到文件。
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/components/controlLeft/components/airwayList/components/normalTask/components/airwayEdit/index.vue
浏览文件 @
0673a9bb
...
...
@@ -247,6 +247,30 @@ export default {
}
this
.
orgList
=
tree
;
},
convertToSeconds
(
timeString
)
{
const
regex
=
/
(\d
+
)\s
*
(
小时|分钟|秒
)
/g
;
let
totalSeconds
=
0
;
let
match
;
while
((
match
=
regex
.
exec
(
timeString
))
!==
null
)
{
const
value
=
parseInt
(
match
[
1
],
10
);
const
unit
=
match
[
2
];
switch
(
unit
)
{
case
'小时'
:
totalSeconds
+=
value
*
3600
;
// 1小时 = 3600秒
break
;
case
'分钟'
:
totalSeconds
+=
value
*
60
;
// 1分钟 = 60秒
break
;
case
'秒'
:
totalSeconds
+=
value
;
// 直接加秒
break
;
}
}
return
totalSeconds
;
},
changeNode
()
{
this
.
$refs
.
CascaderRef
.
dropDownVisible
=
false
;
},
...
...
@@ -304,6 +328,7 @@ export default {
departmentId
:
this
.
departmentId
,
name
:
this
.
name
,
speed
:
this
.
form
[
0
].
speed
,
flyTime
:
this
.
convertToSeconds
(
this
.
time
)
};
try
{
let
res
=
await
AirLine
.
add
({
...
...
@@ -312,6 +337,7 @@ export default {
distance
:
airway
.
distance
,
departmentId
:
airway
.
departmentId
,
sourceType
:
1
,
flyTime
:
airway
.
flyTime
,
linePointSaveReqVOS
:
airway
.
content
.
map
((
point
)
=>
({
latitude
:
point
.
coordinate
.
latitude
,
longitude
:
point
.
coordinate
.
longitude
,
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlLeft/components/airwayList/components/airwayEdit/index.vue
浏览文件 @
0673a9bb
...
...
@@ -272,6 +272,30 @@ export default {
}
this
.
orgList
=
tree
;
},
convertToSeconds
(
timeString
)
{
const
regex
=
/
(\d
+
)\s
*
(
小时|分钟|秒
)
/g
;
let
totalSeconds
=
0
;
let
match
;
while
((
match
=
regex
.
exec
(
timeString
))
!==
null
)
{
const
value
=
parseInt
(
match
[
1
],
10
);
const
unit
=
match
[
2
];
switch
(
unit
)
{
case
'小时'
:
totalSeconds
+=
value
*
3600
;
// 1小时 = 3600秒
break
;
case
'分钟'
:
totalSeconds
+=
value
*
60
;
// 1分钟 = 60秒
break
;
case
'秒'
:
totalSeconds
+=
value
;
// 直接加秒
break
;
}
}
return
totalSeconds
;
},
async
getLabel
()
{
this
.
rootNode
.
$emit
(
"getLabelList"
,
{
callback
:
(
data
)
=>
{
...
...
@@ -336,6 +360,7 @@ export default {
departmentId
:
this
.
departmentId
,
//部门id
name
:
this
.
name
,
speed
:
this
.
form
[
0
].
speed
,
flyTime
:
this
.
convertToSeconds
(
this
.
time
)
};
try
{
let
res
=
await
AirLine
.
add
({
...
...
@@ -344,6 +369,7 @@ export default {
distance
:
airway
.
distance
,
departmentId
:
airway
.
departmentId
,
sourceType
:
1
,
flyTime
:
airway
.
flyTime
,
linePointSaveReqVOS
:
airway
.
content
.
map
((
point
)
=>
({
latitude
:
point
.
coordinate
.
latitude
,
longitude
:
point
.
coordinate
.
longitude
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论