define(['jquery', 'bootstrap', 'backend', 'table', 'form','vue', 'component', 'ELEMENT'], function ($, undefined, Backend, Table, Form, Vue, component, ELEMENT) { var id = ''; var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'tdcaccount/index', add_url: 'tdcaccount/add', del_url: 'tdcaccount/del', table: 'tdcaccount', } }); var table = $("#table"); // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', search:false, commonSearch: false, columns: [ [ {checkbox: true}, {field: 'id', title: __('Id')}, {field: 'account_id', title: __('商品库账号ID')}, {field: 'createtime', title: __('创建时间'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, {field: 'updatetime', title: __('更新时间'), operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime}, {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ] }); $(function () { $(document).on('click', ".layui-layer-close", function () { //刷新页面 console.log(1); table.bootstrapTable('refresh'); }); }); // 为表格绑定事件 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; });