From 48bc5ec76be628ed581d3201150bddaeaadeed3e Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 29 Mar 2025 14:14:06 +0800
Subject: [PATCH] feat:增加机巢数据和巡检详情
---
/dev/null | 7 --
src/views/Home/components/HomeLeft/HomeLeft.vue | 56 ------------------
src/views/SignMachineNest/components/MachineLeft/MachineLeft.vue | 24 ++++++++
src/views/SignMachineNest/components/MachineRight/MachineRight.vue | 0
src/components/CommonWeather.vue | 63 +++++++++++++++++++++
src/views/SignMachineNest/SignMachineNest.vue | 4
src/views/SignMachineNest/components/MachineLeft/InspectionRaskDetails.vue | 4 +
src/views/SignMachineNest/components/MachineLeft/MachineData.vue | 4 +
8 files changed, 99 insertions(+), 63 deletions(-)
diff --git a/src/components/CommonWeather.vue b/src/components/CommonWeather.vue
new file mode 100644
index 0000000..5ff5314
--- /dev/null
+++ b/src/components/CommonWeather.vue
@@ -0,0 +1,63 @@
+<template>
+ <div class="time-weather">
+ <div class="time">{{ time }}</div>
+ <div class="line"></div>
+ <div class="weather">
+ <img src="@/assets/images/home/homeLeft/tq.png" alt="" />
+ <span class="tq">阴天</span>
+ <span class="qk">适合飞行</span>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import dayjs from 'dayjs';
+
+
+const time = ref('');
+const updateTime = () => {
+ time.value = dayjs().format('YYYY.MM.DD HH:mm:ss');
+};
+onMounted(() => {
+ updateTime(); // 立即执行一次
+ time.value = setInterval(updateTime, 1000);
+});
+onUnmounted(() => {
+ if (time.value) {
+ clearInterval(time.value);
+ time.value = null;
+ }
+});
+</script>
+
+<style scoped lang="scss">
+.time-weather {
+ margin-left: 45px;
+ width: 310px;
+ font-size: 14px;
+ height: 36px;
+ line-height: 36px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .line {
+ border: 1px solid #ffffff;
+ height: 10px;
+ opacity: 0.5;
+ }
+ .weather {
+ img {
+ width: 20px;
+ height: 20px;
+ }
+ .tq {
+ margin: 0 5px;
+ color: #e7f5ff;
+ }
+ .qk {
+ margin-left: 5px;
+ color: #04f043;
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/views/Home/components/HomeLeft/HomeLeft.vue b/src/views/Home/components/HomeLeft/HomeLeft.vue
index 48d86b4..db2e4b9 100644
--- a/src/views/Home/components/HomeLeft/HomeLeft.vue
+++ b/src/views/Home/components/HomeLeft/HomeLeft.vue
@@ -1,15 +1,7 @@
<template>
<div class="home-left">
<!--时间 天气-->
- <div class="time-weather">
- <div class="time">{{ time }}</div>
- <div class="line"></div>
- <div class="weather">
- <img src="@/assets/images/home/homeLeft/tq.png" alt="" />
- <span class="tq">阴天</span>
- <span class="qk">适合飞行</span>
- </div>
- </div>
+ <common-weather></common-weather>
<!--机巢概况-->
<overview-next></overview-next>
<!--巡检任务情况-->
@@ -20,23 +12,8 @@
<script setup>
import OverviewNext from './OverviewNext.vue';
import InspectionRaskDetails from './InspectionRaskDetails.vue';
-import dayjs from 'dayjs';
+import CommonWeather from '@/components/CommonWeather.vue';
-
-const time = ref('');
-const updateTime = () => {
- time.value = dayjs().format('YYYY.MM.DD HH:mm:ss');
-};
-onMounted(() => {
- updateTime(); // 立即执行一次
- time.value = setInterval(updateTime, 1000);
-});
-onUnmounted(() => {
- if (time.value) {
- clearInterval(time.value);
- time.value = null;
- }
-});
</script>
<style scoped lang="scss">
@@ -44,34 +21,5 @@
position: absolute;
top: 88px;
color: #e7f5ff;
- .time-weather {
- margin-left: 45px;
- width: 310px;
- font-size: 14px;
- height: 36px;
- line-height: 36px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .line {
- border: 1px solid #ffffff;
- height: 10px;
- opacity: 0.5;
- }
- .weather {
- img {
- width: 20px;
- height: 20px;
- }
- .tq {
- margin: 0 5px;
- color: #e7f5ff;
- }
- .qk {
- margin-left: 5px;
- color: #04f043;
- }
- }
- }
}
</style>
diff --git a/src/views/SignMachineNest/SignMachineNest.vue b/src/views/SignMachineNest/SignMachineNest.vue
index bdc6aa4..2ff56b8 100644
--- a/src/views/SignMachineNest/SignMachineNest.vue
+++ b/src/views/SignMachineNest/SignMachineNest.vue
@@ -4,6 +4,6 @@
</template>
<script setup>
-import MachineLeft from './components/MachineLeft.vue'
-import MachineRight from './components/MachineRight.vue';
+import MachineLeft from './components/MachineLeft/MachineLeft.vue'
+import MachineRight from './components/MachineRight/MachineRight.vue';
</script>
\ No newline at end of file
diff --git a/src/views/SignMachineNest/components/MachineLeft.vue b/src/views/SignMachineNest/components/MachineLeft.vue
deleted file mode 100644
index 98c95a6..0000000
--- a/src/views/SignMachineNest/components/MachineLeft.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-<template>
- <div class="machine-left">左边</div>
-</template>
-
-<script setup></script>
-
-<style scoped lang="scss"></style>
\ No newline at end of file
diff --git a/src/views/SignMachineNest/components/MachineLeft/InspectionRaskDetails.vue b/src/views/SignMachineNest/components/MachineLeft/InspectionRaskDetails.vue
new file mode 100644
index 0000000..c3fb570
--- /dev/null
+++ b/src/views/SignMachineNest/components/MachineLeft/InspectionRaskDetails.vue
@@ -0,0 +1,4 @@
+<!-- 巡检任务数据 -->
+<template>
+ <div>巡检任务数据</div>
+</template>
\ No newline at end of file
diff --git a/src/views/SignMachineNest/components/MachineLeft/MachineData.vue b/src/views/SignMachineNest/components/MachineLeft/MachineData.vue
new file mode 100644
index 0000000..c161746
--- /dev/null
+++ b/src/views/SignMachineNest/components/MachineLeft/MachineData.vue
@@ -0,0 +1,4 @@
+<!-- 机巢数据 -->
+<template>
+ <div>机巢数据</div>
+</template>
\ No newline at end of file
diff --git a/src/views/SignMachineNest/components/MachineLeft/MachineLeft.vue b/src/views/SignMachineNest/components/MachineLeft/MachineLeft.vue
new file mode 100644
index 0000000..52adde4
--- /dev/null
+++ b/src/views/SignMachineNest/components/MachineLeft/MachineLeft.vue
@@ -0,0 +1,24 @@
+<template>
+ <div class="machine-left">
+ <!--时间 天气-->
+ <common-weather></common-weather>
+ <!-- 机巢数据 -->
+ <MachineData></MachineData>
+ <!--巡检任务详情-->
+ <InspectionRaskDetails></InspectionRaskDetails>
+ </div>
+</template>
+
+<script setup>
+import CommonWeather from '@/components/CommonWeather.vue';
+import MachineData from './MachineData.vue';
+import InspectionRaskDetails from './InspectionRaskDetails.vue';
+</script>
+
+<style scoped lang="scss">
+.machine-left {
+ position: absolute;
+ top: 88px;
+ color: #e7f5ff;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/SignMachineNest/components/MachineRight.vue b/src/views/SignMachineNest/components/MachineRight/MachineRight.vue
similarity index 100%
rename from src/views/SignMachineNest/components/MachineRight.vue
rename to src/views/SignMachineNest/components/MachineRight/MachineRight.vue
--
Gitblit v1.9.3