|
|
@ -68,8 +68,8 @@ |
|
|
|
</div> |
|
|
|
<div class="btns-group"> |
|
|
|
<span @click="onPlayClick">{{isPlay ? '暂停动画' : '播放动画'}}</span> |
|
|
|
<a @click="onDownloadClick">下载动画</a> <!-- :href=""--> |
|
|
|
<a id="weboDownload" download :href='downloadSrc' style="display: none;">下载隐藏层</a> |
|
|
|
<a @click="onDownloadClick">下载动画</a> |
|
|
|
<a id="weboDownload" download :href="downloadSrc" style="display: none;">下载隐藏层</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="picture-view"> |
|
|
@ -119,7 +119,7 @@ import { post } from '../uilts/axios'; |
|
|
|
currentType: 'TEMP', |
|
|
|
currentElement: 'TEMPERATURE', |
|
|
|
currentCategory: 'CAPE', |
|
|
|
date: moment('2020-07-01').format('YYYY-MM-DD'), |
|
|
|
date: moment('2021-11-01').format('YYYY-MM-DD'), |
|
|
|
currentHour: '10', |
|
|
|
hours: [], |
|
|
|
times: [], |
|
|
@ -208,13 +208,14 @@ import { post } from '../uilts/axios'; |
|
|
|
console.log(response.message); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fetch(response.data).then(res => { |
|
|
|
return res.blob(); |
|
|
|
}).then(blob => { |
|
|
|
let reader = new FileReader(); |
|
|
|
reader.onloadend = function(){ |
|
|
|
options.downloadSrc = reader.result; |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
document.getElementById("weboDownload").click(); |
|
|
|
options.downloadSrc = null; |
|
|
@ -229,7 +230,7 @@ import { post } from '../uilts/axios'; |
|
|
|
return { |
|
|
|
model: 'weibo', |
|
|
|
station: options.currentRegion, |
|
|
|
elementCode: options.currentElement, |
|
|
|
elementCode: options.currentType, |
|
|
|
type: options.currentTab, |
|
|
|
time: moment(options.times[0].date).format("YYYYMMDDHHmmss") + '-' + moment(options.times[options.times.length - 1].date).format("YYYYMMDDHHmmss"), |
|
|
|
urls: prepareUrls() |
|
|
@ -238,9 +239,8 @@ import { post } from '../uilts/axios'; |
|
|
|
|
|
|
|
const prepareUrls = () => { |
|
|
|
let urls = []; |
|
|
|
for(let index = 0, len = options.hours.length; index < len; index++){ |
|
|
|
let date = moment(options.times[options.index].date); |
|
|
|
let time = moment(options.date).hour(date.hour()).minute(date.minute()); |
|
|
|
for(let index = 0, len = options.times.length; index < len; index++){ |
|
|
|
let time = moment(options.times[index].date); |
|
|
|
let type = (options.currentTab === 'T-logP' || options.currentTab === 'BPFY') ? options.currentTab : (options.currentTab + '_' + options.currentType); |
|
|
|
urls.push(MicrowaveRadiationConfig.getUrl(options.currentRegion, type, time)); |
|
|
|
} |
|
|
@ -322,7 +322,6 @@ import { post } from '../uilts/axios'; |
|
|
|
} |
|
|
|
|
|
|
|
const onPrevImgClick = () => { |
|
|
|
console.log(options.index); |
|
|
|
let element = getCurrentElement(); |
|
|
|
|
|
|
|
options.index--; |
|
|
@ -344,8 +343,15 @@ import { post } from '../uilts/axios'; |
|
|
|
|
|
|
|
const onRefreshClick = () => { |
|
|
|
cancelActive(); |
|
|
|
options.date = moment('2020-07-01').format('YYYY-MM-DD'); |
|
|
|
let element = getCurrentElement();; |
|
|
|
|
|
|
|
options.currentHour = '10'; |
|
|
|
options.date = moment('2021-11-01').format('YYYY-MM-DD'); |
|
|
|
options.currentTime = moment(options.date).hour(parseInt(options.currentHour)).format('YYYY-MM-DD HH:mm'); |
|
|
|
|
|
|
|
setTitle(moment(options.currentTime, 'YYYY-MM-DD HH:mm')); |
|
|
|
activeImage(moment(options.currentTime).hour(), moment(options.currentTime).minute()); |
|
|
|
element.children[options.times.length - 1].classList.add('active'); |
|
|
|
} |
|
|
|
|
|
|
|
const onPlayClick = () => { |
|
|
@ -360,7 +366,7 @@ import { post } from '../uilts/axios'; |
|
|
|
const timeExcute = () => { |
|
|
|
clearTimer(); |
|
|
|
|
|
|
|
let element = getCurrentElement();; |
|
|
|
let element = getCurrentElement(); |
|
|
|
|
|
|
|
timer = setInterval( () => { |
|
|
|
options.index++; |
|
|
|