$(function () { var $dialog = $('#dialogNew'); var $dataForm = $('#dataForm'); var $dataFormDetail = $('#dataFormDetail'); var $errorList = $('#errorList'); var $errorDetail = $('#errorDetail'); var $errorDetailTitle = $('#myDetailModalLabel'); var bsa = new BootstrapAdmin({ url: Exceptions.url, validateForm: null }); $('table').smartTable({ url: Exceptions.url, sortName: 'LogTime', sortOrder: 'desc', queryParams: function (params) { return $.extend(params, { StartTime: $("#txt_operate_start").val(), EndTime: $("#txt_operate_end").val() }); }, columns: [ { title: "请求网址", field: "ErrorPage", sortable: true }, { title: "用户名", field: "UserId", sortable: true }, { title: "IP", field: "UserIp", sortable: true }, { title: "错误", field: "Message", sortable: false }, { title: "记录时间", field: "LogTime", sortable: true } ] }); $('.form_date').datetimepicker({ language: 'zh-CN', weekStart: 1, todayBtn: 1, autoclose: 1, todayHighlight: 1, startView: 2, minView: 2, forceParse: 0, format: 'yyyy-mm-dd', pickerPosition: 'bottom-left', fontAwesome: true }); $('#btn_view').on('click', function (row) { $.bc({ url: Exceptions.url, swal: false, callback: function (result) { var html = result.map(function (ele) { return $.format('
', ele); }).join(''); $dataForm.children('div').html(html).find('[data-toggle="tooltip"]').tooltip(); $dialog.modal('show'); } }); }); $dialog.on('click', 'a', function () { var fileName = $(this).tooltip('hide').find('span').text(); $errorDetailTitle.text(fileName); $errorList.hide(); $errorDetail.show(); $dataFormDetail.html('