add:标签,球馆
This commit is contained in:
61
public/assets/js/backend/zy/stadium.js
Normal file
61
public/assets/js/backend/zy/stadium.js
Normal file
@@ -0,0 +1,61 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'zy/stadium/index' + location.search,
|
||||
add_url: 'zy/stadium/add',
|
||||
edit_url: 'zy/stadium/edit',
|
||||
del_url: 'zy/stadium/del',
|
||||
multi_url: 'zy/stadium/multi',
|
||||
import_url: 'zy/stadium/import',
|
||||
table: 'zy_stadium',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{ checkbox: true },
|
||||
{ field: 'id', title: __('Id') },
|
||||
{ field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content },
|
||||
{ field: 'sub_name', title: __('Sub_name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content },
|
||||
{ field: 'position', title: __('Position') },
|
||||
{ field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content },
|
||||
{ field: 'city', title: __('City'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content },
|
||||
{ field: 'contact', title: __('Contact'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content },
|
||||
{ field: 'status', title: __('Status'), formatter: Table.api.formatter.label, searchList: { 0: __('Status0'), 1: __('Status1') } },
|
||||
{ field: 'create_time', title: __('Create_time'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false },
|
||||
{ field: 'update_time', title: __('Update_time'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false },
|
||||
{ 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;
|
||||
});
|
||||
56
public/assets/js/backend/zy/tags.js
Normal file
56
public/assets/js/backend/zy/tags.js
Normal file
@@ -0,0 +1,56 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'zy/tags/index' + location.search,
|
||||
add_url: 'zy/tags/add',
|
||||
edit_url: 'zy/tags/edit',
|
||||
del_url: 'zy/tags/del',
|
||||
multi_url: 'zy/tags/multi',
|
||||
import_url: 'zy/tags/import',
|
||||
table: 'zy_tags',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
columns: [
|
||||
[
|
||||
{ checkbox: true },
|
||||
{ field: 'id', title: __('Id') },
|
||||
{ field: 'type', title: __('Type'), formatter: Table.api.formatter.label, searchList: { 0: __('Gym'), 1: __('Club'), 2: __('User') } },
|
||||
{ field: 'group', title: __('Group'), formatter: Table.api.formatter.label, searchList: { 0: __('General'), 1: __('Ability'), 2: __('Role') } },
|
||||
{ field: 'choose', title: __('Choose'), formatter: Table.api.formatter.label, searchList: { 0: __('Multiple'), 1: __('Single') } },
|
||||
{ field: 'content_json', title: __('Content_json') },
|
||||
{ field: 'create_time', title: __('Create_time'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false },
|
||||
{ field: 'update_time', title: __('Update_time'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false },
|
||||
{ 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;
|
||||
});
|
||||
Reference in New Issue
Block a user