From 7635213630830c4cbb9ff6ada69ba9b5c8a35d42 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 03 Apr 2025 11:05:34 +0800
Subject: [PATCH] feat: 地图居中点调整
---
src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue b/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
index 50303ca..5c8d29e 100644
--- a/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
+++ b/src/views/SignMachineNest/components/MachineRight/MachineMonitor.vue
@@ -2,12 +2,35 @@
<template>
<CommonTitle title="机巢监控" />
<div :style="{ marginLeft: pxToRem(14) }">
- <div class="machine-monitor"></div>
+ <div class="machine-monitor">
+ <LiveVideo :videoUrl="airPortUrl" />
+ </div>
</div>
</template>
<script setup>
import CommonTitle from '@/components/CommonTitle.vue';
+import LiveVideo from '@/components/LiveVideo.vue';
+import { liveStart } from '@/api/home/machineNest';
+// import { CURRENT_CONFIG as config } from '@/utils/http/config'
+import { useStore } from 'vuex';
+
+
+const store = useStore();
+// 单个机巢信息
+const singleUavHome = computed(() => store.state.home.singleUavHome);
+// 直播地址
+let airPortUrl = ref('');
+// 获取直播地址
+const getVideoUrl = () => {
+ liveStart(singleUavHome.value.device_sn).then(res => {
+ if (res.data.code !== 0) return;
+ airPortUrl.value = res.data.data.rtcs_url;
+ });
+};
+onMounted(() => {
+ getVideoUrl();
+});
</script>
<style lang="scss" scoped>
@@ -24,6 +47,6 @@
margin: 2px 0 13 0;
display: flex;
justify-content: space-between;
- padding: 11px 27px 0;
+ padding: 12px 10px 0;
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3