@panpanzhao/component-ui 1.24.1119 → 1.24.1218
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/lib/0.worker.js +1 -0
- package/lib/component-ui.common.js +911 -168
- package/lib/components/0.worker.js +1052 -0
- package/lib/components/crud.js +6 -2
- package/lib/components/dialog.js +4 -4
- package/lib/components/drawer.js +2 -2
- package/lib/components/form-drawer.js +4 -4
- package/lib/components/form-input.js +855 -128
- package/lib/components/form-item.js +22 -6
- package/lib/components/form-query.js +2 -2
- package/lib/components/formula.js +21 -21
- package/lib/components/table-column.js +10 -10
- package/lib/components/table-editable.js +6 -6
- package/lib/components/table-operate.js +6 -2
- package/lib/components/table-search.js +6 -6
- package/lib/components/table.js +4 -4
- package/lib/components/timeline.js +2 -2
- package/lib/components/tree-line.js +2 -2
- package/lib/index.js +1 -1
- package/lib/styles/component-ui.css +2 -2
- package/lib/styles/index.css +2 -2
- package/lib/styles/upload-process.css +1 -1
- package/package.json +73 -70
- package/src/index.js +0 -89
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 75);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -265,108 +265,703 @@ module.exports = require("element-ui/lib/radio");
|
|
|
265
265
|
module.exports = require("element-ui/lib/cascader");
|
|
266
266
|
|
|
267
267
|
/***/ }),
|
|
268
|
-
/* 36
|
|
268
|
+
/* 36 */
|
|
269
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
270
|
+
|
|
271
|
+
"use strict";
|
|
272
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return uploadFile; });
|
|
273
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return mergeChunk; });
|
|
274
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkFile; });
|
|
275
|
+
/**
|
|
276
|
+
* [uploadFile] - 上传切片参数
|
|
277
|
+
* @param fileHash 文件hash,String
|
|
278
|
+
* @param fileSize 文件大小,Number
|
|
279
|
+
* @param fileName 文件名称,String
|
|
280
|
+
* @param index 多文件上传中的所在index,number
|
|
281
|
+
* @param chunkFile 切片文件本身,File || Blob || void
|
|
282
|
+
* @param chunkHash 切片文件hash,String
|
|
283
|
+
* @param chunkSize 分片大小,Number
|
|
284
|
+
* @param chunkNumber 切片总数量,Number
|
|
285
|
+
* @param finish 是否上传完成,可选参数,Boolean
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
// 上传单个切片
|
|
289
|
+
function uploadFile(data, _ref) {
|
|
290
|
+
var onCancel = _ref.onCancel,
|
|
291
|
+
service = _ref.service;
|
|
292
|
+
var controller = new AbortController();
|
|
293
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
294
|
+
// 封装 axios 请求或 HTTP 客户端请求
|
|
295
|
+
var request = service({
|
|
296
|
+
url: "/tengine/dfs/bigStorage/upload",
|
|
297
|
+
method: "post",
|
|
298
|
+
data: data,
|
|
299
|
+
headers: {
|
|
300
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
301
|
+
},
|
|
302
|
+
signal: signal // 将 signal 传递给服务函数
|
|
303
|
+
});
|
|
304
|
+
// 如果提供了 onCancel 回调,则传递取消函数
|
|
305
|
+
if (typeof onCancel === "function") {
|
|
306
|
+
// 如果是一个函数,则直接调用传一个取消方法给 这个方法
|
|
307
|
+
// 所以只要传进来是方法,就会直接传一个参数并直接触发这个函数
|
|
308
|
+
// 那传过来的这个方法就会接收到一个参数(就是取消函数() => controller.abort())
|
|
309
|
+
// 在调用uploadFile就可以拿到这个参数
|
|
310
|
+
onCancel(function () {
|
|
311
|
+
return controller.abort();
|
|
312
|
+
}); // 调用 onCancel 时传入取消函数
|
|
313
|
+
}
|
|
314
|
+
return request;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* [mergeChunk] - 合并切片
|
|
319
|
+
* @param chunkSize 分片大小,Number
|
|
320
|
+
* @param fileName 文件名称,String
|
|
321
|
+
* @param fileSize 文件大小,Number
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
// 合并所有切片
|
|
325
|
+
function mergeChunk(data, _ref2) {
|
|
326
|
+
var service = _ref2.service;
|
|
327
|
+
return service({
|
|
328
|
+
url: "/tengine/dfs/bigStorage/merge",
|
|
329
|
+
method: "post",
|
|
330
|
+
data: {
|
|
331
|
+
fileMd5: data.fileHash,
|
|
332
|
+
fsign: data.fsign,
|
|
333
|
+
fileName: data.fileName,
|
|
334
|
+
fileSize: data.fileSize,
|
|
335
|
+
busiType: data.busiType
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* [checkFile] - 检查文件是否存在
|
|
342
|
+
* @param fileHash 文件hash,String
|
|
343
|
+
* @param fileName 文件名称,String
|
|
344
|
+
*/
|
|
345
|
+
|
|
346
|
+
// 检查文件是否存在
|
|
347
|
+
function checkFile(data, _ref3) {
|
|
348
|
+
var service = _ref3.service;
|
|
349
|
+
return service({
|
|
350
|
+
url: "/tengine/dfs/bigStorage/checkChunk",
|
|
351
|
+
method: "post",
|
|
352
|
+
data: {
|
|
353
|
+
fileMd5: data.fileHash,
|
|
354
|
+
fileName: data.fileName,
|
|
355
|
+
busiType: data.busiType
|
|
356
|
+
},
|
|
357
|
+
headers: {
|
|
358
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/***/ }),
|
|
269
364
|
/* 37 */,
|
|
270
365
|
/* 38 */,
|
|
271
|
-
/* 39
|
|
366
|
+
/* 39 */,
|
|
367
|
+
/* 40 */
|
|
272
368
|
/***/ (function(module, exports) {
|
|
273
369
|
|
|
274
370
|
module.exports = require("element-ui/lib/input-number");
|
|
275
371
|
|
|
276
372
|
/***/ }),
|
|
277
|
-
/*
|
|
373
|
+
/* 41 */
|
|
278
374
|
/***/ (function(module, exports) {
|
|
279
375
|
|
|
280
376
|
module.exports = require("element-ui/lib/select");
|
|
281
377
|
|
|
282
378
|
/***/ }),
|
|
283
|
-
/*
|
|
379
|
+
/* 42 */
|
|
284
380
|
/***/ (function(module, exports) {
|
|
285
381
|
|
|
286
382
|
module.exports = require("element-ui/lib/option");
|
|
287
383
|
|
|
288
384
|
/***/ }),
|
|
289
|
-
/*
|
|
385
|
+
/* 43 */
|
|
290
386
|
/***/ (function(module, exports) {
|
|
291
387
|
|
|
292
388
|
module.exports = require("element-ui/lib/option-group");
|
|
293
389
|
|
|
294
390
|
/***/ }),
|
|
295
|
-
/*
|
|
391
|
+
/* 44 */
|
|
296
392
|
/***/ (function(module, exports) {
|
|
297
393
|
|
|
298
394
|
module.exports = require("@panpanzhao/component-ui/lib/components/tree-line");
|
|
299
395
|
|
|
300
396
|
/***/ }),
|
|
301
|
-
/*
|
|
397
|
+
/* 45 */
|
|
302
398
|
/***/ (function(module, exports) {
|
|
303
399
|
|
|
304
400
|
module.exports = require("element-ui/lib/radio-group");
|
|
305
401
|
|
|
306
402
|
/***/ }),
|
|
307
|
-
/*
|
|
403
|
+
/* 46 */
|
|
308
404
|
/***/ (function(module, exports) {
|
|
309
405
|
|
|
310
406
|
module.exports = require("element-ui/lib/radio-button");
|
|
311
407
|
|
|
312
408
|
/***/ }),
|
|
313
|
-
/*
|
|
409
|
+
/* 47 */
|
|
314
410
|
/***/ (function(module, exports) {
|
|
315
411
|
|
|
316
412
|
module.exports = require("element-ui/lib/checkbox-group");
|
|
317
413
|
|
|
318
414
|
/***/ }),
|
|
319
|
-
/*
|
|
415
|
+
/* 48 */
|
|
320
416
|
/***/ (function(module, exports) {
|
|
321
417
|
|
|
322
418
|
module.exports = require("element-ui/lib/checkbox");
|
|
323
419
|
|
|
324
420
|
/***/ }),
|
|
325
|
-
/*
|
|
421
|
+
/* 49 */
|
|
326
422
|
/***/ (function(module, exports) {
|
|
327
423
|
|
|
328
424
|
module.exports = require("element-ui/lib/checkbox-button");
|
|
329
425
|
|
|
330
426
|
/***/ }),
|
|
331
|
-
/*
|
|
427
|
+
/* 50 */
|
|
332
428
|
/***/ (function(module, exports) {
|
|
333
429
|
|
|
334
430
|
module.exports = require("element-ui/lib/date-picker");
|
|
335
431
|
|
|
336
432
|
/***/ }),
|
|
337
|
-
/*
|
|
433
|
+
/* 51 */
|
|
434
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
435
|
+
|
|
436
|
+
"use strict";
|
|
437
|
+
/* WEBPACK VAR INJECTION */(function(__webpack__worker__0) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LargeUpload; });
|
|
438
|
+
/* harmony import */ var _remote_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
|
|
439
|
+
/* harmony import */ var js_md5__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52);
|
|
440
|
+
/* harmony import */ var js_md5__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(js_md5__WEBPACK_IMPORTED_MODULE_1__);
|
|
441
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
442
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
443
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
444
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
445
|
+
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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
446
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
447
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
448
|
+
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
|
|
449
|
+
var id = 0;
|
|
450
|
+
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
var _useWorker = /*#__PURE__*/_classPrivateFieldLooseKey("useWorker");
|
|
454
|
+
var _finishTask = /*#__PURE__*/_classPrivateFieldLooseKey("finishTask");
|
|
455
|
+
var _handleMerge = /*#__PURE__*/_classPrivateFieldLooseKey("handleMerge");
|
|
456
|
+
var _signleFileProgress = /*#__PURE__*/_classPrivateFieldLooseKey("signleFileProgress");
|
|
457
|
+
var _uploadSignleFile = /*#__PURE__*/_classPrivateFieldLooseKey("uploadSignleFile");
|
|
458
|
+
var LargeUpload = /*#__PURE__*/function () {
|
|
459
|
+
function LargeUpload(fileObj, options, callBack) {
|
|
460
|
+
// 单个文件上传
|
|
461
|
+
Object.defineProperty(this, _uploadSignleFile, {
|
|
462
|
+
value: _uploadSignleFile2
|
|
463
|
+
});
|
|
464
|
+
// 更新单个文件进度条
|
|
465
|
+
Object.defineProperty(this, _signleFileProgress, {
|
|
466
|
+
value: _signleFileProgress2
|
|
467
|
+
});
|
|
468
|
+
// 调取合并接口处理所有切片
|
|
469
|
+
Object.defineProperty(this, _handleMerge, {
|
|
470
|
+
value: _handleMerge2
|
|
471
|
+
});
|
|
472
|
+
// 设置单个文件上传已完成
|
|
473
|
+
Object.defineProperty(this, _finishTask, {
|
|
474
|
+
value: _finishTask2
|
|
475
|
+
});
|
|
476
|
+
// 生成文件 hash(web-worker)
|
|
477
|
+
Object.defineProperty(this, _useWorker, {
|
|
478
|
+
value: _useWorker2
|
|
479
|
+
});
|
|
480
|
+
var request = options.request,
|
|
481
|
+
uploadFileList = options.uploadFileList,
|
|
482
|
+
_chunkSize = options.chunkSize,
|
|
483
|
+
maxRequest = options.maxRequest,
|
|
484
|
+
_busiType = options.busiType,
|
|
485
|
+
batchMaxCount = options.batchMaxCount;
|
|
486
|
+
this.fileObj = fileObj;
|
|
487
|
+
this.request = request;
|
|
488
|
+
this.uploadFileList = uploadFileList;
|
|
489
|
+
this.chunkSize = _chunkSize;
|
|
490
|
+
this.busiType = _busiType;
|
|
491
|
+
this.maxRequest = maxRequest || 6;
|
|
492
|
+
this.batchMaxCount = batchMaxCount || 6;
|
|
493
|
+
this.onUploadProgress = callBack == null ? void 0 : callBack.onUploadProgress;
|
|
494
|
+
this.onUploadFinish = callBack == null ? void 0 : callBack.onUploadFinish;
|
|
495
|
+
this.onUploadError = callBack == null ? void 0 : callBack.onUploadError;
|
|
496
|
+
}
|
|
497
|
+
// 取消单个
|
|
498
|
+
var _proto = LargeUpload.prototype;
|
|
499
|
+
_proto.cancelSingle =
|
|
500
|
+
/*#__PURE__*/
|
|
501
|
+
function () {
|
|
502
|
+
var _cancelSingle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
503
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
504
|
+
while (1) switch (_context.prev = _context.next) {
|
|
505
|
+
case 0:
|
|
506
|
+
this.pauseUpload(true);
|
|
507
|
+
//情况所有需要上传的分片
|
|
508
|
+
this.fileObj.allChunkList = [];
|
|
509
|
+
// 取消上传后列表删除该文件
|
|
510
|
+
// const list = uploadFileList.filter((itemB) => itemB.fileHash !== this.fileObj.fileHash);
|
|
511
|
+
// uploadFileList = list;
|
|
512
|
+
case 2:
|
|
513
|
+
case "end":
|
|
514
|
+
return _context.stop();
|
|
515
|
+
}
|
|
516
|
+
}, _callee, this);
|
|
517
|
+
}));
|
|
518
|
+
function cancelSingle() {
|
|
519
|
+
return _cancelSingle.apply(this, arguments);
|
|
520
|
+
}
|
|
521
|
+
return cancelSingle;
|
|
522
|
+
}() // 暂停上传(是暂停剩下未上传的)
|
|
523
|
+
;
|
|
524
|
+
_proto.pauseUpload = function pauseUpload(elsePause, error) {
|
|
525
|
+
if (elsePause === void 0) {
|
|
526
|
+
elsePause = true;
|
|
527
|
+
}
|
|
528
|
+
// elsePause为true就是主动暂停,为false就是请求中断
|
|
529
|
+
// 4是成功 6是失败 如果不是成功或者失败状态,
|
|
530
|
+
if (![200, 500].includes(this.fileObj.state)) {
|
|
531
|
+
// 3是暂停,5是中断
|
|
532
|
+
if (elsePause) {
|
|
533
|
+
this.fileObj.state = 30;
|
|
534
|
+
} else {
|
|
535
|
+
this.fileObj.state = 50;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
this.fileObj.errNumber = 0;
|
|
539
|
+
|
|
540
|
+
// 取消还在请求中的所有接口
|
|
541
|
+
if (this.fileObj.whileRequests.length > 0) {
|
|
542
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.fileObj.whileRequests), _step; !(_step = _iterator()).done;) {
|
|
543
|
+
var itemB = _step.value;
|
|
544
|
+
itemB.cancel ? itemB.cancel() : "";
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if (typeof this.onUploadError === "function") {
|
|
548
|
+
this.onUploadError(error || new Error("上传失败"));
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
// 继续上传
|
|
552
|
+
;
|
|
553
|
+
_proto.resumeUpload = function resumeUpload() {
|
|
554
|
+
var _this$fileObj$allChun;
|
|
555
|
+
// 2为上传中
|
|
556
|
+
this.fileObj.state = 100;
|
|
557
|
+
// 把刚才暂停的正在上传中所有切片放到待上传切片列表中
|
|
558
|
+
(_this$fileObj$allChun = this.fileObj.allChunkList).push.apply(_this$fileObj$allChun, this.fileObj.whileRequests);
|
|
559
|
+
this.fileObj.whileRequests = [];
|
|
560
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
561
|
+
}
|
|
562
|
+
// 开始上传事件
|
|
563
|
+
;
|
|
564
|
+
_proto.hanldeUploadFile =
|
|
565
|
+
/*#__PURE__*/
|
|
566
|
+
function () {
|
|
567
|
+
var _hanldeUploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
568
|
+
var _this = this;
|
|
569
|
+
var _yield$_classPrivateF, fileHash, fileChunkList, baseName, lastIndex, res, skipUpload, uploadedChunks;
|
|
570
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
571
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
572
|
+
case 0:
|
|
573
|
+
_context2.prev = 0;
|
|
574
|
+
this.fileObj.state = 10,
|
|
575
|
+
// 0是什么都不做,1文件处理中,2是上传中,3是暂停,4是上传完成,5上传中断,6是上传失败
|
|
576
|
+
this.fileObj.fileHash = "", this.fileObj.fileName = this.fileObj.name, this.fileObj.fileSize = this.fileObj.size, this.fileObj.allChunkList = [],
|
|
577
|
+
// 所有请求的数据
|
|
578
|
+
this.fileObj.whileRequests = [],
|
|
579
|
+
// 正在请求中的请求个数,目前是要永远都保存请求个数为6
|
|
580
|
+
this.fileObj.finishNumber = 0,
|
|
581
|
+
//请求完成的个数
|
|
582
|
+
this.fileObj.errNumber = 0,
|
|
583
|
+
// 报错的个数,默认是0个,超多3个就是直接上传中断
|
|
584
|
+
this.fileObj.percentage = 0,
|
|
585
|
+
// 单个文件上传进度条
|
|
586
|
+
this.fileObj.cancel = null,
|
|
587
|
+
// 用于取消切片上传接口
|
|
588
|
+
this.fileObj.busiType = this.busiType, this.fileObj.resume = this.resumeUpload.bind(this),
|
|
589
|
+
//用于重新上传
|
|
590
|
+
this.fileObj.cancel = this.cancelSingle.bind(this); //用于取消上传
|
|
591
|
+
if (this.fileObj.size === 0) {
|
|
592
|
+
// 文件大小为0直接上传失败
|
|
593
|
+
this.fileObj.state = 500;
|
|
594
|
+
// 上传中断
|
|
595
|
+
this.pauseUpload(false, new Error("文件大小为0"));
|
|
596
|
+
}
|
|
597
|
+
console.log("文件开始解析");
|
|
598
|
+
|
|
599
|
+
// 计算文件hash
|
|
600
|
+
_context2.next = 6;
|
|
601
|
+
return _classPrivateFieldLooseBase(this, _useWorker)[_useWorker](this.fileObj.raw || this.fileObj.file.raw);
|
|
602
|
+
case 6:
|
|
603
|
+
_yield$_classPrivateF = _context2.sent;
|
|
604
|
+
fileHash = _yield$_classPrivateF.fileHash;
|
|
605
|
+
fileChunkList = _yield$_classPrivateF.fileChunkList;
|
|
606
|
+
console.log(fileHash, "文件hash计算完成");
|
|
607
|
+
|
|
608
|
+
// 解析完成开始上传文件
|
|
609
|
+
baseName = ""; // 查找'.'在fileName中最后出现的位置
|
|
610
|
+
lastIndex = this.fileObj.name.lastIndexOf("."); // 如果'.'不存在,则返回整个文件名
|
|
611
|
+
if (lastIndex === -1) {
|
|
612
|
+
baseName = this.fileObj.name;
|
|
613
|
+
}
|
|
614
|
+
// 否则,返回从fileName开始到'.'前一个字符的子串作为文件名(不包含'.')
|
|
615
|
+
baseName = "_" + Object(js_md5__WEBPACK_IMPORTED_MODULE_1__["md5"])(this.fileObj.name.slice(0, lastIndex));
|
|
616
|
+
// 这里要注意!可能同一个文件,是复制出来的,出现文件名不同但是内容相同,导致获取到的hash值也是相同的
|
|
617
|
+
// 所以文件hash要特殊处理
|
|
618
|
+
this.fileObj.fileHash = "" + fileHash + baseName;
|
|
619
|
+
this.fileObj.fsign = fileHash;
|
|
620
|
+
this.fileObj.state = 100;
|
|
621
|
+
// console.log(uploadFileList.value, 'uploadFileList.value')
|
|
622
|
+
// 上传之前要检查服务器是否存在该文件
|
|
623
|
+
_context2.next = 19;
|
|
624
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* checkFile */ "a"])({
|
|
625
|
+
fileHash: "" + fileHash + baseName,
|
|
626
|
+
fileName: this.fileObj.name,
|
|
627
|
+
busiType: this.fileObj.busiType
|
|
628
|
+
}, {
|
|
629
|
+
service: this.request
|
|
630
|
+
});
|
|
631
|
+
case 19:
|
|
632
|
+
res = _context2.sent;
|
|
633
|
+
skipUpload = res.skipUpload, uploadedChunks = res.uploadedChunks;
|
|
634
|
+
if (skipUpload) {
|
|
635
|
+
_context2.next = 25;
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
//this.#finishTask(fileObj)
|
|
639
|
+
_classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
640
|
+
console.log("文件已存在,实现秒传");
|
|
641
|
+
return _context2.abrupt("return", false);
|
|
642
|
+
case 25:
|
|
643
|
+
this.fileObj.allChunkList = fileChunkList.map(function (item, index) {
|
|
644
|
+
return {
|
|
645
|
+
// 总文件hash
|
|
646
|
+
fileHash: "" + fileHash + baseName,
|
|
647
|
+
// 总文件size
|
|
648
|
+
fileSize: _this.fileObj.size,
|
|
649
|
+
// 总文件name
|
|
650
|
+
fileName: _this.fileObj.name,
|
|
651
|
+
index: index,
|
|
652
|
+
// 切片文件本身
|
|
653
|
+
chunkFile: item.chunkFile,
|
|
654
|
+
// 单个切片hash,以 - 连接
|
|
655
|
+
chunkHash: "" + fileHash + baseName + "-" + index,
|
|
656
|
+
// 切片文件大小
|
|
657
|
+
chunkSize: _this.chunkSize,
|
|
658
|
+
// 切片个数
|
|
659
|
+
chunkNumber: fileChunkList.length,
|
|
660
|
+
// 切片是否已经完成
|
|
661
|
+
finish: false
|
|
662
|
+
};
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
// 如果已存在部分文件切片,则要过滤调已经上传的切片
|
|
666
|
+
if (!((uploadedChunks == null ? void 0 : uploadedChunks.length) > 0)) {
|
|
667
|
+
_context2.next = 35;
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
670
|
+
// 过滤掉已经上传过的切片
|
|
671
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.filter(function (item) {
|
|
672
|
+
return !uploadedChunks.includes(item.chunkHash);
|
|
673
|
+
// return !uploadedChunks.includes(String(item.index));
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
// 如果存在需要上传的,但是又为空,可能是因为还没合并,
|
|
677
|
+
if (this.fileObj.allChunkList.length) {
|
|
678
|
+
_context2.next = 34;
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
_context2.next = 31;
|
|
682
|
+
return _classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
683
|
+
case 31:
|
|
684
|
+
return _context2.abrupt("return", false);
|
|
685
|
+
case 34:
|
|
686
|
+
// 同时要注意处理切片数量
|
|
687
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.map(function (item) {
|
|
688
|
+
return _extends({}, item, {
|
|
689
|
+
chunkNumber: _this.fileObj.allChunkList.length
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
case 35:
|
|
693
|
+
// 逐步对单个文件进行切片上传
|
|
694
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
695
|
+
_context2.next = 42;
|
|
696
|
+
break;
|
|
697
|
+
case 38:
|
|
698
|
+
_context2.prev = 38;
|
|
699
|
+
_context2.t0 = _context2["catch"](0);
|
|
700
|
+
console.log(_context2.t0);
|
|
701
|
+
this.pauseUpload(false, _context2.t0);
|
|
702
|
+
case 42:
|
|
703
|
+
case "end":
|
|
704
|
+
return _context2.stop();
|
|
705
|
+
}
|
|
706
|
+
}, _callee2, this, [[0, 38]]);
|
|
707
|
+
}));
|
|
708
|
+
function hanldeUploadFile() {
|
|
709
|
+
return _hanldeUploadFile.apply(this, arguments);
|
|
710
|
+
}
|
|
711
|
+
return hanldeUploadFile;
|
|
712
|
+
}();
|
|
713
|
+
return LargeUpload;
|
|
714
|
+
}();
|
|
715
|
+
function _useWorker2(file) {
|
|
716
|
+
var _this2 = this;
|
|
717
|
+
return new Promise(function (resolve) {
|
|
718
|
+
// const worker = new Worker(new URL("./hash-worker.js", import.meta.url), {
|
|
719
|
+
// type: "module",
|
|
720
|
+
// });
|
|
721
|
+
var worker = new Worker(__webpack__worker__0, undefined);
|
|
722
|
+
worker.postMessage({
|
|
723
|
+
file: file,
|
|
724
|
+
chunkSize: _this2.chunkSize
|
|
725
|
+
});
|
|
726
|
+
worker.onmessage = function (e) {
|
|
727
|
+
var _e$data = e.data,
|
|
728
|
+
fileHash = _e$data.fileHash,
|
|
729
|
+
fileChunkList = _e$data.fileChunkList;
|
|
730
|
+
if (fileHash) {
|
|
731
|
+
resolve({
|
|
732
|
+
fileHash: fileHash,
|
|
733
|
+
fileChunkList: fileChunkList
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
function _finishTask2() {
|
|
740
|
+
// 200是上传完成
|
|
741
|
+
// this.fileObj.state = 200;
|
|
742
|
+
if (typeof this.onUploadProgress === "function") {
|
|
743
|
+
this.onUploadProgress({
|
|
744
|
+
percentage: 100
|
|
745
|
+
});
|
|
746
|
+
return false;
|
|
747
|
+
}
|
|
748
|
+
this.fileObj.percentage = 100;
|
|
749
|
+
}
|
|
750
|
+
function _handleMerge2() {
|
|
751
|
+
return _handleMerge3.apply(this, arguments);
|
|
752
|
+
}
|
|
753
|
+
function _handleMerge3() {
|
|
754
|
+
_handleMerge3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
755
|
+
var _this$fileObj, fileName, fileHash, fsign, fileSize, busiType, res;
|
|
756
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
757
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
758
|
+
case 0:
|
|
759
|
+
_this$fileObj = this.fileObj, fileName = _this$fileObj.fileName, fileHash = _this$fileObj.fileHash, fsign = _this$fileObj.fsign, fileSize = _this$fileObj.fileSize, busiType = _this$fileObj.busiType;
|
|
760
|
+
_context4.prev = 1;
|
|
761
|
+
_context4.next = 4;
|
|
762
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* mergeChunk */ "b"])({
|
|
763
|
+
fileName: fileName,
|
|
764
|
+
fileHash: fileHash,
|
|
765
|
+
fsign: fsign,
|
|
766
|
+
fileSize: fileSize,
|
|
767
|
+
busiType: busiType
|
|
768
|
+
}, {
|
|
769
|
+
service: this.request
|
|
770
|
+
});
|
|
771
|
+
case 4:
|
|
772
|
+
res = _context4.sent;
|
|
773
|
+
// 设置文件上传状态
|
|
774
|
+
_classPrivateFieldLooseBase(this, _finishTask)[_finishTask]();
|
|
775
|
+
console.log("文件合并成功!");
|
|
776
|
+
// 最后赋值文件切片上传完成个数为0
|
|
777
|
+
this.fileObj.finishNumber = 0;
|
|
778
|
+
this.onUploadFinish(res);
|
|
779
|
+
return _context4.abrupt("return", res);
|
|
780
|
+
case 12:
|
|
781
|
+
_context4.prev = 12;
|
|
782
|
+
_context4.t0 = _context4["catch"](1);
|
|
783
|
+
this.pauseUpload(false, _context4.t0);
|
|
784
|
+
console.log("文件合并失败!");
|
|
785
|
+
// 最后赋值文件切片上传完成个数为0
|
|
786
|
+
this.fileObj.finishNumber = 0;
|
|
787
|
+
this.onUploadError(_context4.t0);
|
|
788
|
+
return _context4.abrupt("return", null);
|
|
789
|
+
case 19:
|
|
790
|
+
case "end":
|
|
791
|
+
return _context4.stop();
|
|
792
|
+
}
|
|
793
|
+
}, _callee4, this, [[1, 12]]);
|
|
794
|
+
}));
|
|
795
|
+
return _handleMerge3.apply(this, arguments);
|
|
796
|
+
}
|
|
797
|
+
function _signleFileProgress2(needObj) {
|
|
798
|
+
// 即使是超时请求也是会频繁的返回上传进度的,所以只能写成完成一片就添加它所占百分之多少,否则会造成误会
|
|
799
|
+
var percentage = Number((this.fileObj.finishNumber / needObj.chunkNumber * 100).toFixed(2));
|
|
800
|
+
if (typeof this.onUploadProgress === "function") {
|
|
801
|
+
this.onUploadProgress({
|
|
802
|
+
percentage: percentage
|
|
803
|
+
});
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
this.fileObj.percentage = percentage;
|
|
807
|
+
}
|
|
808
|
+
function _uploadSignleFile2() {
|
|
809
|
+
var _this$fileObj$whileRe,
|
|
810
|
+
_this3 = this;
|
|
811
|
+
// 如果没有需要上传的切片 / 正在上传的切片还没传完,就不做处理
|
|
812
|
+
if (this.fileObj.allChunkList.length === 0 || this.fileObj.whileRequests.length > 0) {
|
|
813
|
+
return false;
|
|
814
|
+
}
|
|
815
|
+
// 找到文件处于处理中/上传中的 文件列表(是文件而不是切片)
|
|
816
|
+
var isTaskArrIng = this.uploadFileList.filter(function (itemB) {
|
|
817
|
+
return itemB.state === 10 || itemB.state === 100;
|
|
818
|
+
});
|
|
819
|
+
|
|
820
|
+
// 实时动态获取并发请求数,每次调请求前都获取一次最大并发数
|
|
821
|
+
// 浏览器同域名同一时间请求的最大并发数限制为6
|
|
822
|
+
// 例如如果有3个文件同时上传/处理中,则每个文件切片接口最多调 6 / 3 == 2个相同的接口
|
|
823
|
+
this.maxRequest = Math.ceil(this.batchMaxCount / isTaskArrIng.length);
|
|
824
|
+
|
|
825
|
+
// 从数组的末尾开始提取 maxRequest 个元素。
|
|
826
|
+
var whileRequest = this.fileObj.allChunkList.slice(-this.maxRequest);
|
|
827
|
+
|
|
828
|
+
// 设置正在请求中的个数
|
|
829
|
+
(_this$fileObj$whileRe = this.fileObj.whileRequests).push.apply(_this$fileObj$whileRe, whileRequest);
|
|
830
|
+
// 如果总请求数大于并发数
|
|
831
|
+
if (this.fileObj.allChunkList.length > this.maxRequest) {
|
|
832
|
+
// 则减去并发数
|
|
833
|
+
this.fileObj.allChunkList.splice(-this.maxRequest);
|
|
834
|
+
} else {
|
|
835
|
+
// 否则总请求数置空,说明已经把没请求的全部放进请求列表了,不需要做过多请求
|
|
836
|
+
this.fileObj.allChunkList = [];
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// 单个分片请求
|
|
840
|
+
var uploadChunk = /*#__PURE__*/function () {
|
|
841
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(needObj) {
|
|
842
|
+
var fd, fileHash, fileSize, fileName, index, chunkFile, chunkHash, chunkSize, chunkNumber;
|
|
843
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
844
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
845
|
+
case 0:
|
|
846
|
+
fd = new FormData();
|
|
847
|
+
fileHash = needObj.fileHash, fileSize = needObj.fileSize, fileName = needObj.fileName, index = needObj.index, chunkFile = needObj.chunkFile, chunkHash = needObj.chunkHash, chunkSize = needObj.chunkSize, chunkNumber = needObj.chunkNumber;
|
|
848
|
+
fd.append("fileHash", fileHash);
|
|
849
|
+
fd.append("fileSize", String(fileSize));
|
|
850
|
+
fd.append("fileName", fileName);
|
|
851
|
+
fd.append("index", String(index));
|
|
852
|
+
fd.append("chunkFile", chunkFile);
|
|
853
|
+
fd.append("chunkHash", chunkHash);
|
|
854
|
+
fd.append("chunkSize", String(chunkSize));
|
|
855
|
+
fd.append("chunkNumber", String(chunkNumber));
|
|
856
|
+
fd.append("fileMd5", fileHash);
|
|
857
|
+
fd.append("chunkIndex", String(index));
|
|
858
|
+
_context3.prev = 12;
|
|
859
|
+
_context3.next = 15;
|
|
860
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* uploadFile */ "c"])(fd, {
|
|
861
|
+
onCancel: function onCancel(onCancelFunc) {
|
|
862
|
+
// 在调用接口的同时,相当于同时调用了传入的这个函数,又能同时拿到返回的取消方法去赋值
|
|
863
|
+
needObj.cancel = onCancelFunc;
|
|
864
|
+
},
|
|
865
|
+
service: _this3.request
|
|
866
|
+
});
|
|
867
|
+
case 15:
|
|
868
|
+
if (!(_this3.fileObj.state === 30 || _this3.fileObj.state === 50)) {
|
|
869
|
+
_context3.next = 17;
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
return _context3.abrupt("return", false);
|
|
873
|
+
case 17:
|
|
874
|
+
// 单个文件上传失败次数大于0则要减少一个
|
|
875
|
+
_this3.fileObj.errNumber > 0 ? _this3.fileObj.errNumber-- : 0;
|
|
876
|
+
// 单个文件切片上传成功数+1
|
|
877
|
+
_this3.fileObj.finishNumber++;
|
|
878
|
+
// 单个切片上传完成
|
|
879
|
+
needObj.finish = true;
|
|
880
|
+
_classPrivateFieldLooseBase(_this3, _signleFileProgress)[_signleFileProgress](needObj); // 更新进度条
|
|
881
|
+
// 上传成功了就删掉请求中数组中的那一片请求
|
|
882
|
+
_this3.fileObj.whileRequests = _this3.fileObj.whileRequests.filter(function (item) {
|
|
883
|
+
return item.chunkFile !== needObj.chunkFile;
|
|
884
|
+
});
|
|
885
|
+
// 如果单个文件最终成功数等于切片个数
|
|
886
|
+
if (_this3.fileObj.finishNumber === chunkNumber) {
|
|
887
|
+
// 全部上传完切片后就开始合并切片
|
|
888
|
+
_classPrivateFieldLooseBase(_this3, _handleMerge)[_handleMerge]();
|
|
889
|
+
} else {
|
|
890
|
+
// 如果还没完全上传完,则继续上传
|
|
891
|
+
_classPrivateFieldLooseBase(_this3, _uploadSignleFile)[_uploadSignleFile]();
|
|
892
|
+
}
|
|
893
|
+
_context3.next = 30;
|
|
894
|
+
break;
|
|
895
|
+
case 25:
|
|
896
|
+
_context3.prev = 25;
|
|
897
|
+
_context3.t0 = _context3["catch"](12);
|
|
898
|
+
// 请求异常,或者请求成功服务端返回报错都按单片上传失败逻辑处理,.then.catch的.catch是只能捕捉请求异常的
|
|
899
|
+
_this3.fileObj.errNumber++;
|
|
900
|
+
// 超过3次之后直接上传中断
|
|
901
|
+
if (_this3.fileObj.errNumber > 3) {
|
|
902
|
+
console.log("切片上传失败超过三次了");
|
|
903
|
+
_this3.pauseUpload(false, _context3.t0); // 上传中断
|
|
904
|
+
} else {
|
|
905
|
+
console.log("切片上传失败还没超过3次");
|
|
906
|
+
uploadChunk(needObj); // 失败了一片,继续当前分片请求
|
|
907
|
+
}
|
|
908
|
+
return _context3.abrupt("return", false);
|
|
909
|
+
case 30:
|
|
910
|
+
case "end":
|
|
911
|
+
return _context3.stop();
|
|
912
|
+
}
|
|
913
|
+
}, _callee3, null, [[12, 25]]);
|
|
914
|
+
}));
|
|
915
|
+
return function uploadChunk(_x) {
|
|
916
|
+
return _ref.apply(this, arguments);
|
|
917
|
+
};
|
|
918
|
+
}();
|
|
919
|
+
// 开始单个上传
|
|
920
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(whileRequest), _step2; !(_step2 = _iterator2()).done;) {
|
|
921
|
+
var item = _step2.value;
|
|
922
|
+
uploadChunk(item);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(70)))
|
|
927
|
+
|
|
928
|
+
/***/ }),
|
|
929
|
+
/* 52 */
|
|
930
|
+
/***/ (function(module, exports) {
|
|
931
|
+
|
|
932
|
+
module.exports = require("js-md5");
|
|
933
|
+
|
|
934
|
+
/***/ }),
|
|
935
|
+
/* 53 */
|
|
338
936
|
/***/ (function(module, exports) {
|
|
339
937
|
|
|
340
938
|
module.exports = require("element-ui/lib/switch");
|
|
341
939
|
|
|
342
940
|
/***/ }),
|
|
343
|
-
/*
|
|
941
|
+
/* 54 */
|
|
344
942
|
/***/ (function(module, exports) {
|
|
345
943
|
|
|
346
944
|
module.exports = require("element-ui/lib/slider");
|
|
347
945
|
|
|
348
946
|
/***/ }),
|
|
349
|
-
/*
|
|
947
|
+
/* 55 */
|
|
350
948
|
/***/ (function(module, exports) {
|
|
351
949
|
|
|
352
950
|
module.exports = require("element-ui/lib/transfer");
|
|
353
951
|
|
|
354
952
|
/***/ }),
|
|
355
|
-
/*
|
|
953
|
+
/* 56 */
|
|
356
954
|
/***/ (function(module, exports) {
|
|
357
955
|
|
|
358
956
|
module.exports = require("element-ui/lib/time-picker");
|
|
359
957
|
|
|
360
958
|
/***/ }),
|
|
361
|
-
/*
|
|
959
|
+
/* 57 */
|
|
362
960
|
/***/ (function(module, exports) {
|
|
363
961
|
|
|
364
962
|
module.exports = require("element-ui/lib/upload");
|
|
365
963
|
|
|
366
964
|
/***/ }),
|
|
367
|
-
/* 55 */,
|
|
368
|
-
/* 56 */,
|
|
369
|
-
/* 57 */,
|
|
370
965
|
/* 58 */,
|
|
371
966
|
/* 59 */,
|
|
372
967
|
/* 60 */,
|
|
@@ -379,8 +974,17 @@ module.exports = require("element-ui/lib/upload");
|
|
|
379
974
|
/* 67 */,
|
|
380
975
|
/* 68 */,
|
|
381
976
|
/* 69 */,
|
|
382
|
-
/* 70
|
|
383
|
-
|
|
977
|
+
/* 70 */
|
|
978
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
979
|
+
|
|
980
|
+
module.exports = __webpack_require__.p + "0.worker.js"
|
|
981
|
+
|
|
982
|
+
/***/ }),
|
|
983
|
+
/* 71 */,
|
|
984
|
+
/* 72 */,
|
|
985
|
+
/* 73 */,
|
|
986
|
+
/* 74 */,
|
|
987
|
+
/* 75 */
|
|
384
988
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
385
989
|
|
|
386
990
|
"use strict";
|
|
@@ -555,7 +1159,7 @@ InputNumbervue_type_template_id_6c463d52_render._withStripped = true
|
|
|
555
1159
|
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=6c463d52
|
|
556
1160
|
|
|
557
1161
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
558
|
-
var input_number_ = __webpack_require__(
|
|
1162
|
+
var input_number_ = __webpack_require__(40);
|
|
559
1163
|
var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
560
1164
|
|
|
561
1165
|
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/InputNumber.vue?vue&type=script&lang=js
|
|
@@ -598,15 +1202,15 @@ var InputNumber_component = Object(componentNormalizer["a" /* default */])(
|
|
|
598
1202
|
|
|
599
1203
|
/* harmony default export */ var InputNumber = (InputNumber_component.exports);
|
|
600
1204
|
// EXTERNAL MODULE: external "element-ui/lib/select"
|
|
601
|
-
var select_ = __webpack_require__(
|
|
1205
|
+
var select_ = __webpack_require__(41);
|
|
602
1206
|
var select_default = /*#__PURE__*/__webpack_require__.n(select_);
|
|
603
1207
|
|
|
604
1208
|
// EXTERNAL MODULE: external "element-ui/lib/option"
|
|
605
|
-
var option_ = __webpack_require__(
|
|
1209
|
+
var option_ = __webpack_require__(42);
|
|
606
1210
|
var option_default = /*#__PURE__*/__webpack_require__.n(option_);
|
|
607
1211
|
|
|
608
1212
|
// EXTERNAL MODULE: external "element-ui/lib/option-group"
|
|
609
|
-
var option_group_ = __webpack_require__(
|
|
1213
|
+
var option_group_ = __webpack_require__(43);
|
|
610
1214
|
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
|
|
611
1215
|
|
|
612
1216
|
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=template&id=0f44d547
|
|
@@ -702,7 +1306,7 @@ SelectTreevue_type_template_id_0f44d547_render._withStripped = true
|
|
|
702
1306
|
// CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=0f44d547
|
|
703
1307
|
|
|
704
1308
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/tree-line"
|
|
705
|
-
var tree_line_ = __webpack_require__(
|
|
1309
|
+
var tree_line_ = __webpack_require__(44);
|
|
706
1310
|
var tree_line_default = /*#__PURE__*/__webpack_require__.n(tree_line_);
|
|
707
1311
|
|
|
708
1312
|
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/SelectTree.vue?vue&type=script&lang=js
|
|
@@ -1039,6 +1643,7 @@ var formula_ = __webpack_require__(3);
|
|
|
1039
1643
|
}
|
|
1040
1644
|
return Object.assign({
|
|
1041
1645
|
clearable: true,
|
|
1646
|
+
filterable: true,
|
|
1042
1647
|
placeholder: "请选择"
|
|
1043
1648
|
}, this.$attrs, {
|
|
1044
1649
|
value: _value
|
|
@@ -1243,7 +1848,7 @@ var Select_component = Object(componentNormalizer["a" /* default */])(
|
|
|
1243
1848
|
|
|
1244
1849
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1245
1850
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1246
|
-
var radio_group_ = __webpack_require__(
|
|
1851
|
+
var radio_group_ = __webpack_require__(45);
|
|
1247
1852
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1248
1853
|
|
|
1249
1854
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
@@ -1251,7 +1856,7 @@ var radio_ = __webpack_require__(31);
|
|
|
1251
1856
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1252
1857
|
|
|
1253
1858
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1254
|
-
var radio_button_ = __webpack_require__(
|
|
1859
|
+
var radio_button_ = __webpack_require__(46);
|
|
1255
1860
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1256
1861
|
|
|
1257
1862
|
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Radio.vue?vue&type=script&lang=js
|
|
@@ -1446,15 +2051,15 @@ var Radio_component = Object(componentNormalizer["a" /* default */])(
|
|
|
1446
2051
|
|
|
1447
2052
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1448
2053
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1449
|
-
var checkbox_group_ = __webpack_require__(
|
|
2054
|
+
var checkbox_group_ = __webpack_require__(47);
|
|
1450
2055
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1451
2056
|
|
|
1452
2057
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1453
|
-
var checkbox_ = __webpack_require__(
|
|
2058
|
+
var checkbox_ = __webpack_require__(48);
|
|
1454
2059
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1455
2060
|
|
|
1456
2061
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1457
|
-
var checkbox_button_ = __webpack_require__(
|
|
2062
|
+
var checkbox_button_ = __webpack_require__(49);
|
|
1458
2063
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1459
2064
|
|
|
1460
2065
|
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Checkbox.vue?vue&type=script&lang=js
|
|
@@ -2169,7 +2774,7 @@ var CascaderAddr_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2169
2774
|
|
|
2170
2775
|
/* harmony default export */ var CascaderAddr = (CascaderAddr_component.exports);
|
|
2171
2776
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
2172
|
-
var date_picker_ = __webpack_require__(
|
|
2777
|
+
var date_picker_ = __webpack_require__(50);
|
|
2173
2778
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
2174
2779
|
|
|
2175
2780
|
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/DatePicker.vue?vue&type=script&lang=js
|
|
@@ -2271,13 +2876,16 @@ var DatePicker_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2271
2876
|
)
|
|
2272
2877
|
|
|
2273
2878
|
/* harmony default export */ var DatePicker = (DatePicker_component.exports);
|
|
2274
|
-
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/
|
|
2275
|
-
var
|
|
2879
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
2880
|
+
var upload_processvue_type_template_id_b7318202_render = function render() {
|
|
2276
2881
|
var _vm = this,
|
|
2277
2882
|
_c = _vm._self._c
|
|
2278
2883
|
return _c(
|
|
2279
2884
|
"div",
|
|
2280
|
-
{
|
|
2885
|
+
{
|
|
2886
|
+
staticClass: "upload-process",
|
|
2887
|
+
class: { "upload-process__readonly": _vm.isReadonly },
|
|
2888
|
+
},
|
|
2281
2889
|
[
|
|
2282
2890
|
_c(
|
|
2283
2891
|
"el-upload",
|
|
@@ -2299,7 +2907,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2299
2907
|
},
|
|
2300
2908
|
[_vm._v("选取文件")]
|
|
2301
2909
|
)
|
|
2302
|
-
:
|
|
2910
|
+
: _c("div", { attrs: { slot: "trigger" }, slot: "trigger" }),
|
|
2303
2911
|
!_vm.isReadonly && !_vm.autoUpload && _vm.uploadButton
|
|
2304
2912
|
? _c(
|
|
2305
2913
|
"span",
|
|
@@ -2367,10 +2975,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2367
2975
|
_vm._l(_vm.fileList, function (file, index) {
|
|
2368
2976
|
return _c(
|
|
2369
2977
|
"li",
|
|
2370
|
-
{
|
|
2371
|
-
key: file.uid || index,
|
|
2372
|
-
staticClass: "file-list__item is-success",
|
|
2373
|
-
},
|
|
2978
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2374
2979
|
[
|
|
2375
2980
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2376
2981
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2399,7 +3004,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2399
3004
|
staticClass: "el-icon-success",
|
|
2400
3005
|
staticStyle: { color: "#67c23a" },
|
|
2401
3006
|
})
|
|
2402
|
-
: file.state === 500
|
|
3007
|
+
: file.state === 500 || file.state === 50
|
|
2403
3008
|
? _c("i", {
|
|
2404
3009
|
staticClass: "el-icon-warning",
|
|
2405
3010
|
staticStyle: { color: "#f56c6c !important" },
|
|
@@ -2427,6 +3032,23 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2427
3032
|
},
|
|
2428
3033
|
})
|
|
2429
3034
|
: _vm._e(),
|
|
3035
|
+
file.state === 200
|
|
3036
|
+
? _c("el-button", {
|
|
3037
|
+
attrs: {
|
|
3038
|
+
type: "primary",
|
|
3039
|
+
circle: "",
|
|
3040
|
+
icon: "el-icon-download",
|
|
3041
|
+
size: "mini",
|
|
3042
|
+
title: "下载",
|
|
3043
|
+
},
|
|
3044
|
+
on: {
|
|
3045
|
+
click: function ($event) {
|
|
3046
|
+
$event.stopPropagation()
|
|
3047
|
+
return _vm.handDownLoad(file)
|
|
3048
|
+
},
|
|
3049
|
+
},
|
|
3050
|
+
})
|
|
3051
|
+
: _vm._e(),
|
|
2430
3052
|
file.state === 500
|
|
2431
3053
|
? _c("el-button", {
|
|
2432
3054
|
attrs: {
|
|
@@ -2444,7 +3066,24 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2444
3066
|
},
|
|
2445
3067
|
})
|
|
2446
3068
|
: _vm._e(),
|
|
2447
|
-
file.state ===
|
|
3069
|
+
file.state === 50
|
|
3070
|
+
? _c("el-button", {
|
|
3071
|
+
attrs: {
|
|
3072
|
+
type: "primary",
|
|
3073
|
+
circle: "",
|
|
3074
|
+
icon: "el-icon-upload",
|
|
3075
|
+
size: "mini",
|
|
3076
|
+
title: "继续上传",
|
|
3077
|
+
},
|
|
3078
|
+
on: {
|
|
3079
|
+
click: function ($event) {
|
|
3080
|
+
$event.stopPropagation()
|
|
3081
|
+
return _vm.handResumeUpload(file)
|
|
3082
|
+
},
|
|
3083
|
+
},
|
|
3084
|
+
})
|
|
3085
|
+
: _vm._e(),
|
|
3086
|
+
file.state === 500 || file.state === 50
|
|
2448
3087
|
? _c("el-button", {
|
|
2449
3088
|
attrs: {
|
|
2450
3089
|
type: "warning",
|
|
@@ -2491,10 +3130,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2491
3130
|
_vm._l(_vm.pendingFileList, function (file, index) {
|
|
2492
3131
|
return _c(
|
|
2493
3132
|
"li",
|
|
2494
|
-
{
|
|
2495
|
-
key: file.uid || index,
|
|
2496
|
-
staticClass: "file-list__item is-success",
|
|
2497
|
-
},
|
|
3133
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2498
3134
|
[
|
|
2499
3135
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2500
3136
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2541,11 +3177,11 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2541
3177
|
1
|
|
2542
3178
|
)
|
|
2543
3179
|
}
|
|
2544
|
-
var
|
|
2545
|
-
|
|
3180
|
+
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3181
|
+
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
2546
3182
|
|
|
2547
3183
|
|
|
2548
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3184
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
2549
3185
|
|
|
2550
3186
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
2551
3187
|
var message_ = __webpack_require__(12);
|
|
@@ -2555,10 +3191,14 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
2555
3191
|
var message_box_ = __webpack_require__(26);
|
|
2556
3192
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
2557
3193
|
|
|
2558
|
-
//
|
|
3194
|
+
// EXTERNAL MODULE: ./src/components/form/src/item/upload-process/large-upload/index.js
|
|
3195
|
+
var large_upload = __webpack_require__(51);
|
|
2559
3196
|
|
|
3197
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/upload-process/index.vue?vue&type=script&lang=js
|
|
2560
3198
|
|
|
2561
|
-
|
|
3199
|
+
|
|
3200
|
+
|
|
3201
|
+
/* harmony default export */ var upload_processvue_type_script_lang_js = ({
|
|
2562
3202
|
name: "UploadProcess",
|
|
2563
3203
|
components: {},
|
|
2564
3204
|
props: {
|
|
@@ -2601,10 +3241,30 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2601
3241
|
type: Number,
|
|
2602
3242
|
default: 0
|
|
2603
3243
|
},
|
|
3244
|
+
limit: {
|
|
3245
|
+
type: Number,
|
|
3246
|
+
default: null
|
|
3247
|
+
},
|
|
3248
|
+
useLarge: {
|
|
3249
|
+
type: Boolean,
|
|
3250
|
+
default: false
|
|
3251
|
+
},
|
|
3252
|
+
largeSize: {
|
|
3253
|
+
type: Number,
|
|
3254
|
+
default: 1 * 1024 * 1024
|
|
3255
|
+
},
|
|
3256
|
+
largeChunkSize: {
|
|
3257
|
+
type: Number,
|
|
3258
|
+
default: 1 * 1024 * 1024
|
|
3259
|
+
},
|
|
3260
|
+
busiType: {
|
|
3261
|
+
type: String,
|
|
3262
|
+
default: ""
|
|
3263
|
+
},
|
|
2604
3264
|
// 批量上传最大数 0表示不批量上传
|
|
2605
3265
|
batchMaxCount: {
|
|
2606
3266
|
type: Number,
|
|
2607
|
-
default:
|
|
3267
|
+
default: 6
|
|
2608
3268
|
},
|
|
2609
3269
|
//是否自动上传
|
|
2610
3270
|
autoUpload: {
|
|
@@ -2638,28 +3298,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2638
3298
|
},
|
|
2639
3299
|
watch: {
|
|
2640
3300
|
value: function value(val) {
|
|
2641
|
-
|
|
2642
|
-
if (val && val[0] === null) {
|
|
2643
|
-
this.fileValue = [];
|
|
2644
|
-
this.fileList = [];
|
|
2645
|
-
this.$emit("input", this.fileValue);
|
|
2646
|
-
}
|
|
2647
|
-
if (val === this.fileValue) {
|
|
2648
|
-
return false;
|
|
2649
|
-
}
|
|
2650
|
-
this.fileValue = [];
|
|
2651
|
-
this.fileList = [];
|
|
2652
|
-
if (val && val.length) {
|
|
2653
|
-
var _this$fileValue, _this$fileList;
|
|
2654
|
-
var valList = this.value.map(function (item) {
|
|
2655
|
-
item.state = 200;
|
|
2656
|
-
item.percentage = 100; // 进度条
|
|
2657
|
-
item.name = item.fileName;
|
|
2658
|
-
return item;
|
|
2659
|
-
});
|
|
2660
|
-
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
2661
|
-
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
2662
|
-
}
|
|
3301
|
+
this.setValue(val);
|
|
2663
3302
|
}
|
|
2664
3303
|
},
|
|
2665
3304
|
computed: {
|
|
@@ -2668,6 +3307,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2668
3307
|
action: this.api.url,
|
|
2669
3308
|
headers: this.api.headers,
|
|
2670
3309
|
data: this.api.data,
|
|
3310
|
+
limit: this.limit,
|
|
2671
3311
|
multiple: true,
|
|
2672
3312
|
accept: ".doc,.docx,.ppt,.pptx,.xls,.xlsx,.pot,.pps,.vsd,.rtf,.wps,.et,.dps,.pdf,.txt,.jpg,.png,.jpeg,.jif,.zip,.rar,.gif,.mp4"
|
|
2673
3313
|
}, this.$attrs, {
|
|
@@ -2695,13 +3335,13 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2695
3335
|
// 上传中
|
|
2696
3336
|
uploadingFiles: function uploadingFiles() {
|
|
2697
3337
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2698
|
-
return item.state === 100;
|
|
3338
|
+
return item.state === 100 || item.state === 10 || item.state === 30;
|
|
2699
3339
|
});
|
|
2700
3340
|
},
|
|
2701
3341
|
// 上传处理完成(成功加失败)
|
|
2702
3342
|
finishFiles: function finishFiles() {
|
|
2703
3343
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2704
|
-
return item.state === 200 || item.state === 500;
|
|
3344
|
+
return item.state === 200 || item.state === 500 || item.state === 50;
|
|
2705
3345
|
});
|
|
2706
3346
|
},
|
|
2707
3347
|
// 上传成功
|
|
@@ -2713,7 +3353,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2713
3353
|
// 上传失败
|
|
2714
3354
|
errorFiles: function errorFiles() {
|
|
2715
3355
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2716
|
-
return item.state === 500;
|
|
3356
|
+
return item.state === 500 || item.state === 50;
|
|
2717
3357
|
});
|
|
2718
3358
|
},
|
|
2719
3359
|
isReadonly: function isReadonly() {
|
|
@@ -2730,6 +3370,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2730
3370
|
* id: 唯一编码
|
|
2731
3371
|
* name: 文件名称
|
|
2732
3372
|
* state: 0待上传 100上传中 200上传成功 500上传失败
|
|
3373
|
+
* 大文件特有状态 10文件处理中,30是暂停,50上传中断
|
|
2733
3374
|
* percentage: 上传进度 数字 100表示100%
|
|
2734
3375
|
* errorMsg: 错误信息
|
|
2735
3376
|
* size: 文件大小
|
|
@@ -2758,17 +3399,39 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2758
3399
|
// eslint-disable-next-line vue/no-mutating-props
|
|
2759
3400
|
this.extend.that = this;
|
|
2760
3401
|
}
|
|
2761
|
-
|
|
2762
|
-
var _this$fileList2;
|
|
2763
|
-
(_this$fileList2 = this.fileList).push.apply(_this$fileList2, this.value.map(function (item) {
|
|
2764
|
-
item.state = 200;
|
|
2765
|
-
item.percentage = 100; // 进度条
|
|
2766
|
-
item.name = item.fileName;
|
|
2767
|
-
return item;
|
|
2768
|
-
}));
|
|
2769
|
-
}
|
|
3402
|
+
this.setValue(this.value);
|
|
2770
3403
|
},
|
|
2771
3404
|
methods: {
|
|
3405
|
+
setValue: function setValue(val) {
|
|
3406
|
+
if (!val) {
|
|
3407
|
+
return false;
|
|
3408
|
+
}
|
|
3409
|
+
// 解决重置第一个元素为null
|
|
3410
|
+
if (val && val[0] === null) {
|
|
3411
|
+
this.fileValue = [];
|
|
3412
|
+
this.fileList = [];
|
|
3413
|
+
this.$emit("input", this.fileValue);
|
|
3414
|
+
}
|
|
3415
|
+
if (val === this.fileValue) {
|
|
3416
|
+
return false;
|
|
3417
|
+
}
|
|
3418
|
+
this.fileValue = [];
|
|
3419
|
+
this.fileList = [];
|
|
3420
|
+
if (val && val.length) {
|
|
3421
|
+
var _this$value, _this$fileValue, _this$fileList;
|
|
3422
|
+
var valList = (_this$value = this.value) == null ? void 0 : _this$value.map(function (item) {
|
|
3423
|
+
if (!item) {
|
|
3424
|
+
return item;
|
|
3425
|
+
}
|
|
3426
|
+
item.state = 200;
|
|
3427
|
+
item.percentage = 100; // 进度条
|
|
3428
|
+
item.name = item.fileName;
|
|
3429
|
+
return item;
|
|
3430
|
+
});
|
|
3431
|
+
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
3432
|
+
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
3433
|
+
}
|
|
3434
|
+
},
|
|
2772
3435
|
removeSpecialCharacters: function removeSpecialCharacters(filename) {
|
|
2773
3436
|
// 定义正则表达式,匹配除了字母、数字、下划线、空格和点号之外的所有字符
|
|
2774
3437
|
var pattern = /[^\w\u4e00-\u9fa5.]/gi;
|
|
@@ -2791,8 +3454,8 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2791
3454
|
}).indexOf(file.fileId);
|
|
2792
3455
|
_this.fileValue.splice(indexVal, 1);
|
|
2793
3456
|
_this.$emit("input", _this.fileValue);
|
|
2794
|
-
} else if (file.state === 100) {
|
|
2795
|
-
file.cancel && file.cancel(
|
|
3457
|
+
} else if (file.state === 100 || file.state === 10 || file.state === 30) {
|
|
3458
|
+
file.cancel && file.cancel();
|
|
2796
3459
|
}
|
|
2797
3460
|
}).catch(function () {});
|
|
2798
3461
|
},
|
|
@@ -2806,6 +3469,17 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2806
3469
|
window.open(file.fileUrl || file.filePath, "_blank");
|
|
2807
3470
|
}
|
|
2808
3471
|
},
|
|
3472
|
+
handDownLoad: function handDownLoad(file) {
|
|
3473
|
+
var link = document.createElement("a");
|
|
3474
|
+
link.style.display = "none";
|
|
3475
|
+
link.target = "_blank";
|
|
3476
|
+
link.href = file.filePath || file.fileUrl;
|
|
3477
|
+
link.download = file.fileName || file.name;
|
|
3478
|
+
// 使用该方法触发点击下载
|
|
3479
|
+
document.body.appendChild(link);
|
|
3480
|
+
link.click();
|
|
3481
|
+
document.body.removeChild(link);
|
|
3482
|
+
},
|
|
2809
3483
|
handUpload: function handUpload(file) {
|
|
2810
3484
|
if (!this.verification(file)) {
|
|
2811
3485
|
return false;
|
|
@@ -2813,6 +3487,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2813
3487
|
file.percentage = 0;
|
|
2814
3488
|
this.uploading(file);
|
|
2815
3489
|
},
|
|
3490
|
+
handResumeUpload: function handResumeUpload(file) {
|
|
3491
|
+
file.resume();
|
|
3492
|
+
},
|
|
2816
3493
|
handError: function handError(file) {
|
|
2817
3494
|
if (this.$listeners.error) {
|
|
2818
3495
|
this.$emit("error", file);
|
|
@@ -2843,8 +3520,45 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2843
3520
|
_this2.uploading(pending);
|
|
2844
3521
|
});
|
|
2845
3522
|
},
|
|
3523
|
+
uploadingLarge: function uploadingLarge(fileUpload) {
|
|
3524
|
+
var _this$api,
|
|
3525
|
+
_this3 = this;
|
|
3526
|
+
var largeUpload = new large_upload["a" /* default */](fileUpload, {
|
|
3527
|
+
request: this.request,
|
|
3528
|
+
uploadFileList: this.fileList,
|
|
3529
|
+
chunkSize: this.largeChunkSize,
|
|
3530
|
+
busiType: this.busiType || ((_this$api = this.api) == null || (_this$api = _this$api.data) == null ? void 0 : _this$api.busiType),
|
|
3531
|
+
//"piclib",
|
|
3532
|
+
maxRequest: this.batchMaxCount,
|
|
3533
|
+
batchMaxCount: this.batchMaxCount
|
|
3534
|
+
}, {
|
|
3535
|
+
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
3536
|
+
var percent = progressEvent.percentage;
|
|
3537
|
+
var percentCompleted = Math.round(percent);
|
|
3538
|
+
// 处理上传进度,可根据实际需求进行操作
|
|
3539
|
+
if (percentCompleted == 100) {
|
|
3540
|
+
fileUpload.percentage = 99;
|
|
3541
|
+
} else {
|
|
3542
|
+
fileUpload.percentage = percentCompleted;
|
|
3543
|
+
}
|
|
3544
|
+
},
|
|
3545
|
+
onUploadFinish: function onUploadFinish(res) {
|
|
3546
|
+
_this3.uploadFinish(res, fileUpload);
|
|
3547
|
+
},
|
|
3548
|
+
onUploadError: function onUploadError(error) {
|
|
3549
|
+
fileUpload.state = 500; //上传失败
|
|
3550
|
+
fileUpload.errorMsg = error.message;
|
|
3551
|
+
_this3.batchUpload();
|
|
3552
|
+
}
|
|
3553
|
+
});
|
|
3554
|
+
largeUpload.hanldeUploadFile(fileUpload);
|
|
3555
|
+
},
|
|
2846
3556
|
uploading: function uploading(fileUpload) {
|
|
2847
|
-
var
|
|
3557
|
+
var _this4 = this;
|
|
3558
|
+
if (fileUpload.isLargeFile) {
|
|
3559
|
+
this.uploadingLarge(fileUpload);
|
|
3560
|
+
return false;
|
|
3561
|
+
}
|
|
2848
3562
|
// 数据处理
|
|
2849
3563
|
var formData = new FormData();
|
|
2850
3564
|
for (var key in this.api.data || {}) {
|
|
@@ -2856,11 +3570,15 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2856
3570
|
"Content-Type": "multipart/form-data"
|
|
2857
3571
|
}, this.api.headers);
|
|
2858
3572
|
fileUpload.state = 100; //上传中...
|
|
3573
|
+
var controller = new AbortController();
|
|
3574
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
2859
3575
|
var requestObj = {
|
|
2860
3576
|
url: this.api.url,
|
|
2861
3577
|
method: "POST",
|
|
2862
3578
|
headers: headers,
|
|
2863
3579
|
data: formData,
|
|
3580
|
+
signal: signal,
|
|
3581
|
+
// 将 signal 传递给服务函数
|
|
2864
3582
|
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
2865
3583
|
var percent = progressEvent.loaded * 100 / progressEvent.total;
|
|
2866
3584
|
var percentCompleted = Math.round(percent);
|
|
@@ -2872,30 +3590,36 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2872
3590
|
}
|
|
2873
3591
|
}
|
|
2874
3592
|
};
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
3593
|
+
fileUpload.cancel = function () {
|
|
3594
|
+
return controller.abort();
|
|
3595
|
+
};
|
|
3596
|
+
// if (this.CancelToken) {
|
|
3597
|
+
// requestObj.cancelToken = new this.CancelToken(function executor(c) {
|
|
3598
|
+
// // An executor function receives a cancel function as a parameter
|
|
3599
|
+
// fileUpload.cancel = c;
|
|
3600
|
+
// });
|
|
3601
|
+
// }
|
|
2881
3602
|
this.request(requestObj).then(function (res) {
|
|
2882
|
-
|
|
2883
|
-
fileUpload.percentage = 100; // 进度条
|
|
2884
|
-
fileUpload.state = 200; //上传成功
|
|
2885
|
-
var fileId = res[_this3.remoteProp.id];
|
|
2886
|
-
var fileUrl = typeof _this3.formatUrl === "function" ? _this3.formatUrl.call(_this3, res, fileUpload) : res[_this3.remoteProp.url];
|
|
2887
|
-
fileUpload.fileId = fileId;
|
|
2888
|
-
fileUpload.fileUrl = fileUrl;
|
|
2889
|
-
_this3.batchUpload();
|
|
2890
|
-
var fileName = _this3.removeSpecialCharacters(fileUpload.name);
|
|
2891
|
-
_this3.fileValue.push((_this3$fileValue$push = {}, _this3$fileValue$push[_this3.fileProp.id] = fileId, _this3$fileValue$push[_this3.fileProp.url] = fileUrl, _this3$fileValue$push[_this3.fileProp.name] = fileName, _this3$fileValue$push[_this3.fileProp.size] = fileUpload.size, _this3$fileValue$push[_this3.fileProp.type] = fileUpload.type, _this3$fileValue$push));
|
|
2892
|
-
_this3.$emit("input", _this3.fileValue);
|
|
3603
|
+
_this4.uploadFinish(res, fileUpload);
|
|
2893
3604
|
}).catch(function (error) {
|
|
2894
3605
|
fileUpload.state = 500; //上传失败
|
|
2895
3606
|
fileUpload.errorMsg = error.message;
|
|
2896
|
-
|
|
3607
|
+
_this4.batchUpload();
|
|
2897
3608
|
});
|
|
2898
3609
|
},
|
|
3610
|
+
uploadFinish: function uploadFinish(res, fileUpload) {
|
|
3611
|
+
var _this$fileValue$push;
|
|
3612
|
+
fileUpload.percentage = 100; // 进度条
|
|
3613
|
+
fileUpload.state = 200; //上传成功
|
|
3614
|
+
var fileId = res[this.remoteProp.id];
|
|
3615
|
+
var fileUrl = typeof this.formatUrl === "function" ? this.formatUrl.call(this, res, fileUpload) : res[this.remoteProp.url];
|
|
3616
|
+
fileUpload.fileId = fileId;
|
|
3617
|
+
fileUpload.fileUrl = fileUrl;
|
|
3618
|
+
this.batchUpload();
|
|
3619
|
+
var fileName = this.removeSpecialCharacters(fileUpload.name);
|
|
3620
|
+
this.fileValue.push((_this$fileValue$push = {}, _this$fileValue$push[this.fileProp.id] = fileId, _this$fileValue$push[this.fileProp.url] = fileUrl, _this$fileValue$push[this.fileProp.name] = fileName, _this$fileValue$push[this.fileProp.size] = fileUpload.size, _this$fileValue$push[this.fileProp.type] = fileUpload.type, _this$fileValue$push.mimeType = res == null ? void 0 : res.mimeType, _this$fileValue$push));
|
|
3621
|
+
this.$emit("input", this.fileValue);
|
|
3622
|
+
},
|
|
2899
3623
|
verification: function verification(upload) {
|
|
2900
3624
|
if (this.uploadMaxSize && this.uploadMaxSize > 0) {
|
|
2901
3625
|
var fileSize = upload.size / 1024 / 1024;
|
|
@@ -2918,20 +3642,23 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2918
3642
|
var type = upload.raw.type;
|
|
2919
3643
|
// 准备上传数据
|
|
2920
3644
|
var fileUpload = {
|
|
2921
|
-
id: upload.uid,
|
|
3645
|
+
// id: upload.uid,
|
|
2922
3646
|
name: upload.name,
|
|
2923
3647
|
file: upload,
|
|
2924
3648
|
state: 0,
|
|
2925
3649
|
percentage: 0,
|
|
2926
3650
|
errorMsg: null,
|
|
2927
3651
|
size: size,
|
|
2928
|
-
type: type
|
|
3652
|
+
type: type,
|
|
3653
|
+
isLargeFile: false
|
|
2929
3654
|
};
|
|
2930
3655
|
if (!this.verification(fileUpload)) {
|
|
2931
|
-
|
|
2932
|
-
}
|
|
2933
|
-
|
|
3656
|
+
return false;
|
|
3657
|
+
}
|
|
3658
|
+
if (this.useLarge && size > this.largeSize) {
|
|
3659
|
+
fileUpload.isLargeFile = true;
|
|
2934
3660
|
}
|
|
3661
|
+
this.pendingFileList.push(fileUpload);
|
|
2935
3662
|
this.$emit("beforeUpload", {
|
|
2936
3663
|
ref: this,
|
|
2937
3664
|
fileList: this.fileList,
|
|
@@ -2951,9 +3678,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2951
3678
|
}
|
|
2952
3679
|
}
|
|
2953
3680
|
});
|
|
2954
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
2955
|
-
/* harmony default export */ var
|
|
2956
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3681
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=script&lang=js
|
|
3682
|
+
/* harmony default export */ var item_upload_processvue_type_script_lang_js = (upload_processvue_type_script_lang_js);
|
|
3683
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue
|
|
2957
3684
|
|
|
2958
3685
|
|
|
2959
3686
|
|
|
@@ -2961,10 +3688,10 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2961
3688
|
|
|
2962
3689
|
/* normalize component */
|
|
2963
3690
|
|
|
2964
|
-
var
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
3691
|
+
var upload_process_component = Object(componentNormalizer["a" /* default */])(
|
|
3692
|
+
item_upload_processvue_type_script_lang_js,
|
|
3693
|
+
upload_processvue_type_template_id_b7318202_render,
|
|
3694
|
+
upload_processvue_type_template_id_b7318202_staticRenderFns,
|
|
2968
3695
|
false,
|
|
2969
3696
|
null,
|
|
2970
3697
|
null,
|
|
@@ -2972,25 +3699,25 @@ var UploadProcess_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2972
3699
|
|
|
2973
3700
|
)
|
|
2974
3701
|
|
|
2975
|
-
/* harmony default export */ var
|
|
3702
|
+
/* harmony default export */ var upload_process = (upload_process_component.exports);
|
|
2976
3703
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
2977
|
-
var switch_ = __webpack_require__(
|
|
3704
|
+
var switch_ = __webpack_require__(53);
|
|
2978
3705
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
2979
3706
|
|
|
2980
3707
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
2981
|
-
var slider_ = __webpack_require__(
|
|
3708
|
+
var slider_ = __webpack_require__(54);
|
|
2982
3709
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
2983
3710
|
|
|
2984
3711
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
2985
|
-
var transfer_ = __webpack_require__(
|
|
3712
|
+
var transfer_ = __webpack_require__(55);
|
|
2986
3713
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
2987
3714
|
|
|
2988
3715
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
2989
|
-
var time_picker_ = __webpack_require__(
|
|
3716
|
+
var time_picker_ = __webpack_require__(56);
|
|
2990
3717
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
2991
3718
|
|
|
2992
3719
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
2993
|
-
var upload_ = __webpack_require__(
|
|
3720
|
+
var upload_ = __webpack_require__(57);
|
|
2994
3721
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
2995
3722
|
|
|
2996
3723
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -3030,7 +3757,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
3030
3757
|
Radio: Radio,
|
|
3031
3758
|
Checkbox: Checkbox,
|
|
3032
3759
|
InputText: InputText,
|
|
3033
|
-
UploadProcess:
|
|
3760
|
+
UploadProcess: upload_process
|
|
3034
3761
|
},
|
|
3035
3762
|
props: {
|
|
3036
3763
|
control: String,
|