|
|
@@ -0,0 +1,313 @@
|
|
|
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="../Script/Common/huayi.load.js"></script>
|
|
|
9
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
10
|
+ <link href="../css/Table/table1.css" rel="stylesheet" />
|
|
|
11
|
+ <link href="../css/init.css" rel="stylesheet" />
|
|
|
12
|
+ <script src="../js/laydate/laydate.js"></script>
|
|
|
13
|
+ <style>
|
|
|
14
|
+ table td {
|
|
|
15
|
+ word-break: break-all;
|
|
|
16
|
+ word-wrap: break-word;
|
|
|
17
|
+ }
|
|
|
18
|
+
|
|
|
19
|
+ .add_time input {
|
|
|
20
|
+ width: 50%;
|
|
|
21
|
+ }
|
|
|
22
|
+ .th-box {
|
|
|
23
|
+ background-color: #ffffff;
|
|
|
24
|
+ }
|
|
|
25
|
+ #settime,#settime{
|
|
|
26
|
+ width: 228px;
|
|
|
27
|
+ }
|
|
|
28
|
+
|
|
|
29
|
+ </style>
|
|
|
30
|
+ </head>
|
|
|
31
|
+
|
|
|
32
|
+ <body class="gray-bg">
|
|
|
33
|
+ <div class="daoHang clearfix">
|
|
|
34
|
+ <div class="dhLeft">
|
|
|
35
|
+ <sapn><i class="syIcon"></i>位置:
|
|
|
36
|
+ <a href="javaScript:;" id="ReIndex">首页</a>>
|
|
|
37
|
+ <a href="javaScript:;">话务管理</a>>
|
|
|
38
|
+ <a href="" style="color: #000;">欢迎词语音管理</a>
|
|
|
39
|
+ </sapn>
|
|
|
40
|
+ </div>
|
|
|
41
|
+ <div class="dhRight">
|
|
|
42
|
+ <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
|
|
|
43
|
+ </div>
|
|
|
44
|
+
|
|
|
45
|
+ </div>
|
|
|
46
|
+ <div class="wrapper wrapper-content animated fadeInRight">
|
|
|
47
|
+
|
|
|
48
|
+ <div class="th-box">
|
|
|
49
|
+ <div class="form-inline clearfix th-bar">
|
|
|
50
|
+ <div class="form-group time-box">
|
|
|
51
|
+ <i class="tub fa fa-search"></i>
|
|
|
52
|
+ <input type="text" class="form-control" id="KeyWords" placeholder="请输入关键字">
|
|
|
53
|
+ </div>
|
|
|
54
|
+ <div class="form-group time-box">
|
|
|
55
|
+ <select class="form-control" id="itemid">
|
|
|
56
|
+ <option value="">请选择项目id</option>
|
|
|
57
|
+ <option value="0">未启动</option>
|
|
|
58
|
+ <option value="1">启动中</option>
|
|
|
59
|
+ </select>
|
|
|
60
|
+ </div>
|
|
|
61
|
+ <div class="form-group time-box">
|
|
|
62
|
+ <i class="tub fa fa-calendar"></i>
|
|
|
63
|
+ <input type="text" class="form-control" id="settime" placeholder="请选择起止时间">
|
|
|
64
|
+ </div>
|
|
|
65
|
+ <div class="form-group time-box">
|
|
|
66
|
+ <i class="tub fa fa-calendar"></i>
|
|
|
67
|
+ <input type="text" class="form-control" id="settimes" placeholder="请选择有效时间">
|
|
|
68
|
+ </div>
|
|
|
69
|
+ <div class="form-group time-box">
|
|
|
70
|
+ <select class="form-control" id="state">
|
|
|
71
|
+ <option value="">请选择状态</option>
|
|
|
72
|
+ <option value="0">未启动</option>
|
|
|
73
|
+ <option value="1">启动中</option>
|
|
|
74
|
+ </select>
|
|
|
75
|
+ </div>
|
|
|
76
|
+
|
|
|
77
|
+ <div class="form-group pull-right tool_bars">
|
|
|
78
|
+ <input type="button" class="sc_btn" id="sceach_btn" value="搜索" />
|
|
|
79
|
+ <input type="button" class="sc_btn" id="HY_add" onclick="btn_add()" value="添加" />
|
|
|
80
|
+ <input type="button" class="sc_btn" id="HY_edit" onclick="btn_edit()" value="修改" />
|
|
|
81
|
+ <input type="button" class="sc_btn" id="HY_delete" onclick="btn_deletes()" value="删除" />
|
|
|
82
|
+ </div>
|
|
|
83
|
+ </div>
|
|
|
84
|
+ </div>
|
|
|
85
|
+ <div style="width: 100%;padding-top: 10px;">
|
|
|
86
|
+ <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
|
|
|
87
|
+ <thead>
|
|
|
88
|
+ <tr>
|
|
|
89
|
+ <th data-field="state" data-checkbox="true"></th>
|
|
|
90
|
+ <th data-field="item">项目名称</th>
|
|
|
91
|
+ <th data-field="path" data-formatter="setCode" data-align="center">录音</th>
|
|
|
92
|
+ <th data-field="bytime">生效时间</th>
|
|
|
93
|
+ <th data-field="eytime">失效时间</th>
|
|
|
94
|
+ <th data-field="btime">开始时间</th>
|
|
|
95
|
+ <th data-field="etime">结束时间</th>
|
|
|
96
|
+ <th data-field="state" data-formatter="formatterState">状态</th>
|
|
|
97
|
+ <th data-field="remark" data-formatter="formatterRemark">备注</th>
|
|
|
98
|
+ </tr>
|
|
|
99
|
+ </thead>
|
|
|
100
|
+ <tbody id="tbody"></tbody>
|
|
|
101
|
+ </table>
|
|
|
102
|
+ </div>
|
|
|
103
|
+ </div>
|
|
|
104
|
+ <!--下载框-->
|
|
|
105
|
+ <div class="t-shade">
|
|
|
106
|
+ <div class="shade_k">
|
|
|
107
|
+ <div class="shade_title">
|
|
|
108
|
+ <span>录音播放与下载<srong class="cknum"></srong></span>
|
|
|
109
|
+ <span class="setwin"><a>x</a></span>
|
|
|
110
|
+ </div>
|
|
|
111
|
+ <div class="shade_content">
|
|
|
112
|
+ <div class="Ly_box audiojs">
|
|
|
113
|
+ </div>
|
|
|
114
|
+ <div class="boxCon LY_box">
|
|
|
115
|
+
|
|
|
116
|
+ </div>
|
|
|
117
|
+ </div>
|
|
|
118
|
+ </div>
|
|
|
119
|
+ </div>
|
|
|
120
|
+ <script>
|
|
|
121
|
+ $(document).ready(function() {
|
|
|
122
|
+ laydate.render({
|
|
|
123
|
+ elem: '#settime',
|
|
|
124
|
+ theme: '#1ab394',
|
|
|
125
|
+ calendar: true,
|
|
|
126
|
+ range: '~'
|
|
|
127
|
+ });
|
|
|
128
|
+ laydate.render({
|
|
|
129
|
+ elem: '#settimes',
|
|
|
130
|
+ theme: '#1ab394',
|
|
|
131
|
+ calendar: true,
|
|
|
132
|
+ range: '~'
|
|
|
133
|
+ });
|
|
|
134
|
+ initTable();
|
|
|
135
|
+ /*搜索*/
|
|
|
136
|
+ $("#sceach_btn").click(function() {
|
|
|
137
|
+ initTable();
|
|
|
138
|
+ })
|
|
|
139
|
+ $(".setwin").click(function() {
|
|
|
140
|
+ $(".t-shade").removeClass("cx");
|
|
|
141
|
+ $('audio')[0].pause();
|
|
|
142
|
+ });
|
|
|
143
|
+ })
|
|
|
144
|
+ function initTable() {
|
|
|
145
|
+ //先销毁表格
|
|
|
146
|
+ $('#list').bootstrapTable('destroy');
|
|
|
147
|
+ //初始化表格,动态从服务器加载数据
|
|
|
148
|
+ $("#list").bootstrapTable({
|
|
|
149
|
+ method: "get", //使用get请求到服务器获取数据
|
|
|
150
|
+ url: huayi.config.callcenter_url + "IVRWelcome/GetList", //获取数据的Servlet地址
|
|
|
151
|
+ contentType: 'application/x-www-form-urlencoded',
|
|
|
152
|
+ striped: true, //表格显示条纹
|
|
|
153
|
+ pagination: true, //启动分页
|
|
|
154
|
+ pageSize: 10, //每页显示的记录数
|
|
|
155
|
+ pageNumber: 1, //当前第几页
|
|
|
156
|
+ pageList: [10, 20, 50, 100], //记录数可选列表
|
|
|
157
|
+ search: false, //是否启用查询
|
|
|
158
|
+ showColumns: false, //显示下拉框勾选要显示的列
|
|
|
159
|
+ showRefresh: false, //显示刷新按钮
|
|
|
160
|
+ sidePagination: "server", //表示服务端请求
|
|
|
161
|
+ //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
|
|
162
|
+ //设置为limit可以获取limit, offset, search, sort, order
|
|
|
163
|
+ queryParamsType: "undefined",
|
|
|
164
|
+ queryParams: function queryParams(params) { //设置查询参数
|
|
|
165
|
+ var param = {
|
|
|
166
|
+ page: params.pageNumber,
|
|
|
167
|
+ pagesize: params.pageSize,
|
|
|
168
|
+ key: $("#KeyWords").val(),
|
|
|
169
|
+ itemid: $("#itemid").val(),
|
|
|
170
|
+ btime: $('#settime').val() && $('#settime').val().split(' ~ ')[0],
|
|
|
171
|
+ etime: $('#settime').val() && $('#settime').val().split(' ~ ')[1],
|
|
|
172
|
+ bytime: $('#settimes').val() && $('#settimes').val().split(' ~ ')[0],
|
|
|
173
|
+ eytime: $('#settimes').val() && $('#settimes').val().split(' ~ ')[1],
|
|
|
174
|
+ state:$('#state').val(),
|
|
|
175
|
+ token: $.cookie("token")
|
|
|
176
|
+ };
|
|
|
177
|
+ return param;
|
|
|
178
|
+ },
|
|
|
179
|
+ onLoadSuccess: function() { //加载成功时执行
|
|
|
180
|
+ //layer.msg("加载成功");
|
|
|
181
|
+ },
|
|
|
182
|
+ onLoadError: function() { //加载失败时执行
|
|
|
183
|
+ //layer.msg("加载数据失败", { time: 1500, icon: 2 });
|
|
|
184
|
+ }
|
|
|
185
|
+ });
|
|
|
186
|
+ }
|
|
|
187
|
+ /*删除提示*/
|
|
|
188
|
+ function btn_deletes(){
|
|
|
189
|
+ var ids = $.map($('#list').bootstrapTable('getSelections'),
|
|
|
190
|
+ function(row) {
|
|
|
191
|
+ return row.id;
|
|
|
192
|
+ });
|
|
|
193
|
+ /*判断长度*/
|
|
|
194
|
+ if(ids.length <= 0) {
|
|
|
195
|
+ layer.confirm('没有可删除的选项?', {
|
|
|
196
|
+ btn: ['确定'] //按钮
|
|
|
197
|
+ });
|
|
|
198
|
+ return;
|
|
|
199
|
+ }
|
|
|
200
|
+ removes();
|
|
|
201
|
+ }
|
|
|
202
|
+ function removes() {
|
|
|
203
|
+ layer.confirm('确定删除当前记录?', {
|
|
|
204
|
+ btn: ['是', '否'] //按钮
|
|
|
205
|
+ }, function() {
|
|
|
206
|
+
|
|
|
207
|
+ /*执行删除*/
|
|
|
208
|
+ var ids = $.map($('#list').bootstrapTable('getSelections'),
|
|
|
209
|
+ function(row) {
|
|
|
210
|
+ return row.id;
|
|
|
211
|
+ });
|
|
|
212
|
+ /*发送请求*/
|
|
|
213
|
+ $.post(huayi.config.callcenter_url + "IVRWelcome/DelIVRWords", {
|
|
|
214
|
+ ids: ids,
|
|
|
215
|
+ token: $.cookie("token")
|
|
|
216
|
+ }, function(result) {
|
|
|
217
|
+ result = JSON.parse(result);
|
|
|
218
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
219
|
+ layer.msg("删除成功");
|
|
|
220
|
+ $('#list').bootstrapTable('refresh');
|
|
|
221
|
+ }
|
|
|
222
|
+ })
|
|
|
223
|
+ });
|
|
|
224
|
+ }
|
|
|
225
|
+ //添加
|
|
|
226
|
+ function btn_add(){
|
|
|
227
|
+ layer.open({
|
|
|
228
|
+ type: 2,
|
|
|
229
|
+ content: "addWelcomeWords.html",
|
|
|
230
|
+ title: '添加欢迎词语音',
|
|
|
231
|
+ area: ['75%', '70%'], //宽高
|
|
|
232
|
+ });
|
|
|
233
|
+ }
|
|
|
234
|
+ //修改
|
|
|
235
|
+ function btn_edit(){
|
|
|
236
|
+ var ids = $.map($('#list').bootstrapTable('getSelections'),
|
|
|
237
|
+ function(row) {
|
|
|
238
|
+ return row.id;
|
|
|
239
|
+ });
|
|
|
240
|
+ if(ids.length != 1) {
|
|
|
241
|
+ layer.confirm('请选择一行进行修改?', {
|
|
|
242
|
+ btn: ['确定'] //按钮
|
|
|
243
|
+ });
|
|
|
244
|
+ return;
|
|
|
245
|
+ } else {
|
|
|
246
|
+ layer.open({
|
|
|
247
|
+ type: 2,
|
|
|
248
|
+ content: "addWelcomeWords.html?id="+ids,
|
|
|
249
|
+ title: '修改欢迎词语音',
|
|
|
250
|
+ area: ['75%', '70%'], //宽高
|
|
|
251
|
+ });
|
|
|
252
|
+
|
|
|
253
|
+ }
|
|
|
254
|
+ }
|
|
|
255
|
+ //状态
|
|
|
256
|
+ function formatterState(val,row){
|
|
|
257
|
+ var str="";
|
|
|
258
|
+ if(val==0){
|
|
|
259
|
+ str='未启动'
|
|
|
260
|
+ }else{
|
|
|
261
|
+ str='启动中'
|
|
|
262
|
+ }
|
|
|
263
|
+ return str
|
|
|
264
|
+ }
|
|
|
265
|
+ //备注
|
|
|
266
|
+ function formatterRemark(val){
|
|
|
267
|
+ var str="";
|
|
|
268
|
+ if(val) {
|
|
|
269
|
+ if(val.length > 12) {
|
|
|
270
|
+ str='<div title="'+ val +'">'+val.substring(0, 12) + '...</div>';
|
|
|
271
|
+ }else{
|
|
|
272
|
+ str='<div title="'+ val +'">'+ val + '</div>';
|
|
|
273
|
+ }
|
|
|
274
|
+ return str;
|
|
|
275
|
+ }
|
|
|
276
|
+ }
|
|
|
277
|
+ //音频
|
|
|
278
|
+ function setCode(val) {
|
|
|
279
|
+ if(val) {
|
|
|
280
|
+ return '<div class="imgs">' +
|
|
|
281
|
+ '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
|
|
|
282
|
+ '</div>';
|
|
|
283
|
+ } else {
|
|
|
284
|
+ return '';
|
|
|
285
|
+ }
|
|
|
286
|
+ }
|
|
|
287
|
+ //录音
|
|
|
288
|
+ function ck(val) {
|
|
|
289
|
+// if(!!window.ActiveXObject || "ActiveXObject" in window){
|
|
|
290
|
+// layer.open({
|
|
|
291
|
+// type: 1,
|
|
|
292
|
+// content: htmls,
|
|
|
293
|
+// title: '录音播放',
|
|
|
294
|
+// area: ['55%', '65%'], //宽高
|
|
|
295
|
+// });
|
|
|
296
|
+// WindowsMediaPlayer.URL=$(val).attr('item');
|
|
|
297
|
+// $('<a href="' + $(val).attr('item') + '" class="sc_btn LY "download="' + $(val).attr('item') + '">下载录音</a>').appendTo(".xzly");
|
|
|
298
|
+//
|
|
|
299
|
+// }else{
|
|
|
300
|
+ var path = $(val).attr("item");
|
|
|
301
|
+ $(".t-shade").addClass("cx");
|
|
|
302
|
+ $(".Ly_box").empty();
|
|
|
303
|
+ $(".LY_box").empty();
|
|
|
304
|
+ $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" type="audio/v3" controls="controls"></audio>').appendTo(".Ly_box");
|
|
|
305
|
+ $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");
|
|
|
306
|
+// }
|
|
|
307
|
+ }
|
|
|
308
|
+
|
|
|
309
|
+ </script>
|
|
|
310
|
+
|
|
|
311
|
+ </body>
|
|
|
312
|
+
|
|
|
313
|
+</html>
|