|
@@ -189,7 +189,15 @@ let weekday = [];
|
|
let datelist = [];
|
|
let datelist = [];
|
|
let weatherDaylist = [];
|
|
let weatherDaylist = [];
|
|
let weatherNightlist = [];
|
|
let weatherNightlist = [];
|
|
-let weatherImgDaylist = [];
|
|
|
|
|
|
+let weatherImgDaylist = ref([
|
|
|
|
+ "多云",
|
|
|
|
+ "大到暴雨",
|
|
|
|
+ "多云",
|
|
|
|
+ "多云",
|
|
|
|
+ "多云",
|
|
|
|
+ "多云",
|
|
|
|
+ "多云"
|
|
|
|
+]);
|
|
let weatherImgNightlist = [];
|
|
let weatherImgNightlist = [];
|
|
let windDirectlist = [];
|
|
let windDirectlist = [];
|
|
let windPowerlist = [];
|
|
let windPowerlist = [];
|
|
@@ -207,7 +215,7 @@ demoData.forEach((item) => {
|
|
datelist.push(item.rq);
|
|
datelist.push(item.rq);
|
|
weatherDaylist.push(item.weatherTqDay);
|
|
weatherDaylist.push(item.weatherTqDay);
|
|
weatherNightlist.push(item.weatherTqNight);
|
|
weatherNightlist.push(item.weatherTqNight);
|
|
- weatherImgDaylist.push(item.weatherImgDay);
|
|
|
|
|
|
+ // weatherImgDaylist.push(item.weatherImgDay);
|
|
weatherImgNightlist.push(item.weatherImgNight);
|
|
weatherImgNightlist.push(item.weatherImgNight);
|
|
windDirectlist.push(item.windDirectDay);
|
|
windDirectlist.push(item.windDirectDay);
|
|
windPowerlist.push(item.windPowerDay);
|
|
windPowerlist.push(item.windPowerDay);
|
|
@@ -216,11 +224,12 @@ demoData.forEach((item) => {
|
|
});
|
|
});
|
|
maxWD = Math.max(...weatherZgwdlist) + 30;
|
|
maxWD = Math.max(...weatherZgwdlist) + 30;
|
|
minWD = Math.min(...weatherZdwdlist) - 30;
|
|
minWD = Math.min(...weatherZdwdlist) - 30;
|
|
-let weatherImgDaylistStyle = weatherImgDaylist.map((item) => {
|
|
|
|
|
|
+let weatherImgDaylistStyle = weatherImgDaylist.value.map((item) => {
|
|
let dateUrl = item;
|
|
let dateUrl = item;
|
|
return {
|
|
return {
|
|
backgroundColor: {
|
|
backgroundColor: {
|
|
- image: require("@/assets/images/home/qi-100.svg"),
|
|
|
|
|
|
+ // image: "@/assets/images/home/多云.png",
|
|
|
|
+ image: require(`@/assets/images/home/${item}.svg`)
|
|
},
|
|
},
|
|
height: 20,
|
|
height: 20,
|
|
width: 20,
|
|
width: 20,
|
|
@@ -479,6 +488,8 @@ onMounted(() => {
|
|
// );
|
|
// );
|
|
|
|
|
|
const initChart = (weatherData) => {
|
|
const initChart = (weatherData) => {
|
|
|
|
+ // weatherImgDaylist.value = weatherData.map(item => item.textDay)
|
|
|
|
+ // console.log('weatherImgDaylist', weatherImgDaylist.value);
|
|
myChart.value = echarts.init(chartDom.value);
|
|
myChart.value = echarts.init(chartDom.value);
|
|
options.xAxis[0].data = weatherData.map(item => dateFormat(item.fxDate))
|
|
options.xAxis[0].data = weatherData.map(item => dateFormat(item.fxDate))
|
|
options.xAxis[1].data = weatherData.map(item => dateFormat(item.fxDate))
|
|
options.xAxis[1].data = weatherData.map(item => dateFormat(item.fxDate))
|