$(function () { var $dialog = $('#dialogNew'); var $dataForm = $('#dataForm'); var $dataFormDetail = $('#dataFormDetail'); var $errorList = $('#errorList'); var $errorDetail = $('#errorDetail'); var $errorDetailTitle = $('#myDetailModalLabel'); $('table').smartTable({ url: '../api/Exceptions', sortName: 'ErrorPage', queryParams: function (params) { return $.extend(params, { OperateTimeStart: $("#txt_operate_start").val(), OperateTimeEnd: $("#txt_operate_end").val() }); }, columns: [{ checkbox: true }, { title: "请求网址", field: "ErrorPage", sortable: false }, { title: "用户名", field: "UserID", sortable: false }, { title: "IP", field: "UserIp", sortable: false }, { title: "错误", field: "Message", sortable: false }, { title: "异常捕获时间", field: "LogTime", sortable: true, formatter: function (value, row, index) { return new Date(value).format("yyyy-MM-dd HH:mm:ss"); } } ] }); $('input[type="datetime"]').parent().datetimepicker({ locale: "zh-cn", format: "YYYY-MM-DD" }); $('#btn_view').on('click', function (row) { Exceptions.getFiles(function (data) { $dataForm.children('div').html(data); }); $dialog.modal('show'); }); $dialog.on('click', 'a', function () { var fileName = $(this).text(); $errorDetailTitle.text(fileName); $errorList.hide(); $errorDetail.show(); $dataFormDetail.html('