113 lines
4.3 KiB
Plaintext
113 lines
4.3 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));
|
|
|
|
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/GetLog?Id=@Html.Raw(ViewBag.Id)&LiveDate=@Html.Raw(ViewBag.LiveDate)',
|
|
method: 'POST',
|
|
cols: [[
|
|
{ field: 'Schedule', title: '课程'}
|
|
, { field: 'StarTime', title: '开始时间' }
|
|
, { field: 'Event', title: '事件'}
|
|
, { field: 'Ctime', title: '事件时间' }
|
|
, { field: 'Operator', title: '执行人' }
|
|
, { field: 'AuditRemark', title: '审核备注' }
|
|
, {
|
|
field: 'RejectReason', title: '驳回理由', templet: function (d)
|
|
{
|
|
var value = reasons.find(x => x.Key == d.RejectReason);
|
|
if (value) {
|
|
return value.Value;
|
|
}
|
|
else {
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
, {
|
|
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: 'RectificationAccessory', title: '整改附件', templet: function (d) {
|
|
if (d.RectificationAccessory && d.RectificationAccessory != '[]') {
|
|
return "<a class=\"layui-table-link\" href='javascript:ShowAtt(" + d.RectificationAccessory + ")'>查看<a>";
|
|
} else {
|
|
return "<font color='#dddddd'>无</font>"
|
|
}
|
|
}
|
|
}
|
|
, { field: 'RectificationRemark', title: '整改备注' }
|
|
]]
|
|
});
|
|
|
|
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
|
|
});
|
|
layer.open({
|
|
title: '查看附件',
|
|
type: 1,
|
|
content: $('#AttDialog'),
|
|
area: ['850px', '500px']
|
|
, 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>
|