|
|
|
@ -6,8 +6,35 @@ |
|
|
|
|
<title>编辑</title> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
$(function () { |
|
|
|
|
$("#image_td").hide(); |
|
|
|
|
$("#menuIco").val('${sysResource.menuIco}'); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
$('#file').change(function () { |
|
|
|
|
var imgPath = getObjectURL(this.files[0]); |
|
|
|
|
$("#imageShow").attr("src",imgPath); |
|
|
|
|
$("#image_td").show(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var userImageUrl = '${sysUser.imgUrl}'; |
|
|
|
|
console.log(userImageUrl); |
|
|
|
|
if (userImageUrl!=null&&userImageUrl!=''){ |
|
|
|
|
$("#imageShow").attr("src",'${ctx}/loadFile/'+userImageUrl); |
|
|
|
|
$("#image_td").show(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
//构建本地图片路径 |
|
|
|
|
function getObjectURL(file) { |
|
|
|
|
var url = null ; |
|
|
|
|
if (window.createObjectURL!=undefined) { |
|
|
|
|
url = window.createObjectURL(file) ; |
|
|
|
|
} else if (window.URL!=undefined) { |
|
|
|
|
url = window.URL.createObjectURL(file) ; |
|
|
|
|
} else if (window.webkitURL!=undefined) { |
|
|
|
|
url = window.webkitURL.createObjectURL(file) ; |
|
|
|
|
} |
|
|
|
|
return url ; |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
@ -34,10 +61,15 @@ |
|
|
|
|
<td><input class="easyui-textbox" type="text" id="email" data-options="multiline:true,required:true" value="${sysUser.email}" ></input></td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<tr > |
|
|
|
|
<td>头像:</td> |
|
|
|
|
<td><input type="file" name="file" id="file" data-options="multiline:true,required:true" ></input></td> |
|
|
|
|
</tr> |
|
|
|
|
<tr id="image_td"> |
|
|
|
|
<td colspan="2" align="center"> |
|
|
|
|
<img src="" id="imageShow" width="100" height="100"> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>备注:</td> |
|
|
|
|