main
kgdxpr 1 year ago
parent 4abbb119a5
commit 35f1e131a4

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

@ -0,0 +1,119 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 1,
"czr": "管理员",
"czsj": "2024-03-05",
"ip": "192.168.15.68",
"xw": "登录"
},
{
"id": 2,
"czr": "管理员",
"czsj": "2024-03-05",
"ip": "192.168.15.68",
"xw": "创建教师‘张淑娟’"
},
{
"id": 9,
"czr": "马宇翔",
"czsj": "2024-03-07",
"ip": "192.168.15.190",
"xw": "登录"
},
{
"id": 3,
"czr": "管理员",
"czsj": "2024-03-05",
"ip": "192.168.15.68",
"xw": "登出"
},
{
"id": 4,
"czr": "管理员",
"czsj": "2024-03-06",
"ip": "192.168.15.140",
"xw": "登录"
},
{
"id": 8,
"czr": "陈昕",
"czsj": "2024-03-07",
"ip": "192.168.15.156",
"xw": "登录"
},
{
"id": 5,
"czr": "管理员",
"czsj": "2024-03-06",
"ip": "192.168.15.140",
"xw": "创建教师‘王思宇’"
},
{
"id": 6,
"czr": "管理员",
"czsj": "2024-03-06",
"ip": "192.168.15.140",
"xw": "登出"
},
{
"id": 7,
"czr": "连梦佳",
"czsj": "2024-03-06",
"ip": "192.168.15.178",
"xw": "登录"
},
{
"id": 7,
"czr": "曹靖沅",
"czsj": "2024-03-06",
"ip": "192.168.15.200",
"xw": "登录"
},
{
"id": 7,
"czr": "贾子健",
"czsj": "2024-03-06",
"ip": "192.168.15.169",
"xw": "登录"
},
{
"id": 7,
"czr": "余亦珊",
"czsj": "2024-03-07",
"ip": "192.168.15.86",
"xw": "登录"
},
{
"id": 7,
"czr": "杨天洋",
"czsj": "2024-03-07",
"ip": "192.168.15.102",
"xw": "登录"
},
{
"id": 7,
"czr": "王净歆",
"czsj": "2024-03-07",
"ip": "192.168.15.160",
"xw": "登录"
},
{
"id": 7,
"czr": "张清雅",
"czsj": "2024-03-08",
"ip": "192.168.15.123",
"xw": "登录"
},
{
"id": 7,
"czr": "徐逸航",
"czsj": "2024-03-08",
"ip": "192.168.15.156",
"xw": "登录"
}
]
}

@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
<style>
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
}
.woo-theme-color {
color: #2d8cf0 !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
}
.layui-table-tool-temp {
padding-right: 0;
}
</style>
</head>
<body class="pear-container layui-form">
<div class="layui-card">
<div class="layui-card-body">
<table id="data-table"></table>
</div>
</div>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
var common = layui.common;
var laytpl = layui.laytpl;
tableRender();
function tableRender() {
table.render({
elem: '#data-table',
url: '/QingLong/view/jrgl/rzgl/data.json',
where: {
page: 1,
limit: 100,
system_id: 0
},
height: 'full-60',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
{ title: '序号', align: 'center', width: "10%", type: 'numbers' },
{ title: '操作人', field: 'czr', align: 'center', width: "20%" },
{ title: '操作时间', field: 'czsj', align: 'center', width: "20%" },
{ title: '操作IP', field: 'ip', align: 'center', width: "20%" },
{ title: '行为', field: 'xw', align: 'left' }
]],
skin: 'line',
defaultToolbar: []
});
}
function GetQueryString(name, istop) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
});
</script>
</body>
</html>

@ -28,6 +28,11 @@
.layui-table-tool-temp {
padding-right: 0;
}
.layui-table-checked {
background-color: #ff5722 !important;
color: #EEEEEE;
}
</style>
</head>
@ -93,7 +98,15 @@
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "20%" }
]],
skin: 'line',
defaultToolbar: []
defaultToolbar: [],
parseData: function (res) {
for (var i = 0; i < res.data.length; i++) {
if (i === 5) {
res.data[i].LAY_CHECKED = true;
}
}
return res;
}
});
}

@ -0,0 +1,42 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 1,
"name": "校园安全记录",
"type": "Excel",
"file": "2024-03-03校园安全记录.xlsx",
"memo": "-"
},
{
"id": 1,
"name": "校园设施信息",
"type": "CSV",
"file": "校园设施信息.xlsx",
"memo": "-"
},
{
"id": 1,
"name": "教职工考勤数据",
"type": "Excel",
"file": "2024年3月教职工考勤记录.xlsx",
"memo": "-"
},
{
"id": 1,
"name": "校园活动数据",
"type": "Excel",
"file": "2024年3月校园活动数据记录.xlsx",
"memo": "-"
},
{
"id": 1,
"name": "学生行为数据",
"type": "FTP",
"file": "-",
"memo": "-"
}
]
}

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
<style>
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
}
.woo-theme-color {
color: #2d8cf0 !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
}
</style>
</head>
<body class="pear-container layui-form">
<div class="layui-card">
<div class="layui-card-body">
<table id="data-table"></table>
<script type="text/html" id="AK-Templet">
<button type="button" class="layui-btn layui-btn-xs layui-btn-radius" id="{{= d.access_key }}" lay-submit
lay-filter="copyAK">
<i class="layui-icon layui-icon-share"></i> {{= d.access_key }}
</button>
</script>
<script type="text/html" id="SK-Templet">
<button type="button" class="layui-btn layui-btn-xs layui-btn-radius" id="{{= d.secret_key }}" lay-submit
lay-filter="copySK">
<i class="layui-icon layui-icon-engine"></i> {{= d.secret_key }}
</button>
</script>
</div>
</div>
<script type="text/html" id="table-toolbar">
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
<i class="layui-icon layui-icon-upload"></i>
上传数据文件
</button>
<!-- <button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
<i class="layui-icon layui-icon-delete"></i>
删除
</button> -->
</script>
<script type="text/html" id="table-bar">
<span class="woo-tool-span woo-tool-text-span" lay-event="remove"><a
class="woo-theme-color">删除</a></span>
</script>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
var common = layui.common;
var laytpl = layui.laytpl;
tableRender();
form.on('submit(user-query)', function () {
tableRender();
return false;
});
form.on('input-affix(clear)', function (data) {
tableRender();
});
form.on('submit(copyAK)', function (data) {
var text = data.elem.id;
var input = document.createElement('input');
input.setAttribute('value', text);
document.body.appendChild(input);
input.select();
document.execCommand('copy');
document.body.removeChild(input);
layer.msg('已复制到剪贴板!', {
icon: 1,
time: 1000
});
return false; // 阻止默认 form 跳转
});
form.on('submit(copySK)', function (data) {
var text = data.elem.id;
var input = document.createElement('input');
input.setAttribute('value', text);
document.body.appendChild(input);
input.select();
document.execCommand('copy');
document.body.removeChild(input);
layer.msg('已复制到剪贴板!', {
icon: 1,
time: 1000
});
return false; // 阻止默认 form 跳转
});
function tableRender() {
table.render({
elem: '#data-table',
url: '/QingLong/view/jrgl/xtgl/data.json',
height: 'full-60',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
{ title: '序号', align: 'center', width: "10%", type: 'numbers' },
{ title: '名称', field: 'name', align: 'center' },
{ title: '类型', field: 'type', align: 'center', width: "15%" },
{ title: '文件名', field: 'file', align: 'center', width: "15%" },
{ title: '备注', field: 'memo', align: 'center', width: "15%" },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "15%" }
]],
skin: 'line',
toolbar: '#table-toolbar',
defaultToolbar: []
});
}
table.on('tool(data-table)', function (obj) {
if (obj.event === 'remove') {
layer.msg('删除成功!', {
icon: 1,
time: 1000
});
}
});
table.on('toolbar(data-table)', function (obj) {
if (obj.event === 'add') {
window.add();
}
});
window.add = function () {
layer.open({
type: 2,
title: '上传数据文件',
shade: 0.1,
area: ['550px', '220px'],
content: './upload.html'
});
}
function GetQueryString(name, istop) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
});
</script>
</body>
</html>

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo</title>
<link href="//unpkg.com/layui@2.9.7/dist/css/layui.css" rel="stylesheet">
</head>
<body>
<div class="layui-upload-drag" style="display: block;margin: 10px;" id="ID-upload-demo-drag">
<i class="layui-icon layui-icon-upload"></i>
<div>点击上传或将文件拖拽到此处支持xls、xlsx、csv</div>
<div class="layui-hide" id="ID-upload-demo-preview">
<hr> <img src="" alt="上传成功后渲染" style="max-width: 100%">
</div>
</div>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
layui.use(function(){
var upload = layui.upload;
var $ = layui.$;
// 渲染
upload.render({
elem: '#ID-upload-demo-drag',
url: '', // 实际使用时改成您自己的上传接口即可。
done: function(res){
layer.msg('上传成功');
$('#ID-upload-demo-preview').removeClass('layui-hide')
.find('img').attr('src', res.files.file);
console.log(res)
}
});
});
</script>
</body>
</html>

@ -150,7 +150,7 @@
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" title="导出表结构" lay-event="exportStruct">
<i class="iconfont icon-shujiegou"></i>
<i class="iconfont icon-shujiegou"></i>
</button> -->
<button type="button" class="layui-btn layui-btn-sm" title="导出汇总表" lay-event="exportHz">
@ -169,7 +169,7 @@
{{# } }}
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" title="删除" lay-event="del">
<i class="iconfont icon-shanchu"></i>
<i class="iconfont icon-shanchu"></i>
</button>
</script>

Loading…
Cancel
Save