YYC
2023-06-07 4f20ad52b8d4ab206e3458e488d3950eb2bfb5a3
igds-app/js/admin/es-real-electric.js
@@ -18,6 +18,7 @@
   data.data.deptId = selectDeptId;
   getElectric();
}
function getElectric() {
   mui.ajax(url, {
      type: "POST",
@@ -39,6 +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"
   //    }
   // ]
}
//渲染页面
function renderData() {
@@ -46,18 +109,17 @@
   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 +
            '</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 +
@@ -73,10 +135,19 @@
         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">0<span> V</span></div><div class="desc">A相电压</div></div>';
      html += '<div class="txt"><div class="num">0<span> V</span></div><div class="desc">B相电压</div></div>';
      html += '<div class="txt"><div class="num">0<span> V</span></div><div class="desc">B相电压</div></div>';
      html += '<div class="txt"><div class="num">0<span> V</span></div><div class="desc">A相电流</div></div>';
      html += '<div class="txt"><div class="num">0<span> V</span></div><div class="desc">B相电流</div></div>';
      html += '<div class="txt"><div class="num">0<span> V</span></div><div class="desc">C相电流</div></div>';
      html += '</div></div></li>'
   }
   // $("#recordList").html(html);
   $("#recordList").html(html);
}
var slider = mui(".mui-slider");
slider.slider({