|
@ -2,6 +2,69 @@
|
2
|
2
|
*
|
3
|
3
|
*/
|
4
|
4
|
|
|
5
|
//ajax封装函数
|
|
6
|
|
|
7
|
//创建构造函数类
|
|
8
|
function Conuslt(){
|
|
9
|
|
|
10
|
|
|
11
|
};
|
|
12
|
|
|
13
|
Conuslt.prototype = {
|
|
14
|
init:function(consultanatId,professorId){
|
|
15
|
var userid = $.cookie("userid");
|
|
16
|
this.consultanatId = {
|
|
17
|
"consultantId":userid
|
|
18
|
};
|
|
19
|
this.professorId = {
|
|
20
|
"professorId":userid
|
|
21
|
};
|
|
22
|
},
|
|
23
|
getConsultData:function(url,type,params,successConsultFn,errorMsg){
|
|
24
|
|
|
25
|
$.ajax({
|
|
26
|
"url":url,
|
|
27
|
"type" : type,
|
|
28
|
"data" :params,
|
|
29
|
"success":successConsultFn,
|
|
30
|
"error":function(){
|
|
31
|
$.MsgBox.Alert(errorMsg);
|
|
32
|
}
|
|
33
|
});
|
|
34
|
},
|
|
35
|
getReplyData:function(url,type,params,successRelyFn,errorMsg){
|
|
36
|
$.ajax({
|
|
37
|
"url":url,
|
|
38
|
"type" : type,
|
|
39
|
"data" :params,
|
|
40
|
"success":successRelyFn,
|
|
41
|
"error":function(){
|
|
42
|
$.MsgBox.Alert(errorMsg);
|
|
43
|
}
|
|
44
|
});
|
|
45
|
},
|
|
46
|
getConsultHtml:function(url,type,params,successHtmlFn,errorMsg){
|
|
47
|
$.ajax({
|
|
48
|
"url":url,
|
|
49
|
"type" : type,
|
|
50
|
"data" :params,
|
|
51
|
"success":successHtmlFn,
|
|
52
|
"error":function(){
|
|
53
|
$.MsgBox.Alert(errorMsg);
|
|
54
|
}
|
|
55
|
});
|
|
56
|
},
|
|
57
|
}
|
|
58
|
|
|
59
|
|
|
60
|
//收到咨询数据成功函数
|
|
61
|
function successRelyFn(response){
|
|
62
|
|
|
63
|
};
|
|
64
|
|
|
65
|
|
|
66
|
|
|
67
|
|
5
|
68
|
$(document).ready(function(){
|
6
|
69
|
|
7
|
70
|
//登陆人id
|
|
@ -18,6 +81,7 @@ $(document).ready(function(){
|
18
|
81
|
};
|
19
|
82
|
// console.log(localStorage.getItem("professorId"));
|
20
|
83
|
$(".workmenu").on("click","#consultbtn",function(){
|
|
84
|
|
21
|
85
|
//1.先ajax请求,判断是否有收到咨询消息,然后ajax-html,然后渲染数据
|
22
|
86
|
// console.log(professorIdStrByconsult);
|
23
|
87
|
//检查用户是否登录
|
|
@ -27,7 +91,6 @@ $(document).ready(function(){
|
27
|
91
|
"type" : "get",
|
28
|
92
|
//传值:登陆人id:专家id
|
29
|
93
|
"data" :professorIdStrByconsult,
|
30
|
|
|
31
|
94
|
"contentType" : "application/x-www-form-urlencoded",
|
32
|
95
|
"beforeSend":function(response){
|
33
|
96
|
// console.log(response)
|
|
@ -36,7 +99,8 @@ $(document).ready(function(){
|
36
|
99
|
console.log(consultResponse);
|
37
|
100
|
|
38
|
101
|
//如果没有咨询数据 隐藏收到咨询
|
39
|
|
if(consultResponse["data"]["total"] == 0){alert("未收到咨询");
|
|
102
|
if(consultResponse["data"]["total"] == 0){
|
|
103
|
// alert("未收到咨询");
|
40
|
104
|
/*$(".worksamlltit3:first").hide();
|
41
|
105
|
$(".workmysrc3:first").hide();
|
42
|
106
|
$(".workmysrc3:last").fadeIn();*/
|
|
@ -54,7 +118,7 @@ $(document).ready(function(){
|
54
|
118
|
$(".workmysrc3:first").hide();
|
55
|
119
|
$(".workmysrc3:last").fadeIn();
|
56
|
120
|
|
57
|
|
//ajax请求收到回复
|
|
121
|
//======================================没有咨询情况下 ajax请求收到回复======================
|
58
|
122
|
$.ajax({
|
59
|
123
|
"url":"/ajax/consult/pqcon",//收到回复接口
|
60
|
124
|
"data":consultIdStrByReply,
|
|
@ -63,7 +127,7 @@ $(document).ready(function(){
|
63
|
127
|
// console.log(response)
|
64
|
128
|
},
|
65
|
129
|
"success":function(replyResponse){
|
66
|
|
// console.log(replyResponse)
|
|
130
|
console.log(replyResponse)
|
67
|
131
|
|
68
|
132
|
var allData = replyResponse.data;
|
69
|
133
|
var replyData = allData["data"];
|
|
@ -71,7 +135,7 @@ $(document).ready(function(){
|
71
|
135
|
if(replyData.length != 0 && replyData.length != null){
|
72
|
136
|
|
73
|
137
|
for(var i = 0; i < replyData.length;i++){
|
74
|
|
replyTrHtml =
|
|
138
|
replyTrHtml +=
|
75
|
139
|
"<div class='workselectitem' id=' " + replyData[i]["consultId"] +" ' >" +
|
76
|
140
|
"<table width='100%'>" +
|
77
|
141
|
"<tbody><tr>" +
|
|
@ -98,14 +162,14 @@ $(document).ready(function(){
|
98
|
162
|
"</div>" +
|
99
|
163
|
"<div class='workhandle'>" +
|
100
|
164
|
"<div class='rightopert floatR'>" +
|
101
|
|
"<span class='replybtn'> " + replyData[i]["consultStatus"] +" </span>" +
|
|
165
|
"<span class='replybtn' id=' "+ replyData[i]["professorId"]+ " '> " + replyData[i]["consultStatus"] +" </span>" +
|
102
|
166
|
"<span class='moreopert'>...</span>" +
|
103
|
167
|
"<ul class='moreopertbtn'>" +
|
104
|
168
|
"<li>投诉</li>" +
|
105
|
169
|
"</ul>" +
|
106
|
170
|
"</div>" +
|
107
|
171
|
"<div class='leftstate floatR'>" +
|
108
|
|
"<span class='coultstate'><i> " + replyData[i]["assessStatus"] +" </i><em></em></span>" +
|
|
172
|
"<span class='coultstate'><i> " + replyData[i]["consultStatus"] +" </i><em></em></span>" +
|
109
|
173
|
"</div>" +
|
110
|
174
|
"</div>" +
|
111
|
175
|
"</td>" +
|
|
@ -113,9 +177,9 @@ $(document).ready(function(){
|
113
|
177
|
"</div>";
|
114
|
178
|
|
115
|
179
|
};
|
116
|
|
|
117
|
|
// $(".tcdPageCode:last").before(replyTrHtml);
|
118
|
|
$(".workmenubox:last").next().html(replyTrHtml);
|
|
180
|
// console.log(replyTrHtml);
|
|
181
|
$(".tcdPageCode:last").before(replyTrHtml);
|
|
182
|
// $("#workContainer2").append(replyTrHtml);
|
119
|
183
|
}else{
|
120
|
184
|
return false;
|
121
|
185
|
}
|
|
@ -127,21 +191,150 @@ $(document).ready(function(){
|
127
|
191
|
// console.log(response)
|
128
|
192
|
},
|
129
|
193
|
|
130
|
|
})
|
131
|
|
|
|
194
|
});
|
|
195
|
|
|
196
|
//==========================================只有收到回复时,下拉菜单改变 ajax开始==================
|
|
197
|
|
|
198
|
//
|
|
199
|
//排列顺序(正序、倒序)
|
|
200
|
var sortFlag2 = true;//正倒排序标记
|
|
201
|
$("#replyArrow").click(function(){
|
|
202
|
if(sortFlag2 == true){
|
|
203
|
$(this).find("div").css("background-position","-20px 1px");
|
|
204
|
$("#timeSortId2").val("1");
|
|
205
|
|
|
206
|
sortFlag2 =false;
|
|
207
|
|
|
208
|
}else{
|
|
209
|
$(this).find("div").css("background-position","0px 1px");
|
|
210
|
$("#timeSortId2").val("0");
|
|
211
|
|
|
212
|
sortFlag2=true;
|
|
213
|
}
|
|
214
|
|
|
215
|
});
|
|
216
|
|
|
217
|
var timeType2,sortType2,replyStatus,consultId;
|
|
218
|
|
|
219
|
replyStatus = $("#replySelectId").val();//回复状态值
|
|
220
|
timeType2 = $("#timeTypeId2").val();//时间类型值
|
|
221
|
sortType2 = $("#timeSortId2").val();//排序值;
|
|
222
|
|
|
223
|
//console.log(consultStatus,timeType,sortType+"res333");
|
|
224
|
|
|
225
|
//默认传值:
|
|
226
|
var replyInfo = {
|
|
227
|
"consultantId":userid,
|
|
228
|
"status":replyStatus,
|
|
229
|
"timeType":timeType2,
|
|
230
|
"sortType":sortType2
|
|
231
|
};
|
|
232
|
function replyStatusFn(){
|
|
233
|
//改变后,要传的值
|
|
234
|
replyStatus = $("#replySelectId").val();//咨询状态值
|
|
235
|
timeType2 = $("#timeTypeId2").val();//时间类型值
|
|
236
|
sortType2 = $("#timeSortId2").val();//排序值;
|
|
237
|
|
|
238
|
//要传的值:
|
|
239
|
replyInfo = {
|
|
240
|
"consultantId":userid,
|
|
241
|
"status":replyStatus,
|
|
242
|
"timeType":timeType2,
|
|
243
|
"sortType":sortType2
|
|
244
|
};
|
|
245
|
// console.log("ajax中的值:"+ replyInfo.replyStatus + replyInfo.timeType + replyInfo.sortType +replyInfo.consultantId);
|
|
246
|
|
|
247
|
//=====================================只有收到回复时 更新下拉菜单==============
|
|
248
|
$.ajax({
|
|
249
|
"url":"/ajax/consult/pqcon",//更新下拉菜单接口
|
|
250
|
"data":replyInfo,
|
|
251
|
"beforeSend":function(response){
|
|
252
|
console.log(response);
|
|
253
|
},
|
|
254
|
"success":function(response){
|
|
255
|
$("#workContainer2 .workselectitem").remove();
|
|
256
|
// $(".tcdPageCode:first").before().empty();
|
|
257
|
replyTrHtml = '';
|
|
258
|
console.log(response);
|
|
259
|
var allData = response.data;
|
|
260
|
var replyData = allData["data"];
|
|
261
|
|
|
262
|
for(var i = 0 ; i < replyData.length;i++){
|
|
263
|
replyTrHtml +=
|
|
264
|
"<div class='workselectitem' id=' " + replyData[i]["consultId"] +" ' >" +
|
|
265
|
"<table width='100%'>" +
|
|
266
|
"<tbody><tr>" +
|
|
267
|
"<td width='14%' class='messagebox'>" +
|
|
268
|
"<a class='workhead workitimg' href='information.html'>" +
|
|
269
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
|
270
|
"</a>" +
|
|
271
|
"<span class='msgprompt'>1</span>" +
|
|
272
|
"</td>" +
|
|
273
|
"<td style='position:relative;' width='86%'>" +
|
|
274
|
"<div class='workinfor worksitcon'>" +
|
|
275
|
"<h4><a href='' class='named' id='nameS'> " + replyData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
|
276
|
"<h6><span>职称 " + replyData[i]["professor"]["title"] +" </span>,<span>职位 " + replyData[i]["professor"] +" </span>,<span> " + replyData["consultId"] +" </span>,<span> " + replyData["consultId"] +" </span> | <span> " + replyData["consultId"] +" </span></h6>" +
|
|
277
|
"<h6>"+
|
|
278
|
"<span>咨询主题:<em> " + replyData[i]["consultTitle"] +" </em></span>" +
|
|
279
|
" " +
|
|
280
|
"<span>咨询类型:<em> " + replyData[i]["consultType"] +" </em></span>" +
|
|
281
|
" <span>" +
|
|
282
|
"咨询发起时间:<em> " + replyData[i]["createTime"] +" </em>" +
|
|
283
|
"</span></h6>" +
|
|
284
|
"<p>最后回复<span class='lasttime'> ( " + replyData[i]["revoveryTime"] +" ) </span>:" +
|
|
285
|
"</p>" +
|
|
286
|
"<p class='rebackcon'> " + replyData[i]["consultContant"] +" </p>" +
|
|
287
|
"</div>" +
|
|
288
|
"<div class='workhandle'>" +
|
|
289
|
"<div class='rightopert floatR'>" +
|
|
290
|
"<span class='replybtn' id=' " + replyData[i]['consultId'] + " '> " + replyData[i]["consultStatus"] +" </span>" +
|
|
291
|
"<span class='moreopert'>...</span>" +
|
|
292
|
"<ul class='moreopertbtn'>" +
|
|
293
|
"<li>投诉</li>" +
|
|
294
|
"</ul>" +
|
|
295
|
"</div>" +
|
|
296
|
"<div class='leftstate floatR'>" +
|
|
297
|
"<span class='coultstate'><i> " + replyData[i]["consultStatus"] +" </i><em></em></span>" +
|
|
298
|
"</div>" +
|
|
299
|
"</div>" +
|
|
300
|
"</td>" +
|
|
301
|
"</tr></tbody></table>" +
|
|
302
|
"</div>";
|
|
303
|
};
|
|
304
|
// console.log(replyTrHtml);
|
|
305
|
$(".tcdPageCode:last").before(replyTrHtml);
|
|
306
|
|
|
307
|
},
|
|
308
|
"error":function(response){
|
|
309
|
// console.log(response)
|
|
310
|
//更新下拉菜单失败
|
|
311
|
}
|
|
312
|
|
|
313
|
});
|
|
314
|
|
|
315
|
|
|
316
|
};//更新下拉菜单处理函数结束
|
|
317
|
|
|
318
|
//绑定回复状态事件
|
|
319
|
$(".replyOption ul").bind("click", "li",replyStatusFn);
|
|
320
|
|
|
321
|
//绑定回复状态事件
|
|
322
|
$(".timeOption2 ul").bind("click", "li",replyStatusFn);
|
|
323
|
|
|
324
|
$("#replyArrow").bind("click",replyStatusFn);
|
|
325
|
|
132
|
326
|
|
133
|
327
|
},
|
134
|
328
|
"error":function(response){
|
135
|
329
|
//请求页面失败
|
136
|
330
|
// console.log(response)
|
137
|
331
|
},
|
138
|
|
|
139
|
|
|
|
332
|
|
140
|
333
|
})
|
|
334
|
|
141
|
335
|
|
142
|
|
|
143
|
|
|
144
|
|
}else{alert("收到咨询");
|
|
336
|
}else{
|
|
337
|
// alert("收到咨询");
|
145
|
338
|
//ajax页面
|
146
|
339
|
$.ajax({
|
147
|
340
|
"url":"consult.html",
|
|
@ -185,22 +378,26 @@ $(document).ready(function(){
|
185
|
378
|
" " +
|
186
|
379
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
187
|
380
|
" <span>" +
|
188
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
|
381
|
"咨询发起时间:<em> " +
|
|
382
|
consultData[i]["createTime"].substr(0,4) + "-" + consultData[i]["createTime"].substr(4,2) + "-" + consultData[i]["createTime"].substr(6,2) + " " + consultData[i]["createTime"].substr(8,2)+ ":" +consultData[i]["createTime"].substr(10,2)+
|
|
383
|
"</em>" +
|
189
|
384
|
"</span></h6>" +
|
190
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
|
385
|
"<p>最后回复<span class='lasttime'> ( " +
|
|
386
|
consultData[i]["revoveryTime"].substr(0,4) + "-" + consultData[i]["revoveryTime"].substr(4,2) + "-" + consultData[i]["revoveryTime"].substr(6,2) + " " + consultData[i]["revoveryTime"].substr(8,2)+ ":" +consultData[i]["revoveryTime"].substr(10,2) +
|
|
387
|
") </span>:" +
|
191
|
388
|
"</p>" +
|
192
|
389
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
193
|
390
|
"</div>" +
|
194
|
391
|
"<div class='workhandle'>" +
|
195
|
392
|
"<div class='rightopert floatR'>" +
|
196
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
|
393
|
"<span class='replybtn' id='" + consultData[i]["consultId"] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
197
|
394
|
"<span class='moreopert'>...</span>" +
|
198
|
395
|
"<ul class='moreopertbtn'>" +
|
199
|
396
|
"<li>投诉</li>" +
|
200
|
397
|
"</ul>" +
|
201
|
398
|
"</div>" +
|
202
|
399
|
"<div class='leftstate floatR'>" +
|
203
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
|
400
|
"<span class='coultstate'><i> " + consultData[i]["consultStatus"] +" </i><em></em></span>" +
|
204
|
401
|
"</div>" +
|
205
|
402
|
"</div>" +
|
206
|
403
|
"</td>" +
|
|
@ -208,12 +405,12 @@ $(document).ready(function(){
|
208
|
405
|
"</div>";
|
209
|
406
|
|
210
|
407
|
|
211
|
|
}
|
212
|
|
// console.log(consultTrHtml);
|
213
|
|
// $(".tcdPageCode:first").before(consultTrHtml);
|
214
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
215
|
|
|
|
408
|
};
|
|
409
|
|
|
410
|
$(".tcdPageCode:first").before(consultTrHtml);
|
216
|
411
|
|
|
412
|
|
|
413
|
//================================================有咨询时,下拉菜单改===变 ajax==========================
|
217
|
414
|
// 排列顺序(正序、倒序)
|
218
|
415
|
var sortFlag = true;//正倒排序标记
|
219
|
416
|
$(".orderedbtn").click(function(){
|
|
@ -254,7 +451,9 @@ $(document).ready(function(){
|
254
|
451
|
consultStatus = $("#consultSelectId").val();//咨询状态值
|
255
|
452
|
timeType = $("#timeTypeId").val();//时间类型值
|
256
|
453
|
sortType = $("#timeSortId").val();//排序值;
|
257
|
|
consultTrHtml = '';
|
|
454
|
|
|
455
|
// consultTrHtml = '';
|
|
456
|
|
258
|
457
|
//要传的值:
|
259
|
458
|
consultInfo = {
|
260
|
459
|
"professorId":userid,
|
|
@ -264,23 +463,25 @@ $(document).ready(function(){
|
264
|
463
|
|
265
|
464
|
};
|
266
|
465
|
|
267
|
|
console.log("ajax中的值:"+ consultInfo.status + consultInfo.timeType + consultInfo.sortType + consultInfo.professorId);
|
|
466
|
console.log("ajax中的值:"+ consultInfo.status + consultInfo.timeType + consultInfo.sortType + consultInfo.consultantId);
|
268
|
467
|
|
269
|
468
|
//更新下拉菜单
|
270
|
469
|
$.ajax({
|
271
|
|
"url":"/ajax/consult/pqcon",//更新下拉菜单接口
|
|
470
|
"url":"/ajax/consult/pqpro",//更新下拉菜单接口
|
|
471
|
// /ajax/consult/pqpro
|
272
|
472
|
"data":consultInfo,
|
273
|
|
"dataType" : "json",
|
|
473
|
|
274
|
474
|
"beforeSend":function(response){
|
275
|
|
// console.log(response)
|
|
475
|
console.log(response);
|
276
|
476
|
},
|
277
|
477
|
"success":function(response){
|
278
|
|
// console.log(response);
|
279
|
|
var allData = consultResponse.data;
|
|
478
|
$("#workContainer .workselectitem").remove();
|
|
479
|
// $(".tcdPageCode:first").before().empty();
|
|
480
|
consultTrHtml = '';
|
|
481
|
console.log(response);
|
|
482
|
var allData = response.data;
|
280
|
483
|
var consultData = allData["data"];
|
281
|
484
|
|
282
|
|
//如果是全部
|
283
|
|
if(consultStatus == 0){alert("全部")
|
284
|
485
|
for(var i = 0 ; i < consultData.length;i++){
|
285
|
486
|
consultTrHtml +=
|
286
|
487
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
|
@ -295,7 +496,7 @@ $(document).ready(function(){
|
295
|
496
|
"<td style='position:relative;' width='86%'>" +
|
296
|
497
|
"<div class='workinfor worksitcon'>" +
|
297
|
498
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
298
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
|
499
|
"<h6><span>职称 " + consultData[i]["professor"]["title"] +" </span>,<span>职位 " + consultData[i]["professor"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
299
|
500
|
"<h6>"+
|
300
|
501
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
301
|
502
|
" " +
|
|
@ -309,391 +510,26 @@ $(document).ready(function(){
|
309
|
510
|
"</div>" +
|
310
|
511
|
"<div class='workhandle'>" +
|
311
|
512
|
"<div class='rightopert floatR'>" +
|
312
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
|
513
|
"<span class='replybtn' id=' " + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
313
|
514
|
"<span class='moreopert'>...</span>" +
|
314
|
515
|
"<ul class='moreopertbtn'>" +
|
315
|
516
|
"<li>投诉</li>" +
|
316
|
517
|
"</ul>" +
|
317
|
518
|
"</div>" +
|
318
|
519
|
"<div class='leftstate floatR'>" +
|
319
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
|
520
|
"<span class='coultstate'><i> " + consultData[i]["consultStatus"] +" </i><em></em></span>" +
|
320
|
521
|
"</div>" +
|
321
|
522
|
"</div>" +
|
322
|
523
|
"</td>" +
|
323
|
524
|
"</tr></tbody></table>" +
|
324
|
525
|
"</div>";
|
325
|
526
|
};
|
326
|
|
|
327
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
328
|
|
}
|
329
|
|
|
330
|
|
|
331
|
|
//如果状态为进行中
|
332
|
|
if(consultStatus == 1){
|
333
|
|
|
334
|
|
for(var i = 0 ; i < consultData.length;i++){
|
335
|
|
|
336
|
|
if(consultData[i]["consultStatus"] == 1){
|
337
|
|
alert("进行中");
|
338
|
|
//咨询信息页面渲染
|
339
|
|
consultTrHtml +=
|
340
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
341
|
|
"<table width='100%'>" +
|
342
|
|
"<tbody><tr>" +
|
343
|
|
"<td width='14%' class='messagebox'>" +
|
344
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
345
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
346
|
|
"</a>" +
|
347
|
|
"<span class='msgprompt'>1</span>" +
|
348
|
|
"</td>" +
|
349
|
|
"<td style='position:relative;' width='86%'>" +
|
350
|
|
"<div class='workinfor worksitcon'>" +
|
351
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
352
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
353
|
|
"<h6>"+
|
354
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
355
|
|
" " +
|
356
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
357
|
|
" <span>" +
|
358
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
359
|
|
"</span></h6>" +
|
360
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
361
|
|
"</p>" +
|
362
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
363
|
|
"</div>" +
|
364
|
|
"<div class='workhandle'>" +
|
365
|
|
"<div class='rightopert floatR'>" +
|
366
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
367
|
|
"<span class='moreopert'>...</span>" +
|
368
|
|
"<ul class='moreopertbtn'>" +
|
369
|
|
"<li>投诉</li>" +
|
370
|
|
"</ul>" +
|
371
|
|
"</div>" +
|
372
|
|
"<div class='leftstate floatR'>" +
|
373
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
374
|
|
"</div>" +
|
375
|
|
"</div>" +
|
376
|
|
"</td>" +
|
377
|
|
"</tr></tbody></table>" +
|
378
|
|
"</div>";
|
379
|
|
|
380
|
|
}
|
381
|
|
};
|
382
|
527
|
// console.log(consultTrHtml);
|
|
528
|
$(".tcdPageCode:first").before(consultTrHtml);
|
|
529
|
// $("#workContainer").append(consultTrHtml);
|
383
|
530
|
|
384
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
385
|
|
}
|
386
|
|
if(consultStatus == 2 || consultStatus == 3 || consultStatus == 4){alert("非进行中");
|
387
|
|
//状态不是进行中
|
388
|
|
for(var i = 0 ; i < consultData.length;i++){
|
389
|
|
|
390
|
|
if(consultData[i]["consultStatus"] != 1){
|
391
|
|
|
392
|
|
//咨询信息页面渲染
|
393
|
|
consultTrHtml +=
|
394
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
395
|
|
"<table width='100%'>" +
|
396
|
|
"<tbody><tr>" +
|
397
|
|
"<td width='14%' class='messagebox'>" +
|
398
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
399
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
400
|
|
"</a>" +
|
401
|
|
"<span class='msgprompt'>1</span>" +
|
402
|
|
"</td>" +
|
403
|
|
"<td style='position:relative;' width='86%'>" +
|
404
|
|
"<div class='workinfor worksitcon'>" +
|
405
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
406
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
407
|
|
"<h6>"+
|
408
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
409
|
|
" " +
|
410
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
411
|
|
" <span>" +
|
412
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
413
|
|
"</span></h6>" +
|
414
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
415
|
|
"</p>" +
|
416
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
417
|
|
"</div>" +
|
418
|
|
"<div class='workhandle'>" +
|
419
|
|
"<div class='rightopert floatR'>" +
|
420
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
421
|
|
"<span class='moreopert'>...</span>" +
|
422
|
|
"<ul class='moreopertbtn'>" +
|
423
|
|
"<li>投诉</li>" +
|
424
|
|
"</ul>" +
|
425
|
|
"</div>" +
|
426
|
|
"<div class='leftstate floatR'>" +
|
427
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
428
|
|
"</div>" +
|
429
|
|
"</div>" +
|
430
|
|
"</td>" +
|
431
|
|
"</tr></tbody></table>" +
|
432
|
|
"</div>";
|
433
|
|
|
434
|
|
}
|
435
|
|
};
|
436
|
|
//状态不是进行中
|
437
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
438
|
|
|
439
|
|
};
|
440
|
|
|
441
|
|
|
442
|
|
/*//按照时间排序
|
443
|
|
//按照发起时间排序
|
444
|
|
if(timeType == 0){alert("按照发起时间排序");
|
445
|
|
// consultTrHtml = '';
|
446
|
|
for(var i = 0 ; i < consultData.length;i++){
|
447
|
|
|
448
|
|
//咨询信息页面渲染
|
449
|
|
consultTrHtml +=
|
450
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
451
|
|
"<table width='100%'>" +
|
452
|
|
"<tbody><tr>" +
|
453
|
|
"<td width='14%' class='messagebox'>" +
|
454
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
455
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
456
|
|
"</a>" +
|
457
|
|
"<span class='msgprompt'>1</span>" +
|
458
|
|
"</td>" +
|
459
|
|
"<td style='position:relative;' width='86%'>" +
|
460
|
|
"<div class='workinfor worksitcon'>" +
|
461
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
462
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
463
|
|
"<h6>"+
|
464
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
465
|
|
" " +
|
466
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
467
|
|
" <span>" +
|
468
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
469
|
|
"</span></h6>" +
|
470
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
471
|
|
"</p>" +
|
472
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
473
|
|
"</div>" +
|
474
|
|
"<div class='workhandle'>" +
|
475
|
|
"<div class='rightopert floatR'>" +
|
476
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
477
|
|
"<span class='moreopert'>...</span>" +
|
478
|
|
"<ul class='moreopertbtn'>" +
|
479
|
|
"<li>投诉</li>" +
|
480
|
|
"</ul>" +
|
481
|
|
"</div>" +
|
482
|
|
"<div class='leftstate floatR'>" +
|
483
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
484
|
|
"</div>" +
|
485
|
|
"</div>" +
|
486
|
|
"</td>" +
|
487
|
|
"</tr></tbody></table>" +
|
488
|
|
"</div>";
|
489
|
|
|
490
|
|
};
|
491
|
|
//按发起时间排序
|
492
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
493
|
|
|
494
|
|
};*/
|
495
|
|
|
496
|
|
|
497
|
|
/*//按照最后回复时间排序
|
498
|
|
if(timeType == 1){alert("按照最后回复时间排序");
|
499
|
|
for(var i = 0 ; i < consultData.length;i++){
|
500
|
|
//咨询信息页面渲染
|
501
|
|
consultTrHtml +=
|
502
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
503
|
|
"<table width='100%'>" +
|
504
|
|
"<tbody><tr>" +
|
505
|
|
"<td width='14%' class='messagebox'>" +
|
506
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
507
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
508
|
|
"</a>" +
|
509
|
|
"<span class='msgprompt'>1</span>" +
|
510
|
|
"</td>" +
|
511
|
|
"<td style='position:relative;' width='86%'>" +
|
512
|
|
"<div class='workinfor worksitcon'>" +
|
513
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
514
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
515
|
|
"<h6>"+
|
516
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
517
|
|
" " +
|
518
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
519
|
|
" <span>" +
|
520
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
521
|
|
"</span></h6>" +
|
522
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
523
|
|
"</p>" +
|
524
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
525
|
|
"</div>" +
|
526
|
|
"<div class='workhandle'>" +
|
527
|
|
"<div class='rightopert floatR'>" +
|
528
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
529
|
|
"<span class='moreopert'>...</span>" +
|
530
|
|
"<ul class='moreopertbtn'>" +
|
531
|
|
"<li>投诉</li>" +
|
532
|
|
"</ul>" +
|
533
|
|
"</div>" +
|
534
|
|
"<div class='leftstate floatR'>" +
|
535
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
536
|
|
"</div>" +
|
537
|
|
"</div>" +
|
538
|
|
"</td>" +
|
539
|
|
"</tr></tbody></table>" +
|
540
|
|
"</div>";
|
541
|
|
};
|
542
|
|
|
543
|
|
//按照最后回复时间排序
|
544
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
545
|
|
|
546
|
|
}
|
547
|
|
//按照完成时间排序
|
548
|
|
if(timeType == 2){alert("按照完成时间排序");
|
549
|
|
for(var i = 0 ; i < consultData.length;i++){
|
550
|
|
//咨询信息页面渲染
|
551
|
|
consultTrHtml +=
|
552
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
553
|
|
"<table width='100%'>" +
|
554
|
|
"<tbody><tr>" +
|
555
|
|
"<td width='14%' class='messagebox'>" +
|
556
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
557
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
558
|
|
"</a>" +
|
559
|
|
"<span class='msgprompt'>1</span>" +
|
560
|
|
"</td>" +
|
561
|
|
"<td style='position:relative;' width='86%'>" +
|
562
|
|
"<div class='workinfor worksitcon'>" +
|
563
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
564
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
565
|
|
"<h6>"+
|
566
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
567
|
|
" " +
|
568
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
569
|
|
" <span>" +
|
570
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
571
|
|
"</span></h6>" +
|
572
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
573
|
|
"</p>" +
|
574
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
575
|
|
"</div>" +
|
576
|
|
"<div class='workhandle'>" +
|
577
|
|
"<div class='rightopert floatR'>" +
|
578
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
579
|
|
"<span class='moreopert'>...</span>" +
|
580
|
|
"<ul class='moreopertbtn'>" +
|
581
|
|
"<li>投诉</li>" +
|
582
|
|
"</ul>" +
|
583
|
|
"</div>" +
|
584
|
|
"<div class='leftstate floatR'>" +
|
585
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
586
|
|
"</div>" +
|
587
|
|
"</div>" +
|
588
|
|
"</td>" +
|
589
|
|
"</tr></tbody></table>" +
|
590
|
|
"</div>";
|
591
|
|
};
|
592
|
|
//按照完成时间排序
|
593
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
594
|
|
}
|
595
|
|
|
596
|
|
//排序
|
597
|
|
//倒序
|
598
|
|
if(sortType == 0){alert("倒序");
|
599
|
|
for(var i = 0 ; i < consultData.length;i++){
|
600
|
|
//咨询信息页面渲染
|
601
|
|
consultTrHtml +=
|
602
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
603
|
|
"<table width='100%'>" +
|
604
|
|
"<tbody><tr>" +
|
605
|
|
"<td width='14%' class='messagebox'>" +
|
606
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
607
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
608
|
|
"</a>" +
|
609
|
|
"<span class='msgprompt'>1</span>" +
|
610
|
|
"</td>" +
|
611
|
|
"<td style='position:relative;' width='86%'>" +
|
612
|
|
"<div class='workinfor worksitcon'>" +
|
613
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
614
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
615
|
|
"<h6>"+
|
616
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
617
|
|
" " +
|
618
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
619
|
|
" <span>" +
|
620
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
621
|
|
"</span></h6>" +
|
622
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
623
|
|
"</p>" +
|
624
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
625
|
|
"</div>" +
|
626
|
|
"<div class='workhandle'>" +
|
627
|
|
"<div class='rightopert floatR'>" +
|
628
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
629
|
|
"<span class='moreopert'>...</span>" +
|
630
|
|
"<ul class='moreopertbtn'>" +
|
631
|
|
"<li>投诉</li>" +
|
632
|
|
"</ul>" +
|
633
|
|
"</div>" +
|
634
|
|
"<div class='leftstate floatR'>" +
|
635
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
636
|
|
"</div>" +
|
637
|
|
"</div>" +
|
638
|
|
"</td>" +
|
639
|
|
"</tr></tbody></table>" +
|
640
|
|
"</div>";
|
641
|
|
};
|
642
|
|
//倒序
|
643
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
644
|
|
}
|
645
|
|
//正序
|
646
|
|
if(sortType == 1){alert("正序");
|
647
|
|
for(var i = 0 ; i < consultData.length;i++){
|
648
|
|
//咨询信息页面渲染
|
649
|
|
consultTrHtml +=
|
650
|
|
"<div class='workselectitem' id=' " + consultData[i]["consultId"] +" ' >" +
|
651
|
|
"<table width='100%'>" +
|
652
|
|
"<tbody><tr>" +
|
653
|
|
"<td width='14%' class='messagebox'>" +
|
654
|
|
"<a class='workhead workitimg' href='information.html'>" +
|
655
|
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
656
|
|
"</a>" +
|
657
|
|
"<span class='msgprompt'>1</span>" +
|
658
|
|
"</td>" +
|
659
|
|
"<td style='position:relative;' width='86%'>" +
|
660
|
|
"<div class='workinfor worksitcon'>" +
|
661
|
|
"<h4><a href='' class='named' id='nameS'> " + consultData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
662
|
|
"<h6><span>职称 " + consultData[i]["consultId"] +" </span>,<span>职位 " + consultData[i]["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span>,<span> " + consultData["consultId"] +" </span> | <span> " + consultData["consultId"] +" </span></h6>" +
|
663
|
|
"<h6>"+
|
664
|
|
"<span>咨询主题:<em> " + consultData[i]["consultTitle"] +" </em></span>" +
|
665
|
|
" " +
|
666
|
|
"<span>咨询类型:<em> " + consultData[i]["consultType"] +" </em></span>" +
|
667
|
|
" <span>" +
|
668
|
|
"咨询发起时间:<em> " + consultData[i]["createTime"] +" </em>" +
|
669
|
|
"</span></h6>" +
|
670
|
|
"<p>最后回复<span class='lasttime'> ( " + consultData[i]["revoveryTime"] +" ) </span>:" +
|
671
|
|
"</p>" +
|
672
|
|
"<p class='rebackcon'> " + consultData[i]["consultContant"] +" </p>" +
|
673
|
|
"</div>" +
|
674
|
|
"<div class='workhandle'>" +
|
675
|
|
"<div class='rightopert floatR'>" +
|
676
|
|
"<span class='replybtn' href='/diloags.html?&consultId=" + consultData[i]['consultId'] + " '> " + consultData[i]["consultStatus"] +" </span>" +
|
677
|
|
"<span class='moreopert'>...</span>" +
|
678
|
|
"<ul class='moreopertbtn'>" +
|
679
|
|
"<li>投诉</li>" +
|
680
|
|
"</ul>" +
|
681
|
|
"</div>" +
|
682
|
|
"<div class='leftstate floatR'>" +
|
683
|
|
"<span class='coultstate'><i> " + consultData[i]["assessStatus"] +" </i><em></em></span>" +
|
684
|
|
"</div>" +
|
685
|
|
"</div>" +
|
686
|
|
"</td>" +
|
687
|
|
"</tr></tbody></table>" +
|
688
|
|
"</div>";
|
689
|
|
};
|
690
|
|
//正序
|
691
|
|
$(".workmenubox:first").next().html(consultTrHtml);
|
692
|
|
}*/
|
693
|
|
|
|
531
|
//
|
694
|
532
|
|
695
|
|
|
696
|
|
|
697
|
533
|
},
|
698
|
534
|
"error":function(response){
|
699
|
535
|
// console.log(response)
|
|
@ -701,12 +537,9 @@ $(document).ready(function(){
|
701
|
537
|
}
|
702
|
538
|
|
703
|
539
|
});
|
704
|
|
|
705
|
|
consultTrHtml = '';
|
706
|
|
$(".workmenubox:first").next().text("");
|
707
|
540
|
|
708
|
541
|
|
709
|
|
};//更新下拉菜单处理函数结束
|
|
542
|
};//更新咨询下拉菜单处理函数结束
|
710
|
543
|
|
711
|
544
|
//绑定咨询状态事件
|
712
|
545
|
$(".consultOption ul").bind("click", "li",consultStatusFn);
|
|
@ -714,8 +547,166 @@ $(document).ready(function(){
|
714
|
547
|
//绑定咨询状态事件
|
715
|
548
|
$(".timeOption ul").bind("click", "li",consultStatusFn);
|
716
|
549
|
|
717
|
|
$(".orderedbtn").bind("click", "li",consultStatusFn);
|
718
|
|
|
|
550
|
$(".orderedbtn").bind("click",consultStatusFn);
|
|
551
|
|
|
552
|
//点击收到咨询中回复
|
|
553
|
/*function ClickReplyBtn(id){
|
|
554
|
this.id = id;
|
|
555
|
};
|
|
556
|
|
|
557
|
ClickReplyBtn.prototype = {
|
|
558
|
init:function(){
|
|
559
|
|
|
560
|
},
|
|
561
|
getDialogData:function(url,type,params,successGetDialogFn,errorMsg){
|
|
562
|
$.ajax({
|
|
563
|
"url":url,
|
|
564
|
"type" : type,
|
|
565
|
"data" :params,
|
|
566
|
"success":successGetDialogFn,
|
|
567
|
"error":function(){
|
|
568
|
$.MsgBox.Alert(errorMsg);
|
|
569
|
}
|
|
570
|
});
|
|
571
|
},
|
|
572
|
|
|
573
|
};*/
|
|
574
|
|
|
575
|
var dialog = '';
|
|
576
|
function successGetDialogFn(){
|
|
577
|
|
|
578
|
dialog +=
|
|
579
|
"<div class='consultdialogbox'>" +
|
|
580
|
"<div class='consultdialog'>" +
|
|
581
|
"<div class='dialoghead'>" +
|
|
582
|
"<div class='backupbtn'></div>" +
|
|
583
|
"<div class='dheadtit'>" +
|
|
584
|
"与<span class='dialogpro' id='dial_consultName'>程学群</span>对话中" +
|
|
585
|
"</div>" +
|
|
586
|
"</div>" +
|
|
587
|
"<div class='dialogcontain'>" +
|
|
588
|
"<div class='dialoginfo'>" +
|
|
589
|
"<div>" +
|
|
590
|
"<span class='dialogtit'>咨询主题:</span><span id='dial_consultTitle'>XXXXXXXXXXXXXXXXXXXXXX</span>" +
|
|
591
|
"</div>" +
|
|
592
|
"<div><span class='dialogtit'>咨询类型:</span><span id='dial_consultType'>技术咨询</span></div>" +
|
|
593
|
"<div class='dialogsurebtn'><span id='dial_confirmFinishConsult'>点击确认完成咨询</span></div>" +
|
|
594
|
"</div>" +
|
|
595
|
"<div class='dialogstatus'><em></em><span id='dil_consultStatus'>进行中</span></div>" +
|
|
596
|
"</div>" +
|
|
597
|
"<div class='dialogbody clearfix'>" +
|
|
598
|
"<div class='dialogleftitem'>" +
|
|
599
|
"<div class='dilmod'>" +
|
|
600
|
"<div class='diluser floatL'>" +
|
|
601
|
"<a href='' target='_blank' class='userface'>" +
|
|
602
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
|
603
|
"</a>" +
|
|
604
|
"</div>" +
|
|
605
|
"<div class='dilinfobox dilinfobox_l floatL'>" +
|
|
606
|
"<div class='dilarrow dilarrow_l'></div>" +
|
|
607
|
"<div class='dilarrow dilarrow_l_bor'></div>" +
|
|
608
|
"<div class='delinfocon clearfix'>" +
|
|
609
|
"<div class='delinfomain floatL'>" +
|
|
610
|
"<div class='cont'>" +
|
|
611
|
"<p>800009jhujgkkkkkkkkkkkkkhhghhu</p>" +
|
|
612
|
"</div>" +
|
|
613
|
"</div>" +
|
|
614
|
"</div>" +
|
|
615
|
"</div>" +
|
|
616
|
"</div>" +
|
|
617
|
"</div>" +
|
|
618
|
"<div class='dialogrightitem'>" +
|
|
619
|
"<div class='dilmod'>" +
|
|
620
|
"<div class='diluser floatR'>" +
|
|
621
|
"<a href='' target='_blank' class='userface'>" +
|
|
622
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
|
623
|
"</a>" +
|
|
624
|
"</div>" +
|
|
625
|
"<div class='dilinfobox dilinfobox_r floatR'>" +
|
|
626
|
"<div class='delinfocon clearfix'>" +
|
|
627
|
"<div class='dilarrow dilarrow_r'></div>" +
|
|
628
|
"<div class='dilarrow dilarrow_r_bor'></div>" +
|
|
629
|
"<div class='delinfomain floatR'>" +
|
|
630
|
"<div class='cont'>" +
|
|
631
|
"<p>我们国内钾肥i哦警方i哦济公活佛极度恐慌赶快回家就看不见哦go客观艰苦地方购房抵of更何况vjklvkbn</p>" +
|
|
632
|
"</div>" +
|
|
633
|
"</div>" +
|
|
634
|
"</div>" + //dilinfobox
|
|
635
|
"</div>" + //dilinfobox
|
|
636
|
"</div>" + //dilmod
|
|
637
|
"</div>" + //dialogrightitem
|
|
638
|
"</div> " + //dialogbody
|
|
639
|
|
|
640
|
"<div class='dialogfoot'>" +
|
|
641
|
"<div class='sendbox_area'>" +
|
|
642
|
"<textarea name='' cols='' rows='' class='frmtype W_input' node-type='textEl' range='0&0'></textarea>" +
|
|
643
|
"</div>" +
|
|
644
|
"<div class='sendbox_bar'>" +
|
|
645
|
"<div class='sendtype floatL'>" +
|
|
646
|
"<a href='javascript:void(0);' class='mlink1'></a>" +
|
|
647
|
"<a href='javascript:void(0);' class='mlink2'></a>" +
|
|
648
|
"<a href='javascript:void(0);' class='mlink3'></a>" +
|
|
649
|
"</div>" +
|
|
650
|
"<div class='sendbtn floatR'>" +
|
|
651
|
"<a href='javascript:void(0);' class='W_btn' node-type='submit' action-type='submit' action-data=''>发送</a>" +
|
|
652
|
"</div>" + //sendbtn
|
|
653
|
"</div>" + //sendbox_bar
|
|
654
|
"</div>" + //dialogfoot
|
|
655
|
"</div>" + // consultdialog
|
|
656
|
"</div>"; //consultdialogbox
|
|
657
|
|
|
658
|
|
|
659
|
|
|
660
|
};
|
|
661
|
|
|
662
|
|
|
663
|
|
|
664
|
|
|
665
|
|
|
666
|
|
|
667
|
|
|
668
|
|
|
669
|
function clickReplyFn(){alert("di");
|
|
670
|
alert($(this).attr("id"));
|
|
671
|
var consultIdStr = {
|
|
672
|
"consultId":$(this).attr("id")
|
|
673
|
}
|
|
674
|
//ajax加载对话页面
|
|
675
|
$.ajax({
|
|
676
|
"url":"diloags.html",
|
|
677
|
"dataType":"html",
|
|
678
|
"success":function(result){
|
|
679
|
//console.log(data);
|
|
680
|
$(this).attr("id");
|
|
681
|
$(".workcon").html(result);
|
|
682
|
|
|
683
|
|
|
684
|
$.ajax({
|
|
685
|
"url":"/ajax/consult/qapro",
|
|
686
|
"data":consultIdStr,
|
|
687
|
"success":function(response){
|
|
688
|
console.log(response);
|
|
689
|
},
|
|
690
|
"error":function(error){
|
|
691
|
//点击咨询页回复获取数据失败
|
|
692
|
},
|
|
693
|
|
|
694
|
});
|
|
695
|
|
|
696
|
|
|
697
|
|
|
698
|
},
|
|
699
|
"error":function(error){
|
|
700
|
//console.log(data);
|
|
701
|
//加载对话页面失败
|
|
702
|
|
|
703
|
}
|
|
704
|
})
|
|
705
|
|
|
706
|
|
|
707
|
};
|
|
708
|
$(".workselectitem").bind("click",".replybtn",clickReplyFn);
|
|
709
|
|
719
|
710
|
|
720
|
711
|
//收到咨询和收到回复切换
|
721
|
712
|
$(".worksamlltit3:first").addClass("active").show();
|
|
@ -732,40 +723,8 @@ $(document).ready(function(){
|
732
|
723
|
$(activeTab).fadeIn();
|
733
|
724
|
return false;
|
734
|
725
|
});
|
735
|
|
|
736
|
|
|
737
|
|
|
738
|
|
|
739
|
|
|
740
|
|
|
741
|
|
|
742
|
|
|
743
|
|
|
744
|
|
|
745
|
|
|
746
|
|
|
747
|
|
|
748
|
|
|
749
|
|
|
750
|
|
|
751
|
|
|
752
|
|
|
753
|
|
|
754
|
|
|
755
|
|
|
756
|
|
|
757
|
|
|
758
|
|
|
759
|
|
|
760
|
|
|
761
|
|
|
762
|
|
|
763
|
|
|
764
|
|
|
765
|
|
|
766
|
|
|
767
|
|
|
768
|
|
//ajax收到回复数据
|
|
726
|
|
|
727
|
//=============================有咨询和回复时:ajax收到回复数据=============================
|
769
|
728
|
$.ajax({
|
770
|
729
|
"url" : "/ajax/consult/pqcon",//收到回复接口
|
771
|
730
|
"type" : "get",
|
|
@ -785,7 +744,7 @@ $(document).ready(function(){
|
785
|
744
|
if(replyData.length != 0 && replyData.length != null){
|
786
|
745
|
|
787
|
746
|
for(var i = 0; i < replyData.length;i++){
|
788
|
|
replyTrHtml =
|
|
747
|
replyTrHtml +=
|
789
|
748
|
"<div class='workselectitem' id=' " + replyData[i]["consultId"] +" ' >" +
|
790
|
749
|
"<table width='100%'>" +
|
791
|
750
|
"<tbody><tr>" +
|
|
@ -819,7 +778,7 @@ $(document).ready(function(){
|
819
|
778
|
"</ul>" +
|
820
|
779
|
"</div>" +
|
821
|
780
|
"<div class='leftstate floatR'>" +
|
822
|
|
"<span class='coultstate'><i> " + replyData[i]["assessStatus"] +" </i><em></em></span>" +
|
|
781
|
"<span class='coultstate'><i> " + replyData[i]["consultStatus"] +" </i><em></em></span>" +
|
823
|
782
|
"</div>" +
|
824
|
783
|
"</div>" +
|
825
|
784
|
"</td>" +
|
|
@ -827,9 +786,9 @@ $(document).ready(function(){
|
827
|
786
|
"</div>";
|
828
|
787
|
|
829
|
788
|
};
|
830
|
|
|
831
|
|
// $(".tcdPageCode:last").before(replyTrHtml);
|
832
|
|
$(".workmenubox:last").next().html(replyTrHtml);
|
|
789
|
console.log(replyTrHtml);
|
|
790
|
$(".tcdPageCode:last").before(replyTrHtml);
|
|
791
|
// $("#workContainer2").html(replyTrHtml);
|
833
|
792
|
}else{
|
834
|
793
|
return false;
|
835
|
794
|
}
|
|
@ -841,9 +800,138 @@ $(document).ready(function(){
|
841
|
800
|
// console.log(response)
|
842
|
801
|
},
|
843
|
802
|
|
844
|
|
})
|
|
803
|
});
|
|
804
|
|
|
805
|
//==========================================咨询和收到回复,下拉菜单改变 ajax开始==================
|
|
806
|
|
|
807
|
//收到咨询和收到回复下拉菜单点击函数
|
|
808
|
//排列顺序(正序、倒序)
|
|
809
|
var sortFlag1 = true;//正倒排序标记
|
|
810
|
$("#replyArrow").click(function(){
|
|
811
|
if(sortFlag1 == true){
|
|
812
|
$(this).find("div").css("background-position","-20px 1px");
|
|
813
|
$("#timeSortId2").val("1");
|
|
814
|
|
|
815
|
sortFlag1 =false;
|
|
816
|
|
|
817
|
}else{
|
|
818
|
$(this).find("div").css("background-position","0px 1px");
|
|
819
|
$("#timeSortId2").val("0");
|
|
820
|
|
|
821
|
sortFlag1=true;
|
|
822
|
}
|
|
823
|
|
|
824
|
});
|
|
825
|
|
|
826
|
var timeType2,sortType2,replyStatus,consultId;
|
|
827
|
|
|
828
|
replyStatus = $("#replySelectId").val();//回复状态值
|
|
829
|
timeType2 = $("#timeTypeId2").val();//时间类型值
|
|
830
|
sortType2 = $("#timeSortId2").val();//排序值;
|
|
831
|
|
|
832
|
//console.log(consultStatus,timeType,sortType+"res333");
|
|
833
|
|
|
834
|
//默认传值:
|
|
835
|
var replyInfo = {
|
|
836
|
"consultantId":userid,
|
|
837
|
"status":replyStatus,
|
|
838
|
"timeType":timeType2,
|
|
839
|
"sortType":sortType2
|
|
840
|
};
|
|
841
|
function replyStatusFn(){
|
|
842
|
//改变后,要传的值
|
|
843
|
replyStatus = $("#replySelectId").val();//咨询状态值
|
|
844
|
timeType2 = $("#timeTypeId2").val();//时间类型值
|
|
845
|
sortType2 = $("#timeSortId2").val();//排序值;
|
|
846
|
|
|
847
|
//要传的值:
|
|
848
|
replyInfo = {
|
|
849
|
"consultantId":userid,
|
|
850
|
"status":replyStatus,
|
|
851
|
"timeType":timeType2,
|
|
852
|
"sortType":sortType2
|
|
853
|
};
|
|
854
|
// console.log("ajax中的值:"+ replyInfo.replyStatus + replyInfo.timeType + replyInfo.sortType +replyInfo.consultantId);
|
|
855
|
|
|
856
|
//只有收到回复时 更新下拉菜单
|
|
857
|
$.ajax({
|
|
858
|
"url":"/ajax/consult/pqcon",//更新下拉菜单接口
|
|
859
|
"data":replyInfo,
|
|
860
|
"beforeSend":function(response){
|
|
861
|
console.log(response);
|
|
862
|
},
|
|
863
|
"success":function(response){
|
|
864
|
$("#workContainer2 .workselectitem").remove();
|
|
865
|
// $(".tcdPageCode:first").before().empty();
|
|
866
|
replyTrHtml = '';
|
|
867
|
console.log(response);
|
|
868
|
var allData = response.data;
|
|
869
|
var replyData = allData["data"];
|
|
870
|
|
|
871
|
for(var i = 0 ; i < replyData.length;i++){
|
|
872
|
replyTrHtml +=
|
|
873
|
"<div class='workselectitem' id=' " + replyData[i]["consultId"] +" ' >" +
|
|
874
|
"<table width='100%'>" +
|
|
875
|
"<tbody><tr>" +
|
|
876
|
"<td width='14%' class='messagebox'>" +
|
|
877
|
"<a class='workhead workitimg' href='information.html'>" +
|
|
878
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
|
879
|
"</a>" +
|
|
880
|
"<span class='msgprompt'>1</span>" +
|
|
881
|
"</td>" +
|
|
882
|
"<td style='position:relative;' width='86%'>" +
|
|
883
|
"<div class='workinfor worksitcon'>" +
|
|
884
|
"<h4><a href='' class='named' id='nameS'> " + replyData[i]["consultId"] +" </a><img class='modifyicon' src='images/rz.png' width='30'></h4>" +
|
|
885
|
"<h6><span>职称 " + replyData[i]["professor"]["title"] +" </span>,<span>职位 " + replyData[i]["professor"] +" </span>,<span> " + replyData["consultId"] +" </span>,<span> " + replyData["consultId"] +" </span> | <span> " + replyData["consultId"] +" </span></h6>" +
|
|
886
|
"<h6>"+
|
|
887
|
"<span>咨询主题:<em> " + replyData[i]["consultTitle"] +" </em></span>" +
|
|
888
|
" " +
|
|
889
|
"<span>咨询类型:<em> " + replyData[i]["consultType"] +" </em></span>" +
|
|
890
|
" <span>" +
|
|
891
|
"咨询发起时间:<em> " + replyData[i]["createTime"] +" </em>" +
|
|
892
|
"</span></h6>" +
|
|
893
|
"<p>最后回复<span class='lasttime'> ( " + replyData[i]["revoveryTime"] +" ) </span>:" +
|
|
894
|
"</p>" +
|
|
895
|
"<p class='rebackcon'> " + replyData[i]["consultContant"] +" </p>" +
|
|
896
|
"</div>" +
|
|
897
|
"<div class='workhandle'>" +
|
|
898
|
"<div class='rightopert floatR'>" +
|
|
899
|
"<span class='replybtn' id=' " + replyData[i]['consultId'] + " '> " + replyData[i]["consultStatus"] +" </span>" +
|
|
900
|
"<span class='moreopert'>...</span>" +
|
|
901
|
"<ul class='moreopertbtn'>" +
|
|
902
|
"<li>投诉</li>" +
|
|
903
|
"</ul>" +
|
|
904
|
"</div>" +
|
|
905
|
"<div class='leftstate floatR'>" +
|
|
906
|
"<span class='coultstate'><i> " + replyData[i]["consultStatus"] +" </i><em></em></span>" +
|
|
907
|
"</div>" +
|
|
908
|
"</div>" +
|
|
909
|
"</td>" +
|
|
910
|
"</tr></tbody></table>" +
|
|
911
|
"</div>";
|
|
912
|
};
|
|
913
|
// console.log(replyTrHtml);
|
|
914
|
$(".tcdPageCode:last").before(replyTrHtml);
|
|
915
|
|
|
916
|
},
|
|
917
|
"error":function(response){
|
|
918
|
// console.log(response)
|
|
919
|
//更新下拉菜单失败
|
|
920
|
}
|
|
921
|
|
|
922
|
});
|
|
923
|
|
|
924
|
|
|
925
|
};//更新下拉菜单处理函数结束
|
|
926
|
|
|
927
|
//绑定回复状态事件
|
|
928
|
$(".replyOption ul").bind("click", "li",replyStatusFn);
|
|
929
|
|
|
930
|
//绑定回复状态事件
|
|
931
|
$(".timeOption2 ul").bind("click", "li",replyStatusFn);
|
|
932
|
|
|
933
|
$("#replyArrow").bind("click",replyStatusFn);
|
845
|
934
|
|
846
|
|
|
847
|
935
|
|
848
|
936
|
|
849
|
937
|
},
|
|
@ -855,18 +943,14 @@ $(document).ready(function(){
|
855
|
943
|
// console.log(response)
|
856
|
944
|
},
|
857
|
945
|
"error":function(response){
|
858
|
|
//收到咨询失败
|
|
946
|
//收到咨询页面失败
|
859
|
947
|
// console.log(response)
|
860
|
948
|
},
|
861
|
949
|
|
862
|
950
|
|
863
|
951
|
});
|
864
|
952
|
|
865
|
|
|
866
|
|
|
867
|
|
|
868
|
|
|
869
|
|
|
|
953
|
|
870
|
954
|
|
871
|
955
|
|
872
|
956
|
}else{
|