From 9382a00fe89139663216673a1a8e8ddb8761a14d Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期二, 06 六月 2023 20:13:19 +0800 Subject: [PATCH] 无数据时的页面 --- igds-app/js/admin/es-detail.js | 71 ++++++++++------- igds-app/es-real-electric.html | 2 igds-app/js/admin/basic-depot.js | 2 igds-app/js/admin/es-real-electric.js | 144 +++++++++++++++++++---------------- 4 files changed, 120 insertions(+), 99 deletions(-) diff --git a/igds-app/es-real-electric.html b/igds-app/es-real-electric.html index eab5fd1..1253af4 100644 --- a/igds-app/es-real-electric.html +++ b/igds-app/es-real-electric.html @@ -114,7 +114,7 @@ <span class="time">2022-04-18 12:00</span> </div> <div class="inner"> - <div class="info">鏈�杩戜竴灏忔椂鐢ㄨ兘: <span>10.0</span>KW-h</div> + <div class="info">鏈�杩戜竴灏忔椂鐢ㄨ兘: <span class="time">10.0</span>KW-h</div> <div class="txt"> <div class="num">100 <span> V</span></div> diff --git a/igds-app/js/admin/basic-depot.js b/igds-app/js/admin/basic-depot.js index e789dc4..1ca5396 100644 --- a/igds-app/js/admin/basic-depot.js +++ b/igds-app/js/admin/basic-depot.js @@ -50,7 +50,7 @@ if(depotList && depotList.length > 0){ $.each(depotList, function(index, item) { html += '<li><div class="con">'; - html += '<div class="tit">浠撳簱鍚嶇О锛�<span>' + item.depotName + '</span></div>'; + html += '<div class="tit">浠撳簱鍚嶇О锛�<span>' + (item.depotName == null?"--":item.depotName) + '</span></div>'; html += '<div class="txt">'; html += '<div class="box"><div class="group type"><div class="desc">'; html += (item.depotTypeName == null?"--":item.depotTypeName) + '</div><div class="ort">浠撳簱绫诲瀷</div></div></div>'; diff --git a/igds-app/js/admin/es-detail.js b/igds-app/js/admin/es-detail.js index 6cde7f7..de8bc24 100644 --- a/igds-app/js/admin/es-detail.js +++ b/igds-app/js/admin/es-detail.js @@ -97,34 +97,36 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) - esDetailList = [{ - "depotId": "16", - "depotName": "鍊艰瘽鍚勫厓", - "startEs": "31", - "endEs": "56", - "epSum": "13", - "eqSum": "37", - "esSum": "25" - }, - { - "depotId": "2", - "depotName": "鍒掔偣鐜嬫暟闃�", - "startEs": "55", - "endEs": "47", - "epSum": "46", - "eqSum": "42", - "esSum": "59" - }, - { - "depotId": "34", - "depotName": "鍜屽鏂滑", - "startEs": "78", - "endEs": "24", - "epSum": "37", - "eqSum": "73", - "esSum": "83" - } - ] + // esDetailList = [{ + // "depotId": "16", + // "depotName": "鍊艰瘽鍚勫厓", + // "startEs": "31", + // "endEs": "56", + // "epSum": "13", + // "eqSum": "37", + // "esSum": "25" + // }, + // { + // "depotId": "2", + // "depotName": "鍒掔偣鐜嬫暟闃�", + // "startEs": "55", + // "endEs": "47", + // "epSum": "46", + // "eqSum": "42", + // "esSum": "59" + // }, + // { + // "depotId": "34", + // "depotName": "鍜屽鏂滑", + // "startEs": "78", + // "endEs": "24", + // "epSum": "37", + // "eqSum": "73", + // "esSum": "83" + // } + // ] + + } mui('.mui-content').on("tap", ".g-sobox div button", function() { @@ -155,8 +157,17 @@ html += '</ul></div></div></div>' }) } else { - html += - '<div class="wp"><div class="m-ck-cont"><div style="text-align: center;font-size: 20px;color:#dd524d;">鏆傛棤鑳借�楄鎯呬俊鎭�</div></div></div>'; + html += '<div class="wp"><div class="m-ck-cont"><div class="g-titck1">鏆傛棤鑳借�楄鎯呬俊鎭�</div>' + html += '<div class="m-energy1"><div class="inner"><div class="con con1">' + html += '<div class="num"><div class="l"></div><span>KWh</span></div><div class="desc">璧峰鑳借��</div></div></div>' + html += '<div class="inner"><div class="con con2">' + html += '<div class="num"><div class="l"></div><span>KWh</span></div><div class="desc">鎴鑳借��</div></div></div></div>' + html += '<div class="m-energy2"><div class="tit">鑳借�楃粺璁′俊鎭�</div><ul class="ul-txtliste1">' + html += '<li><div class="con"><div class="num"><span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>' + html += '<li><div class="con"><div class="num"><span>KWh</span></div><div class="desc">鏃犲姛鐢佃兘</div></div></li>' + html += '<li><div class="con"><div class="num"><span>KWh</span></div><div class="desc">鎬荤數鑳�</div></div></li>' + html += '</ul></div></div></div>' + } $("#recordList").html(html); } diff --git a/igds-app/js/admin/es-real-electric.js b/igds-app/js/admin/es-real-electric.js index ed77e96..aaf0ff1 100644 --- a/igds-app/js/admin/es-real-electric.js +++ b/igds-app/js/admin/es-real-electric.js @@ -40,67 +40,68 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) - electricList = [{ - "depotId": "18", - "depotName": "鍋氫竴鍑犲姞", - "depotType": "02", - "ua": 97, - "ub": 43, - "uc": 81, - "ia": 85, - "ib": 76, - "ic": 43, - "updateTime": "1982-03-19 23:26:43" - }, - { - "depotId": "35", - "depotName": "灞傝兘姣旂淮", - "depotType": "01", - "ua": 71, - "ub": 60, - "uc": 45, - "ia": 22, - "ib": 42, - "ic": 12, - "updateTime": "1980-11-10 20:35:36" - }, - { - "depotId": "61", - "depotName": "浠庡懆闃剁孩鍏�", - "depotType": "02", - "ua": 88, - "ub": 94, - "uc": 77, - "ia": 33, - "ib": 83, - "ic": 67, - "updateTime": "1972-03-23 06:15:44" - }, - { - "depotId": "31", - "depotName": "鐏簲鍐垫柉鏈簲鍘�", - "depotType": "03", - "ua": 76, - "ub": 76, - "uc": 68, - "ia": 80, - "ib": 54, - "ic": 2, - "updateTime": "2010-02-02 15:07:12" - }, - { - "depotId": "20", - "depotName": "璇濈編涔︾潃鍏锋潵鍒�", - "depotType": "01", - "ua": 96, - "ub": 5, - "uc": 83, - "ia": 74, - "ib": 49, - "ic": 37, - "updateTime": "2007-11-02 05:03:29" - } - ] + // electricList = [{ + // "depotId": "18", + // "depotName": "鍋氫竴鍑犲姞", + // "depotType": "02", + // "ua": 97, + // "ub": 43, + // "uc": 81, + // "ia": 85, + // "ib": 76, + // "ic": 43, + // "updateTime": "1982-03-19 23:26:43" + // }, + // { + // "depotId": "35", + // "depotName": "灞傝兘姣旂淮", + // "depotType": "01", + // "ua": 71, + // "ub": 60, + // "uc": 45, + // "ia": 22, + // "ib": 42, + // "ic": 12, + // "updateTime": "1980-11-10 20:35:36" + // }, + // { + // "depotId": "61", + // "depotName": "浠庡懆闃剁孩", + // "depotType": "02", + // "ua": 88, + // "ub": 94, + // "uc": 77, + // "ia": 33, + // "ib": 83, + // "ic": 67, + // "updateTime": "1972-03-23 06:15:44" + // }, + // { + // "depotId": "31", + // "depotName": "鐏簲鍐垫柉", + // "depotType": "03", + // "ua": 76, + // "ub": 76, + // "uc": 68, + // "ia": 80, + // "ib": 54, + // "ic": 2, + // "updateTime": "2010-02-02 15:07:12" + // }, + // { + // "depotId": "20", + // "depotName": "璇濈編涔︾潃鍏�", + // "depotType": "01", + // "ua": 96, + // "ub": 5, + // "uc": 83, + // "ia": 74, + // "ib": 49, + // "ic": 37, + // "updateTime": "2007-11-02 05:03:29" + // } + // ] + } //娓叉煋椤甸潰 function renderData() { @@ -110,15 +111,15 @@ html += '<li><div class="con"><div class="tit"><div class="t1">'; if (item.depotType == '01') { html += '<span class="bg" style="background-image: url(images/d1.png);"></span>'; - }else if (item.depotType == '02') { + } else if (item.depotType == '02') { html += '<span class="bg" style="background-image: url(images/d2.png);"></span>' } 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 + - '</span></div>'; - html += '<div class="inner"><div class="info">鏈�杩戜竴灏忔椂鐢ㄨ兘: <span>10.0</span>KW-h</div>'; + html += '<span>' + item.depotName + '</span></div></div>'; + html += '<div class="inner"><div class="info">鏇存柊鏃堕棿: <span style="font-size:15px">' + item + .updateTime + '</span></div>'; html += '<div class="txt"><div class="num">' + item.ua + ' <span> V</span></div><div class="desc">A鐩哥數鍘�</div></div>'; html += '<div class="txt"><div class="num">' + item.ub + @@ -134,8 +135,17 @@ html += '</div></div></li>' }) } else { - html += - '<li><div class="con myfancy" style="text-align: center;font-size: 20px;color:#dd524d">鏆傛棤瀹炴椂閰嶇數淇℃伅</div></li>'; + html += '<li><div class="con"><div class="tit"><div class="t1">'; + html += '<span class="bg" style="background-image: url(images/d1.png);"></span>'; + html += '<span>鏆傛棤閰嶇數鏁版嵁</span></div></div>'; + html += '<div class="inner"><div class="info">鏇存柊鏃堕棿: <span style="font-size:15px"></span></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">A鐩哥數鍘�</div></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">B鐩哥數鍘�</div></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">B鐩哥數鍘�</div></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">A鐩哥數娴�</div></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">B鐩哥數娴�</div></div>'; + html += '<div class="txt"><div class="num"><span> V</span></div><div class="desc">C鐩哥數娴�</div></div>'; + html += '</div></div></li>' } $("#recordList").html(html); } -- Gitblit v1.9.3