|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html>
|
|
|
3
|
+
|
|
|
4
|
+<head>
|
|
|
5
|
+ <meta charset="UTF-8">
|
|
|
6
|
+ <title>打印预览</title>
|
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
8
|
+ <script src="../js/jquery.min.js?v=2.1.4"></script>
|
|
|
9
|
+ <script src="../Script/Common/huayi.load.js"></script>
|
|
|
10
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
11
|
+ <script src="../js/jquery.cookie.js"></script>
|
|
|
12
|
+ <!--</METAHTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
13
|
+ </METAHTTP-EQUIV="Cache-Control" CONTENT="no-cache">
|
|
|
14
|
+ </METAHTTP-EQUIV="Expires" CONTENT="0">-->
|
|
|
15
|
+ <style>
|
|
|
16
|
+ #main1{
|
|
|
17
|
+ width: 788.8px;
|
|
|
18
|
+ margin: 0 auto;
|
|
|
19
|
+ -webkit-box-shadow: 1px 1px 9px 2px #D2D2D2;
|
|
|
20
|
+ box-shadow: 1px 1px 9px 2px #D2D2D2;
|
|
|
21
|
+ background-color: #fff;
|
|
|
22
|
+ padding: 30px 60px 80px 60px;
|
|
|
23
|
+ }
|
|
|
24
|
+ .alignC{
|
|
|
25
|
+ text-align: center;
|
|
|
26
|
+ }
|
|
|
27
|
+ .alignC h2{
|
|
|
28
|
+ font-family: "宋体";
|
|
|
29
|
+ font-weight: bold;
|
|
|
30
|
+ font-size: 22pt;
|
|
|
31
|
+ letter-spacing: -1px;
|
|
|
32
|
+ }
|
|
|
33
|
+ .headerAlign h3 div:nth-of-type(1){
|
|
|
34
|
+ font-size: 14pt;
|
|
|
35
|
+ padding-top: 20px;
|
|
|
36
|
+ text-align: left;
|
|
|
37
|
+ font-weight: normal;
|
|
|
38
|
+ margin-left: 48px;
|
|
|
39
|
+ }
|
|
|
40
|
+ #main1 table{
|
|
|
41
|
+ margin: 0 auto;
|
|
|
42
|
+ width: 600px;
|
|
|
43
|
+ border-collapse: collapse;
|
|
|
44
|
+ font-size: 13pt;
|
|
|
45
|
+ font-family: "仿宋";
|
|
|
46
|
+ }
|
|
|
47
|
+ #main1 table tr{
|
|
|
48
|
+ min-height: 49px;
|
|
|
49
|
+ }
|
|
|
50
|
+ tbody td{
|
|
|
51
|
+ min-width: 10%;
|
|
|
52
|
+ padding: 6px 0 6px 0;
|
|
|
53
|
+ }
|
|
|
54
|
+
|
|
|
55
|
+ .alignC .tableHead{
|
|
|
56
|
+ font-weight: 600;
|
|
|
57
|
+ }
|
|
|
58
|
+
|
|
|
59
|
+ .btn{
|
|
|
60
|
+ margin-top: 4px;
|
|
|
61
|
+ margin-bottom: 4px ;
|
|
|
62
|
+ background: #00a1cb;
|
|
|
63
|
+ color: #fff;
|
|
|
64
|
+ }
|
|
|
65
|
+ .datehide{
|
|
|
66
|
+ display: none;
|
|
|
67
|
+ }
|
|
|
68
|
+
|
|
|
69
|
+ </style>
|
|
|
70
|
+
|
|
|
71
|
+ <style media="print">
|
|
|
72
|
+ /*设置打印样式 标题宋体加黑二号*/
|
|
|
73
|
+ .headerAlign h2{
|
|
|
74
|
+ font-family: "宋体" !important;
|
|
|
75
|
+ font-weight: bold !important;
|
|
|
76
|
+ font-size: 22pt !important;
|
|
|
77
|
+ letter-spacing: -1px !important;
|
|
|
78
|
+ }
|
|
|
79
|
+ .headerAlign h3 div:nth-of-type(1){
|
|
|
80
|
+ font-size: 14pt !important;
|
|
|
81
|
+ font-family: "宋体" !important;
|
|
|
82
|
+ font-weight: normal !important;
|
|
|
83
|
+ margin-left: 108px !important;
|
|
|
84
|
+ }
|
|
|
85
|
+ #main1{
|
|
|
86
|
+ padding: 40px 0 0 0 !important;
|
|
|
87
|
+ }
|
|
|
88
|
+ #main1 table{
|
|
|
89
|
+ font-size: 13pt !important;
|
|
|
90
|
+ font-family: "仿宋" !important;
|
|
|
91
|
+ border-color: #000;
|
|
|
92
|
+ color: #000;
|
|
|
93
|
+ width: 600px !important;
|
|
|
94
|
+ /*page-break-after:avoid !important;*/
|
|
|
95
|
+ }
|
|
|
96
|
+ #main1 table tr{
|
|
|
97
|
+ min-height: 49px;
|
|
|
98
|
+ }
|
|
|
99
|
+ tbody td{
|
|
|
100
|
+ padding: 6px 0 6px 0 !important;
|
|
|
101
|
+ }
|
|
|
102
|
+ @page {
|
|
|
103
|
+ size: A4 portrait;
|
|
|
104
|
+ }
|
|
|
105
|
+ </style>
|
|
|
106
|
+
|
|
|
107
|
+</head>
|
|
|
108
|
+
|
|
|
109
|
+<body>
|
|
|
110
|
+
|
|
|
111
|
+ <!--startprint1-->
|
|
|
112
|
+ <div id="main1">
|
|
|
113
|
+ <div class="alignC headerAlign">
|
|
|
114
|
+<br />
|
|
|
115
|
+ <h2 style="margin-bottom: 15px;">
|
|
|
116
|
+ 12345政府服务热线关键词统计
|
|
|
117
|
+ </h2>
|
|
|
118
|
+ <h3>
|
|
|
119
|
+ <div>时间:
|
|
|
120
|
+ <span class="startTimeKW">-</span>
|
|
|
121
|
+ <span class="datehide">至</span>
|
|
|
122
|
+ <span class="endTimeKW datehide">-</span>
|
|
|
123
|
+ </div>
|
|
|
124
|
+ </h3>
|
|
|
125
|
+
|
|
|
126
|
+ </div>
|
|
|
127
|
+ <table class="alignC" border="1" cellpadding="4" cellspacing="0" bordercolor="#cbcbcb">
|
|
|
128
|
+ <tbody id="KeyWordsStatistics">
|
|
|
129
|
+ <!--关键词统计情况-->
|
|
|
130
|
+ <tr>
|
|
|
131
|
+ <td width="40%" class="tableHead">
|
|
|
132
|
+ 关键词
|
|
|
133
|
+ </td>
|
|
|
134
|
+ <td width="40%" class="tableHead">
|
|
|
135
|
+ 统计数量
|
|
|
136
|
+ </td>
|
|
|
137
|
+ <td width="20%" class="tableHead">
|
|
|
138
|
+ 排名
|
|
|
139
|
+ </td>
|
|
|
140
|
+ </tr>
|
|
|
141
|
+ </tbody>
|
|
|
142
|
+ </table>
|
|
|
143
|
+ </div><!--endprint1-->
|
|
|
144
|
+ <div class="alignC">
|
|
|
145
|
+ <input type="button" value="打印" class="btn" id="printBtn1"/>
|
|
|
146
|
+ </div>
|
|
|
147
|
+
|
|
|
148
|
+ <script type="text/javascript">
|
|
|
149
|
+ var kWI = helper.request.queryString("kWIndex");
|
|
|
150
|
+ var kWdate = helper.request.queryString("Qdate");
|
|
|
151
|
+ console.log(kWdate);
|
|
|
152
|
+ $(document).ready(function(){
|
|
|
153
|
+ $.getJSON(huayi.config.callcenter_url + 'DataAnalysis/GetKeyReportNew', {
|
|
|
154
|
+ dateParty: kWdate,
|
|
|
155
|
+ "token": $.cookie("token")
|
|
|
156
|
+ }, function (result) {
|
|
|
157
|
+ if (result.state.toLowerCase() == "success") {
|
|
|
158
|
+ var content = result.data;
|
|
|
159
|
+ if(content){
|
|
|
160
|
+ if(kWI==1){
|
|
|
161
|
+ if($('.datehide').show()){
|
|
|
162
|
+ $('.datehide').hide();
|
|
|
163
|
+ }
|
|
|
164
|
+ $('#main1 .startTimeKW').html(content.ds);
|
|
|
165
|
+ }
|
|
|
166
|
+ var keyReports = content.ds;
|
|
|
167
|
+ //日统计
|
|
|
168
|
+ for(var i = 0; i < keyReports.length; i++){
|
|
|
169
|
+ //debugger;
|
|
|
170
|
+ var html = '<tr>'+
|
|
|
171
|
+ '<td><span>'+ keyReports[i].keyname +'</span></td>'+
|
|
|
172
|
+ '<td><span>'+ keyReports[i].count +'</span></td>'+
|
|
|
173
|
+ '<td><span>'+ keyReports[i].sort +'</span></td>'+
|
|
|
174
|
+ '</tr>';
|
|
|
175
|
+ $('#KeyWordsStatistics').append(html);
|
|
|
176
|
+ }
|
|
|
177
|
+ }
|
|
|
178
|
+ }
|
|
|
179
|
+ })
|
|
|
180
|
+ })
|
|
|
181
|
+
|
|
|
182
|
+ /*打印*/
|
|
|
183
|
+ $(document).on('click','#printBtn1',{printPage: 1},preview);
|
|
|
184
|
+ function preview(e) {
|
|
|
185
|
+ var oper = e.data.printPage;
|
|
|
186
|
+ if (oper < 5) {
|
|
|
187
|
+ bdhtml = window.document.body.innerHTML; //获取当前页的html代码
|
|
|
188
|
+ sprnstr = "<!--startprint" + oper + "-->"; //设置打印开始区域
|
|
|
189
|
+ eprnstr = "<!--endprint" + oper + "-->"; //设置打印结束区域
|
|
|
190
|
+ prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr) + 18); //从开始代码向后取html
|
|
|
191
|
+ print.portrait = true ;//纵向打印
|
|
|
192
|
+ prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html
|
|
|
193
|
+ window.document.body.innerHTML = prnhtml;
|
|
|
194
|
+ window.print();
|
|
|
195
|
+ window.document.body.innerHTML = bdhtml;
|
|
|
196
|
+ } else {
|
|
|
197
|
+ window.print();
|
|
|
198
|
+ }
|
|
|
199
|
+ }
|
|
|
200
|
+
|
|
|
201
|
+ </script>
|
|
|
202
|
+</body>
|
|
|
203
|
+
|
|
|
204
|
+</html>
|