From 4b275f2093954cc58bbc23e4fc67e67d6fe81c0b Mon Sep 17 00:00:00 2001 From: Riku <risaku@163.com> Date: 星期日, 13 七月 2025 22:46:35 +0800 Subject: [PATCH] 2025.7.13 污染动态溯源 --- src/components/monitor/VehicleData.vue | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/components/monitor/VehicleData.vue b/src/components/monitor/VehicleData.vue index 6121556..cef00bd 100644 --- a/src/components/monitor/VehicleData.vue +++ b/src/components/monitor/VehicleData.vue @@ -1,11 +1,25 @@ <template> - <el-row class="wrap"> - <el-form :inline="true"> + <el-row justify="start" class="wrap"> + <!-- <el-space direction="vertical" :size="0"> + <el-icon size="30"><Stopwatch /></el-icon> + <el-text class="speed-text">SPD</el-text> + </el-space> + <div> + <el-text class="speed-number">{{ speed }}</el-text> + <el-text class="speed-unit"><sub>km/h</sub></el-text> + </div> --> + <FactorIconText + elIcon="Odometer" + label="SPD" + :value="speed" + unit="km/h" + ></FactorIconText> + <!-- <el-form :inline="true"> <el-form-item label="杞﹂�燂細" class="tag-2"> - {{ speed }} + {{ speed }}km/h </el-form-item> - </el-form> - <GaugeChart name="杞﹂��" :speed="speed"></GaugeChart> + </el-form> --> + <!-- <GaugeChart name="杞﹂��" :value="speed"></GaugeChart> --> </el-row> </template> <script> @@ -14,17 +28,21 @@ export default { props: { loading: Boolean, - factorDatas: FactorDatas + factorDatas: FactorDatas, + speed: { + type: Number, + default: 0 + } }, data() { return { - speed: '--km/h' + // speed: 0 }; }, watch: { factorDatas: { handler(nV) { - this.speed = this.lastOne(nV, '14') + 'km/h'; + // this.speed = this.lastOne(nV, '14'); }, deep: true } @@ -36,9 +54,15 @@ const lastIndex = f.datas.length - 1; return factorDatas.factor[key].datas[lastIndex].factorData; } else { - return '--'; + return 0; } } } }; </script> +<style scoped> +.wrap { + /* flex-direction: column; */ + /* background-color: antiquewhite; */ +} +</style> -- Gitblit v1.9.3