monitorList.html
3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!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>