1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185 |
- * 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;
- 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 = "search.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();
- 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"
- }
|