wzp
2022-11-11 2f74eb23c0d2d4a246bc612c5c34bdfa8dea5603
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<%@ Page Language="C#" masterpagefile="~/Main.master"  AutoEventWireup="true" CodeFile="Welcome.aspx.cs" Inherits="Welcome" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src="js/contabs.min.js"></script>
 
    <style type="text/css">
        .dotRed {
          //position: absolute;
          width: 15px;
          height: 15px;
          border-radius: 100%;
          background: #FF0000;
          //box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2);
        }
        
        .dotGreen {
          //position: absolute;
          width: 15px;
          height: 15px;
          border-radius: 100%;
          background: #00FF00;
          //box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2);
        }
    </style>
    <script type="text/javascript">
        $(function () {
            function getClass(b) {
                return b ? "label m-b label-warning" : "label m-b label-primary";
            }
 
            function refreshStatis() {
                if ($(document).height() == 0) {
                    setTimeout(refreshStatis, 50000);
                }
                else {
 
                    $.post("gwstatisv3.ashx", { action: "getRealtimeStatis5m" }, function (r) {
 
                        if (r.OK) {
                            //活动客户前X个:客户-发送量【当日】
                            var activeClientDayhtml = [];
 
                            $.each(r.Message.ActiveClientDayList, function (i) {
                                activeClientDayhtml.push("<tr>");
                                activeClientDayhtml.push("<td>" + this.clientId + "</td>");
                                activeClientDayhtml.push("<td>" + this.company + "</td>");
                                activeClientDayhtml.push("<td><span  class='" + getClass(false) + "'>" + this.ap_status0 + "</span></td>");
                                activeClientDayhtml.push("</tr>");
                            });
 
                            $("#activeClientDayTable tbody").html(activeClientDayhtml.join("\n"));
                            
                            //通道-发送量【当日】
                            var opSendDayhtml = [];
 
                            $.each(r.Message.OpSendDayList, function (i) {
                                opSendDayhtml.push("<tr>");
                                opSendDayhtml.push("<td>" + this.opId + "</td>");
                                opSendDayhtml.push("<td>" + this.opName + "</td>");
                                opSendDayhtml.push("<td><span  class='" + getClass(false) + "'>" + this.op_status0 + "</span></td>");
                                opSendDayhtml.push("</tr>");
                            });
 
                            $("#opSendDayTable tbody").html(opSendDayhtml.join("\n"));
 
                            //产品-发送量【当日】
                            var productSendDayhtml = [];
 
                            $.each(r.Message.ProductSendDayList, function (i) {
                                productSendDayhtml.push("<tr>");
                                productSendDayhtml.push("<td>" + this.productName + "</td>");
                                productSendDayhtml.push("<td><span  class='" + getClass(false) + "'>" + this.ap_status0 + "</span></td>");
                                productSendDayhtml.push("</tr>");
                            });
 
                            $("#productSendDayTable tbody").html(productSendDayhtml.join("\n"));
 
                            //订单
                            var orderhtml = [];
                            $.each(r.Message.OrderDayList, function (i) {
                                orderhtml.push("<tr>");
                                orderhtml.push("<td>今日已完成 <a href='javascript:;' onclick='doTabOpen(\"MenuId_GwOrderComplete\")' data-id='{0}' class='btn  btn-success btn-xs'><u>" + this.orderNum + " </u></a>个订单,总金额:<span  class='" + getClass(false) + "'>" + this.orderAmountTotal/1000 + "</span> 元</td>");
                                orderhtml.push("</tr>");
                            });
 
                            $.each(r.Message.OrderAuditList, function (i) {
                                orderhtml.push("<tr>");
                                orderhtml.push("<td>待审批 <a href='javascript:;' onclick='doTabOpen(\"MenuId_GwOrderAudit\")' data-id='{0}' class='btn  btn-success btn-xs'><u>" + this.orderNum + " </u></a>个订单,总金额:<span  class='" + getClass(false) + "'>" + this.orderAmountTotal / 1000 + "</span> 元</td>");
                                orderhtml.push("</tr>");
                            });
                            $("#orderTable tbody").html(orderhtml.join("\n"));
 
                            //待审核发送
                            var sendAudithtml = [];
                            $.each(r.Message.SendAuditList, function (i) {
                                sendAudithtml.push("<tr>");
                                sendAudithtml.push("<td>待审核短信 <a href='javascript:;' onclick='doTabOpen(\"MenuId_GwAuditCache\")' data-id='{0}' class='btn  btn-success btn-xs'>" + this.count + " </a>条,请立即处理</td>");
                                sendAudithtml.push("</tr>");
                            });
 
                            $.each(r.Message.SendAuditTowList, function (i) {
                                sendAudithtml.push("<tr>");
                                //sendAudithtml.push("<td>待二次鉴定短信 <a href='GwAuditCache.aspx?StatusFlag=0&AuditingStatus=10' onclick='doTabOpen(\"MenuId_GwAuditCache\")' data-id='{0}' class='btn  btn-success btn-xs'>" + this.count + " </a>条,请立即处理</td>");
                                sendAudithtml.push("<td>待二次鉴定短信 <a href='javascript:;' onclick='doTabOpen(\"MenuId_GwAuditCache\")' data-id='{0}' class='btn  btn-success btn-xs'>" + this.count + " </a>条,请立即处理</td>");
                                sendAudithtml.push("</tr>");
                            });
 
                            $.each(r.Message.SpPrePatternAuditList, function (i) {
                                sendAudithtml.push("<tr>");
                                sendAudithtml.push("<td>账号报备内容待审核 <a href='javascript:;' onclick='doTabOpen(\"MenuId_GwSpPrePattern\")' data-id='{0}' class='btn  btn-success btn-xs'>" + this.count + " </a>条,请立即处理</td>");
                                sendAudithtml.push("</tr>");
                            });
                            $("#sendAuditTable tbody").html(sendAudithtml.join("\n"));
 
                            //通道状态
                            var opStatushtml = [];
                            $.each(r.Message.OpStatusList, function (i) {
                                opStatushtml.push("<tr>");
                                opStatushtml.push("<td>" + this.opId + "</td>");
                                opStatushtml.push("<td>" + this.opName + "</td>");
                                opStatushtml.push("<td>" + this.content + "</td>");
                                //opStatushtml.push("<td><span  class='" + getClass(false) + "'>" + this.handleFlag + "</span></td>");
                                opStatushtml.push("<td>" + ((this.handleFlag == 1) ? "<div class='dotGreen'>" : "<div  class='dotRed'>") + "</div></td>");
                                opStatushtml.push("</tr>");
                            });
                            $("#opStatusTable tbody").html(opStatushtml.join("\n"));
 
                            /** 
                            var ophtml = [];
 
                            $.each(r.Message.OpList, function (i) {
                                var successRatio = this.OpOutCount > 0 ? Math.round(this.OpSuccessCount * 100.0 / this.OpOutCount, 2) : 0;
                                var reportRatio = this.OpOutCount > 0 ? Math.round((this.OpFailedCount + this.OpSuccessCount) * 100.0 / this.OpOutCount, 2) : 0;
                                ophtml.push("<tr>");
                                ophtml.push("<td>" + this.OpID + "</td>");
                                ophtml.push("<td>" + this.OpName + "</td>");
                                ophtml.push("<td><span  class='" + getClass(this.OpOutCount < this.OpOutThreshold) + "'>" + this.OpOutCount + "</span></td>");
                                ophtml.push("<td>" + this.OpOutThreshold + "</td>");
                                ophtml.push("<td><span class='" + getClass(successRatio < this.OpSuccessRatioThreshold) + "'>" + successRatio + "%" + "</span></td>");
                                ophtml.push("<td>" + this.OpSuccessRatioThreshold + "%" + "</td>");
                                ophtml.push("<td><span  class='" + getClass(reportRatio < this.OpReportRatioThreshold) + "'>" + reportRatio + "%" + "</span></td>");
                                ophtml.push("<td>" + this.OpReportRatioThreshold + "%" + "</td>");
                                ophtml.push("</tr>");
                            });
 
                            $("#opTable tbody").html(ophtml.join("\n"));
 
 
                            var aphtml = [];
 
                            $.each(r.Message.ApList, function (i) {
                                aphtml.push("<tr>");
                                aphtml.push("<td>" + this.ApID + "</td>");
                                aphtml.push("<td>" + this.ApName + "</td>");
                                aphtml.push("<td><span  class='" + getClass(this.ApInCount < this.ApInThreshold) + "'>" + this.ApInCount + "</span></td>");
                                aphtml.push("<td>" + this.ApInThreshold + "</td>");
                                aphtml.push("<td><span  class='" + getClass(this.ApPendingCount > this.ApPendingThreshold) + "'>" + this.ApPendingCount + "</td>");
                                aphtml.push("<td>" + this.ApPendingThreshold + "</span></td>");
                                aphtml.push("</tr>");
                            });
                            $("#apTable tbody").html(aphtml.join("\n"));
                            **/
 
                            setTimeout(refreshStatis, 3000);
                        }
                    }, "json");
                }
            }
 
            refreshStatis();
        });
 
        //链接TABS方式打开
        function doTabOpen(menuId) {
            //parent.$('#' + menuId).attr("href", "GwAuditCache.aspx?StatusFlag=0&AuditingStatus=10");
            //parent.$('#' + menuId).attr("data-id", "GwAuditCache.aspx?StatusFlag=0&AuditingStatus=10");
            //window.parent.document.getElementById(menuId).click();    //js方式
            //console.log(parent.$('#' + menuId).attr("data-id"));
            parent.$('#' + menuId).click();   //jquery方式
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <div class="ibox">
        
        <div class="ibox-title">
            <h3>活动客户:客户-发送量【当日】</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="activeClientDayTable">
                <thead>
                    <tr>
                        <td>
                            客户账号
                        </td>
                        <td>
                            客户公司
                        </td>
                        <td>
                            发送总量
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <div id="activeClientDayPagination">
        </div>
        
        <div class="ibox-title">
            <h3>通道-发送量【当日】</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="opSendDayTable">
                <thead>
                    <tr>
                        <td>
                            通道编号
                        </td>
                        <td>
                            通道名称
                        </td>
                        <td>
                            发送总量
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        
        <div class="ibox-title">
            <h3>产品-发送量【当日】</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="productSendDayTable">
                <thead>
                    <tr>
                        <td>
                            产品
                        </td>
                        <td>
                            发送总量
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        
        <div class="ibox-title">
            <h3>订单</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="orderTable">
                <tbody>
                </tbody>
            </table>
        </div>
        
        <div class="ibox-title">
            <h3>待审核发送</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="sendAuditTable">
                <tbody>
                </tbody>
            </table>
        </div>
        
        <div class="ibox-title">
            <h3>通道状态</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="opStatusTable">
                <thead>
                    <tr>
                        <td>
                            通道编号
                        </td>
                        <td>
                            通道名称
                        </td>
                        <td>
                            状态描述
                        </td>
                        <td>
                            状态
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
 
        <!--
        <div class="ibox-title">
            <h3>接入点状态</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="apTable">
                <thead>
                    <tr>
                        <td>
                            接入点编号
                        </td>
                        <td>
                            接入点名称
                        </td>
                        <td>
                            5分钟入口流量
                        </td>
                        <td>
                            门限
                        </td>
                        <td>
                            5分钟阻塞量
                        </td>
                        <td>
                            门限
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
 
        <div class="ibox-title">
            <h3>通道状态</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover" id="opTable">
                <thead>
                    <tr>
                        <td>
                            通道编号
                        </td>
                        <td>
                            通道名称
                        </td>
                        <td>
                            5分钟出口流量
                        </td>
                        <td>
                            门限
                        </td>
                        <td>
                            5分钟成功率
                        </td>
                        <td>
                            门限
                        </td>
                        <td>
                            5分钟报告率
                        </td>
                        <td>
                            门限
                        </td>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
 
        <div class="ibox-title">
            <h3>数据库表空间</h3>
        </div>
        <div class="ibox-content">
            <table class="table table-striped table-bordered table-hover">
                <!%= RenderTableSpaceTable() %>
            </table>
        </div>
        -->
 
    </div>
</asp:Content>