@vortex-ui/env-puzzle 2.0.0-beta.9 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -46
- package/lib/b-map/b-map.d.ts +1 -1
- package/lib/b-map/b-map.js +100 -162
- package/lib/b-map/b-map.js.map +1 -1
- package/lib/b-map/custom-overlay.js +17 -37
- package/lib/b-map/custom-overlay.js.map +1 -1
- package/lib/b-map/drawing.js +11 -25
- package/lib/b-map/drawing.js.map +1 -1
- package/lib/b-map/index.d.ts +2 -2
- package/lib/b-map/index.js +4 -16
- package/lib/b-map/index.js.map +1 -1
- package/lib/b-map/js/marker-clusterer.js +223 -339
- package/lib/b-map/js/marker-clusterer.js.map +1 -1
- package/lib/b-map/lushu.js +17 -36
- package/lib/b-map/lushu.js.map +1 -1
- package/lib/b-map/marker-clusterer.js +6 -14
- package/lib/b-map/marker-clusterer.js.map +1 -1
- package/lib/b-map/marker.js +32 -70
- package/lib/b-map/marker.js.map +1 -1
- package/lib/b-map/polygon.js +5 -13
- package/lib/b-map/polygon.js.map +1 -1
- package/lib/b-map/style/css.js.map +1 -1
- package/lib/b-map/style/index.js.map +1 -1
- package/lib/b-map/style/index.less +10 -10
- package/lib/create-modal/create-modal.d.ts +3 -2
- package/lib/create-modal/create-modal.js +163 -307
- package/lib/create-modal/create-modal.js.map +1 -1
- package/lib/create-modal/index.d.ts +1 -2
- package/lib/create-modal/index.js +2 -8
- package/lib/create-modal/index.js.map +1 -1
- package/lib/create-modal/style/css.js +0 -18
- package/lib/create-modal/style/css.js.map +1 -1
- package/lib/create-modal/style/index.css +2 -2
- package/lib/create-modal/style/index.d.ts +0 -9
- package/lib/create-modal/style/index.js +0 -18
- package/lib/create-modal/style/index.js.map +1 -1
- package/lib/create-modal/style/index.less +116 -119
- package/lib/global.less +5 -6
- package/lib/import-modal/import-modal.d.ts +3 -1
- package/lib/import-modal/import-modal.js +140 -204
- package/lib/import-modal/import-modal.js.map +1 -1
- package/lib/import-modal/index.js +2 -6
- package/lib/import-modal/index.js.map +1 -1
- package/lib/import-modal/style/css.js +0 -10
- package/lib/import-modal/style/css.js.map +1 -1
- package/lib/import-modal/style/index.d.ts +0 -5
- package/lib/import-modal/style/index.js +0 -10
- package/lib/import-modal/style/index.js.map +1 -1
- package/lib/import-modal/style/index.less +14 -15
- package/lib/index.js +1 -14
- package/lib/index.js.map +1 -1
- package/lib/interface/index.js.map +1 -1
- package/lib/mapv-Layer/Function.js +0 -2
- package/lib/mapv-Layer/Function.js.map +1 -1
- package/lib/mapv-Layer/index.js +2 -6
- package/lib/mapv-Layer/index.js.map +1 -1
- package/lib/mapv-Layer/mapv-Layer.js +19 -40
- package/lib/mapv-Layer/mapv-Layer.js.map +1 -1
- package/lib/mapv-Layer/style/css.js.map +1 -1
- package/lib/mapv-Layer/style/index.js.map +1 -1
- package/lib/percent/index.d.ts +1 -1
- package/lib/percent/index.js +2 -7
- package/lib/percent/index.js.map +1 -1
- package/lib/percent/interface.js.map +1 -1
- package/lib/percent/line-percent.js +20 -37
- package/lib/percent/line-percent.js.map +1 -1
- package/lib/percent/percent.js +20 -43
- package/lib/percent/percent.js.map +1 -1
- package/lib/percent/style/css.js.map +1 -1
- package/lib/percent/style/index.js.map +1 -1
- package/lib/percent/style/index.less +41 -41
- package/lib/scroll/index.js +2 -6
- package/lib/scroll/index.js.map +1 -1
- package/lib/scroll/scroll.d.ts +1 -1
- package/lib/scroll/scroll.js +19 -47
- package/lib/scroll/scroll.js.map +1 -1
- package/lib/scroll/style/css.js.map +1 -1
- package/lib/scroll/style/index.js.map +1 -1
- package/lib/scroll/style/index.less +3 -3
- package/lib/scroll-select/index.js +2 -6
- package/lib/scroll-select/index.js.map +1 -1
- package/lib/scroll-select/scrollSelect.d.ts +2 -1
- package/lib/scroll-select/scrollSelect.js +144 -218
- package/lib/scroll-select/scrollSelect.js.map +1 -1
- package/lib/scroll-select/style/css.js +0 -2
- package/lib/scroll-select/style/css.js.map +1 -1
- package/lib/scroll-select/style/index.d.ts +0 -1
- package/lib/scroll-select/style/index.js +0 -2
- package/lib/scroll-select/style/index.js.map +1 -1
- package/lib/scroll-select/style/index.less +7 -7
- package/lib/style/color.less +1 -1
- package/lib/table/index.js +2 -6
- package/lib/table/index.js.map +1 -1
- package/lib/table/style/css.js +0 -2
- package/lib/table/style/css.js.map +1 -1
- package/lib/table/style/index.d.ts +0 -1
- package/lib/table/style/index.js +0 -2
- package/lib/table/style/index.js.map +1 -1
- package/lib/table/table.d.ts +1 -1
- package/lib/table/table.js +24 -56
- package/lib/table/table.js.map +1 -1
- package/lib/template/action.d.ts +3 -1
- package/lib/template/action.js +93 -132
- package/lib/template/action.js.map +1 -1
- package/lib/template/card-table.d.ts +7 -6
- package/lib/template/card-table.js +40 -82
- package/lib/template/card-table.js.map +1 -1
- package/lib/template/card.d.ts +1 -1
- package/lib/template/card.js +20 -38
- package/lib/template/card.js.map +1 -1
- package/lib/template/check-row.d.ts +2 -1
- package/lib/template/check-row.js +7 -12
- package/lib/template/check-row.js.map +1 -1
- package/lib/template/field.js +8 -24
- package/lib/template/field.js.map +1 -1
- package/lib/template/filter.d.ts +1 -2
- package/lib/template/filter.js +25 -63
- package/lib/template/filter.js.map +1 -1
- package/lib/template/icon.js +4 -15
- package/lib/template/icon.js.map +1 -1
- package/lib/template/index.d.ts +2 -3
- package/lib/template/index.js +4 -12
- package/lib/template/index.js.map +1 -1
- package/lib/template/interface.js.map +1 -1
- package/lib/template/renderColumnButtons.js +80 -104
- package/lib/template/renderColumnButtons.js.map +1 -1
- package/lib/template/style/action.css +3 -2
- package/lib/template/style/action.less +74 -71
- package/lib/template/style/card.css +2 -2
- package/lib/template/style/card.less +87 -88
- package/lib/template/style/check-row.less +27 -27
- package/lib/template/style/css.js +0 -36
- package/lib/template/style/css.js.map +1 -1
- package/lib/template/style/field.less +11 -11
- package/lib/template/style/filter.css +0 -29
- package/lib/template/style/filter.less +46 -72
- package/lib/template/style/icon.less +7 -7
- package/lib/template/style/index.css +8 -42
- package/lib/template/style/index.d.ts +0 -18
- package/lib/template/style/index.js +0 -36
- package/lib/template/style/index.js.map +1 -1
- package/lib/template/style/index.less +48 -49
- package/lib/template/style/table.css +0 -6
- package/lib/template/style/table.less +79 -91
- package/lib/template/table.d.ts +7 -5
- package/lib/template/table.js +23 -45
- package/lib/template/table.js.map +1 -1
- package/lib/template/template.d.ts +4 -4
- package/lib/template/template.js +134 -258
- package/lib/template/template.js.map +1 -1
- package/lib/template/toolbar.d.ts +1 -1
- package/lib/template/toolbar.js +57 -63
- package/lib/template/toolbar.js.map +1 -1
- package/lib/to-map/container.js +58 -112
- package/lib/to-map/container.js.map +1 -1
- package/lib/to-map/draw-area.js +14 -34
- package/lib/to-map/draw-area.js.map +1 -1
- package/lib/to-map/index.d.ts +1 -1
- package/lib/to-map/index.js +2 -7
- package/lib/to-map/index.js.map +1 -1
- package/lib/to-map/style/css.js +0 -2
- package/lib/to-map/style/css.js.map +1 -1
- package/lib/to-map/style/index.d.ts +0 -1
- package/lib/to-map/style/index.js +0 -2
- package/lib/to-map/style/index.js.map +1 -1
- package/lib/to-map/style/index.less +86 -86
- package/lib/to-map/to-map.js +22 -49
- package/lib/to-map/to-map.js.map +1 -1
- package/lib/upload/index.js +2 -6
- package/lib/upload/index.js.map +1 -1
- package/lib/upload/style/css.js +0 -5
- package/lib/upload/style/css.js.map +1 -1
- package/lib/upload/style/index.d.ts +0 -2
- package/lib/upload/style/index.js +0 -5
- package/lib/upload/style/index.js.map +1 -1
- package/lib/upload/upload.d.ts +4 -1
- package/lib/upload/upload.js +164 -245
- package/lib/upload/upload.js.map +1 -1
- package/lib/use-simple-res/demos/index.d.ts +2 -1
- package/lib/use-simple-res/demos/index.js +31 -59
- package/lib/use-simple-res/demos/index.js.map +1 -1
- package/lib/use-simple-res/index.d.ts +0 -1
- package/lib/use-simple-res/index.js +61 -75
- package/lib/use-simple-res/index.js.map +1 -1
- package/lib/use-simple-res/style/css.js.map +1 -1
- package/lib/use-simple-res/style/index.js.map +1 -1
- package/lib/utils/dom-util.js +8 -27
- package/lib/utils/dom-util.js.map +1 -1
- package/lib/utils/request-util.d.ts +10 -1
- package/lib/utils/request-util.js +170 -45
- package/lib/utils/request-util.js.map +1 -1
- package/lib/utils/string-util.d.ts +2 -0
- package/lib/utils/string-util.js +34 -16
- package/lib/utils/string-util.js.map +1 -1
- package/lib/view-modal/index.d.ts +0 -1
- package/lib/view-modal/index.js +2 -8
- package/lib/view-modal/index.js.map +1 -1
- package/lib/view-modal/style/css.js +0 -12
- package/lib/view-modal/style/css.js.map +1 -1
- package/lib/view-modal/style/index.css +3 -41
- package/lib/view-modal/style/index.d.ts +0 -7
- package/lib/view-modal/style/index.js +0 -12
- package/lib/view-modal/style/index.js.map +1 -1
- package/lib/view-modal/style/index.less +42 -57
- package/lib/view-modal/view-modal.d.ts +1 -1
- package/lib/view-modal/view-modal.js +36 -86
- package/lib/view-modal/view-modal.js.map +1 -1
- package/package.json +157 -143
- package/lib/style/css.js +0 -13
- package/lib/style/css.js.map +0 -1
- package/lib/style/darkGreen.css +0 -719
- package/lib/style/darkGreen.less +0 -482
- package/lib/style/index.d.ts +0 -2
- package/lib/style/index.js +0 -13
- package/lib/style/index.js.map +0 -1
- package/lib/template/vtx-search/index.d.ts +0 -2
- package/lib/template/vtx-search/index.js +0 -126
- package/lib/template/vtx-search/index.js.map +0 -1
- package/lib/template/vtx-search/style/index.css +0 -92
- package/lib/template/vtx-search/style/index.less +0 -92
|
@@ -1,69 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
11
|
-
|
|
12
|
-
var _message = _interopRequireDefault(require("antd/lib/message"));
|
|
13
|
-
|
|
14
|
-
var _upload = _interopRequireDefault(require("antd/lib/upload"));
|
|
15
|
-
|
|
16
|
-
var _divider = _interopRequireDefault(require("antd/lib/divider"));
|
|
17
|
-
|
|
18
|
-
var _table = _interopRequireDefault(require("antd/lib/table"));
|
|
19
|
-
|
|
8
|
+
var _antd = require("antd");
|
|
20
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _modal = _interopRequireDefault(require("antd/lib/modal"));
|
|
23
|
-
|
|
24
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
-
|
|
26
11
|
var _icons = require("@ant-design/icons");
|
|
27
|
-
|
|
28
12
|
var _requestUtil = _interopRequireDefault(require("../utils/request-util"));
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
37
|
-
|
|
38
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
39
|
-
|
|
40
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
41
|
-
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
15
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
16
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
17
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
42
19
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
47
|
-
|
|
48
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
49
|
-
|
|
20
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
21
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
22
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
50
23
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
57
|
-
|
|
58
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
|
-
|
|
24
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
25
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
60
28
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
61
29
|
function adopt(value) {
|
|
62
30
|
return value instanceof P ? value : new P(function (resolve) {
|
|
63
31
|
resolve(value);
|
|
64
32
|
});
|
|
65
33
|
}
|
|
66
|
-
|
|
67
34
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
68
35
|
function fulfilled(value) {
|
|
69
36
|
try {
|
|
@@ -72,7 +39,6 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
|
|
|
72
39
|
reject(e);
|
|
73
40
|
}
|
|
74
41
|
}
|
|
75
|
-
|
|
76
42
|
function rejected(value) {
|
|
77
43
|
try {
|
|
78
44
|
step(generator["throw"](value));
|
|
@@ -80,170 +46,142 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
|
|
|
80
46
|
reject(e);
|
|
81
47
|
}
|
|
82
48
|
}
|
|
83
|
-
|
|
84
49
|
function step(result) {
|
|
85
50
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
86
51
|
}
|
|
87
|
-
|
|
88
52
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
89
53
|
});
|
|
90
54
|
};
|
|
91
|
-
|
|
92
55
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
93
56
|
var t = {};
|
|
94
|
-
|
|
95
|
-
for (var p in s) {
|
|
96
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
97
|
-
}
|
|
98
|
-
|
|
57
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
99
58
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
100
59
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
101
60
|
}
|
|
102
61
|
return t;
|
|
103
62
|
};
|
|
104
|
-
|
|
105
63
|
var ImportModal = function ImportModal(props) {
|
|
106
64
|
var className = props.className,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
65
|
+
visible = props.visible,
|
|
66
|
+
_props$title = props.title,
|
|
67
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
68
|
+
templateSrc = props.templateSrc,
|
|
69
|
+
_props$showDowmLoadTe = props.showDowmLoadTemplateBtn,
|
|
70
|
+
showDowmLoadTemplateBtn = _props$showDowmLoadTe === void 0 ? true : _props$showDowmLoadTe,
|
|
71
|
+
onCancel = props.onCancel,
|
|
72
|
+
clear = props.clear,
|
|
73
|
+
onOk = props.onOk,
|
|
74
|
+
_props$multiple = props.multiple,
|
|
75
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
76
|
+
_props$styleType = props.styleType,
|
|
77
|
+
styleType = _props$styleType === void 0 ? '2' : _props$styleType,
|
|
78
|
+
importUrl = props.importUrl,
|
|
79
|
+
afterUpload = props.afterUpload,
|
|
80
|
+
postData = props.postData,
|
|
81
|
+
_props$modalWidth = props.modalWidth,
|
|
82
|
+
modalWidth = _props$modalWidth === void 0 ? 800 : _props$modalWidth,
|
|
83
|
+
_props$columns = props.columns,
|
|
84
|
+
columns = _props$columns === void 0 ? [{
|
|
85
|
+
title: '序号',
|
|
86
|
+
dataIndex: 'showIndex',
|
|
87
|
+
key: 'showIndex',
|
|
88
|
+
// render: (text: any, record: any, index: any) => index + 1,
|
|
89
|
+
width: 80
|
|
90
|
+
}, {
|
|
91
|
+
title: '行数',
|
|
92
|
+
dataIndex: 'row',
|
|
93
|
+
key: 'row',
|
|
94
|
+
width: 80
|
|
95
|
+
}, {
|
|
96
|
+
title: '错误信息',
|
|
97
|
+
dataIndex: 'message',
|
|
98
|
+
key: 'message'
|
|
99
|
+
}] : _props$columns,
|
|
100
|
+
_props$errorKey = props.errorKey,
|
|
101
|
+
errorKey = _props$errorKey === void 0 ? 'msg' : _props$errorKey,
|
|
102
|
+
_props$operation = props.operation,
|
|
103
|
+
operation = _props$operation === void 0 ? '导入' : _props$operation,
|
|
104
|
+
rest = __rest(props, ["className", "visible", "title", "templateSrc", "showDowmLoadTemplateBtn", "onCancel", "clear", "onOk", "multiple", "styleType", "importUrl", "afterUpload", "postData", "modalWidth", "columns", "errorKey", "operation"]);
|
|
144
105
|
var _useState = (0, _react.useState)([]),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
106
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
107
|
+
fileList = _useState2[0],
|
|
108
|
+
setFileList = _useState2[1];
|
|
149
109
|
var _useState3 = (0, _react.useState)(false),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
110
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
111
|
+
loading = _useState4[0],
|
|
112
|
+
setLoading = _useState4[1];
|
|
154
113
|
var _useState5 = (0, _react.useState)(false),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
114
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
115
|
+
errModalVisible = _useState6[0],
|
|
116
|
+
setErrModalVisible = _useState6[1];
|
|
159
117
|
var _useState7 = (0, _react.useState)([]),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
118
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
119
|
+
errDataList = _useState8[0],
|
|
120
|
+
setErrDataList = _useState8[1];
|
|
164
121
|
var handleOk = function handleOk() {
|
|
165
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/
|
|
166
|
-
var formData, res, value, _iterator, _step, _step$value, index;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (!(fileList.length === 0)) {
|
|
173
|
-
_context.next = 3;
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
_message["default"].warning('请上传文件');
|
|
178
|
-
|
|
179
|
-
return _context.abrupt("return");
|
|
180
|
-
|
|
181
|
-
case 3:
|
|
182
|
-
formData = new FormData();
|
|
183
|
-
fileList.forEach(function (file) {
|
|
184
|
-
formData.append('file', file);
|
|
185
|
-
|
|
186
|
-
if (postData && postData instanceof Object) {
|
|
187
|
-
for (var i in postData) {
|
|
188
|
-
if (postData.hasOwnProperty(i)) {
|
|
189
|
-
formData.append(i, postData[i]);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
_context.prev = 5;
|
|
195
|
-
setLoading(true);
|
|
196
|
-
_context.next = 9;
|
|
197
|
-
return _requestUtil["default"].uploadFile(importUrl, formData);
|
|
198
|
-
|
|
199
|
-
case 9:
|
|
200
|
-
res = _context.sent;
|
|
201
|
-
|
|
202
|
-
_message["default"].success(res.msg || '导入成功!');
|
|
203
|
-
|
|
204
|
-
onOk(res);
|
|
205
|
-
_context.next = 18;
|
|
122
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee() {
|
|
123
|
+
var formData, res, value, _iterator, _step, _step$value, index, _t;
|
|
124
|
+
return _regenerator().w(function (_context) {
|
|
125
|
+
while (1) switch (_context.p = _context.n) {
|
|
126
|
+
case 0:
|
|
127
|
+
if (!(fileList.length === 0)) {
|
|
128
|
+
_context.n = 1;
|
|
206
129
|
break;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
_step$value = _slicedToArray(_step.value, 1), index = _step$value[0];
|
|
219
|
-
value[index].showIndex = index + 1;
|
|
130
|
+
}
|
|
131
|
+
_antd.message.warning('请上传文件');
|
|
132
|
+
return _context.a(2);
|
|
133
|
+
case 1:
|
|
134
|
+
formData = new FormData();
|
|
135
|
+
fileList.forEach(function (file) {
|
|
136
|
+
formData.append('file', file);
|
|
137
|
+
if (postData && postData instanceof Object) {
|
|
138
|
+
for (var i in postData) {
|
|
139
|
+
if (postData.hasOwnProperty(i)) {
|
|
140
|
+
formData.append(i, postData[i]);
|
|
220
141
|
}
|
|
221
|
-
} catch (err) {
|
|
222
|
-
_iterator.e(err);
|
|
223
|
-
} finally {
|
|
224
|
-
_iterator.f();
|
|
225
142
|
}
|
|
226
|
-
|
|
227
|
-
setErrDataList(value);
|
|
228
|
-
setErrModalVisible(true);
|
|
229
143
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
144
|
+
});
|
|
145
|
+
_context.p = 2;
|
|
146
|
+
setLoading(true);
|
|
147
|
+
_context.n = 3;
|
|
148
|
+
return _requestUtil["default"].uploadFile(importUrl, formData, operation);
|
|
149
|
+
case 3:
|
|
150
|
+
res = _context.v;
|
|
151
|
+
_antd.message.success(res.msg || '导入成功!');
|
|
152
|
+
onOk(res);
|
|
153
|
+
_context.n = 5;
|
|
154
|
+
break;
|
|
155
|
+
case 4:
|
|
156
|
+
_context.p = 4;
|
|
157
|
+
_t = _context.v;
|
|
158
|
+
if (Array.isArray(_t.data)) {
|
|
159
|
+
value = _toConsumableArray(_t.data);
|
|
160
|
+
_iterator = _createForOfIteratorHelper(value.entries());
|
|
161
|
+
try {
|
|
162
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
163
|
+
_step$value = _slicedToArray(_step.value, 1), index = _step$value[0];
|
|
164
|
+
value[index].showIndex = index + 1;
|
|
165
|
+
}
|
|
166
|
+
} catch (err) {
|
|
167
|
+
_iterator.e(err);
|
|
168
|
+
} finally {
|
|
169
|
+
_iterator.f();
|
|
170
|
+
}
|
|
171
|
+
setErrDataList(value);
|
|
172
|
+
setErrModalVisible(true);
|
|
173
|
+
}
|
|
174
|
+
_antd.message.error(_t[errorKey] || '导入失败!');
|
|
175
|
+
case 5:
|
|
176
|
+
_context.p = 5;
|
|
177
|
+
setLoading(false);
|
|
178
|
+
return _context.f(5);
|
|
179
|
+
case 6:
|
|
180
|
+
return _context.a(2);
|
|
242
181
|
}
|
|
243
|
-
}, _callee, null, [[
|
|
182
|
+
}, _callee, null, [[2, 4, 5, 6]]);
|
|
244
183
|
}));
|
|
245
184
|
};
|
|
246
|
-
|
|
247
185
|
(0, _react.useEffect)(function () {
|
|
248
186
|
if (!visible) {
|
|
249
187
|
setFileList([]);
|
|
@@ -253,13 +191,13 @@ var ImportModal = function ImportModal(props) {
|
|
|
253
191
|
visible: visible,
|
|
254
192
|
title: title || '导入',
|
|
255
193
|
width: 520,
|
|
256
|
-
footer: [styleType === '1' || !showDowmLoadTemplateBtn ? null : /*#__PURE__*/_react["default"].createElement(
|
|
194
|
+
footer: [styleType === '1' || !showDowmLoadTemplateBtn ? null : (/*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
257
195
|
className: 'env-import-modal-button',
|
|
258
196
|
key: "down",
|
|
259
197
|
onClick: function onClick() {
|
|
260
198
|
templateSrc && _requestUtil["default"].downloadFile(templateSrc);
|
|
261
199
|
}
|
|
262
|
-
}, "\u4E0B\u8F7D\u6A21\u677F"), /*#__PURE__*/_react["default"].createElement(
|
|
200
|
+
}, "\u4E0B\u8F7D\u6A21\u677F")), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
263
201
|
key: "submit",
|
|
264
202
|
type: "primary",
|
|
265
203
|
loading: loading,
|
|
@@ -267,7 +205,7 @@ var ImportModal = function ImportModal(props) {
|
|
|
267
205
|
onClick: function onClick() {
|
|
268
206
|
handleOk();
|
|
269
207
|
}
|
|
270
|
-
}, "\u4E0A\u4F20"), /*#__PURE__*/_react["default"].createElement(
|
|
208
|
+
}, "\u4E0A\u4F20"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
271
209
|
className: 'env-import-modal-button',
|
|
272
210
|
key: "back",
|
|
273
211
|
onClick: function onClick() {
|
|
@@ -296,7 +234,7 @@ var ImportModal = function ImportModal(props) {
|
|
|
296
234
|
visible: errModalVisible,
|
|
297
235
|
title: '提示',
|
|
298
236
|
width: modalWidth,
|
|
299
|
-
footer: [/*#__PURE__*/_react["default"].createElement(
|
|
237
|
+
footer: [/*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
300
238
|
key: "sure",
|
|
301
239
|
type: "primary",
|
|
302
240
|
className: 'env-import-modal-button',
|
|
@@ -309,8 +247,8 @@ var ImportModal = function ImportModal(props) {
|
|
|
309
247
|
setErrModalVisible(false);
|
|
310
248
|
setErrDataList([]);
|
|
311
249
|
}
|
|
312
|
-
};
|
|
313
|
-
|
|
250
|
+
};
|
|
251
|
+
// 报错信息提示框
|
|
314
252
|
var tableProps = {
|
|
315
253
|
rowKey: function rowKey(index) {
|
|
316
254
|
return index;
|
|
@@ -323,36 +261,34 @@ var ImportModal = function ImportModal(props) {
|
|
|
323
261
|
};
|
|
324
262
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
325
263
|
className: (0, _classnames["default"])('env-import-modal', className)
|
|
326
|
-
}, styleType === '1' ? /*#__PURE__*/_react["default"].createElement(
|
|
264
|
+
}, styleType === '1' ? (/*#__PURE__*/_react["default"].createElement(_antd.Modal, Object.assign({}, modalProps, rest), /*#__PURE__*/_react["default"].createElement("div", {
|
|
327
265
|
className: 'env-import-modal-modalnormal'
|
|
328
|
-
}, showDowmLoadTemplateBtn ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
266
|
+
}, showDowmLoadTemplateBtn ? (/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
329
267
|
className: 'env-import-modal-downLoad'
|
|
330
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
268
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
331
269
|
className: 'env-import-modal-button',
|
|
332
270
|
icon: /*#__PURE__*/_react["default"].createElement(_icons.DownloadOutlined, null),
|
|
333
271
|
type: "primary",
|
|
334
272
|
onClick: function onClick() {
|
|
335
273
|
templateSrc && _requestUtil["default"].downloadFile(templateSrc);
|
|
336
274
|
}
|
|
337
|
-
}, "\u4E0B\u8F7D\u6A21\u677F")), /*#__PURE__*/_react["default"].createElement(
|
|
275
|
+
}, "\u4E0B\u8F7D\u6A21\u677F")), /*#__PURE__*/_react["default"].createElement(_antd.Divider, null))) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
338
276
|
className: 'env-import-modal-upload'
|
|
339
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
277
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Upload, Object.assign({}, importProps), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
340
278
|
disabled: fileList && fileList.length ? true : false,
|
|
341
279
|
className: 'env-import-modal-button',
|
|
342
280
|
icon: /*#__PURE__*/_react["default"].createElement(_icons.UploadOutlined, null)
|
|
343
|
-
}, "\u4E0A\u4F20\u6587\u4EF6"))))) : /*#__PURE__*/_react["default"].createElement(
|
|
281
|
+
}, "\u4E0A\u4F20\u6587\u4EF6")))))) : (/*#__PURE__*/_react["default"].createElement(_antd.Modal, Object.assign({}, modalProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
344
282
|
className: 'env-import-modal-modalnormal'
|
|
345
283
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
346
284
|
className: 'env-import-modal-upload'
|
|
347
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
285
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Upload, Object.assign({}, importProps), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
348
286
|
className: 'env-import-modal-button',
|
|
349
287
|
disabled: fileList && fileList.length ? true : false,
|
|
350
288
|
icon: /*#__PURE__*/_react["default"].createElement(_icons.UploadOutlined, null)
|
|
351
|
-
}, "\u4E0A\u4F20\u6587\u4EF6"))))), /*#__PURE__*/_react["default"].createElement(
|
|
289
|
+
}, "\u4E0A\u4F20\u6587\u4EF6")))))), /*#__PURE__*/_react["default"].createElement(_antd.Modal, Object.assign({}, errModal), /*#__PURE__*/_react["default"].createElement("div", {
|
|
352
290
|
className: 'env-import-modal-modalerror'
|
|
353
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
291
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Table, Object.assign({}, tableProps)))));
|
|
354
292
|
};
|
|
355
|
-
|
|
356
|
-
var _default = ImportModal;
|
|
357
|
-
exports["default"] = _default;
|
|
293
|
+
var _default = exports["default"] = ImportModal;
|
|
358
294
|
//# sourceMappingURL=import-modal.js.map
|