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

213 lines
8.2 KiB
Plaintext

@using Core.Web.WebHelper
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="x-body">
<div class="layui-btn-group" style="padding-bottom:10px;">
@*<button class="layui-btn layui-btn-normal" data-method="add">添加</button>
<button class="layui-btn layui-btn-normal" data-method="edit">编辑</button>*@
@Html.Action("ToolBar", "Home",
new
{
area = "",
rightcode = (ViewBag.rightCode as string),
otherToolBars = new Core.Web.WebHelper.ToolBar[]{
new Core.Web.WebHelper.ToolBar(ToolBarConfig.CONST_Check, "审核", " " ,"",true)
}
}
)
</div>
<form class="layui-form">
<div id="mytoolbar">
<input type="hidden" id="txt_SchedulesId" name="txt_SchedulesId" value="@ViewBag.Id" />
时间:
<div class="layui-inline">
<input class="layui-input" placeholder="开始时间" name="txt_STime" id="STime" style="width:120px;">
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止时间" name="txt_ETime" id="ETime" style="width:120px;">
</div>
审核状态:
<div class="layui-inline">
<select name="slt_LiveAuditStatus" style="height:35px;">
<option value="">全部</option>
@{
if (ViewBag.Status != null)
{
var list = ViewBag.Status as List<CRM.Core.DTO.LiveAuditKeyValue>;
foreach (var item in list)
{
if(item.Key == 2)
{
continue;
}
<option value="@item.Key">@item.Value</option>
}
}
}
</select>
</div>
<div style="float: right;">
<button class="layui-btn layui-btn-normal" style="width:100px;" type="button" id="search" data-type="reload">搜索</button>
<button class="layui-btn layui-btn-normal" style="width: 100px; margin-left: 10px !important;" type="reset">重置</button>
</div>
</div>
</form>
<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;
var laydate = layui.laydate;
laydate.render({ elem: '#STime' });
laydate.render({ elem: '#ETime' });
table.render({
id: 'PlayBackList',//列表别名ID
elem: '#tabl1',//表ID
url: '/LiveAudit/GetPlayBack',
method: 'POST',
cols: [[
{ type: "checkbox", fixed: "left" }
, { field: 'PBId', title: 'ID' }
, { field: 'CTime', title: '时间', width: 200 }
, { field: 'Title', title: '名称', width: 400 }
, {
field: 'Link', title: '回放链接', width: 300, templet: function (d) {
return "<a target='_Black' href='https://app.hc.idongniu.com/activity/00000052.html?id=" + d.PBId + "'>https://app.hc.idongniu.com/activity/00000052.html?id=" + d.PBId +"</a>";
}
},
{
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: 'Operation', title: '操作', templet: function (d) {
return "<a href=\"javascript:ShowPlayBackLog(" + d.PBId + ");\" style='color:#01AAED'>审核记录</a>";
}
}
]] , page: {
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
//,curr: 5 //设定初始在第 5 页
, groups: 5 //只显示 1 个连续页码
},
limit:50
, where: GetParams("mytoolbar")
});
$('#mytoolbar #search').on('click', function (data) {
table.reload('PlayBackList', {
where: GetParams("mytoolbar")
});
});
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 }
]]
});
var active = {
check: function () {
var checkStatus = table.checkStatus('PlayBackList');
if (checkStatus.data.length <= 0) {
layer.msg("请勾选要执行的记录!");
return;
}
var idList = checkStatus.data.map(d => d.PBId);
var ids = idList.join()
var SchedulesId = @Html.Raw(ViewBag.Id);
var width = $(window).width() * 0.5;
var height = $(window).height() * 0.8;
layer.open({
type: 2,
content: '/LiveAudit/PlayBackAudit?Ids=' + ids + '&SchedulesId=' + SchedulesId,
title: "直播审核",
area: [width + 'px', height + 'px']
});
}
}
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
function ShowPlayBackLog(id) {
var width = $(window).width() * 0.8;
var height = $(window).height() * 0.8;
layer.open({
type: 2,
content: '/LiveAudit/PlayBackLog?Id=' + id,
title: "审核记录",
area: [width + 'px', height + 'px']
});
}
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();
}
});
});
}
function TableReload() {
table.reload('PlayBackList', {
});
}
</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>