<!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"/>
    <link rel="stylesheet" href="../../css/projeck.css">
    <style>
        @media screen and (-webkit-min-device-pixel-ratio:1.5) {
          .aui-list{
            background-image:none!important;
          }
        }
        .aui-list.aui-list-in .aui-list-item{
          background-size:93% 1px;
        }
        .aui-list.aui-list-in .aui-list-item:last-child{
          background-position:0.75rem bottom;
        }
        .api_layout .aui-list .aui-list-item{
          height: 55px;
          line-height: 55px;
        }
        .api_layout .aui-list .aui-list-item-inner{
          height: 55px;
          line-height: 55px;
        }
        .aui-list-item-arrow:before{
          border: 1px solid #939393;
          border-top: none;
          border-right: none;
        }
        .col_ p{
            font-size: 16px;
            color: #121212;
            width: 85%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
</head>
<body>
<div class="api_layout" id="api_layout">
    <ul class="aui-list aui-list-in" id="Qrcode_itme">

    </ul>
</div>
<div class="noText hide">
  <img src="../../image/noText.png" alt="">
</div>
</body>
</html>
<script type="text/template" id="templateQrcode">
  {{~it:value}}
  <li class="aui-list-item col_" onclick="QRcodeDetaile('{{=value.id}}','{{=value.title}}','{{=value.addLinkUrl}}')">
      <div class="aui-list-item-inner aui-list-item-arrow">
          <p>{{=value.title}}</p>
      </div>
  </li>
  {{~}}
  </script>
<script type="text/javascript" src="../../script/api.js"></script>
<script src="../../script/doT.min.js" charset="utf-8"></script>
<script src="../../script/config.js" charset="utf-8"></script>
<script type="text/javascript">
    apiready = function () {

    };
    function seachQrcodeFun0(value, addLinkUrl) {
        var data = {
            title:value,
            departmentId:'',
            pageNumber:0,
            pageSize:0
        };
        // var addLinkUrl = addLinkUrl;
        $http.requestDataLoging(UrlRouter.seachQrcode,'get',data)
        .then(ret=>{
          if (ret && ret.code == 200) {
            if (ret.data != "") {
              if(addLinkUrl == 'addLinkUrl') {
                ret.data.forEach(item => {
                  item.addLinkUrl = addLinkUrl
                })
                $apis.html(Qrcode_itme,'#templateQrcode',ret.data);
              } else {
                $apis.html(Qrcode_itme,'#templateQrcode',ret.data);
              }
              $api.addCls($api.dom('.noText'), 'hide');
            }else {
              $apis.html(Qrcode_itme,'#templateQrcode',ret.data);
              $api.removeCls($api.dom('.noText'), 'hide');
            }
          }
        })
    }
    function QRcodeDetaile(pageid,text,addLinkUrl) {
      if(addLinkUrl == 'addLinkUrl') {
        api.sendEvent({
            name: 'handAddLinkUrl',
            extra: {
                pageId: pageid,
                title: text
            }
        });
        api.closeWin();
      } else {
        $event.openWin('browseQrcode_win','../browseQrcode/browseQrcode_win',{pageId:pageid,title:text},'');
      }
      // $event.openWin('QrcodeDetaile','../Qrcode/QrcodeDetaile',{pageId:pageid,id:'',departmentId:'',flag:false,title:text},'');
    }
</script>
