This commit is contained in:
MeSHard
2025-12-01 11:19:23 +08:00
parent adc5fd81aa
commit b22d09bd39
4440 changed files with 815952 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'yq/video_monitor/monitor/index' + location.search,
add_url: 'yq/video_monitor/monitor/add',
edit_url: 'yq/video_monitor/monitor/edit',
del_url: 'yq/video_monitor/monitor/del',
multi_url: 'yq/video_monitor/monitor/multi',
import_url: 'yq/video_monitor/monitor/import',
table: 'monitor',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'type', title: __('Type')},
{field: 'license', title: __('License'), operate: 'LIKE'},
{field: 'speed', title: __('Speed')},
{field: 'seat', title: __('Seat'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'is_del', title: __('Is_del')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});