From 397dbf892f842c834af17a91c788c94fd96003f8 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 29 五月 2023 19:13:31 +0800
Subject: [PATCH] 问题修改

---
 igds-app/js/admin/es-real-electric.js |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/igds-app/js/admin/es-real-electric.js b/igds-app/js/admin/es-real-electric.js
index d1147df..ed77e96 100644
--- a/igds-app/js/admin/es-real-electric.js
+++ b/igds-app/js/admin/es-real-electric.js
@@ -43,6 +43,7 @@
 	electricList = [{
 			"depotId": "18",
 			"depotName": "鍋氫竴鍑犲姞",
+			"depotType": "02",
 			"ua": 97,
 			"ub": 43,
 			"uc": 81,
@@ -54,6 +55,7 @@
 		{
 			"depotId": "35",
 			"depotName": "灞傝兘姣旂淮",
+			"depotType": "01",
 			"ua": 71,
 			"ub": 60,
 			"uc": 45,
@@ -65,6 +67,7 @@
 		{
 			"depotId": "61",
 			"depotName": "浠庡懆闃剁孩鍏�",
+			"depotType": "02",
 			"ua": 88,
 			"ub": 94,
 			"uc": 77,
@@ -76,6 +79,7 @@
 		{
 			"depotId": "31",
 			"depotName": "鐏簲鍐垫柉鏈簲鍘�",
+			"depotType": "03",
 			"ua": 76,
 			"ub": 76,
 			"uc": 68,
@@ -87,6 +91,7 @@
 		{
 			"depotId": "20",
 			"depotName": "璇濈編涔︾潃鍏锋潵鍒�",
+			"depotType": "01",
 			"ua": 96,
 			"ub": 5,
 			"uc": 83,
@@ -103,13 +108,12 @@
 	if (electricList && electricList.length > 0) {
 		$.each(electricList, function(index, item) {
 			html += '<li><div class="con"><div class="tit"><div class="t1">';
-			if (index % 3 == 0) {
+			if (item.depotType == '01') {
 				html += '<span class="bg" style="background-image: url(images/d1.png);"></span>';
-			}
-			if (index % 3 == 1) {
+			}else if (item.depotType == '02') {
 				html += '<span class="bg" style="background-image: url(images/d2.png);"></span>'
 			}
-			if (index % 3 == 2) {
+			if (item.depotType == '03') {
 				html += '<span class="bg" style="background-image: url(images/d3.png);"></span>'
 			}
 			html += '<span>' + item.depotName + '</span></div><span class="time">' + item.updateTime +

--
Gitblit v1.9.3