|
@ -50,30 +50,8 @@ function handleData(data,attrParams,btnCls){
|
50
|
50
|
data[i]["professor"]["office"] = '';
|
51
|
51
|
}
|
52
|
52
|
|
53
|
|
|
54
|
|
//未读信息接口
|
55
|
|
var unreadConsultFn = function (senderId,consultId){
|
56
|
|
var unreadCount;
|
57
|
|
var params = {
|
58
|
|
"senderId":senderId, //发送者ID
|
59
|
|
"consultId":consultId //咨询ID
|
60
|
|
};
|
61
|
|
$.ajax({
|
62
|
|
url:"/ajax/tidings/qaNotReadTidings",
|
63
|
|
type:"get",
|
64
|
|
async:false,
|
65
|
|
data:params,
|
66
|
|
success:function(response){
|
67
|
|
unreadCount = response["data"];
|
68
|
|
},
|
69
|
|
error:function(error){
|
70
|
|
$.MsgBox.Alert('提示',"未读消息请求失败");
|
71
|
|
}
|
72
|
|
|
73
|
|
});
|
74
|
|
return unreadCount;
|
75
|
|
console.log(unreadCount);
|
76
|
|
};
|
|
53
|
var unread = unreadConsultFn (userid,data[i]["consultId"],i);
|
|
54
|
|
77
|
55
|
|
78
|
56
|
|
79
|
57
|
htmlStr +=
|
|
@ -84,7 +62,7 @@ function handleData(data,attrParams,btnCls){
|
84
|
62
|
"<a class='workhead workitimg'>" +
|
85
|
63
|
"<img src='images/default-photo.jpg' width='100%' height='100%'>" +
|
86
|
64
|
"</a>" +
|
87
|
|
"<span class='msgprompt showUnreadMsg' id='" +data[i]["consultId"] +"'>"+unreadConsultFn(userid,data[i]["consultId"])+"</span>" +
|
|
65
|
"<span class='msgprompt showUnreadMsg' style='"+unread.style+"' id='" +data[i]["consultId"] +"'>"+unread.unreadCount+"</span>" +
|
88
|
66
|
"</td>" +
|
89
|
67
|
"<td style='position:relative;' width='86%'>" +
|
90
|
68
|
"<div class='workinfor worksitcon'>" +
|
|
@ -125,12 +103,52 @@ function handleData(data,attrParams,btnCls){
|
125
|
103
|
"</div>";
|
126
|
104
|
|
127
|
105
|
|
|
106
|
|
|
107
|
|
128
|
108
|
};
|
129
|
109
|
|
130
|
110
|
return htmlStr
|
131
|
111
|
};
|
132
|
112
|
|
133
|
113
|
|
|
114
|
//未读信息接口
|
|
115
|
function unreadConsultFn (senderId,consultId,i){
|
|
116
|
var unreadCount,style;
|
|
117
|
var params = {
|
|
118
|
"senderId":senderId, //发送者ID
|
|
119
|
"consultId":consultId //咨询ID
|
|
120
|
};
|
|
121
|
$.ajax({
|
|
122
|
url:"/ajax/tidings/qaNotReadTidings",
|
|
123
|
type:"get",
|
|
124
|
async:false,
|
|
125
|
data:params,
|
|
126
|
success:function(response){
|
|
127
|
unreadCount = response["data"];
|
|
128
|
console.log()
|
|
129
|
if(unreadCount == 0){
|
|
130
|
style = "display:none;"
|
|
131
|
}else{
|
|
132
|
style = "display:block;"
|
|
133
|
|
|
134
|
}
|
|
135
|
},
|
|
136
|
error:function(error){
|
|
137
|
$.MsgBox.Alert('提示',"未读消息请求失败");
|
|
138
|
}
|
|
139
|
|
|
140
|
});
|
|
141
|
return {"unreadCount":unreadCount,
|
|
142
|
"style":style
|
|
143
|
}
|
|
144
|
|
|
145
|
|
|
146
|
};
|
|
147
|
|
|
148
|
|
|
149
|
|
|
150
|
|
|
151
|
|
134
|
152
|
//列表最后回复
|
135
|
153
|
function lastReplyFn(sendId,consultId){
|
136
|
154
|
|
|
@ -228,8 +246,7 @@ var getMyData = function (url,pageSize,pageNo,isbind,status,timeType,sortType){
|
228
|
246
|
"pageSize":pageSize, //每页记录数 默认为5
|
229
|
247
|
"pageNo":pageNo //当前页码 默认为1
|
230
|
248
|
};
|
231
|
|
console.log("回复参数");
|
232
|
|
console.log(params)
|
|
249
|
|
233
|
250
|
$.ajax({
|
234
|
251
|
url:url,//收到回复接口,//收到回复接口
|
235
|
252
|
type:"get",
|
|
@ -238,8 +255,7 @@ var getMyData = function (url,pageSize,pageNo,isbind,status,timeType,sortType){
|
238
|
255
|
dataType: "json",
|
239
|
256
|
contentType: "application/x-www-form-urlencoded",
|
240
|
257
|
"success":function(response){
|
241
|
|
console.log("收到回复数据");
|
242
|
|
console.log(response);
|
|
258
|
|
243
|
259
|
/*if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
|
244
|
260
|
$.MsgBox.Alert('提示',"没有收到回复");
|
245
|
261
|
return false;
|
|
@ -290,8 +306,7 @@ var getConsultData = function (url,pageSize,pageNo,isbind,status,timeType,sortTy
|
290
|
306
|
"pageSize":pageSize, //每页记录数 默认为5
|
291
|
307
|
"pageNo":pageNo //当前页码 默认为1
|
292
|
308
|
};
|
293
|
|
console.log("咨询参数");
|
294
|
|
console.log(params)
|
|
309
|
|
295
|
310
|
$.ajax({
|
296
|
311
|
url:url,//收到回复接口,//收到回复接口
|
297
|
312
|
type:"get",
|
|
@ -301,8 +316,7 @@ var getConsultData = function (url,pageSize,pageNo,isbind,status,timeType,sortTy
|
301
|
316
|
dataType: "json",
|
302
|
317
|
contentType: "application/x-www-form-urlencoded",
|
303
|
318
|
success:function(response){
|
304
|
|
console.log("收到咨询数据");
|
305
|
|
console.log(response);
|
|
319
|
|
306
|
320
|
//拿到收到回复数据
|
307
|
321
|
// if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
|
308
|
322
|
// $.MsgBox.Alert('提示',"没有此项数据");
|
|
@ -363,7 +377,7 @@ function clickLookBtn2(sendId,attrParams,consultId,consultStatus,assessStatus,th
|
363
|
377
|
error:function(error){
|
364
|
378
|
//console.log(data);
|
365
|
379
|
//加载对话页面失败
|
366
|
|
console.log(error);
|
|
380
|
// console.log(error);
|
367
|
381
|
}
|
368
|
382
|
})
|
369
|
383
|
|
|
@ -401,7 +415,7 @@ function clickLookBtn2(sendId,attrParams,consultId,consultStatus,assessStatus,th
|
401
|
415
|
error:function(error){
|
402
|
416
|
//console.log(data);
|
403
|
417
|
//加载对话页面失败
|
404
|
|
console.log(error);
|
|
418
|
// console.log(error);
|
405
|
419
|
}
|
406
|
420
|
|
407
|
421
|
})
|
|
@ -560,7 +574,7 @@ function clickConfirmFn(consultId,thanksStatus){
|
560
|
574
|
"consultStatus":"1", //咨询状态 0-进行中,1-已完成
|
561
|
575
|
},
|
562
|
576
|
success:function(response){
|
563
|
|
console.log(response);
|
|
577
|
// console.log(response);
|
564
|
578
|
dialogHeadFn2("/ajax/consult/qacon","consultId",consultId,thanksStatus);
|
565
|
579
|
dialogContentDataHandle2(consultId);
|
566
|
580
|
|
|
@ -604,7 +618,7 @@ function sendDialogContentFn2(sendId,consultId){
|
604
|
618
|
"type":"post",
|
605
|
619
|
"data":{"tidingsContant":tidingsContant,"senderId":sendId,"consultId":consultId},
|
606
|
620
|
"success":function(response){
|
607
|
|
console.log(response);//返回对话内容的id
|
|
621
|
// console.log(response);//返回对话内容的id
|
608
|
622
|
$("#dialogContent").empty();
|
609
|
623
|
dialogContentDataHandle2(consultId);
|
610
|
624
|
},
|
|
@ -816,7 +830,7 @@ function clickConsultBtn(){
|
816
|
830
|
getMyData("/ajax/consult/pqcon","5",1,true,0,0,0);
|
817
|
831
|
//点击下拉菜单
|
818
|
832
|
$(".replyOption ul").find("li").click(function(){
|
819
|
|
console.log($("#showTimeSort2"));
|
|
833
|
|
820
|
834
|
getMyData("/ajax/consult/pqcon","5",1,true,$(this).attr("tip"),$("#showTimeSort2").attr("tim"),$("#timeSortId2").val());
|
821
|
835
|
});
|
822
|
836
|
$(".timeOption2 ul").find("li").click(function(){
|