112 lines
3.7 KiB
HTML
112 lines
3.7 KiB
HTML
{layout name="layout1" /}
|
|
<style>
|
|
.layui-table-cell {
|
|
font-size: 14px;
|
|
padding: 0 5px;
|
|
height: auto;
|
|
overflow: visible;
|
|
text-overflow: inherit;
|
|
white-space: normal;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.goods-content > div:not(:last-of-type) {
|
|
border-bottom: 1px solid #DCDCDC;
|
|
}
|
|
|
|
.goods-data::after {
|
|
display: block;
|
|
content: '';
|
|
clear: both;
|
|
}
|
|
|
|
.goods_name_hide {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
</style>
|
|
<div class="layui-fluid">
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
|
<div class="layui-colla-item">
|
|
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
|
<div class="layui-colla-content layui-show">
|
|
<p>*记录管理后台系统日志,可用于排查事故原因</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-body">
|
|
<table id="order-lists" lay-filter="order-lists"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
|
|
layui.config({
|
|
version:"{$front_version}",
|
|
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index', 'table', 'like', 'laydate'], function () {
|
|
var $ = layui.$
|
|
, form = layui.form
|
|
, table = layui.table
|
|
, like = layui.like
|
|
, element = layui.element
|
|
, laydate = layui.laydate;
|
|
|
|
|
|
|
|
//监听搜索
|
|
form.on('submit(order-search)', function (data) {
|
|
var field = data.field;
|
|
//执行重载
|
|
table.reload('order-lists', {
|
|
where: field
|
|
});
|
|
});
|
|
//获取列表
|
|
|
|
getList();
|
|
function getList() {
|
|
table.render({
|
|
limit:10,
|
|
elem: '#order-lists'
|
|
,url: '{:url("Orderautomatic/orderlog")}?order_sn=' + '{$ids}'
|
|
, cols: [[
|
|
{field: 'id', title: '操作ID', align: 'center'}
|
|
, {field: 'admin_name', title: '管理员', align: 'center'}
|
|
, {field: 'show', title: '操作内容', align: 'center'}
|
|
, {field: 'createtime',title: '日志时间', align: 'center'}
|
|
|
|
]]
|
|
, page: true
|
|
, text: {none: '暂无数据!'}
|
|
, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
|
|
return {
|
|
"code": res.code,
|
|
"msg": res.msg,
|
|
"count": res.data.count, //解析数据长度
|
|
"data": res.data.lists, //解析数据列表
|
|
};
|
|
}
|
|
,done: function(res, curr, count){
|
|
// 解决操作栏因为内容过多换行问题
|
|
$(".layui-table-main tr").each(function (index, val) {
|
|
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
|
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script> |