123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777 |
- _private = {
- id:'',
- permission: 'n',
- htmlContent:[],
- personSummaryInfo:[],
- personDetailInfo:[],
- personHierarchy:[],
- personWorkExp:[],
- personPositionMember:[],
- personDegreeExp:[],
- personProjectExp:[],
- personPerfResultInfo:[]
- };
-
- _self.pageinit=function(){
- _private.initEvent();
-
- }
-
- _private.initEvent = function(){
- _private.appid = mbos.getRequestParams().appid;
-
- _private.hostname = window.location.origin;
- _private.storeEid = mbos.getRequestParams().storeEid;
- _private.id = decodeURIComponent(mbos.getRequestParams().dataKey);
-
- if(_private.id){
- var success = function(data){
- _private.permission = data.permission;
- //获取我的档案
- _private.fillMyArchiveEvent();
-
- //页面控件初始化
- _private.controlEvent();
- }
- var fail = function(data){
- mbos.msgBox.showError(data);
- }
- mbos.eas.invokeScript("getPersonPermissionByPersonId", [_private.id], success,fail);
- }
- }
-
- _private.fillMyArchiveEvent = function(){
- //填写我的个人信息
- _private.fillMyPersonSummaryInfo();
-
- }
-
- _private.fillMyPersonSummaryInfo = function(){
- //获取我的信息模板
- var template = _private.getMyPersonSummaryInfoTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //通过服务端函数获取数据,进行渲染,拼接html片段
- _private.callPersonSummaryInfoService('getPersonSummaryService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyPersonSummaryInfoTemplate = function(){
- var myPersonalInfoTemplate1 = ['<div class="panel panel-default">',
- '<div class="panel-body page-title">',
- '<div align="center"><img src="data:image/png;base64,${photo}" alt="..." class="img-circle" style="width:60px;height:60px;border: 5px solid #fff;border-radius: 30px;" onerror="_private.showDefaultImg(this)"></div>',
- '<div align="center" style="color:#FFF;margin-top:5px;">',
- '<div>${name}</div>',
- '<div>${position} - ${dept}</div>',
- '</div>',
- '</div>',
- '<div class="bs-example" data-example-id="simple-nav-pills" id="myTab">',
- '<ul class="nav nav-pills">',
- '<li role="presentation" style="width:33%"><a href="#contact" id ="con">'+localeResource.contact+'</a></li>',
- '<li role="presentation" style="width:34%"><a href="#relation" id="rel">'+localeResource.relation+'</a></li>',
- '<li role="presentation" style="width:33%"><a href="#archive" id="arc">'+localeResource.archive+'</a></li>',
- '</ul>',
- '</div>',
- '</div>',
- '<div class="tab-content">'].join('');
-
- var myPersonalInfoTemplate2 = ['<div class="panel panel-default">',
- '<div class="panel-body page-title">',
- '<div align="center"><img src="data:image/png;base64,${photo}" alt="..." class="img-circle" style="width:60px;height:60px;border: 5px solid #fff;border-radius: 30px;" onerror="_private.showDefaultImg(this)"></div>',
- '<div align="center" style="margin-top:5px;color:#FFF;">',
- '<div>${name}</div>',
- '<div>${position} - ${dept}</div>',
- '</div>',
- '</div>',
- '<div class="bs-example" data-example-id="simple-nav-pills" id="myTab">',
- '<ul class="nav nav-pills">',
- '<li role="presentation" style="width:50%"><a href="#contact" id="con">'+localeResource.contact+'</a></li>',
- '<li role="presentation" style="width:50%"><a href="#relation" id="rel">'+localeResource.relation+'</a></li>',
- '</ul>',
- '</div>',
- '</div>',
- '<div class="tab-content">'].join('');
- var template = myPersonalInfoTemplate2;
- if(_private.permission === 'y'){
- template = myPersonalInfoTemplate1;
- }
- return template;
- }
-
- _private.callPersonSummaryInfoService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- //解析人员信息
- _private.personSummaryInfo = _private.parseData(data);
- //获取人员照片
- _private.getPersonPhoto(compiled_tpl, html);
- }
- var fail = function(data){
- //_private.callPersonSummaryInfoService(serverName,compiled_tpl, html);
- mbos.msgBox.showError(localeResource.msg1);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.getPersonPhoto = function(compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- _private.personSummaryInfo.photo = data.photo;
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personSummaryInfo);
- html.push(htmlFragment);
- _private.fillMyContactMethod();
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg2);
- }
- mbos.eas.invokeScript("getSinglePersonPhotoService", param, success,fail);
- }
-
-
- _private.fillMyContactMethod = function(){
- //获取我的信息模板
- var template = _private.getMyContactMethodTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- var htmlFragment = compiled_tpl.render(_private.personSummaryInfo);
- _private.htmlContent.push(htmlFragment);
-
- $('#rootpanel').eq(0).empty().append( _private.htmlContent.join(''));
-
- _private.registerListenerEvent('#con');
- //填写我的职级关系
- //_private.fillMyPositionRelation();
- }
-
- _private.getMyContactMethodTemplate = function(){
- var myContactMethodTemplate = ['<div class="tab-pane" id="contact">',
- '<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.contactInfo+'',
- '</div>',
- '<div class="panel-body">',
- '<div class="col-xs-4" align="left">'+localeResource.tel+'</div>',
- '<div id="cellVal" class="col-xs-6" align="right">${cell}</div>',
- '<div id="cell" class="col-xs-2"><span class="glyphicon glyphicon-phone"></span></div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-4" align="left">'+localeResource.officePhone+'</div>',
- '<div id="officephoneVal"class="col-xs-6" align="right" style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;">${officephone}</div>',
- '<div id="officephone" class="col-xs-2"><span class="glyphicon glyphicon-phone-alt"></span></div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-4" align="left">'+localeResource.email+'</div>',
- '<div id="emailVal" class="col-xs-6" align="right" style="text-overflow:ellipsis;white-space:nowrap;overflow:hidden;">${email}</div>',
- '<div id="email" class="col-xs-2"><span class="glyphicon glyphicon-envelope"></span></div>',
- '</div>',
- '</div>',
- '<div class="panel panel-default">',
- '<div class="panel-heading">'+localeResource.tag+'</div>',
- '<div class="panel-body" style="max-height:80px;word-wrap:break-word;word-break:break-all;overflow:hidden;">',
- '{@each personTags as item}',
- '<span class="label label-default">${item.name}</span> ',
- '{@/each}',
- '</div>',
- '</div>',
- '</div>'].join('');
- return myContactMethodTemplate;
- }
-
- _private.fillMyPositionRelation = function(){
- //获取上级组织模板
- var template = _private.getMyUpHierarchyTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callPersonUpHierarchyService('getPersonUpHierarchyService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyUpHierarchyTemplate = function(){
- var myUpHierarchyTemplate = ['<div class="tab-pane" id="relation">',
- '<div class="panel panel-default">',
- '<div class="panel-heading">',
- '<span class="badge pull-right">${upCount}</span>'+localeResource.superior+'',
- '</div>',
- '{@each upHierarchyList as item}',
- '<div class="panel-body upHierarchy" data-key="${item.id}">',
- '<div class="col-xs-3" align="left"><img src="data:image/png;base64,${item.photo}" alt="..." class="img-circle" style="width:60px;height:60px;border: 5px solid #fff;border-radius: 30px;" onerror="_private.showDefaultImg(this)"></div>',
- '<div class="col-xs-9">',
- '<div><h5><b>${item.name}</b></h5></div>',
- '<div><h6>${item.position} - ${item.dept}</h6></div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>'].join('');
- return myUpHierarchyTemplate
- }
-
- _private.callPersonUpHierarchyService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var personIdList = [];
- var success = function(data){
- var personIdList = [];
- if(data.length > 0){
- //去除上级人员的重复数据
- data = _private.removeMulitiData(data);
- _private.personHierarchy.upHierarchyList = [];
- _private.personHierarchy.upCount = data.length;
- for(var i in data){
- personIdList[i] = data[i].id;
- //解析组织信息
- var itemData = _private.parseData(data[i]);
- _private.personHierarchy.upHierarchyList.push(itemData);
- }
- }
-
- _private.getUpBatchPersonPhotos(personIdList,compiled_tpl, html);
-
-
- }
- var fail = function(data){
- //mbos.msgBox.showError('获取上级组织失败,请联系管理员.');
- _private.callPersonUpHierarchyService(serverName,compiled_tpl, html);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.getUpBatchPersonPhotos = function(personIdList, compiled_tpl, html){
- var param = [];
- param[0] = personIdList;
- var success = function(data){
- var upHierarchyList = _private.personHierarchy.upHierarchyList;
- for(var i in upHierarchyList){
- upHierarchyList[i].photo = data[upHierarchyList[i].id];
- }
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personHierarchy);
- html.push(htmlFragment);
-
- //填写下级组织
- _private.fillPersonDownHierarchy();
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg3);
- }
- mbos.eas.invokeScript("getBatchPersonPhotoService", param, success,fail);
- }
-
-
-
- _private.fillPersonDownHierarchy = function(){
- //获取下级组织模板
- var template = _private.getMyDownHierarchyTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callPersonDownHierarchyService('getPersonDownHierarchyService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyDownHierarchyTemplate = function(){
- var myDownHierarchyTemplate = [ '<div class="panel panel-default">',
- '<div class="panel-heading">',
- '<span class="badge pull-right">${downCount}</span>'+localeResource.subordinate+'',
- '</div>',
- '{@each downHierarchyList as item}',
- '<div class="panel-body downHierarchy" data-key="${item.id}">',
- '<div class="col-xs-3" align="left"><img src="data:image/png;base64,${item.photo}" alt="..." class="img-circle" style="width:60px;height:60px;border: 5px solid #fff;border-radius: 30px;" onerror="_private.showDefaultImg(this)" /></div>',
- '<div class="col-xs-9">',
- '<div><h5><b>${item.name}</b></h5></div>',
- '<div><h6>${item.position} - ${item.dept}</h6></div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>',
- '</div>'].join('');
- return myDownHierarchyTemplate
- }
-
- _private.callPersonDownHierarchyService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var personIdList = [];
- var success = function(data){
- if(data.length > 0){
- //去除下级重复人员信息
- data = _private.removeMulitiData(data);
-
- _private.personHierarchy.downHierarchyList = [];
- _private.personHierarchy.downCount = data.length;
- for(var i in data){
- personIdList[i] = data[i].id;
- //解析组织信息
- var itemData = _private.parseData(data[i]);
- _private.personHierarchy.downHierarchyList.push(itemData);
- }
- }
- _private.getDownBatchPersonPhotos(personIdList,compiled_tpl, html);
-
- }
- var fail = function(data){
- //mbos.msgBox.showError('获取下级组织失败,请联系管理员.');
- _private.callPersonUpHierarchyService(serverName,compiled_tpl, html);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.getDownBatchPersonPhotos = function(personIdList,compiled_tpl, html){
- var param = [];
- param[0] = personIdList;
- var success = function(data){
- var downHierarchyList = _private.personHierarchy.downHierarchyList;
- for(var i in downHierarchyList){
- downHierarchyList[i].photo = data[downHierarchyList[i].id];
- }
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personHierarchy);
- html.push(htmlFragment);
-
- $('#rootpanel').eq(0).empty().append( _private.htmlContent.join(''));
- _private.registerListenerEvent('#rel');
- //填写我的档案中的经历
- //_private.fillMyExperience();
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg5);
- }
- mbos.eas.invokeScript("getBatchPersonPhotoService", param, success,fail);
- }
-
- _private.fillMyExperience = function(){
- //获取下级组织模板
- var template = _private.getMyExperienceTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callExperienceService('getPersonDetailInfoService',compiled_tpl, _private.htmlContent);
-
-
- }
-
- _private.getMyExperienceTemplate = function(){
- var myDownHierarchyTemplate = ['<div class="tab-pane" id="archive">',
- '<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.empArchive+'',
- '</div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.empNum+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${number}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.age+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${age}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.gender+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${gender}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.marital+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${wed}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.politics+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${politicalFace}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.entryTime+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${enterDate}</div>',
- '</div>',
- '<div class="line"></div>',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">'+localeResource.grade+'</div>',
- '<div div class="col-xs-7 text-primary" align="left">${jobGrade}</div>',
- '</div>',
- '</div>'].join('');
- return myDownHierarchyTemplate
- }
-
- _private.callExperienceService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- //处理数据为null的情况
- for(var i in data){
- if(data[i] === null){
- data[i] = '';
- }
- }
- _private.personDetailInfo = data;
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personDetailInfo);
- html.push(htmlFragment);
- //填写我的企业任职经历
- _private.fillMyPositionMemberExperience();
- }
- var fail = function(data){
- _private.callExperienceService(serverName,compiled_tpl, html);
- //mbos.msgBox.showError('获取个人企业任职经历信息失败,请联系管理员.');
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.fillMyPositionMemberExperience = function(){
- //获取职业经历模板
- var template = _private.getMyPositionMemberExperienceTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callPositionMemberService('getPositionMemberService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyPositionMemberExperienceTemplate = function(){
- var myPositionMemberExperienceTemplate = ['<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.experience+'',
- '</div>',
- '{@each positionMemberList as item}',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">${item.beginDate} - {@if item.endDate != "2199年12月"}${item.endDate}{@else}'+localeResource.toDate+'{@/if}</div>',
- '<div div class="col-xs-7" align="left">',
- '<div><b>${item.dept}</b></div>',
- '<div>${item.position}</div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>'].join('');
- return myPositionMemberExperienceTemplate
- }
-
- _private.callPositionMemberService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- _private.personPositionMember.positionMemberList = data;
-
- //获取数据,进行渲染,拼接html片段
- var htmlFragment = compiled_tpl.render(_private.personPositionMember);
-
- _private.htmlContent.push(htmlFragment);
- //填写我的工作经历
- _private.fillMyWorkExperience();
-
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg6);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.fillMyWorkExperience = function(){
- //获取下级组织模板
- var template = _private.getMyWorkExperienceTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callWorkExperienceService('getWorkExpService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyWorkExperienceTemplate = function(){
- var myWorkExperienceTemplate = ['<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.socialExperience+'',
- '</div>',
- '{@each workExpList as item}',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">${item.beginDate} - {@if item.endDate != "2199年12月"}${item.endDate}{@else}'+localeResource.toDate+'{@/if}</div>',
- '<div div class="col-xs-7" align="left">',
- '<div><b>${item.company}</b></div>',
- '<div>${item.position}</div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>'].join('');
-
- return myWorkExperienceTemplate
- }
-
- _private.callWorkExperienceService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- _private.personWorkExp.workExpList = _private.parseDataList(data);
-
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personWorkExp);
-
- _private.htmlContent.push(htmlFragment);
-
- //填写教育经历
- _private.fillMyDegreeExperience();
-
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg7);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
-
- _private.fillMyDegreeExperience = function(){
- //获取下级组织模板
- var template = _private.getMyDegreeExperienceTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callDegreeExperienceService('getPersonDegreeService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyDegreeExperienceTemplate = function(){
- var myDegreeExperienceTemplate = ['<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.education+'',
- '</div>',
- '{@each degreeExpList as item}',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">{@if item.enrollDate != null}${item.enrollDate}{@else}{@/if} - {@if item.graduateDate != null}${item.graduateDate}{@else}{@/if}</div>',
- '<div div class="col-xs-7" align="left">',
- '<div><b>${item.graduateSchool}</b></div>',
- '<div>${item.diploma} ${item.specialty}</div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>'].join('');
-
- return myDegreeExperienceTemplate
- }
-
- _private.callDegreeExperienceService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- _private.personDegreeExp.degreeExpList = _private.parseDataList(data);
-
- //渲染数据
- var htmlFragment = compiled_tpl.render(_private.personDegreeExp);
-
- _private.htmlContent.push(htmlFragment);
-
- //填写人员绩效信息
- _private.fillMyProjectExperience();
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg8);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
-
- _private.fillMyProjectExperience = function(){
- //获取项目经验模板
- var template = _private.getMyProjectExperienceTemplate();
- //编译模板,暂时不渲染
- var compiled_tpl = juicer(template);
- //获取数据,进行渲染,拼接html片段
- _private.callProjectExperienceService('getPersonProjectExperienceService',compiled_tpl, _private.htmlContent);
- }
-
- _private.getMyProjectExperienceTemplate = function(){
- var myDegreeExperienceTemplate = ['<div class="panel panel-default">',
- '<div class="panel-heading">',
- ''+localeResource.projectExperience+'',
- '</div>',
- '{@each projectExpList as item}',
- '<div class="panel-body">',
- '<div class="col-xs-5" align="left">${item.startDate} - {@if item.endDate != "2199年12月"}${item.endDate}{@else}'+localeResource.toDate+'{@/if}</div>',
- '<div div class="col-xs-7" align="left">',
- '<div><b>${item.projectName}</b></div>',
- '<div>${item.character}</div>',
- '</div>',
- '</div>',
- '<div class="line"></div>',
- '{@/each}',
- '</div>',
- '</div>'].join('');
-
- return myDegreeExperienceTemplate
- }
-
- _private.callProjectExperienceService = function(serverName, compiled_tpl, html){
- var param = [];
- param[0] = _private.id;
- var success = function(data){
- _private.personProjectExp.projectExpList = _private.parseDataList(data);
-
- //渲染数据
- var htmlFragment = compiled_tpl.render( _private.personProjectExp);
- _private.htmlContent.push(htmlFragment);
-
- $('#rootpanel').eq(0).empty().append( _private.htmlContent.join(''));
- _private.registerListenerEvent('#arc');
-
- }
- var fail = function(data){
- mbos.msgBox.showError(localeResource.msg9);
- }
- mbos.eas.invokeScript(serverName, param, success,fail);
- }
- _private.parseDataList = function(data){
- for(var i in data){
- var info=data[i];
- if(info){
- for(var m in info){
- if(info[m]==null){
- info[m]='';
- }
- }
- }
- }
- return data;
- }
- _private.parseData = function(data){
- //处理null的情况
- for(var i in data){
- if(!data[i]){
- data[i] = '';
- }
- }
-
- var positionMemberList = data.positionMemberList;
- //先记录第一条任职经历
- var position = positionMemberList[0].position;
- var dept = positionMemberList[0].dept;
- var endDate = positionMemberList[0].endDate;
- if(endDate == '2199年12月'){
- positionMemberList[0].endDate = localeResource.toDate
- }
-
- for(var j=0;j< positionMemberList.length; j++){
- if(positionMemberList[j] === null){
- positionMemberList[j] = '';
- }
- if(j > 0){
- if(positionMemberList[j].beginDate >= positionMemberList[j-1].beginDate && positionMemberList[j].isPrimary){
- //替换最新的任职经历
- position = positionMemberList[j].position;
- dept = positionMemberList[j].dept;
- }
- }
- }
- //增加岗位和部门属性
- data.position = position;
- data.dept = dept;
- return data;
- }
-
- _private.removeMulitiData = function(data){
- var personIdArray = [];
- var personData = [];
- for(var i in data){
- if(personIdArray.indexOf(data[i].id) == -1 && data[i].id != _private.personSummaryInfo.id){
- personIdArray.push(data[i].id);
- personData.push(data[i]);
- }
- }
- return personData;
- }
-
- _private.showDefaultImg = function(img){
- img.src = ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAB4CAYAAAAE9le0AAAEcUlEQVR42u2cV27rMBBFuf+1pfdq',
- 'I7049haUdw0IMPRkiSocjqLzcT/SbIdHnMYZhs1mUyA/CiwCQBBAAIIAAhAEEIAggACEhQAIAghA',
- 'EEAAggACEAQQgCCAIIAABAEEIAggAHGm9XpdfH9/Fx8fH8Xb21vx/v6+/VrfB4gRAC387e1tcXx8',
- 'XBwcHOzV0dHR9vdeXl4mCcg1kNVqVTw8PBSHh4eNEPZJf3d3d1d8fX0BZIh+fn6Kx8fH3iDqwAis',
- 'AAOko+QP2sxSX8mcvb6+AiRWz8/Po+2Kpt2yWCwA0iYtUkoQVcmEAaRhZ1jCKOVxpwQPPiO1mWoy',
- 'X958SsgdTaVy4F2gKKkEyD8ptM0Jo5RyldkDUU6Qy1TV7RKVYWYNRFGOBxilrq+v5wtENSYvu2NX',
- 'HnxJFiAqFHqDIT09Pc0TiKqxHoFcXl7OE0juULfJuecu2Ycc/sMjjFK5S/XmQOQ4PQORf5sVEMX7',
- 'noGorjYrIF4jLC+RVshRTAQIPgQfQpQ1oTzEY9mklI4EyNSd6OLiYp6ZuprYPALxcKRLtdeR/8h6',
- 'HqJTOgqLjoDoafS0S3KHuy7O1L2cGno5LcwOxMO5ut7/8/MTIKXUF5UTiodTQnedi9ZtpJ7bSd30',
- '9lr7E/kNjwM9rrrftVMszJfge52ucjcfktKn6HW9+YxJTFApR1HiOCYYmShP0dQkZwx13KuFHJqB',
- 'e0n6/swUrg61ZGq0uDG7RlVb+aMpDXtOdk5d5xVaaD31akgQKElf6/u5zzO4yYGbHP6GvO4kV0CU',
- 'G1jZ/fPz8+L09HQ7NEQtq3JlhkJcLZActmbJLYqaddGYh3nDLEC0IE15RupdoiBgX4SmXZOzezFY',
- '7wiFo9oFOSuwMaeV2jE5wmYzIOpYPDs7G2UIU00SWrA6xTQqnJycdLojxbLuFSx2Rdfzc5mNttes',
- 'W1QtYNtTrZ93zfbl36zG3UJqGH1LH20399T5gZjx5r5nLxoysijBhJQwVMLoW4OSWWp7j93Xj70A',
- '4OrqyvXFNSFVFDUERuxp3m4nfczvj9UPptxlMkD0T8vmWrV1yiQqaovJvMecTUkVGoccIeWYA5hy',
- '0rFP7JjHxPp82qGugYx9zVKME9WixAIZY+dWHf3YucpoQFJ0IsYs9P39/XZh2naTTNoUOuaDh4hq',
- 'nxQRtb1vmfW3ZfcpL0mLiQhNgTTVhoba6dhFVhUg10yKEtmxsvnBQFJfQtZ0bVI1p2jyOVq0KXRA',
- 'DgaSusFtXyJWNzy6z8T1KZfk2iXBmyOv6ubmptNtdHVRz3K5nEyf8CAginBS/5MqInYxQXX1rKGt',
- 'RJZDP2FIecSqa71ao2rKuPWZdguTluNz1fc2BWJ5gWXVFLRVA3bzF+ubI4aardA377C880oZtiCU',
- 'anvilZuUB1apo6uqZMbNgXi/QGbKw6MhZwHxL0qWwxyISgVlCyf6X3Qu0kqKAAIQBBAEEIAggAAE',
- 'AQQgCCAAQQABCIsAEAQQgCCAAAQBBCAIIABBAEEAmYZ+Acsb6tSP1j3TAAAAAElFTkSuQmCC'].join('');
- img.onerror = null;
- }
-
- _private.registerListenerEvent = function(id){
- $(id).tab('show');//初始化显示哪个tab
- $('#myTab a').click(function (e) {
- e.preventDefault();//阻止a链接的跳转行为
- $(this).tab('show');//显示当前选中的链接及关联的content
- if($(this).attr('href') == "#relation"){
- if($('#relation').length <= 0){
- //填写我的职级关系
- _private.fillMyPositionRelation();
- }
- }else if($(this).attr('href') == "#archive"){
- if($('#archive').length <= 0){
- //填写我的档案中的经历
- _private.fillMyExperience();
- }
- }
- });
- $(".upHierarchy").on("click",function(event){
- var key = $(this).attr('data-key');
- mbos.ui.open({
- path:requestParam.path,
- name:requestParam.name,
- params:{
- appid: _private.appid,
- eid: _private.eid,
- storeEid: mbos.getRequestParams().storeEid,
- dataKey: encodeURIComponent(key)
- }
- });
- });
- $(".downHierarchy").on("click",function(event){
- var key = $(this).attr('data-key');
- mbos.ui.open({
- path:requestParam.path,
- name:requestParam.name,
- params:{
- appid: _private.appid,
- eid: _private.eid,
- storeEid: mbos.getRequestParams().storeEid,
- dataKey: encodeURIComponent(key)
- }
- });
- });
- $("#cell").on("click",function(event){
- if($("#cellVal").html()){
- window.location.href = 'tel:' + $("#cellVal").html();
- }else{
- mbos.msgBox.showInfo(localeResource.msg10);
- }
- });
- $("#officephone").on("click",function(event){
- if($("#officephoneVal").html()){
- window.location.href = 'tel:' + $("#officephoneVal").html();
- }else{
- mbos.msgBox.showInfo(localeResource.msg11);
- }
- });
- $("#email").on("click",function(event){
- if($("#emailVal").html()){
- window.location.href = 'mailto:' + $("#emailVal").html();
- }else{
- mbos.msgBox.showInfo(localeResource.msg12);
- }
- });
- }
-
- _private.controlEvent = function(){
-
- }
-
|