123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181 |
- $(function() {
- loginStatus();
-
- var nameD;
- var orgD;
- var authSD
- var userid = $.cookie("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;
- 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());
- var loginName=$("#mobilePhone").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();
- var userid = $.cookie("userid");
- if(userid) {
- $data.id = 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/qaProPublish",
- "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","/data/resource/" + data.data[i].images[0].imageSrc);
- } 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"
- }
|