From 5d21d930174f6b065632834743d4ba3a07d4e7f7 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Apr 2025 11:20:05 +0800
Subject: [PATCH] Merge branch 'master' into test

---
 src/views/SignMachineNest/MachineRight/InspectionRaskList.vue |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
index e0b8d20..e8d3f91 100644
--- a/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
+++ b/src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
@@ -24,15 +24,14 @@
 				:infinite-scroll-disabled="busy"
 				infinite-scroll-immediate="true"
 			>
-				>
 				<div class="item" v-for="(item, index) in tableList">
 					<div class="left" @click="taskClick(item)">
 						<div class="left-t">
-							<span>{{ index + 1 }}.</span>
-							{{ item.name }}
-							<span class="status" :class="item.status === 2 ? 'active' : ''">
+							<div>{{ index + 1 }}.</div>
+							<div class="t-name">{{item.name}}</div>
+							<div class="status" :class="item.status === 2 ? 'active' : ''">
 								{{ getStatusText(item.status) }}
-							</span>
+							</div>
 						</div>
 						<div class="left-b">
 							<img src="../../../assets/images/signMachineNest/machineRight/date.png" alt="" />
@@ -201,6 +200,12 @@
 const taskClick = item => {
 	if (tabIndex.value === 1) {
 		// 展示当前任务详情
+		if (!item?.device_sns.length) return ElMessage.warning('没有device_sns');
+		if (item?.device_sns?.length !== 1) {
+			// todo 后续开发
+			ElMessage.success('即将跳转到集群调度');
+			return
+		}
 		currentInfoId.value = item.wayline_job_info_id
 		isShowCurrentTaskDetails.value = true
 	} else {
@@ -212,7 +217,13 @@
 
 watch([() => tabIndex.value, () => tableList.value], async ([newTabIndex, newTableList]) => {
 	if (newTabIndex == 1 && newTableList.length > 0) {
-		await getTaskDetails(newTableList[0].wayline_job_info_id)
+		const params = {
+			// 航线信息id
+			wayLineJobInfoId:newTableList[0].wayline_job_info_id,
+			// 当前航线id
+			waylineJobId:newTableList[0].id,
+		}
+		await getTaskDetails(params)
 	}
 })
 
@@ -312,13 +323,19 @@
 			.left {
 				cursor: pointer;
 				.left-t {
+					display: flex;
 					height: 24px;
 					font-size: 16px;
 					margin-bottom: 4px;
+					.t-name {
+						width: 180px;
+						white-space: nowrap; // 不换行
+						overflow: hidden; // 超出隐藏
+						text-overflow: ellipsis; // 显示省略号
+					}
 					.status {
 						text-align: center;
 						font-size: 12px;
-						display: inline-block;
 						width: 48px;
 						height: 20px;
 						background: rgba(76, 166, 255, 0.08);
@@ -335,6 +352,10 @@
 				.left-b {
 					height: 21px;
 					line-height: 21px;
+					width: 260px; // 添加固定宽度
+					white-space: nowrap; // 不换行
+					overflow: hidden; // 超出隐藏
+					text-overflow: ellipsis; // 显示省略号
 					img {
 						width: 16px;
 						height: 16px;

--
Gitblit v1.9.3