|
|
@ -1,5 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="tabs"> |
|
|
|
<div class="tab-item" @click="onTabClick('MWR')" :class="{'active': currentTab === 'MWR'}"> |
|
|
|
质控对比 |
|
|
|
<img src="/images/line.png" v-if="currentTab === 'MWR'" /> |
|
|
|
</div> |
|
|
|
<div class="tab-item" @click="onTabClick('kuoxian')" :class="{'active': currentTab === 'kuoxian'}"> |
|
|
|
垂直廓线 |
|
|
|
<img src="/images/line.png" v-if="currentTab === 'kuoxian'" /> |
|
|
@ -16,7 +20,7 @@ |
|
|
|
BP反演产品 |
|
|
|
<img src="/images/line.png" v-if="currentTab === 'shixu_BPFY'" /> |
|
|
|
</div> |
|
|
|
</div><!-- kuoxian_TEMP_202112051836 --> |
|
|
|
</div> |
|
|
|
<div class="main"> |
|
|
|
<div class="menu panel"> |
|
|
|
<div class="menu-item"> |
|
|
@ -25,10 +29,10 @@ |
|
|
|
<el-col :span="8"><span @click="onRegionClick('jiangning')" :class="{'active': currentRegion === 'jiangning'}">江宁</span></el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<div class="menu-item" v-if="currentTab === 'kuoxian' || currentTab === 'shixu' || currentTab === 'shixu_BPFY'"> |
|
|
|
<div class="menu-item" v-if="currentTab === 'MWR' || currentTab === 'kuoxian' || currentTab === 'shixu' || currentTab === 'shixu_BPFY'"> |
|
|
|
<h2 class="tip">要素选择</h2> |
|
|
|
<el-row :gutter="12"> |
|
|
|
<el-col :span="8" v-if="currentTab === 'kuoxian' || currentTab === 'shixu_BPFY'"><span @click="onElementClick('TEMP')" :class="{'active': currentElement === 'TEMP'}">温度</span></el-col> |
|
|
|
<el-col :span="8" v-if="currentTab === 'MWR' || currentTab === 'kuoxian' || currentTab === 'shixu_BPFY'"><span @click="onElementClick('TEMP')" :class="{'active': currentElement === 'TEMP'}">温度</span></el-col> |
|
|
|
<el-col :span="8" v-if="currentTab === 'kuoxian' || currentTab === 'shixu_BPFY'"><span @click="onElementClick('RH')" :class="{'active': currentElement === 'RH'}">湿度</span></el-col> |
|
|
|
<el-col :span="8" v-if="currentTab === 'kuoxian' || currentTab === 'shixu_BPFY'"><span @click="onElementClick('VD')" :class="{'active': currentElement === 'VD'}">水汽密度</span></el-col> |
|
|
|
<el-col :span="8" v-if="currentTab === 'shixu'"><span @click="onElementClick('CAPE')" :class="{'active': currentElement === 'CAPE'}">CAPE</span></el-col> |
|
|
@ -37,11 +41,16 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="container panel"> |
|
|
|
<div class="toolbar"> |
|
|
|
<div class="times"> |
|
|
|
<div class="toolbar" :class="{'day-toolbar': currentTab === 'MWR'}"> |
|
|
|
<div class="times" v-if="currentTab === 'MWR'"> |
|
|
|
<div class="time-item" v-for="(time, index) in days" :key="index" :class="{'active': currentTime === time.date}"> |
|
|
|
<span class="time" @click="onDayClick(time, index)">{{time.day}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="times" v-else> |
|
|
|
<div class="time-item" v-for="(time, index) in times" :key="index" :class="{'active': currentTime === time.date, 'first-hour': time.minute === '00'}"> |
|
|
|
<span class="hour">{{time.hour}}</span> |
|
|
|
<span class="minute" @click="onTimeClick(time, index)">{{time.minute}}</span> |
|
|
|
<span class="time" @click="onTimeClick(time, index)">{{time.minute}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-date-picker v-model="date" type="date" placeholder="请选择" :clearable="false" :editable="false" class="date-picker" @change="onChange"> |
|
|
@ -50,7 +59,7 @@ |
|
|
|
<span @click="onPrevDayClick"><img src="/images/prev.png" /></span> |
|
|
|
<span @click="onNextDayClick"><img src="/images/next.png" /></span> |
|
|
|
</div> |
|
|
|
<el-select v-model="currentHour" placeholder="" @change="onChange"> |
|
|
|
<el-select v-model="currentHour" placeholder="" @change="onChange" v-if="currentTab !== 'MWR'"> |
|
|
|
<el-option |
|
|
|
v-for="item in hours" |
|
|
|
:key="item.value" |
|
|
@ -59,11 +68,11 @@ |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<p class="unit">时</p> |
|
|
|
<div class="refresh-btn" @click="onRefreshClick"> |
|
|
|
<p class="unit" v-if="currentTab !== 'MWR'">时</p> |
|
|
|
<div class="refresh-btn" @click="onRefreshClick" v-if="currentTab !== 'MWR'"> |
|
|
|
<img src="/images/refresh.png" /> |
|
|
|
</div> |
|
|
|
<div class="btns-group"> |
|
|
|
<div class="btns-group" v-if="currentTab !== 'MWR'"> |
|
|
|
<span @click="onPlayClick">{{isPlay ? '暂停动画' : '播放动画'}}</span> |
|
|
|
<a @click="onDownloadClick">下载动画</a> |
|
|
|
<a id="weboDownload" download :href="downloadSrc" style="display: none;">下载隐藏层</a> |
|
|
@ -73,7 +82,69 @@ |
|
|
|
<span class="arrow arrow-prev" @click="onPrevImgClick"><img src="/images/prev-btn.png" /></span> |
|
|
|
<span class="arrow arrow-next" @click="onNextImgClick"><img src="/images/next-btn.png" /></span> |
|
|
|
<a :href="downloadImgUrl" download class="save-btn"><img src="/images/save.png" /></a> |
|
|
|
<div class="picture-container"> |
|
|
|
<div class="picture-container contrast-picture-container" v-if="currentTab === 'MWR'"> |
|
|
|
<div class="picture"> |
|
|
|
<h2 class="title">原始数据</h2> |
|
|
|
<el-image |
|
|
|
:src="contrast.noQCImgUrl" |
|
|
|
:preview-src-list="contrast.noQCImgPreview" |
|
|
|
:initial-index="0" |
|
|
|
fit="contain" |
|
|
|
@load="onImageLoad" |
|
|
|
> |
|
|
|
<template #error> |
|
|
|
<div class="image-slot"> |
|
|
|
<img src="/images/null-picture.png" /> |
|
|
|
</div> |
|
|
|
<p class="image-tip">暂无图片</p> |
|
|
|
</template> |
|
|
|
<template #placeholder> |
|
|
|
<div class="image-placeholder">正在加载...</div> |
|
|
|
</template> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
<div class="picture"> |
|
|
|
<h2 class="title">异常值标记</h2> |
|
|
|
<el-image |
|
|
|
:src="contrast.fillingImgUrl" |
|
|
|
:preview-src-list="contrast.fillingImgPreview" |
|
|
|
:initial-index="0" |
|
|
|
fit="contain" |
|
|
|
@load="onImageLoad" |
|
|
|
> |
|
|
|
<template #error> |
|
|
|
<div class="image-slot"> |
|
|
|
<img src="/images/null-picture.png" /> |
|
|
|
</div> |
|
|
|
<p class="image-tip">暂无图片</p> |
|
|
|
</template> |
|
|
|
<template #placeholder> |
|
|
|
<div class="image-placeholder">正在加载...</div> |
|
|
|
</template> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
<div class="picture"> |
|
|
|
<h2 class="title">野点插补结果</h2> |
|
|
|
<el-image |
|
|
|
:src="contrast.fillingImgUrl" |
|
|
|
:preview-src-list="contrast.fillingImgPreview" |
|
|
|
:initial-index="0" |
|
|
|
fit="contain" |
|
|
|
@load="onImageLoad" |
|
|
|
> |
|
|
|
<template #error> |
|
|
|
<div class="image-slot"> |
|
|
|
<img src="/images/null-picture.png" /> |
|
|
|
</div> |
|
|
|
<p class="image-tip">暂无图片</p> |
|
|
|
</template> |
|
|
|
<template #placeholder> |
|
|
|
<div class="image-placeholder">正在加载...</div> |
|
|
|
</template> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="picture-container" v-if="currentTab !== 'MWR'"> |
|
|
|
<!-- <h2 class="title">{{title}}</h2> --> |
|
|
|
<div class="picture"> |
|
|
|
<el-image |
|
|
@ -104,22 +175,23 @@ |
|
|
|
import { onMounted, reactive, toRefs } from 'vue'; |
|
|
|
import moment from "moment"; |
|
|
|
import { MicrowaveRadiationConfig } from '../uilts/Config'; |
|
|
|
import { post } from '../uilts/axios'; |
|
|
|
import { post } from '../uilts/axios'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'MicrowaveRadiation', |
|
|
|
setup() { |
|
|
|
let timer = null; |
|
|
|
let options = reactive({ |
|
|
|
currentTab: 'kuoxian', |
|
|
|
currentTab: 'MWR', |
|
|
|
currentRegion: 'jiangning', |
|
|
|
currentType: 'TEMP', |
|
|
|
currentElement: 'TEMP', |
|
|
|
currentCategory: 'CAPE', |
|
|
|
date: moment('2021-12-05').format('YYYY-MM-DD'), |
|
|
|
date: moment('2021-11-10').format('YYYY-MM-DD'), |
|
|
|
currentHour: '23', |
|
|
|
hours: [], |
|
|
|
times: [], |
|
|
|
days: [], |
|
|
|
currentTime: null, |
|
|
|
imgUrl: '/images/default-picture.png', |
|
|
|
downloadImgUrl: '/images/default-picture.png', |
|
|
@ -127,20 +199,42 @@ import { post } from '../uilts/axios'; |
|
|
|
isPlay: false, |
|
|
|
title: null, |
|
|
|
index: 0, |
|
|
|
downloadSrc: null |
|
|
|
downloadSrc: null, |
|
|
|
contrast: { |
|
|
|
noQCImgUrl: '/images/picture.png', |
|
|
|
noQCImgPreview: ['/images/picture.png'], |
|
|
|
checkImgUrl: '/images/picture.png', |
|
|
|
checkImgPreview: ['/images/picture.png'], |
|
|
|
fillingImgUrl: '/images/picture.png', |
|
|
|
fillingImgPreview: ['/images/picture.png'] |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
initHours(); |
|
|
|
initDays(); |
|
|
|
initTimeLine(); |
|
|
|
setTimeout(() => { |
|
|
|
activeImage(moment(options.times[options.times.length - 1].date).hour(), moment(options.times[options.times.length - 1].date).minute()); |
|
|
|
}, 50); |
|
|
|
}) |
|
|
|
|
|
|
|
const onTabClick = (name) => { |
|
|
|
options.currentTab = name; |
|
|
|
if (options.currentTab === 'kuoxian' || options.currentTab === 'shixu_BPFY') |
|
|
|
|
|
|
|
if (options.currentTab === 'MWR') { |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
else if (options.currentTab === 'shixu') |
|
|
|
options.currentElement = 'CAPE'; |
|
|
|
options.date = moment('2021-11-10').format('YYYY-MM-DD') |
|
|
|
} |
|
|
|
else { |
|
|
|
options.date = moment('2021-12-05').format('YYYY-MM-DD'); |
|
|
|
if (options.currentTab === 'kuoxian' || options.currentTab === 'shixu_BPFY') |
|
|
|
options.currentElement = 'TEMP'; |
|
|
|
else if (options.currentTab === 'shixu') |
|
|
|
options.currentElement = 'CAPE'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancelActive(); |
|
|
|
activeImage(moment(options.times[options.index].date).hour(), moment(options.times[options.index].date).minute()); |
|
|
@ -217,7 +311,7 @@ import { post } from '../uilts/axios'; |
|
|
|
let urls = []; |
|
|
|
for(let index = 0, len = options.times.length; index < len; index++){ |
|
|
|
let time = moment(options.times[index].date); |
|
|
|
let type = options.currentTab + '_' + options.currentType; |
|
|
|
let type = options.currentTab === 'T-logP' ? options.currentTab : (options.currentTab + '_' + options.currentElement); |
|
|
|
urls.push(MicrowaveRadiationConfig.getUrl(options.currentRegion, type, time)); |
|
|
|
} |
|
|
|
|
|
|
@ -267,6 +361,24 @@ import { post } from '../uilts/axios'; |
|
|
|
options.index = options.times.length - 1; |
|
|
|
} |
|
|
|
|
|
|
|
const initDays = () => { |
|
|
|
options.days = []; |
|
|
|
options.currentTime = moment(options.date).format('YYYY-MM-DD'); |
|
|
|
console.log(options.currentTime) |
|
|
|
|
|
|
|
let now = moment(options.date).add(1, 'day'); |
|
|
|
|
|
|
|
for (let i = 0; i < 10 ; i++) { |
|
|
|
options.days.push({ |
|
|
|
day: now.add(-1, 'day').format('DD'), |
|
|
|
date: now.format('YYYY-MM-DD'), |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
options.days.reverse(); |
|
|
|
options.index = options.times.length - 1; |
|
|
|
} |
|
|
|
|
|
|
|
const initHours = () => { |
|
|
|
for (let i = 0; i < 24; i++) { |
|
|
|
options.hours.push({ |
|
|
@ -283,6 +395,13 @@ import { post } from '../uilts/axios'; |
|
|
|
activeImage(moment(time.date).hour(), moment(time.date).minute()); |
|
|
|
} |
|
|
|
|
|
|
|
const onDayClick = (time, index) => { |
|
|
|
options.currentTime = time.date; |
|
|
|
options.index = index; |
|
|
|
cancelActive(); |
|
|
|
activeImage(moment(time.date).hour(), moment(time.date).minute()); |
|
|
|
} |
|
|
|
|
|
|
|
const cancelActive = () => { |
|
|
|
clearTimer(); |
|
|
|
options.isPlay = false; |
|
|
@ -387,6 +506,7 @@ import { post } from '../uilts/axios'; |
|
|
|
onElementClick, |
|
|
|
onCategoryClick, |
|
|
|
onTimeClick, |
|
|
|
onDayClick, |
|
|
|
onPrevDayClick, |
|
|
|
onNextDayClick, |
|
|
|
onPrevImgClick, |
|
|
@ -401,5 +521,21 @@ import { post } from '../uilts/axios'; |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|
|
|
|
|
.main { |
|
|
|
.container { |
|
|
|
.contrast-picture-container { |
|
|
|
width: calc(~"100% - 2.5rem"); |
|
|
|
margin: 0 auto; |
|
|
|
flex-direction: row; |
|
|
|
align-items: center; |
|
|
|
.picture { |
|
|
|
flex-direction: column; |
|
|
|
.title { |
|
|
|
padding-bottom: 0; |
|
|
|
font-size: 0.22rem; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|