| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- define(["jquery", "easy-admin"], function ($, ea) {
- var init = {
- table_elem: '#currentTable',
- table_render_id: 'currentTableRenderId',
- index_url: 'system.faq/index',
- add_url: 'system.faq/add',
- edit_url: 'system.faq/edit',
- delete_url: 'system.faq/delete',
- export_url: 'system.faq/export',
- modify_url: 'system.faq/modify',
- };
- var Controller = {
- index: function () {
- ea.table.render({
- init: init,
- cols: [[
- {type: 'checkbox'},
- {field: 'id', title: 'id', searchOP: '='},
- {field: 'title', title: '标题', searchOP: '='},
- {field: 'parent_id', title: '父级名称', searchOP: '='},
- {field: 'sort', title: '序号', edit: 'text', search: false},
- {field: 'status', title: '状态', templet: ea.table.switch, selectList: {0: '禁用', 1: '正常'}},
- {width: 250, title: '操作', templet: ea.table.tool},
- ]],
- });
- ea.listen();
- },
- add: function () {
- ea.listen();
- },
- edit: function () {
- ea.listen();
- },
- };
- return Controller;
- });
|