<!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" onclick="closeFrame();">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" data-i18n="900295"></div>
        <a class="aui-pull-right  " data-page="tpm_create" data-params="{}" data-i18n="[data-qr-title]900404" onclick="openQRcodetpm(this)" tapmod="">
            <img src="../image/qrcode.png" style="width: 20px;height: 20px;    margin-top:12px;" />
        </a>
    </header>
    <div class="container" id="list">
        <script id="DotTemplate" type="text/x-dot-template">
            {{~it.data:value:index}}
            <section class="aui-content-padded ">
                <ul class="aui-list aui-collapse aui-border">
                    <div class="aui-collapse-item">
                        <li class="aui-list-item aui-collapse-header" tapmode>
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-title">{{=lang(value.name)}}(<span style="{{ if(value.count>0 && value.status!=6){ }}color:#FF0000; {{ } }}">{{=value.count}}</span>)</div>
                                <div class="aui-list-item-right">
                                    <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                                </div>
                            </div>
                        </li>
                        <div class="aui-collapse-content aui-padded-15 aui-border-b">
                            {{~value.repairlist:val:ind}}
                            <div class="aui-card-list open-win" win="tpm_yjwxdetail" param='{"repairid":"{{= val.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>{{= val.repairid}}</b> &nbsp;
                                            <b>{{= val.location}}</b> &nbsp;

                                            <span><img src="../image/{{ if(val.mutestatus==1){ }}noti{{ }else{ }}nonoti{{ } }}_dark.png" class="noti"></span></div>
                                    </div>
                                </div>
                                <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                                    <ul class="aui-list aui-list-noborder" style="background:#fff;">
                                        <div class="aui-card-list-user-avatar dotcon" style="{{ if(val.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 ">
                                                    <div class="c-faultlist">{{= val.faultlist}}</div>
                                                    <div class="c-faultcontent">{{= val.faultcontent}}</div>
                                                    <div class="c-repairremark">{{= val.repairremark}}</div>

                                                </div>
                                                <div class="aui-list-item-title aui-font-size-12">
                                                    <div style="white-space:nowrap;word-space:nowrap;">{{= maskTime3(val.createtime)}}</div>
                                                    <div class="aui-text-danger goods-price" style="white-space:nowrap;word-space:nowrap;">{{= maskTime(val.offlinetime)}}</div>
                                                </div>
                                            </div>
                                        </div>

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

                    </div>
                </ul>
            </section>
            {{~}}
        </script>
    </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 host, acd, lang, i18next;
    apiready = function() {
        fnReady();
        api.parseTapmode();
        ajaxsetup();
        // getHost();
        host = $api.getStorage('host');
        load_i18n(function(t, i18n) {
            lang = t;
            i18next = i18n;
            loading(lang('6660098'));
            getRepairList();
            if (api.pageParam) {
                acd = api.pageParam.acd;
            }
        });
    };
    //     var host='http://61.177.28.246:8100';
    // load_i18n(function(t,i18n){
    //    lang=t;
    //    i18next=i18n;

    //     ajaxsetup();
    //     autologin();
    //     getRepairList();

    // });

    function getRepairList() {
        $.ajax({
            url: host + '/tpm/AppRepair/RepairList',
            data: JSON.stringify({
                "status": 0
            }),
            type: 'POST',
            success: function(result) {
                // console.log(JSON.stringify(result));
                if (result.ret == 1) {
                    // api.hideProgress();
                    var testTemplate = doT.template($("#DotTemplate").text());
                    $("#list").html(testTemplate(result));
                    var collapse = new auiCollapse({
                        autoHide: false //是否自动隐藏已经展开的容器
                    });
                    if (acd) {
                        openaccd(acd);
                    }

                    fnReadyOpenWin();

                } else {
                    customToast(lang(result.msg), 2000);
                }
                api.hideProgress();
            },
            error: function(ret) {
                console.log(JSON.stringify(ret));
            }
        })
    }

    function openaccd(acd) {
        $('.aui-collapse-header:eq(' + (acd - 1) + ')').click();
    }



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


    var maskText = function(text) {
        var test = lang(text);
        return test;

    };


    function reloadMe() {
        console.log('reloadMe');
        location.reload();
        window.location.reload();
    }
</script>

</html>
