From 3832a82fb79d4cec4cca5e2854e54953f2095ef8 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 06 九月 2024 16:55:08 +0800 Subject: [PATCH] 1. 添加溯源清单功能 2. 修复切换至走航监测界面后,之前正在加载的历史数据依旧展示至地图的问题 3. 添加折线图下载图片功能; 4. 添加数据导出功能; 5. 添加设备管理功能; 6. 添加数据弹框和溯源清单开关功能; 7. 优化3D里面的颜色展示逻辑,底部颜色由原来的因子最小值颜色改为当前量级的上一个量级对应的颜色 --- src/views/realtimemode/component/DashBoard.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/views/realtimemode/component/DashBoard.vue b/src/views/realtimemode/component/DashBoard.vue index 13df5ad..30c87e6 100644 --- a/src/views/realtimemode/component/DashBoard.vue +++ b/src/views/realtimemode/component/DashBoard.vue @@ -3,8 +3,17 @@ <el-col v-show="show" span="10"> <BaseCard> <template #content> - <WeatherData :factor-datas="factorDatas"></WeatherData> - <VehicleData :factor-datas="factorDatas"></VehicleData> + <WeatherData + :factor-datas="factorDatas" + :temprature="temprature" + :humidity="humidity" + :wind-direction="windDirection" + :wind-speed="windSpeed" + ></WeatherData> + <VehicleData :factor-datas="factorDatas" :speed="speed"></VehicleData> + <el-row justify="center"> + <div class="tag-time">鏃堕棿锛歿{ time }}</div> + </el-row> </template> </BaseCard> </el-col> @@ -15,6 +24,7 @@ </template> <script> import { FactorDatas } from '@/model/FactorDatas'; +import { realTimeMapAnimation } from '@/utils/map/animation'; export default { props: { @@ -25,8 +35,44 @@ }, data() { return { - show: true + show: true, + temprature: '--', + humidity: '--', + windDirection: '--', + windSpeed: '--', + speed: '0', + time: '----/--/--' }; + }, + methods: { + getFactorData(factorDatas, index, key, scale = 10) { + const _factor = factorDatas.factor[key]; + if (_factor != undefined) { + let d = _factor.datas[index].factorData; + return Math.round(d * scale) / scale; + } else { + return '--'; + } + }, + refresh(factorDatas, index) { + this.temprature = this.getFactorData(factorDatas, index, '8') + ''; + this.humidity = this.getFactorData(factorDatas, index, '9') + ''; + this.windDirection = this.getFactorData(factorDatas, index, '17') + ''; + this.windSpeed = this.getFactorData(factorDatas, index, '16') + ''; + this.speed = this.getFactorData(factorDatas, index, '14', 1); + this.time = factorDatas.times[index]; + } + }, + mounted() { + realTimeMapAnimation.setOnEachFrameCallback(this.refresh); } }; </script> +<style scoped> +.tag-time { + padding: 2px 4px; + border: 1px solid white; + border-radius: 2px; + -moz-border-radius: 25px; +} +</style> -- Gitblit v1.9.3