You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.8 KiB
74 lines
2.8 KiB
6 years ago
|
<!DOCTYPE html>
|
||
|
<html class="x-admin-sm">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>SOP Admin</title>
|
||
|
<meta name="renderer" content="webkit">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
|
<meta name="viewport"
|
||
|
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
|
||
|
<link rel="stylesheet" href="../../assets/css/font.css">
|
||
|
<link rel="stylesheet" href="../../assets/css/xadmin.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="x-nav">
|
||
|
<span class="layui-breadcrumb">
|
||
|
<a href="../welcome.html">首页</a>
|
||
|
<a><cite>服务管理</cite></a>
|
||
|
<a><cite>服务列表</cite></a>
|
||
|
</span>
|
||
|
<a class="layui-btn layui-btn-small layui-btn-normal" style="line-height:1.6em;margin-top:4px;float:right"
|
||
|
href="javascript:location.replace(location.href);" title="刷新">
|
||
|
<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
|
||
|
</div>
|
||
|
<div class="x-body">
|
||
|
<div class="layui-row">
|
||
|
<form class="layui-form layui-col-md12 x-so" action="" lay-filter="searchFrm">
|
||
|
服务名称:
|
||
|
<input name="serviceId" class="layui-input" style="width: 200px;" placeholder="输入服务名称(serviceId)">
|
||
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="searchFilter">
|
||
|
<i class="layui-icon layui-icon-search"></i>搜索
|
||
|
</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
<table class="layui-hide" id="table"></table>
|
||
|
<script type="text/html" id="optBar">
|
||
|
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">修改</a>
|
||
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">下线</a>
|
||
|
</script>
|
||
|
|
||
|
</div>
|
||
|
<script type="text/javascript" src="../../assets/js/lib.js"></script>
|
||
|
<script>
|
||
|
lib.use(['element', 'table', 'form'], function () {
|
||
|
var table = layui.table;
|
||
|
var form = layui.form;
|
||
|
|
||
|
var serverTable = table.render({
|
||
|
elem: '#table'
|
||
|
, url: ApiUtil.createUrl('service.list')
|
||
|
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
|
, cols: [[
|
||
|
{field: 'serviceId', title: '服务名称', sort: true}
|
||
|
, {field: 'description', title: '描述'}
|
||
|
, {field: 'createTime', title: '添加时间', sort: true}
|
||
|
, {field: 'updateTime', title: '修改时间', sort: true}
|
||
|
, {fixed: 'right', title:'操作', toolbar: '#optBar', width:150}
|
||
|
]]
|
||
|
});
|
||
|
|
||
|
form.on('submit(searchFilter)', function(data){
|
||
|
var param = data.field;
|
||
|
serverTable.reload({
|
||
|
where: {
|
||
|
data: JSON.stringify(param)
|
||
|
}
|
||
|
})
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|