Authored by caoyan

Merge branch 'dev_鉴定优化_20190611' into test6.9.6

... ... @@ -25,10 +25,11 @@
<table id="screenshotsTable">
</table>
</div>
<div style="display: none">
<div id="dlg" class="datagrid-toolbar" style="padding:5px;">
<img id="simg" src="" alt="" width="800">
</div>
<div id="w" class="easyui-window" title="预览" data-options="modal:true,closed:true" style="width:500px;height:600px;padding:10px;">
<div align="center">
<img id="showImg" height="500px;" width="400px;" onclick="window.open(this.src)"/>
</div>
</div>
<script>
$(function() {
... ... @@ -55,33 +56,8 @@ $(function() {
loadMainList();
//放大图片预览
$(".pimg").click(function(){
alert("****");
var _this = $(this);//将当前的pimg元素作为_this传入函数
var src = _this.attr("src");
alert(src);
//var index = src.indexOf("?");
//src = src.substring(0, index);
//window.open(src);
download(src);
});
});
function download(url) {
$('#dlg').dialog({
title: '预览',
width: 800,
height: 600,
resizable: false,
closed: false,
cache: false,
modal: true
});
$("#simg").attr("src", url);
}
function loadMainList(){
$("#screenshotsTable").myDatagrid({
fit: true,
... ... @@ -109,8 +85,8 @@ function loadMainList(){
var imageStr = "<table><tbody><tr>";
if(value != null){
for (var i = 0 ;i < value.length; i++){
imageStr += "<td><img height='200px;' width='150px;' class='pimg' src='"+value[i].url+"'/>";
//imageStr += "<br>创建时间:"+value[i].createTimeStr+"<br>操作人:"+value[i].createUserName;
imageStr += "<td><a href='javascript:void(0)' onclick='openModal("+"\""+value[i].url+"\""+")'><img height='200px;' width='150px;' src='"+value[i].url+"'/></a>";
imageStr += "<br><font color='black'>创建时间:"+value[i].createTimeStr+"<br>操作人:"+value[i].createUserName + "</font>";
imageStr += "</td>";
if((i+1) % 5 == 0 && 0 != i && i != (value.length - 1)) {
imageStr += "</tr><tr>";
... ... @@ -136,6 +112,12 @@ function loadMainList(){
});
}
function openModal(imageUrl){
$("#showImg").attr("src",imageUrl);
$("#w").window("open");
}
</script>
</body>
</html>
\ No newline at end of file
... ...