1、细节调整
This commit is contained in:
parent
c2d64fcb85
commit
55a4c66a1c
|
|
@ -275,7 +275,7 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.weather {
|
||||
width: 125px;
|
||||
width: 126px;
|
||||
margin-right: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ export default {
|
|||
let historyChart = echarts.init(this.$refs.historyChart)
|
||||
historyChart.setOption({
|
||||
title: {
|
||||
text: '天气(单位℃)',
|
||||
text: '天气(单位℃)'+'-'+this.historyWeatherData.city[0],
|
||||
textStyle: {
|
||||
color: '#541264',
|
||||
fontWeight: '1000',
|
||||
|
|
@ -148,7 +148,7 @@ export default {
|
|||
let futureChart = echarts.init(this.$refs.futureChart)
|
||||
futureChart.setOption({
|
||||
title: {
|
||||
text: '预报天气(单位℃)',
|
||||
text: '预报天气(单位℃)'+'-'+this.futureWeatherData.city[0],
|
||||
textStyle: {
|
||||
color: '#541264',
|
||||
fontWeight: '1000',
|
||||
|
|
|
|||
|
|
@ -100,7 +100,13 @@ public class WeatherServiceImpl implements WeatherService {
|
|||
ArrayList<String> dateTime = new ArrayList<>();
|
||||
ArrayList<String> temperature = new ArrayList<>();
|
||||
weatherList.forEach(weather -> {
|
||||
dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd HH"));
|
||||
String today = DateUtil.today();
|
||||
if (StringUtils.contains(startDate, today) && StringUtils.contains(endDate,today)) {
|
||||
dateTime.add(DateUtil.format(weather.getReporttime(), "HH:mm"));
|
||||
} else {
|
||||
dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd"));
|
||||
|
||||
}
|
||||
temperature.add(weather.getTemperature());
|
||||
});
|
||||
|
||||
|
|
@ -108,6 +114,10 @@ public class WeatherServiceImpl implements WeatherService {
|
|||
listMap.put("reportTime", dateTime);
|
||||
listMap.put("temperature", temperature);
|
||||
|
||||
ArrayList<String> cityList = new ArrayList<>();
|
||||
cityList.add(city);
|
||||
listMap.put("city", cityList);
|
||||
|
||||
return listMap;
|
||||
}
|
||||
|
||||
|
|
@ -130,6 +140,10 @@ public class WeatherServiceImpl implements WeatherService {
|
|||
listMap.put("week", week);
|
||||
listMap.put("minTemperature", minTemperature);
|
||||
listMap.put("maxTemperature", maxTemperature);
|
||||
ArrayList<String> cityList = new ArrayList<>();
|
||||
cityList.add(forecastWeather.getCity());
|
||||
listMap.put("city", cityList);
|
||||
|
||||
return listMap;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue