monitorList.html 3.94 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/union/js/include.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div region="center">
    <div style="margin-left: 30px;margin-top: 20px; height:500px;">
        <table id="table"></table>
    </div>
</div>

<div id="dd" class="easyui-dialog" title="详细" style="width:400px;height:200px;text-align: center"
     data-options="resizable:true,modal:true">
    <textarea id="tx" style="width: 360px; margin: 0px; height: 140px;"></textarea>
</div>




<script>
    function getQueryStr(key) {
        var svalue = window.location.search.match(new RegExp("[\?\&]" + key + "=([^\&]*)(\&?)", "i"));
        var str = svalue ? svalue[1] : svalue;
        return str == null ? "" : str;
    }

    $(function () {

        $('#dd').dialog('close');

        $("#table").myDatagrid({
            fit: true,
            fitColumns: true,
            nowrap: false,
            url: contextPath + "/ActivateUnionRest/queryMonitorList?unionType=" + getQueryStr("unionType"),
            method: 'POST',
            loadFilter: function (data) {
                var temp = defaultLoadFilter(data);
                temp.rows = temp.list;
                return temp;
            },
            columns: [[{
                title: "渠道Id",
                field: "unionType",
                width: 200,
                align: "center"
            }, {
                title: "渠道名称",
                field: "unionName",
                width: 250,
                align: "center"
            }, {
                title: "pv",
                field: "pv",
                width: 180,
                align: "center"
            }, {
                title: "商品详情页pv",
                field: "infoPv",
                width: 180,
                align: "center"
            }, {
                title: "加入购物车pv",
                field: "cartPv",
                width: 180,
                align: "center"
            }, {
                title: "收订订单数据",
                field: "orderNum",
                width: 180,
                align: "center"
            }, {
                title: "ip",
                field: "ips",
                width: 180,
                align: "center",
                formatter: function (value, row, index) {
                    var str = "<a role='ips' index='"+index+"'  style='margin-left:10px'></a>"+value.split("\n").length;
                    return str;
                }
            }, {
                title: "skn",
                field: "skns",
                width: 180,
                align: "center",
                formatter: function (value, row, index) {
                    var str = "<a role='skns' index='"+index+"'   style='margin-left:10px'></a>"+value.split("\n").length;
                    return str;
                }
            }
            ]],
            cache: false,
            pageSize: 10,
            pageList: [10],
            idField: "id",
            singleSelect: true,
            checkOnSelect: false,
            onLoadSuccess: function (data) {
                $(this).myDatagrid("getPanel").find("a[role='ips']").linkbutton({
                    iconCls: "icon-more",
                    text: '查看',
                    onClick: function () {
                        var ips = data.list[$(this).attr('index')].ips;
                        $('#tx').val(ips);
                        $('#dd').dialog('open');
                    }
                });
                $(this).myDatagrid("getPanel").find("a[role='skns']").linkbutton({
                    iconCls: "icon-more",
                    text: '查看',
                    onClick: function () {
                        $('#tx').val(data.list[$(this).attr('index')].skns);
                        $('#dd').dialog('open');
                    }
                });
            }
        });
    });



</script>

</body>
</html>