portal html css js resource

userInforShow.js 85KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445
  1. $(function() {
  2. loginStatus();//判断个人是否登录
  3. var userid = $.cookie("userid");
  4. var professorId = GetQueryString("professorId");
  5. if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
  6. location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
  7. }
  8. var oArray=[];
  9. function subjectShow(data) {
  10. if(data != undefined && data.length != 0) {
  11. var subs=strToAry(data)
  12. if(subs.length > 0) {
  13. for(var i = 0; i < subs.length; i++) {
  14. $("#subjectShow").append("<li>" + subs[i] + "</li>");
  15. };
  16. }
  17. }
  18. }
  19. function researchAreaShow(dataStrs, dataStrrecords) {
  20. if(dataStrs != undefined && dataStrs.length != 0) {
  21. var html = [];
  22. for(var i = 0; i < dataStrs.length; ++i) {
  23. var dataStr = dataStrs[i];
  24. var $photos = [];
  25. //获取头像
  26. if(dataStrrecords.length > 0) {
  27. $photos = getRecords(dataStrrecords, dataStr.caption);
  28. }
  29. var isAgree = -1;
  30. for(var j = 0; j < $photos.length; j++) {
  31. if(userid == $photos[j].id)
  32. isAgree++;
  33. }
  34. oArray[i]=dataStr.caption;
  35. if(professorId != userid) {
  36. if(isAgree) {
  37. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><span class="plus" data-pid="'+ dataStr.professorId +'" data-caption="'+ i + '" data-isagree="' + isAgree + '"></span><div class="favorCount" caption="'+ dataStr.caption +'">';
  38. } else {
  39. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><span class="plus" style="background-position-y:-26px" data-pid="'+ dataStr.professorId +'" data-caption="'+ i + '" data-isagree="' + isAgree + '"></span><div class="favorCount" caption="'+ dataStr.caption +'">';
  40. }
  41. } else {
  42. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><div class="favorCount" caption="'+ dataStr.caption +'">';
  43. }
  44. if($photos.length < 6) {
  45. for(var j = 0; j < $photos.length; ++j) {
  46. if($photos[j].img) {
  47. showDiv += '<span class="like-people" style="background-image: url(../images/head/'+ $photos[j].id +'_s.jpg);"></span>';
  48. } else {
  49. showDiv += '<span class="like-people" style="background-image: url(../images/default-photo.jpg);"></span>';
  50. }
  51. }
  52. } else {
  53. for(var j = $photos.length - 5; j < $photos.length; ++j) {
  54. if($photos[j].img) {
  55. showDiv +='<span class="like-people" style="background-image: url(../images/head/'+ $photos[j].id +'_s.jpg);"></span>';
  56. } else {
  57. showDiv += '<span class="like-people" style="background-image: url(../images/default-photo.jpg);"></span>';
  58. }
  59. }
  60. showDiv += '<span class="like-people like-more"></span>';
  61. }
  62. showDiv += "</div></li>";
  63. html.push(showDiv);
  64. }
  65. document.getElementById("researchAreaShow").innerHTML = html.join('');
  66. }
  67. }
  68. function industryShow(data) {
  69. if(data != undefined && data.length != 0) {
  70. var subs=strToAry(data)
  71. if(subs.length > 0) {
  72. for(var i = 0; i < subs.length; i++) {
  73. $("#industryShow").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
  74. };
  75. }
  76. }
  77. }
  78. function projectShow(data) {
  79. if(data.length > 0) {
  80. for(var i = 0; i < data.length; i++) {
  81. if(!data[i].descp) {
  82. data[i].descp = "";
  83. }
  84. var sDate = "";
  85. var eDate = "";
  86. if(data[i].startMonth) {
  87. sDate = data[i].startMonth.substr(0, 4) + "年" + data[i].startMonth.substr(4, 6) + "月";
  88. sDateV = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
  89. if(data[i].stopMonth) {
  90. eDate =" - "+ data[i].stopMonth.substr(0, 4) + "年" + data[i].stopMonth.substr(4, 6) + "月";
  91. } else {
  92. eDate = " - "+ "至今";
  93. }
  94. }
  95. var projectHtml = '<li>';
  96. projectHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + sDate + eDate + '</small></div>';
  97. projectHtml += '<div class="h5Font">' + data[i].descp + '</div>';
  98. projectHtml += '</li>';
  99. $("#projectShow").append(projectHtml);
  100. }
  101. }
  102. }
  103. function honorShow(data) {
  104. if(data.length > 0) {
  105. for(var i = 0; i < data.length; i++) {
  106. var timeho="";
  107. if(data[i].year){
  108. timeho = data[i].year+'年';
  109. }else{
  110. data[i].year="";
  111. }
  112. if(!data[i].descp) {
  113. data[i].descp = "";
  114. }
  115. var honorHtml = '<li>';
  116. honorHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + timeho + '</small></div>';
  117. honorHtml += '<div class="h5Font">' + data[i].descp + '</div>';
  118. honorHtml += '</li>';
  119. $("#honorShow").append(honorHtml);
  120. }
  121. }
  122. }
  123. function timeJobShow(data) {
  124. if(data.length > 0) {
  125. for(var i = 0; i < data.length; i++) {
  126. if(data[i].department) {
  127. var dep = " - " + data[i].department;
  128. } else {
  129. var dep = ""
  130. }
  131. var sDate = "";
  132. var eDate = "";
  133. if(data[i].startMonth) {
  134. sDate = data[i].startMonth.substr(0, 4) + "年" + data[i].startMonth.substr(4, 6) + "月";
  135. sDateV = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
  136. if(data[i].stopMonth) {
  137. eDate =" - "+ data[i].stopMonth.substr(0, 4) + "年" + data[i].stopMonth.substr(4, 6) + "月";
  138. } else {
  139. eDate = " - "+ "至今";
  140. }
  141. }
  142. var JobHtml = '<li>';
  143. JobHtml += '<div class="h4Font h4tit">' + data[i].company + dep + ' - ' + data[i].title + '<small class="h6Font">' + sDate + eDate + '</small></div>';
  144. JobHtml += '</li>';
  145. $("#timeJobShow").append(JobHtml);
  146. }
  147. }
  148. }
  149. function eduBgShow(data) {
  150. if(data.length > 0) {
  151. for(var i = 0; i < data.length; i++) {
  152. var college="",major="",degree=""
  153. if(data[i].college){
  154. college =' - ' + data[i].college
  155. }else{
  156. data[i].college="";
  157. }
  158. if(data[i].major){
  159. major =' - ' + data[i].major
  160. }else{
  161. data[i].major="";
  162. }
  163. if(data[i].degree){
  164. degree =' - ' + data[i].degree
  165. if(data[i].degree==0){
  166. degree =""
  167. }
  168. }else{
  169. data[i].degree="";
  170. }
  171. var timebiye="";
  172. if(data[i].year){
  173. if(data[i].year.trim()=="至今"){
  174. timebiye=data[i].year;
  175. }else{
  176. timebiye=data[i].year+'年';
  177. }
  178. }else{
  179. timebiye="";
  180. }
  181. var showHtml = '<li><div class="h4Font h4tit">'
  182. showHtml += data[i].school + college + major + degree;
  183. showHtml +='<small class="h6Font">' + timebiye + '</small></div></li>';
  184. $("#eduBgShow").append(showHtml);
  185. }
  186. }
  187. }
  188. //判断点赞的用户是否有头像
  189. function getRecords($researchAreaLogs, caption) {
  190. var ret = [];
  191. var t = 0;
  192. for(var i = 0; i < $researchAreaLogs.length; i++) {
  193. if(caption == $researchAreaLogs[i].caption) {
  194. ret[t] = {
  195. id: $researchAreaLogs[i].opreteProfessorId,
  196. img: $researchAreaLogs[i].hasHeadImage
  197. }
  198. t++;
  199. }
  200. }
  201. return ret;
  202. }
  203. function openAttend(){//打开收藏与关注
  204. $(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
  205. $(".navconBox .moreBu").show();
  206. $(".wendaNav").hide();
  207. $("#item8user").show().siblings().hide();
  208. $(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
  209. $("#item8drop1").show().siblings().hide();
  210. watchO={
  211. watchTime:"",
  212. watchObjId:"",
  213. };
  214. var pa=$(".moreNavUl.moreBuUl>li.liNow").attr("rel")
  215. $("#"+pa).find("ul").html("")
  216. $("#"+pa).find(".js-load-more").show();
  217. collectSorts(1,true);
  218. }
  219. function researchAlert(cap){
  220. $.ajax({
  221. "url": "/ajax/researchAreaLog/ql",
  222. "type": "get",
  223. "data": {
  224. "professorId": professorId,
  225. "caption": cap,
  226. "rows": 1000
  227. },
  228. "success": function(data) {
  229. if(data.success) {
  230. console.log(data)
  231. $("#areaCon").html("");
  232. var $info = data.data;
  233. $("#subArea").text(cap);
  234. $(".resAreaCover").fadeIn();
  235. $(".resAreaTip").addClass("displayNone")
  236. $(".resAreaCon").show()
  237. if($info.length == 0) {
  238. $(".resAreaCon").hide();
  239. $(".resAreaTip").removeClass("displayNone")
  240. return;
  241. }
  242. var arr=[];
  243. for(var i in $info) {
  244. arr[i]=$info[i].opreteProfessorId;
  245. }
  246. detailPro(arr,"areaCon");
  247. }
  248. }
  249. });
  250. }
  251. var rows = 20,
  252. pageNo = 1,
  253. dataO = {
  254. artPublishTime:"",
  255. artShareId:"",
  256. resPublishTime:"",
  257. resShareId:"",
  258. serModifyTime: "",
  259. serId: "",
  260. patTime:"",
  261. patId:"",
  262. parTime:"",
  263. parId:"",
  264. AnsTime:"",
  265. AnsId:"",
  266. QuTime:"",
  267. QuId:"",
  268. },
  269. watchO={
  270. beiTime:"",
  271. beiProId:"",
  272. watchTime:"",
  273. watchObjId:"",
  274. WATime:"",
  275. WAId:"",
  276. WQTime:"",
  277. WQId:"",
  278. };
  279. var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
  280. $.ajax({
  281. url:url,
  282. dataType: 'json',
  283. type: otype,
  284. data: dataS,
  285. traditional: true,
  286. beforeSend: beforeFun,
  287. success: function(res) {
  288. if(res.success) {
  289. oFun(res)
  290. }
  291. },
  292. complete:completeFun
  293. });
  294. },
  295. insertNodata = function (targetE,newStr) {
  296. var parent = document.getElementById(targetE).parentNode;
  297. var kong = document.createElement("div");
  298. kong.className = "con-kong";
  299. kong.innerHTML ='<div class="picbox picNull"></div>'+
  300. '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
  301. if(newStr){
  302. kong.querySelector(".txtbox").innerHTML = newStr;
  303. }
  304. if (parent.firstChild.className == "con-kong") {
  305. return
  306. } else {
  307. parent.insertBefore(kong,parent.firstChild);
  308. }
  309. },
  310. removeNodata = function (targetE) {
  311. var parent = document.getElementById(targetE).parentNode;
  312. if (parent.firstChild.className == "con-kong") {
  313. parent.removeChild(parent.firstChild);
  314. } else {
  315. return
  316. }
  317. },
  318. getUserInfo=function() {
  319. oAjax("/ajax/professor/info/"+ professorId,{}, "get", function(data){
  320. var $info = data.data;
  321. if($info.hasHeadImage){
  322. $("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
  323. }
  324. $("#proName").text($info.name);
  325. var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
  326. $("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
  327. if($info.address){
  328. $("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
  329. }
  330. var proOther="";
  331. if($info.orgName){
  332. if($info.department){
  333. if($info.office){
  334. proOther = $info.orgName + "," + $info.department + "," + $info.office
  335. }else{
  336. proOther = $info.orgName + "," + $info.department
  337. }
  338. }else{
  339. if($info.office){
  340. proOther = $info.orgName +"," + $info.office
  341. }else{
  342. proOther = $info.orgName
  343. }
  344. }
  345. }else{
  346. if($info.department){
  347. if($info.office){
  348. proOther = $info.department + "," + $info.office
  349. }else{
  350. proOther = $info.department
  351. }
  352. }else{
  353. if($info.office){
  354. proOther = $info.office
  355. }
  356. }
  357. }
  358. $("#proOther").text(proOther);
  359. var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
  360. if($info.title){
  361. $("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
  362. llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
  363. }
  364. document.title = llqtitle;
  365. //主页浏览量
  366. $("#viewNums").text($info.pageViews);
  367. //个人简介
  368. if($info.descp) {
  369. $("#descpS").parents(".coninfobox").removeClass("displayNone");
  370. $("#item1user>.nodatabox").addClass("displayNone");
  371. $("#descpS").text($info.descp);
  372. }
  373. //学术领域
  374. if($info.subject) {
  375. $("#subjectShow").parents(".coninfobox").removeClass("displayNone");
  376. $("#item1user>.nodatabox").addClass("displayNone");
  377. subjectShow($info.subject);
  378. }
  379. //研究方向
  380. if($info.researchAreas.length) {
  381. $("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
  382. $("#item1user>.nodatabox").addClass("displayNone");
  383. researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
  384. }
  385. //行业领域
  386. if($info.industry) {
  387. $("#industryShow").parents(".coninfobox").removeClass("displayNone");
  388. $("#item1user>.nodatabox").addClass("displayNone");
  389. industryShow($info.industry);
  390. }
  391. //教育背景
  392. if($info.edus.length) {
  393. eduBgShow($info.edus);
  394. } else {
  395. $("#eduBgShow").parents(".coninfobox").hide();
  396. }
  397. //兼职
  398. if($info.jobs.length) {
  399. timeJobShow($info.jobs);
  400. } else {
  401. $("#timeJobShow").parents(".coninfobox").hide();
  402. }
  403. //项目
  404. if($info.projects.length) {
  405. projectShow($info.projects)
  406. } else {
  407. $("#projectShow").parents(".coninfobox").hide();
  408. }
  409. //荣誉
  410. if($info.honors.length) {
  411. honorShow($info.honors);
  412. } else {
  413. $("#honorShow").parents(".coninfobox").hide();
  414. }
  415. if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
  416. $("#item7user>.nodatabox").show();
  417. $("#item7user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
  418. }
  419. var weibotitle = $info.name;
  420. var weibourl = window.location.href;
  421. var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
  422. $("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
  423. });
  424. },
  425. teamListVal=function(isbind) {
  426. var aimId="proTeam",aimIdF="showTeam",newStr="用户暂无专家团队"
  427. oAjax("/ajax/team/myTeam",{
  428. professor: professorId,
  429. status: 3,
  430. pageSize: rows,
  431. pageNo: pageNo
  432. }, "get", function(res){
  433. var $info = res.data.data;
  434. if($info.length > 0) {
  435. $("#"+aimId).show()
  436. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  437. if(userid!=professorId){
  438. $("#"+aimIdF).parents(".conItem").removeClass("displayNone");
  439. }
  440. for(var i = 0; i < $info.length; i++) {
  441. var itemlist = '<li>';
  442. itemlist += '<a target="_blank" href="teamInfoShow.html?id='+$info[i].id+'" class="flexCenter urlgo" style="min-height:60px;">';
  443. itemlist += '<div class="madiaInfo" style="padding-left:0">';
  444. itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].name+' <small> 团队人数 <span class="teamMembers"></span>人</small></p>';
  445. itemlist += '<div class="h2Font clearfix">';
  446. itemlist += '<span>' + $info[i].city + '</span>';
  447. itemlist += ' <span>' + $info[i].orgName + '</span>'
  448. itemlist += '</div></div>';
  449. itemlist += '</a></li>';
  450. var $itemlist = $(itemlist);
  451. $("#"+aimId).append($itemlist)
  452. teamProCount($info[i].id, $itemlist)
  453. if(isbind && i < 5 && userid!=professorId){
  454. var $itemlist = $(itemlist);
  455. $("#"+aimIdF).append($itemlist);
  456. teamProCount($info[i].id, $itemlist)
  457. }
  458. }
  459. }
  460. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  461. removeNodata(aimId);
  462. if($info.length == 0 && liLen == 0 ){
  463. $("#"+aimId).hide()
  464. insertNodata(aimId,newStr);
  465. }
  466. if(isbind){
  467. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  468. pageNo++
  469. teamListVal(false)
  470. })
  471. }
  472. if ($info.length < rows) {
  473. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  474. $("#"+aimId).parent().find(".js-load-more").hide();
  475. }
  476. },function(){
  477. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  478. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  479. },function(){
  480. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  481. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  482. })
  483. },
  484. demandListVal=function(isbind) {
  485. oAjax("/ajax/demand/pq",{
  486. "state":[1],
  487. "uid":professorId,
  488. "pageSize":5
  489. }, "get", function(data){
  490. var $info = data.data.data;
  491. if($info.length > 0){
  492. $("#showDemand").parents(".coninfobox").removeClass("displayNone");
  493. $("#item1user>.nodatabox").addClass("displayNone");
  494. for(var i = 0; i < $info.length; i++) {
  495. var liStr=$("<li></li>").appendTo("#showDemand");
  496. var $data=$info[i];
  497. var sowU="";
  498. if($data.pageViews!=0){
  499. sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
  500. }
  501. var strCon='';
  502. strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
  503. strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
  504. strCon+='<ul class="showliTop h3Font clearfix">'
  505. strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
  506. strCon+= sowU
  507. strCon+='</ul>'
  508. strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
  509. strCon+='<ul class="showli clearfix h3Font">'
  510. if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
  511. if($data.duration!=0){ strCon+='<li>预计周期:'+demandDuration[$data.duration]+'</li>' }
  512. if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
  513. if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
  514. strCon+='</ul>'
  515. strCon+='</a>'
  516. $(strCon).appendTo(liStr);
  517. }
  518. }else{
  519. $("#showDemand").parents(".needinfobox").addClass("displayNone");
  520. }
  521. })
  522. },
  523. articalListVal=function(isbind){
  524. var aimId="proArticel",aimIdF="showArticle",newStr="用户尚未发布任何文章"
  525. oAjax("/ajax/article/publish",{
  526. "category": "1",
  527. "owner":professorId,
  528. "publishTime":dataO.artPublishTime,
  529. "shareId": dataO.artShareId,
  530. "rows": rows
  531. }, "get", function(res){
  532. var $info = res.data;
  533. if($info.length > 0) {
  534. $("#"+aimId).show()
  535. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  536. $("#"+aimIdF).parents(".coninfobox").removeClass("displayNone");
  537. dataO.artPublishTime = $info[$info.length - 1].publishTime;
  538. dataO.artShareId = $info[$info.length - 1].shareId;
  539. for(var i = 0; i < $info.length; i++) {
  540. var sowU="",hasImg="/images/default-artical.jpg"
  541. if($info[i].articleImg) {
  542. hasImg="/data/article/" + $info[i].articleImg
  543. }
  544. if($info[i].pageViews!=0){
  545. if($info[i].articleAgree!=0){
  546. sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li><li><span>赞 '+$info[i].articleAgree+'</span></li>'
  547. }else{
  548. sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li>'
  549. }
  550. }
  551. var itemlist = '<li>';
  552. itemlist += '<a href="/'+pageUrl('a',$info[i])+'" class="flexCenter urlgo">';
  553. itemlist += '<div class="madiaHead artHead" style="background-image:url(' + hasImg + ')"></div>';
  554. itemlist += '<div class="madiaInfo">';
  555. itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].articleTitle+'</p>';
  556. itemlist += '<ul class="h2Font clearfix">';
  557. itemlist += '<li><span class="time">' + commenTime($info[i].publishTime) + '</span></li>';
  558. itemlist += sowU
  559. itemlist += '<li><span class="leaveMsgCount"></span></li>';
  560. itemlist += '</ul></div>';
  561. itemlist += '</a></li>';
  562. var $itemlist = $(itemlist);
  563. $("#"+aimId).append($itemlist)
  564. leaveMsgCount($info[i].articleId,1,$itemlist);
  565. if(isbind && i==0){
  566. var $itemlist = $(itemlist);
  567. $("#"+aimIdF).append($itemlist);
  568. leaveMsgCount($info[0].articleId,1,$itemlist);
  569. }
  570. }
  571. }
  572. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  573. removeNodata(aimId);
  574. if($info.length == 0 && liLen == 0 ){
  575. $("#"+aimId).hide()
  576. insertNodata(aimId,newStr);
  577. }
  578. if(isbind){
  579. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  580. articalListVal(false)
  581. })
  582. }
  583. if ($info.length < rows) {
  584. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  585. $("#"+aimId).parent().find(".js-load-more").hide();
  586. }
  587. },function(){
  588. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  589. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  590. },function(){
  591. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  592. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  593. })
  594. },
  595. resourceListVal=function(isbind){
  596. var aimId="proResource",aimIdF="showResource",newStr="用户尚未发布任何资源"
  597. oAjax("/ajax/resource/publish",{
  598. "category": "1",
  599. "owner":professorId,
  600. "publishTime":dataO.resPublishTime,
  601. "shareId": dataO.resShareId,
  602. "rows": rows
  603. }, "get", function(res){
  604. var $info = res.data;
  605. if($info.length > 0) {
  606. $("#"+aimId).show()
  607. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  608. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  609. $("#"+aimIdF).parents(".coninfobox").show();
  610. dataO.resPublishTime = $info[$info.length - 1].publishTime;
  611. dataO.resShareId = $info[$info.length - 1].shareId;
  612. for(var i = 0; i < $info.length; i++) {
  613. var hasImg='/images/default-resource.jpg'
  614. if($info[i].images.length) {
  615. hasImg="/data/resource/" + $info[i].images[0].imageSrc
  616. }
  617. var itemlist = '<li>';
  618. itemlist += '<a href="resourceShow.html?resourceId=' + $info[i].resourceId + '" class="flexCenter urlgo">';
  619. itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
  620. itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].resourceName + '</p><p class="h2Font ellipsisSty">用途:' + $info[i].supportedServices + '</p></div>';
  621. itemlist += '</a></li>';
  622. var $itemlist = $(itemlist);
  623. $("#"+aimId).append($itemlist)
  624. if(isbind && i==0){
  625. var $itemlist = $(itemlist);
  626. $("#"+aimIdF).append($itemlist);
  627. }
  628. }
  629. }
  630. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  631. removeNodata(aimId);
  632. if($info.length == 0 && liLen == 0 ){
  633. $("#"+aimId).hide()
  634. insertNodata(aimId,newStr);
  635. }
  636. if(isbind){
  637. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  638. resourceListVal(false)
  639. })
  640. }
  641. if ($info.length < rows) {
  642. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  643. $("#"+aimId).parent().find(".js-load-more").hide();
  644. }
  645. },function(){
  646. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  647. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  648. },function(){
  649. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  650. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  651. })
  652. },
  653. serviceListVal=function(isbind){
  654. var aimId="proService",aimIdF="showService",newStr="用户尚未发布任何服务"
  655. oAjax("/ajax/ware/publish",{
  656. "category":"1",
  657. "owner":professorId,
  658. "modifyTime":dataO.serModifyTime,
  659. "rows": rows
  660. }, "get", function(res){
  661. var $info = res.data;
  662. if($info.length > 0) {
  663. $("#"+aimId).show()
  664. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  665. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  666. $("#"+aimIdF).parents(".coninfobox").show();
  667. dataO.serModifyTime = $info[$info.length - 1].modifyTime;
  668. for(var i = 0; i < $info.length; i++) {
  669. var cnt="", hasImg="../images/default-service.jpg";
  670. if($info[i].cnt) {
  671. cnt = "内容:" + $info[i].cnt
  672. }
  673. if($info[i].images) {
  674. var subs = strToAry($info[i].images)
  675. if(subs.length > 0) {
  676. hasImg="/data/ware" + subs[0]
  677. }
  678. }
  679. var itemlist = '<li>';
  680. itemlist += '<a href="sevriceShow.html?sevriceId=' + $info[i].id + '" class="flexCenter urlgo">';
  681. itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
  682. itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
  683. itemlist += '</a></li>';
  684. var $itemlist = $(itemlist);
  685. $("#"+aimId).append($itemlist)
  686. if(isbind && i==0){
  687. var $itemlist = $(itemlist);
  688. $("#"+aimIdF).append($itemlist);
  689. }
  690. }
  691. }
  692. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  693. removeNodata(aimId);
  694. if($info.length == 0 && liLen == 0 ){
  695. $("#"+aimId).hide()
  696. insertNodata(aimId,newStr);
  697. }
  698. if(isbind){
  699. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  700. serviceListVal(false)
  701. })
  702. }
  703. if ($info.length < rows) {
  704. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  705. $("#"+aimId).parent().find(".js-load-more").hide();
  706. }
  707. },function(){
  708. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  709. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  710. },function(){
  711. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  712. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  713. })
  714. },
  715. unPatentListVal=function(isbind) {
  716. var aimId="proUnPatent",newStr="用户尚未参与任何非专利成果的研究"
  717. oAjax("/ajax/resResult/pq/researcher",{
  718. id: professorId,
  719. status: ['1'],
  720. pageSize: rows,
  721. pageNo: pageNo
  722. }, "get", function(res){
  723. var $info = res.data.data;
  724. if($info.length > 0) {
  725. $("#"+aimId).show()
  726. for(var i = 0; i < $info.length; i++) {
  727. var resIM='<div class="madiaHead patentHead"></div>'
  728. if ($info[i].pic) {
  729. var src = '/data/researchResult' + $info[i].pic.split(",")[0]
  730. resIM = '<div class="madiaHead patentHead" style="background-image:url('+ src +')"></div>';
  731. }
  732. var itemlist = '<li>';
  733. itemlist += '<a target="_blank" href="unPatentShow.html?id='+$info[i].id+'" class="flexCenter urlgo">';
  734. itemlist += resIM
  735. itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ $info[i].name +'</p>';
  736. itemlist += '<p class="h2Font ellipsisSty displayNone">研究者:<span class="researchers"></span></p>';
  737. if ($info[i].orgId){
  738. itemlist += '<p class="h2Font ellipsisSty">所属机构:<span class="resOrgName"></span></p>';
  739. }
  740. itemlist += '</div>';
  741. itemlist += '</a></li>';
  742. var $itemlist = $(itemlist);
  743. $("#"+aimId).append($itemlist)
  744. queryResearcher($info[i].id, $itemlist)
  745. if ($info[i].orgId) {
  746. queryReseOrgName($info[i].orgId, $itemlist)
  747. }
  748. }
  749. }
  750. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  751. removeNodata(aimId);
  752. if($info.length == 0 && liLen == 0 ){
  753. $("#"+aimId).hide()
  754. insertNodata(aimId,newStr);
  755. }
  756. if(isbind){
  757. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  758. pageNo++
  759. unPatentListVal(false)
  760. })
  761. }
  762. if ($info.length < rows) {
  763. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  764. $("#"+aimId).parent().find(".js-load-more").hide();
  765. }
  766. },function(){
  767. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  768. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  769. },function(){
  770. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  771. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  772. })
  773. },
  774. patentListVal=function(isbind){
  775. var aimId="proPatent",aimIdF="showPatent",newStr="用户尚未发布任何专利"
  776. oAjax("/ajax/ppatent/professor",{
  777. "owner":professorId,
  778. "assTime":dataO.patTime,
  779. "id":dataO.patId,
  780. "rows": rows
  781. }, "get", function(res){
  782. var $info = res.data;
  783. if($info.length > 0) {
  784. $("#"+aimId).show()
  785. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  786. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  787. $("#"+aimIdF).parents(".coninfobox").show();
  788. dataO.patTime = $info[$info.length - 1].assTime;
  789. dataO.patId = $info[$info.length - 1].id;
  790. for(var i = 0; i < $info.length; i++) {
  791. var dataStr= $info
  792. if(!dataStr[i].reqPerson){
  793. dataStr[i].reqPerson="";
  794. }
  795. var strAdd = '';
  796. strAdd += '<li><a target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
  797. strAdd += '<div class="madiaHead patentHead"></div>';
  798. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  799. strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  800. strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
  801. strAdd += '</div>';
  802. strAdd += '</a></li>';
  803. var $itemlist = $(strAdd);
  804. $("#"+aimId).append($itemlist)
  805. if(isbind && i==0){
  806. var $itemlist = $(strAdd);
  807. $("#"+aimIdF).append($itemlist);
  808. }
  809. }
  810. }
  811. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  812. removeNodata(aimId);
  813. if($info.length == 0 && liLen == 0 ){
  814. $("#"+aimId).hide()
  815. insertNodata(aimId,newStr);
  816. }
  817. if(isbind){
  818. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  819. patentListVal(false)
  820. })
  821. }
  822. if ($info.length < rows) {
  823. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  824. $("#"+aimId).parent().find(".js-load-more").hide();
  825. }
  826. },function(){
  827. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  828. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  829. },function(){
  830. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  831. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  832. })
  833. },
  834. paperListVal=function(isbind){ //找论文
  835. var aimId="proPaper",aimIdF="showPaper",newStr="用户尚未发布任何论文"
  836. oAjax("/ajax/ppaper/professor",{
  837. "owner":professorId,
  838. "assTime":dataO.parTime,
  839. "id":dataO.parId,
  840. "rows": rows
  841. }, "get", function(res){
  842. var $info = res.data;
  843. console.log($info)
  844. if($info.length > 0) {
  845. $("#"+aimId).show()
  846. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  847. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  848. $("#"+aimIdF).parents(".coninfobox").show();
  849. dataO.parTime = $info[$info.length - 1].assTime;
  850. dataO.parId = $info[$info.length - 1].id;
  851. for(var i = 0; i < $info.length; i++) {
  852. var dataStr= $info
  853. var moreInf=""
  854. if(!dataStr[i].cn4periodical){
  855. dataStr[i].cn4periodical="";
  856. }
  857. if(!dataStr[i].en4periodical){
  858. dataStr[i].en4periodical="";
  859. }
  860. if(!dataStr[i].pubDay){
  861. dataStr[i].pubDay="";
  862. }
  863. moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
  864. var strAdd = '';
  865. strAdd += '<li><a target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
  866. strAdd += '<div class="madiaHead paperHead"></div>';
  867. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  868. strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  869. strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
  870. strAdd += '</div>';
  871. strAdd += '</a></li>';
  872. var $itemlist = $(strAdd);
  873. $("#"+aimId).append($itemlist)
  874. if(isbind && i==0){
  875. var $itemlist = $(strAdd);
  876. $("#"+aimIdF).append($itemlist);
  877. }
  878. }
  879. }
  880. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  881. removeNodata(aimId);
  882. if($info.length == 0 && liLen == 0 ){
  883. $("#"+aimId).hide()
  884. insertNodata(aimId,newStr);
  885. }
  886. if(isbind){
  887. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  888. paperListVal(false)
  889. })
  890. }
  891. if ($info.length < rows) {
  892. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  893. $("#"+aimId).parent().find(".js-load-more").hide();
  894. }
  895. },function(){
  896. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  897. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  898. },function(){
  899. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  900. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  901. })
  902. },
  903. answerListVal=function(isbind){//获取问答
  904. var aimId="proA",aimIdF="showAnswer",newStr="用户尚未任何回答"
  905. oAjax("/ajax/question/answer/bySelf",{
  906. "time":dataO.AnsTime,
  907. "id":dataO.AnsId,
  908. "uid":professorId,
  909. "rows":rows
  910. }, "get", function(res){
  911. var $info = res.data;
  912. if($info.length > 0) {
  913. $("#"+aimId).show()
  914. $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
  915. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  916. $("#"+aimIdF).parents(".coninfobox").show();
  917. dataO.AnsTime = $info[$info.length - 1].createTime;
  918. dataO.AnsId = $info[$info.length - 1].id;
  919. for(var i = 0; i < $info.length; i++) {
  920. var listLi = $('<li>')
  921. listLi.appendTo($("#"+aimId));
  922. detailAnswer($info[i], listLi);
  923. if(isbind && i==0){
  924. var li = listLi.clone();
  925. li.appendTo($("#"+aimIdF));
  926. questioninfo($info[i].qid, li);
  927. proinfo($info[i].uid, li);
  928. leaveMsgCount($info[i].id,4, li);
  929. }
  930. }
  931. }
  932. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  933. removeNodata(aimId);
  934. if($info.length == 0 && liLen == 0 ){
  935. $("#"+aimId).hide()
  936. insertNodata(aimId,newStr);
  937. }
  938. if(isbind){
  939. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  940. answerListVal(false)
  941. })
  942. }
  943. if ($info.length < rows) {
  944. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  945. $("#"+aimId).parent().find(".js-load-more").hide();
  946. }
  947. },function(){
  948. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  949. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  950. },function(){
  951. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  952. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  953. })
  954. },
  955. questionListVal=function(isbind) {
  956. var aimId="proQ",newStr="用户尚未发布任何问题"
  957. oAjax("/ajax/question/my",{
  958. "uid":professorId,
  959. "time":dataO.QuTime,
  960. "id":dataO.QuId,
  961. "rows":rows,
  962. }, "get", function(res){
  963. var $info = res.data;
  964. if($info.length > 0) {
  965. $("#"+aimId).show()
  966. dataO.QuTime = $info[$info.length - 1].createTime;
  967. dataO.QuId = $info[$info.length - 1].id;
  968. for(var i = 0; i < $info.length; i++) {
  969. var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proQ"));
  970. detailQuestion($info[i], listLi);
  971. if(isbind && i==0){
  972. $("#"+aimId).html();
  973. }
  974. }
  975. }
  976. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  977. removeNodata(aimId);
  978. if($info.length == 0 && liLen == 0 ){
  979. $("#"+aimId).hide()
  980. insertNodata(aimId,newStr);
  981. }
  982. if(isbind){
  983. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  984. questionListVal(false)
  985. })
  986. }
  987. if ($info.length < rows) {
  988. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  989. $("#"+aimId).parent().find(".js-load-more").hide();
  990. }
  991. },function(){
  992. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  993. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  994. },function(){
  995. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  996. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  997. })
  998. },
  999. relevantarticalList=function(){//相关文章信息
  1000. oAjax("/ajax/article/byAssProfessor",{
  1001. "id":professorId
  1002. }, "get", function(data){
  1003. if(data.data.length>0){
  1004. $("#relateArt").parents(".conBlock").removeClass("displayNone");
  1005. var itemlist = '';
  1006. $("#relateArt").html("");
  1007. for(var i = 0; i < data.data.length; i++) {
  1008. var itemlist = '<li class="flexCenter"><a target="_blank" href="/'+ pageUrl('a',data.data[i]) +'" class="urlgo">';
  1009. itemlist += '<p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+data.data[i].articleTitle+'</p>';
  1010. itemlist += '</a></li>';
  1011. $itemlist = $(itemlist);
  1012. $("#relateArt").append($itemlist);
  1013. }
  1014. }
  1015. });
  1016. },
  1017. likeExperts=function(){//感兴趣
  1018. oAjax("/ajax/professor/ralateProfessors",{
  1019. "professorId":professorId
  1020. }, "get", function(data){
  1021. var lengthT;
  1022. if(data.data.length>5){
  1023. lengthT=5;
  1024. }else{
  1025. lengthT=data.data.length
  1026. }
  1027. for(var i = 0; i < lengthT; i++) {
  1028. var ExpId = data.data[i].id;
  1029. (function(Id){
  1030. oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
  1031. $("#likePro").parents(".conBlock").removeClass("displayNone");
  1032. var itemlist = '<li class="flexCenter"><a target="_blank" href="" class="urlgo">';
  1033. itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
  1034. itemlist += '<div class="madiaInfo">';
  1035. itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
  1036. itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
  1037. itemlist += '</div></a></li>';
  1038. var $itemlist = $(itemlist);
  1039. $("#likePro").append($itemlist);
  1040. if(data.data.title) {
  1041. if(data.data.orgName) {
  1042. $itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
  1043. }else{
  1044. $itemlist.find("#usertitle").text(data.data.title);
  1045. }
  1046. }else{
  1047. if(data.data.office) {
  1048. if(data.data.orgName) {
  1049. $itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
  1050. }else{
  1051. $itemlist.find("#usertitle").text(data.data.office);
  1052. }
  1053. }else{
  1054. if(data.data.orgName) {
  1055. $itemlist.find("#usertitle").text(data.data.orgName);
  1056. }
  1057. }
  1058. }
  1059. $itemlist.find("#userName").text(data.data.name);
  1060. $itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
  1061. if(data.data.hasHeadImage == 1) {
  1062. $itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
  1063. }
  1064. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  1065. $itemlist.find(".authiconNew").attr("title", userType.title);
  1066. $itemlist.find(".authiconNew").addClass(userType.sty);
  1067. })
  1068. })(ExpId)
  1069. }
  1070. });
  1071. },
  1072. relevantExperts=function(){
  1073. oAjax("/ajax/professor/coadjutant",{
  1074. "id":professorId
  1075. }, "get", function(data){
  1076. var lengthT;
  1077. if(data.data.length>5){
  1078. lengthT=5;
  1079. }else{
  1080. lengthT=data.data.length
  1081. }
  1082. for(var i = 0; i < lengthT; i++) {
  1083. var ExpId = data.data[i].professorId;
  1084. var paperN=data.data[i].paperCount;
  1085. var patentN=data.data[i].patentCount;
  1086. (function(Id,numL,numZ){
  1087. oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
  1088. $("#relatePro").parents(".conBlock").removeClass("displayNone");
  1089. var itemlist = '<li class="flexCenter"><a target="_blank" href="" class="urlgo">';
  1090. itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
  1091. itemlist += '<div class="madiaInfo">';
  1092. itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
  1093. itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
  1094. itemlist += '<p class="h2Font ellipsisSty" id="copNum"></p>';
  1095. itemlist += '</div></a></li>';
  1096. var $itemlist = $(itemlist);
  1097. $("#relatePro").append($itemlist);
  1098. if(numL){
  1099. if(numZ){
  1100. $itemlist.find("#copNum").text("合作:"+numZ+"项专利,"+numL+"篇论文")
  1101. }else{
  1102. $itemlist.find("#copNum").text("合作:"+numL+"篇论文")
  1103. }
  1104. }else{
  1105. if(numZ){
  1106. $itemlist.find("#copNum").text("合作:"+numZ+"项专利")
  1107. }else{
  1108. }
  1109. }
  1110. if(data.data.title) {
  1111. if(data.data.orgName) {
  1112. $itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
  1113. }else{
  1114. $itemlist.find("#usertitle").text(data.data.title);
  1115. }
  1116. }else{
  1117. if(data.data.office) {
  1118. if(data.data.orgName) {
  1119. $itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
  1120. }else{
  1121. $itemlist.find("#usertitle").text(data.data.office);
  1122. }
  1123. }else{
  1124. if(data.data.orgName) {
  1125. $itemlist.find("#usertitle").text(data.data.orgName);
  1126. }
  1127. }
  1128. }
  1129. $itemlist.find("#userName").text(data.data.name);
  1130. $itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
  1131. if(data.data.hasHeadImage == 1) {
  1132. $itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
  1133. }
  1134. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  1135. $itemlist.find(".authiconNew").attr("title", userType.title);
  1136. $itemlist.find(".authiconNew").addClass(userType.sty);
  1137. })
  1138. })(ExpId,paperN,patentN)
  1139. }
  1140. });
  1141. },
  1142. isActUser=function(){
  1143. oAjax("/ajax/baseUserInfo",{
  1144. "id": professorId
  1145. }, "get", function(data){
  1146. if(!data.data.activeTime){
  1147. $(".last_meg").removeClass("displayNone");
  1148. $(".message_b").on("click",function(){
  1149. $(".meg_md5").toggle();
  1150. if(data.data.email && data.data.mobilePhone){
  1151. $("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号或邮箱 '+data.data.email);
  1152. }else if(data.data.mobilePhone && !data.data.email){
  1153. $("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号');
  1154. }else if(data.data.email && !data.data.mobilePhone){
  1155. $("#wayTel").text('邮箱 '+data.data.email);
  1156. }
  1157. })
  1158. }else{
  1159. $(".last_meg").addClass("displayNone");
  1160. }
  1161. })
  1162. },
  1163. queryPubCount=function(){
  1164. oAjax("/ajax/watch/countProfessor",{//关注我的
  1165. "id": professorId,
  1166. "type":"1"
  1167. }, "GET", function(data){
  1168. $("#focusMe").text(data.data);
  1169. });
  1170. oAjax("/ajax/watch/countObject",{//我关注的
  1171. "id": professorId,
  1172. "type":"1"
  1173. }, "GET", function(data){
  1174. $("#myFocus").text(data.data);
  1175. });
  1176. oAjax("/ajax/professor/agree/sum",{//总获赞
  1177. "id": professorId,
  1178. }, "GET", function(data){
  1179. $("#agreeMecount").text(data.data);
  1180. });
  1181. oAjax("/ajax/team/count",{//团队总数
  1182. "id": professorId
  1183. }, "GET", function(data){
  1184. if(data.data>0 && data.data<99){
  1185. $("#teamCount").text(data.data);
  1186. }
  1187. if(data.data>99){
  1188. $("#teamCount").text("99+");
  1189. }
  1190. });
  1191. oAjax("/ajax/article/count/publish",{//文章总数
  1192. "owner": professorId,
  1193. "category":"1"
  1194. }, "GET", function(data){
  1195. if(data.data>0 && data.data<99){
  1196. $("#artCount").text(data.data);
  1197. }
  1198. if(data.data>99){
  1199. $("#artCount").text("99+");
  1200. }
  1201. });
  1202. oAjax("/ajax/resource/count/publish",{//资源总数
  1203. "owner": professorId,
  1204. "category":"1"
  1205. }, "GET", function(data){
  1206. if(data.data>0 && data.data<99){
  1207. $("#resCount").text(data.data);
  1208. }
  1209. if(data.data>99){
  1210. $("#resCount").text("99+");
  1211. }
  1212. });
  1213. oAjax("/ajax/ware/count/publish",{//服务总数
  1214. "owner": professorId,
  1215. "category":"1"
  1216. }, "GET", function(data){
  1217. if(data.data>0 && data.data<99){
  1218. $("#serCount").text(data.data);
  1219. }
  1220. if(data.data>99){
  1221. $("#serCount").text("99+");
  1222. }
  1223. });
  1224. oAjax("/ajax/ppatent/count/publish",{//专利总数
  1225. "owner": professorId,
  1226. }, "GET", function(data){
  1227. if(data.data>0 && data.data<99){
  1228. $("#patCount").text(data.data);
  1229. }
  1230. if(data.data>99){
  1231. $("#patCount").text("99+");
  1232. }
  1233. });
  1234. oAjax("/ajax/resResult/count/researcher",{//非专利成果总数
  1235. "id": professorId
  1236. }, "GET", function(data){
  1237. if(data.data>0 && data.data<99){
  1238. $("#unpatCount").text(data.data);
  1239. }
  1240. if(data.data>99){
  1241. $("#unpatCount").text("99+");
  1242. }
  1243. });
  1244. oAjax("/ajax/ppaper/count/publish",{//论文总数
  1245. "owner": professorId,
  1246. }, "GET", function(data){
  1247. if(data.data>0 && data.data<99){
  1248. $("#parCount").text(data.data);
  1249. }
  1250. if(data.data>99){
  1251. $("#parCount").text("99+");
  1252. }
  1253. });
  1254. },
  1255. attentMyself=function(isbind){
  1256. var aimId="attendMy",newStr="用户尚未被任何人关注"
  1257. oAjax("/ajax/watch/watchList",{//关注我的列表
  1258. "watchObject": professorId,
  1259. "createTime": watchO.beiTime,
  1260. "professorId":watchO.beiProId,
  1261. "rows":rows
  1262. }, "GET", function(res){
  1263. console.log(res)
  1264. var $info = res.data;
  1265. if($info.length > 0) {
  1266. $("#"+aimId).show()
  1267. watchO.beiTime = $info[$info.length - 1].createTime;
  1268. watchO.beiProId = $info[$info.length - 1].professorId;
  1269. var arr=[];
  1270. for(var i in $info) {
  1271. arr[i]=$info[i].professorId;
  1272. }
  1273. detailPro(arr,aimId);
  1274. }
  1275. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1276. removeNodata(aimId);
  1277. if($info.length == 0 && liLen == 0 ){
  1278. $("#"+aimId).hide()
  1279. insertNodata(aimId,newStr);
  1280. }
  1281. if(isbind){
  1282. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1283. attentMyself(false)
  1284. })
  1285. }
  1286. if ($info.length < rows) {
  1287. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1288. $("#"+aimId).parent().find(".js-load-more").hide();
  1289. }
  1290. },function(){
  1291. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1292. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1293. },function(){
  1294. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1295. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1296. })
  1297. },
  1298. collectAnswer=function(isbind){
  1299. var aimId="attendAnswer",newStr="用户还未收藏任何回答"
  1300. oAjax("/ajax/question/answer/byWatch",{
  1301. "time":watchO.WATime,
  1302. "id":watchO.WAId,
  1303. "uid":professorId,
  1304. "rows":rows
  1305. }, "get", function(res){
  1306. var $info = res.data;
  1307. if($info.length > 0) {
  1308. $("#"+aimId).show()
  1309. watchO.WATime = $info[$info.length - 1].createTime;
  1310. watchO.WAId = $info[$info.length - 1].id;
  1311. for(var i = 0; i < $info.length; i++) {
  1312. var listLi = $('<li>')
  1313. listLi.appendTo($("#"+aimId));
  1314. detailAnswer($info[i], listLi);
  1315. }
  1316. }
  1317. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1318. removeNodata(aimId);
  1319. if($info.length == 0 && liLen == 0 ){
  1320. $("#"+aimId).hide()
  1321. insertNodata(aimId,newStr);
  1322. }
  1323. if(isbind){
  1324. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1325. collectAnswer(false)
  1326. })
  1327. }
  1328. if ($info.length < rows) {
  1329. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1330. $("#"+aimId).parent().find(".js-load-more").hide();
  1331. }
  1332. },function(){
  1333. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1334. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1335. },function(){
  1336. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1337. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1338. })
  1339. },
  1340. collectQuestion=function(isbind){
  1341. var aimId="attendQuestion",newStr="用户还未关注任何问题"
  1342. oAjax("/ajax/question/watch",{
  1343. "time":watchO.WQTime,
  1344. "id":watchO.WQId,
  1345. "uid":professorId,
  1346. "rows":rows
  1347. }, "get", function(res){
  1348. var $info = res.data;
  1349. if($info.length > 0) {
  1350. $("#"+aimId).show()
  1351. watchO.WQTime = $info[$info.length - 1].createTime;
  1352. watchO.WQId = $info[$info.length - 1].id;
  1353. for(var i = 0; i < $info.length; i++) {
  1354. var listLi = $('<li>')
  1355. listLi.appendTo($("#"+aimId));
  1356. detailQuestion($info[i], listLi);
  1357. }
  1358. }
  1359. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1360. removeNodata(aimId);
  1361. if($info.length == 0 && liLen == 0 ){
  1362. $("#"+aimId).hide()
  1363. insertNodata(aimId,newStr);
  1364. }
  1365. if(isbind){
  1366. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1367. collectQuestion(false)
  1368. })
  1369. }
  1370. if ($info.length < rows) {
  1371. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1372. $("#"+aimId).parent().find(".js-load-more").hide();
  1373. }
  1374. },function(){
  1375. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1376. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1377. },function(){
  1378. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1379. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1380. })
  1381. },
  1382. collectSorts=function(type,isbind){
  1383. var aimId="",newStr=""
  1384. oAjax("/ajax/watch/proList",{//我关注的列表
  1385. "professorId": professorId,
  1386. "watchType":type,
  1387. "createTime": watchO.watchTime,
  1388. "watchObject":watchO.watchObjId,
  1389. "rows":rows
  1390. }, "GET", function(res){
  1391. var $info = res.data;
  1392. var arr=[];
  1393. if($info.length > 0) {
  1394. $("#"+aimId).show()
  1395. watchO.watchTime = $info[$info.length - 1].createTime;
  1396. watchO.watchObjId = $info[$info.length - 1].watchObject;
  1397. for(var i in $info) {
  1398. arr[i]=$info[i].watchObject;
  1399. }
  1400. }
  1401. if(type==1){
  1402. aimId="attendPro"
  1403. newStr="用户还未关注任何专家"
  1404. detailPro(arr,aimId);
  1405. }else if(type==2){
  1406. aimId="attendRes"
  1407. newStr="用户还未收藏任何资源"
  1408. detailRes(arr,aimId);
  1409. }else if(type==3){
  1410. aimId="attendArt"
  1411. newStr="用户还未收藏任何文章"
  1412. detailArt(arr,aimId);
  1413. }else if(type==4){
  1414. aimId="attendPatent"
  1415. newStr="用户还未收藏任何专利成果"
  1416. detailPat(arr,aimId);
  1417. }else if(type==5){
  1418. aimId="attendPaper"
  1419. newStr="用户还未收藏任何论文"
  1420. detailPer(arr,aimId);
  1421. }else if(type==6){
  1422. aimId="attendCmp"
  1423. newStr="用户还未关注任何企业"
  1424. detailCmp(arr,aimId);
  1425. }else if(type==7){
  1426. aimId="attendDemand"
  1427. newStr="用户还未收藏任何需求"
  1428. detailDemand(arr,aimId);
  1429. }else if(type==10){
  1430. aimId="attendSer"
  1431. newStr="用户还未收藏任何服务"
  1432. detailService(arr,aimId);
  1433. }else if(type==11){
  1434. aimId="attendProduct"
  1435. newStr="用户还未收藏任何产品"
  1436. detailProduct(arr,aimId);
  1437. }
  1438. else if(type==12){
  1439. aimId="attendUnPatent"
  1440. newStr="用户还未收藏任何非专利成果"
  1441. detailUnPat(arr,aimId);
  1442. }else if(type==13){
  1443. aimId="attendTeam"
  1444. newStr="用户还未关注任何团队"
  1445. detailTeam(arr,aimId);
  1446. }
  1447. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1448. removeNodata(aimId);
  1449. if($info.length == 0 && liLen == 0 ){
  1450. $("#"+aimId).hide()
  1451. insertNodata(aimId,newStr);
  1452. }
  1453. if(isbind){
  1454. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1455. collectSorts(type,false)
  1456. })
  1457. }
  1458. if ($info.length < rows) {
  1459. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1460. $("#"+aimId).parent().find(".js-load-more").hide();
  1461. }
  1462. },function(){
  1463. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1464. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1465. },function(){
  1466. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1467. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1468. })
  1469. },
  1470. detailTeam=function(arr,obj) {
  1471. oAjax("/ajax/team/qm",{
  1472. id:arr,
  1473. },"get",function(data){
  1474. var dataStr=data.data;
  1475. for(var i =0; i< dataStr.length; ++i){
  1476. var li = document.createElement("li");
  1477. li.className = "mui-table-view-cell";
  1478. var strAdd = '';
  1479. strAdd += '<a target="_blank" href="teamInforShow.html?id='+ dataStr[i].id +'" class="flexCenter urlgo">';
  1480. strAdd += '<div class="madiaInfo" style="padding-left:0"><p class="h1Font ellipsisSty">' + dataStr[i].name + '</span> <small> 团队人数 <span class="teamMembers"></span>人</small></p>';
  1481. strAdd += '<p class="h2Font ellipsisSty">' + dataStr[i].city +' '+ dataStr[i].orgName + '</p>';
  1482. strAdd += '</div>';
  1483. strAdd += '</a>'
  1484. var $itemlist = $(strAdd);
  1485. $("#"+obj).append($itemlist);
  1486. teamProCount(dataStr[i].id, $itemlist)
  1487. }
  1488. });
  1489. },
  1490. teamProCount=function (id, $list) {
  1491. oAjax("/ajax/team/pro/count",{
  1492. "id": id
  1493. }, 'get', function($data) {
  1494. $list.find('.teamMembers').html($data.data)
  1495. })
  1496. },
  1497. detailPro=function(arr,obj) {
  1498. oAjax("/ajax/professor/qm",{
  1499. id:arr,
  1500. },"get",function(data){
  1501. var dataStr=data.data;
  1502. for(var i = 0; i < dataStr.length; i++) {
  1503. var li = document.createElement("li");
  1504. li.className = "mui-table-view-cell";
  1505. var userType = autho(dataStr[i].authType, dataStr[i].orgAuth, dataStr[i].authStatus);
  1506. var os = "";
  1507. if(dataStr[i].title) {
  1508. if(dataStr[i].orgName) {
  1509. os = dataStr[i].title + "," + dataStr[i].orgName;
  1510. } else {
  1511. os = dataStr[i].title;
  1512. }
  1513. } else {
  1514. if(dataStr[i].office) {
  1515. if(dataStr[i].orgName) {
  1516. os = dataStr[i].office + "," + dataStr[i].orgName;
  1517. } else {
  1518. os = dataStr[i].office;
  1519. }
  1520. } else {
  1521. if(dataStr[i].orgName) {
  1522. os = dataStr[i].orgName;
  1523. }
  1524. }
  1525. }
  1526. var baImg = "../images/default-photo.jpg";
  1527. if(dataStr[i].hasHeadImage == 1) {
  1528. baImg = "/images/head/" + dataStr[i].id + "_l.jpg";
  1529. }
  1530. var strAdd = '';
  1531. strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ dataStr[i].id +'" class="flexCenter urlgo">';
  1532. strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
  1533. strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + dataStr[i].name + '</span><em class="authicon ' + userType.sty + '" title="'+userType.title+'"></em></p>';
  1534. strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
  1535. strAdd += '</div>';
  1536. strAdd += '</a>'
  1537. li.innerHTML = strAdd
  1538. document.getElementById(obj).appendChild(li);
  1539. }
  1540. });
  1541. },
  1542. detailCmp=function(arr,obj) {
  1543. oAjax("/ajax/org/qm",{
  1544. id:arr,
  1545. },"get",function(data){
  1546. var dataStr=data.data;
  1547. for(var i = 0; i < dataStr.length; i++) {
  1548. var li = document.createElement("li");
  1549. li.setAttribute("data-id", dataStr[i].id);
  1550. var oimg = (dataStr[i].hasOrgLogo) ?"/images/org/" + dataStr[i].id + ".jpg" : "../images/default-icon.jpg";
  1551. var oAuth = (dataStr[i].authStatus == 3) ? 'authicon-com-ok' : '';
  1552. var orgName = (dataStr[i].forShort) ? dataStr[i].forShort : dataStr[i].name;
  1553. var orgType = (dataStr[i].orgType == '2') ? "上市企业" : "";
  1554. var orgOther = (dataStr[i].industry) ? dataStr[i].industry.replace(/,/gi, " | ") : "";
  1555. li.className = "mui-table-view-cell";
  1556. var itemlist=''
  1557. itemlist += '<a class="flexCenter" target="_blank" href="cmpInforShow.html?orgId='+dataStr[i].id+'"><div class="madiaHead cmpHead">';
  1558. itemlist += '<div class="boxBlock"><img class="boxBlockimg" src="' + oimg + '"></div></div>';
  1559. itemlist += '<div class="madiaInfo">';
  1560. itemlist += '<p class="h1Font"><span>' + orgName + '</span><em class="authiconNew ' + oAuth + '" title="科袖认证企业"></em></p>';
  1561. itemlist += '<p class="h2Font ellipsisSty"><span>' + orgType + '</span> <span>' + orgOther + '</span></p>';
  1562. itemlist += '</div></a>';
  1563. li.innerHTML = itemlist
  1564. document.getElementById(obj).appendChild(li);
  1565. }
  1566. });
  1567. },
  1568. detailPat=function(arr,obj) {
  1569. oAjax("/ajax/ppatent/qm",{
  1570. id:arr,
  1571. },"get",function(data){
  1572. var dataStr=data.data;
  1573. for(var i = 0; i < dataStr.length; i++) {
  1574. var li = document.createElement("li");
  1575. li.className = "mui-table-view-cell";
  1576. var strAdd = '';
  1577. strAdd += '<a target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
  1578. strAdd += '<div class="madiaHead patentHead"></div>';
  1579. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  1580. strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  1581. strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
  1582. strAdd += '</div>';
  1583. strAdd += '</a>';
  1584. li.innerHTML = strAdd
  1585. document.getElementById(obj).appendChild(li);
  1586. }
  1587. });
  1588. },
  1589. detailUnPat=function(arr,obj) {
  1590. oAjax("/ajax/resResult/qm",{
  1591. id:arr,
  1592. },"get",function(data){
  1593. var dataStr=data.data;
  1594. for(var i = 0; i < dataStr.length; i++) {
  1595. var li = document.createElement("li");
  1596. li.className = "mui-table-view-cell";
  1597. var resIM='<div class="madiaHead patentHead"></div>'
  1598. if (dataStr[i].pic) {
  1599. var src = '/data/researchResult' + dataStr[i].pic.split(",")[0]
  1600. resIM = '<div class="madiaHead patentHead" style="background-image:url('+ src +')"></div>';
  1601. }
  1602. var strAdd = '';
  1603. strAdd += '<a target="_blank" href="unPatentShow.html?id='+dataStr[i].id+'" class="flexCenter urlgo">';
  1604. strAdd += resIM
  1605. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  1606. strAdd += '<p class="h2Font ellipsisSty displayNone">研究者:<span class="researchers"></span></p>';
  1607. if (dataStr[i].orgId){
  1608. strAdd += '<p class="h2Font ellipsisSty">所属机构:<span class="resOrgName"></span></p>';
  1609. }
  1610. strAdd += '</div>';
  1611. strAdd += '</a>';
  1612. li.innerHTML = strAdd
  1613. document.getElementById(obj).appendChild(li);
  1614. var $itemlist = $(li);
  1615. queryResearcher(dataStr[i].id, $itemlist)
  1616. if (dataStr[i].orgId) {
  1617. queryReseOrgName(dataStr[i].orgId, $itemlist)
  1618. }
  1619. }
  1620. });
  1621. },
  1622. queryResearcher = function (id, $list) {
  1623. if (id) {
  1624. oAjax("/ajax/resResult/researcher",{
  1625. "id": id
  1626. }, 'get', function($data) {
  1627. var arr = []
  1628. if($data.data.length) {
  1629. $list.find('.researchers').parent().removeClass('displayNone')
  1630. for (var i = 0; i < $data.data.length;i++) {
  1631. arr.push($data.data[i].name)
  1632. }
  1633. $list.find('.researchers').html(arr.join(','))
  1634. }
  1635. })
  1636. }
  1637. },
  1638. queryReseOrgName = function (id, $list) {
  1639. if (id) {
  1640. cacheModel.getCompany(id,function(sc,value){
  1641. if(sc){
  1642. if(value.forShort){
  1643. $list.find(".resOrgName").html(value.forShort)
  1644. }else{
  1645. $list.find(".resOrgName").html(value.name)
  1646. }
  1647. }
  1648. })
  1649. }
  1650. },
  1651. detailPer=function(arr,obj) {
  1652. oAjax("/ajax/ppaper/qm",{ //论文
  1653. id:arr,
  1654. },"get",function(data){
  1655. var dataStr=data.data;
  1656. console.log(dataStr)
  1657. for(var i = 0; i < dataStr.length; i++) {
  1658. var moreInf=""
  1659. if(!dataStr[i].cn4periodical){
  1660. dataStr[i].cn4periodical="";
  1661. }
  1662. if(!dataStr[i].en4periodical){
  1663. dataStr[i].en4periodical="";
  1664. }
  1665. if(!dataStr[i].pubDay){
  1666. dataStr[i].pubDay="";
  1667. }
  1668. moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
  1669. var li = document.createElement("li");
  1670. li.className = "mui-table-view-cell";
  1671. var strAdd = '';
  1672. strAdd += '<a target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
  1673. strAdd += '<div class="madiaHead paperHead"></div>';
  1674. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  1675. strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  1676. strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
  1677. strAdd += '</div>';
  1678. strAdd += '</a>';
  1679. li.innerHTML = strAdd
  1680. document.getElementById(obj).appendChild(li);
  1681. }
  1682. });
  1683. },
  1684. detailRes=function(arr,obj) {
  1685. oAjax("/ajax/resource/qm",{
  1686. id:arr,
  1687. },"get",function(data){
  1688. console.log(data)
  1689. var dataItem=data.data;
  1690. for(var i = 0; i < dataItem.length; i++) {
  1691. var dataStr=dataItem[i]
  1692. var rImg = "../images/default-resource.jpg";
  1693. if(dataStr.images.length) {
  1694. rImg = "/data/resource/" + dataStr.images[0].imageSrc;
  1695. }
  1696. var li = document.createElement("li");
  1697. li.className = "mui-table-view-cell";
  1698. var strAdd = '';
  1699. strAdd += '<a target="_blank" href="resourceShow.html?resourceId='+ dataStr.resourceId +'" class="flexCenter urlgo">';
  1700. strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
  1701. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.resourceName +'</p>';
  1702. strAdd += '<p class="h1Font ellipsisSty"><span class="ownerName"></span><em class="authiconNew ownerSty"></em></p>';
  1703. strAdd += '<p class="h2Font ellipsisSty-2">用途:'+ dataStr.supportedServices+'</p></div>';
  1704. strAdd += '</a>';
  1705. li.innerHTML =strAdd
  1706. var $itemlist = $(li);
  1707. document.getElementById(obj).appendChild(li);
  1708. if(dataStr.resourceType=="1"){
  1709. (function(mo){
  1710. cacheModel.getProfessor(dataStr.professorId,function(sc,value){
  1711. if(sc){
  1712. mo.find(".ownerName").html(value.name)
  1713. var userType = autho(value.authType, value.orgAuth, value.authStatus);
  1714. mo.find(".ownerSty").addClass(userType.sty).attr("title",userType.title)
  1715. }else{
  1716. console.log("error")
  1717. }
  1718. })
  1719. })($itemlist);
  1720. }else if(dataStr.resourceType=="2"){
  1721. (function(mo){
  1722. cacheModel.getCompany(dataStr.orgId,function(sc,value){
  1723. if(sc){
  1724. if(value.forShort){
  1725. mo.find(".ownerName").html(value.forShort)
  1726. }else{
  1727. mo.find(".ownerName").html(value.name)
  1728. }
  1729. if(value.authStatus==3) {
  1730. mo.find(".ownerSty").addClass("authicon-com-ok").attr("title","科袖认证企业")
  1731. }
  1732. }else{
  1733. console.log("error")
  1734. }
  1735. })
  1736. })($itemlist);
  1737. }
  1738. }
  1739. });
  1740. },
  1741. detailArt=function (arr,obj) {
  1742. oAjax("/ajax/article/qm",{
  1743. id:arr,
  1744. },"get",function(data){
  1745. var dataStr=data.data;
  1746. for(var i = 0; i < dataStr.length; i++) {
  1747. var dataItem=dataStr[i]
  1748. var arImg = "../images/default-artical.jpg";
  1749. if(dataItem.articleImg) {
  1750. arImg ="/data/article/" + dataItem.articleImg
  1751. }
  1752. var li = document.createElement("li");
  1753. li.className = "mui-table-view-cell";
  1754. var strAdd = '';
  1755. strAdd += '<a target="_blank" href="/'+ pageUrl('a',dataItem) +'" class="flexCenter urlgo">';
  1756. strAdd += '<div class="madiaHead artHead" style="background-image:url('+ arImg +')"></div>';
  1757. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataItem.articleTitle +'</p>';
  1758. strAdd += '<ul class="h2Font clearfix">';
  1759. strAdd += '<li><span class="ownerName"></span></li>';
  1760. strAdd += '<li><span class="time">'+ commenTime(dataItem.publishTime) +'</span></li>';
  1761. strAdd += '<li><span class="comment"></span></li>';
  1762. strAdd += '</ul></div>';
  1763. strAdd += '</a>';
  1764. li.innerHTML =strAdd
  1765. var $itemlist = $(li);
  1766. document.getElementById(obj).appendChild(li);
  1767. if(dataItem.articleType=="1"){
  1768. (function(mo){
  1769. cacheModel.getProfessor(dataItem.ownerId,function(sc,value){
  1770. if(sc){
  1771. mo.find(".ownerName").html(value.name)
  1772. }else{
  1773. console.log("error")
  1774. }
  1775. })
  1776. })($itemlist);
  1777. }else if(dataItem.articleType=="2"){
  1778. (function(mo){
  1779. cacheModel.getCompany(dataItem.ownerId,function(sc,value){
  1780. if(sc){
  1781. if(value.forShort){
  1782. mo.find(".ownerName").html(value.forShort)
  1783. }else{
  1784. mo.find(".ownerName").html(value.name)
  1785. }
  1786. }else{
  1787. console.log("error")
  1788. }
  1789. })
  1790. })($itemlist);
  1791. }else if(dataItem.articleType=="3"){
  1792. (function(mo){
  1793. cacheModel.getPlatform(dataItem.ownerId,function(sc,value){
  1794. if(sc){
  1795. mo.find(".ownerName").html(value.name)
  1796. }else{
  1797. console.log("error")
  1798. }
  1799. })
  1800. })($itemlist);
  1801. }
  1802. }
  1803. });
  1804. },
  1805. detailDemand=function(arr,obj) {
  1806. oAjax("/ajax/demand/qm",{
  1807. id:arr,
  1808. },"get",function(data){
  1809. var dataStr=data.data;
  1810. for(var i = 0; i < dataStr.length; i++) {
  1811. var li = document.createElement("li");
  1812. li.className = "mui-table-view-cell";
  1813. var strCon='<a target="_blank" href="demandShow.html?demandId='+ dataStr[i].id +'" class="flexCenter urlgo">';
  1814. strCon+='<div class="madiaInfo" style="padding-left:0">'
  1815. strCon+='<p class="h1Font ellipsisSty">'+ dataStr[i].title +'</p>'
  1816. strCon+='<ul class="showli clearfix h3Font">'
  1817. if(dataStr[i].city){ strCon+='<li>'+dataStr[i].city+'</li>' }
  1818. if(dataStr[i].duration!=0){ strCon+='<li>预期 '+demandDuration[dataStr[i].duration]+'</li>' }
  1819. if(dataStr[i].cost!=0){ strCon+='<li>预算 '+demandCost[dataStr[i].cost]+'</li>' }
  1820. if(dataStr[i].invalidDay){ strCon+='<li>有效期至 '+TimeTr(dataStr[i].invalidDay)+'</li>' }
  1821. strCon+='</ul></div></a>'
  1822. li.innerHTML = strCon
  1823. document.getElementById(obj).appendChild(li);
  1824. }
  1825. });
  1826. },
  1827. detailAnswer=function(dataStr,listLi){
  1828. var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.qid+'&topid='+dataStr.id+'">'+
  1829. '<div class="madiaInfo" style="padding-left: 0">' +
  1830. '<div class="ellipsisSty qa-question"></div>' +
  1831. '<div class="flexCenter qa-owner">' +
  1832. '</div>' +
  1833. '<div class="qa-con ellipsisSty-3">' + listConCut(dataStr.cnt) +'</div>' +
  1834. '<div class="showspan">' +
  1835. '<span>'+commenTime(dataStr.createTime)+'</span>' +
  1836. '<span class="agree"></span>' +
  1837. '<span class="leaveMsgCount"></span>' +
  1838. '</div>' +
  1839. '</div></a>';
  1840. var $strAdd = $(strAdd);
  1841. listLi.append( $strAdd);
  1842. if(dataStr.agree > 0) {
  1843. $strAdd.find(".agree").html("赞 "+dataStr.agree);
  1844. }
  1845. questioninfo(dataStr.qid, $strAdd);
  1846. proinfo(dataStr.uid, $strAdd);
  1847. leaveMsgCount(dataStr.id,4, $strAdd);
  1848. },
  1849. detailQuestion=function(dataStr,listLi) {
  1850. var baImg = "../images/default-q&a.jpg";
  1851. var subs = new Array();
  1852. if(dataStr.img) {
  1853. var subs=strToAry(dataStr.img)
  1854. baImg = "/data/question"+ subs[0];
  1855. }
  1856. var hd = "";
  1857. if (dataStr.replyCount > 0) {
  1858. hd = '<li><span>回答 ' + dataStr.replyCount + '</span></li>'
  1859. }
  1860. var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.id+'" class="flexCenter urlgo">'
  1861. strAdd += '<div class="madiaHead qa-Head" style="background-image:url('+ baImg +')"></div>';
  1862. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr.title +'</p>';
  1863. strAdd += '<ul class="h2Font clearfix">'
  1864. strAdd += '<li><span class="time">'+commenTime(dataStr.createTime)+'</span></li><li><span class="qaPageview"></span></li>'+hd+'<li><span class="attendCount"></span></li>'
  1865. strAdd += '</ul></div></a>'
  1866. var $str = $(strAdd);
  1867. listLi.append($str);
  1868. },
  1869. detailService=function(arr,obj) {
  1870. oAjax("/ajax/ware/qm",{
  1871. id:arr,
  1872. },"get",function(data){
  1873. console.log(data)
  1874. var dataItem=data.data;
  1875. for(var i = 0; i < dataItem.length; i++) {
  1876. var dataStr=dataItem[i]
  1877. var li = document.createElement("li");
  1878. li.className = "mui-table-view-cell";
  1879. var cnt="", rImg = "../images/default-service.jpg";
  1880. if(dataStr.images) {
  1881. var subs = strToAry(dataStr.images)
  1882. if(subs.length > 0) {
  1883. rImg="/data/ware" + subs[0]
  1884. }
  1885. }
  1886. if(dataStr.cnt){
  1887. cnt="内容:"+dataStr.cnt
  1888. }
  1889. var strAdd = '';
  1890. strAdd += '<a target="_blank" href="sevriceShow.html?sevriceId='+dataStr.id+'" class="flexCenter urlgo">';
  1891. strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
  1892. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.name +'</p>';
  1893. strAdd += '<p class="h1Font ellipsisSty"><span class="ownerName"></span><em class="authiconNew ownerSty"></em></p>';
  1894. strAdd += '<p class="h2Font ellipsisSty-2">'+ cnt+'</p></div>';
  1895. strAdd += '</a>';
  1896. li.innerHTML = strAdd
  1897. var $itemlist = $(li);
  1898. document.getElementById(obj).appendChild(li);
  1899. if(dataStr.category=="1"){
  1900. (function(mo){
  1901. cacheModel.getProfessor(dataStr.owner,function(sc,value){
  1902. if(sc){
  1903. mo.find(".ownerName").html(value.name)
  1904. var userType = autho(value.authType, value.orgAuth, value.authStatus);
  1905. mo.find(".ownerSty").addClass(userType.sty).attr("title",userType.title)
  1906. }else{
  1907. console.log("error")
  1908. }
  1909. })
  1910. })($itemlist);
  1911. }else if(dataStr.category=="2"){
  1912. (function(mo){
  1913. cacheModel.getCompany(dataStr.owner,function(sc,value){
  1914. if(sc){
  1915. if(value.forShort){
  1916. mo.find(".ownerName").html(value.forShort)
  1917. }else{
  1918. mo.find(".ownerName").html(value.name)
  1919. }
  1920. if(value.authStatus==3) {
  1921. mo.find(".ownerSty").addClass("authicon-com-ok").attr("title","科袖认证企业")
  1922. }
  1923. }else{
  1924. console.log("error")
  1925. }
  1926. })
  1927. })($itemlist);
  1928. }
  1929. }
  1930. });
  1931. },
  1932. detailProduct=function(arr,obj) {
  1933. oAjax("/ajax/product/qm",{
  1934. id:arr,
  1935. },"get",function(data){
  1936. console.log(data)
  1937. var dataItem=data.data;
  1938. for(var i = 0; i < dataItem.length; i++) {
  1939. var dataStr=dataItem[i]
  1940. var li = document.createElement("li");
  1941. li.className = "mui-table-view-cell";
  1942. var cnt="", rImg = "../images/default-product.jpg";
  1943. if(dataStr.images) {
  1944. var subs = strToAry(dataStr.images)
  1945. if(subs.length > 0) {
  1946. rImg="/data/product" + subs[0]
  1947. }
  1948. }
  1949. if(dataStr.cnt){
  1950. cnt="简介:"+dataStr.cnt
  1951. }
  1952. var strAdd = '';
  1953. strAdd += '<a target="_blank" href="productShow.html?productId='+dataStr.id+'" class="flexCenter urlgo">';
  1954. strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
  1955. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.name +'</p>';
  1956. strAdd += '<p class="h1Font ellipsisSty"><span class="ownerName"></span><em class="authiconNew ownerSty"></em></p>';
  1957. strAdd += '<p class="h2Font ellipsisSty-2">'+ cnt+'</p></div>';
  1958. strAdd += '</a>';
  1959. li.innerHTML = strAdd
  1960. var $itemlist = $(li);
  1961. document.getElementById(obj).appendChild(li);
  1962. (function(mo){
  1963. cacheModel.getCompany(dataStr.owner,function(sc,value){
  1964. if(sc){
  1965. if(value.forShort){
  1966. mo.find(".ownerName").html(value.forShort)
  1967. }else{
  1968. mo.find(".ownerName").html(value.name)
  1969. }
  1970. if(value.authStatus==3) {
  1971. mo.find(".ownerSty").addClass("authicon-com-ok").attr("title","科袖认证企业")
  1972. }
  1973. }else{
  1974. console.log("error")
  1975. }
  1976. })
  1977. })($itemlist);
  1978. }
  1979. });
  1980. },
  1981. proinfo=function(pid, $str) {
  1982. oAjax("/ajax/professor/baseInfo/" + pid,{}, "get", function(data){
  1983. var dataStr = data.data
  1984. var baImg = "../images/default-photo.jpg";
  1985. if (dataStr.hasHeadImage == 1) {
  1986. baImg = "/images/head/" + dataStr.id + "_l.jpg";
  1987. }
  1988. var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
  1989. var os = "";
  1990. if (dataStr.title) {
  1991. if (dataStr.orgName) {
  1992. os = dataStr.title + "," + dataStr.orgName;
  1993. } else {
  1994. os = dataStr.title;
  1995. }
  1996. } else {
  1997. if (dataStr.office) {
  1998. if (dataStr.orgName) {
  1999. os = dataStr.office + "," + dataStr.orgName;
  2000. } else {
  2001. os = dataStr.office;
  2002. }
  2003. } else {
  2004. if (dataStr.orgName) {
  2005. os = dataStr.orgName;
  2006. }
  2007. }
  2008. }
  2009. var str = '<div class="owner-head useHead" style="background-image:url(' + baImg + ')"></div>' +
  2010. '<div class="owner-info">' +
  2011. '<div class="owner-name"><span class="h1Font">' + dataStr.name + '</span><em class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></em></div>' +
  2012. '<div class="owner-tit mui-ellipsis h2Font">' + os + '</div>' +
  2013. '</div>'
  2014. $str.find(".qa-owner").html(str)
  2015. });
  2016. },
  2017. questioninfo=function(qid, $str) {
  2018. oAjax("/ajax/question/qo",{
  2019. id:qid
  2020. }, "get", function(data){
  2021. $str.find(".qa-question").html(data.data.title);
  2022. if(data.data.pageViews>0){
  2023. $str.find(".qaPageview").html("阅读量 "+data.data.pageViews);
  2024. }else{
  2025. $str.find(".qaPageview").hide()
  2026. }
  2027. });
  2028. },
  2029. attendCount=function(id, $str) {
  2030. oAjax("/ajax/watch/countProfessor",{
  2031. id:id,
  2032. type: "8"
  2033. }, "get", function(data){
  2034. if(data.data > 0) {
  2035. $str.find(".attendCount").html("关注 "+data.data);
  2036. }
  2037. });
  2038. },
  2039. bindClickFun=function(){
  2040. $("#myAttends").unbind("click").on("click",function(){//关注与收藏
  2041. openAttend()
  2042. })
  2043. $("#tab8user").unbind("click").on("click",function(){//点击更多
  2044. watchO={
  2045. beiTime:"",
  2046. beiProId:"",
  2047. watchTime:"",
  2048. watchObjId:"",
  2049. };
  2050. var pa=$(".moreNavUl.moreBuUl>li.liNow").attr("rel")
  2051. $("#"+pa).find("ul").html("")
  2052. $("#"+pa).find(".js-load-more").show();
  2053. if(userid!=professorId){
  2054. //关注他的人
  2055. $(".moreNavUl.moreBuUl>li.attentType").hide();
  2056. $(".moreNavUl.moreBuUl>li.attendMy").addClass("liNow").text("关注他的人");
  2057. $("#item8drop5").show().siblings().hide();
  2058. attentMyself(true);
  2059. }else{
  2060. $("#item8drop1").show().siblings().hide();
  2061. collectSorts(1,true);
  2062. }
  2063. collectSorts(3,true);
  2064. })
  2065. $("#tab6user").unbind("click").on("click",function(){//点击问答
  2066. dataO = {
  2067. AnsTime:"",
  2068. AnsId:"",
  2069. QuTime:"",
  2070. QuId:"",
  2071. };
  2072. var pa=$(".moreNavUl.wendaUl>li.liNow").attr("rel")
  2073. $("#"+pa).find("ul").html("")
  2074. $("#"+pa).find(".js-load-more").show();
  2075. if(userid!=professorId){
  2076. //他的回答
  2077. $(".moreNavUl.wendaUl>li").eq(0).hide().siblings().addClass("liNow").text("他的回答");
  2078. $("#item6drop2").show().siblings().hide();
  2079. answerListVal(true);
  2080. }else{
  2081. $(".wendaNav li").eq(0).addClass("liNow").siblings().removeClass("liNow");
  2082. $("#item6drop1").show().siblings().hide();
  2083. questionListVal(true);
  2084. }
  2085. })
  2086. $("#item6more").on("click","li",function(){//问答tab切换
  2087. var pa=$(this).attr("rel")
  2088. $("#"+pa).find("ul").html("")
  2089. $("#"+pa).find(".js-load-more").show();
  2090. var sortN=$(this).attr("data-num");
  2091. dataO = {
  2092. AnsTime:"",
  2093. AnsId:"",
  2094. QuTime:"",
  2095. QuId:"",
  2096. };
  2097. if(sortN==1){
  2098. questionListVal(true);
  2099. }else if(sortN==2){
  2100. answerListVal(true);
  2101. }
  2102. })
  2103. $("#tab4user").unbind("click").on("click",function(){//点击成果
  2104. pageNo = 1
  2105. var pa=$(".moreNavUl.wendaUl>li.liNow").attr("rel")
  2106. $("#"+pa).find("ul").html("")
  2107. $("#"+pa).find(".js-load-more").show();
  2108. unPatentListVal(true);
  2109. })
  2110. $("#item4more").on("click","li",function(){
  2111. var pa=$(this).attr("rel")
  2112. $("#"+pa).find("ul").html("")
  2113. $("#"+pa).find(".js-load-more").show();
  2114. var sortN=$(this).attr("data-num");
  2115. dataO = {
  2116. patTime:"",
  2117. patId:""
  2118. };
  2119. pageNo = 1
  2120. if(sortN==1){
  2121. unPatentListVal(true);
  2122. }else if(sortN==2){
  2123. patentListVal(true);
  2124. }
  2125. })
  2126. $(".moreNavUl.moreBuUl").on("click","li.attentType:not(.rightbtn)",function(){//关注tab切换
  2127. var pa=$(this).attr("rel")
  2128. $("#"+pa).find("ul").html("")
  2129. $("#"+pa).find(".js-load-more").show();
  2130. var sortN=$(this).attr("data-num");
  2131. watchO={
  2132. watchTime:"",
  2133. watchObjId:"",
  2134. WATime:"",
  2135. WAId:"",
  2136. WQTime:"",
  2137. WQId:"",
  2138. };
  2139. if(sortN==8){
  2140. collectQuestion(true)
  2141. }else if(sortN==9){
  2142. collectAnswer(true)
  2143. }else{
  2144. collectSorts(sortN,true);
  2145. }
  2146. })
  2147. $("#tabAttendMy").unbind("click").on("click",function(){//关注我的人
  2148. var pa=$(this).attr("rel")
  2149. $("#"+pa).find("ul").html("")
  2150. $("#"+pa).find(".js-load-more").show();
  2151. watchO={
  2152. beiTime:"",
  2153. beiProId:"",
  2154. }
  2155. attentMyself(true);
  2156. })
  2157. $("#attendmyGo").unbind("click").on("click",function(){
  2158. if(userid!=professorId){
  2159. $(".moreNavUl.moreBuUl>li.attentType").hide();//关注他的人
  2160. $(".moreNavUl.moreBuUl>li.attendMy").addClass("liNow").text("关注他的人");
  2161. }
  2162. $(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
  2163. $(".moreNav").hide()
  2164. $("#item8more").fadeIn();
  2165. $("#item8user").show().siblings().hide();
  2166. $(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
  2167. $("#item8drop5").show().siblings().hide();
  2168. watchO={
  2169. beiTime:"",
  2170. beiProId:"",
  2171. }
  2172. $("#item8drop5").find("ul").html("")
  2173. $("#item8drop5").find(".js-load-more").show();
  2174. attentMyself(true);
  2175. })
  2176. /*研究方向点赞*/
  2177. var clFlag = 1;
  2178. $("#researchAreaShow").on("click", ".plus", function() {
  2179. if(userid && userid != null && userid != "null") {
  2180. //点赞变化样式
  2181. if(clFlag) {
  2182. clFlag = 0;
  2183. } else {
  2184. return;
  2185. }
  2186. if($(this).data("isagree") > -1) {
  2187. $(this).stop(true, true).animate({
  2188. backgroundPositionY: 0
  2189. }, 300); //变成未点赞样式
  2190. } else {
  2191. $(this).stop(true, true).animate({
  2192. backgroundPositionY: -26
  2193. }, 300); //变成点赞样式
  2194. }
  2195. $.ajax({
  2196. "url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
  2197. "type": "POST",
  2198. "data": {
  2199. "targetId": $(this).data("pid"),
  2200. "targetCaption": oArray[$(this).data("caption")],
  2201. "opId": userid,
  2202. "uname":$.cookie("userName")
  2203. },
  2204. "contentType": "application/x-www-form-urlencoded",
  2205. "success": function(dataStr) {
  2206. if(dataStr.success) {
  2207. $.get("/ajax/professor/info/" + professorId, function(dataStr) {
  2208. if(dataStr.success) {
  2209. clFlag = 1;
  2210. var $info = dataStr.data;
  2211. if($info) {
  2212. $("#researchAreaShow").empty("")
  2213. if($info.researchAreas) {
  2214. researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
  2215. }
  2216. }
  2217. }
  2218. })
  2219. } else {
  2220. $.MsgBox.Alert("提示", dataStr.msg);
  2221. }
  2222. }
  2223. });
  2224. } else {
  2225. quickLog();
  2226. operatTab();
  2227. closeLog();
  2228. }
  2229. })
  2230. //点击每个研究方向弹出研究方向详情窗口
  2231. $("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
  2232. var cap = $(this).attr("caption");
  2233. researchAlert(cap)
  2234. });
  2235. //关闭按钮
  2236. $("#workclose").click(function() {
  2237. $(".resAreaCover").fadeOut();
  2238. $("body").css("position", "");
  2239. });
  2240. //点击查看全部资源
  2241. $(".coninfobox").on("click","#seeMoreR",function(){
  2242. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2243. $("#tab2user").addClass("liNow").siblings().removeClass("liNow");
  2244. $("#item1user").hide();
  2245. $("#item2user").show();
  2246. })
  2247. //点击查看全部服务
  2248. $(".coninfobox").on("click","#seeMoreS",function(){
  2249. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2250. $("#tab9user").addClass("liNow").siblings().removeClass("liNow");
  2251. $("#item1user").hide();
  2252. $("#item9user").show();
  2253. })
  2254. //点击查看全部文章
  2255. $(".coninfobox").on("click","#seeMoreA",function(){
  2256. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2257. $("#tab3user").addClass("liNow").siblings().removeClass("liNow");
  2258. $("#item1user").hide();
  2259. $("#item3user").show();
  2260. })
  2261. //点击查看全部专利
  2262. $(".coninfobox").on("click","#seeMoreP",function(){
  2263. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2264. $("#tab4user").addClass("liNow").siblings().removeClass("liNow");
  2265. $("#item1user").hide();
  2266. $("#item4user").show();
  2267. })
  2268. //点击查看全部论文
  2269. $(".coninfobox").on("click","#seeMoreL",function(){
  2270. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2271. $("#tab5user").addClass("liNow").siblings().removeClass("liNow");
  2272. $("#item1user").hide();
  2273. $("#item5user").show();
  2274. })
  2275. //点击查看全部问题
  2276. $(".coninfobox").on("click","#seeMoreQA",function(){
  2277. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2278. $("#tab6user").addClass("liNow").siblings().removeClass("liNow");
  2279. $("#item1user").hide();
  2280. $("#item6user").show();
  2281. if(userid === professorId) {
  2282. $(".wendaNav").show();
  2283. }
  2284. $(".wendaNav li").eq(1).addClass("liNow").siblings().removeClass("liNow");
  2285. $("#item6drop2").show().siblings().hide();
  2286. })
  2287. //点击关注按钮
  2288. $("#attentBtn").on('click', function() {
  2289. if(userid && userid != null && userid != "null") {
  2290. if($(this).is('.attenedSpan')){
  2291. cancelCollectionAbout(professorId,$(this),1)
  2292. } else {
  2293. collectionAbout(professorId,$(this), 1);
  2294. }
  2295. queryPubCount();
  2296. watchO={
  2297. beiTime:"",
  2298. beiProId:"",
  2299. }
  2300. $("#item8drop5").find("ul").html("")
  2301. $("#item8drop5").find(".js-load-more").show();
  2302. attentMyself(true);
  2303. }else{
  2304. quickLog();
  2305. operatTab();
  2306. closeLog();
  2307. }
  2308. });
  2309. //点击联系按钮
  2310. $("#conbtn").on('click', function(){
  2311. if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
  2312. location.href="tidings.html?id="+professorId
  2313. } else {
  2314. quickLog();
  2315. operatTab();
  2316. closeLog();
  2317. }
  2318. });
  2319. //纠错反馈
  2320. $(".correctSubmit").on("click",function(){
  2321. var cntCon=$(this).siblings(".correctCon").val();
  2322. var cntUser="";
  2323. if(userid && userid != null && userid != "null") {
  2324. cntUser = userid;
  2325. }
  2326. if(cntCon.length>500){
  2327. $.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
  2328. return;
  2329. }else{
  2330. oAjax("/ajax/feedback/error/professor",{
  2331. "id": professorId,
  2332. "cnt":cntCon,
  2333. "user":cntUser
  2334. }, "POST", function(data){
  2335. backSuccessed();
  2336. });
  2337. }
  2338. })
  2339. }
  2340. if(GetQueryString("flag")) {
  2341. researchAlert(GetQueryString("flag"))
  2342. }
  2343. if(GetQueryString("iLike")){
  2344. openAttend();
  2345. }
  2346. if(userid!=professorId){
  2347. pageViewLog(professorId,1)
  2348. relevantExperts();//合作专家
  2349. relevantarticalList();//相关文章
  2350. likeExperts();//感兴趣专家
  2351. isActUser();//判断用户是否被激活
  2352. ifcollectionAbout(professorId,$(".goSpan").find(".attenSpan"), 1)
  2353. $(".goSpan").show();
  2354. }else{
  2355. $(".goSpanTo").show();
  2356. $(".myoneself").show();
  2357. }
  2358. queryPubCount();
  2359. getUserInfo(); //获取详细信息
  2360. demandListVal(true);
  2361. articalListVal(true);
  2362. teamListVal(true);
  2363. resourceListVal(true);
  2364. serviceListVal(true);
  2365. patentListVal(true);
  2366. unPatentListVal(true)
  2367. paperListVal(true);
  2368. answerListVal(true);
  2369. bindClickFun();
  2370. })