You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

205 lines
6.8 KiB

@{
ViewBag.Title = "个人中心";
Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
.lr-layout-center .lr-layout-wrap {
padding-top:0px !important;
}
.lr-layout-wrap-item {
position:relative;
width:100%;
height:100%;
display:none;
padding:45px 20px 0 20px;
}
.lr-layout-wrap-item.active {
display:block;
}
.lr-layout-iframe {
width:100%;
height:100%;
}
.lr-layout-wrap-item .title {
position:absolute;
top:0;
left:0;
width:100%;
padding: 10px 20px 0 20px;
}
.lr-layout-wrap-item .title > div {
position:relative;
width:100%;
border-bottom: 1px solid #ccc;
line-height: 34px;
font-size: 12px;
font-weight: bold;
}
.lr-layout-wrap-item .content {
position:relative;
width:100%;
height:100%;
}
.lr-form-item {
position: relative;
min-height: 38px;
padding: 5px 0 5px 80px;
width:500px;
}
.lr-form-item-title {
position: absolute;
top: 0;
left: 0;
width: 80px;
height: 100%;
line-height: 38px;
text-align: left;
padding-right: 10px;
}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
background-color: #fff;
opacity: 1;
}
.form-control {
border-radius:4px;
}
</style>
<div id="lr_layout" class="lr-layout lr-layout-left-center">
<div class="lr-layout-left">
<div class="lr-layout-wrap lr-layout-wrap-notitle" style="padding-top:10px;">
<div class="lr-layout-body">
<ul class="lr-left-list" id="lr_left_list">
<li class="active" data-value="1">基本信息</li>
<li data-value="2">联系方式</li>
<li data-value="3">我的头像</li>
<li data-value="4">修改密码</li>
<li data-value="5">我的日志</li>
</ul>
</div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-wrap-item active" id="lr_layout_item1">
<div class="title">
<div>基本信息</div>
</div>
<div class="content" style="padding-top:20px;">
<div class="lr-form-item">
<div class="lr-form-item-title">公司</div>
<input id="F_CompanyName" type="text" class="form-control" readonly/>
</div>
<div class="lr-form-item">
<div class="lr-form-item-title">账号</div>
<input id="F_Account" type="text" class="form-control" readonly />
</div>
<div class="lr-form-item">
<div class="lr-form-item-title">工号</div>
<input id="F_EnCode" type="text" class="form-control" readonly />
</div>
<div class="lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="F_RealName" type="text" class="form-control" readonly />
</div>
<div class="lr-form-item">
<div class="lr-form-item-title">备注</div>
<textarea id="F_Description" class="form-control" style="height:100px;" readonly></textarea>
</div>
</div>
</div>
<div class="lr-layout-wrap-item" id="lr_layout_item2">
<div class="title">
<div>联系方式</div>
</div>
<div class="content" style="padding-top:20px;">
<iframe class="lr-layout-iframe" frameborder="0" src="~/UserCenter/ContactForm"></iframe>
</div>
</div>
<div class="lr-layout-wrap-item" id="lr_layout_item3">
<div class="title">
<div>我的头像</div>
</div>
<div class="content" style="padding-top:20px;">
<iframe class="lr-layout-iframe" frameborder="0" src="~/UserCenter/HeadForm"></iframe>
</div>
</div>
<div class="lr-layout-wrap-item" id="lr_layout_item4">
<div class="title">
<div>修改密码</div>
</div>
<div class="content" style="padding-top:20px;">
<iframe class="lr-layout-iframe" frameborder="0" src="~/UserCenter/PassWordForm"></iframe>
</div>
</div>
<div class="lr-layout-wrap-item" id="lr_layout_item5" style="padding:0;">
<iframe class="lr-layout-iframe" frameborder="0" src="~/UserCenter/LogIndex"></iframe>
</div>
</div>
</div>
</div>
<script>
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.F_Account);
$('#F_EnCode').val(baseinfo.F_EnCode);
$('#F_RealName').val(baseinfo.F_RealName);
$('#F_Description').val(baseinfo.F_Description);
learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Company/GetEntity?keyValue=' + baseinfo.F_CompanyId, function (res) {
if (res.code == 200) {
var cp = res.data;
/*基础信息*/
if (!!cp) {
$('#F_CompanyName').val(cp.F_FullName);
}
}
});
//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));
}
else {
learun.alert.error('数据加载失败');
}
});
}
};
page.init();
}
</script>