$(function() { var options = { url: prefix + "/list", cleanUrl: prefix + "/clean",…
- User
(function() { var options = { url: prefix + "/list", cleanUrl: prefix + "/clean", detailUrl: prefix + "/detail/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", sortName: "czsj", sortOrder: "desc", modalName: "操作日志", escape: true, showPageGo: true, rememberSelected: true, columns: [{ field: 'state', checkbox: true }, /* { field: 'operId', title: '日志编号' }, */ { field: 'czlxmc', title: '模块' }, { field: 'cznr', title: '操作内容', align: 'center', formatter: function(value, row, index) { return .table.tooltip(value); } }, { field: 'yhmc', title: '操作人员', sortable: true }, { field: 'yhdh', title: '操作账号', sortable: true }, { field: 'ip', title: '来源' }, /* { field: 'operLocation', title: '操作地点' }, { field: 'status', title: '操作状态', align: 'center', formatter: function(value, row, index) { if (value == 0) { return '成功'; } else if (value == 1) { return '失败'; } } }, */ { field: 'status', title: '类型', formatter: function(value, row, index) { console.log(row.cznr); if (row.cznr.contains("新增")) { return '新增'; } else if (row.cznr.contains("修改")) { return '修改'; }else if (row.cznr.contains("删除")) { return '删除'; }else if (row.cznr.contains("查询")) { return '查询'; } } }, { field: 'czsj', title: '操作时间', sortable: true },{ field: 'status', title: '结果', formatter: function(value, row, index) { if (value == 1) { return '成功'; } else if (value == 0) { return '失败'; } } },{ field: 'checkDigit', title: '校验位', formatter: function (value, row, index) {
if(row.checkDigit=='是'){ return '<span class="label label-danger">是</span>'; }else{ return '<span class="label label-success">否</span>'; } } }] }; $.table.init(options); }); - Assistant
This JavaScript snippet configures a table using jQuery, most likely as part of a web application that tracks and displays operation logs. Here's a breakdown of its functionality:
-
Configuration Object (
options):- URL Endpoints: Configures various URL endpoints for operations like listing, cleaning, detailing, removing, and exporting logs.
-