$(function () { var apiUrl = "api/OnlineUsers"; var $table = $('table').smartTable({ url: apiUrl, method: "post", sidePagination: "client", showToggle: false, showRefresh: false, showColumns: false, columns: [ { title: "序号", formatter: function (value, row, index) { var options = $table.bootstrapTable('getOptions'); return options.pageSize * (options.pageNumber - 1) + index + 1; } }, { title: "会话Id", field: "ConnectionId" }, { title: "登陆名称", field: "UserName" }, { title: "显示名称", field: "DisplayName" }, { title: "登录时间", field: "FirstAccessTime" }, { title: "访问时间", field: "LastAccessTime" }, { title: "请求方式", field: "Method" }, { title: "主机", field: "Ip" }, { title: "登录地点", field: "Location" }, { title: "浏览器", field: "Browser" }, { title: "操作系统", field: "OS" }, { title: "访问地址", field: "RequestUrl" }, { title: "历史地址", field: "ConnectionId", formatter: function (value, row, index, field) { return $.format('', value); } } ] }).on('click', 'button[data-id]', function () { var $this = $(this); if (!$this.data($.fn.popover.Constructor.DATA_KEY)) { var id = $this.attr('data-id'); $.bc({ id: id, url: apiUrl, callback: function (result) { if (!result) return; var content = result.map(function (item) { return $.format("
访问时间 | 访问地址 |
---|