projects/mescc/develop #24
2
.env.dev
2
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: zhp
|
||||
# @Date: 2024-04-28 13:42:51
|
||||
# @LastEditTime: 2024-05-11 08:52:30
|
||||
# @LastEditTime: 2024-05-13 13:30:20
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
|
@ -159,6 +159,7 @@ export default {
|
||||
}
|
||||
|
||||
.chart {
|
||||
width: 390px;
|
||||
align-self: stretch;
|
||||
height: 280px;
|
||||
}
|
||||
|
@ -10,10 +10,12 @@
|
||||
<div class="cities">
|
||||
<CopilotButtons :options="cities" @update:active="handleCityUpdate" />
|
||||
</div>
|
||||
<div style="padding: 0 30px;width: 90%;">
|
||||
<div class="chart" ref="chart"></div>
|
||||
</div>
|
||||
<div class="legend" v-if="1">
|
||||
<div class="legend-item" v-for="(lgd,index) in legendList" :key="lgd.name">
|
||||
<div >
|
||||
<div>
|
||||
<span :style="'backgroundColor:' + colors[index%5]" class="legend-item__chart"></span>
|
||||
<span :style="'color:' + colors[index%5]" class="legend-item__label">{{ lgd.name }}</span>
|
||||
</div>
|
||||
@ -108,6 +110,8 @@ export default {
|
||||
}
|
||||
|
||||
.chart {
|
||||
margin-left: 5%;
|
||||
width: 290px;
|
||||
align-self: stretch;
|
||||
height: 280px;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
weatherInterval:null,
|
||||
isFullscreen: false,
|
||||
times: null,
|
||||
weather:'',
|
||||
@ -43,6 +44,9 @@ export default {
|
||||
;this.getTimes()
|
||||
this.getWeather()
|
||||
},
|
||||
destroyed() {
|
||||
clearInterval(this.weatherInterval)
|
||||
},
|
||||
methods: {
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 1000);
|
||||
@ -84,7 +88,7 @@ export default {
|
||||
day
|
||||
},
|
||||
async getWeather() {
|
||||
setInterval(() => {
|
||||
this.weatherInterval = setInterval(() => {
|
||||
fetch(`https://restapi.amap.com/v3/weather/weatherInfo?key=a20a2093715deb9bd68e423c34a2ac3c&city=110108`, {
|
||||
method: 'get',
|
||||
extensions: 'base',
|
||||
|
Loading…
Reference in New Issue
Block a user