chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
This commit is contained in:
+561
@@ -0,0 +1,561 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>视频设置-e订通后台</title>
|
||||
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.7/skins/default/aliplayer-min.css">
|
||||
<script src="https://g.alicdn.com/de/prismplayer/2.8.7/aliplayer-min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="js/aliplayercomponents.min.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.layui-table-cell {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<blockquote class="layui-elem-quote" style="line-height:44px;padding:8px;" id="search_top">
|
||||
<form class="layui-form" id="form1_search" action="video.htm">
|
||||
<div class="layui-tab" lay-filter="tab1">
|
||||
<div class="layui-inline"><ul class="layui-tab-title"></ul></div>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<input type="hidden" id="s_cate" name="s_cate" value=0>
|
||||
<!-- <div class="layui-inline"><a class="layui-btn layui-btn-normal btn_import">导入</a></div> -->
|
||||
<!-- <div class="layui-inline"><a class="layui-btn layui-btn-normal btn_export">导出</a></div> -->
|
||||
<div class="layui-inline" id="btn_upload_aly"><a class="layui-btn layui-btn-normal btn_upload_aly">上传阿里云</a></div>
|
||||
<div class="layui-inline" id="btn_upload_aly_lb"><a class="layui-btn layui-btn-normal btn_upload_aly_lb">上传阿里云</a></div>
|
||||
<!-- <div class="layui-inline" id="btn_upload_local"><a class="layui-btn layui-btn-normal btn_upload_local">上传本地</a></div> -->
|
||||
<div class="layui-inline"><a class="layui-btn layui-btn-danger btn_del">删除</a></div>
|
||||
<div class="layui-inline"><a class="layui-btn btn_showall">显示全部</a></div>
|
||||
<div class="layui-input-inline" style="width:130px;" id="search_keyword"></div>
|
||||
<div class="layui-input-inline" style="width:130px;" id="search_time1"><input type="text" class="layui-input" id="search_time" placeholder="开始时间 到 结束时间"></div>
|
||||
<div class="layui-inline" id="btn_get_record"><a class="layui-btn layui-btn-normal btn_get_record">获取录播列表</a></div>
|
||||
<!-- <div class="layui-inline" id="btn_get_dllist"><a class="layui-btn layui-btn-normal btn_get_dllist">视频下载地址</a></div> -->
|
||||
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 搜 索 </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</blockquote>
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item" >
|
||||
<div id='err'></div>
|
||||
<div id='player-con' class="prism-player" style="display:none;"></div>
|
||||
<table id="layui_table" class="layui-table" lay-filter="layui_table">
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--操作-->
|
||||
<script type="text/html" id="caozuo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
</script>
|
||||
<script>
|
||||
/*var global_player = new Aliplayer({
|
||||
"id": "player-con",
|
||||
"source": "",
|
||||
"width": "100%",
|
||||
"height": "300px",
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"autoplay": false,
|
||||
"preload": true,
|
||||
"controlBarVisibility": 'click',
|
||||
"showBarTime": '10000',
|
||||
"useH5Prism":true,
|
||||
"useFlashPrism":false,
|
||||
"liveRetry":3
|
||||
}, function (player) {
|
||||
console.log("The player is created");
|
||||
});
|
||||
function play_video(url){
|
||||
document.getElementById("player-con").style.display="block";
|
||||
global_player.dispose();
|
||||
global_player = new Aliplayer({
|
||||
"id": "player-con",
|
||||
"source": url,
|
||||
"width": "100%",
|
||||
"height": "300px",
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"autoplay": false,
|
||||
"preload": true,
|
||||
"controlBarVisibility": 'click',
|
||||
"showBarTime": '10000',
|
||||
"useH5Prism":true,
|
||||
"useFlashPrism":false,
|
||||
"liveRetry":3
|
||||
}, function (player) {
|
||||
console.log("The player is created");
|
||||
});
|
||||
|
||||
}*/
|
||||
var tableIns={};
|
||||
var pid= new Array();
|
||||
var purl= new Array();
|
||||
var this_cate="";
|
||||
layui.use(['element','jquery','form','layer','laydate','laytpl','table'],function(){
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$=layui.jquery,
|
||||
laydate = layui.laydate,
|
||||
laytpl = layui.laytpl,
|
||||
table = layui.table;
|
||||
var element = layui.element;
|
||||
element.init();
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
//---------------------------------------------时间选择器
|
||||
laydate.render({
|
||||
elem: '#search_time' //指定元素
|
||||
,type: 'datetime'
|
||||
,range: '到'
|
||||
,format: 'yyyy-M-dTHH:mm:ssZ'
|
||||
});
|
||||
//---------------------------------------------数据表格
|
||||
var index = layer.load();
|
||||
var url='./?_m=video'+query_str;
|
||||
tableIns = table.render({
|
||||
even:false,
|
||||
elem: '#layui_table',
|
||||
url : url,
|
||||
cellMinWidth:80,
|
||||
height : "full-180",
|
||||
page : true,
|
||||
limit : 10,
|
||||
limits : [10,20,30,50,100],
|
||||
id : "ListTable",
|
||||
cols : [[
|
||||
{type: "checkbox"},
|
||||
{field: 'vtitle', title: '视频名称',width:200,align:"center"},
|
||||
{field: 'source', title: '视频来源',width:200,align:"center"},
|
||||
{field: 'no', title: '关联款号',width:200,align:"center"},
|
||||
{title: '视频', align:"center" , templet:function(d){
|
||||
var tmpa=d;
|
||||
var tmp="";
|
||||
if(tmpa.cate!="直播录像"){
|
||||
if(tmpa.is_local=="n"){
|
||||
tmp+='<a href="'+tmpa.vurl+'" target="_blank"><video src="'+tmpa.vurl+'" height="300px" controls="controls" >您的浏览器不支持 video 标签。</video></a>';
|
||||
}else{
|
||||
//console.log(tmpa.vurl);
|
||||
//tmp+='<a href="../video/'+tmpa.local_path+'" target="_blank"><video src="../video/'+tmpa.local_path+'" height="150px" controls="controls" >您的浏览器不支持 video 标签。</video></a>';
|
||||
tmp+='<a href="'+tmpa.vurl+'" target="_blank"><video src="'+tmpa.vurl+'" height="300px" controls="controls" >您的浏览器不支持 video 标签。</video></a>';
|
||||
}
|
||||
}else{
|
||||
//tmp+="<div height='160px' ><a href='#' onclick='play_video(\""+tmpa.vurl+"\");'>点击播放</a></div>";
|
||||
if(tmpa.type=="aly"){
|
||||
tmp+="<div id='player-con"+tmpa.id+"' class='prism-player'></div>";
|
||||
pid.push(tmpa.id);
|
||||
purl.push(tmpa.vurl);
|
||||
}else{
|
||||
tmp+='<a href="'+tmpa.vurl+'" target="_blank"><video src="'+tmpa.vurl+'" height="300px" controls="controls" >您的浏览器不支持 video 标签。</video></a>';
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}},
|
||||
{title: '操作', width:170,align:"center",templet:'#caozuo'}
|
||||
]],
|
||||
done: function(res, curr, count){
|
||||
this_tab_no=res.s_cate;
|
||||
this_cate=res.s_cate;
|
||||
//加载tab
|
||||
arr_tab=res.tab;
|
||||
var html1="";
|
||||
for(var i=0;i<arr_tab.length;i++){
|
||||
html1+='<li';
|
||||
if(arr_tab[i].no==res.s_cate){
|
||||
html1+=' class="layui-this"';
|
||||
this_tab_title=arr_tab[i].title;
|
||||
}
|
||||
html1+='>'+arr_tab[i].title+'</li>';
|
||||
}
|
||||
$(".layui-tab-title").html(html1);
|
||||
element.render('tab1');
|
||||
$("#s_cate").val(res.s_cate);
|
||||
|
||||
if(res.s_cate=="直播录像"){
|
||||
$("#btn_upload_aly").hide();
|
||||
$("#btn_upload_local").hide();
|
||||
$("#search_is_local").hide();
|
||||
$("#search_time1").show();
|
||||
$("#btn_get_record").show();
|
||||
$("#btn_get_dllist").show();
|
||||
$("#btn_upload_aly_lb").show();
|
||||
|
||||
for(var i=0;i<pid.length;i++){
|
||||
var vid="player-con"+pid[i];
|
||||
var vurl=purl[i];
|
||||
|
||||
var global_player = new Aliplayer({
|
||||
"id": vid,
|
||||
"source": vurl,
|
||||
"width": "100%",
|
||||
"height": "300px",
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"autoplay": false,
|
||||
"preload": false,
|
||||
"controlBarVisibility": 'click',
|
||||
"showBarTime": '10000',
|
||||
"useH5Prism":true,
|
||||
"useFlashPrism":false,
|
||||
"liveRetry":3
|
||||
}, function (player) {
|
||||
console.log("The player is created");
|
||||
})
|
||||
}
|
||||
}else{
|
||||
$("#btn_upload_aly").show();
|
||||
$("#btn_upload_local").show();
|
||||
$("#search_is_local").show();
|
||||
$("#search_time1").hide();
|
||||
$("#btn_get_record").hide();
|
||||
$("#btn_get_dllist").hide();
|
||||
$("#btn_upload_aly_lb").hide();
|
||||
}
|
||||
if(res.err){
|
||||
var arrerr=res.err.split("|");
|
||||
html1="以下视频的阿里云id有误:";
|
||||
for(var i=0;i<arrerr.length;i++){
|
||||
html1+=arrerr[i]+",";
|
||||
}
|
||||
$("#err").html(html1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var lang_keyword=res.lang_keyword;
|
||||
var s_keyword=s_is_checked="";
|
||||
//关键字
|
||||
html1='<input id="s_keyword" name="s_keyword" type="text" class="layui-input searchVal" placeholder="'+lang_keyword+'" value="'+res.s_keyword+'" />';
|
||||
$("#search_keyword").html(html1);
|
||||
|
||||
//是否为云视频
|
||||
var arr_key=["y","n"];
|
||||
var arr_val=["是","否"];
|
||||
html_search_live='<select id="s_is_local" name="s_is_local" lay-filter="s_is_local"><option value="">-是否为本地视频-</option>';
|
||||
for(var j=0;j<arr_key.length;j++){
|
||||
html_search_live+='<option value="'+arr_key[j]+'"';
|
||||
if(arr_key[j]==res.s_is_local)
|
||||
html_search_live+=' selected';
|
||||
html_search_live+='>'+arr_val[j]+'</option>';
|
||||
}
|
||||
html_search_live+='</select>';
|
||||
$("#search_is_local").html(html_search_live);
|
||||
form.render();
|
||||
layer.close(index);
|
||||
}
|
||||
//cols : [cols]
|
||||
});
|
||||
//获取录播信息
|
||||
$(".btn_get_record").click(function(){
|
||||
var tmp=$("#search_time").val().split("到");
|
||||
var time1=tmp[0];
|
||||
var time2=tmp[1];
|
||||
//alert(t1);
|
||||
//alert(t2);
|
||||
if(!time1 || !time2){
|
||||
layer.msg("请选择起始时间和结束时间!");
|
||||
}else{
|
||||
var t1=time1.replace(/-/g, "/");
|
||||
t1=t1.replace(/T/, " ");
|
||||
t1=t1.replace(/Z/, "");
|
||||
|
||||
t2=time2.replace(/-/g, "/");
|
||||
t2=t2.replace(/T/, " ");
|
||||
t2=t2.replace(/Z/, "");
|
||||
var t3=new Date(t2).getTime()-new Date(t1).getTime();
|
||||
var days=Math.floor(t3/(24*3600*1000))
|
||||
if(days>4){
|
||||
layer.msg("时间间隔不得超过4天!");
|
||||
}else{
|
||||
var url="./?_m=video&_a=get_record_info&t1="+time1+"&t2="+time2;
|
||||
$.ajax({
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'GET',
|
||||
//data:{"a":"a","id":$("#id").val(),"_t":$("#_t").val(),"_v":$("#_v").val(),"_k":$("#_k").val()},
|
||||
//data:post_data,
|
||||
success: function (res) {
|
||||
//alert(res);//调试模式
|
||||
//layer.close(index);//调试模式
|
||||
var json_data=$.parseJSON(res);
|
||||
if(json_data.code==1){
|
||||
//保存成功
|
||||
//layer.close(index);
|
||||
layer.msg("获取完成!");
|
||||
$(".btn_showall").click();
|
||||
//layer.closeAll("iframe");
|
||||
//刷新父页面
|
||||
//parent.location.reload();
|
||||
}else{
|
||||
//保存失败
|
||||
//layer.close(index);
|
||||
layer.msg("获取失败!("+json_data.msg+")");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
//点击tab
|
||||
element.on('tab(tab1)', function(data){
|
||||
//alert(JSON.stringify(arr_tab));
|
||||
//alert(this.innerHTML);
|
||||
this_tab_title=this.innerHTML;
|
||||
for(var i=0;i<arr_tab.length;i++){
|
||||
if(arr_tab[i].title==this_tab_title){
|
||||
this_tab_no=arr_tab[i].no;
|
||||
}
|
||||
}
|
||||
var url='./?_m=video&s_cate='+encodeURI(this_tab_no);
|
||||
tableIns.reload({url:url});
|
||||
/*if(this_tab_no!="直播录像"){
|
||||
document.getElementById("player-con").style.display="none";
|
||||
global_player.dispose();
|
||||
global_player = new Aliplayer({
|
||||
"id": "player-con",
|
||||
"source": "",
|
||||
"width": "100%",
|
||||
"height": "300px",
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"autoplay": false,
|
||||
"preload": true,
|
||||
"controlBarVisibility": 'click',
|
||||
"showBarTime": '10000',
|
||||
"useH5Prism":true,
|
||||
"useFlashPrism":false,
|
||||
"liveRetry":3
|
||||
}, function (player) {
|
||||
console.log("The player is created");
|
||||
});
|
||||
}*/
|
||||
//alert(url);
|
||||
//location.href=url;
|
||||
});
|
||||
//显示全部
|
||||
$(".btn_showall").click(function(){
|
||||
var tmp=$("#s_cate").val();
|
||||
tableIns.reload({url:'./?_m=video&s_cate='+encodeURI(tmp)});
|
||||
/*document.getElementById("player-con").style.display="none";
|
||||
global_player.dispose();
|
||||
global_player = new Aliplayer({
|
||||
"id": "player-con",
|
||||
"source": "",
|
||||
"width": "100%",
|
||||
"height": "300px",
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"autoplay": false,
|
||||
"preload": true,
|
||||
"controlBarVisibility": 'click',
|
||||
"showBarTime": '10000',
|
||||
"useH5Prism":true,
|
||||
"useFlashPrism":false,
|
||||
"liveRetry":3
|
||||
}, function (player) {
|
||||
console.log("The player is created");
|
||||
});*/
|
||||
})
|
||||
$(".btn_upload").click(function(){
|
||||
upload();
|
||||
})
|
||||
//批量删除
|
||||
$(".btn_del").click(function(){
|
||||
var checkStatus = table.checkStatus('ListTable'),
|
||||
data = checkStatus.data,
|
||||
check_id = [];
|
||||
if(data.length>0) {
|
||||
for (var i in data) {
|
||||
check_id.push(data[i].id);
|
||||
}
|
||||
layer.confirm('确定删除吗?', {icon: 3, title: '提示信息'}, function (index) {
|
||||
$.get("./?_m=video&_a=del",{id:check_id},function(data){
|
||||
if(data.code=="1"){
|
||||
layer.msg("删除成功!");
|
||||
var tmp=$("#s_cate").val();
|
||||
tableIns.reload({url:'./?_m=video&s_cate='+encodeURI(tmp)});
|
||||
//tableIns.reload();
|
||||
layer.close(index);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
},"json")
|
||||
})
|
||||
}else{
|
||||
layer.msg("请选择需要删除的记录");
|
||||
}
|
||||
})
|
||||
//上传本地
|
||||
function upload_local(){
|
||||
var index = layui.layer.open({
|
||||
title : "上传本地",
|
||||
type : 2,
|
||||
content : "video_upload_local.htm",
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_upload_local").click(function(){
|
||||
upload_local();
|
||||
})
|
||||
//上传阿里云
|
||||
function upload_aly(){
|
||||
var index = layui.layer.open({
|
||||
title : "上传阿里云",
|
||||
type : 2,
|
||||
content : "video_upload_aly.htm",
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_upload_aly").click(function(){
|
||||
upload_aly();
|
||||
})
|
||||
$(".btn_get_dllist").click(function(){
|
||||
get_dllist();
|
||||
})
|
||||
function get_dllist(){
|
||||
var index = layui.layer.open({
|
||||
title : "视频下载地址",
|
||||
type : 2,
|
||||
content : "video_dllist.htm",
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
//上传阿里云_录播
|
||||
function upload_aly_lb(){
|
||||
var index = layui.layer.open({
|
||||
title : "上传阿里云",
|
||||
type : 2,
|
||||
content : "video_upload_aly_lb.htm",
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_upload_aly_lb").click(function(){
|
||||
upload_aly_lb();
|
||||
})
|
||||
//导出
|
||||
function export_excel(){
|
||||
var index = layui.layer.open({
|
||||
title : "导出视频资料",
|
||||
type : 2,
|
||||
content : "video_export.htm",
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_export").click(function(){
|
||||
export_excel();
|
||||
})
|
||||
//导入
|
||||
function import_excel(){
|
||||
var index = layui.layer.open({
|
||||
title : "导入视频资料",
|
||||
type : 2,
|
||||
content : "import_excel.htm?m=video",
|
||||
success : function(layero, index){
|
||||
var body = layui.layer.getChildFrame('body', index);
|
||||
body.find("#m").val("video");
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_import").click(function(){
|
||||
import_excel();
|
||||
})
|
||||
//修改
|
||||
function upload(){
|
||||
var t1="上传";
|
||||
var index = layui.layer.open({
|
||||
title : t1,
|
||||
type : 2,
|
||||
content : "video_upload.htm",
|
||||
success : function(layero, index){
|
||||
}
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
//修改
|
||||
function add(id){
|
||||
var t1="修改";
|
||||
var index = layui.layer.open({
|
||||
title : t1,
|
||||
type : 2,
|
||||
content : "video_add.htm?id="+id,
|
||||
success : function(layero, index){
|
||||
},
|
||||
end: function () {
|
||||
var tmp=$("#s_cate").val();
|
||||
tableIns.reload({url:'./?_m=video&s_cate='+encodeURI(tmp)});
|
||||
}
|
||||
|
||||
})
|
||||
layui.layer.full(index);
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$(window).on("resize",function(){
|
||||
layui.layer.full(index);
|
||||
})
|
||||
}
|
||||
$(".btn_add").click(function(){
|
||||
add(0);
|
||||
})
|
||||
/*$(".btn_add").click(function(){
|
||||
add(this.value);
|
||||
})*/
|
||||
//列表操作
|
||||
table.on('tool(layui_table)', function(obj){
|
||||
var layEvent = obj.event,
|
||||
data = obj.data;
|
||||
//alert(data.id);
|
||||
if(layEvent === 'edit'){
|
||||
//编辑
|
||||
add(data.id);
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user