|
|
|
<template>
|
|
|
|
<div class="tabs">
|
|
|
|
<div class="tab-item" @click="onTabClick('垂直廓线')" :class="{'active': currentTab === '垂直廓线'}">
|
|
|
|
垂直廓线
|
|
|
|
<img src="/images/line.png" v-if="currentTab === '垂直廓线'" />
|
|
|
|
</div>
|
|
|
|
<div class="tab-item" @click="onTabClick('对流指数对流指数对流指数')" :class="{'active': currentTab === '对流指数对流指数对流指数'}">
|
|
|
|
对流指数对流指数对流指数
|
|
|
|
<img src="/images/line.png" v-if="currentTab === '对流指数对流指数对流指数'" />
|
|
|
|
</div>
|
|
|
|
<div class="tab-item" @click="onTabClick('T-logP图')" :class="{'active': currentTab === 'T-logP图'}">
|
|
|
|
T-logP图
|
|
|
|
<img src="/images/line.png" v-if="currentTab === 'T-logP图'" />
|
|
|
|
</div>
|
|
|
|
<div class="tab-item" @click="onTabClick('BP反演产品')" :class="{'active': currentTab === 'BP反演产品'}">
|
|
|
|
BP反演产品
|
|
|
|
<img src="/images/line.png" v-if="currentTab === 'BP反演产品'" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="main">
|
|
|
|
<div class="menu panel">
|
|
|
|
<div class="menu-item">
|
|
|
|
<h2 class="tip">区域选择</h2>
|
|
|
|
<el-row :gutter="12">
|
|
|
|
<el-col :span="8"><span @click="onRegionClick('江宁')" :class="{'active': currentRegion === '江宁'}">江宁</span></el-col>
|
|
|
|
<el-col :span="8"><span @click="onRegionClick('六合')" :class="{'active': currentRegion === '六合'}">六合</span></el-col>
|
|
|
|
<el-col :span="8"><span @click="onRegionClick('浦口')" :class="{'active': currentRegion === '浦口'}">浦口</span></el-col>
|
|
|
|
<el-col :span="8"><span @click="onRegionClick('高淳')" :class="{'active': currentRegion === '高淳'}">高淳</span></el-col>
|
|
|
|
<el-col :span="8"><span @click="onRegionClick('溧水')" :class="{'active': currentRegion === '溧水'}">溧水</span></el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
<div class="menu-item">
|
|
|
|
<h2 class="tip">要素选择</h2>
|
|
|
|
<el-row :gutter="12">
|
|
|
|
<el-col :span="8"><span @click="onElementClick('温度')" :class="{'active': currentElement === '温度'}">温度</span></el-col>
|
|
|
|
<el-col :span="8"><span @click="onElementClick('湿度')" :class="{'active': currentElement === '湿度'}">湿度</span></el-col>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container panel">
|
|
|
|
<div class="toolbar">
|
|
|
|
<div class="times">
|
|
|
|
<div class="time-item" v-for="(time, index) in times" :key="index" :class="time.name">
|
|
|
|
<span class="hour">{{time.hour}}</span>
|
|
|
|
<span class="minute" :class="{'active': currentTime === time.date}" @click="onTimeClick(time)">{{time.minute}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-date-picker v-model="date" type="date" placeholder="请选择" :clearable="false" :editable="false" class="date-picker">
|
|
|
|
</el-date-picker>
|
|
|
|
<div class="control-btn">
|
|
|
|
<span><img src="/images/prev.png" /></span>
|
|
|
|
<span><img src="/images/next.png" /></span>
|
|
|
|
</div>
|
|
|
|
<el-select v-model="currentHour" placeholder="">
|
|
|
|
<el-option
|
|
|
|
v-for="item in hours"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
<p class="unit">时</p>
|
|
|
|
<div class="refresh-btn">
|
|
|
|
<img src="/images/refresh.png" />
|
|
|
|
</div>
|
|
|
|
<div class="btns-group">
|
|
|
|
<span>播放动画</span>
|
|
|
|
<span>下载动画</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { onMounted, reactive, toRefs } from 'vue';
|
|
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'MicrowaveRadiation',
|
|
|
|
setup() {
|
|
|
|
let options = reactive({
|
|
|
|
currentTab: '垂直廓线',
|
|
|
|
currentRegion: '江宁',
|
|
|
|
currentElement: '温度',
|
|
|
|
date: new Date(),
|
|
|
|
currentHour: '10',
|
|
|
|
hours: [{
|
|
|
|
value: '10',
|
|
|
|
label: '10'
|
|
|
|
}, {
|
|
|
|
value: '11',
|
|
|
|
label: '11'
|
|
|
|
}],
|
|
|
|
times: [],
|
|
|
|
currentTime: null
|
|
|
|
})
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
initTimes();
|
|
|
|
})
|
|
|
|
|
|
|
|
const onTabClick = (name) => {
|
|
|
|
options.currentTab = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
const onRegionClick = (region) => {
|
|
|
|
options.currentRegion = region;
|
|
|
|
}
|
|
|
|
|
|
|
|
const onElementClick = (region) => {
|
|
|
|
options.currentElement = region;
|
|
|
|
}
|
|
|
|
|
|
|
|
const initTimes = () => {
|
|
|
|
let now = moment();
|
|
|
|
let minute = now.minute();
|
|
|
|
const remainder = minute % 6;
|
|
|
|
if (remainder > 0){
|
|
|
|
now.minute(minute + (6 - remainder));
|
|
|
|
}
|
|
|
|
|
|
|
|
options.currentTime = now.format('YYYY-MM-DD HH:mm');
|
|
|
|
now.minute(now.minute() - 6);
|
|
|
|
|
|
|
|
for (let i = 0; i < 20 ; i++) {
|
|
|
|
options.times.push({
|
|
|
|
hour: now.add(6, 'minute').format('HH时'),
|
|
|
|
minute: now.format('mm'),
|
|
|
|
date: now.format('YYYY-MM-DD HH:mm'),
|
|
|
|
name: 'hour' + now.format('HH')
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const onTimeClick = (time) => {
|
|
|
|
console.log(time.date)
|
|
|
|
options.currentTime = time.date;
|
|
|
|
console.log(options.currentTime)
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
...toRefs(options),
|
|
|
|
onTabClick,
|
|
|
|
onRegionClick,
|
|
|
|
onElementClick,
|
|
|
|
onTimeClick
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
|
|
</style>
|