From a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 16 Apr 2025 20:49:12 +0800
Subject: [PATCH] feat:事件弹窗显示调整

---
 src/views/Home/HomeLeft/MachineNestList.vue |   53 ++++++++++++++++++++++++-----------------------------
 1 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/src/views/Home/HomeLeft/MachineNestList.vue b/src/views/Home/HomeLeft/MachineNestList.vue
index edd2d42..8b4ccf8 100644
--- a/src/views/Home/HomeLeft/MachineNestList.vue
+++ b/src/views/Home/HomeLeft/MachineNestList.vue
@@ -5,38 +5,44 @@
 	<div class="machine-nest-list">
 		<MachineNestTotal @searchNickName="handleSearch" />
 		<div class="content-wrapper">
-			<div
+			<!-- <div
 				class="table-list"
 				v-if="tableList.length > 0"
 				infinite-scroll-distance="6"
 				v-infinite-scroll="loadMore"
 				:infinite-scroll-disabled="busy"
 				infinite-scroll-immediate="true"
+			> -->
+			<div
+				class="table-list"
+				v-if="tableList.length > 0"
 			>
 				<div
 					:class="[index % 2 === 1 ? 'table-itemeven' : 'table-item']"
 					v-for="(item, index) in tableList"
-					:key="index"
+					:key="index" @click="signMachineNestClick(item)"
 				>
 					<img src="/src/assets/images/home/homeLeft/machinenestlist-sign.png" alt="" />
 					<div class="middle">
 						<div class="title">{{ item.nickname }}</div>
 						<div class="number">
-							飞行次数:<span>{{ item.fly_count }}</span
-							>次 飞行里程:<span>{{ item.flight_mileage }}</span
-							>km
+							飞行次数:
+							<span>{{ item.fly_count }}</span>
+							次 飞行里程:
+							<span>{{ item.flight_mileage }}</span>
+							km
 						</div>
 						<div class="result">
-							任务成果:<span>{{ item.accumulate_data }}</span
-							>个 飞行时长:<span>{{ item.hour }}</span
-							>h
+							任务成果:
+							<span>{{ item.accumulate_data }}</span>
+							个 飞行时长:
+							<span>{{ item.hour }}</span>
+							h
 						</div>
 					</div>
 					<div
 						class="right"
-						:class="item.status === 'WORKING' ? 'atcive' : item.status === 'OFFLINE' ? 'offine' : 'freetime'"
-						@click="signMachineNestClick(item)"
-					>
+						:class="item.status === 'WORKING' ? 'atcive' : item.status === 'OFFLINE' ? 'offine' : 'freetime'">
 						{{ item.status === 'OFFLINE' ? '离线中' : item.status === 'WORKING' ? '作业中' : '空闲中' }}
 					</div>
 				</div>
@@ -71,7 +77,7 @@
 // 分页参数
 const pageParams = ref({
 	current: 1,
-	size: 8,
+	size: 99,
 	total: 0,
 })
 
@@ -81,14 +87,15 @@
 const getTableList = () => {
 	const params = {
 		nickname: searchText.value,
-		current: pageParams.value.current,
+		current: 1,
 		size: pageParams.value.size,
 	}
 	selectDevicePage(params).then(res => {
 		if (res.data.code !== 0) return
 		if (res.data.data.records.length === 0) return (isMore.value = false)
-		pageParams.value.current += 1
-		tableList.value = [...tableList.value, ...res.data.data.records]
+		// pageParams.value.current += 1
+		// pageParams.value.size += 8
+		tableList.value = res.data.data.records;// [...tableList.value, ...res.data.data.records]
 		busy.value = false
 	})
 }
@@ -103,18 +110,6 @@
 	searchText.value = name
 	pageParams.value.current = 1
 	tableList.value = []
-	getTableList()
-}
-
-// 分页方法
-const handleSizeChange = val => {
-	pageParams.value.size = val
-	pageParams.value.current = 1
-	getTableList()
-}
-
-const handleCurrentChange = val => {
-	pageParams.value.current = val
 	getTableList()
 }
 
@@ -218,11 +213,11 @@
 			}
 			// 空闲中
 			.freetime {
-				color: #ffa768;
+				color: #04f020;
 			}
 			// 作业中
 			.atcive {
-				color: #04f020;
+				color: #ffa768;
 				background: linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, #154671 50%, rgba(12, 45, 92, 1) 100%),
 					linear-gradient(90deg, rgba(12, 45, 92, 1) 0%, rgba(12, 45, 92, 1) 50%, rgba(12, 45, 92, 1) 100%);
 			}

--
Gitblit v1.9.3