1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144 |
- $(function() {
- loginStatus();
- var userid = $.cookie("userid");
- var professorId = GetQueryString("professorId");
- var name,orgId,orgAuth;
- if(userid == professorId) {
- $("#conbtn,.attentBtn").hide();
- }
- if(professorId) {
- var subjectShow = function(data) {
- if(data != undefined && data.length != 0) {
- var subs = new Array();
- if(data.indexOf(',')) {
- subs = data.split(',');
- } else {
- subs[0] = data;
- }
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#subjectShow").append("<div class='acad'>" + subs[i] + "</div>");
- };
- }
- }
- }
- var industryShow = function(data) {
- if(data != undefined && data.length != 0) {
- var subs = new Array();
- if(data.indexOf(',')) {
- subs = data.split(',');
- } else {
- subs[0] = data;
- }
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#industryShow").append("<li>" + subs[i] + "</li>");
- };
- }
- }
- }
- var eduBgShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- var showHtml = '<li><div class="h4Font h4tit">';
- if(data[i].college && data[i].major && data[i].degree) {
- showHtml += data[i].school + '-' + data[i].college + '-' + data[i].major + '-' + data[i].degree
- } else if(!data[i].college && data[i].major && data[i].degree) {
- showHtml += data[i].school + '-' + data[i].major + '-' + data[i].degree
- } else if(data[i].college && !data[i].major && data[i].degree) {
- showHtml += data[i].school + '-' + data[i].college + '-' + data[i].degree
- } else if(data[i].college && data[i].major && !data[i].degree) {
- showHtml += data[i].school + '-' + data[i].college + '-' + data[i].major
- } else if(!data[i].college && !data[i].major && data[i].degree) {
- showHtml += data[i].school + '-' + data[i].degree
- } else if(!data[i].college && data[i].major && !data[i].degree) {
- showHtml += data[i].school + '-' + data[i].major
- } else if(data[i].college && !data[i].major && !data[i].degree) {
- showHtml += data[i].school + '-' + data[i].college
- }
- if(typeof(data[i].year) !== "undefined") {
- showHtml += '<small class="h6Font">' + data[i].year + '</small>';
- } else {
- showHtml += "";
- }
- showHtml += "</div></li>";
- $("#eduBgShow").append(showHtml);
- }
- }
- }
- var timeJobShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- var sDate = "";
- var eDate = "";
- if(data[i].department) {
- var dep = "-" + data[i].department;
- } else {
- var dep = ""
- }
- if(data[i].startMonth) {
- sDate = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-";
- if(data[i].stopMonth) {
- eDate = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6);
- } else {
- eDate = "至今";
- }
- }
- var JobHtml = '<li>';
- JobHtml += '<div class="h4Font h4tit">' + data[i].company + '-' + data[i].title + '' + dep + '<small class="h6Font">' + sDate + '' + eDate + '</small></div>';
- JobHtml += '</li>';
- $("#timeJobShow").append(JobHtml);
- }
- }
- }
- var projectShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].startMonth) {
- data[i].startMonth = '';
- data[i].stopMonth = '';
- } else {
- data[i].startMonth = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-"
- if(!data[i].stopMonth) {
- data[i].stopMonth = '至今';
- } else {
- data[i].stopMonth = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6)
- }
- }
- var projectHtml = '<li class="paddingSpace">';
- projectHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].startMonth + '' + data[i].stopMonth + '</small></div>';
- projectHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
- projectHtml += '</li>';
- $("#projectShow").append(projectHtml);
- }
- }
- }
- var paperShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].url) {
- data[i].url = "";
- }
- var paperHtml = '<li class="paddingSpace">';
- paperHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
- paperHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
- paperHtml += '</li>';
- $("#paperShow").append(paperHtml);
- }
- }
- }
- var patentShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].url) {
- data[i].url = "";
- }
- var patentHtml = '<li class="paddingSpace">';
- patentHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
- patentHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
- patentHtml += '</li>';
- $("#patentShow").append(patentHtml);
- }
- }
- }
- var honorShow = function(data) {
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- var honorHtml = '<li class="paddingSpace">';
- honorHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + data[i].year + '</small></div>';
- honorHtml += '<div class="h5Font pIndent">' + data[i].descp + '</div>';
- honorHtml += '</li>';
- $("#honorShow").append(honorHtml);
- }
- }
- }
- var oarray=[];
- var researchAreaShow = function($datas, $datarecords) {
- if($datas != undefined && $datas.length != 0) {
- var html = [];
- for(var i = 0; i < $datas.length; ++i) {
- var $data = $datas[i];
- var $photos = [];
-
- if($datarecords.length > 0) {
- $photos = getRecords($datarecords, $data.caption);
- }
- var isAgree = -1;
- for(var j = 0; j < $photos.length; j++) {
- if(userid == $photos[j].id)
- isAgree++;
- }
- oarray[i]=$data.caption;
- if(professorId != userid) {
- if(isAgree) {
- var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus ' data-pid='" + $data.professorId + "' data-caption='" + i + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" +$data.caption + "'>";
- } else {
- var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus' style=' background-position-y:-26px' data-pid='" + $data.professorId + "' data-caption='" + i + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
- }
- } else {
- var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num favorBox' caption='" + $data.caption + "'>";
- }
- if($photos.length < 6) {
- for(var j = 0; j < $photos.length; ++j) {
- if($photos[j].img) {
- showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_s.jpg'></span>";
- } else {
- showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
- }
- }
- } else {
- for(var j = $photos.length - 5; j < $photos.length; ++j) {
- if($photos[j].img) {
- showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/head/" + $photos[j].id + "_s.jpg'></span>";
- } else {
- showDiv += "<span class='like-people userRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
- }
- }
- showDiv += "<span class='like-people like-more userRadius'></span>";
- }
- showDiv += "</div></div></div>";
- html.push(showDiv);
- }
- document.getElementById("researchAreaShow").innerHTML = html.join('');
- }
- }
- var getRecords = function($researchAreaLogs, caption) {
- var ret = [];
- var t = 0;
- for(var i = 0; i < $researchAreaLogs.length; i++) {
- if(caption == $researchAreaLogs[i].caption) {
- ret[t] = {
- id: $researchAreaLogs[i].opreteProfessorId,
- img: $researchAreaLogs[i].hasHeadImage
- }
- t++;
- }
- }
- return ret;
- }
- var clFlag = 1;
- $("#researchAreaShow").on("click", ".plus", function() {
- if(userid && userid != null && userid != "null") {
-
- if(clFlag) {
- clFlag = 0;
- } else {
- return;
- }
- if($(this).data("isagree") > -1) {
- $(this).stop(true, true).animate({
- backgroundPositionY: 0
- }, 300);
- } else {
- $(this).stop(true, true).animate({
- backgroundPositionY: -26
- }, 300);
- }
- $.ajax({
- "url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
- "type": "POST",
- "data": {
- "targetId": $(this).data("pid"),
- "targetCaption": oarray[$(this).data("caption")],
- "opId": userid
- },
- "contentType": "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + professorId, function($data) {
- if($data.success) {
- clFlag = 1;
- var $info = $data.data;
- if($info) {
- $("#researchAreaShow").empty("")
- if($info.researchAreas) {
- researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
- }
- }
- }
- })
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- } else {
- $.MsgBox.Alert("消息", "请登录后点赞");
-
- }
- })
-
-
- $("#workclose").click(function() {
- $(".resAreaCover").fadeOut();
- $("body").css("position", "");
- });
- $("#researchAreaShow").on("click", ".list-browse,.like-num", function() {
- var cap = $(this).attr("caption");
-
- $.ajax({
- url: "/ajax/researchAreaLog/ql",
- dataType: 'json',
- type: 'GET',
- timeout: 10000,
- data: {
- "professorId": professorId,
- 'caption': cap,
- "rows": 10
- },
- success: function(data) {
- if(data.success) {
- $(".attentList").html("");
- var $info = data.data;
- $("#subArea").text(cap);
- $(".resAreaCover").fadeIn();
- $(".resAreaCon").show()
- if($info.length == 0) {
- $(".resAreaCon").hide();
- return;
- }
- for(var i = 0; i < $info.length; i++) {
- if($info[i].professor.hasHeadImage == 1) {
- var img = "/images/head/" + $info[i].professor.id + "_l.jpg";
- } else {
- var img = "../images/default-photo.jpg";
- }
-
- var oSty=autho($info[i].professor.authType,$info[i].professor.orgAuth,$info[i].professor.authStatus);
-
- var title = "",
- office = "",
- orgName = "",
- address = '';
- if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
- title = $info[i].professor.title + ",";
- office = $info[i].professor.office + ",";
- orgName = $info[i].professor.orgName + " | ";
- address = $info[i].professor.address;
- } else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
- office = $info[i].professor.office + ",";
- orgName = $info[i].professor.orgName + " | ";
- address = $info[i].professor.address;
- } else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
- title = $info[i].professor.title + ",";
- orgName = $info[i].professor.orgName + " | ";
- address = $info[i].professor.address;
- } else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
- title = $info[i].professor.title + ",";
- office = $info[i].professor.office + " | ";
- address = $info[i].professor.address;
- } else if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
- title = $info[i].professor.title + ",";
- office = $info[i].professor.office + ",";
- orgName = $info[i].professor.orgName;
- } else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
- orgName = $info[i].professor.orgName + " | ";
- address = $info[i].professor.address;
- } else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
- office = $info[i].professor.office + " | ";
- address = $info[i].professor.address;
- } else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
- office = $info[i].professor.office + ",";
- orgName = $info[i].professor.orgName;
- } else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
- title = $info[i].professor.title + " | ";
- address = $info[i].professor.address;
- } else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
- office = $info[i].professor.title + ",";
- address = $info[i].professor.orgName;
- } else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
- title = $info[i].professor.title + ",";
- office = $info[i].professor.office;
- } else if(!$info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
- address = $info[i].professor.address;
- } else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
- orgName = $info[i].professor.orgName;
- } else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
- office = $info[i].professor.office;
- } else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
- title = $info[i].professor.title;
- }
- var addw = '<li data-id="'+$info[i].professor.id+'" style="cursor:pointer">'
- addw += '<a class="proinfor clearfix">'
- addw += '<div class="headblock floatL"><img id="proHead" class="headimg userRadius" src="' + img + '"></div>'
- addw += '<div class="mediaBody">'
- addw += '<span class="listtit"><span id="proName">' + $info[i].professor.name + '</span><em class="authiconNew ' + oSty.sty + '" title="'+ oSty.title +'"></em></span>'
- addw += '<div class="listtit2">' + title + office + orgName + address + '</div>'
- addw += '</div></a></li>'
- $(".attentList").append(addw);
- }
-
- $("body").css("position", "fixed");
- }
- },
- error: function() {}
- });
- });
-
- $(".attentList").on("click","li",function(){
- var opid=$(this).attr("data-id");
- location.href="userInforShow.html?professorId="+opid;
- })
- $.get("/ajax/professor/info/" + professorId, function($data) {
- if($data.success) {
- var $info = $data.data;
- orgId=$info.orgId;
- orgAuth=$info.orgAuth;
- if(orgAuth==1){
- $("#orgNameS").css("cursor","pointer");
- }
- if($info) {
- if($info.authType == 1) {
- $(".yesshow").show();
- if(ass == 0){
- $('span:contains("合作历史及评价")').parents(".introduction").hide();
- }
- if(resou == 0 && ass == 0) {
- $('div:contains("合作机会")').parents(".menublock").hide();
- }
- } else {
- if($info.authentication == 3) {
- $("#office").hide();
- $("#titleS").hide();
- }
- }
-
- if($info.title) {
- var qtitle = " - " + $info.title;
- } else {
- var qtitle = "";
- }
- if($info.office) {
- var qoffice = " - " + $info.office;
- } else {
- var qoffice = "";
- }
- var llqtitle = $info.name + qtitle + qoffice + "-" + $info.orgName + "-科袖网";
- window.setInterval(function() {
- document.title = llqtitle;
- }, 500);
-
-
- var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
- $(".proModify").addClass(oStyS.sty);
- $(".proModify").attr("title",oStyS.title);
-
- $("#nameS").text($info.name);
- if($info.office) {
- if($info.title) {
- $("#office").text($info.office + ",");
- } else {
- $("#office").text($info.office);
- }
- }
- if($info.title) {
- $("#titleS").text($info.title);
- }
- if($info.department) {
- if($info.orgName) {
- $("#industryS").text($info.department + ",");
- } else {
- $("#industryS").text($info.department);
- }
- }
- if($info.orgName) {
- $("#orgNameS").text($info.orgName);
- }
- if($info.address) {
- $("#address").text($info.address);
- }
- if($info.hasHeadImage) {
- $("#headImage").attr("src", "/images/head/" + professorId + "_l.jpg");
- } else {
- $("#headImage").attr("src", "/images/default-photo.jpg");
- }
- $("#orgImage").attr("src", "/images/org/" + $info.orgId + ".jpg");
- $("#orgImage").load(function() {})
- .error(function() {
- $("#orgImage").attr("src", "/images/default-icon.jpg");
- });
-
- name = $info.name;
- if($info.descp == undefined && $info.subject == undefined && $info.researchAreas.length == 0 && $info.industry == undefined && $info.edus.length == 0 && $info.jobs.length == 0 && $info.projects.length == 0 && $info.papers.length == 0 && $info.patents.length == 0 && $info.honors.length == 0) {
- $("div:contains('个人信息')").parents(".menublock").hide();
- }
- if($info.descp) {
- $("#descpS").text($info.descp);
- } else {
- $("span:contains('个人简介')").parents(".introduction").hide();
- $("a:contains('个人简介')").hide();
- }
-
-
- if($info.authType == 1) {
- if($info.subject) {
- subjectShow($info.subject);
- } else {
- $("span:contains('学术领域')").parents(".introduction").hide();
- $("a:contains('学术领域')").hide();
- }
- } else {
- if($info.authentication == 1) {
- if($info.subject) {
- subjectShow($info.subject);
- } else {
- $("span:contains('学术领域')").parents(".introduction").hide();
- $("a:contains('学术领域')").hide();
- }
- } else {
- $("span:contains('学术领域')").parents(".introduction").hide();
- $("a:contains('学术领域')").hide();
- }
- }
-
- if($info.authType == 1) {
- if($info.researchAreas.length) {
- researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
- } else {
- $("span:contains('研究方向')").parents(".introduction").hide();
- $("a:contains('研究方向')").hide();
- }
- } else {
- $("span:contains('研究方向')").parents(".introduction").hide();
- $("a:contains('研究方向')").hide();
- }
-
- if($info.authType == 1) {
- if($info.industry) {
- industryShow($info.industry);
- } else {
- $("span:contains('应用行业')").parents(".introduction").hide();
- $("a:contains('应用行业')").hide();
- }
- } else {
- if($info.authentication == 2) {
- if($info.industry) {
- industryShow($info.industry);
- } else {
- $("span:contains('应用行业')").parents(".introduction").hide();
- $("a:contains('应用行业')").hide();
- }
- } else {
- $("span:contains('应用行业')").parents(".introduction").hide();
- $("a:contains('应用行业')").hide();
- }
- }
-
- if($info.edus.length) {
- eduBgShow($info.edus);
- } else {
- $("span:contains('教育背景')").parents(".introduction").hide();
- $("a:contains('教育背景')").hide();
- }
-
- if($info.jobs.length) {
- timeJobShow($info.jobs);
- } else {
- $("span:contains('工作经历')").parents(".introduction").hide();
- $("a:contains('工作经历')").hide();
- }
-
- if($info.projects.length) {
- projectShow($info.projects)
- } else {
- $("span:contains('项目经历')").parents(".introduction").hide();
- $("a:contains('项目经历')").hide();
- }
-
- if($info.papers.length) {
- paperShow($info.papers);
- } else {
- $("span:contains('著作、论文、文章')").parents(".introduction").hide();
- $("a:contains('著作、论文、文章')").hide();
- }
-
- if($info.patents.length) {
- patentShow($info.patents);
- } else {
- $("span:contains('专利')").parents(".introduction").hide();
- $("a:contains('专利')").hide();
- }
-
- if($info.honors.length) {
- honorShow($info.honors);
- } else {
- $("span:contains('荣誉及奖项')").parents(".introduction").hide();
- $("a:contains('荣誉及奖项')").hide();
- }
- var d;
- var t;
- $(function() {
- var art_height;
- var isHidden=$("#reA").is(":hidden");
- if(isHidden) {
- art_height=0;
- }else{
- art_height=$("#reA").outerHeight(true);
- }
-
- $(document).scroll(function() {
- var top3 = $(window).height();
- var top5 = $(".content-left").height();
- var top4 = $("#container").height() + art_height;
-
- var top1 = $(document).scrollTop();
- var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10;
- if(top1 >= 300) {
- $(".content-left").css({
- "position": "fixed",
- "top": "80px"
- });
- if(top1 >= top2) {
- $('.information-content').css("position", "static");
- $(".content-left").css("position", "absolute");
- $(".content-left").css("top", top4 - top5 - 10 + "px");
- } else {
- $('.information-content').css("position", "relative");
- $(".content-left").css({
- "position": "fixed",
- "top": "80px"
- });
- }
- } else {
- $(".content-left").css({
- "position": "static"
- });
- }
-
- var foot_height = $(".footerblock").height();
- if(top1 >= 180 && top1 < top4 - top3) {
- $(".coulstblock").slideDown();
- $(".coulstblock").css({
- "bottom": "0"
- });
- } else if(top1 >= top4 - top3) {
- $(".coulstblock").css({
- "bottom": -(top4 - top3 - top1 ) - art_height + "px"
- });
- } else {
- $(".coulstblock").slideUp();
- $(".coulstblock").css({
- "bottom": "0"
- });
- }
- })
- });
-
- }
- }
- });
- }
- $("#hsearch").on("click", function() {
- var searchContent = $("#hsearchContent").val();
- location.href = "searchNew.html?searchContent=" + searchContent;
- });
-
-
-
- $(".subsidebar").mouseenter(function(){
- var dd=$(this)[0].className;
- if(dd!="subsidebar subcolor"){
- $(this).css("background","#efefef");
- }
- }).mouseleave(function(){
- $(this).css("background","")
- });
-
- $(".subsidebar").click(function() {
- $(".subsidebar").removeClass("subcolor");
- $(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
- });
- $(".subsidebar").click(function() {
- var index = $(".subsidebar").index(this)+1;
-
- var offset = $(".introduction").eq(index).offset();
- $("body,html").animate({
- scrollTop: offset.top - 80 + "px"
- }, 1000);
- }).mousedown(function(){
- $(this).css("background","");
- });
-
-
-
- $.ajax({
- url: "/ajax/article/qaProPublish",
- dataType: 'json',
- type: 'GET',
- data: {
- "professorId": professorId
- },
- timeout: 10000,
- success: function(data) {
- if(data.success) {
- var pp=ifUserType(professorId)
- if(!pp.authType2) {
- $("#reA").hide();
- return;
- } else {
- if(data.data.length == 0) {
- $("#reA").hide();
- return;
- }
- $("#reA").show();
- for(var i = 0; i < data.data.length; i++) {
- var add = '<li><a href="articalShow.html?articleId=' + data.data[i].articleId + '" style="display:block;">'
- add += '<div class="art_topicBox"><div class="art_img" style=""></div>'
- add += '<div class="art_tbox"><h6 id="artical_topic" >' + data.data[i].articleTitle + '</h6></div>'
- add += '</div><div class="tagsBox"><span></span></div>'
- add += '</a></li>';
- $add = $(add);
- $("#reachArticle").append($add);
- $add.find('.tagsBox span').text(data.data[i].subject);
- if(data.data[i].articleImg) {
- $add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
- }
- }
-
- var $content2 = $(".sharescrollbox.Acrollbox");
- var childcount2 = $content2.find(".otherRes.shareshow li").length;
- Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
- }
- }
- },
- error: function() {
- return;
- }
- });
- var resou;
-
-
- $.ajax({
- "url": "/ajax/resource/qaProPublish",
- "type": "get",
- "async": false,
- "data": {
- "professorId": professorId
- },
- "success": function(data) {
- console.log(data);
- if(data.success) {
- var pp=ifUserType(professorId)
- if(!pp.authType2) {
- $("span:contains('研发资源')").parents(".introduction").hide();
- return;
- } else {
- resou = data.data.length;
- if(data.data.length == 0) {
- $("#infor-browse").css("display", "none");
- $("span:contains('研发资源')").parents(".introduction").hide();
- $("a:contains('研发资源')").hide();
- return;
- } else {
- $("span:contains('研发资源')").parents(".introduction").show();
- }
- if(data.data.length > 3) {
- $("#infor-browse").css("display", "block");
- $(".resoubtn").css("display", "block");
- }
- var add = "";
- for(var i = 0; i < data.data.length; i++) {
- add = '<div class="sharesrc">'
- add += '<div class="shareshow">'
- add += '<a href="resourceShow.html?resourceId=' + data.data[i].resourceId + '"class="remess" style="display:block;" resourceId=' + data.data[i].resourceId + '>'
- add += '<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
- add += '<img class="resImg headRadius resourceImg" src="/images/resource/' + data.data[i].resourceId + '.jpg" />'
- add += '</div></a>'
- add += '<div class="shareopeart"><a class="sharebtn resourceConsult" professorId=' + data.data[i]["professorId"] + '>咨询</a><a class="sharebtn applicant" style="display:none">申请</a></div>'
- add += '</div>'
- add += '<p class="restit ellipsisSty">资源名称:<span class="presou consultTitleVal" resourceConsultTitle = "">' + data.data[i].resourceName + '</span></p>'
- add += '<p class="briefinfor ellipsisSty-2">应用用途:' + data.data[i].supportedServices + '</p>'
- add += '</div>'
- $("#sharescrollbox").append(add);
- $('.applicant').eq(i).attr("resourceId", data.data[i].resourceId);
- if(data.data[i].images.length) {
- $(".resourceImg").eq(i).attr("src","/data/resource/" + data.data[i].images[0].imageSrc);
- }else{
- $(".resourceImg").eq(i).attr("src","/images/default-resource.jpg");
- }
- add = "";
- }
-
- var $content = $("#sharescrollbox");
- var childcount = $content.find(".sharesrc").length;
- Carousel(3, 3, 3, childcount, $content, $(".resoubtn2.resounext"), $(".resoubtn2.resouprev"));
-
- $(".introduction").find(".resourceConsult").bind("click", clickResourceConsult);
- }
- } else {
- $.MsgBox.Alert("消息", "系统异常!");
- }
- },
- "error": function() {
- $.MsgBox.Alert('message', 'failddd')
- }
- });
- function getIdentity(professorId) {
- $.ajax({
- "url": "ajax/professor/" + professorId,
- "type": "get",
- "async": false,
- "success": function(data) {
- if(data.success) {
-
- $("option")[0].value = data.data.name;
- $("option")[1].value = data.data.organization.name;
-
-
- } else {
- $.MsgBox.Alert("消息", "系统异常!");
- }
- },
- "error": function() {
- $.MsgBox.Alert('message', 'failddd')
- }
- })
- }
-
- $('.introduction').on("click", '.applicant', function() {
- if(userid && userid != null && userid != "null") {
- ResourceApply();
- $(".limitBox").removeClass("limitBox");
- $(".limitwords").removeClass("limitwords");
- $(".limitwordbox").removeClass("limitwordbox");
-
- var myDate = new Date();
- var nowYear = myDate.getFullYear();
- var nowMonth = myDate.getMonth() + 1;
- var nowDate = myDate.getDate();
- if(nowMonth < 10) {
- nowMonth = "0" + nowMonth.toString();
- }
- if(nowDate < 10) {
- nowDate = "0" + nowDate.toString();
- }
- var now = nowYear + "-" + nowMonth + "-" + nowDate;
- $("#datepicker").val(now);
- $("#datepicker").datepicker({
- "dateFormat": " yy-mm-dd"
- });
- $(".timelo").css("display", "none");
- $(".namecon").text(name);
- $(".applysure").hide();
- $(".btnboxup").hide();
- var index1 = $(this).parent().parent().parent().index();
- var resName = $('.presou').eq(index1).text();
- var resourceID = $(this).attr("resourceId");
- $.ajax({
- "url": "/ajax/resource/" + resourceID,
- "type": "get",
- "async": false,
- "success": function(info) {
- if(info.success) {
- if(info.data.images.length) {
- $(".resouImage").attr("src", "/images/resource/" + resourceID + ".jpg");
- } else {
- $(".resouImage").attr("src", "/images/default-resource.jpg");
- }
- }
- }
- })
- $(".log").text(resName);
- getIdentity(userid);
- $("#deliver").on("click", function() {
- var $data = {};
- $data.demandId = userid;
- $data.resourceId = resourceID;
- $data.detailDemand = $(".detail").val();
-
- $data.deliverTime = replaceStr($.trim($(".dealTime").val()));
-
-
- $data.operationStatus = 1;
- $data.applysquare = $("select option:selected").val();
-
- $.ajax({
- "url": "/ajax/operation",
- "type": "POST",
- "success": function(rdata) {
- if(rdata.success) {
- $.MsgBox.Alert('message', '资源"' + resName + '"申请发送成功!');
- $("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
- $(".blackcover").remove();
- $("body").css("position", "");
-
- } else {
- $.MsgBox.Alert('message', '资源"' + resName + '"申请发送失败,请重新申请!');
- }
- },
- "data": $data,
- "beforeSend": function() { },
- "contentType": "application/x-www-form-urlencoded",
- dataType: "json"
- });
- });
- } else {
- $.MsgBox.Alert("消息", "您还未登录,请登录之后进行资源申请");
- }
- });
-
- function clickResourceConsult() {
- if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
- var professorId = $(this).attr("professorId");
- consultHandler();
- var liEle = $("ul.menucon").children();
- for(var i = 0; i < liEle.length; i++) {
- $(liEle[i]).removeClass('clicknow');
- $(liEle[1]).addClass("clicknow");
- };
- var item = $(this).parent().parent().parent();
- var consultTitleVal = item.find(".consultTitleVal").text();
- $("#consultTitle").val("关于" + consultTitleVal + "的咨询");
- } else {
- $.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
- $("#mb_btn_ok").val("去登录");
- var aele = document.createElement('a');
- $("#mb_btnbox").append(aele);
- $("#mb_btnbox a").css({
- 'display': "block",
- 'width': '100%',
- 'height': '40px',
- 'position': 'absolute',
- 'bottom': '-6px',
- 'left': '0'
- });
- aele.setAttribute('href', '../login.html');
- }
- };
-
- var userid = $.cookie("userid");
- var professorId = GetQueryString("professorId");
-
- $("#consultbtn,#conbtn").bind('click', consultHandler);
- function consultHandler() {
- if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
- ConsultApply();
- concultProInfo(professorId);
-
- $("#sendConsultBtn").click(function() {
- sendConsultHandler($(this).attr("proId"));
- });
- } else {
- $.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
- $("#mb_btn_ok").val("去登录");
- var aele = document.createElement('a');
- $("#mb_btnbox").append(aele);
- $("#mb_btnbox a").css({
- 'display': "block",
- 'width': '100%',
- 'height': '40px',
- 'position': 'absolute',
- 'bottom': '-6px',
- 'left': '0'
- });
- aele.setAttribute('href', '../login.html');
- }
- };
-
- var ass;
- $.ajax({
- "url": "/ajax/consult/pqAssessHis",
- "type": "get",
- "data": {
- "professorId": professorId
- },
- "async": false,
- "success": function(response) {
- if(response.success) {
- var $data = response.data.data;
- ass = $data.length;
- if($data.length == 0) {
- $("span:contains('合作历史及评价')").parents(".introduction").hide();
- $("a:contains('合作历史及评价')").hide();
- }
- for(var i = 0; i < $data.length; i++) {
- var add = "";
- var assessTime = $data[i]["assessTime"].substr(0, 4) + "-" + $data[i].assessTime.substr(4, 2) + "-" + $data[i].assessTime.substr(6, 2) + " " +
- $data[i].assessTime.substr(8, 2) + ":" + $data[i].assessTime.substr(10, 2);
- add += '<div class="evaluate2">'
- add += '<div class="lefteva">'
- add += '<a class="evaimg userRadius">'
- if($data[i].professor.hasHeadImage) {
- add += '<img src="/images/head/' + $data[i].professor.id + '_l.jpg" width="100%" height="100%">'
- } else {
- add += '<img src="/images/default-photo.jpg" width="100%" height="100%">'
- }
- add += '</a>'
- add += '<p>' + $data[i].professor.name + '</p><p>'
-
-
-
-
-
-
- add += '</p><p>'
-
-
-
-
-
-
- add += '</p>'
- add += '</div>'
- add += '<div class="righteva">'
- add += '<ul class="evasort">'
- add += '<li>咨询时间:<span>' + assessTime + '</span></li>'
- add += '</ul>'
- add += '<div class="evastarbox" id="evastarboxx" style="margin-left: -5px;">'
- add += '<span class="evastar"></span>'
- add += '<span class="evastar"></span>'
- add += '<span class="evastar"></span>'
- add += '<span class="evastar"></span>'
- add += '<span class="evastar"></span>'
- add += '</div>'
- if($data[i].assessContant) {
- add += '<p class="evabrief">' + $data[i].assessContant + ' </p>'
- }
- add += '</div>'
- add += '</div>'
- var $add = $(add);
- $(".shareabout2").append($add);
- $add.find(".evastar:lt(" + $data[i].assessStar + ")").addClass('staspan');
- }
- $(".evaluate2").eq($data.length - 1).css("border-bottom", "none");
- }
- }
- })
- proinfo(professorId);
-
- function proinfo(professorId) {
- $.ajax({
- url: "/ajax/professor/editBaseInfo/" + professorId,
- type: "get",
- data: {
- "id": professorId
- },
- contentType: "application/x-www-form-urlencoded",
- success: function(response) {
- var myData = response["data"];
-
- $("#foot_proname").html(myData["name"]);
- if(myData["address"]) {
- $("#foot_proaddress").html(' | ' + myData["address"]);
- }
- if(myData["title"]) {
- $("#foot_protitle").html(myData["title"]);
- }
- if(myData["department"]) {
- $("#foot_prodepar").html(myData["department"]);
- }
- if(myData["orgName"]) {
- if(myData["department"] == null || myData["department"] == '') {
- $("#foot_proorgname").html(myData["orgName"]);
- } else {
- $("#foot_proorgname").html(',' + myData["orgName"]);
- }
- }
-
- var oStyT=autho(myData.authType,myData.orgAuth,myData.authStatus);
- $("#foot_promodify").addClass(oStyT.sty);
- $("#foot_promodify").attr("title",oStyT.title);
-
- if(myData["hasHeadImage"] == 0) {
- $("#foot_proimg").attr("src", "images/default-photo.jpg");
- } else {
- $("#foot_proimg").attr("src", "images/head/" + myData["id"] + "_l.jpg");
- }
- },
- error: function(error) {
- $.MsgBox.Alert("message", "请求数据失败");
- }
- });
- }
- $("#orgNameS").click(function(){
- if(orgAuth==1){
- location.href="companybrowinfor.html?orgId="+orgId;
- }
-
- })
-
- })
|