From 3b984c8a6fdc15882e0a74ddb2fb9c90271c5d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 23 Jan 2021 16:49:47 +0800 Subject: [PATCH] Update excel.xlsx.js --- public/static/plugs/jquery/excel.xlsx.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/static/plugs/jquery/excel.xlsx.js b/public/static/plugs/jquery/excel.xlsx.js index 0860c6be5..8f966a607 100644 --- a/public/static/plugs/jquery/excel.xlsx.js +++ b/public/static/plugs/jquery/excel.xlsx.js @@ -94,21 +94,21 @@ define(['xlsx'], function () { doPostItem(0, items[0]); /*! 执行导入的数据 */ - function doPostItem(index, item, result) { - if (index >= total) { + function doPostItem(idx, item, result) { + if (idx >= total) { return closeAll(), jQuery.msg.success('共处理' + total + '条记录' + '( 成功 ' + oks + ' 条, 失败 ' + ers + ' 条 )', 3, function () { jQuery.form.reload(); }); } else { - jQuery('[data-load-progress]').html((index * 100 / total).toFixed(2) + '%( 成功 ' + oks + ' 条, 失败 ' + ers + ' 条 )'); + jQuery('[data-load-progress]').html((idx * 100 / total).toFixed(2) + '%( 成功 ' + oks + ' 条, 失败 ' + ers + ' 条 )'); /*! 单元数据过滤 */ if (filterFn && (result = filterFn(item)) === false) { - return (ers++), doPostItem(index + 1, items[index + 1]); + return (ers++), doPostItem(idx + 1, items[idx + 1]); } /*! 提交单个数据 */ doUpdate(url, result).then(function (ret) { ret.code ? oks++ : ers++; - doPostItem(index + 1, items[index + 1]); + doPostItem(idx + 1, items[idx + 1]); }); } }