$(function(){ ua.table.render({ init: init, toolbar: [], defaultToolbar: ['filter'], cols: [[ {type: 'checkbox'}, {field: 'id', title: 'ID', width: 80}, {field: 'file_path', title: '文件路径', minWidth: 250}, {field: 'inode', title: 'inode', width: 120}, {field: 'offset', title: '偏移量', width: 120}, {field: 'last_read_time', title: '最后读取时间', width: 170, search: 'range', templet: ua.table.date}, {field: 'last_line_hash', title: '最后行哈希', width: 160, search: false}, {field: 'parse_fail_count', title: '失败次数', width: 100, search: 'number_limit', templet: function(d) { var c = parseInt(d.parse_fail_count); if (c > 0) return '' + c + ''; return '0'; }}, {field: 'parse_fail_samples', title: '失败样本', minWidth: 200, search: false}, {field: 'create_time', title: '创建时间', width: 170, search: 'range', templet: ua.table.date}, {field: 'update_time', title: '更新时间', width: 170, search: false, templet: ua.table.date}, { width: 100, title: '操作', templet: ua.table.tool, fixed: 'right', operat: [ [{ class: 'layui-btn layui-btn-primary layui-btn-xs', method: 'tab', field: 'id', text: '详情', title: '查看详情', auth: 'read', url: init.readUrl, icon: '' }] ] }, ]], }); ua.listen(); })