1 Star 1 Fork 1

kangyu1122 / 文件下载管理平台

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FileDownLoadLogPage.html 4.89 KB
一键复制 编辑 原始数据 按行查看 历史
kangyu1122 提交于 2020-09-29 14:37 . 作者第一次上传
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="paginationjs/pagination.css" rel="stylesheet" />
<script type="text/javascript" src="bootstrap/js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="paginationjs/pagination.min.js"></script>
<title></title>
<script type="text/javascript">
window.onload = function () {
var arr = GetLogCnt();
InitPagination(arr, "0");
}
function InitPagination(arr, type) {
$('#pagination').pagination({
dataSource: arr,
pageSize: 10,
autoHidePrevious: true,
autoHideNext: true,
callback: function (data, pagination) {
if (type == "0") {
GetDownLoadList(pagination.pageNumber, pagination.pageSize);
}
else {
GetDownLoadReport(pagination.pageNumber, pagination.pageSize);
}
}
});
}
function GetLogCnt() {
var arr = [];
$.ajax({
type: "POST",
url: "PostPage.ashx",
//dataType: "json",
async: false,
data: JSON.stringify({ type: "GetLogCnt" }),
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function (data) {
for (var i = 0; i < data; i++) {
arr.push(i)
}
},
error: function (err) {
alert(err);
console.log(err.responseText);
}
});
return arr;
}
function GetLogReportCnt() {
var arr = [];
$.ajax({
type: "POST",
url: "PostPage.ashx",
//dataType: "json",
async: false,
data: JSON.stringify({ type: "GetLogReportCnt" }),
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function (data) {
for (var i = 0; i < data; i++) {
arr.push(i)
}
},
error: function (err) {
alert(err);
console.log(err.responseText);
}
});
return arr;
}
function GetDownLoadList(page, pageSize) {
$.ajax({
type: "POST",
url: "PostPage.ashx",
//dataType: "json",
async: false,
data: JSON.stringify({ type: "GetDownLoadList", PAGE: page, PAGESIZE: pageSize }),
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function (data) {
//console.log(data);
document.getElementById("downloadlog_list_div").innerHTML = data;
},
error: function (err) {
alert(err);
console.log(err.responseText);
}
});
}
function GetDownLoadReport(page, pageSize) {
$.ajax({
type: "POST",
url: "PostPage.ashx",
//dataType: "json",
async: false,
data: JSON.stringify({ type: "GetDownLoadReport", PAGE: page, PAGESIZE: pageSize }),
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function (data) {
//console.log(data);
document.getElementById("downloadlog_list_div").innerHTML = data;
},
error: function (err) {
alert(err);
console.log(err.responseText);
}
});
}
function TypeChangeFun(type) {
if (type.value == "0") {
var arr = GetLogCnt();
InitPagination(arr, type.value);
}
else {
var arr = GetLogReportCnt();
InitPagination(arr, type.value);
}
}
</script>
</head>
<body>
<div style="margin-top:10px; margin-left:10px; width:50%;">
<select class="form-control" onchange="TypeChangeFun(this);">
<option value="0">下载日志清单</option>
<option value="1">下载统计报表</option>
</select>
</div>
<div id="downloadlog_list_div" class="panel-body" style="margin-top:10px; ">
</div>
<div id="pagination" style="margin: 0 auto; margin-bottom: 10px; margin-left:40%;"></div>
</body>
</html>
C#
1
https://gitee.com/kangyu1122/FileManagerApp.git
git@gitee.com:kangyu1122/FileManagerApp.git
kangyu1122
FileManagerApp
文件下载管理平台
master

搜索帮助