From a24e6ad3dd99b50e29af6f74c57fa646bca86d43 Mon Sep 17 00:00:00 2001 From: czt <czt18638530771@163.com> Date: 星期四, 02 一月 2025 17:15:48 +0800 Subject: [PATCH] 提交配置 --- igds-app/js/admin/es-read-meter.js | 46 ++++++++++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 16 deletions(-) diff --git a/igds-app/js/admin/es-read-meter.js b/igds-app/js/admin/es-read-meter.js index ad44464..4d3dde2 100644 --- a/igds-app/js/admin/es-read-meter.js +++ b/igds-app/js/admin/es-read-meter.js @@ -8,7 +8,7 @@ "tokenAuth": "", "data": { "deptId": "", - "dataTime": "" + "dateTime": "" } }; @@ -23,6 +23,7 @@ getMeterList(); } +//鏃ユ湡鏍煎紡鍖杫yyy-MM-dd function getDate(date) { var year = date.getFullYear(); var month, day; @@ -42,15 +43,18 @@ type: "date", //璁剧疆鏃ュ巻鍒濆瑙嗗浘妯″紡 // beginDate: new Date(2015, 04, 25), //璁剧疆寮�濮嬫棩鏈� // endDate: new Date(2016, 04, 25), //璁剧疆缁撴潫鏃ユ湡 - + value:dateTime }) + var time = dateTime; dtpicker.show(function(e) { dateTime = e.value; document.getElementById("date").value = e.value - getMeterList(); + if(time != dateTime){ + getMeterList(); + } }) } - +//鍔犲噺鏃ユ湡锛堝ぉ鏁帮級 function addAndReduceDay(tag) { var date = new Date(dateTime); date = date.setDate(date.getDate() + tag); @@ -61,10 +65,10 @@ } -// +//娓叉煋椤甸潰 function getMeterList() { - // - data.data.dataTime = dateTime + //璧嬪�煎弬鏁扮殑鏃ユ湡 + data.data.dateTime = dateTime mui.ajax(url, { type: "POST", dataType: "json", @@ -85,26 +89,36 @@ mui.alert("绯荤粺绻佸繖,璇烽噸璇曪紒", "鎻愮ず", ["纭畾"], function() {}, "div") } }) + } //娓叉煋椤甸潰 function renderData() { var html = '' if (meterList && meterList.length > 0) { $.each(meterList, function(index, item) { - html += '<div class="m-ck-cont"><div class="g-titck1">' + item.depotName + ' <span class="right">鏇存柊鏃堕棿: ' + item.updateTime + '</span></div>'; + html += '<div class="m-ck-cont"><div class="g-titck1">' + item.depotName + + ' <span class="right">鏇存柊鏃堕棿: ' + item.updateTime + '</span></div>'; html += '<div class="m-energy2"><ul class="ul-txtliste1"><li><div class="con">'; - html += '<div class="num">' + item.epSum + ' <span>KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>'; - html += '<li><div class="con"><div class="num">' + item.eqSum + ' <span>KWh</span></div>' - html += '<div class="desc">鏃犲姛鐢佃兘</div></div></li>'; - html += '<li><div class="con"><div class="num">' + item.esSum + ' <span>KWh</span></div>'; - html += '<div class="desc">鎬荤數鑳�</div></div></li>' + html += '<div class="num">' + item.epSum + + '</div><div class="desc">鏈夊姛鐢佃兘(KWh)</div></div></li>'; + html += '<li><div class="con"><div class="num">' + item.eqSum + '</div>' + html += '<div class="desc">鏃犲姛鐢佃兘(KWh)</div></div></li>'; + html += '<li><div class="con"><div class="num">' + (item.esSum == null || item.esSum == "" ? "--" : item.esSum) + '</div>'; + html += '<div class="desc">鎬荤數鑳�(KWh)</div></div></li>' html += '</ul></div></div>'; }) } else { - html += - '<div class="m-ck-cont"><div style="text-align: center;font-size: 20px;color:#dd524d;">鏆傛棤杩滅▼鎶勮〃淇℃伅</div></div>'; + html += '<div class="m-ck-cont"><div class="g-titck1">鏆傛棤淇℃伅 <span class="right">鏇存柊鏃堕棿: ' + dateTime + '</span></div>'; + html += '<div class="m-energy2"><ul class="ul-txtliste1"><li><div class="con">'; + html += '<div class="num">0<span> KWh</span></div><div class="desc">鏈夊姛鐢佃兘</div></div></li>'; + html += '<li><div class="con"><div class="num">0<span> KWh</span></div>' + html += '<div class="desc">鏃犲姛鐢佃兘</div></div></li>'; + html += '<li><div class="con"><div class="num">0<span> KWh</span></div>'; + html += '<div class="desc">鎬荤數鑳�</div></div></li>' + html += '</ul></div></div>'; + } - // $("#recordList").html(html); + $("#recordList").html(html); } mui('.mui-scroll-wrapper').scroll({ -- Gitblit v1.9.3