mirror of
https://gitee.com/zhc02/timely_service.git
synced 2025-06-30 06:11:30 +08:00
87 lines
2.8 KiB
HTML
87 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>layui</title>
|
||
<meta name="renderer" content="webkit">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<link rel="stylesheet" href="/static/lib/layui-v2.5.4/css/layui.css" media="all">
|
||
<link rel="stylesheet" href="/static/css/public.css" media="all">
|
||
</head>
|
||
<body>
|
||
<div class="layuimini-container">
|
||
<div class="layuimini-main">
|
||
|
||
<fieldset class="layui-elem-field layuimini-search">
|
||
<legend>搜索信息</legend>
|
||
<div style="margin: 10px 10px 10px 10px">
|
||
<form class="layui-form layui-form-pane" action="">
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">账号</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" name="account" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<a class="layui-btn" lay-submit="" lay-filter="data-search-btn">搜索</a>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</fieldset>
|
||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
|
||
</div>
|
||
</div>
|
||
<script src="/static/lib/layui-v2.5.4/layui.js" charset="utf-8"></script>
|
||
<script>
|
||
layui.use(['form', 'table'], function () {
|
||
var $ = layui.jquery,
|
||
form = layui.form,
|
||
table = layui.table;
|
||
|
||
table.render({
|
||
elem: '#currentTableId',
|
||
url: '/user',
|
||
limit:20,
|
||
limits:[20,30,50],
|
||
cellMinWidth: 100,
|
||
response: {
|
||
statusCode: 1000 //规定成功的状态码,默认:0
|
||
},
|
||
cols: [[
|
||
{type: "checkbox", width: 50, fixed: "left"},
|
||
{field: 'id', width: 80, title: 'ID', sort: true},
|
||
{field: 'account', title: '用户名'},
|
||
{field: 'create_time', title: '创建时间'},
|
||
|
||
]],
|
||
|
||
page: true
|
||
});
|
||
|
||
// 监听搜索操作
|
||
form.on('submit(data-search-btn)', function (data) {
|
||
|
||
//执行搜索重载
|
||
table.reload('currentTableId', {
|
||
page: {
|
||
curr: 1
|
||
}
|
||
, where: data.field
|
||
|
||
}, 'data');
|
||
|
||
return false;
|
||
});
|
||
|
||
});
|
||
</script>
|
||
<script>
|
||
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|