From 888bc41f22b18b6ab05f248266a2c36d046ff717 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 01 Apr 2025 13:37:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/SignMachineNest/components/MachineLeft/MachineData.vue | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/views/SignMachineNest/components/MachineLeft/MachineData.vue b/src/views/SignMachineNest/components/MachineLeft/MachineData.vue
index f6be978..c70bbaa 100644
--- a/src/views/SignMachineNest/components/MachineLeft/MachineData.vue
+++ b/src/views/SignMachineNest/components/MachineLeft/MachineData.vue
@@ -13,6 +13,7 @@
</template>
<script setup>
+import { getFlightStatistics } from '@/api/home/machineNest.js'
import { pxToRem } from '@/utils/rem';
import CommonTitle from '@/components/CommonTitle.vue';
import rwcs from '@/assets/images/signMachineNest/machineLeft/rwcs.png';
@@ -27,10 +28,28 @@
{ imgurl: sjs, num: 1314, text: '事件数(件)' },
{ imgurl: jscb, num: 1314, text: '节省成本(万元)' },
{ imgurl: rwcg, num: 1314, text: '任务成果(个)' },
- { imgurl: fxlc, num: 1314, text: '飞行里程' },
+ { imgurl: fxlc, num: 1314, text: '飞行里程(公里)' },
{ imgurl: fxsc, num: 1314, text: '飞行时长' },
]);
+// 获取机巢统计数据
+const getMachineData = () => {
+ let dockSn = ref('4TADKCM0010016');
+ getFlightStatistics(dockSn.value).then(res => {
+ if (res.data.code !== 0) return;
+ const result = res.data.data;
+ statisticsList.value[0].num = result.fly_count || 0;
+ statisticsList.value[1].num = result.event_count || 0;
+ statisticsList.value[2].num = result.min_count || 0;
+ statisticsList.value[3].num = result.achievement_count || 0;
+ statisticsList.value[4].num = result.flight_mileage || 0;
+ statisticsList.value[5].num = result.hour_count || 0;
+ })
+};
+
+onMounted(() => {
+ getMachineData();
+});
</script>
<style lang="scss" scoped>
@@ -63,7 +82,7 @@
}
.num-text {
.num {
- width: 72px;
+ width: 120px;
height: 24px;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
font-weight: 400;
--
Gitblit v1.9.3