<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"
    />
    <meta
      name="format-detection"
      content="telephone=no,email=no,date=no,address=no"
    />
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" href="../../css/aui.css" />
    <link rel="stylesheet" href="../../css/projeck.css" />
    <style>
      body {
        background: #fff;
      }
      .row_content {
        padding: 0 5px;
      }
      .row_content li {
        text-align: center;
        font-size: 13px;
        padding: 12px 0;
        align-items: center;
      }
      .row_content li span:nth-child(1) {
        width: 20%;
      }
      .row_content li span:nth-child(2) {
        width: 60%;
      }
      .row_content li span:nth-child(3) {
        width: 20%;
      }
    </style>
  </head>
  <body>
    <div class="api_layout">
      <div class="row_contents">
        <ul class="row_content" id="content_item"></ul>
      </div>
    </div>
    <div class="noText hide" id="nocode">
      <img src="../../image/noText.png" alt="" />
    </div>
    <script type="text/template" id="templateMonitor">
      {{~it:value}}
        <li class="flex-space after-border relative {{=value.status}}">
            <span>{{=value.id}}</span>
            <span>{{=value.position}}</span>
            <span>{{=value.value}}{{=value.unit}}</span>
        </li>
      {{~}}
    </script>
    <script src="../../script/api.js"></script>
    <script src="../../script/doT.min.js"></script>
    <script src="../../script/config.js"></script>
    <script>
      var toast = new auiToast();
      apiready = function () {};
      function searchData(userName) {
        var data = {
          name: userName,
          type: '',
        };
        $http.fnReuestData(
          zaoquanUrlRouter.getDeviceInfo,
          '',
          'post',
          data,
          function (ret, err) {
            toast.hide();
            if (ret && ret.code == 0) {
              if (ret.templateMonitor != '') {
                $apis.html(content_item, '#templateMonitor', ret.data);
                $api.addCls($api.dom('.noText'), 'hide');
              } else {
                $api.removeCls($api.dom('.noText'), 'hide');
                $apis.html(content_item, '#templateMonitor', ret.data);
              }
            }
          }
        );
      }
      //  状态
      function statusFun(t, typeC, sType) {
        var pageParam = {
          title: t,
          typeCode: typeC,
          statusType: sType,
          test: 'test',
        };
        $event.openWin('statusListWin', 'statusListWin', pageParam, '');
        // $event.openTabLayout('statusList','statusList',title,pageParam);
      }
    </script>
  </body>
</html>
