<!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/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <a class="aui-pull-left aui-btn " tapmode onclick="qrgoBack()">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" data-i18n="6660094"></div>
    </header>


    <div class="container">
        <section class="aui-content-padded " id="list">
            <script id="DotTemplate" type="text/x-dot-template">
                {{~it.data:value:index}}

                <div class="aui-card-list aui-border-b aui-padded-b-15 open-win" win="tpm_yjwxdetail" param='{"repairid":"{{= value.repairid}}"}'>
                    <div class="aui-card-list-header aui-card-list-user">
                        <div class="aui-card-list-user-name">
                            <div class="aui-font-size-16">

                                <b>{{= value.location}}</b> &nbsp;
                                <span style="color:#ccc;"></span>&nbsp;
                                <span><img src="../image/{{ if(value.mutestatus==1){ }}noti{{ }else{ }}nonoti{{ } }}_dark.png" class="noti"></span></div>
                            <small>{{= maskTime3(value.createtime)}}</small>
                        </div>
                    </div>
                    <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                        <ul class="aui-list aui-list-noborder">
                            <div class="aui-card-list-user-avatar dotcon" style="{{ if(value.markself!=1){ }} display:none; {{ } }}">
                                <div class="dotflag"></div>
                            </div>
                            <div class="aui-list-item aui-padded-l-0">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-title aui-font-size-14 goods-title">
                                        <div class="c-faultlist">{{= value.faultlist}}</div>
                                        <div class="c-faultcontent">{{= value.faultcontent}}</div>
                                        <div class="c-repairremark">{{= value.repairremark}}</div>
                                    </div>
                                    <div class="aui-list-item-right goods-price">{{= maskTime(value.offlinetime)}}</div>
                                </div>
                            </div>

                        </ul>
                    </div>
                </div>
                {{~}}
            </script>
        </section>

    </div>








</body>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/swipe.js"></script>
<script type="text/javascript" src="../script/SHA1.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/remotedb.js"></script>
<script type="text/javascript" src="../script/list.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/CryptoJS/core.js"></script>
<script type="text/javascript" src="../script/CryptoJS/cipher-core.js"></script>
<script type="text/javascript" src="../script/CryptoJS/mode-ecb.js"></script>
<script type="text/javascript" src="../script/CryptoJS/aes.js"></script>
<script type="text/javascript" src="../script/aui-collapse.js"></script>

<script type="text/javascript" src="../script/i18next-12.0.0.min.js"></script>
<script type="text/javascript" src="../script/i18nextLocizeBackend.min.js"></script>
<script type="text/javascript" src="../script/jquery-i18next.min.js"></script>
<script type="text/javascript" src="../script/jquery.cookie.js"></script>
<script type="text/javascript" src="../script/i18n-app.js"></script>

<script type="text/javascript">
    var machineID, host, lang, i18next;
    apiready = function() {
        fnReady();
        api.parseTapmode();
        ajaxsetup();
        host = $api.getStorage('host');
        machineID = api.pageParam.machineID;
        //   console.log(JSON.stringify({
        //     "machineID":machineID
        // }));
        load_i18n(function(t, i18n) {
            lang = t;
            i18next = i18n;
            getRepairList(machineID);
        });

        console.log('打开列表');
        console.log(machineID);
    };
    // var host='http://61.177.28.246:8100';
    // getHost();
    // ajaxsetup();
    // autologin();

    // getRepairList("402");

    function getRepairList(machineID) {
        console.log(JSON.stringify({
            "machineID": machineID
        }));

        $.ajax({
            url: host + '/tpm/AppRepair/MachineRepair',
            data: JSON.stringify({
                "machineID": parseInt(machineID)
            }),
            type: 'POST',
            success: function(result) {
                console.log(JSON.stringify(result));
                if (result.ret == 1) {
                    var testTemplate = doT.template($("#DotTemplate").text());
                    $("#list").html(testTemplate(result));
                    fnReadyOpenWin();
                } else {
                    customToast(lang(result.msg), 2000);
                }
            }
        })
    }


    var collapse = new auiCollapse({
        autoHide: false //是否自动隐藏已经展开的容器
    });

    function qrgoBack() {

        console.log();


        api.closeFrame({
            name: 'tpm_create'
        });
        api.closeFrame();
    }
</script>

</html>
