From 038ff2930c53d1d48e5fa1038875f43fe5dfe64d Mon Sep 17 00:00:00 2001
From: tanghaolin <1723298894@qq.com>
Date: 星期四, 20 二月 2025 12:01:35 +0800
Subject: [PATCH] 添加变速曲线图标

---
 src/views/EecLabel.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/views/EecLabel.vue b/src/views/EecLabel.vue
index 47c8d00..16c4acd 100644
--- a/src/views/EecLabel.vue
+++ b/src/views/EecLabel.vue
@@ -268,6 +268,20 @@
 		.then((res) => {
 			state.m_PageLoading = false;
 			let result = res.data;
+			result.sort((a: any, b: any) => {
+				const aPrefix = a.Model.slice(0, 3);
+				const bPrefix = b.Model.slice(0, 3);
+				const aContainsDP = aPrefix.includes('DP') || aPrefix.includes('DRL');
+				const bContainsDP = bPrefix.includes('DP') || bPrefix.includes('DRL');
+
+				if (aContainsDP && !bContainsDP) {
+					return -1;
+				} else if (!aContainsDP && bContainsDP) {
+					return 1;
+				} else {
+					return 0;
+				}
+			});
 			let arr = [];
 			result.forEach((item: any, index: number) => {
 				let node = {
@@ -335,7 +349,6 @@
 		localStorage.setItem('currentProduct', JSON.stringify(currentProduct));
 	}
 	router.push(`/product/${currentProduct.Id}`);
-
 };
 const clickDetailCertifcate = (row: any) => {
 	state.m_detailDialogInfo = row;

--
Gitblit v1.9.3