12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186 |
- * Created by TT on 2017/5/25.
- */
- $(function() {
-
-
- var nameD;
- var orgD;
- var authSD
- var userid = GetQueryString("professorId");
- $(".replace-photo").attr("href","photo-set.html?id="+userid);
- if(userid) {
-
- var subjectShow = function(data) {
- if(data != undefined && data.length != 0) {
- var subs = new Array();
- if(data.indexOf(',')) {
- subs = data.split(',');
- } else {
- subs[0] = data;
- }
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#subjectList").append("<div class='acad'>" + subs[i] + "<span class='remove'><img src='images/move.png'></span></div>");
- $("#subjectShow").append("<div class='acad'>" + subs[i] + "</div>");
- };
- }
- }
- }
-
- var industryShow = function(data) {
- if(data != undefined && data.length != 0) {
- var subs = new Array();
- if(data.indexOf(',')) {
- subs = data.split(',');
- } else {
- subs[0] = data;
- }
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#industryList").append("<div class='acad'>" + subs[i] + "<span class='remove'><img src='images/move.png'></span></div>");
- $("#industryShow").append("<li>" + subs[i] + "</li>");
- };
- }
- }
- }
-
- var eduBgShow = function(data) {
- eduFil("#eduUl");
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].college) {
- data[i].college = "";
- }
- if(!data[i].major) {
- data[i].major = "";
- }
- if(!data[i].degree) {
- data[i].degree = "";
- }
- var string = '<li class="paddingSpace">'
- string += ' <div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>'
- if(data[i].college && data[i].major && data[i].degree) {
- string += data[i].school + '-' + data[i].college + '-' + data[i].major + '-' + data[i].degree
- } else if(!data[i].college && data[i].major && data[i].degree) {
- string += data[i].school + '-' + data[i].major + '-' + data[i].degree
- } else if(data[i].college && !data[i].major && data[i].degree) {
- string += data[i].school + '-' + data[i].college + '-' + data[i].degree
- } else if(data[i].college && data[i].major && !data[i].degree) {
- string += data[i].school + '-' + data[i].college + '-' + data[i].major
- } else if(!data[i].college && !data[i].major && data[i].degree) {
- string += data[i].school + '-' + data[i].degree
- } else if(!data[i].college && data[i].major && !data[i].degree) {
- string += data[i].school + '-' + data[i].major
- } else if(data[i].college && !data[i].major && !data[i].degree) {
- string += data[i].school + '-' + data[i].college
- }
-
- string += '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>'
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">学</em>校</div>'
- string += '<input type="hidden" class="eduId" value="' + data[i].id + '">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt school" value="' + data[i].school + '"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">毕业年份</div>'
- string += '<div class="txtExp floatL">'
- if(data[i].year) {
- string += '<input type="text" class="date-btn input-txt edu-txt year" name="YYYY" flag="1" value="' + data[i].year + '">'
- } else {
- string += '<input type="text" class="date-btn input-txt edu-txt year" name="YYYY" flag="1" value="">'
- }
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">院</em>系</div>'
- if(data[i].college) {
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college" value="' + data[i].college + '"></div>'
- } else {
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college"></div>'
- }
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">专</em>业</div>'
- if(data[i].major) {
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" value="' + data[i].major + '"></div>'
- } else {
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" ></div>'
- }
- string += '</div>'
- string += '<div class="edu ulbox clearfix">'
- string += '<div class="txtType floatL">获得学位</div>'
- string += '<div class="mr_timed_div input-txt edu-txt floatL">'
- string += '<i class="mr_sj"></i>'
- string += '<input type="hidden" name="degree_text">'
- if(data[i].degree) {
- string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="' + data[i].degree + '">'
- } else {
- string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="本科">'
- }
- string += '<div class="xl_list">'
- string += '<ul class="ul_edubg ulShow" style="display:none">'
- string += '<li>学士</li>'
- string += '<li>硕士</li>'
- string += '<li>博士</li>'
- string += '<li>其他</li>'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="保存" class="infor-save btn" class="saveEduBg">'
- string += '<input type="button" value="取消" class="close btn">'
- string += '<input type="button" value="删除本条" class="deletebtn edud">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("#eduUl").append(string);
- }
- }
- }
-
- var timeJobShow = function(data) {
- jobFil("#timeJobShow");
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- var sDate = "";
- var eDate = "";
- if(data[i].department) {
- var dep = "-" + data[i].department;
- var depart = data[i].department;
- } else {
- var dep = "";
- var depart = ""
- }
- if(data[i].startMonth) {
- sDate = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
- if(data[i].stopMonth) {
- eDate = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6);
- } else {
- eDate = "至今"
- }
- }
- var string = '<li class="paddingSpace listnone">'
- string += ' <div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].company + '-' + data[i].title + '' + dep + '<small class="h6Font">';
- string += sDate;
- if(eDate) string += ("-" + eDate);
- string += '</small><em class="exitlist inforedu"></em></div>';
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b>机构名称</div>'
- string += '<input type="hidden" class="jobId" value="' + data[i].id + '">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobCompany" value="' + data[i].company + '"/></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt startMonth" flag="2" difference="1" value="' + sDate + '">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '<div class="lineTo floatL"></div>'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt stopMonth" flag="2" difference="2" value="' + eDate + '">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '<li class="ymli">至今</li>'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu btn-marL">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">职</em>位</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobTitle" value="' + data[i].title + '"/></div>'
- string += '</div>'
- string += '<div class="infor edu btn-marL">'
- string += '<div class="txtType floatL">所在部门</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobdepartment" value="' + depart + '"/></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="保存" class="infor-save btn btn-marL">'
- string += '<input type="button" value="取消" class="close btn btn-marB">'
- string += '<input type="button" value="删除本条" class="deletebtn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("#timeJobShow").append(string);
- }
- }
- }
-
- var projectShow = function(data) {
- projectFil("#projectShow")
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].startMonth) {
- data[i].startMonth = '';
- data[i].stopMonth = '';
- } else {
- data[i].startMonth = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6) + "-"
- if(!data[i].stopMonth) {
- data[i].stopMonth = '至今';
- } else {
- data[i].stopMonth = data[i].stopMonth.substr(0, 4) + "-" + data[i].stopMonth.substr(4, 6)
- }
- }
- var string = '<li class="paddingSpace listnone">'
- string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].startMonth + '' + data[i].stopMonth + '</small><em class="exitlist inforedu"></em></div>';
- string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
-
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b>项目名称</div>'
- string += '<input type="hidden" class="projectId" value="' + data[i].id + '"/>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectName" value="' + data[i].name + '"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt project StartMonth" flag="2" difference="1" value="' + data[i].startMonth.substr(0, 7) + '">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '<div class="lineTo floatL"></div>'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt project StopMonth" flag="2" difference="2" value="' + data[i].stopMonth + '">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '<li class="ymli">至今</li>'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectDescp" value="' + data[i].descp + '"></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="保存" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close btn">'
- string += '<input type="button" value="删除本条" class="deletebtn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("#projectShow").append(string);
- }
- }
- }
-
- var paperShow = function(data) {
- papFil("#paperShow");
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].url) {
- data[i].url = "";
- }
- var string = '<li class="paddingSpace listnone">'
- string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
- string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
-
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperName" value="' + data[i].name + '"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">发表时间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt paperYear" flag="1" value="' + data[i].year + '">'
- string += '<div class="mr_calendar_ym clearfix" style="wclassth: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperDescp" value="' + data[i].descp + '"></div>'
- string += '</div>'
-
-
-
-
- string += '<div class="btnbox">'
- string += '<input type="hidden" class="paperId" value="' + data[i].id + '">'
- string += '<input type="button" value="保存" class="infor-save btn" class="paperSave">'
- string += '<input type="button" value="取消" class="close btn">'
- string += '<input type="button" value="删除本条" class="deletebtn">'
- string += '</div></form></div></li>'
- $("#paperShow").append(string);
- }
- }
- }
-
- var patentShow = function(data) {
- patFil("#patentShow");
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- if(!data[i].url) {
- data[i].url = "";
- }
- var string = '<li class="paddingSpace listnone">'
-
- string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
- string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<input type="hidden" class="patentId" value="' + data[i].id + '">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentName" value="' + data[i].name + '"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">发表时间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt patentYear" flag="1" value="' + data[i].year + '">'
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
-
-
-
-
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"value="' + data[i].descp + '"></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="保存" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close btn">'
- string += '<input type="button" value="删除本条" class="deletebtn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("#patentShow").append(string);
- }
- }
- }
-
- var honorShow = function(data) {
- hounerFil("#honorShow");
- if(data.length > 0) {
- for(var i = 0; i < data.length; i++) {
- if(!data[i].year) {
- data[i].year = "";
- }
- if(!data[i].descp) {
- data[i].descp = "";
- }
- var string = '<li class="paddingSpace listnone">'
-
- string += '<div><div class="listdata h4Font h4tit edudata"><i class="listpoint"></i>' + data[i].name + '<small class="h6Font">' + data[i].year + '</small><em class="exitlist inforedu"></em></div>';
- string += '<div class="listdata h5Font pIndent">' + data[i].descp + '</div></div>';
- string += '<div class="modifybox">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<input type="hidden" class="honorId" value="' + data[i].id + '">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt honorName" value="' + data[i].name + '"></div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp" value="' + data[i].descp + '"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt honorYear" flag="1" value="' + data[i].year + '">'
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="保存" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close btn">'
- string += '<input type="button" value="删除本条" class="deletebtn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("#honorShow").append(string);
- }
- }
- }
-
- var researchAreaShow = function($datas, $datarecords) {
- if($datas != undefined && $datas.length != 0) {
- $("#researchAreaList").empty();
- for(var i = 0; i < $datas.length; ++i) {
- var $data = $datas[i];
- var $photos = [];
-
- if($datarecords.length > 0) {
- $photos = getRecords($datarecords, $data.caption);
- }
- var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num'>";
- if($photos.length > 10) {
- showDiv += "<div class='triangleR'></div>";
- }
- if($photos.length > 0) {
- for(var j = 0; j < $photos.length; ++j) {
- showDiv += "<span class='like-people userRadius'><img class='like-h' src='/images/head/" + $photos[j] + "_s.jpg'></span>";
- }
- }
- showDiv += "</div></div>";
- $("#researchAreaShow").append(showDiv);
- $("#researchAreaList").append("<div class='list'><span class='like'>" + $data.count + "</span><span class='ra'>" + $data.caption + "</span><span class='remove'><img src='images/move.png'></span></div>");
- $(".like-h").load(function() {})
- .error(function() {
- $(this).attr("src", "/images/default-photo.jpg");
- });
- }
- }
- }
-
- var getRecords = function($researchAreaLogs, caption) {
- var ret = [];
- for(var i = 0; i < $researchAreaLogs.length; i++) {
- if(caption == $researchAreaLogs[i].caption) {
- ret.push($researchAreaLogs[i].opreteProfessorId);
- }
- }
- return ret;
- }
-
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- console.log($data);
- var $info = $data.data;
- $info.authType = 1;
- if($info) {
-
- $("#nameS").text($info.name);
- nameD = $info.name;
- authSD = $info.authStatus;
-
- orgD = $info.orgName;
- if($info.authType == 1) {
- $(".yesshow,.xslyshow,.yyhyshow").show();
- } else {
- if($info.authentication == 1) {
- $(".xslyshow").show();
- }
- if($info.authentication == 2) {
- $("#orgUpdata").text("所在企业");
- $(".yyhyshow").show();
- }
- if($info.authentication == 3) {
- $("#orgUpdata").text("所在高校");
- $("#departmentUpdata").text("所属院系");
- $("#titleNone").hide();
- $("#office").hide();
- $("#titleS").hide();
- }
- }
-
-
- if($info.authStatus==3) {
- $("#authSta").text("已认证");
- } else {
- $("#authSta").text("未认证");
- }
- if($info.office) {
- if($info.title) {
- $("#office").text($info.office + ",");
- } else {
- $("#office").text($info.office);
- }
- }
- if($info.title) {
- $("#titleS").text($info.title);
- }
- if($info.department) {
- if($info.orgName) {
- $("#industryS").text($info.department + ",");
- } else {
- $("#industryS").text($info.department);
- }
- }
- if($info.orgName) {
- $("#orgNameS").text($info.orgName);
- }
- if($info.address) {
- $("#address").text($info.address);
- }
- if($info.email) {
- $("#mail").text("联系邮箱(非公开):" + $info.email);
- $("#moileMail").val($info.email);
- }
- if($info.phone) {
- $("#phone").text("联系电话(非公开):" + $info.phone);
- $("#mobilePhone").val($info.phone);
- }
- $("#headImage").attr("src", "/images/head/" + userid + "_l.jpg");
- $("#headImage").load(function() {})
- .error(function() {
- $("#headImage").attr("src", "/images/default-photo.jpg");
- });
- $("#orgImage").attr("src", "/images/org/" + $info.orgId + ".jpg");
- $("#orgImage").load(function() {})
- .error(function() {
- $("#orgImage").attr("src", "/images/default-icon.jpg");
- });
- $("#descpS").text($info.descp);
-
- $("#name").val($info.name);
- $("#title").val($info.title);
- $("#orgId").val($info.orgId);
- $("#orgName").val($info.orgName);
- $("#department").val($info.department);
- $("#officeRevise").val($info.office);
-
-
-
- if(!$info.province) {
- $info.province = ""
- }
- if(!$info.address) {
- $info.address = ""
- }
- $("#Province .mr_show").text($info.province);
-
-
-
- $("#City .mr_show").text($info.address);
-
- if($info.descp) {
- $("#descp").val($info.descp);
- } else {
- $("#descpS").css("min-height", "0px");
- }
-
- if($info.subject) {
- subjectShow($info.subject);
- }
-
- if($info.researchAreas.length) {
- researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
- }
-
- if($info.industry) {
- industryShow($info.industry);
- }
-
- if($info.edus) {
- eduBgShow($info.edus);
- }
-
- if($info.jobs) {
- timeJobShow($info.jobs);
- }
-
- if($info.projects) {
- projectShow($info.projects)
- }
-
- if($info.papers) {
- paperShow($info.papers);
- }
-
- if($info.patents) {
- patentShow($info.patents);
- }
-
- if($info.honors) {
- honorShow($info.honors);
- }
- yearAdd();
- month();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
-
- var d;
- var t;
-
- var top5 = $(".content-left").height();
- var top4 = $("#container").height();
- var top3 = $(window).height();
- $(document).scroll(function() {
- var top1 = $(document).scrollTop();
- var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10;
- if(top1 >= 300) {
- $(".content-left").css({
- "position": "fixed",
- "top": "80px"
- });
- if(top1 >= top2) {
- $('.information-content').css("position", "static");
- $(".content-left").css("position", "absolute");
- $(".content-left").css("top", top4 - top5 - 10 + "px");
- } else {
- $('.information-content').css("position", "relative");
- $(".content-left").css({
- "position": "fixed",
- "top": "80px"
- });
- }
- } else {
- $(".content-left").css({
- "position": "static"
- });
- }
- })
-
- }
- }
- });
- } else {
- location.href = "login.html";
- return;
- }
-
- $("#hsearch").on("click", function() {
- var searchContent = $("#hsearchContent").val();
- location.href = "searchNew.html?searchContent=" + searchContent;
- });
- function trim(str) {
- return str.replace(/(^\s*)|(\s*$)/g, "");
- }
-
- $("#saveProfessor").on("click", function() {
- var length1 = trim($("#name").val());
-
- var length2 = trim($("#orgName").val());
-
- if(trim(loginName)){
- var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
- if(!hunPhone.test(loginName.trim())) {
- $.MsgBox.Alert("消息提醒", "联系电话格式不对,请输入正确的格式");
- return;
- }
- }*/
- var mail=$("#moileMail").val();
- if(trim(mail)){
- var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
- if(!gunf.test(mail.trim())) {
- $.MsgBox.Alert("消息提醒", "请输入正确的邮箱格式");
- return;
- }
- }
- if(!length1 && length2) {
- $.MsgBox.Alert("消息提醒", "姓名不能为空");
- return;
- } else if(length1 && !length2) {
- $.MsgBox.Alert("消息提醒", "所在机构不能为空");
- return;
- } else if(!length1 && !length2) {
- $.MsgBox.Alert("消息提醒", "姓名和所在机构不能为空");
- return;
- }
- if(nameD != length1 && orgD != length2) {
- if(authSD) {
- $.MsgBox.Confirm("消息", "修改姓名&&和所在机构会导致身份验证失效?", personUpdata);
- return;
- } else {
- personUpdata();
- }
- } else if(nameD == length1 && orgD != length2) {
- if(authSD) {
- $.MsgBox.Confirm("消息", "修改所在机构会导致身份验证失效?", personUpdata);
- return;
- } else {
- personUpdata();
- }
- } else if(nameD != length1 && orgD == length2) {
- if(authSD) {
- $.MsgBox.Confirm("消息", "修改姓名会导致身份验证失效?", personUpdata);
- return;
- } else {
- personUpdata();
- }
- } else {
- personUpdata();
- }
- });
-
- var upStatus = function() {
- $.ajax({
- url: "/ajax/professor/authStatus",
- dataType: 'json',
- type: 'post',
- data: {
- authStatus: 0,
- id: userid
- },
- timeout: 10000,
- success: function(data) {
- if(data.success) {} else {
- }
- }
- })
- }
- function personUpdata() {
- if(nameD == $("#name").val() && orgD == $("#orgName").val()) {
- } else {
- if(authSD) {
- upStatus();
- }
- }
- var $data = {};
- $data.name = $("#name").val();
- $data.orgId = $("#orgId").val();
- $data.orgName = $("#orgName").val();
- $data.title = $("#title").val();
- $data.department = $("#department").val();
- $data.phone=$("#mobilePhone").val();
- $data.email=$("#moileMail").val();
- if($("#Province input[name=cho_Province]").val() != "请选择省份") {
- $data.province = $("#Province input[name=cho_Province]").val();
- }
- if($("#City input[name=cho_City]").val() != "请选择城市") {
- $data.address = $("#City input[name=cho_City]").val();
- }
- $data.office = $("#officeRevise").val();
- if(userid) {
- $data.id = userid;
- }
- console.log(userid);
- $.ajax({
- "url": "../ajax/professor",
- "type": userid ? "PUT" : "POST",
- "success": function(rdata) {
- if(rdata.success) {
- if(userid) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- var $info = $data.data;
- if($info) {
-
- $(".modifybox").css("display", "none");
- $(".infor-browse").css("display", "block");
- if($info.authType) {
- $("#authSta").text("已认证");
- } else {
- $("#authSta").text("未认证");
- }
- nameD = $info.name;
- authSD = $info.authStatus;
- orgD = $info.orgName;
- $("#nameS").text("");
- $("#office").text("");
- $("#titleS").text("");
- $("#industryS").text("");
- $("#orgNameS").text("");
- $("#address").text("");
- $("#nameS").text($info.name);
- if($info.phone){
- $("#phone").text("联系电话(非公开):" +$info.phone);
- $("#mobilePhone").val($info.phone);
- }else{
- $("#phone").text("");
- $("#mobilePhone").val("");
- }
- if($info.email){
- $("#mail").text("联系邮箱(非公开):" +$info.email);
- $("#moileMail").val($info.email);
- }else{
- $("#mail").text("");
- $("#moileMail").val("");
- }
- if($info.office) {
- if($info.title) {
- $("#office").text($info.office + ",");
- } else {
- $("#office").text($info.office);
- }
- }
- if($info.title) {
- $("#titleS").text($info.title);
- }
- if($info.department) {
- if($info.orgName) {
- $("#industryS").text($info.department + ",");
- } else {
- $("#industryS").text($info.department);
- }
- }
- if($info.orgName) {
- $("#orgNameS").text($info.orgName);
- }
- if($info.address) {
- $("#address").text($info.address);
- }
-
- $("#name").val($info.name);
- $("#title").val($info.title);
- $("#orgId").val($info.orgId);
- $("#orgName").val($info.orgName);
- $("#department").val($info.department);
- $("#officeRevise").val($info.office);
-
-
-
- $("#Province .mr_show").text("");
- $("#Province input[name=cho_Province]").val($info.province);
- $("#Province .mr_show").text($info.province);
-
-
- $("#City .mr_show").text("");
- $("#City input[name=cho_City]").val($info.address);
- $("#City .mr_show").text($info.address);
- }
- }
- })
- } else {
- location.href = "information.html?id=" + rdata.data;
- }
- } else {
- alert(rdata.msg);
- }
- },
- "data": userid ? JSON.stringify($data) : $data,
- "contentType": userid ? "application/json" : "application/x-www-form-urlencoded",
- dataType: "json"
- });
- }
-
- $(".head-left").hover(function() {
- $(".replace-photo").animate({
- "bottom": "0px"
- });
- }, function() {
- $(".replace-photo").animate({
- "bottom": "-50px"
- });
- })
-
- $(".subsidebar").mouseenter(function() {
- var dd = $(this)[0].className;
- if(dd != "subsidebar subcolor") {
- $(this).css("background", "#efefef");
- }
- }).mouseleave(function() {
- $(this).css("background", "")
- });
-
- $(".subsidebar").click(function() {
- $(".subsidebar").removeClass("subcolor");
- $(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
- });
- $(".subsidebar").click(function() {
- var index = $(".subsidebar").index(this) + 1;
-
- var offset = $(".introduction").eq(index).offset();
- $("body,html").animate({
- scrollTop: offset.top - 80 + "px"
- }, 1000);
- }).mousedown(function() {
- $(this).css("background", "");
- });
-
- $("#container .edit").click(function() {
- var edit = $(".edit").index(this);
- $(".right-title span").eq(edit - 1).css("color", "#3e3e3e");
- $(".infor-browse").eq(edit).hide();
- $(".modifybox").eq(edit).show();
-
- $(".close").click(function() {
- $(".modifybox").eq(edit).hide();
- $(".infor-browse").eq(edit).show();
- });
- });
- $("#saveDescp").on("click", function() {
- $.ajax({
- "url": "../ajax/professor/descp",
- "type": "POST",
- "data": {
- "id": userid,
- "descp": $("#descp").val()
- },
- "contentType": "application/x-www-form-urlencoded",
- "success": function($data) {
-
- if($data.success) {
- $(".infor-browse").css("display", "block");
- $(".indu").css("display", "none");
- $("#descpS").text($("#descp").val());
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- })
- })
-
- $("#subjectAdd").click(function() {
- var val = $("#subject").val();
- if(!val) {
- $.MsgBox.Alert("消息提醒", "内容不能为空");
- return;
- }
- var inV = $("#subjectList .acad");
- for(var i = 0; i < inV.length; i++) {
- if(inV[i].innerText == val) {
- $.MsgBox.Alert("消息提醒", "不能添加重复内容");
- return;
- }
- }
- $("#subjectList").append("<div class='acad'>" + val + "<span class='remove'><img src='images/move.png'></span></div>")
- $("#subject").val("")
- })
-
- $("#subjectList").on("click", ".remove", function() {
- $(this).parent().remove();
- })
-
- $("#subjectSave").on("click", function() {
- var subjects = $("#subjectList .acad");
- var subjectAll = "";
- if(subjects.size() > 0) {
- for(var i = 0; i < subjects.size(); i++) {
- subjectAll += subjects[i].innerText;
- subjectAll += ',';
- };
- subjectAll = subjectAll.substring(0, subjectAll.length - 1);
- }
- $.ajax({
- "url": "/ajax/professor/subject",
- "type": "POST",
- "data": {
- "id": userid,
- "subject": subjectAll
- },
- "contentType": "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $("#subject").val("");
- $("#subjectShow").empty();
- $("#subjectList").empty();
- $(".indu").css("display", "none");
- $(".infor-browse").css("display", "block");
- subjectShow(subjectAll);
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#industryAdd").click(function() {
- var val = $("#industry").val();
- if(!val) {
- $.MsgBox.Alert("消息提醒", "内容不能为空");
- return;
- }
- var inV = $("#industryList .acad");
- for(var i = 0; i < inV.length; i++) {
- if(inV[i].innerText == val) {
- $.MsgBox.Alert("消息提醒", "不能添加重复内容");
- return;
- }
- }
- $("#industryList").append("<div class='acad'>" + val + "<span class='remove'><img src='images/move.png'></span></div>")
- $("#industry").val("")
- })
-
- $("#industryList").on("click", ".remove", function() {
- $(this).parent().remove();
- })
-
- $("#industrySave").on("click", function() {
- var industrys = $("#industryList .acad");
- var industryAll = "";
- if(industrys.size() > 0) {
- for(var i = 0; i < industrys.size(); i++) {
- industryAll += industrys[i].innerText;
- industryAll += ',';
- };
- industryAll = industryAll.substring(0, industryAll.length - 1);
- }
- $.ajax({
- "url": "/ajax/professor/industry",
- "type": "POST",
- "data": {
- "id": userid,
- "industry": industryAll
- },
- "contentType": "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $("#industry").val("");
- $("#industryShow").empty();
- $("#industryList").empty();
- $(".indu").css("display", "none");
- $(".infor-browse").css("display", "block");
- industryShow(industryAll);
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#researchAreaAdd").click(function() {
- var researchArea = $("#researchArea").val();
- if(!researchArea) {
- $.MsgBox.Alert("消息提醒", "内容不能为空");
- return;
- }
- var inV = $("#researchAreaList .ra");
- for(var i = 0; i < inV.length; i++) {
- if(inV[i].innerText == researchArea) {
- $.MsgBox.Alert("消息提醒", "不能添加重复内容");
- return;
- }
- }
- $("#researchAreaList").append("<div class='list'><span class='like'>0</span><span class='ra'>" + researchArea + "</span><span class='remove'><img src='images/move.png'></span></div>")
- $("#researchArea").val("");
- });
-
- $("#researchAreaList").on("click", ".remove", function() {
- $(this).parent().remove();
- })
-
- $("#researchAreaSave").on("click", function() {
-
- var $data = [];
- var researchAreas = $("#researchAreaList .list .ra");
- if(researchAreas.length > 0) {
- for(var i = 0; i < researchAreas.length; i++) {
- var $rd = {};
- $rd.professorId = userid;
- $rd.caption = researchAreas[i].innerText;
- $data[i] = $rd;
- }
- }
- var $has = $data.length > 0;
- $.ajax({
- "url": $has ? "../ajax/researchArea" : "../ajax/researchArea/" + userid,
- "type": $has ? "PUT" : "DELETE",
- "data": $has ? JSON.stringify($data) : null,
- "contentType": $has ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#researchAreaShow").empty("");
- $("#researchAreaShow").show();
- $(".indu").hide();
- researchAreaShow($data.data.researchAreas, $data.data.editResearchAreaLogs);
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#other").click(function() {
- $(".addbox").toggle();
- });
-
- $("#eduBgList").on("mouseover mouseout", ".eg", function(even) {
- if(event.type == "mouseover") {
- $(this).find("span").show();
- } else if(event.type == "mouseout") {
- $(this).find("span").hide();
- }
- })
- function trim(str) {
- return str.replace(/(^\s*)|(\s*$)/g, "");
- }
- $("#eduUl").on("blur", ".school", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "学校不能为空");
- }
- })
-
- var eduFil = function(select) {
- var string = '<li class="listnone1" style="display:none">'
- string += '<div class="modifybox" style="display:block">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">学</em>校</div>'
- string += '<input type="hidden" class="eduId">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt school"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">毕业年份</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt year" name="YYYY" flag="1" value="">'
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">院</em>系</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt floatL college"></div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">专</em>业</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt major" ></div>'
- string += '</div>'
- string += '<div class="edu ulbox clearfix">'
- string += '<div class="txtType floatL">获得学位</div>'
- string += '<div class="mr_timed_div input-txt edu-txt floatL">'
- string += '<i class="mr_sj"></i>'
- string += '<input type="hidden" name="degree_text">'
- string += '<input type="button" class="mr_btn" name="degree_val" onclick="showmenu()" id="div_select2" value="本科">'
- string += '<div class="xl_list">'
- string += '<ul class="ul_edubg ulShow" style="display:none">'
- string += '<li>学士</li>'
- string += '<li>硕士</li>'
- string += '<li>博士</li>'
- string += '<li>其他</li>'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="添加" class="infor-save btn" class="saveEduBg">'
- string += '<input type="button" value="取消" class="close1 close2 btn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("" + select + "").prepend(string);
- }
-
- $("#addEdu").on("click", function() {
- $("#eduUl").find(".listnone1").toggle(100);
- });
- $("#eduUl").on("click", ".close1", function() {
- $("#eduUl").find(".listnone1").toggle(100);
- });
- $("#eduUl").on("click", "em", function() {
- $(this).parent().hide();
- $(this).parent().siblings().show();
-
- });
- $("#eduUl").on("click", ".mr_btn", function() {
- $(this).siblings(".xl_list").children("ul").show();
- });
- $("#eduUl").on("click", ".ul_edubg li", function() {
- $(this).parents(".xl_list").siblings(".mr_btn").val($(this).text());
- $(this).parent().hide();
- });
- $("#eduUl").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#eduUl").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".eduId").val();
- delEdu(deuId);
- });
-
- var delEdu = function(data) {
- $.ajax({
- "url": "/ajax/edu/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#eduUl").empty("");
- eduBgShow($data.data.edus);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
- $("#eduUl").on("click", ".infor-save", function() {
- var length = trim($(this).parents(".txtExpForm").find(".school").val());
- if(!length) {
- $.MsgBox.Alert("消息", "学校不能为空");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".eduId").val();
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- $data.year = $(this).parents(".txtExpForm").find(".year").val();
- $data.school = $(this).parents(".txtExpForm").find(".school").val();
- $data.college = $(this).parents(".txtExpForm").find(".college").val();
- $data.major = $(this).parents(".txtExpForm").find(".major").val();
- $data.degree = $(this).parents(".txtExpForm").find(".mr_btn").val();
- $.ajax({
- "url": "/ajax/edu",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#eduUl").empty("");
- eduBgShow($data.data.edus);
- yearAdd();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#timeJobShow").on("blur", ".jobCompany", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "机构名称不能为空");
- }
- })
- $("#timeJobShow").on("blur", ".jobTitle", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "职位不能为空");
- }
- })
- var jobFil = function(select) {
- var string = '<li class="listnone1" style="display:none">'
- string += '<div class="modifybox" style="display:block;">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b>机构名称</div>'
- string += '<input type="hidden" class="jobId">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobCompany" /></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt startMonth" flag="2" difference="1" value="">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '<div class="lineTo floatL"></div>'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" maxLength="6" class="date-btn input-txt edu-txt stopMonth" flag="2" difference="2" value="">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '<li class="ymli">至今</li>'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu btn-marL">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">职</em>位</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobTitle" /></div>'
- string += '</div>'
- string += '<div class="infor edu btn-marL">'
- string += '<div class="txtType floatL">所在部门</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt jobdepartment" /></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="添加" class="infor-save btn btn-marL">'
- string += '<input type="button" value="取消" class="close1 close2 btn btn-marB">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("" + select + "").prepend(string);
- }
-
- $("#timeJobAdd").on("click", function() {
- $("#timeJobShow").find(".listnone1").toggle(100);
- });
- $("#timeJobShow").on("click", ".close1", function() {
- $("#timeJobShow").find(".listnone1").toggle(100);
- });
- $("#timeJobShow").on("click", "em", function() {
- $(this).parent().hide();
- $(this).parent().siblings().show();
-
- });
- $("#timeJobShow").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#timeJobShow").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".jobId").val();
- delTimeJob(deuId);
- });
-
- var delTimeJob = function(data) {
- $.ajax({
- "url": "/ajax/job/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#timeJobShow").empty("");
- timeJobShow($data.data.jobs);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
- $("#timeJobShow").on("click", ".infor-save", function() {
- var length1 = trim($(this).parents(".txtExpForm").find(".jobCompany").val());
- var length2 = trim($(this).parents(".txtExpForm").find(".jobTitle").val());
- var length3 = trim($(this).parents(".txtExpForm").find(".startMonth").val());
- var length4 = trim($(this).parents(".txtExpForm").find(".stopMonth").val());
- if(!length3 && length4) {
- $.MsgBox.Alert("消息", "没有选开始时间");
- return;
- } else if(length3 && !length4) {
- $.MsgBox.Alert("消息", "没有选结束时间");
- return;
- }
- if(!length1 && length2) {
- $.MsgBox.Alert("消息", "机构名称不能为空");
- return;
- } else if(length1 && !length2) {
- $.MsgBox.Alert("消息", "职位不能为空");
- return;
- } else if(!length1 && !length2) {
- $.MsgBox.Alert("消息", "职位&&机构名称不能为空");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".jobId").val();
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- $data.company = $(this).parents(".txtExpForm").find(".jobCompany").val();
- $data.department = $(this).parents(".txtExpForm").find(".jobdepartment").val();
- var s = $(this).parents(".txtExpForm").find(".startMonth").val();
- var st = $(this).parents(".txtExpForm").find(".stopMonth").val();
- if(s) {
- $data.startMonth = s.substr(0, 4) + s.substr(5, 6);
- }
- if(st) {
- if(st == "至今") {} else {
- $data.stopMonth = st.substr(0, 4) + st.substr(5, 6);
- }
- }
- $data.title = $(this).parents(".txtExpForm").find(".jobTitle").val();
- $.ajax({
- "url": "/ajax/job",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- beforeSend: function() {
-
- },
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#timeJobShow").empty("");
- timeJobShow($data.data.jobs);
- yearAdd();
- month();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#projectShow").on("blur", ".projectName", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "项目名称不能为空");
- }
- });
- var projectFil = function(select) {
- var string = '<li class="listnone1" style="display:none;">'
- string += '<div class="modifybox" style="display:block;">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b>项目名称</div>'
- string += '<input type="hidden" class="projectId" />'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectName"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt project StartMonth" flag="2" difference="1" value="">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '<div class="lineTo floatL"></div>'
- string += '<div class="dateExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt project StopMonth" flag="2" difference="2" value="">'
- string += '<div class="mr_calendar_ym clearfix">'
- string += '<ul class="mr_year">'
- string += '<li class="ymli">至今</li>'
- string += '</ul>'
- string += '<ul class="mr_month">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt projectDescp" ></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="添加" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close1 close2 btn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("" + select + "").prepend(string);
- }
- $("#projectAdd").on("click", function() {
- $("#projectShow").find(".listnone1").toggle(100);
- });
- $("#projectShow").on("click", ".close1", function() {
- $("#projectShow").find(".listnone1").toggle(100);
- });
- $("#projectShow").on("click", "em", function() {
- $(this).parent().parent().hide();
- $(this).parent().parent().siblings().show();
-
- });
- $("#projectShow").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#projectShow").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".projectId").val();
- delProject(deuId);
- });
-
- var delProject = function(data) {
- $.ajax({
- "url": "/ajax/project/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#projectShow").empty("");
- projectShow($data.data.projects);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
- $("#projectShow").on("click", ".infor-save", function() {
- var length = trim($(this).parents(".txtExpForm").find(".projectName").val());
- var length1 = trim($(this).parents(".txtExpForm").find(".StartMonth").val());
- var length2 = trim($(this).parents(".txtExpForm").find(".StopMonth").val());
- if(!length) {
- $.MsgBox.Alert("消息", "项目名称不能为空");
- return;
- }
- if(length1 && !length2) {
- $.MsgBox.Alert("消息", "没有选结束时间");
- return;
- }
- if(!length1 && length2) {
- $.MsgBox.Alert("消息", "没有选开始时间");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".projectId").val();
-
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- var s = $(this).parents(".txtExpForm").find(".StartMonth").val();
- var st = $(this).parents(".txtExpForm").find(".StopMonth").val();
- if(s) {
- $data.startMonth = s.substr(0, 4) + s.substr(5, 6);
- }
- if(st) {
- if(st == "至今") {} else {
- $data.stopMonth = st.substr(0, 4) + st.substr(5, 6);
- }
- }
- $data.name = $(this).parents(".txtExpForm").find(".projectName").val()
- $data.descp = $(this).parents(".txtExpForm").find(".projectDescp").val()
- $.ajax({
- "url": "../ajax/project",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#projectShow").empty("");
- projectShow($data.data.projects);
- yearAdd();
- month();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- var papFil = function(select) {
- var string = '<li class="listnone1" style="display:none;" >'
- string += '<div class="modifybox" style="display:block;">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperName" ></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">发表时间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt paperYear" flag="1" value="">'
- string += '<div class="mr_calendar_ym clearfix" style="wclassth: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt paperDescp" ></div>'
- string += '</div>'
-
-
-
-
- string += '<div class="btnbox">'
- string += '<input type="hidden" class="paperId">'
- string += '<input type="button" value="添加" class="infor-save btn" class="paperSave">'
- string += '<input type="button" value="取消" class="close1 close2 btn">'
- string += '</div></form></div></li>'
- $("" + select + "").prepend(string);
- }
- $("#paperShow").on("blur", ".paperName", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- }
- })
- $("#papAdd").on("click", function() {
- $("#paperShow").find(".listnone1").toggle(100);
- });
- $("#paperShow").on("click", ".close1", function() {
- $("#paperShow").find(".listnone1").toggle(100);
- });
- $("#paperShow").on("click", "em", function() {
- $(this).parent().parent().hide();
- $(this).parent().parent().siblings().show();
-
- });
- $("#paperShow").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#paperShow").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".paperId").val();
- delPaper(deuId);
- });
-
- var delPaper = function(data) {
- $.ajax({
- "url": "../ajax/paper/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#paperShow").empty("");
- paperShow($data.data.papers);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
- $("#paperShow").on("click", ".infor-save", function() {
- var length = trim($(this).parents(".txtExpForm").find(".paperName").val());
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".paperId").val();
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- $data.year = $(this).parents(".txtExpForm").find(".paperYear").val();
- $data.name = $(this).parents(".txtExpForm").find(".paperName").val();
- $data.descp = $(this).parents(".txtExpForm").find(".paperDescp").val();
- $data.url = $(this).parents(".txtExpForm").find(".paperUrl").val();
- $.ajax({
- "url": "../ajax/paper",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#paperShow").empty("");
- paperShow($data.data.papers);
- yearAdd();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- });
-
- $("#patentShow").on("blur", ".patentName", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- }
- })
- var patFil = function(select) {
- var string = '<li class="listnone1" style="display:none;">'
- string += '<div class="modifybox" style="display:block;">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<input type="hidden" class="patentId">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentName"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL">发表时间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt patentYear" flag="1" value="">'
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
-
-
-
-
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"></div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="添加" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close1 close2 btn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("" + select + "").prepend(string);
- }
-
- $("#patenAdd").on("click", function() {
- $("#patentShow").find(".listnone1").toggle(100);
- });
- $("#patentShow").on("click", ".close1", function() {
- $("#patentShow").find(".listnone1").toggle(100);
- });
- $("#patentShow").on("click", "em", function() {
- $(this).parent().parent().hide();
- $(this).parent().parent().siblings().show();
-
- });
- $("#patentShow").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#patentShow").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".patentId").val();
- delPatent(deuId);
- })
-
- var delPatent = function(data) {
- $.ajax({
- "url": "/ajax/patent/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#patentShow").empty();
- patentShow($data.data.patents);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
- $("#patentShow").on("click", ".infor-save", function() {
- var length = trim($(this).parents(".txtExpForm").find(".patentName").val());
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".patentId").val();
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- $data.year = $(this).parents(".txtExpForm").find(".patentYear").val();
- $data.name = $(this).parents(".txtExpForm").find(".patentName").val();
- $data.descp = $(this).parents(".txtExpForm").find(".patentDescp").val();
- $data.url = $(this).parents(".txtExpForm").find(".patentUrl").val();
- $.ajax({
- "url": "../ajax/patent",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#patentShow").empty("");
- patentShow($data.data.patents);
- yearAdd();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $("#honorShow").on("blur", ".honorName", function() {
- var valueE = $(this).val();
- var length = trim(valueE);
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- }
- })
- var hounerFil = function(select) {
- var string = '<li class="listnone1" style="display:none">'
- string += '<div class="modifybox" style="display:block">'
- string += '<form class="txtExpForm">'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><b class="required_star"></b><em class="emspace">标</em>题</div>'
- string += '<input type="hidden" class="honorId">'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt honorName"></div>'
- string += '</div>'
- string += '<div class="infor edu">'
- string += '<div class="txtType floatL"><em class="emspace">描</em>述</div>'
- string += '<div class="txtExp floatL"><input type="text" class="input-txt edu-txt patentDescp"></div>'
- string += '</div>'
- string += '<div class="edu date-box clearfix">'
- string += '<div class="txtType floatL"><em class="emspace">时</em>间</div>'
- string += '<div class="txtExp floatL">'
- string += '<input type="text" class="date-btn input-txt edu-txt honorYear" flag="1" value="">'
- string += '<div class="mr_calendar_ym clearfix" style="width: 180px; display: none;">'
- string += '<ul class="full_year">'
- string += '</ul>'
- string += '</div>'
- string += '</div>'
- string += '</div>'
- string += '<div class="btnbox">'
- string += '<input type="button" value="添加" class="infor-save btn">'
- string += '<input type="button" value="取消" class="close1 close2 btn">'
- string += '</div>'
- string += '</form>'
- string += '</div>'
- string += '</li>'
- $("" + select + "").prepend(string);
- }
-
- $("#honorAdd").on("click", function() {
- $("#honorShow").find(".listnone1").toggle(100);
- });
- $("#honorShow").on("click", ".close1", function() {
- $("#honorShow").find(".listnone1").toggle(100);
- });
- $("#honorShow").on("click", "em", function() {
- $(this).parent().parent().hide();
- $(this).parent().parent().siblings().show();
-
- });
- $("#honorShow").on("click", ".close", function() {
- $(this).parents(".modifybox").hide();
- $(this).parents(".modifybox").siblings().show();
- });
- $("#honorShow").on("click", ".deletebtn", function() {
- var deuId = $(this).parents(".txtExpForm").find(".honorId").val();
- delHonor(deuId);
- });
-
- var delHonor = function(data) {
- $.ajax({
- "url": "/ajax/honor/" + data,
- "type": "DELETE",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#honorShow").empty("");
- honorShow($data.data.honors);
- }
- });
- } else {
- alert($data.msg);
- }
- }
- });
- }
-
-
-
-
-
-
-
-
-
- $("#honorShow").on("click", ".infor-save", function() {
- var length = trim($(this).parents(".txtExpForm").find(".honorName").val());
- if(!length) {
- $.MsgBox.Alert("消息", "标题不能为空");
- return;
- }
- var $data = {};
- var $id = $(this).parents(".txtExpForm").find(".honorId").val();
- if($id) {
- $data.id = $id;
- }
- $data.professorId = userid;
- $data.year = $(this).parents(".txtExpForm").find(".honorYear").val();
- $data.name = $(this).parents(".txtExpForm").find(".honorName").val();
- $data.descp = $(this).parents(".txtExpForm").find(".patentDescp").val();
-
- $.ajax({
- "url": "../ajax/honor",
- "type": $id ? "PUT" : "POST",
- "data": $id ? JSON.stringify($data) : $data,
- "contentType": $id ? "application/json" : "application/x-www-form-urlencoded",
- "success": function($data) {
- if($data.success) {
- $.get("/ajax/professor/info/" + userid, function($data) {
- if($data.success) {
- $("#honorShow").empty("");
- honorShow($data.data.honors);
- yearAdd();
- $(".stopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- $(".StopMonth").siblings(".mr_calendar_ym ").find(".mr_year").prepend("<li class='ymli'>至今</li>");
- }
- });
- } else {
- $.MsgBox.Alert("message", $data.msg);
- }
- }
- });
- })
-
- $.ajax({
- "url": "/ajax/resource/qapro",
- "type": "get",
- "data": {
- "professorId": userid
- },
- "async": true,
- "success": function(data) {
-
- if(data.data.length == 0) {
- $("#infor-browse").css("display", "none");
- }
- var add = "";
- if(data.success) {
-
- for(var i = 0; i < data.data.length; i++) {
- add = '<div class="sharesrc">'
- add += '<div class="shareshow">'
- add += '<a><div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
- add += '<img class="resImg headRadius resourceImg" src="" /></div></a>'
- add += '<div class="shareopeart"></div>'
- add += '</div>'
- add += '<p class="restit ellipsisSty">资源名称:<span class="presou">' + data.data[i].resourceName + '</span></p>'
- if(data.data[i].supportedServices == undefined) {
- data.data[i].supportedServices = "";
- }
- add += '<p class="briefinfor ellipsisSty-2">应用用途:' + data.data[i].supportedServices + '</p>'
- add += '</div>'
- $add = $(add);
- $("#keyanRe").append($add);
-
- .error(function(){
- $(this).attr("src","/images/default-resource.jpg");
- });*/
- if(data.data[i].images.length) {
- $add.find(".resourceImg").attr("src", "/images/resource/" + data.data[i].resourceId + ".jpg");
- } else {
- $add.find(".resourceImg").attr("src", "/images/default-resource.jpg");
- }
-
- }
-
- var $content = $("#keyanRe");
- var childcount = $content.find(".sharesrc").length;
- Carousel(3, 3, 3, childcount, $content, $(".resoubtn2.resounext"), $(".resoubtn2.resouprev"));
- } else {
- $.MsgBox.Alert("消息", "系统异常!");
- }
- },
- "error": function() {
- $.MsgBox.Alert('message', 'failddd')
- }
- });
- $("#enterwork").on("click", function() {
- location.href = "newsciresource.html";
- })
-
-
- var date = $(".present").index(this);
- $(".datebox").eq(date).find(".ago").remove();
- $(".datebox").eq(date).css("width","326px");
- })*/
- $(".present").change(function() {
- if($(".present").is(":checked")) {
- $(this).parent().parent().find('.ago').hide();
- $(this).parent().parent().find('.inputno').hide();
- } else {
- $(this).parent().parent().find('.ago').show();
- $(this).parent().parent().find('.inputno').show();
- }
- })
-
- $.ajax({
- url: "/ajax/article/qaPro",
- dataType: 'json',
- type: 'GET',
- data: {
- "professorId": userid
- },
- timeout: 10000,
- success: function(data) {
- if(data.success) {
- if(!ifuser.authType2) {
- $("#reA").hide();
- return;
- } else {
- $("#reA").show();
- if(data.data.length == 0) {
- $("#reachArticle").height(0)
- return;
- }
- for(var i = 0; i < data.data.length; i++) {
- var add = '<li style="cursor:auto">'
- add += '<div class="art_topicBox"><div class="art_img" style="cursor:auto"></div>'
- add += '<div class="art_tbox"><h6 class="ellipsisSty" id="artical_topic" >' + data.data[i].articleTitle + '</h6></div>'
- add += '</div><div class="tagsBox"><span></span></div>'
- add += '</li>';
- $add = $(add);
- $("#reachArticle").append($add);
- $add.find('.tagsBox span').text(data.data[i].industry);
- if(data.data[i].articleImg) {
- $add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
- }
- }
-
- var $content2 = $("#keyanAr");
- var childcount2 = $content2.find(".otherRes.shareshow li").length;
- Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
- }
- }
- },
- error: function() {
- return;
- }
- });
- $("#enter1work").on("click", function() {
- location.href = "articalList.html";
- })
-
- $(".input_select").click(function() {
- var ul = $(this).next();
- if(ul.css("display") == "none") {
- ul.slideDown("fast");
- } else {
- ul.slideUp("fast");
- }
- });
- $(".divselect ul li a").click(function() {
- var txt = $(this).text();
- $(".divselect .input_select").val(txt);
- var value = $(this).attr("rel");
- $(".divselect ul").hide();
- });
- $("#aclick").on("click", function() {
- exit();
- });
- })
- function exit() {
- $.cookie('userid', null);
- $.cookie('userAuth', null);
- location.href = "login.html"
- }
|