Browse Source

commit

master
xuhuihui 3 years ago
parent
commit
21f38ab1bc
  1. BIN
      04.系统编码/Frontend/public/images/T-logP.png
  2. 84
      04.系统编码/Frontend/src/components/MicrowaveRadiation.vue

BIN
04.系统编码/Frontend/public/images/T-logP.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

84
04.系统编码/Frontend/src/components/MicrowaveRadiation.vue

@ -36,9 +36,9 @@
<el-col :span="8"><span :class="{'active': currentElement === 'six-minute'}" <el-col :span="8"><span :class="{'active': currentElement === 'six-minute'}"
@click="onElementClick('six-minute', -2, 6,0)">6分钟</span></el-col> @click="onElementClick('six-minute', -2, 6,0)">6分钟</span></el-col>
<el-col :span="8"><span :class="{'active': currentElement === 'half-hour'}" <el-col :span="8"><span :class="{'active': currentElement === 'half-hour'}"
@click="onElementClick('half-hour', -12, 30,-2)">30分钟</span></el-col> @click="onElementClick('half-hour', -12, 30,0)">30分钟</span></el-col>
<el-col :span="8"><span :class="{'active': currentElement === 'one-hour'}" <el-col :span="8"><span :class="{'active': currentElement === 'one-hour'}"
@click="onElementClick('one-hour', -24, 60,-4)">1小时</span></el-col> @click="onElementClick('one-hour', -24, 60,0)">1小时</span></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -139,6 +139,12 @@
<div id="convectiveHighChartCIN" style="width:100%;height:75%"></div> <div id="convectiveHighChartCIN" style="width:100%;height:75%"></div>
</div> </div>
</div> </div>
<div v-if="currentTab === 'T-logP'" class="picture-container contrast-picture-container">
<img src="public/images/T-logP.png" style="width: 80%;height: 80%">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -151,7 +157,7 @@ import {get} from '../uilts/axios';
import { BoxDrawer, ColorChart, createEmptyCanvas } from "../uilts/box-drawer"; import { BoxDrawer, ColorChart, createEmptyCanvas } from "../uilts/box-drawer";
import { Constant } from "../model/constant"; import { Constant } from "../model/constant";
import { HighChartCreate } from "../model/high-chart-create"; import { HighChartCreate } from "../model/high-chart-create";
import {ElMessage, ElMessageBox} from 'element-plus' import { ElMessage } from 'element-plus'
export default { export default {
name: 'MicrowaveRadiation', name: 'MicrowaveRadiation',
setup() { setup() {
@ -227,7 +233,6 @@ export default {
initEcharts(name); initEcharts(name);
reloadChangeData(); reloadChangeData();
}, 500) }, 500)
} }
const initEcharts = (name) => { const initEcharts = (name) => {
@ -327,14 +332,13 @@ export default {
} }
now.minute(now.minute() - options.apiTimeInterval); now.minute(now.minute() - options.apiTimeInterval);
for (let i = 0; i < 20; i++) { for (let i = 0; i < 24; i++) {
options.times.push({ options.times.push({
hour: now.add(options.apiTimeInterval, 'minute').format('HH时'), hour: now.add(options.apiTimeInterval, 'minute').format('HH时'),
minute: now.format('mm'), minute: now.format('mm'),
date: now.format('YYYY-MM-DD HH:mm:00') date: now.format('YYYY-MM-DD HH:mm:00')
}); });
} }
options.index = options.times.length - 1; options.index = options.times.length - 1;
options.titleStartTime = options.times[0].date; options.titleStartTime = options.times[0].date;
if (callback != null) if (callback != null)
@ -342,7 +346,7 @@ export default {
} }
const initHours = () => { const initHours = () => {
for (let i = 0; i < 24; i++) { for (let i = 1; i < 24; i++) {
options.hours.push({ options.hours.push({
value: i, value: i,
label: i < 10 ? '0' + i : i, label: i < 10 ? '0' + i : i,
@ -386,45 +390,45 @@ export default {
} }
// //
const onPlayClick = () => { // const onPlayClick = () => {
options.isPlay = !options.isPlay; // options.isPlay = !options.isPlay;
if (options.isPlay) { // if (options.isPlay) {
timeExcute(); // timeExcute();
} else { // } else {
clearTimer(); // clearTimer();
} // }
} // }
const timeExcute = () => { // const timeExcute = () => {
clearTimer(); // clearTimer();
let element = getCurrentElement(); // let element = getCurrentElement();
timer = setInterval(() => { // timer = setInterval(() => {
options.index++; // options.index++;
if (options.index > element.childElementCount - 1) // if (options.index > element.childElementCount - 1)
options.index = 0; // options.index = 0;
setCurrentPlayElement(element); // setCurrentPlayElement(element);
}, 2000) // }, 2000)
} // }
const clearTimer = () => { // const clearTimer = () => {
if (timer) // if (timer)
clearInterval(timer); // clearInterval(timer);
} // }
const getCurrentElement = () => { const getCurrentElement = () => {
return document.querySelector('.times'); return document.querySelector('.times');
} }
const setCurrentPlayElement = (element) => { // const setCurrentPlayElement = (element) => {
for (let i = 0; i < element.childElementCount; i++) // for (let i = 0; i < element.childElementCount; i++)
element.children[i].classList.remove('active'); // element.children[i].classList.remove('active');
element.children[options.index].classList.add('active'); // element.children[options.index].classList.add('active');
if (options.currentTab === 'MWR') { // if (options.currentTab === 'MWR') {
options.currentTime = options.days[options.index].date; // options.currentTime = options.days[options.index].date;
} else { // } else {
options.currentTime = options.times[options.index].date; // options.currentTime = options.times[options.index].date;
} // }
} // }
const onChange = () => { const onChange = () => {
initTimeLine(reloadChangeData); initTimeLine(reloadChangeData);
@ -696,7 +700,7 @@ export default {
onPrevDayClick, onPrevDayClick,
onNextDayClick, onNextDayClick,
onRefreshClick, onRefreshClick,
onPlayClick, // onPlayClick,
onChange, onChange,
onImageLoad, onImageLoad,
changeColor, changeColor,

Loading…
Cancel
Save