protect_tool.html 2.48 KB
<!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/aui.css"/>
      <style>
          html,
          body{
            background: #FFFFFF;
          }
      </style>
  </head>
  <body>
    <div style="box-shadow:0px 1px 0px  rgba(0, 0, 0, 0.3) inset;border-bottom:1px solid rgba(217,229,255,1);">
      <div style="margin-left:15px;margin-right:15px;">
        <div class="aui-row aui-row-flex" style="height:64px;">
          <div class="aui-col aui-col-span-12" style="margin-top:18px;height:28px;">
            <div class="aui-row aui-row-flex" style="line-height:28px;" tapmode onclick="chooseAll(this);">
                <img src="../../image/alarm/icon-unselected.png" id="img_select" style="width:18px;height:18px;margin-top:0.2rem;" />
                <span>&nbsp;全部选择</span>
            </div>
          </div>
          <div class="aui-col aui-col-span-12 aui-row-flex-center aui-row-flex-middle aui-row-flex-end" style="margin-top:18px;height:28px;" tapmode onclick="readTag();">
            <div style="border:1px solid rgba(91,127,248,1);border-radius:17px;">
              <span style="font-size:14px;font-family:PingFang SC;font-weight:500;color:rgba(91,127,248,1);margin-left:10px;margin-right:10px;margin-top:5px;margin-bottom:5px;">标记已读</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
      var ischooseall = false;
      apiready = function(){
        api.parseTapmode();

      };

      function chooseAll(dom) {
        ischooseall = !ischooseall;

        api.sendEvent({
            name: 'chooseAllProtectInfo',
            extra: {
                chooseAll: ischooseall,
            }
        });
        if (ischooseall) {
          ((dom.childNodes)[1]).src = '../../image/alarm/icon-selected.png';
        }else {
          ((dom.childNodes)[1]).src = '../../image/alarm/icon-unselected.png';
        }

      }

      function readTag() {
        api.sendEvent({
            name: 'protectReadTag',
        });

      }
  </script>
  </html>