BootstrapAdmin11/Bootstrap.Admin/Scripts/Logs.js

25 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$(function () {
$('table').smartTable({
url: '../api/Logs', //请求后台的URL*
sortName: 'OperationType',
queryParams: function (params) { return $.extend(params, { operateType: $("#txt_operate_type").val(), OperateTimeStart: $("#txt_operate_start").val(), OperateTimeEnd: $("#txt_operate_end").val() }); }, //传递参数(*
columns: [{ checkbox: true },
{ title: "操作类型", field: "CRUD", sortable: true },
{ title: "用户名称", field: "UserName", sortable: false },
{
title: "操作时间", field: "LogTime", sortable: false,
formatter: function (value, row, index) {
return value.substring(0, 19).replace("T", " ");
}
},
{ title: "操作IP", field: "ClientIp", sortable: false },
{ title: "备注", field: "ClientAgent", sortable: false },
{ title: "操作模块", field: "RequestUrl", sortable: false }
]
});
$('input[type="datetime"]').parent().datetimepicker({
locale: "zh-cn",
format: "YYYY-MM-DD"
});
});