1
This commit is contained in:
@@ -6,11 +6,36 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>隐患整改单</title>
|
||||
<link href="../../res/css/viewer.min.css" rel="stylesheet" />
|
||||
<script src="../../res/js/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script src="../../res/js/viewer.min.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
.imgPreview {
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%; /*容器占满整个屏幕*/
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.imgPreview img {
|
||||
z-index: 100;
|
||||
width: 60%;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
/*添加鼠标移入图片效果*/
|
||||
.img {
|
||||
cursor: url("ico/放大镜.png"), auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -57,7 +82,7 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="CheckRectifyItemId" AllowCellEditing="true" Height="420px"
|
||||
BoxFlex="1" DataKeyNames="CheckRectifyItemId" AllowCellEditing="true" Height="620px"
|
||||
ClicksToEdit="1" DataIDField="CheckRectifyItemId" EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
@@ -74,10 +99,16 @@
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Bind("RiskExists") %>' ToolTip='<%#Bind("RiskExists") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改前" Text="相关照片"
|
||||
<f:TemplateField ColumnID="tfImageUrl1" MinWidth="120px" HeaderText="整改前" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl1" runat="server" Text='<%# ConvertImageUrlByImage(Eval("NoticeItemId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%--<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改前" Text="相关照片"
|
||||
ToolTip="相关照片附件" DataIFrameUrlFields="NoticeItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&type=-1"
|
||||
Title="相关照片" ColumnID="WindowAtt">
|
||||
</f:WindowField>
|
||||
</f:WindowField>--%>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="整改后" Text="相关照片"
|
||||
ToolTip="相关照片附件" DataIFrameUrlFields="CheckRectifyItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Check&menuId=2E4A3E58-44B7-41B0-BFE3-634DF29AAE27"
|
||||
Title="相关照片" ColumnID="WindowAtt1">
|
||||
@@ -108,12 +139,19 @@
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Verification" DataField="Verification" Width="100px" HeaderToolTip="企业管理部门验证人"
|
||||
<%-- <f:RenderField ColumnID="Verification" DataField="Verification" Width="100px" HeaderToolTip="企业管理部门验证人"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="验证人">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtVerification" Text='<%# Eval("Verification")%>' MaxLength="50" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField ColumnID="Situation" DataField="Situation" Width="220px" HeaderToolTip="整改情况"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="整改情况">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtSituation" Text='<%# Eval("Situation")%>' MaxLength="500" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="1px" ColumnID="CheckRectifyItemId" DataField="CheckRectifyItemId"
|
||||
FieldType="String" HeaderText="主键" Hidden="true" HeaderTextAlign="Center">
|
||||
@@ -143,5 +181,43 @@
|
||||
IsModal="true" Width="800px" Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<div class="imgPreview">
|
||||
<img src="#" alt="" id="imgPreview" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var imgID = '<%=Grid1.ClientID %>';
|
||||
function showImg() {
|
||||
var $wrap = $("#" + imgID)
|
||||
//console.log($wrap)
|
||||
$wrap.find('img').on('click', function () {
|
||||
var src = $(this).attr('src');
|
||||
console.log(src)
|
||||
if (src.indexOf("/res/icon") != -1) {
|
||||
return;
|
||||
}
|
||||
var div = document.createElement('div');
|
||||
div.style.display = 'none';
|
||||
div.innerHTML = '<img src="' + src + '">'; // 创建一个包含图片的 div 元素
|
||||
document.body.appendChild(div); // 将 div 元素添加到页面中
|
||||
|
||||
var viewer = new Viewer(div.firstChild); // 创建 Viewer 实例并传入图片元素
|
||||
viewer.show(); // 显示图片预览
|
||||
|
||||
// 在 Viewer 关闭后移除添加的 div 元素
|
||||
viewer.on('hidden', function () {
|
||||
document.body.removeChild(div);
|
||||
});
|
||||
|
||||
});
|
||||
$('.imgPreview').on('click', function () {
|
||||
// $('.imgPreview').hide()
|
||||
});
|
||||
}
|
||||
F.ready(function () {
|
||||
showImg();
|
||||
})
|
||||
</script>
|
||||
<script src="../../res/js/hook.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user