exportOptions: { fileName: '报单管理_' + Moment().format("YYYY-MM-DD"), htmlContent: true, onCellHtmlData: function($cell, row, col, htmlData) { var html = $.parseHTML(htmlData); var inputidx = 0; var selectidx = 0; var result = ''; $.each(html, function() { if ($(this).is("input")) { result += $cell.find("input").eq(inputidx++).val(); } else if ($(this).is("select")) { result += $cell.find("select option:selected").eq(selectidx++).text(); } else if ($(this).is('a')) { if ($(this).context.childNodes[0].tagName == 'IMG') { let img = $(this).context.childNodes[0] img.width = "40"; img.height = "40"; } result += $(this).html() } else { if (typeof $(this).html() === 'undefined') { result += $(this).text() } else if (jQuery().bootstrapTable === undefined || ($(this).hasClass("filterControl") !== true) && $cell.parents('.detail-view').length === 0 ) { result += $(this).html() } } }) return result; } },
评论
评论功能已经关闭!