grgw_old_java/heatsupply2/WebContent/webpage/modules/sys/userInfo.jsp

215 lines
7.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>个人信息</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
$(document).ready(function() {
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
width='auto';
height='auto';
}else{//如果是PC端根据用户设置的width和height显示。
width='700px';
height='500px';
}
$("#userPassWordBtn").click(function(){
top.layer.open({
type: 2,
area: ["500px", "350px"],
title:"修改密码",
content: "${ctx}/sys/user/modifyPwd" ,
btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var btn = body.find('#btnSubmit');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后从服务器返回的url在当前tab中展示
inputForm.validate({
rules: {
},
messages: {
confirmNewPassword: {equalTo: "输入与上面相同的密码"}
},
submitHandler: function(form){
// loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
if(inputForm.valid()){
// loading("正在提交,请稍等...");
inputForm.submit();
top.layer.close(index);//关闭对话框。
}else{
return;
}
},
cancel: function(index){
}
});
});
$("#userInfoBtn").click(function(){
top.layer.open({
type: 2,
area: [width, height],
title:"个人信息编辑",
content: "${ctx}/sys/user/infoEdit" ,
btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后从服务器返回的url在当前tab中展示
inputForm.validate();
if(inputForm.valid()){
// loading("正在提交请稍1等...");
inputForm.submit();
}else{
return;
}
top.layer.close(index);//关闭对话框。
},
cancel: function(index){
}
});
});
$("#userImageBtn").click(function(){
top.layer.open({
type: 2,
area: [width, height],
title:"上传头像",
content: "${ctx}/sys/user/imageEdit" ,
// btn: ['确定', '关闭'],
yes: function(index, layero){
var body = top.layer.getChildFrame('body', index);
var inputForm = body.find('#inputForm');
var top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
inputForm.attr("target",top_iframe);//表单提交成功后从服务器返回的url在当前tab中展示
inputForm.validate();
if(inputForm.valid()){
loading("正在提交,请稍等...");
inputForm.submit();
}else{
return;
}
top.layer.close(index);//关闭对话框。
},
cancel: function(index){
}
});
});
});
</script>
<style type="text/css">
.bqys{
background: #008B8B;
border-radius: 10px;
border: 1px solid #379082;
float: right;
margin-right: 5px;
padding: 2px 4px;
}
</style>
</head>
<body style="width: 100%;height: auto;">
<div class="ibox-title">
<h5>个人资料</h5>
<div class="ibox-tools">
<div class="bqys"><a id="userImageBtn" data-toggle="modal" data-target="#register" style="color: #FFFFFF;">更换头像 </a></div>
<div class="bqys"><a id="userInfoBtn" data-toggle="modal" data-target="#register" style="color: #FFFFFF;">编辑资料 </a></div>
<div class="bqys"><a id="userPassWordBtn" data-toggle="modal" data-target="#register" style="color: #FFFFFF;">更换密码 </a></div>
</div>
</div>
<div class="ibox-content">
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
<tbody>
<tr>
<td class="width-15 active"><label class="pull-right">姓名:</label></td>
<td class="width-35">
${user.name}
</td>
<td class="width-15" rowspan="3" colspan="2">
<div style="width: 100%;height: 100%;text-align: center;">
<img alt="image" class="img-responsive" src="${user.photo }" class="img-rcircle" style="width: 90px;height: 90px;border-radius: 10px; border: 1px solid #379082;" />
</div>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">邮箱:</label></td>
<td class="width-35" >
${user.email}
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">用户类型:</label></td>
<td class="width-35" >
${fns:getDictLabel(user.userType, 'sys_user_type', '无')}
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">手机:</label></td>
<td class="width-35">
${user.mobile}
</td>
<td class="width-15 active"><label class="pull-right">电话:</label></td>
<td class="width-35" >
${user.phone}
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">公司:</label></td>
<td class="width-35">
${user.company.name}
</td>
<td class="width-15 active"><label class="pull-right">部门:</label></td>
<td class="width-35" >
${user.office.name}
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">用户角色:</label></td>
<td class="width-35" colspan="3">
${user.roleNames}
</td>
</tr>
<tr>
<td class="width-15 active" style="height: 80px;"><label class="pull-right">备注</label></td>
<td class="width-35" colspan="3">
${user.remarks}
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
<div style="width: 100%;height: 100%;text-align: center;">
<strong>上次登录</strong>
IP: ${user.oldLoginIp}&nbsp;&nbsp;&nbsp;&nbsp;<br/>时间:<fmt:formatDate value="${user.oldLoginDate}" type="both" dateStyle="full"/>
</div>
</body>
</html>