ComplianceServer/oldcode/Core.Web/Views/LiveAudit/PlayBackLog.cshtml

126 lines
4.8 KiB
Plaintext

@using Core.Web.WebHelper
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="x-body">
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
</div>
<div id="AttDialog" class="layui-form" style="display:none;">
<div class="x-body">
<table class="layui-hide" id="tabl3" lay-filter="tabl3"></table>
</div>
</div>
<script>
var selectRow = {};
var table;
var reasons = @Html.Raw(Json.Encode(ViewBag.Reasons));
var statuss = @Html.Raw(Json.Encode(ViewBag.Status));
layui.use(['table', 'form', 'layer', 'upload', 'laydate'], function () {
table = layui.table;
var form = layui.form;
var layer = layui.layer;
var upload = layui.upload;
table.render({
id: 'LogList',//列表别名ID
elem: '#tabl1',//表ID
url: '/LiveAudit/GetPlayBackLog?Id=@Html.Raw(ViewBag.Id)',
method: 'POST',
cols: [[
{ field: 'Creater', title: '审核人' }
, { field: 'Ctime', title: '审核时间' }
,{
field: 'AuditStatus', title: '审核状态', width: 100, templet: function (d) {
var value = statuss.find(x => x.Key == d.AuditStatus);
if (value) {
return value.Value;
}
else {
return "";
}
}
}
, {
field: 'RejectReason', title: '违规理由', templet: function (d)
{
var value = reasons.find(x => x.Key == d.RejectReason);
if (value) {
return value.Value;
}
else {
return "";
}
}
}
, { field: 'AuditRemark', title: '审核备注' }
, {
field: 'AuditAccessory', title: '审核附件', templet: function (d) {
if (d.AuditAccessory && d.AuditAccessory != '[]') {
return "<a class=\"layui-table-link\" href='javascript:ShowAtt(" + d.AuditAccessory +")'>查看<a>";
} else {
return "<font color='#dddddd'>无</font>"
}
}
}
, { field: 'Solver', title: '整改人' }
, { field: 'SolveTime', title: '整改时间' }
, { field: 'SolveRemark', title: '整改备注' }
, {
field: 'SolveAccessory', title: '整改附件', templet: function (d) {
if (d.SolveAccessory && d.SolveAccessory != '[]') {
return "<a class=\"layui-table-link\" href='javascript:ShowAtt(" + d.SolveAccessory + ")'>查看<a>";
} else {
return "<font color='#dddddd'>无</font>"
}
}
}
]]
});
table.render({
id: 'testReload3'//列表别名ID
, elem: '#tabl3'//表ID
, data: []
, cols: [[
{ field: 'id', title: '序号', type: 'numbers', align: "center", width: 60 }
, { field: 'fileName', title: '文件名称', align: "center", width: 250 }
, { field: 'fileSize', title: '文件大小', align: "center", width: 100 }
, { field: 'fileUrl', title: '操作', templet: '#fileTpl', width: 100, align: "center" }
, { field: 'uploader', title: '上传人', align: "center", width: 113 }
, { field: 'uploadTime', title: '上传时间', align: "center", width: 180 }
]]
});
});
function ShowAtt(data) {
layui.use(['table', 'form', 'layer', 'upload', 'laydate'], function () {
var layer = layui.layer;
table.reload('testReload3', {
data: data
});
var width = $(window).width() * 0.7;
var height = $(window).height() * 0.8;
layer.open({
title: '查看附件',
type: 1,
content: $('#AttDialog'),
area: [width + 'px', height + 'px']
, btn: ['关闭']
, yes: function (index, layero) {
layer.closeAll();
}
});
});
}
</script>
<script type="text/html" id="fileTpl">
{{# if(d.fileUrl != null){ }}
<a href="{{d.fileUrl}}" target="_blank" class="layui-table-link" download="{{d.fileName}}">下载</a>
{{# } }}
</script>