|
|
@ -185,8 +185,6 @@ |
|
|
|
name: 'MicrowaveRadiation', |
|
|
|
setup() { |
|
|
|
let timer = null; |
|
|
|
let dateFormat = '2021-12-05'; |
|
|
|
let contrastDateFormat = '2021-11-10'; |
|
|
|
|
|
|
|
let options = reactive({ |
|
|
|
currentTab: 'MWR', |
|
|
@ -194,7 +192,7 @@ |
|
|
|
currentType: 'TEMP', |
|
|
|
currentElement: 'TEMP', |
|
|
|
currentCategory: 'CAPE', |
|
|
|
date: moment(contrastDateFormat).format('YYYY-MM-DD'), |
|
|
|
date: moment('2021-11-10').format('YYYY-MM-DD'), |
|
|
|
currentHour: '23', |
|
|
|
hours: [], |
|
|
|
times: [], |
|
|
@ -228,7 +226,7 @@ |
|
|
|
options.currentTab = name; |
|
|
|
|
|
|
|
if (options.currentTab === 'MWR') { |
|
|
|
options.date = moment(contrastDateFormat).format('YYYY-MM-DD'); |
|
|
|
options.date = moment('2021-11-10').format('YYYY-MM-DD'); |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
options.index = options.days.length - 1; |
|
|
|
|
|
|
@ -237,12 +235,28 @@ |
|
|
|
} else { |
|
|
|
if (options.currentTab === 'kuoxian' || options.currentTab === 'shixu_BPFY') |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
else if (options.currentTab === 'shixu') |
|
|
|
else if (options.currentTab === 'shixu') { |
|
|
|
options.date = moment('2021-12-04').format('YYYY-MM-DD'); |
|
|
|
options.currentElement = 'CAPE'; |
|
|
|
} |
|
|
|
|
|
|
|
options.date = moment(dateFormat).format('YYYY-MM-DD'); |
|
|
|
options.date = moment('2021-12-05').format('YYYY-MM-DD'); |
|
|
|
options.index = options.times.length - 1; |
|
|
|
|
|
|
|
if (options.currentTab === 'kuoxian' || options.currentTab === 'shixu_BPFY') { |
|
|
|
options.date = moment('2021-12-04').format('YYYY-MM-DD'); |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
options.currentHour = '23'; |
|
|
|
} else if (options.currentTab === 'shixu') { |
|
|
|
options.date = moment('2021-12-04').format('YYYY-MM-DD'); |
|
|
|
options.currentElement = 'CAPE'; |
|
|
|
options.currentHour = '23'; |
|
|
|
} else if (options.currentTab === 'T-logP') { |
|
|
|
options.date = moment('2021-12-05').format('YYYY-MM-DD'); |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
options.currentHour = '16'; |
|
|
|
} |
|
|
|
|
|
|
|
initTimeLine(); |
|
|
|
setTimeout(() => activeImage(moment(options.times[options.times.length - 1].date).hour(), moment(options.times[options.times.length - 1].date).minute()), 50) |
|
|
|
} |
|
|
@ -376,9 +390,9 @@ |
|
|
|
|
|
|
|
const initTimeLine = () => { |
|
|
|
options.times = []; |
|
|
|
options.currentTime = moment(options.date).hour(parseInt(options.currentHour)).minute(30).format('YYYY-MM-DD HH:mm'); |
|
|
|
options.currentTime = moment(options.date).hour(parseInt(options.currentHour)).minute(options.currentTab === 'T-logP' ? 0 : 30).format('YYYY-MM-DD HH:mm'); |
|
|
|
|
|
|
|
let now = moment(options.date).hour(parseInt(options.currentHour) - 2).minute(30); |
|
|
|
let now = moment(options.date).hour(parseInt(options.currentHour) - 2).minute(options.currentTab === 'T-logP' ? 0 : 30); |
|
|
|
|
|
|
|
let minute = now.minute(); |
|
|
|
const remainder = minute % 6; |
|
|
@ -484,18 +498,18 @@ |
|
|
|
let element = getCurrentElement(); |
|
|
|
|
|
|
|
if (options.currentTab === 'MWR') { |
|
|
|
options.date = moment(contrastDateFormat).format('YYYY-MM-DD'); |
|
|
|
options.date = moment('2021-11-10').format('YYYY-MM-DD'); |
|
|
|
options.currentTime = options.date; |
|
|
|
element.children[options.days.length - 1].classList.add('active'); |
|
|
|
|
|
|
|
activeContrastImage(); |
|
|
|
} else { |
|
|
|
options.currentHour = '23'; |
|
|
|
options.date = moment(dateFormat).format('YYYY-MM-DD'); |
|
|
|
options.date = moment('2021-12-05').format('YYYY-MM-DD'); |
|
|
|
options.currentTime = moment(options.date).hour(parseInt(options.currentHour)).format('YYYY-MM-DD HH:mm'); |
|
|
|
element.children[options.times.length - 1].classList.add('active'); |
|
|
|
|
|
|
|
activeImage(moment(options.currentTime).hour(), moment(options.currentTime).minute(30)); |
|
|
|
activeImage(moment(options.currentTime).hour(), moment(options.currentTime).minute(options.currentTab === 'T-logP' ? 0 : 30)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -548,8 +562,13 @@ |
|
|
|
} |
|
|
|
|
|
|
|
const onChange = () => { |
|
|
|
initTimeLine(); |
|
|
|
activeImage(moment(options.times[options.index].date).hour(), moment(options.times[options.index].date).minute()); |
|
|
|
if(options.currentTab === 'MWR') { |
|
|
|
initDays(); |
|
|
|
activeContrastImage(); |
|
|
|
} else { |
|
|
|
initTimeLine(); |
|
|
|
activeImage(moment(options.times[options.index].date).hour(), moment(options.times[options.index].date).minute()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const onSaveClick = () => { |
|
|
|