|
- /*
- * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:陈彬彬
- * 日 期:2017.03.22
- * 描 述:个人信息维护
- */
- var baseinfo;
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.bind();
- page.initData();
- },
- bind: function () {
- //选项卡
- $("#PM_EducationExperience").attr("src", "/EducationalAdministration/PM_EducationExperience/Index?empId=" + NewEmpId);
- $("#PM_TechnicalPost").attr("src", "/EducationalAdministration/PM_TechnicalPost/Index?empId=" + NewEmpId);
- $("#PM_WorkerTechnology").attr("src", "/EducationalAdministration/PM_WorkerTechnology/Index?empId=" + NewEmpId);
- $("#PM_Resume").attr("src", "/EducationalAdministration/PM_Resume/Index?empId=" + NewEmpId);
- $("#PM_FamilySituation").attr("src", "/EducationalAdministration/PM_FamilySituation/Index?empId=" + NewEmpId);
-
- // 显示信息选项卡
- $('#tablist').lrFormTabEx();
- $('#tablist li').eq(0).trigger('click');
- },
- initData: function () {
- learun.httpAsyncGet(top.$.rootUrl + '/UserCenter/GetUserInfo', function (res) {
- if (res.code == 200) {
- baseinfo = res.data.baseinfo;
- /*基础信息*/
- $('#F_Account').val(baseinfo.account);
- $('#F_EnCode').val(baseinfo.enCode);
- $('#F_RealName').val(baseinfo.realName);
- $('#F_Gender').val(baseinfo.gender == 0 ? '女' : '男');
- learun.clientdata.getAsync('company', {
- key: baseinfo.companyId,
- callback: function (_data) {
- $('#F_Company').val(_data.name);
- }
- });
-
- learun.clientdata.getAsync('department', {
- key: baseinfo.departmentId,
- callback: function (_data) {
- $('#F_Department').val(_data.name);
- }
- });
- var post = [], role = [];
- $.each(res.data.post, function (id, item) {
- post.push(item.F_Name);
- });
- $.each(res.data.role, function (id, item) {
- role.push(item.F_FullName);
- });
- $('#Post').val(String(post));
- $('#Role').val(String(role));
- $('#F_Description').val(baseinfo.description);
- }
- else {
- learun.alert.error('数据加载失败');
- }
- }.bind(this));
-
- }
- };
- refreshGirdData = function () {
- page.initData();
- };
-
-
- page.init();
- }
-
|