"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n
');e.next("div.tab-content").find(".tab-pane").empty().append(i),a(r,n,i.find("table"))}e.prototype={constructor:e,init:function(){var n=this;o(n.element).prev("input[type=file]").fileinput({language:"zh",showUpload:!1,dropZoneEnabled:!1,hideThumbnailContent:!0,showPreview:!1,allowedFileExtensions:["xlsx"],elErrorContainer:"#kartik-file-errors"}).on("change",function(t){n.excelPreview(t)})},excelPreview:function(t){return function(t,i){var n=t.target.files;if(0==n.length)return;var e=new FileReader;e.onload=function(t){try{var n=t.target.result,e=XLSX.read(n,{type:"binary",cellStyles:!0})}catch(t){return void console.log("文件类型不正确")}var r=e.SheetNames;!function(r,t,i){o(r).empty().append('
\n
\n \n
\n
\n \n
\n
\n
\n
'),t.forEach(function(t){var n=o(r).find(".nav-tabs"),e=o('
  • '+t+"
  • ");e.find("a").on("click",function(t){c(o(t.target),i,n)}),n.append(e),c(n.find(" li:first > a"),i,n),n.find("li:first").addClass("active")})}(i,r,e)},e.readAsBinaryString(n[0])}(t,this.element),o(this.element).prev("input[type=file]").fileinput("refresh"),!0}},o.fn[r]=function(n){return n=o.extend(!0,{},l,n),this.each(function(){var t=o(this);o.data(t,"plugin_"+r)||o.data(t,"plugin_"+r,new e(this,n))})},o.fn[r].defaults=l,o.fn[r].Plugin=e});var CUSTOM_UTIL=function(){function e(t){for(var n=[].concat(_toConsumableArray(t)),e=0,r=0;r