DiverseYouthNightSchool/public/assets/js/manystore/general/log.js

44 lines
1.5 KiB
JavaScript
Raw Normal View History

2024-11-04 15:00:20 +08:00
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'upload'], function ($, undefined, Backend, Table, Form, Upload) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
search: true,
advancedSearch: true,
pagination: true,
extend: {
"index_url": "general/log/index",
"add_url": "",
"edit_url": "",
"del_url": "",
"multi_url": "",
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
columns: [
[
{field: 'id', title: 'ID'},
{field: 'title', title: __('Title')},
{field: 'url', title: __('Url'), align: 'left', formatter: Table.api.formatter.url},
{field: 'ip', title: __('ip'), formatter:Table.api.formatter.search},
{field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
]
],
commonSearch: false
});
// 为表格绑定事件
Table.api.bindevent(table);//当内容渲染完成后
}
};
return Controller;
});