67 lines
2.0 KiB
JavaScript
67 lines
2.0 KiB
JavaScript
/*
|
||
* 版 本 PIT-ADMS V7.0.3 敏捷开发框架
|
||
* Copyright (c) 2013-2018 Hexagon PPM
|
||
* 创建人:力软-前端开发组
|
||
* 日 期:2017.03.22
|
||
* 描 述:个人中心
|
||
*/
|
||
var baseinfo;
|
||
var bootstrap = function ($, learun) {
|
||
"use strict";
|
||
|
||
var page = {
|
||
init: function () {
|
||
page.initleft();
|
||
page.bind();
|
||
page.initData();
|
||
},
|
||
bind: function () {
|
||
|
||
},
|
||
initleft: function () {
|
||
$('#lr_left_list li').on('click', function () {
|
||
var $this = $(this);
|
||
if (!$this.hasClass('active')) {
|
||
var $parent = $this.parent();
|
||
$parent.find('.active').removeClass('active');
|
||
$this.addClass('active');
|
||
var _type = $this.attr('data-value');
|
||
$('.lr-layout-wrap-item').removeClass('active');
|
||
$('#lr_layout_item' + _type).addClass('active');
|
||
}
|
||
});
|
||
},
|
||
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 ? '女' : (baseinfo.gender == 1 ? '男' : ""));
|
||
learun.clientdata.getAsync('company', {
|
||
key: baseinfo.companyId,
|
||
callback: function (_data) {
|
||
$('#F_Company').val(_data.name);
|
||
}
|
||
});
|
||
$('#F_Description').val(baseinfo.description);
|
||
}
|
||
else {
|
||
learun.alert.error('数据加载失败');
|
||
}
|
||
});
|
||
|
||
|
||
}
|
||
};
|
||
|
||
|
||
|
||
page.init();
|
||
}
|
||
|
||
|