Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
42f28eac
提交
42f28eac
authored
10月 24, 2024
作者:
翁进城
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v4' into v4_master
上级
e7cd4c48
6f91a518
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
110 行增加
和
55 行删除
+110
-55
index.js
src/components/MMCFlightControlCenter/api/index.js
+3
-2
system.js
src/components/MMCFlightControlCenter/api/modules/system.js
+16
-0
index.vue
...enter/components/hangar/components/controlPanel/index.vue
+1
-1
index.vue
...onents/MMCFlightControlCenter/components/hangar/index.vue
+1
-1
index.vue
...MCFlightControlCenter/components/mapImageSwitch/index.vue
+24
-41
index.vue
...s/components/controlPanel/components/controlTop/index.vue
+58
-8
index.vue
...CFlightControlCenter/components/uavApplications/index.vue
+1
-1
uav.js
src/components/MMCFlightControlCenter/store/uav.js
+6
-1
没有找到文件。
src/components/MMCFlightControlCenter/api/index.js
浏览文件 @
42f28eac
...
@@ -3,4 +3,5 @@ export { default as AirLine } from './modules/airLine';
...
@@ -3,4 +3,5 @@ export { default as AirLine } from './modules/airLine';
export
{
default
as
Map
}
from
'./modules/map'
;
export
{
default
as
Map
}
from
'./modules/map'
;
export
{
default
as
AI_API
}
from
'./modules/ai'
;
export
{
default
as
AI_API
}
from
'./modules/ai'
;
export
{
default
as
ViewLibrary
}
from
'./modules/viewLibrary'
;
export
{
default
as
ViewLibrary
}
from
'./modules/viewLibrary'
;
export
{
default
as
TaskInfo
}
from
'./modules/taskInfo'
;
export
{
default
as
TaskInfo
}
from
'./modules/taskInfo'
;
\ No newline at end of file
export
{
default
as
System
}
from
'./modules/system'
;
\ No newline at end of file
src/components/MMCFlightControlCenter/api/modules/system.js
0 → 100644
浏览文件 @
42f28eac
import
request
from
"../request"
;
export
default
class
System
{
/**
* 获取天气数据
* @param {*} data
* @returns
*/
static
getCoordinatesWeather
(
params
)
{
return
request
({
url
:
'/admin-api/system/weather/getCoordinatesWeather'
,
method
:
"get"
,
params
});
}
}
src/components/MMCFlightControlCenter/components/hangar/components/controlPanel/index.vue
浏览文件 @
42f28eac
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<ControlBottom
isHangar
></ControlBottom>
<ControlBottom
isHangar
></ControlBottom>
<ControlRight></ControlRight>
<ControlRight></ControlRight>
<!-- 顶部信息 -->
<!-- 顶部信息 -->
<ControlTop></ControlTop>
<ControlTop
isHangar
></ControlTop>
</div>
</div>
</
template
>
</
template
>
...
...
src/components/MMCFlightControlCenter/components/hangar/index.vue
浏览文件 @
42f28eac
...
@@ -30,7 +30,7 @@ export default {
...
@@ -30,7 +30,7 @@ export default {
'uavRealTimeData.isFlying'
(
newVal
,
oldVal
){
'uavRealTimeData.isFlying'
(
newVal
,
oldVal
){
// 监听飞机降落然后进行任务结束的提示
// 监听飞机降落然后进行任务结束的提示
if
(
oldVal
===
true
&&
newVal
===
false
){
if
(
oldVal
===
true
&&
newVal
===
false
){
this
.
$alert
(
'
任务
结束'
,
'提示'
,
{
this
.
$alert
(
'
当前任务已
结束'
,
'提示'
,
{
type
:
'success '
,
type
:
'success '
,
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
callback
:
action
=>
{
...
...
src/components/MMCFlightControlCenter/components/mapImageSwitch/index.vue
浏览文件 @
42f28eac
<!-- 飞控地图选择 -->
<!-- 飞控地图选择 -->
<
template
>
<
template
>
<div
class=
"cpt-hwkeys"
>
<div
class=
"map-switch"
>
<div
class=
"hwkeys-wrap cp"
@
click=
"change"
@
mouseout=
"likai"
>
<div
class=
"map-switch-wrap cp"
@
click=
"change"
@
mouseout=
"likai"
>
<div
<div
class=
"map-item map-item-satellite"
></div>
:class=
"
{
'hwkeys-item': 1,
'hwkeys-item-satellite': 1,
}"
v-for="item in tabs"
:key="item.id"
v-show="item.id == current"
@click="handle_change(item.id)"
>
<!--
<div
class=
"typeNmae"
>
{{
item
.
name
}}
</div>
-->
</div>
</div>
</div>
<div
class=
"changeMapBox pa cp"
>
<div
class=
"changeMapBox pa cp"
>
...
@@ -34,7 +23,7 @@
...
@@ -34,7 +23,7 @@
<div
v-for=
"item in tabs"
:key=
"item.id"
class=
"dise"
@
mousemove=
"jinru(item.id)"
>
<div
v-for=
"item in tabs"
:key=
"item.id"
class=
"dise"
@
mousemove=
"jinru(item.id)"
>
<div
<div
:class=
"
{
:class=
"
{
'
hwkeys
-item': 1,
'
map
-item': 1,
[item.class_name]: 1,
[item.class_name]: 1,
}"
}"
@click="handle_change(item.id)"
@click="handle_change(item.id)"
...
@@ -61,22 +50,22 @@ export default {
...
@@ -61,22 +50,22 @@ export default {
{
{
id
:
1
,
id
:
1
,
name
:
"卫星"
,
name
:
"卫星"
,
class_name
:
"
hwkeys
-item-satellite"
,
class_name
:
"
map
-item-satellite"
,
},
},
{
{
id
:
4
,
id
:
4
,
name
:
"星图"
,
name
:
"星图"
,
class_name
:
"
hwkeys
-item-satellite"
,
class_name
:
"
map
-item-satellite"
,
},
},
{
{
id
:
2
,
id
:
2
,
name
:
"街道"
,
name
:
"街道"
,
class_name
:
"
hwkeys
-item-street"
,
class_name
:
"
map
-item-street"
,
},
},
{
{
id
:
3
,
id
:
3
,
name
:
"夜景"
,
name
:
"夜景"
,
class_name
:
"
hwkeys
-item-night-blue"
,
class_name
:
"
map
-item-night-blue"
,
},
},
],
],
};
};
...
@@ -144,7 +133,7 @@ export default {
...
@@ -144,7 +133,7 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.
cpt-hwkeys
{
.
map-switch
{
z-index
:
1
;
z-index
:
1
;
bottom
:
30px
;
bottom
:
30px
;
...
@@ -161,7 +150,7 @@ export default {
...
@@ -161,7 +150,7 @@ export default {
align-items
:
center
;
align-items
:
center
;
//
display
:
flex
;
//
display
:
flex
;
.
hwkeys
-item
{
.
map
-item
{
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
color
:
#04d5da
;
color
:
#04d5da
;
...
@@ -174,23 +163,23 @@ export default {
...
@@ -174,23 +163,23 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.
hwkeys
-item-satellite
{
.
map
-item-satellite
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
}
.
hwkeys
-item-street
{
.
map
-item-street
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
.
hwkeys
-item-night-blue
{
.
map
-item-night-blue
{
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
}
}
.
hwkeys
-item-3d
{
.
map
-item-3d
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
}
.
hwkeys
-item-2d
{
.
map
-item-2d
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
}
}
...
@@ -203,13 +192,7 @@ export default {
...
@@ -203,13 +192,7 @@ export default {
transition
:
0
.2s
;
transition
:
0
.2s
;
transform
:
translateX
(
0
);
transform
:
translateX
(
0
);
&
.wkeysRight
{
.map-switch-wrap
{
transition
:
0.3s
;
transform
:
translateX
(
-12px
);
right
:
40px
;
}
.hwkeys-wrap
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
min-width
:
52px
;
min-width
:
52px
;
...
@@ -225,7 +208,7 @@ export default {
...
@@ -225,7 +208,7 @@ export default {
width
:
166px
;
width
:
166px
;
}
}
.
hwkeys
-item
{
.
map
-item
{
width
:
52px
;
width
:
52px
;
height
:
52px
;
height
:
52px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -233,30 +216,30 @@ export default {
...
@@ -233,30 +216,30 @@ export default {
border
:
3px
solid
#fff
;
border
:
3px
solid
#fff
;
position
:
relative
;
position
:
relative
;
&.
hwkeys
-item-satellite
{
&.
map
-item-satellite
{
//
background
:
url(./assets/images/3d.png)
center
no-repeat
;
//
background
:
url(./assets/images/3d.png)
center
no-repeat
;
background
:
url("./assets/images/ditu_icon.png")
center
no-repeat
;
background
:
url("./assets/images/ditu_icon.png")
center
no-repeat
;
background-size
:
112%
112%
;
background-size
:
112%
112%
;
}
}
&
.
hwkeys
-item-street
{
&
.
map
-item-street
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
&
.
hwkeys
-item-night-blue
{
&
.
map
-item-night-blue
{
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
background
:
url(./assets/images/night-blue.png)
center
no-repeat
;
//
background-size
:
115%
115%
;
//
background-size
:
115%
115%
;
}
}
&
.
hwkeys
-item-3d
{
&
.
map
-item-3d
{
background
:
url(./assets/images/3d.png)
center
no-repeat
;
background
:
url(./assets/images/3d.png)
center
no-repeat
;
}
}
&
.
hwkeys
-item-2d
{
&
.
map
-item-2d
{
background
:
url(./assets/images/2d.png)
center
no-repeat
;
background
:
url(./assets/images/2d.png)
center
no-repeat
;
}
}
&
.
hwkeys
-item-street
{
&
.
map
-item-street
{
}
}
.typeNmae
{
.typeNmae
{
...
@@ -299,7 +282,7 @@ export default {
...
@@ -299,7 +282,7 @@ export default {
}
}
}
}
.
cpt-hwkeys
:hover
{
.
map-switch
:hover
{
.changeMapBox
{
.changeMapBox
{
display
:
flex
;
display
:
flex
;
}
}
...
...
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlTop/index.vue
浏览文件 @
42f28eac
...
@@ -5,16 +5,16 @@
...
@@ -5,16 +5,16 @@
<div>
{{
week
}}
{{
time
}}
</div>
<div>
{{
week
}}
{{
time
}}
</div>
</div>
</div>
<div
class=
"ct-item ct-weather"
>
<div
class=
"ct-item ct-weather"
>
<img
class=
"ctw-icon"
src=
"./assets/images/weather/icon/day/00.png
"
/>
<img
class=
"ctw-icon"
:src=
"weatherIcon
"
/>
<div
class=
"ctw-wind"
>
<div
class=
"ctw-wind"
>
<div
class=
"ctww-line1"
>
<div
class=
"ctww-line1"
>
<
img
src=
"./assets/images/wind.png"
/
>
<
!--
<img
:src=
"weatherIcon"
/>
--
>
<div>
东北风
</div>
<div>
{{
weather
.
windDirection
}}
</div>
</div>
</div>
<div>
0.2~0.6
m/s
</div>
<div>
{{
weather
.
windSpeed
}}
m/s
</div>
</div>
</div>
</div>
</div>
<div
class=
"ct-item ct-take-off"
>
适宜起飞
</div>
<div
class=
"ct-item ct-take-off"
>
{{
weather
.
flyStatus
?
'适宜起飞'
:
'不宜起飞'
}}
</div>
<div
class=
"ct-item ct-info"
>
<div
class=
"ct-item ct-info"
>
<!-- 避障雷达 -->
<!-- 避障雷达 -->
<el-tooltip
<el-tooltip
...
@@ -112,12 +112,19 @@
...
@@ -112,12 +112,19 @@
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
import
{
mapState
}
from
"vuex"
;
import
{
mapState
}
from
"vuex"
;
import
TakeOverRecords
from
"./components/takeOverRecords"
;
import
TakeOverRecords
from
"./components/takeOverRecords"
;
import
{
System
}
from
"../../../../../../api"
;
export
default
{
export
default
{
name
:
"ControlTop"
,
name
:
"ControlTop"
,
components
:
{
components
:
{
TakeOverRecords
,
TakeOverRecords
,
},
},
props
:
{
isHangar
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
data
()
{
return
{
return
{
date
:
""
,
date
:
""
,
...
@@ -160,10 +167,23 @@ export default {
...
@@ -160,10 +167,23 @@ export default {
"-4"
:
"航向偏左"
,
"-4"
:
"航向偏左"
,
},
},
showTakeOverRecords
:
false
,
// 显示接管记录
showTakeOverRecords
:
false
,
// 显示接管记录
timeWeather
:
null
,
weather
:
{
windSpeed
:
0
,
minTemp
:
0
,
maxTemp
:
0
,
windDirection
:
"未知"
,
humidity
:
0
,
temp
:
0
,
windLevel
:
0
,
conditionDay
:
"未知"
,
},
weatherIcon
:
require
(
`./assets/images/weather/icon/iconfont/W0.png`
)
};
};
},
},
computed
:
{
computed
:
{
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uavRealTimeData"
]),
...
mapState
(
"MMCFlightControlCenter/uav"
,
[
"uavRealTimeData"
]),
...
mapState
(
"MMCFlightControlCenter/hangar"
,
[
"hangar"
]),
// 网络判断 公网|专网
// 网络判断 公网|专网
network
()
{
network
()
{
let
{
uavRealTimeData
}
=
this
;
let
{
uavRealTimeData
}
=
this
;
...
@@ -310,12 +330,13 @@ export default {
...
@@ -310,12 +330,13 @@ export default {
},
},
created
()
{
created
()
{
this
.
updateTime
();
this
.
updateTime
();
this
.
timeHandler
=
setInterval
(
()
=>
{
this
.
timeHandler
=
setInterval
(
this
.
updateTime
,
1000
);
this
.
updateTime
();
this
.
getWeather
();
},
1
000
);
this
.
timeWeather
=
setInterval
(
this
.
getWeather
,
60
000
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
clearInterval
(
this
.
timeHandler
);
clearInterval
(
this
.
timeHandler
);
clearInterval
(
this
.
timeWeather
);
},
},
methods
:
{
methods
:
{
updateTime
()
{
updateTime
()
{
...
@@ -413,6 +434,35 @@ export default {
...
@@ -413,6 +434,35 @@ export default {
});
});
}
}
},
},
/**
* 获取天气数据
*/
async
getWeather
()
{
let
lat
;
let
lon
;
if
(
this
.
isHangar
)
{
lat
=
this
.
hangar
.
latitude
;
lon
=
this
.
hangar
.
longitude
;
}
else
{
// 无人机需要通过实时数据获取经纬度
if
(
this
.
uavRealTimeData
?.
locationCoordinate3D
?.
latitude
)
{
lat
=
this
.
uavRealTimeData
.
locationCoordinate3D
.
latitude
;
lon
=
this
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
;
}
}
if
(
lat
)
{
let
res
=
await
System
.
getCoordinatesWeather
({
lat
,
lon
,
});
this
.
weather
=
res
.
data
[
0
];
const
date
=
new
Date
();
let
time
=
date
.
getHours
();
this
.
weatherIcon
=
require
(
`./assets/images/weather/icon/iconfont/W
${
time
>=
18
?
this
.
weather
.
nightIcon
:
this
.
weather
.
dayIcon
}
.png`
);
}
},
},
},
};
};
</
script
>
</
script
>
...
...
src/components/MMCFlightControlCenter/components/uavApplications/index.vue
浏览文件 @
42f28eac
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
"uavRealTimeData.isFlying"
(
newVal
,
oldVal
)
{
"uavRealTimeData.isFlying"
(
newVal
,
oldVal
)
{
// 监听飞机降落然后进行任务结束的提示
// 监听飞机降落然后进行任务结束的提示
if
(
oldVal
===
true
&&
newVal
===
false
)
{
if
(
oldVal
===
true
&&
newVal
===
false
)
{
this
.
$alert
(
"
任务
结束"
,
"提示"
,
{
this
.
$alert
(
"
当前任务已
结束"
,
"提示"
,
{
type
:
"success "
,
type
:
"success "
,
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
callback
:
(
action
)
=>
{
},
callback
:
(
action
)
=>
{
},
...
...
src/components/MMCFlightControlCenter/store/uav.js
浏览文件 @
42f28eac
...
@@ -6,6 +6,7 @@ let positions = []; // 飞机走过的点, 会一直累计, 每n秒减半一次,
...
@@ -6,6 +6,7 @@ let positions = []; // 飞机走过的点, 会一直累计, 每n秒减半一次,
setInterval
(()
=>
{
setInterval
(()
=>
{
if
(
positions
.
length
>
1000
)
{
if
(
positions
.
length
>
1000
)
{
positions
=
positions
.
filter
((
x
,
index
)
=>
index
%
2
===
0
);
positions
=
positions
.
filter
((
x
,
index
)
=>
index
%
2
===
0
);
console
.
log
(
'飞行轨迹'
,
positions
);
}
}
},
60000
);
},
60000
);
window
.
positions
=
()
=>
{
window
.
positions
=
()
=>
{
...
@@ -503,7 +504,11 @@ const actions = {
...
@@ -503,7 +504,11 @@ const actions = {
}
else
{
}
else
{
// const posData = UAVDataParser(state.uavRealTimeData); // 这种写法在执行rollup混淆压缩后, posData对象会变成elementUI的对象,原因未知
// const posData = UAVDataParser(state.uavRealTimeData); // 这种写法在执行rollup混淆压缩后, posData对象会变成elementUI的对象,原因未知
// 更新轨迹
// 更新轨迹
positions
.
push
(
UAVDataParser
(
state
.
uavRealTimeData
).
position
);
let
flag
=
positions
.
some
(
val
=>
val
.
x
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
x
&&
val
.
y
==
UAVDataParser
(
state
.
uavRealTimeData
).
position
.
y
)
if
(
!
flag
)
{
positions
.
push
(
UAVDataParser
(
state
.
uavRealTimeData
).
position
);
}
// console.log(positions,"positions.x");
}
}
if
(
if
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论