12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043 |
- var userid = $.cookie("userid");
- $(".workmenu").on("click","#consultbtn",clickConsultBtn);
- function handleData(data,attrParams,btnCls){
- var htmlStr = '';
- for(var i = 0; i < data.length;i++){
-
- var text,state,stateStyle,photoUrl,proModify;
-
- if(data[i]["consultStatus"] == 0){
- state = "进行中";
- stateStyle = 'status-1';
-
- $(".coultstate").eq(i).addClass("status-1");*/
- text = '回复';
- } else if (data[i]["consultStatus"] == 1) {
- text = "查看";
-
- $(".coultstate").eq(i).addClass("status-3");*/
- state = "已完成";
- stateStyle = 'status-3';
- if(attrParams == 'consultId'){
- if(data[i]["assessStatus"] == 0){
-
- $(".coultstate").eq(i).addClass("status-2");*/
- state = "待评价";
- stateStyle = 'status-2';
- }
- }
- }else if(data[i]["consultStatus"] == undefined){
- text = "";
- state = "";
- }
-
- if(data[i]["professor"]["title"] == undefined){
- data[i]["professor"]["title"] = '';
- }
- if(data[i]["professor"]["orgName"] == undefined){
- data[i]["professor"]["orgName"] = '';
- }
- if(data[i]["professor"]["department"] == undefined){
- data[i]["professor"]["department"] = '';
- }
- if(data[i]["professor"]["adress"] == undefined){
- data[i]["professor"]["adress"] = '';
- };
- if(data[i]["professor"]["office"] == undefined){
- data[i]["professor"]["office"] = '';
- };
-
- if(data[i]["professor"]["hasHeadImage"] == 0){
- photoUrl = "images/default-photo.jpg"
-
- }else{
- photoUrl = "images/head/"+data[i]["professor"]["id"]+"_m.jpg"
-
- };
-
- if(data[i]["professor"]["authentication"] == true){
- proModify = "display:inline-block;"
- }else{
- proModify = "display:none;"
- }
-
-
- var unread = unreadConsultFn (userid,data[i]["consultId"],i);
-
- htmlStr +=
- "<div class='workselectitem' id='" +data[i]["consultId"] +"' >" +
- "<table width='100%'>" +
- "<tbody><tr>" +
- "<td width='14%' class='messagebox'>" +
- "<a class='workhead workitimg headRadius'>" +
- "<img class='headPhoto' src='"+photoUrl+"' width='100%' height='100%'>" +
- "</a>" +
- "<span class='msgprompt showUnreadMsg' style='"+unread.style+"' id='" +data[i]["consultId"] +"'>"+unread.unreadCount+"</span>" +
- "</td>" +
- "<td style='position:relative;' width='86%'>" +
- "<div class='workinfor worksitcon'>" +
- "<h4><a class='named' id='nameS'> " + data[i]["professor"]["name"] +" </a><img class='modifyicon' style='"+proModify+"' src='images/onauth.png'><input type='text' class='assessStar' value='"+data[i]["assessStar"] +"' style='display: none;'></h4>" +
- "<h6><span>职称 " + data[i]["professor"]["title"] +" </span>,<span>职位"+data[i]["professor"]["office"]+"</span>,<span> " + data[i]["professor"]["orgName"] +" </span>,<span> " + data[i]["professor"]["department"] +" </span> | <span> " + data[i]["professor"]["adress"] +" </span></h6>" +
- "<h6>"+
- "<span>咨询主题:<em> " + data[i]["consultTitle"] +" </em></span>" +
- " " +
- "<span>咨询类型:<em> " + data[i]["consultType"] +" </em></span>" +
- " <span>" +
- "咨询发起时间:<em> " +
- data[i]["createTime"].substr(0,4) + "-" + data[i]["createTime"].substr(4,2) + "-" + data[i]["createTime"].substr(6,2) + " " + data[i]["createTime"].substr(8,2)+ ":" +data[i]["createTime"].substr(10,2)+
- "</em>" +
- "</span></h6>" +
- "<p><span class='lasttime'> " +
- lastReplyFn(userid,data[i]["consultId"])["lastReplyTime"]+
- " </span>" +
- "</p>" +
- "<p class='rebackcon lastReplyCon' >"+lastReplyFn(userid,data[i]["consultId"])["lastReplyCon"]+"</p>" +
- "</div>" +
- "<div class='workhandle'>" +
- "<div class='rightopert floatR'>" +
- "<span attrP='"+attrParams+"' class='replybtn "+btnCls+"' id='"+ data[i]["consultId"]+"' consultStatus='"+ data[i]["consultStatus"]+"' assess='"+ data[i]["assessStatus"]+ "' thanks='"+ data[i]["thanksStatus"]+
- "' onclick='clickLookBtn2(\""+userid+"\",\""+attrParams+"\",\""+data[i]["consultId"]+"\","+data[i]["consultStatus"]+","+data[i]["assessStatus"]+","+data[i]["thanksStatus"]+");'>" +
- text +
- "</span>" +
- "<span class='moreopert complain'>...</span>" +
- "<ul class='moreopertbtn'>" +
- "<li>投诉</li>" +
- "</ul>" +
- "</div>" +
- "<div class='leftstate floatR'>" +
- "<span class='coultstate "+stateStyle+"'><i>"+state+"</i></span>" +
- "</div>" +
- "</div>" +
- "</td>" +
- "</tr></tbody></table>" +
- "</div>";
-
- };
- return htmlStr
- };
- function unreadConsultFn (senderId,consultId,i){
- var unreadCount,style;
- var params = {
- "senderId":senderId,
- "consultId":consultId
- };
- $.ajax({
- url:"/ajax/tidings/qaNotReadTidings",
- type:"get",
- async:false,
- data:params,
- success:function(response){
- unreadCount = response["data"];
- console.log()
- if(unreadCount == 0){
- style = "display:none;"
- }else{
- style = "display:block;"
-
- }
- },
- error:function(error){
- $.MsgBox.Alert('提示',"未读消息请求失败");
- }
-
- });
- return {"unreadCount":unreadCount,
- "style":style
- }
-
- };
- function lastReplyFn(sendId,consultId){
-
- var lastReplyTimeData,lastReplyTime,lastReplyCon;
- $.ajax({
- url:"/ajax/tidings/qaLastRevovery",
- async:false,
- data:{
- "consultId":consultId,
- "senderId":sendId
- },
- success:function(response){
- if(response["data"] == null || response["data"] == "" || response["data"] == undefined){
- lastReplyTimeData = '';
- lastReplyTime = '';
- lastReplyCon = '';
- }
- else{
- lastReplyTimeData = response["data"]["createTime"];
- lastReplyTime ="最后回复(" + lastReplyTimeData.substr(0,4) + "-" + lastReplyTimeData.substr(4,2) + "-" + lastReplyTimeData.substr(6,2) + " " + lastReplyTimeData.substr(8,2)+ ":" +lastReplyTimeData.substr(10,2) + ")"
- lastReplyCon = response["data"]["tidingsContant"];
- }
-
- },
- error:function(error){
- $.MsgBox.Alert('提示',"最后回复数据失败");
- }
-
- });
-
- return {
- "lastReplyTime":lastReplyTime,
- "lastReplyCon":lastReplyCon
-
- };
- };
- function dialogContentStrFn(data){
- var htmlStr ="";
- var dialogitem,float,dilinfobox,dilarrow,dilarrow_bor;
- for(var i = 0; i < data.length;i++){
- if(data[i]["professor"]["id"] == userid){
- dialogitem = "dialogrightitem";
- float = "floatR";
- dilinfobox = "dilinfobox_r";
- dilarrow = "dilarrow_r";
- dilarrow_bor="dilarrow_r_bor";
- }
- else{
- dialogitem = "dialogleftitem";
- float = "floatL";
- dilarrow = "dilarrow_l";
- dilinfobox = "dilinfobox_l";
- dilarrow_bor="dilarrow_l_bor";
- }
- htmlStr +=
- "<div class='"+dialogitem+"'>" +
- "<div class='dilmod'>" +
- "<div class='diluser "+float+"'>" +
- "<a target='_blank' class='userface headRadius'>" +
- "<img src='images/default-photo.jpg' width='100%' height='100%'>" +
- "</a>" +
- "</div>" +
- "<div class='dilinfobox "+ dilinfobox+" "+ float +"'>" +
- "<div class='delinfocon clearfix'>" +
- "<div class='dilarrow "+ dilarrow+"'></div>" +
- "<div class='dilarrow "+dilarrow_bor+"'></div>" +
- "<div class='delinfomain "+float+"'>" +
- "<div class='cont'>" +
- "<p>"+data[i]["tidingsContant"]+"</p>" +
- "</div>" +
- "</div>" +
- "</div>" +
- "</div>" +
- "</div>" +
- "</div>" +
- "</div> "
- };
-
- return htmlStr;
- };
- var getMyData = function (pageSize,pageNo,isbind,status,timeType,sortType){
- var params = {
- "consultantId":userid,
- "status":status,
- "timeType":timeType,
- "sortType":sortType,
- "pageSize":pageSize,
- "pageNo":pageNo
- };
-
- $.ajax({
- url:"/ajax/consult/pqCon",
- type:"get",
- data :params,
- dataType: "json",
- contentType: "application/x-www-form-urlencoded",
- success:function(response){
- if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
- return false;
- }
- else{
-
- var replyStr;
- var allData = response.data;
- var myData = allData.data;
-
- $("#workContainer2").html("");
- if(myData.length != 0 && myData.length != null){
- replyStr = handleData(myData,"consultId","lookBtn");
- $("#workContainer2").append(replyStr);
-
- }else{
- return false;
- };
-
- if(isbind == true){
- $(".getReplyPage").createPage({
- pageCount:Math.ceil(allData.total/pageSize),
- current:allData.pageNo,
- backFn:function(p){
- getMyData(pageSize,p,false,status,timeType,sortType);
- }
- });
- }
-
- }
-
- },
- error:function(response){
-
- $.MsgBox.Alert('提示',"收到回复数据请求失败");
- },
-
- });
- };
- var getConsultData = function (pageSize,pageNo,isbind,status,timeType,sortType){
- var params = {
- "professorId":userid,
- "status":status,
- "timeType":timeType,
- "sortType":sortType,
- "pageSize":pageSize,
- "pageNo":pageNo
- };
-
- $.ajax({
- url:"/ajax/consult/pqPro",
- type:"get",
-
- data :params,
- async:false,
- dataType: "json",
- contentType: "application/x-www-form-urlencoded",
- success:function(response){
- if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
- return false;
- }
- else{
- var consultStr;
- var allData = response.data;
- var myData = allData["data"];
-
- $("#workContainer").html("");
- if(myData.length != 0 && myData.length != null){
- consultStr = handleData(myData,"professorId","lookBtn");
- $("#workContainer").append(consultStr);
- }else{
- return false;
- }
-
- if(isbind == true){
- $(".getConsultPage").createPage({
- pageCount:Math.ceil(allData.total/pageSize),
- current:allData.pageNo,
- backFn:function(p){
- getConsultData(pageSize,p,false,status,timeType,sortType);
- }
- });
- }
- }
-
- },
- error:function(response){
- $.MsgBox.Alert('提示',"收到咨询数据请求失败");
- },
-
- });
- };
- function clickLookBtn2(sendId,attrParams,consultId,consultStatus,assessStatus,thanksStatus){
-
-
- if(attrParams == "professorId"){
-
- $.ajax({
- url:"diloags.html",
- dataType:"html",
- success:function(result){
- $(".workcon").html(result);
-
-
- dialogHeadFn2("/ajax/consult/qapro",attrParams,consultId,thanksStatus);
- dialogContentDataHandle2(consultId);
- $("#dialog_sendBtn").click(function(){sendDialogContentFn2(sendId,consultId)});
- },
- error:function(error){
-
-
- },
- complete:function(){
-
- $("#backBtn").click(function(){
- $("#consultbtn").css({
- color:"#fff",
- background:"#f99550"
- });
- clickConsultBtn();
-
- });
- }
- })
- }
-
- else if(attrParams == "consultId"){
-
- $.ajax({
- url:"diloags.html",
- dataType:"html",
- success:function(result){
-
- $(".workcon").html(result);
-
- if(consultStatus == 0){
- dialogHeadFn2("/ajax/consult/qacon",attrParams,consultId,thanksStatus);
- dialogContentDataHandle2(consultId);
- $("#dialog_sendBtn").click(function(){sendDialogContentFn2(sendId,consultId)});
- }
-
- else if(consultStatus == 1){
-
- if(assessStatus == 0){
- assessFn2(consultId,attrParams,thanksStatus)
-
- }else if(assessStatus == 1){
- dialogHeadFn2("/ajax/consult/qacon",attrParams,consultId,thanksStatus);
- dialogContentDataHandle2(consultId);
- $("#dialog_sendBtn").click(function(){sendDialogContentFn2(sendId,consultId)});
- }
- }
- },
- error:function(error){
-
-
- },
- complete:function(){
-
- $("#backBtn").click(function(){
- $("#consultbtn").css({
- color:"#fff",
- background:"#f99550"
- });
- clickConsultBtn();
-
- });
- }
-
-
- })
- }
- };
- var cur_status = "less";
- function showMore(){
-
- var charNumbers=$("#dialog_consultContent").html().length;
- var limit = 20;
- if(charNumbers > limit){
- var orgText = $("#dialog_consultContent").html();
- var orgHeight= $("#dialog_consultContent").height();
- var showText = orgText.substring(0,limit);
- var showText = showText + "...";
- $("#dialog_consultContent").html(showText);
- var contentHeight = $("#dialog_consultContent").height();
- $("#dialog_switch").click(function(){
- if(cur_status == "less"){
- $("#dialog_consultContent").height(contentHeight).html(orgText).animate({ height:orgHeight}, { duration: "slow" });
- $(this).html("收起");
- cur_status = "more";
- }else{
- $("#dialog_consultContent").height(orgHeight).html(showText).animate({ height:contentHeight}, { duration: "fast" });
- $(this).html("展开");
- cur_status = "less";
- }
- });
- }
- else{
- $("#dialog_switch").hide();
- }
- };
- function backHandle(){
-
-
- };
- function dialogHeadFn2(url,attrParams,consultId,thanksStatus){
-
- $.ajax({
- url:url,
- data:{"consultId":consultId,"readStatus":"1"},
- type:"get",
- aysnc:false,
- success:function(response){
- var myData = response["data"];
-
- if(attrParams == 'professorId'){
-
-
- if(myData["consultStatus"] == 0){
- $("#dil_consultStatus").text("进行中");
- $(".dialogfoot").css("display","block");
- $("#dialog_consultTitle").text(myData["consultTitle"]);
- $("#dialog_consultType").text(myData["consultType"]);
- $("#dial_consultName").text(myData["professor"]["name"]);
- $("#dialog_consultContent").html(myData["consultContant"])
-
- }
-
- else {
- $("#dil_consultStatus").text("完成");
- $("#dialog_consultTitle").text(myData["consultTitle"]);
- $("#dialog_consultType").text(myData["consultType"]);
- $("#dial_consultName").text(myData["professor"]["name"]);
- $("#dialog_consultContent").html(myData["consultContant"])
-
- $(".dialogfoot").css("display","none");
-
- if(myData["assessStatus"] == 1){
-
- var startConut = myData["assessStar"];
- for(var i = 0; i < startConut; i ++){
- $("#showAllAssess .evastar2").eq(i).addClass("addStar");
- }
- $("#showAllAssess").removeClass("displayNone");
-
- $("#dialog_assessContent").removeClass("displayNone");
- $("#dialog_assessContentText").html(myData["assessContant"]);
-
- if(myData["thanksStatus"] == 1){
- if(myData["thanksMoney"] != null && myData["thanksMoney"] != undefined && myData["thanksMoney"] != "" && myData["thanksMoney"] != 0 ){
-
- $("#dialog_thanks").removeClass("displayNone");
- $("#dialog_thanksMoney").text(myData["thanksMoney"]);
- }
-
- }else {
- return false;
- }
-
- }else {
- return false;
- }
- }
-
- }
-
- else if(attrParams == 'consultId'){
-
-
- if (myData["consultStatus"] == 0) {
- $("#dil_consultStatus").text("进行中");
- $(".dialogfoot").css("display","block");
- $("#dialog_consultTitle").text(myData["consultTitle"]);
- $("#dialog_consultType").text(myData["consultType"]);
- $("#dial_consultName").text(myData["professor"]["name"]);
- $("#dialog_consultContent").html(myData["consultContant"])
- $("#confirmBtn").removeClass("displayNone");
-
-
- $("#confirmBtn").click(function(){
- clickConfirmFn(consultId,thanksStatus);
- })
-
-
- $("#sendAssessBtn").click(function(){
- clickSendAssessBtn2(consultId,attrParams,thanksStatus)
- });
-
-
- $("#noAssessBtn").click(function(){
- noAssessFn2(consultId,attrParams,thanksStatus);
- });
-
- $("#closeAssessBtn").click(function(){
- noAssessFn2(consultId,attrParams,thanksStatus);
- });
-
-
- }
-
- else {
- $("#dil_consultStatus").text("已完成");
- $("#dialog_consultTitle").text(myData["consultTitle"]);
- $("#dialog_consultType").text(myData["consultType"]);
- $("#dial_consultName").text(myData["professor"]["name"]);
- $("#dialog_consultContent").html(myData["consultContant"])
-
- $(".dialogfoot").css("display","none");
-
-
- if(myData["assessStatus"] == 0){
-
- assessFn2(consultId,attrParams,thanksStatus)
- }else {
-
- var startConut = myData["assessStar"];
- for(var i = 0; i < startConut; i ++){
- $("#showAllAssess .evastar2").eq(i).addClass("addStar");
- }
- $("#showAllAssess").removeClass("displayNone");
-
- $("#dialog_assessContent").removeClass("displayNone");
- $("#dialog_assessContentText").html(myData["assessContant"]);
-
-
- if(myData["thanksStatus"] == 0){
-
- }else {
-
-
- }
-
- }
-
- }
-
- };
-
-
- if($("#dialog_consultContent")){
-
- showMore();
- };
-
- },
- error:function (error) {
-
- }
- });
-
-
- }
- function clickConfirmFn(consultId,thanksStatus){
- finish();
-
- $("#finish").click(function(){
- finishFn(consultId)
- });
-
- }
- function finishFn(consultId,thanksStatus){
-
- $.ajax({
- url:"/ajax/consult/finishTime",
- type:"post",
- data:{
- "consultId":consultId,
- "consultStatus":"1",
- },
- success:function(response){
- console.log(response);
- $(".blackcover").remove();
- $("body").css("position","static");
- assessFn2(consultId,"consultId",thanksStatus);
- },
- error:function(error){
-
- }
- });
-
-
- };
- function dialogContentDataHandle2(consultId){
- $.ajax({
- "url":"/ajax/tidings/qacon",
- "type":"get",
- "data":{"consultId":consultId},
- "success":function(response){
- $("#dialogContent").empty("");
- var dialogConData = response["data"];
- var dialogStr;
- dialogStr = dialogContentStrFn(dialogConData);
- $("#dialogContent").prepend(dialogStr);
- $("#dialogContent").removeClass("dialog");
- var height=$("#dialogContent").height();
-
- $("#dialogContent").addClass("dialog");
- $("#dialogContent").scrollTop(height);
- },
- error:function(error){
-
- }
- });
- };
- function sendDialogContentFn2(sendId,consultId){
- var tidingsContant = $("#dialog_sendContent").val();
-
-
- $.ajax({
- "url":"/ajax/tidings",
- "type":"post",
- "data":{"tidingsContant":tidingsContant,"senderId":sendId,"consultId":consultId},
- "success":function(response){
-
- if(response.success){
-
- dialogContentDataHandle2(consultId);
- }
- },
- "error":function(error){
-
- console.log(error);
- }
- });
- $("#dialog_sendContent").val("");
- };
- function assessFn2(consultId,attrParams,thanksStatus){
- ConsultComment();
-
- var start;
- function clickStar(){
- $(".evastar2").removeClass('addStar');
- start=$(this).index()+1;
- for(var i=0;i<start;i++){
- if(i<start){
- $(".evastar2").eq(i).addClass("addStar");
- }
- else{
- $(".evastar2").eq(i).removeClass('addStar');
- }
- }
- $("#startCount").val($(".addStar").length);
- };
- $(".evastar2").bind("click",clickStar);
-
-
- $("#sendAssessBtn").click(function(){
- clickSendAssessBtn2(consultId,attrParams,thanksStatus)
- });
-
-
- $("#noAssessBtn").click(function(){
- noAssessFn2(consultId,attrParams,thanksStatus)
- });
-
- $("#closeAssessBtn").click(function(){
- noAssessFn2(consultId,attrParams,thanksStatus)
- });
- };
- function clickSendAssessBtn2(consultId,attrParams,thanksStatus){
- var assessStar = $("#startCount").val();
- var assessContant = $("#assessCon").val();
- var assessContentStr ={
- "consultId":consultId,
- "assessStatus":"1",
- "assessStar":assessStar,
- "assessContant":assessContant
- };
-
-
- $.ajax({
- "url":"/ajax/consult/assess",
- "type":"post",
- "data":assessContentStr,
- "success":function(response){
-
- },
- "error":function(error){
-
- $.MsgBox.Alert('提示',"评论失败");
- },
- "complete":function(){
- $(".blackcover").remove();
- $("body").css("position","static");
-
-
- $.ajax({
- "url":"diloags.html",
- "dataType":"html",
- "success":function(result){
-
- $(".workcon").html(result);
- dialogHeadFn2("/ajax/consult/qacon",attrParams,consultId,thanksStatus);
- dialogContentDataHandle2(consultId);
- },
- "error":function(error){
-
-
- console.log(error);
- }
- });
- }
- });
-
- };
- function noAssessFn2(consultId,attrParams,thanksStatus){
- $.ajax({
- "url":"diloags.html",
- "dataType":"html",
- "success":function(result){
-
- $(this).attr("id");
- $(".workcon").html(result);
- $(".blackcover").remove();
- $("body").css("position","static");
-
- $.ajax({
- url:"/ajax/consult/qacon",
- data:{"consultId":consultId,"readStatus":"1"},
- type:"get",
- aysnc:false,
- success:function(response){
- var myData = response["data"];
-
- $("#dil_consultStatus").text("已完成");
- $("#dialog_consultTitle").text(myData["consultTitle"]);
- $("#dialog_consultType").text(myData["consultType"]);
- $("#dial_consultName").text(myData["professor"]["name"]);
- $(".dialogfoot").css("display","none");
-
- $("#dialog_assessBtn").removeClass("displayNone");
- $("#dialog_assessBtn").click(function(){
- assessFn2(consultId,attrParams,thanksStatus);
- });
-
- },
- error:function(error){
-
- }
- });
-
- dialogContentDataHandle2(consultId);
- },
- "error":function(error){
-
- $.MsgBox.Alert('提醒',"对话请求错误");
- }
- });
- };
- function clickConsultBtn(){
- if(userid != "" && userid != null){
-
- $.ajax({
- "url":"consult.html",
- "dataType" : "html",
- "success":function(responseHtml){
- $(".workcon").html(responseHtml);
-
-
- $(".worksamlltit3").bind("click",tab);
- function tab(){
- $(".worksamlltit3").removeClass("worksamlltitnow");
- $(this).addClass("worksamlltitnow");
- $(".workmysrc3").hide();
- var activeTab = $(this).attr("href");
- $(activeTab).fadeIn();
-
- return false;
- };
-
-
- getConsultData("5",1,true,0,0,0);
-
- consultPullDownMenu();
-
-
- if($("#workContainer").find(".workselectitem").length == 0){
- $(".worksubcon .workmysrc3 ").eq(0).css("display","none");
- $(".workcontit .worksamlltit3").eq(0).removeClass("worksamlltitnow");
-
- $(".worksubcon .workmysrc3 ").eq(1).css("display","block");
- $(".workcontit .worksamlltit3").eq(1).addClass("worksamlltitnow");
-
-
- getMyData("5",1,true,0,0,0);
-
- myRequirePullDownMenu();
-
-
- if($("#workContainer2").find(".workselectitem").length == 0){
- }
-
-
- }
-
- else {
-
- getMyData("5",1,true,0,0,0);
-
-
- myRequirePullDownMenu();
-
- }
- $(".workcontit .worksamlltit3").eq(0).click(function(){
-
- $("#workContainer").remove();
- $(".getConsultPage").remove();
- $(".workselectcon").eq(0).append('<div id="workContainer"></div>');
- $(".workselectcon").eq(0).append('<div class="tcdPageCode getConsultPage"></div>');
-
-
- getConsultData("5",1,true,0,0,0);
-
- consultPullDownMenu();
-
- });
-
-
- $(".workcontit .worksamlltit3").eq(1).click(function(){
- $("#workContainer2").remove();
- $(".getReplyPage").remove();
- $(".workselectcon").eq(1).append('<div id="workContainer2"></div>');
- $(".workselectcon").eq(1).append('<div class="tcdPageCode getReplyPage"></div>');
-
-
- getMyData("5",1,true,0,0,0);
-
- myRequirePullDownMenu();
-
- });
-
- },
- })
-
-
- }else{
- $.MsgBox.Alert('提醒',"您尚未登录");
- }
- };
- function consultPullDownMenu(){
-
- $(".consultOption ul").find("li").click(function(){
- getConsultData("5",1,true,$(this).attr("tip"),$("#showTimeSort").attr("tim"),$("#timeSortId").val());
- });
- $(".timeOption ul").find("li").click(function(){
- getConsultData("5",1,true,$("#showStatus").attr("tip"),$(this).attr("tim"),$("#timeSortId").val());
- });
- var sortFlag = true;
- $("#consultArrow").click(function(){
-
- if(sortFlag == true){
- $(this).find("div").css("background-position","-20px 1px");
- $("#timeSortId").val("1");
- sortFlag = false;
- }else{
- $(this).find("div").css("background-position","0px 1px");
- $("#timeSortId").val("0");
- sortFlag=true;
- }
-
-
- getConsultData("5",1,true,$("#showStatus").attr("tip"),$("#showTimeSort").attr("tim"),$("#timeSortId").val());
- });
- };
- function myRequirePullDownMenu(){
-
- $(".replyOption ul").find("li").click(function(){
-
- getMyData("5",1,true,$(this).attr("tip"),$("#showTimeSort2").attr("tim"),$("#timeSortId2").val());
- });
- $(".timeOption2 ul").find("li").click(function(){
- getMyData("5",1,true,$("#showStatus2").attr("tip"),$(this).attr("tim"),$("#timeSortId2").val());
- });
- var sortFlag2 = true;
- $("#replyArrow").click(function(){
-
- if(sortFlag2 == true){
- $(this).find("div").css("background-position","-20px 1px");
- $("#timeSortId2").val("1");
- sortFlag2 =false;
-
- }else{
- $(this).find("div").css("background-position","0px 1px");
- $("#timeSortId2").val("0");
-
- sortFlag2=true;
- }
- getMyData("5",1,true,$("#showStatus2").attr("tip"),$("#showTimeSort2").attr("tim"),$("#timeSortId2").val());
- });
- };
|