parent
55a4c66a1c
commit
f6d56d9b3f
|
|
@ -13,6 +13,7 @@
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="top"
|
placement="top"
|
||||||
width="400"
|
width="400"
|
||||||
|
trigger="hover"
|
||||||
title="❉预报天气❉"
|
title="❉预报天气❉"
|
||||||
v-model="weatherVisible">
|
v-model="weatherVisible">
|
||||||
<table style="text-align: center" v-loading="loading">
|
<table style="text-align: center" v-loading="loading">
|
||||||
|
|
@ -183,18 +184,15 @@ export default {
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getNowWeather()
|
this.getNowWeather()
|
||||||
|
this.getForecastWeather()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
//获取预报天气
|
//获取预报天气
|
||||||
getForecastWeather() {
|
getForecastWeather() {
|
||||||
this.loading = true;
|
|
||||||
getForecastWeather().then(res => {
|
getForecastWeather().then(res => {
|
||||||
this.forecastWeatherData = res.data
|
this.forecastWeatherData = res.data
|
||||||
this.loading = false;
|
|
||||||
})
|
})
|
||||||
this.getNowWeather()
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取实时天气
|
//获取实时天气
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,10 @@
|
||||||
<svg-icon icon-class="peoples" />所属角色
|
<svg-icon icon-class="peoples" />所属角色
|
||||||
<div class="pull-right">{{ roleGroup }}</div>
|
<div class="pull-right">{{ roleGroup }}</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<svg-icon icon-class="peoples" />登录次数
|
||||||
|
<div class="pull-right">{{ user.loginCount }}次</div>
|
||||||
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<svg-icon icon-class="date" />创建日期
|
<svg-icon icon-class="date" />创建日期
|
||||||
<div class="pull-right">{{ user.createTime }}</div>
|
<div class="pull-right">{{ user.createTime }}</div>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ public class WeatherServiceImpl implements WeatherService {
|
||||||
if (StringUtils.contains(startDate, today) && StringUtils.contains(endDate,today)) {
|
if (StringUtils.contains(startDate, today) && StringUtils.contains(endDate,today)) {
|
||||||
dateTime.add(DateUtil.format(weather.getReporttime(), "HH:mm"));
|
dateTime.add(DateUtil.format(weather.getReporttime(), "HH:mm"));
|
||||||
} else {
|
} else {
|
||||||
dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd"));
|
dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd HH:mm"));
|
||||||
|
|
||||||
}
|
}
|
||||||
temperature.add(weather.getTemperature());
|
temperature.add(weather.getTemperature());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue