Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mmc-stl-vue2
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
mmc-stl-vue2
Commits
89b9206d
提交
89b9206d
authored
8月 08, 2025
作者:
“kai”
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(controlTop): 移除天气相关代码和功能
清理不再使用的天气显示组件和相关逻辑,简化控制面板顶部区域
上级
43958000
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
44 行增加
和
45 行删除
+44
-45
index.vue
...s/components/controlPanel/components/controlTop/index.vue
+44
-45
没有找到文件。
src/components/MMCFlightControlCenter/components/uavApplications/components/controlPanel/components/controlTop/index.vue
浏览文件 @
89b9206d
...
@@ -4,17 +4,16 @@
...
@@ -4,17 +4,16 @@
<div>
{{
date
}}
</div>
<div>
{{
date
}}
</div>
<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=
"weatherIcon"
/>
<img
class=
"ctw-icon"
:src=
"weatherIcon"
/>
<div
class=
"ctw-wind"
>
<div
class=
"ctw-wind"
>
<div
class=
"ctww-line1"
>
<div
class=
"ctww-line1"
>
<!--
<img
:src=
"weatherIcon"
/>
-->
<div>
{{
weather
.
windDirection
}}
</div>
<div>
{{
weather
.
windDirection
}}
</div>
</div>
</div>
<div>
{{
weather
.
windSpeed
}}
m/s
</div>
<div>
{{
weather
.
windSpeed
}}
m/s
</div>
</div>
</div>
</div>
</div>
-->
<
div
class=
"ct-item ct-take-off"
>
{{
weather
.
flyStatus
?
$t
(
'controlMenu.适宜起飞'
)
:
$t
(
'controlMenu.不宜起飞'
)
}}
</div
>
<
!--
<div
class=
"ct-item ct-take-off"
>
{{
weather
.
flyStatus
?
$t
(
'controlMenu.适宜起飞'
)
:
$t
(
'controlMenu.不宜起飞'
)
}}
</div>
--
>
<div
class=
"ct-item ct-info"
>
<div
class=
"ct-item ct-info"
>
<!-- 避障雷达 -->
<!-- 避障雷达 -->
<el-tooltip
<el-tooltip
...
@@ -134,18 +133,18 @@ export default {
...
@@ -134,18 +133,18 @@ export default {
timeHandler
:
null
,
timeHandler
:
null
,
showTakeOverRecords
:
false
,
// 显示接管记录
showTakeOverRecords
:
false
,
// 显示接管记录
timeWeather
:
null
,
//
timeWeather: null,
weather
:
{
//
weather: {
windSpeed
:
0
,
//
windSpeed: 0,
minTemp
:
0
,
//
minTemp: 0,
maxTemp
:
0
,
//
maxTemp: 0,
windDirection
:
this
.
$t
(
'controlMenu.未知'
),
//
windDirection: this.$t('controlMenu.未知'),
humidity
:
0
,
//
humidity: 0,
temp
:
0
,
//
temp: 0,
windLevel
:
0
,
//
windLevel: 0,
conditionDay
:
this
.
$t
(
'controlMenu.未知'
),
//
conditionDay: this.$t('controlMenu.未知'),
},
//
},
weatherIcon
:
require
(
`./assets/images/weather/icon/iconfont/W0.png`
)
//
weatherIcon: require(`./assets/images/weather/icon/iconfont/W0.png`)
};
};
},
},
computed
:
{
computed
:
{
...
@@ -337,12 +336,12 @@ export default {
...
@@ -337,12 +336,12 @@ export default {
created
()
{
created
()
{
this
.
updateTime
();
this
.
updateTime
();
this
.
timeHandler
=
setInterval
(
this
.
updateTime
,
1000
);
this
.
timeHandler
=
setInterval
(
this
.
updateTime
,
1000
);
this
.
getWeather
();
//
this.getWeather();
this
.
timeWeather
=
setInterval
(
this
.
getWeather
,
60000
);
//
this.timeWeather = setInterval(this.getWeather, 60000);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
clearInterval
(
this
.
timeHandler
);
clearInterval
(
this
.
timeHandler
);
clearInterval
(
this
.
timeWeather
);
//
clearInterval(this.timeWeather);
},
},
methods
:
{
methods
:
{
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
"isTakeOver"
]),
...
mapActions
(
"MMCFlightControlCenter/hangar"
,
[
"isTakeOver"
]),
...
@@ -435,32 +434,32 @@ export default {
...
@@ -435,32 +434,32 @@ export default {
/**
/**
* 获取天气数据
* 获取天气数据
*/
*/
async
getWeather
()
{
//
async getWeather() {
let
lat
;
//
let lat;
let
lon
;
//
let lon;
if
(
this
.
isHangar
)
{
//
if (this.isHangar) {
lat
=
this
.
hangar
.
latitude
;
//
lat = this.hangar.latitude;
lon
=
this
.
hangar
.
longitude
;
//
lon = this.hangar.longitude;
}
else
{
//
} else {
// 无人机需要通过实时数据获取经纬度
//
// 无人机需要通过实时数据获取经纬度
if
(
this
.
uavRealTimeData
?.
locationCoordinate3D
?.
latitude
)
{
//
if (this.uavRealTimeData?.locationCoordinate3D?.latitude) {
lat
=
this
.
uavRealTimeData
.
locationCoordinate3D
.
latitude
;
//
lat = this.uavRealTimeData.locationCoordinate3D.latitude;
lon
=
this
.
uavRealTimeData
.
locationCoordinate3D
.
longitude
;
//
lon = this.uavRealTimeData.locationCoordinate3D.longitude;
}
//
}
}
//
}
if
(
lat
)
{
//
if (lat) {
let
res
=
await
System
.
getCoordinatesWeather
({
//
let res = await System.getCoordinatesWeather({
lat
,
//
lat,
lon
,
//
lon,
});
//
});
this
.
weather
=
res
.
data
[
0
];
//
this.weather = res.data[0];
const
date
=
new
Date
();
//
const date = new Date();
let
time
=
date
.
getHours
();
//
let time = date.getHours();
this
.
weatherIcon
=
require
(
`./assets/images/weather/icon/iconfont/W
${
//
this.weatherIcon = require(`./assets/images/weather/icon/iconfont/W${
time
>=
18
?
this
.
weather
.
nightIcon
:
this
.
weather
.
dayIcon
//
time >= 18 ? this.weather.nightIcon : this.weather.dayIcon
}
.png`
);
//
}.png`);
}
//
}
},
//
},
},
},
};
};
</
script
>
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论