ComplianceServer/oldcode/Core.Web/Views/CmsLiveRoom/Index.cshtml

133 lines
4.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using CRM.Core.Model.Entity
@using Core.Web.WebHelper
@{
/**/
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<style>
.self-table-click td {
background-color: #f3ebbc;
}
.showMsg {
margin-left: 20px;
cursor: pointer;
}
</style>
<div class="x-body">
<div class="layui-btn-group" style="padding-bottom:10px;">
</div>
<div id="mytoolbar">
名称:
<div class="layui-inline">
<input type="text" name="txt_Name" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
</div>
时间:
<div class="layui-inline">
<input class="layui-input" placeholder="开始日" name="txt_ChosenDateStart" id="xstart" style="width:120px;" autocomplete="off">
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止日" name="txt_ChosenDateEnd" id="xend" style="width:120px;" autocomplete="off">
</div>
<button class="layui-btn" data-type="reload">搜索</button>
</div>
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
<iframe id="BillOpen" width="0" height="0" scrolling="no" frameborder="0" style="display:none;"></iframe>
</div>
<script>
var selectRow = {};
layui.use('laydate', function () {
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({ elem: '#start' });
//执行一个laydate实例
laydate.render({ elem: '#end' });
laydate.render({ elem: '#xstart' });
laydate.render({ elem: '#xend' });
laydate.render({ elem: '#kstart' });
laydate.render({ elem: '#kend' });
laydate.render({ elem: '#aistart' });
laydate.render({ elem: '#aiend' });
});
layui.use(['table', 'form'], function () {
var table = layui.table;
var form = layui.form;
var param2 = GetParams("mytoolbar");
console.log("param2:" + param2);
table.render({
id: 'testReload',//列表别名ID
elem: '#tabl1',//表ID
url: '/CmsLiveRoom/Index',
method: 'POST',
even: true, //开启隔行背景
cols: [[
//{ type: 'checkbox' }
//,
{ field: '', title: '序号', width: 80, type: 'numbers', fixed: true }
, { field: 'title', title: '直播间' }
, { field: 'start_time', title: '直播开始时间' }
, { field: 'stop_time', title: '直播结束时间' }
, {
field: 'uri', title: '播放', width: 180, fixed: 'right', templet: function (res) {
if (res.uri != '' && res.uri != null) {
return "<a href=\"javascript:void(0)\" style=\"color:blue\" onclick=\"play('" + res.uri + "')\">" + "播放" + "</a>";
}
}
}
//, { field: 'call', title: '操作', templet: '#callTpl', fixed: 'right', width: 60 }
]]
,
page: { //支持传入 laypage 组件的所有参数某些参数除外jump/elem - 详见文档
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
//,curr: 5 //设定初始在第 5 页
, groups: 5 //只显示 1 个连续页码
}
, where: param2
});
$('#mytoolbar .layui-btn').on('click', function (data) {
var param = GetParams("mytoolbar");
table.reload('testReload', {
page: {
curr: 1 //重新从第 1 页开始
},
where: param
});
});
//监听行单击事件
table.on('row(tabl1)', function (obj) {
var data = obj.data;
//console.log(data);
//标注选中样式
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
selectRow = data;
});
});
layui.use('layer', function () {
var layer = layui.layer;
$('.layui-btn-group .layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
active[method] ? active[method].call(this, othis) : '';
});
});
function play(id) {
var width = $(window).width() * 0.8;
var height = $(window).height() * 0.8;
layer.open({
type: 2,
content: '/CmsLiveRoom/Play?url=' + id,
title: "播放",
area: [ '800px', '600px']
});
}
</script>