@panpanzhao/component-ui 1.24.1119 → 1.24.1217
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 +902 -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 +873 -147
- package/lib/components/form-item.js +14 -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
|
|
@@ -1243,7 +1847,7 @@ var Select_component = Object(componentNormalizer["a" /* default */])(
|
|
|
1243
1847
|
|
|
1244
1848
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1245
1849
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1246
|
-
var radio_group_ = __webpack_require__(
|
|
1850
|
+
var radio_group_ = __webpack_require__(45);
|
|
1247
1851
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1248
1852
|
|
|
1249
1853
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
@@ -1251,7 +1855,7 @@ var radio_ = __webpack_require__(31);
|
|
|
1251
1855
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1252
1856
|
|
|
1253
1857
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1254
|
-
var radio_button_ = __webpack_require__(
|
|
1858
|
+
var radio_button_ = __webpack_require__(46);
|
|
1255
1859
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1256
1860
|
|
|
1257
1861
|
// 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 +2050,15 @@ var Radio_component = Object(componentNormalizer["a" /* default */])(
|
|
|
1446
2050
|
|
|
1447
2051
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1448
2052
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1449
|
-
var checkbox_group_ = __webpack_require__(
|
|
2053
|
+
var checkbox_group_ = __webpack_require__(47);
|
|
1450
2054
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1451
2055
|
|
|
1452
2056
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1453
|
-
var checkbox_ = __webpack_require__(
|
|
2057
|
+
var checkbox_ = __webpack_require__(48);
|
|
1454
2058
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1455
2059
|
|
|
1456
2060
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1457
|
-
var checkbox_button_ = __webpack_require__(
|
|
2061
|
+
var checkbox_button_ = __webpack_require__(49);
|
|
1458
2062
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1459
2063
|
|
|
1460
2064
|
// 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 +2773,7 @@ var CascaderAddr_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2169
2773
|
|
|
2170
2774
|
/* harmony default export */ var CascaderAddr = (CascaderAddr_component.exports);
|
|
2171
2775
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
2172
|
-
var date_picker_ = __webpack_require__(
|
|
2776
|
+
var date_picker_ = __webpack_require__(50);
|
|
2173
2777
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
2174
2778
|
|
|
2175
2779
|
// 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 +2875,16 @@ var DatePicker_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2271
2875
|
)
|
|
2272
2876
|
|
|
2273
2877
|
/* 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
|
|
2878
|
+
// 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
|
|
2879
|
+
var upload_processvue_type_template_id_b7318202_render = function render() {
|
|
2276
2880
|
var _vm = this,
|
|
2277
2881
|
_c = _vm._self._c
|
|
2278
2882
|
return _c(
|
|
2279
2883
|
"div",
|
|
2280
|
-
{
|
|
2884
|
+
{
|
|
2885
|
+
staticClass: "upload-process",
|
|
2886
|
+
class: { "upload-process__readonly": _vm.isReadonly },
|
|
2887
|
+
},
|
|
2281
2888
|
[
|
|
2282
2889
|
_c(
|
|
2283
2890
|
"el-upload",
|
|
@@ -2299,7 +2906,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2299
2906
|
},
|
|
2300
2907
|
[_vm._v("选取文件")]
|
|
2301
2908
|
)
|
|
2302
|
-
:
|
|
2909
|
+
: _c("div", { attrs: { slot: "trigger" }, slot: "trigger" }),
|
|
2303
2910
|
!_vm.isReadonly && !_vm.autoUpload && _vm.uploadButton
|
|
2304
2911
|
? _c(
|
|
2305
2912
|
"span",
|
|
@@ -2367,10 +2974,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2367
2974
|
_vm._l(_vm.fileList, function (file, index) {
|
|
2368
2975
|
return _c(
|
|
2369
2976
|
"li",
|
|
2370
|
-
{
|
|
2371
|
-
key: file.uid || index,
|
|
2372
|
-
staticClass: "file-list__item is-success",
|
|
2373
|
-
},
|
|
2977
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2374
2978
|
[
|
|
2375
2979
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2376
2980
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2399,7 +3003,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2399
3003
|
staticClass: "el-icon-success",
|
|
2400
3004
|
staticStyle: { color: "#67c23a" },
|
|
2401
3005
|
})
|
|
2402
|
-
: file.state === 500
|
|
3006
|
+
: file.state === 500 || file.state === 50
|
|
2403
3007
|
? _c("i", {
|
|
2404
3008
|
staticClass: "el-icon-warning",
|
|
2405
3009
|
staticStyle: { color: "#f56c6c !important" },
|
|
@@ -2427,6 +3031,23 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2427
3031
|
},
|
|
2428
3032
|
})
|
|
2429
3033
|
: _vm._e(),
|
|
3034
|
+
file.state === 200
|
|
3035
|
+
? _c("el-button", {
|
|
3036
|
+
attrs: {
|
|
3037
|
+
type: "primary",
|
|
3038
|
+
circle: "",
|
|
3039
|
+
icon: "el-icon-download",
|
|
3040
|
+
size: "mini",
|
|
3041
|
+
title: "下载",
|
|
3042
|
+
},
|
|
3043
|
+
on: {
|
|
3044
|
+
click: function ($event) {
|
|
3045
|
+
$event.stopPropagation()
|
|
3046
|
+
return _vm.handDownLoad(file)
|
|
3047
|
+
},
|
|
3048
|
+
},
|
|
3049
|
+
})
|
|
3050
|
+
: _vm._e(),
|
|
2430
3051
|
file.state === 500
|
|
2431
3052
|
? _c("el-button", {
|
|
2432
3053
|
attrs: {
|
|
@@ -2444,7 +3065,24 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2444
3065
|
},
|
|
2445
3066
|
})
|
|
2446
3067
|
: _vm._e(),
|
|
2447
|
-
file.state ===
|
|
3068
|
+
file.state === 50
|
|
3069
|
+
? _c("el-button", {
|
|
3070
|
+
attrs: {
|
|
3071
|
+
type: "primary",
|
|
3072
|
+
circle: "",
|
|
3073
|
+
icon: "el-icon-upload",
|
|
3074
|
+
size: "mini",
|
|
3075
|
+
title: "继续上传",
|
|
3076
|
+
},
|
|
3077
|
+
on: {
|
|
3078
|
+
click: function ($event) {
|
|
3079
|
+
$event.stopPropagation()
|
|
3080
|
+
return _vm.handResumeUpload(file)
|
|
3081
|
+
},
|
|
3082
|
+
},
|
|
3083
|
+
})
|
|
3084
|
+
: _vm._e(),
|
|
3085
|
+
file.state === 500 || file.state === 50
|
|
2448
3086
|
? _c("el-button", {
|
|
2449
3087
|
attrs: {
|
|
2450
3088
|
type: "warning",
|
|
@@ -2491,10 +3129,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2491
3129
|
_vm._l(_vm.pendingFileList, function (file, index) {
|
|
2492
3130
|
return _c(
|
|
2493
3131
|
"li",
|
|
2494
|
-
{
|
|
2495
|
-
key: file.uid || index,
|
|
2496
|
-
staticClass: "file-list__item is-success",
|
|
2497
|
-
},
|
|
3132
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2498
3133
|
[
|
|
2499
3134
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2500
3135
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2541,11 +3176,11 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2541
3176
|
1
|
|
2542
3177
|
)
|
|
2543
3178
|
}
|
|
2544
|
-
var
|
|
2545
|
-
|
|
3179
|
+
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3180
|
+
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
2546
3181
|
|
|
2547
3182
|
|
|
2548
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3183
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
2549
3184
|
|
|
2550
3185
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
2551
3186
|
var message_ = __webpack_require__(12);
|
|
@@ -2555,10 +3190,14 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
2555
3190
|
var message_box_ = __webpack_require__(26);
|
|
2556
3191
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
2557
3192
|
|
|
2558
|
-
//
|
|
3193
|
+
// EXTERNAL MODULE: ./src/components/form/src/item/upload-process/large-upload/index.js
|
|
3194
|
+
var large_upload = __webpack_require__(51);
|
|
2559
3195
|
|
|
3196
|
+
// 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
3197
|
|
|
2561
|
-
|
|
3198
|
+
|
|
3199
|
+
|
|
3200
|
+
/* harmony default export */ var upload_processvue_type_script_lang_js = ({
|
|
2562
3201
|
name: "UploadProcess",
|
|
2563
3202
|
components: {},
|
|
2564
3203
|
props: {
|
|
@@ -2601,10 +3240,30 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2601
3240
|
type: Number,
|
|
2602
3241
|
default: 0
|
|
2603
3242
|
},
|
|
3243
|
+
limit: {
|
|
3244
|
+
type: Number,
|
|
3245
|
+
default: null
|
|
3246
|
+
},
|
|
3247
|
+
useLarge: {
|
|
3248
|
+
type: Boolean,
|
|
3249
|
+
default: false
|
|
3250
|
+
},
|
|
3251
|
+
largeSize: {
|
|
3252
|
+
type: Number,
|
|
3253
|
+
default: 1 * 1024 * 1024
|
|
3254
|
+
},
|
|
3255
|
+
largeChunkSize: {
|
|
3256
|
+
type: Number,
|
|
3257
|
+
default: 1 * 1024 * 1024
|
|
3258
|
+
},
|
|
3259
|
+
busiType: {
|
|
3260
|
+
type: String,
|
|
3261
|
+
default: ""
|
|
3262
|
+
},
|
|
2604
3263
|
// 批量上传最大数 0表示不批量上传
|
|
2605
3264
|
batchMaxCount: {
|
|
2606
3265
|
type: Number,
|
|
2607
|
-
default:
|
|
3266
|
+
default: 6
|
|
2608
3267
|
},
|
|
2609
3268
|
//是否自动上传
|
|
2610
3269
|
autoUpload: {
|
|
@@ -2638,28 +3297,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2638
3297
|
},
|
|
2639
3298
|
watch: {
|
|
2640
3299
|
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
|
-
}
|
|
3300
|
+
this.setValue(val);
|
|
2663
3301
|
}
|
|
2664
3302
|
},
|
|
2665
3303
|
computed: {
|
|
@@ -2668,6 +3306,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2668
3306
|
action: this.api.url,
|
|
2669
3307
|
headers: this.api.headers,
|
|
2670
3308
|
data: this.api.data,
|
|
3309
|
+
limit: this.limit,
|
|
2671
3310
|
multiple: true,
|
|
2672
3311
|
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
3312
|
}, this.$attrs, {
|
|
@@ -2695,13 +3334,13 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2695
3334
|
// 上传中
|
|
2696
3335
|
uploadingFiles: function uploadingFiles() {
|
|
2697
3336
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2698
|
-
return item.state === 100;
|
|
3337
|
+
return item.state === 100 || item.state === 10 || item.state === 30;
|
|
2699
3338
|
});
|
|
2700
3339
|
},
|
|
2701
3340
|
// 上传处理完成(成功加失败)
|
|
2702
3341
|
finishFiles: function finishFiles() {
|
|
2703
3342
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2704
|
-
return item.state === 200 || item.state === 500;
|
|
3343
|
+
return item.state === 200 || item.state === 500 || item.state === 50;
|
|
2705
3344
|
});
|
|
2706
3345
|
},
|
|
2707
3346
|
// 上传成功
|
|
@@ -2713,7 +3352,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2713
3352
|
// 上传失败
|
|
2714
3353
|
errorFiles: function errorFiles() {
|
|
2715
3354
|
return this.fileList && this.fileList.filter(function (item) {
|
|
2716
|
-
return item.state === 500;
|
|
3355
|
+
return item.state === 500 || item.state === 50;
|
|
2717
3356
|
});
|
|
2718
3357
|
},
|
|
2719
3358
|
isReadonly: function isReadonly() {
|
|
@@ -2725,30 +3364,31 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2725
3364
|
},
|
|
2726
3365
|
data: function data() {
|
|
2727
3366
|
return {
|
|
2728
|
-
/**
|
|
2729
|
-
* {
|
|
2730
|
-
* id: 唯一编码
|
|
2731
|
-
* name: 文件名称
|
|
2732
|
-
* state: 0待上传 100上传中 200上传成功 500上传失败
|
|
2733
|
-
*
|
|
2734
|
-
*
|
|
2735
|
-
*
|
|
2736
|
-
*
|
|
2737
|
-
*
|
|
2738
|
-
*
|
|
2739
|
-
*
|
|
2740
|
-
*
|
|
3367
|
+
/**
|
|
3368
|
+
* {
|
|
3369
|
+
* id: 唯一编码
|
|
3370
|
+
* name: 文件名称
|
|
3371
|
+
* state: 0待上传 100上传中 200上传成功 500上传失败
|
|
3372
|
+
* 大文件特有状态 10文件处理中,30是暂停,50上传中断
|
|
3373
|
+
* percentage: 上传进度 数字 100表示100%
|
|
3374
|
+
* errorMsg: 错误信息
|
|
3375
|
+
* size: 文件大小
|
|
3376
|
+
* file: 源文件 name percentage raw size status uid
|
|
3377
|
+
* ...
|
|
3378
|
+
* fileId: 数据库id
|
|
3379
|
+
* fileUrl: 文件地址 上传成功后地址
|
|
3380
|
+
* }
|
|
2741
3381
|
*/
|
|
2742
3382
|
fileList: [],
|
|
2743
3383
|
//已处理
|
|
2744
3384
|
pendingFileList: [],
|
|
2745
3385
|
//待处理
|
|
2746
|
-
/**
|
|
2747
|
-
* {
|
|
2748
|
-
* id: 文件id
|
|
2749
|
-
* name: 文件名称
|
|
2750
|
-
* url: 文件地址
|
|
2751
|
-
* }
|
|
3386
|
+
/**
|
|
3387
|
+
* {
|
|
3388
|
+
* id: 文件id
|
|
3389
|
+
* name: 文件名称
|
|
3390
|
+
* url: 文件地址
|
|
3391
|
+
* }
|
|
2752
3392
|
*/
|
|
2753
3393
|
fileValue: []
|
|
2754
3394
|
};
|
|
@@ -2758,17 +3398,39 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2758
3398
|
// eslint-disable-next-line vue/no-mutating-props
|
|
2759
3399
|
this.extend.that = this;
|
|
2760
3400
|
}
|
|
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
|
-
}
|
|
3401
|
+
this.setValue(this.value);
|
|
2770
3402
|
},
|
|
2771
3403
|
methods: {
|
|
3404
|
+
setValue: function setValue(val) {
|
|
3405
|
+
if (!val) {
|
|
3406
|
+
return false;
|
|
3407
|
+
}
|
|
3408
|
+
// 解决重置第一个元素为null
|
|
3409
|
+
if (val && val[0] === null) {
|
|
3410
|
+
this.fileValue = [];
|
|
3411
|
+
this.fileList = [];
|
|
3412
|
+
this.$emit("input", this.fileValue);
|
|
3413
|
+
}
|
|
3414
|
+
if (val === this.fileValue) {
|
|
3415
|
+
return false;
|
|
3416
|
+
}
|
|
3417
|
+
this.fileValue = [];
|
|
3418
|
+
this.fileList = [];
|
|
3419
|
+
if (val && val.length) {
|
|
3420
|
+
var _this$value, _this$fileValue, _this$fileList;
|
|
3421
|
+
var valList = (_this$value = this.value) == null ? void 0 : _this$value.map(function (item) {
|
|
3422
|
+
if (!item) {
|
|
3423
|
+
return item;
|
|
3424
|
+
}
|
|
3425
|
+
item.state = 200;
|
|
3426
|
+
item.percentage = 100; // 进度条
|
|
3427
|
+
item.name = item.fileName;
|
|
3428
|
+
return item;
|
|
3429
|
+
});
|
|
3430
|
+
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
3431
|
+
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
3432
|
+
}
|
|
3433
|
+
},
|
|
2772
3434
|
removeSpecialCharacters: function removeSpecialCharacters(filename) {
|
|
2773
3435
|
// 定义正则表达式,匹配除了字母、数字、下划线、空格和点号之外的所有字符
|
|
2774
3436
|
var pattern = /[^\w\u4e00-\u9fa5.]/gi;
|
|
@@ -2791,8 +3453,8 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2791
3453
|
}).indexOf(file.fileId);
|
|
2792
3454
|
_this.fileValue.splice(indexVal, 1);
|
|
2793
3455
|
_this.$emit("input", _this.fileValue);
|
|
2794
|
-
} else if (file.state === 100) {
|
|
2795
|
-
file.cancel && file.cancel(
|
|
3456
|
+
} else if (file.state === 100 || file.state === 10 || file.state === 30) {
|
|
3457
|
+
file.cancel && file.cancel();
|
|
2796
3458
|
}
|
|
2797
3459
|
}).catch(function () {});
|
|
2798
3460
|
},
|
|
@@ -2806,6 +3468,17 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2806
3468
|
window.open(file.fileUrl || file.filePath, "_blank");
|
|
2807
3469
|
}
|
|
2808
3470
|
},
|
|
3471
|
+
handDownLoad: function handDownLoad(file) {
|
|
3472
|
+
var link = document.createElement("a");
|
|
3473
|
+
link.style.display = "none";
|
|
3474
|
+
link.target = "_blank";
|
|
3475
|
+
link.href = file.filePath || file.fileUrl;
|
|
3476
|
+
link.download = file.fileName || file.name;
|
|
3477
|
+
// 使用该方法触发点击下载
|
|
3478
|
+
document.body.appendChild(link);
|
|
3479
|
+
link.click();
|
|
3480
|
+
document.body.removeChild(link);
|
|
3481
|
+
},
|
|
2809
3482
|
handUpload: function handUpload(file) {
|
|
2810
3483
|
if (!this.verification(file)) {
|
|
2811
3484
|
return false;
|
|
@@ -2813,6 +3486,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2813
3486
|
file.percentage = 0;
|
|
2814
3487
|
this.uploading(file);
|
|
2815
3488
|
},
|
|
3489
|
+
handResumeUpload: function handResumeUpload(file) {
|
|
3490
|
+
file.resume();
|
|
3491
|
+
},
|
|
2816
3492
|
handError: function handError(file) {
|
|
2817
3493
|
if (this.$listeners.error) {
|
|
2818
3494
|
this.$emit("error", file);
|
|
@@ -2843,8 +3519,45 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2843
3519
|
_this2.uploading(pending);
|
|
2844
3520
|
});
|
|
2845
3521
|
},
|
|
3522
|
+
uploadingLarge: function uploadingLarge(fileUpload) {
|
|
3523
|
+
var _this$api,
|
|
3524
|
+
_this3 = this;
|
|
3525
|
+
var largeUpload = new large_upload["a" /* default */](fileUpload, {
|
|
3526
|
+
request: this.request,
|
|
3527
|
+
uploadFileList: this.fileList,
|
|
3528
|
+
chunkSize: this.largeChunkSize,
|
|
3529
|
+
busiType: this.busiType || ((_this$api = this.api) == null || (_this$api = _this$api.data) == null ? void 0 : _this$api.busiType),
|
|
3530
|
+
//"piclib",
|
|
3531
|
+
maxRequest: this.batchMaxCount,
|
|
3532
|
+
batchMaxCount: this.batchMaxCount
|
|
3533
|
+
}, {
|
|
3534
|
+
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
3535
|
+
var percent = progressEvent.percentage;
|
|
3536
|
+
var percentCompleted = Math.round(percent);
|
|
3537
|
+
// 处理上传进度,可根据实际需求进行操作
|
|
3538
|
+
if (percentCompleted == 100) {
|
|
3539
|
+
fileUpload.percentage = 99;
|
|
3540
|
+
} else {
|
|
3541
|
+
fileUpload.percentage = percentCompleted;
|
|
3542
|
+
}
|
|
3543
|
+
},
|
|
3544
|
+
onUploadFinish: function onUploadFinish(res) {
|
|
3545
|
+
_this3.uploadFinish(res, fileUpload);
|
|
3546
|
+
},
|
|
3547
|
+
onUploadError: function onUploadError(error) {
|
|
3548
|
+
fileUpload.state = 500; //上传失败
|
|
3549
|
+
fileUpload.errorMsg = error.message;
|
|
3550
|
+
_this3.batchUpload();
|
|
3551
|
+
}
|
|
3552
|
+
});
|
|
3553
|
+
largeUpload.hanldeUploadFile(fileUpload);
|
|
3554
|
+
},
|
|
2846
3555
|
uploading: function uploading(fileUpload) {
|
|
2847
|
-
var
|
|
3556
|
+
var _this4 = this;
|
|
3557
|
+
if (fileUpload.isLargeFile) {
|
|
3558
|
+
this.uploadingLarge(fileUpload);
|
|
3559
|
+
return false;
|
|
3560
|
+
}
|
|
2848
3561
|
// 数据处理
|
|
2849
3562
|
var formData = new FormData();
|
|
2850
3563
|
for (var key in this.api.data || {}) {
|
|
@@ -2856,11 +3569,15 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2856
3569
|
"Content-Type": "multipart/form-data"
|
|
2857
3570
|
}, this.api.headers);
|
|
2858
3571
|
fileUpload.state = 100; //上传中...
|
|
3572
|
+
var controller = new AbortController();
|
|
3573
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
2859
3574
|
var requestObj = {
|
|
2860
3575
|
url: this.api.url,
|
|
2861
3576
|
method: "POST",
|
|
2862
3577
|
headers: headers,
|
|
2863
3578
|
data: formData,
|
|
3579
|
+
signal: signal,
|
|
3580
|
+
// 将 signal 传递给服务函数
|
|
2864
3581
|
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
2865
3582
|
var percent = progressEvent.loaded * 100 / progressEvent.total;
|
|
2866
3583
|
var percentCompleted = Math.round(percent);
|
|
@@ -2872,30 +3589,36 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2872
3589
|
}
|
|
2873
3590
|
}
|
|
2874
3591
|
};
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
3592
|
+
fileUpload.cancel = function () {
|
|
3593
|
+
return controller.abort();
|
|
3594
|
+
};
|
|
3595
|
+
// if (this.CancelToken) {
|
|
3596
|
+
// requestObj.cancelToken = new this.CancelToken(function executor(c) {
|
|
3597
|
+
// // An executor function receives a cancel function as a parameter
|
|
3598
|
+
// fileUpload.cancel = c;
|
|
3599
|
+
// });
|
|
3600
|
+
// }
|
|
2881
3601
|
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);
|
|
3602
|
+
_this4.uploadFinish(res, fileUpload);
|
|
2893
3603
|
}).catch(function (error) {
|
|
2894
3604
|
fileUpload.state = 500; //上传失败
|
|
2895
3605
|
fileUpload.errorMsg = error.message;
|
|
2896
|
-
|
|
3606
|
+
_this4.batchUpload();
|
|
2897
3607
|
});
|
|
2898
3608
|
},
|
|
3609
|
+
uploadFinish: function uploadFinish(res, fileUpload) {
|
|
3610
|
+
var _this$fileValue$push;
|
|
3611
|
+
fileUpload.percentage = 100; // 进度条
|
|
3612
|
+
fileUpload.state = 200; //上传成功
|
|
3613
|
+
var fileId = res[this.remoteProp.id];
|
|
3614
|
+
var fileUrl = typeof this.formatUrl === "function" ? this.formatUrl.call(this, res, fileUpload) : res[this.remoteProp.url];
|
|
3615
|
+
fileUpload.fileId = fileId;
|
|
3616
|
+
fileUpload.fileUrl = fileUrl;
|
|
3617
|
+
this.batchUpload();
|
|
3618
|
+
var fileName = this.removeSpecialCharacters(fileUpload.name);
|
|
3619
|
+
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));
|
|
3620
|
+
this.$emit("input", this.fileValue);
|
|
3621
|
+
},
|
|
2899
3622
|
verification: function verification(upload) {
|
|
2900
3623
|
if (this.uploadMaxSize && this.uploadMaxSize > 0) {
|
|
2901
3624
|
var fileSize = upload.size / 1024 / 1024;
|
|
@@ -2918,20 +3641,23 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2918
3641
|
var type = upload.raw.type;
|
|
2919
3642
|
// 准备上传数据
|
|
2920
3643
|
var fileUpload = {
|
|
2921
|
-
id: upload.uid,
|
|
3644
|
+
// id: upload.uid,
|
|
2922
3645
|
name: upload.name,
|
|
2923
3646
|
file: upload,
|
|
2924
3647
|
state: 0,
|
|
2925
3648
|
percentage: 0,
|
|
2926
3649
|
errorMsg: null,
|
|
2927
3650
|
size: size,
|
|
2928
|
-
type: type
|
|
3651
|
+
type: type,
|
|
3652
|
+
isLargeFile: false
|
|
2929
3653
|
};
|
|
2930
3654
|
if (!this.verification(fileUpload)) {
|
|
2931
|
-
|
|
2932
|
-
}
|
|
2933
|
-
|
|
3655
|
+
return false;
|
|
3656
|
+
}
|
|
3657
|
+
if (this.useLarge && size > this.largeSize) {
|
|
3658
|
+
fileUpload.isLargeFile = true;
|
|
2934
3659
|
}
|
|
3660
|
+
this.pendingFileList.push(fileUpload);
|
|
2935
3661
|
this.$emit("beforeUpload", {
|
|
2936
3662
|
ref: this,
|
|
2937
3663
|
fileList: this.fileList,
|
|
@@ -2951,9 +3677,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2951
3677
|
}
|
|
2952
3678
|
}
|
|
2953
3679
|
});
|
|
2954
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
2955
|
-
/* harmony default export */ var
|
|
2956
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3680
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=script&lang=js
|
|
3681
|
+
/* harmony default export */ var item_upload_processvue_type_script_lang_js = (upload_processvue_type_script_lang_js);
|
|
3682
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue
|
|
2957
3683
|
|
|
2958
3684
|
|
|
2959
3685
|
|
|
@@ -2961,10 +3687,10 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
2961
3687
|
|
|
2962
3688
|
/* normalize component */
|
|
2963
3689
|
|
|
2964
|
-
var
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
3690
|
+
var upload_process_component = Object(componentNormalizer["a" /* default */])(
|
|
3691
|
+
item_upload_processvue_type_script_lang_js,
|
|
3692
|
+
upload_processvue_type_template_id_b7318202_render,
|
|
3693
|
+
upload_processvue_type_template_id_b7318202_staticRenderFns,
|
|
2968
3694
|
false,
|
|
2969
3695
|
null,
|
|
2970
3696
|
null,
|
|
@@ -2972,25 +3698,25 @@ var UploadProcess_component = Object(componentNormalizer["a" /* default */])(
|
|
|
2972
3698
|
|
|
2973
3699
|
)
|
|
2974
3700
|
|
|
2975
|
-
/* harmony default export */ var
|
|
3701
|
+
/* harmony default export */ var upload_process = (upload_process_component.exports);
|
|
2976
3702
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
2977
|
-
var switch_ = __webpack_require__(
|
|
3703
|
+
var switch_ = __webpack_require__(53);
|
|
2978
3704
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
2979
3705
|
|
|
2980
3706
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
2981
|
-
var slider_ = __webpack_require__(
|
|
3707
|
+
var slider_ = __webpack_require__(54);
|
|
2982
3708
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
2983
3709
|
|
|
2984
3710
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
2985
|
-
var transfer_ = __webpack_require__(
|
|
3711
|
+
var transfer_ = __webpack_require__(55);
|
|
2986
3712
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
2987
3713
|
|
|
2988
3714
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
2989
|
-
var time_picker_ = __webpack_require__(
|
|
3715
|
+
var time_picker_ = __webpack_require__(56);
|
|
2990
3716
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
2991
3717
|
|
|
2992
3718
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
2993
|
-
var upload_ = __webpack_require__(
|
|
3719
|
+
var upload_ = __webpack_require__(57);
|
|
2994
3720
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
2995
3721
|
|
|
2996
3722
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -3030,7 +3756,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
3030
3756
|
Radio: Radio,
|
|
3031
3757
|
Checkbox: Checkbox,
|
|
3032
3758
|
InputText: InputText,
|
|
3033
|
-
UploadProcess:
|
|
3759
|
+
UploadProcess: upload_process
|
|
3034
3760
|
},
|
|
3035
3761
|
props: {
|
|
3036
3762
|
control: String,
|