Skip to content

Commit

Permalink
解决excel构建问题 closes #3166
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Mar 13, 2017
1 parent f32d9f5 commit 9e9b071
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions public/js/excel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
define(['jquery-form'], function () {
var importExcel = {};

var delayLong = 5000;
var delayLonger = 60000;

// 上传文件到服务器
var submit = $.fn.ajaxSubmit;
$.fn.uploadFile = function (url, cols, call) {
Expand All @@ -11,11 +14,11 @@ define(['jquery-form'], function () {
url: $.url('admin/excel/uploadAndParseToJson'),
success: function (result) {
if (result.code < 0) {
$.err(result.message, 5000);
$.err(result.message, delayLong);
} else {
$.info('文件上传成功,解析中...', 60000);
$.info('文件上传成功,解析中...', delayLonger);
$.tips.hideAll();
$.msg(result, function() {
$.msg(result, function () {
if (result.code > 0) {
importExcel.loadData(result.data, url, call);
}
Expand Down

0 comments on commit 9e9b071

Please sign in to comment.