<!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: auto;
            line-height: normal;
        }
        .api_layout .aui-list .aui-list-item-inner{
            height: auto;
            line-height: normal;
            padding-top: 10px;
            padding-bottom: 10px;
            display: block;
        }
        .aui-list-item-arrow:before{
            border: none;
        }
        .aui-list-item-inner.aui-list-item-arrow{
            padding-right: 0.75rem;
        }
        .col_ p{
            font-size: 15px;
            color: #121212;
            width: 100%;
            display: -webkit-flex;
            display: flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            flex-wrap: nowrap;
            -webkit-flex-wrap: nowrap;
            align-items: center;
            -webkit-align-items: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            margin-bottom: 10px;
        }
        .col_ p span:last-child{
            font-size: 14px;
            color: #6C6F74;
        }
        .col_ p span:first-child{
            width: 72%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .personal_centerInfo img{
            width: 50px;
            height: 50px;
            margin-right: 10px;
            border: 1px solid #f2f2f2;
            border-radius: 50%;
        }
        .personal_center span{
            display: block;
        }
        .personal_center span:first-child{
            font-size: 16px;
        }
        .personal_center span:last-child{
            font-size: 15px;
            color: #a7a5bb;
        }
        .personal_centerInfo{
            padding: 10px 0 10px 0.75rem ;
            background: #fff;
        }
        .spanInfo{
            display: block;
            font-size: 14px;
            color: #6C6F74;
            margin-bottom: 5px;
        }
        .spanInfo:last-child{
            margin-bottom: 0;
        }
        .title_{
            background: #fff;
            padding: 5px 0.75rem;
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            -webkit-justify-content: flex-start;
            flex-wrap: nowrap;
            -webkit-flex-wrap: nowrap;
            align-items: center;
            -webkit-align-items: center;
            background-size: 92% 1px;
            background-repeat: no-repeat;
            background-position: 0.75rem bottom;
            background-image: linear-gradient(0,#dddddd,#dddddd 50%,transparent 50%);
            background-image: -webkit-linear-gradient(90deg,#dddddd,#dddddd 50%,transparent 50%);
        }
        .title_ p{
            font-size: 17px;
            color: #000;
        }
        .title_ span{
            width: 4px;
            height: 40px;
            background: #009fe8;
            margin-right: 10px;
        }
    </style>
</head>
<body>
<div class="api_layout" id="api_layout">
    <div>
        <div class="title_">
            <span></span>
            <p id="titles_"></p>
        </div>
        <ul class="aui-list aui-list-in" id="dataContent"></ul>
    </div>
</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="openDetails2('{{=value.eName}}','{{=value.oid}}','{{=value.oName}}','{{=value.did}}')">
            <div class="aui-list-item-inner aui-list-item-arrow">
                <p>
                    <span>{{=value.eName}}</span>
                    <span>数量：{{=value.eNum}}</span>
                </p>
                <span class="spanInfo">单位：{{=value.units}}</span>
                <span class="spanInfo">领用单位：{{=value.oName}}</span>
            </div>
        </li>
    {{~}}
</script>
<script type="text/javascript" src="../../script/api.js"></script>
<!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
<!-- <script src="../../script/fastclick.min.js" charset="utf-8"></script> -->
<script src="../../script/doT.min.js" charset="utf-8"></script>
<script src="../../script/config.js" charset="utf-8"></script>
<script type="text/javascript">
    var toast = new auiToast();
    apiready = function () {
      detaileFun($api.getStorage('monitorValue'))
    };
    function detaileFun(monitorValue) {
        toast.loading({
            title: "加载中",
            duration: 2000
        });
        api.ajax({
             url:"http://nxjiewei.com/colliery-system/api/page/v1/caByOrgPage.html?title="+JSON.parse(monitorValue).title+"&did="+JSON.parse(monitorValue).oid+"&pageNumber=0&pageSize=20",
            method: 'get',
        },function(ret, err){
            toast.hide();
            if (ret && ret.code == 200) {
                document.getElementById('titles_').innerHTML = JSON.parse(monitorValue).title
                if (ret.content.data != "") {
                    $apis.html(dataContent,'#templateQrcode',ret.content.data);
                    $api.addCls($api.dom('.noText'), 'hide')
                }else {
                    $apis.html(dataContent,'#templateQrcode',ret.content.data)
                    $api.removeCls($api.dom('.noText'), 'hide')

                }
            }else {
                api.toast({
                    msg: '加载超时，请检查网络',
                    duration: 2000,
                    location: 'bottom'
                });
            }
        });
    }
    function openDetails2(t,id,deps,ids) {
        var objs = {title:t,oid:id,dep:deps,did:ids};
        $api.setStorage('monitorValue3',JSON.stringify(objs));
        $event.openTabLayout('search2_frameDetails3','search2_frameDetails3','智慧矿山')
    }
</script>
