diff --git a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue index 359ab2e..8209ef4 100644 --- a/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue +++ b/04.系统编码/Frontend/src/components/MicrowaveRadiation.vue @@ -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 = () => { diff --git a/04.系统编码/Frontend/src/components/Shared/Header.vue b/04.系统编码/Frontend/src/components/Shared/Header.vue index aefd4d7..2e24f94 100644 --- a/04.系统编码/Frontend/src/components/Shared/Header.vue +++ b/04.系统编码/Frontend/src/components/Shared/Header.vue @@ -21,7 +21,7 @@ 系统管理 - 退出登录 + 退出登录 @@ -65,12 +65,15 @@ display: flex; align-items: center; color: #ffffff; - span{ - padding: 10px; - cursor: pointer; - background-color: #498DF0; - border-radius: 10px; - } + + span{ + padding: 10px; + cursor: pointer; + background-color: #498DF0; + border-radius: 10px; + position: absolute; + right: 0.2rem; + } .logo { margin-left: 0.2rem; display: flex;