@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 = 63);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -249,235 +249,839 @@ module.exports = require("element-ui/lib/mixins/emitter");
|
|
|
249
249
|
|
|
250
250
|
/***/ }),
|
|
251
251
|
/* 27 */
|
|
252
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
253
|
+
|
|
254
|
+
"use strict";
|
|
255
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return uploadFile; });
|
|
256
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return mergeChunk; });
|
|
257
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkFile; });
|
|
258
|
+
/**
|
|
259
|
+
* [uploadFile] - 上传切片参数
|
|
260
|
+
* @param fileHash 文件hash,String
|
|
261
|
+
* @param fileSize 文件大小,Number
|
|
262
|
+
* @param fileName 文件名称,String
|
|
263
|
+
* @param index 多文件上传中的所在index,number
|
|
264
|
+
* @param chunkFile 切片文件本身,File || Blob || void
|
|
265
|
+
* @param chunkHash 切片文件hash,String
|
|
266
|
+
* @param chunkSize 分片大小,Number
|
|
267
|
+
* @param chunkNumber 切片总数量,Number
|
|
268
|
+
* @param finish 是否上传完成,可选参数,Boolean
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
// 上传单个切片
|
|
272
|
+
function uploadFile(data, _ref) {
|
|
273
|
+
var onCancel = _ref.onCancel,
|
|
274
|
+
service = _ref.service;
|
|
275
|
+
var controller = new AbortController();
|
|
276
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
277
|
+
// 封装 axios 请求或 HTTP 客户端请求
|
|
278
|
+
var request = service({
|
|
279
|
+
url: "/tengine/dfs/bigStorage/upload",
|
|
280
|
+
method: "post",
|
|
281
|
+
data: data,
|
|
282
|
+
headers: {
|
|
283
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
284
|
+
},
|
|
285
|
+
signal: signal // 将 signal 传递给服务函数
|
|
286
|
+
});
|
|
287
|
+
// 如果提供了 onCancel 回调,则传递取消函数
|
|
288
|
+
if (typeof onCancel === "function") {
|
|
289
|
+
// 如果是一个函数,则直接调用传一个取消方法给 这个方法
|
|
290
|
+
// 所以只要传进来是方法,就会直接传一个参数并直接触发这个函数
|
|
291
|
+
// 那传过来的这个方法就会接收到一个参数(就是取消函数() => controller.abort())
|
|
292
|
+
// 在调用uploadFile就可以拿到这个参数
|
|
293
|
+
onCancel(function () {
|
|
294
|
+
return controller.abort();
|
|
295
|
+
}); // 调用 onCancel 时传入取消函数
|
|
296
|
+
}
|
|
297
|
+
return request;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* [mergeChunk] - 合并切片
|
|
302
|
+
* @param chunkSize 分片大小,Number
|
|
303
|
+
* @param fileName 文件名称,String
|
|
304
|
+
* @param fileSize 文件大小,Number
|
|
305
|
+
*/
|
|
306
|
+
|
|
307
|
+
// 合并所有切片
|
|
308
|
+
function mergeChunk(data, _ref2) {
|
|
309
|
+
var service = _ref2.service;
|
|
310
|
+
return service({
|
|
311
|
+
url: "/tengine/dfs/bigStorage/merge",
|
|
312
|
+
method: "post",
|
|
313
|
+
data: {
|
|
314
|
+
fileMd5: data.fileHash,
|
|
315
|
+
fsign: data.fsign,
|
|
316
|
+
fileName: data.fileName,
|
|
317
|
+
fileSize: data.fileSize,
|
|
318
|
+
busiType: data.busiType
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* [checkFile] - 检查文件是否存在
|
|
325
|
+
* @param fileHash 文件hash,String
|
|
326
|
+
* @param fileName 文件名称,String
|
|
327
|
+
*/
|
|
328
|
+
|
|
329
|
+
// 检查文件是否存在
|
|
330
|
+
function checkFile(data, _ref3) {
|
|
331
|
+
var service = _ref3.service;
|
|
332
|
+
return service({
|
|
333
|
+
url: "/tengine/dfs/bigStorage/checkChunk",
|
|
334
|
+
method: "post",
|
|
335
|
+
data: {
|
|
336
|
+
fileMd5: data.fileHash,
|
|
337
|
+
fileName: data.fileName,
|
|
338
|
+
busiType: data.busiType
|
|
339
|
+
},
|
|
340
|
+
headers: {
|
|
341
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/***/ }),
|
|
347
|
+
/* 28 */
|
|
252
348
|
/***/ (function(module, exports) {
|
|
253
349
|
|
|
254
350
|
module.exports = require("codemirror");
|
|
255
351
|
|
|
256
352
|
/***/ }),
|
|
257
|
-
/*
|
|
353
|
+
/* 29 */
|
|
258
354
|
/***/ (function(module, exports) {
|
|
259
355
|
|
|
260
356
|
module.exports = require("@panpanzhao/component-ui/lib/components/drawer");
|
|
261
357
|
|
|
262
358
|
/***/ }),
|
|
263
|
-
/*
|
|
359
|
+
/* 30 */
|
|
264
360
|
/***/ (function(module, exports) {
|
|
265
361
|
|
|
266
362
|
module.exports = require("element-ui/lib/link");
|
|
267
363
|
|
|
268
364
|
/***/ }),
|
|
269
|
-
/*
|
|
365
|
+
/* 31 */
|
|
270
366
|
/***/ (function(module, exports) {
|
|
271
367
|
|
|
272
368
|
module.exports = require("element-ui/lib/input-number");
|
|
273
369
|
|
|
274
370
|
/***/ }),
|
|
275
|
-
/*
|
|
371
|
+
/* 32 */
|
|
276
372
|
/***/ (function(module, exports) {
|
|
277
373
|
|
|
278
374
|
module.exports = require("element-ui/lib/select");
|
|
279
375
|
|
|
280
376
|
/***/ }),
|
|
281
|
-
/*
|
|
377
|
+
/* 33 */
|
|
282
378
|
/***/ (function(module, exports) {
|
|
283
379
|
|
|
284
380
|
module.exports = require("element-ui/lib/option");
|
|
285
381
|
|
|
286
382
|
/***/ }),
|
|
287
|
-
/*
|
|
383
|
+
/* 34 */
|
|
288
384
|
/***/ (function(module, exports) {
|
|
289
385
|
|
|
290
386
|
module.exports = require("element-ui/lib/option-group");
|
|
291
387
|
|
|
292
388
|
/***/ }),
|
|
293
|
-
/*
|
|
389
|
+
/* 35 */
|
|
294
390
|
/***/ (function(module, exports) {
|
|
295
391
|
|
|
296
392
|
module.exports = require("@panpanzhao/component-ui/lib/components/tree-line");
|
|
297
393
|
|
|
298
394
|
/***/ }),
|
|
299
|
-
/*
|
|
395
|
+
/* 36 */
|
|
300
396
|
/***/ (function(module, exports) {
|
|
301
397
|
|
|
302
398
|
module.exports = require("element-ui/lib/radio-group");
|
|
303
399
|
|
|
304
400
|
/***/ }),
|
|
305
|
-
/*
|
|
401
|
+
/* 37 */
|
|
306
402
|
/***/ (function(module, exports) {
|
|
307
403
|
|
|
308
404
|
module.exports = require("element-ui/lib/radio-button");
|
|
309
405
|
|
|
310
406
|
/***/ }),
|
|
311
|
-
/*
|
|
407
|
+
/* 38 */
|
|
312
408
|
/***/ (function(module, exports) {
|
|
313
409
|
|
|
314
410
|
module.exports = require("element-ui/lib/checkbox-group");
|
|
315
411
|
|
|
316
412
|
/***/ }),
|
|
317
|
-
/*
|
|
413
|
+
/* 39 */
|
|
318
414
|
/***/ (function(module, exports) {
|
|
319
415
|
|
|
320
416
|
module.exports = require("element-ui/lib/checkbox");
|
|
321
417
|
|
|
322
418
|
/***/ }),
|
|
323
|
-
/*
|
|
419
|
+
/* 40 */
|
|
324
420
|
/***/ (function(module, exports) {
|
|
325
421
|
|
|
326
422
|
module.exports = require("element-ui/lib/checkbox-button");
|
|
327
423
|
|
|
328
424
|
/***/ }),
|
|
329
|
-
/*
|
|
425
|
+
/* 41 */
|
|
330
426
|
/***/ (function(module, exports) {
|
|
331
427
|
|
|
332
428
|
module.exports = require("element-ui/lib/date-picker");
|
|
333
429
|
|
|
334
430
|
/***/ }),
|
|
335
|
-
/*
|
|
431
|
+
/* 42 */
|
|
432
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
433
|
+
|
|
434
|
+
"use strict";
|
|
435
|
+
/* WEBPACK VAR INJECTION */(function(__webpack__worker__0) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LargeUpload; });
|
|
436
|
+
/* harmony import */ var _remote_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
|
|
437
|
+
/* harmony import */ var js_md5__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
|
|
438
|
+
/* harmony import */ var js_md5__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(js_md5__WEBPACK_IMPORTED_MODULE_1__);
|
|
439
|
+
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); }
|
|
440
|
+
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."); }
|
|
441
|
+
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); }
|
|
442
|
+
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; }
|
|
443
|
+
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; }
|
|
444
|
+
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); } }
|
|
445
|
+
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); }); }; }
|
|
446
|
+
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
|
|
447
|
+
var id = 0;
|
|
448
|
+
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
var _useWorker = /*#__PURE__*/_classPrivateFieldLooseKey("useWorker");
|
|
452
|
+
var _finishTask = /*#__PURE__*/_classPrivateFieldLooseKey("finishTask");
|
|
453
|
+
var _handleMerge = /*#__PURE__*/_classPrivateFieldLooseKey("handleMerge");
|
|
454
|
+
var _signleFileProgress = /*#__PURE__*/_classPrivateFieldLooseKey("signleFileProgress");
|
|
455
|
+
var _uploadSignleFile = /*#__PURE__*/_classPrivateFieldLooseKey("uploadSignleFile");
|
|
456
|
+
var LargeUpload = /*#__PURE__*/function () {
|
|
457
|
+
function LargeUpload(fileObj, options, callBack) {
|
|
458
|
+
// 单个文件上传
|
|
459
|
+
Object.defineProperty(this, _uploadSignleFile, {
|
|
460
|
+
value: _uploadSignleFile2
|
|
461
|
+
});
|
|
462
|
+
// 更新单个文件进度条
|
|
463
|
+
Object.defineProperty(this, _signleFileProgress, {
|
|
464
|
+
value: _signleFileProgress2
|
|
465
|
+
});
|
|
466
|
+
// 调取合并接口处理所有切片
|
|
467
|
+
Object.defineProperty(this, _handleMerge, {
|
|
468
|
+
value: _handleMerge2
|
|
469
|
+
});
|
|
470
|
+
// 设置单个文件上传已完成
|
|
471
|
+
Object.defineProperty(this, _finishTask, {
|
|
472
|
+
value: _finishTask2
|
|
473
|
+
});
|
|
474
|
+
// 生成文件 hash(web-worker)
|
|
475
|
+
Object.defineProperty(this, _useWorker, {
|
|
476
|
+
value: _useWorker2
|
|
477
|
+
});
|
|
478
|
+
var request = options.request,
|
|
479
|
+
uploadFileList = options.uploadFileList,
|
|
480
|
+
_chunkSize = options.chunkSize,
|
|
481
|
+
maxRequest = options.maxRequest,
|
|
482
|
+
_busiType = options.busiType,
|
|
483
|
+
batchMaxCount = options.batchMaxCount;
|
|
484
|
+
this.fileObj = fileObj;
|
|
485
|
+
this.request = request;
|
|
486
|
+
this.uploadFileList = uploadFileList;
|
|
487
|
+
this.chunkSize = _chunkSize;
|
|
488
|
+
this.busiType = _busiType;
|
|
489
|
+
this.maxRequest = maxRequest || 6;
|
|
490
|
+
this.batchMaxCount = batchMaxCount || 6;
|
|
491
|
+
this.onUploadProgress = callBack == null ? void 0 : callBack.onUploadProgress;
|
|
492
|
+
this.onUploadFinish = callBack == null ? void 0 : callBack.onUploadFinish;
|
|
493
|
+
this.onUploadError = callBack == null ? void 0 : callBack.onUploadError;
|
|
494
|
+
}
|
|
495
|
+
// 取消单个
|
|
496
|
+
var _proto = LargeUpload.prototype;
|
|
497
|
+
_proto.cancelSingle =
|
|
498
|
+
/*#__PURE__*/
|
|
499
|
+
function () {
|
|
500
|
+
var _cancelSingle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
501
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
502
|
+
while (1) switch (_context.prev = _context.next) {
|
|
503
|
+
case 0:
|
|
504
|
+
this.pauseUpload(true);
|
|
505
|
+
//情况所有需要上传的分片
|
|
506
|
+
this.fileObj.allChunkList = [];
|
|
507
|
+
// 取消上传后列表删除该文件
|
|
508
|
+
// const list = uploadFileList.filter((itemB) => itemB.fileHash !== this.fileObj.fileHash);
|
|
509
|
+
// uploadFileList = list;
|
|
510
|
+
case 2:
|
|
511
|
+
case "end":
|
|
512
|
+
return _context.stop();
|
|
513
|
+
}
|
|
514
|
+
}, _callee, this);
|
|
515
|
+
}));
|
|
516
|
+
function cancelSingle() {
|
|
517
|
+
return _cancelSingle.apply(this, arguments);
|
|
518
|
+
}
|
|
519
|
+
return cancelSingle;
|
|
520
|
+
}() // 暂停上传(是暂停剩下未上传的)
|
|
521
|
+
;
|
|
522
|
+
_proto.pauseUpload = function pauseUpload(elsePause, error) {
|
|
523
|
+
if (elsePause === void 0) {
|
|
524
|
+
elsePause = true;
|
|
525
|
+
}
|
|
526
|
+
// elsePause为true就是主动暂停,为false就是请求中断
|
|
527
|
+
// 4是成功 6是失败 如果不是成功或者失败状态,
|
|
528
|
+
if (![200, 500].includes(this.fileObj.state)) {
|
|
529
|
+
// 3是暂停,5是中断
|
|
530
|
+
if (elsePause) {
|
|
531
|
+
this.fileObj.state = 30;
|
|
532
|
+
} else {
|
|
533
|
+
this.fileObj.state = 50;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
this.fileObj.errNumber = 0;
|
|
537
|
+
|
|
538
|
+
// 取消还在请求中的所有接口
|
|
539
|
+
if (this.fileObj.whileRequests.length > 0) {
|
|
540
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.fileObj.whileRequests), _step; !(_step = _iterator()).done;) {
|
|
541
|
+
var itemB = _step.value;
|
|
542
|
+
itemB.cancel ? itemB.cancel() : "";
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if (typeof this.onUploadError === "function") {
|
|
546
|
+
this.onUploadError(error || new Error("上传失败"));
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
// 继续上传
|
|
550
|
+
;
|
|
551
|
+
_proto.resumeUpload = function resumeUpload() {
|
|
552
|
+
var _this$fileObj$allChun;
|
|
553
|
+
// 2为上传中
|
|
554
|
+
this.fileObj.state = 100;
|
|
555
|
+
// 把刚才暂停的正在上传中所有切片放到待上传切片列表中
|
|
556
|
+
(_this$fileObj$allChun = this.fileObj.allChunkList).push.apply(_this$fileObj$allChun, this.fileObj.whileRequests);
|
|
557
|
+
this.fileObj.whileRequests = [];
|
|
558
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
559
|
+
}
|
|
560
|
+
// 开始上传事件
|
|
561
|
+
;
|
|
562
|
+
_proto.hanldeUploadFile =
|
|
563
|
+
/*#__PURE__*/
|
|
564
|
+
function () {
|
|
565
|
+
var _hanldeUploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
566
|
+
var _this = this;
|
|
567
|
+
var _yield$_classPrivateF, fileHash, fileChunkList, baseName, lastIndex, res, skipUpload, uploadedChunks;
|
|
568
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
569
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
570
|
+
case 0:
|
|
571
|
+
_context2.prev = 0;
|
|
572
|
+
this.fileObj.state = 10,
|
|
573
|
+
// 0是什么都不做,1文件处理中,2是上传中,3是暂停,4是上传完成,5上传中断,6是上传失败
|
|
574
|
+
this.fileObj.fileHash = "", this.fileObj.fileName = this.fileObj.name, this.fileObj.fileSize = this.fileObj.size, this.fileObj.allChunkList = [],
|
|
575
|
+
// 所有请求的数据
|
|
576
|
+
this.fileObj.whileRequests = [],
|
|
577
|
+
// 正在请求中的请求个数,目前是要永远都保存请求个数为6
|
|
578
|
+
this.fileObj.finishNumber = 0,
|
|
579
|
+
//请求完成的个数
|
|
580
|
+
this.fileObj.errNumber = 0,
|
|
581
|
+
// 报错的个数,默认是0个,超多3个就是直接上传中断
|
|
582
|
+
this.fileObj.percentage = 0,
|
|
583
|
+
// 单个文件上传进度条
|
|
584
|
+
this.fileObj.cancel = null,
|
|
585
|
+
// 用于取消切片上传接口
|
|
586
|
+
this.fileObj.busiType = this.busiType, this.fileObj.resume = this.resumeUpload.bind(this),
|
|
587
|
+
//用于重新上传
|
|
588
|
+
this.fileObj.cancel = this.cancelSingle.bind(this); //用于取消上传
|
|
589
|
+
if (this.fileObj.size === 0) {
|
|
590
|
+
// 文件大小为0直接上传失败
|
|
591
|
+
this.fileObj.state = 500;
|
|
592
|
+
// 上传中断
|
|
593
|
+
this.pauseUpload(false, new Error("文件大小为0"));
|
|
594
|
+
}
|
|
595
|
+
console.log("文件开始解析");
|
|
596
|
+
|
|
597
|
+
// 计算文件hash
|
|
598
|
+
_context2.next = 6;
|
|
599
|
+
return _classPrivateFieldLooseBase(this, _useWorker)[_useWorker](this.fileObj.raw || this.fileObj.file.raw);
|
|
600
|
+
case 6:
|
|
601
|
+
_yield$_classPrivateF = _context2.sent;
|
|
602
|
+
fileHash = _yield$_classPrivateF.fileHash;
|
|
603
|
+
fileChunkList = _yield$_classPrivateF.fileChunkList;
|
|
604
|
+
console.log(fileHash, "文件hash计算完成");
|
|
605
|
+
|
|
606
|
+
// 解析完成开始上传文件
|
|
607
|
+
baseName = ""; // 查找'.'在fileName中最后出现的位置
|
|
608
|
+
lastIndex = this.fileObj.name.lastIndexOf("."); // 如果'.'不存在,则返回整个文件名
|
|
609
|
+
if (lastIndex === -1) {
|
|
610
|
+
baseName = this.fileObj.name;
|
|
611
|
+
}
|
|
612
|
+
// 否则,返回从fileName开始到'.'前一个字符的子串作为文件名(不包含'.')
|
|
613
|
+
baseName = "_" + Object(js_md5__WEBPACK_IMPORTED_MODULE_1__["md5"])(this.fileObj.name.slice(0, lastIndex));
|
|
614
|
+
// 这里要注意!可能同一个文件,是复制出来的,出现文件名不同但是内容相同,导致获取到的hash值也是相同的
|
|
615
|
+
// 所以文件hash要特殊处理
|
|
616
|
+
this.fileObj.fileHash = "" + fileHash + baseName;
|
|
617
|
+
this.fileObj.fsign = fileHash;
|
|
618
|
+
this.fileObj.state = 100;
|
|
619
|
+
// console.log(uploadFileList.value, 'uploadFileList.value')
|
|
620
|
+
// 上传之前要检查服务器是否存在该文件
|
|
621
|
+
_context2.next = 19;
|
|
622
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* checkFile */ "a"])({
|
|
623
|
+
fileHash: "" + fileHash + baseName,
|
|
624
|
+
fileName: this.fileObj.name,
|
|
625
|
+
busiType: this.fileObj.busiType
|
|
626
|
+
}, {
|
|
627
|
+
service: this.request
|
|
628
|
+
});
|
|
629
|
+
case 19:
|
|
630
|
+
res = _context2.sent;
|
|
631
|
+
skipUpload = res.skipUpload, uploadedChunks = res.uploadedChunks;
|
|
632
|
+
if (skipUpload) {
|
|
633
|
+
_context2.next = 25;
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
//this.#finishTask(fileObj)
|
|
637
|
+
_classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
638
|
+
console.log("文件已存在,实现秒传");
|
|
639
|
+
return _context2.abrupt("return", false);
|
|
640
|
+
case 25:
|
|
641
|
+
this.fileObj.allChunkList = fileChunkList.map(function (item, index) {
|
|
642
|
+
return {
|
|
643
|
+
// 总文件hash
|
|
644
|
+
fileHash: "" + fileHash + baseName,
|
|
645
|
+
// 总文件size
|
|
646
|
+
fileSize: _this.fileObj.size,
|
|
647
|
+
// 总文件name
|
|
648
|
+
fileName: _this.fileObj.name,
|
|
649
|
+
index: index,
|
|
650
|
+
// 切片文件本身
|
|
651
|
+
chunkFile: item.chunkFile,
|
|
652
|
+
// 单个切片hash,以 - 连接
|
|
653
|
+
chunkHash: "" + fileHash + baseName + "-" + index,
|
|
654
|
+
// 切片文件大小
|
|
655
|
+
chunkSize: _this.chunkSize,
|
|
656
|
+
// 切片个数
|
|
657
|
+
chunkNumber: fileChunkList.length,
|
|
658
|
+
// 切片是否已经完成
|
|
659
|
+
finish: false
|
|
660
|
+
};
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
// 如果已存在部分文件切片,则要过滤调已经上传的切片
|
|
664
|
+
if (!((uploadedChunks == null ? void 0 : uploadedChunks.length) > 0)) {
|
|
665
|
+
_context2.next = 35;
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
// 过滤掉已经上传过的切片
|
|
669
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.filter(function (item) {
|
|
670
|
+
return !uploadedChunks.includes(item.chunkHash);
|
|
671
|
+
// return !uploadedChunks.includes(String(item.index));
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// 如果存在需要上传的,但是又为空,可能是因为还没合并,
|
|
675
|
+
if (this.fileObj.allChunkList.length) {
|
|
676
|
+
_context2.next = 34;
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
_context2.next = 31;
|
|
680
|
+
return _classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
681
|
+
case 31:
|
|
682
|
+
return _context2.abrupt("return", false);
|
|
683
|
+
case 34:
|
|
684
|
+
// 同时要注意处理切片数量
|
|
685
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.map(function (item) {
|
|
686
|
+
return _extends({}, item, {
|
|
687
|
+
chunkNumber: _this.fileObj.allChunkList.length
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
case 35:
|
|
691
|
+
// 逐步对单个文件进行切片上传
|
|
692
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
693
|
+
_context2.next = 42;
|
|
694
|
+
break;
|
|
695
|
+
case 38:
|
|
696
|
+
_context2.prev = 38;
|
|
697
|
+
_context2.t0 = _context2["catch"](0);
|
|
698
|
+
console.log(_context2.t0);
|
|
699
|
+
this.pauseUpload(false, _context2.t0);
|
|
700
|
+
case 42:
|
|
701
|
+
case "end":
|
|
702
|
+
return _context2.stop();
|
|
703
|
+
}
|
|
704
|
+
}, _callee2, this, [[0, 38]]);
|
|
705
|
+
}));
|
|
706
|
+
function hanldeUploadFile() {
|
|
707
|
+
return _hanldeUploadFile.apply(this, arguments);
|
|
708
|
+
}
|
|
709
|
+
return hanldeUploadFile;
|
|
710
|
+
}();
|
|
711
|
+
return LargeUpload;
|
|
712
|
+
}();
|
|
713
|
+
function _useWorker2(file) {
|
|
714
|
+
var _this2 = this;
|
|
715
|
+
return new Promise(function (resolve) {
|
|
716
|
+
// const worker = new Worker(new URL("./hash-worker.js", import.meta.url), {
|
|
717
|
+
// type: "module",
|
|
718
|
+
// });
|
|
719
|
+
var worker = new Worker(__webpack__worker__0, undefined);
|
|
720
|
+
worker.postMessage({
|
|
721
|
+
file: file,
|
|
722
|
+
chunkSize: _this2.chunkSize
|
|
723
|
+
});
|
|
724
|
+
worker.onmessage = function (e) {
|
|
725
|
+
var _e$data = e.data,
|
|
726
|
+
fileHash = _e$data.fileHash,
|
|
727
|
+
fileChunkList = _e$data.fileChunkList;
|
|
728
|
+
if (fileHash) {
|
|
729
|
+
resolve({
|
|
730
|
+
fileHash: fileHash,
|
|
731
|
+
fileChunkList: fileChunkList
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
function _finishTask2() {
|
|
738
|
+
// 200是上传完成
|
|
739
|
+
// this.fileObj.state = 200;
|
|
740
|
+
if (typeof this.onUploadProgress === "function") {
|
|
741
|
+
this.onUploadProgress({
|
|
742
|
+
percentage: 100
|
|
743
|
+
});
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
this.fileObj.percentage = 100;
|
|
747
|
+
}
|
|
748
|
+
function _handleMerge2() {
|
|
749
|
+
return _handleMerge3.apply(this, arguments);
|
|
750
|
+
}
|
|
751
|
+
function _handleMerge3() {
|
|
752
|
+
_handleMerge3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
753
|
+
var _this$fileObj, fileName, fileHash, fsign, fileSize, busiType, res;
|
|
754
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
755
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
756
|
+
case 0:
|
|
757
|
+
_this$fileObj = this.fileObj, fileName = _this$fileObj.fileName, fileHash = _this$fileObj.fileHash, fsign = _this$fileObj.fsign, fileSize = _this$fileObj.fileSize, busiType = _this$fileObj.busiType;
|
|
758
|
+
_context4.prev = 1;
|
|
759
|
+
_context4.next = 4;
|
|
760
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* mergeChunk */ "b"])({
|
|
761
|
+
fileName: fileName,
|
|
762
|
+
fileHash: fileHash,
|
|
763
|
+
fsign: fsign,
|
|
764
|
+
fileSize: fileSize,
|
|
765
|
+
busiType: busiType
|
|
766
|
+
}, {
|
|
767
|
+
service: this.request
|
|
768
|
+
});
|
|
769
|
+
case 4:
|
|
770
|
+
res = _context4.sent;
|
|
771
|
+
// 设置文件上传状态
|
|
772
|
+
_classPrivateFieldLooseBase(this, _finishTask)[_finishTask]();
|
|
773
|
+
console.log("文件合并成功!");
|
|
774
|
+
// 最后赋值文件切片上传完成个数为0
|
|
775
|
+
this.fileObj.finishNumber = 0;
|
|
776
|
+
this.onUploadFinish(res);
|
|
777
|
+
return _context4.abrupt("return", res);
|
|
778
|
+
case 12:
|
|
779
|
+
_context4.prev = 12;
|
|
780
|
+
_context4.t0 = _context4["catch"](1);
|
|
781
|
+
this.pauseUpload(false, _context4.t0);
|
|
782
|
+
console.log("文件合并失败!");
|
|
783
|
+
// 最后赋值文件切片上传完成个数为0
|
|
784
|
+
this.fileObj.finishNumber = 0;
|
|
785
|
+
this.onUploadError(_context4.t0);
|
|
786
|
+
return _context4.abrupt("return", null);
|
|
787
|
+
case 19:
|
|
788
|
+
case "end":
|
|
789
|
+
return _context4.stop();
|
|
790
|
+
}
|
|
791
|
+
}, _callee4, this, [[1, 12]]);
|
|
792
|
+
}));
|
|
793
|
+
return _handleMerge3.apply(this, arguments);
|
|
794
|
+
}
|
|
795
|
+
function _signleFileProgress2(needObj) {
|
|
796
|
+
// 即使是超时请求也是会频繁的返回上传进度的,所以只能写成完成一片就添加它所占百分之多少,否则会造成误会
|
|
797
|
+
var percentage = Number((this.fileObj.finishNumber / needObj.chunkNumber * 100).toFixed(2));
|
|
798
|
+
if (typeof this.onUploadProgress === "function") {
|
|
799
|
+
this.onUploadProgress({
|
|
800
|
+
percentage: percentage
|
|
801
|
+
});
|
|
802
|
+
return false;
|
|
803
|
+
}
|
|
804
|
+
this.fileObj.percentage = percentage;
|
|
805
|
+
}
|
|
806
|
+
function _uploadSignleFile2() {
|
|
807
|
+
var _this$fileObj$whileRe,
|
|
808
|
+
_this3 = this;
|
|
809
|
+
// 如果没有需要上传的切片 / 正在上传的切片还没传完,就不做处理
|
|
810
|
+
if (this.fileObj.allChunkList.length === 0 || this.fileObj.whileRequests.length > 0) {
|
|
811
|
+
return false;
|
|
812
|
+
}
|
|
813
|
+
// 找到文件处于处理中/上传中的 文件列表(是文件而不是切片)
|
|
814
|
+
var isTaskArrIng = this.uploadFileList.filter(function (itemB) {
|
|
815
|
+
return itemB.state === 10 || itemB.state === 100;
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
// 实时动态获取并发请求数,每次调请求前都获取一次最大并发数
|
|
819
|
+
// 浏览器同域名同一时间请求的最大并发数限制为6
|
|
820
|
+
// 例如如果有3个文件同时上传/处理中,则每个文件切片接口最多调 6 / 3 == 2个相同的接口
|
|
821
|
+
this.maxRequest = Math.ceil(this.batchMaxCount / isTaskArrIng.length);
|
|
822
|
+
|
|
823
|
+
// 从数组的末尾开始提取 maxRequest 个元素。
|
|
824
|
+
var whileRequest = this.fileObj.allChunkList.slice(-this.maxRequest);
|
|
825
|
+
|
|
826
|
+
// 设置正在请求中的个数
|
|
827
|
+
(_this$fileObj$whileRe = this.fileObj.whileRequests).push.apply(_this$fileObj$whileRe, whileRequest);
|
|
828
|
+
// 如果总请求数大于并发数
|
|
829
|
+
if (this.fileObj.allChunkList.length > this.maxRequest) {
|
|
830
|
+
// 则减去并发数
|
|
831
|
+
this.fileObj.allChunkList.splice(-this.maxRequest);
|
|
832
|
+
} else {
|
|
833
|
+
// 否则总请求数置空,说明已经把没请求的全部放进请求列表了,不需要做过多请求
|
|
834
|
+
this.fileObj.allChunkList = [];
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// 单个分片请求
|
|
838
|
+
var uploadChunk = /*#__PURE__*/function () {
|
|
839
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(needObj) {
|
|
840
|
+
var fd, fileHash, fileSize, fileName, index, chunkFile, chunkHash, chunkSize, chunkNumber;
|
|
841
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
842
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
843
|
+
case 0:
|
|
844
|
+
fd = new FormData();
|
|
845
|
+
fileHash = needObj.fileHash, fileSize = needObj.fileSize, fileName = needObj.fileName, index = needObj.index, chunkFile = needObj.chunkFile, chunkHash = needObj.chunkHash, chunkSize = needObj.chunkSize, chunkNumber = needObj.chunkNumber;
|
|
846
|
+
fd.append("fileHash", fileHash);
|
|
847
|
+
fd.append("fileSize", String(fileSize));
|
|
848
|
+
fd.append("fileName", fileName);
|
|
849
|
+
fd.append("index", String(index));
|
|
850
|
+
fd.append("chunkFile", chunkFile);
|
|
851
|
+
fd.append("chunkHash", chunkHash);
|
|
852
|
+
fd.append("chunkSize", String(chunkSize));
|
|
853
|
+
fd.append("chunkNumber", String(chunkNumber));
|
|
854
|
+
fd.append("fileMd5", fileHash);
|
|
855
|
+
fd.append("chunkIndex", String(index));
|
|
856
|
+
_context3.prev = 12;
|
|
857
|
+
_context3.next = 15;
|
|
858
|
+
return Object(_remote_js__WEBPACK_IMPORTED_MODULE_0__[/* uploadFile */ "c"])(fd, {
|
|
859
|
+
onCancel: function onCancel(onCancelFunc) {
|
|
860
|
+
// 在调用接口的同时,相当于同时调用了传入的这个函数,又能同时拿到返回的取消方法去赋值
|
|
861
|
+
needObj.cancel = onCancelFunc;
|
|
862
|
+
},
|
|
863
|
+
service: _this3.request
|
|
864
|
+
});
|
|
865
|
+
case 15:
|
|
866
|
+
if (!(_this3.fileObj.state === 30 || _this3.fileObj.state === 50)) {
|
|
867
|
+
_context3.next = 17;
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
return _context3.abrupt("return", false);
|
|
871
|
+
case 17:
|
|
872
|
+
// 单个文件上传失败次数大于0则要减少一个
|
|
873
|
+
_this3.fileObj.errNumber > 0 ? _this3.fileObj.errNumber-- : 0;
|
|
874
|
+
// 单个文件切片上传成功数+1
|
|
875
|
+
_this3.fileObj.finishNumber++;
|
|
876
|
+
// 单个切片上传完成
|
|
877
|
+
needObj.finish = true;
|
|
878
|
+
_classPrivateFieldLooseBase(_this3, _signleFileProgress)[_signleFileProgress](needObj); // 更新进度条
|
|
879
|
+
// 上传成功了就删掉请求中数组中的那一片请求
|
|
880
|
+
_this3.fileObj.whileRequests = _this3.fileObj.whileRequests.filter(function (item) {
|
|
881
|
+
return item.chunkFile !== needObj.chunkFile;
|
|
882
|
+
});
|
|
883
|
+
// 如果单个文件最终成功数等于切片个数
|
|
884
|
+
if (_this3.fileObj.finishNumber === chunkNumber) {
|
|
885
|
+
// 全部上传完切片后就开始合并切片
|
|
886
|
+
_classPrivateFieldLooseBase(_this3, _handleMerge)[_handleMerge]();
|
|
887
|
+
} else {
|
|
888
|
+
// 如果还没完全上传完,则继续上传
|
|
889
|
+
_classPrivateFieldLooseBase(_this3, _uploadSignleFile)[_uploadSignleFile]();
|
|
890
|
+
}
|
|
891
|
+
_context3.next = 30;
|
|
892
|
+
break;
|
|
893
|
+
case 25:
|
|
894
|
+
_context3.prev = 25;
|
|
895
|
+
_context3.t0 = _context3["catch"](12);
|
|
896
|
+
// 请求异常,或者请求成功服务端返回报错都按单片上传失败逻辑处理,.then.catch的.catch是只能捕捉请求异常的
|
|
897
|
+
_this3.fileObj.errNumber++;
|
|
898
|
+
// 超过3次之后直接上传中断
|
|
899
|
+
if (_this3.fileObj.errNumber > 3) {
|
|
900
|
+
console.log("切片上传失败超过三次了");
|
|
901
|
+
_this3.pauseUpload(false, _context3.t0); // 上传中断
|
|
902
|
+
} else {
|
|
903
|
+
console.log("切片上传失败还没超过3次");
|
|
904
|
+
uploadChunk(needObj); // 失败了一片,继续当前分片请求
|
|
905
|
+
}
|
|
906
|
+
return _context3.abrupt("return", false);
|
|
907
|
+
case 30:
|
|
908
|
+
case "end":
|
|
909
|
+
return _context3.stop();
|
|
910
|
+
}
|
|
911
|
+
}, _callee3, null, [[12, 25]]);
|
|
912
|
+
}));
|
|
913
|
+
return function uploadChunk(_x) {
|
|
914
|
+
return _ref.apply(this, arguments);
|
|
915
|
+
};
|
|
916
|
+
}();
|
|
917
|
+
// 开始单个上传
|
|
918
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(whileRequest), _step2; !(_step2 = _iterator2()).done;) {
|
|
919
|
+
var item = _step2.value;
|
|
920
|
+
uploadChunk(item);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(64)))
|
|
925
|
+
|
|
926
|
+
/***/ }),
|
|
927
|
+
/* 43 */
|
|
928
|
+
/***/ (function(module, exports) {
|
|
929
|
+
|
|
930
|
+
module.exports = require("js-md5");
|
|
931
|
+
|
|
932
|
+
/***/ }),
|
|
933
|
+
/* 44 */
|
|
336
934
|
/***/ (function(module, exports) {
|
|
337
935
|
|
|
338
936
|
module.exports = require("element-ui/lib/switch");
|
|
339
937
|
|
|
340
938
|
/***/ }),
|
|
341
|
-
/*
|
|
939
|
+
/* 45 */
|
|
342
940
|
/***/ (function(module, exports) {
|
|
343
941
|
|
|
344
942
|
module.exports = require("element-ui/lib/slider");
|
|
345
943
|
|
|
346
944
|
/***/ }),
|
|
347
|
-
/*
|
|
945
|
+
/* 46 */
|
|
348
946
|
/***/ (function(module, exports) {
|
|
349
947
|
|
|
350
948
|
module.exports = require("element-ui/lib/transfer");
|
|
351
949
|
|
|
352
950
|
/***/ }),
|
|
353
|
-
/*
|
|
951
|
+
/* 47 */
|
|
354
952
|
/***/ (function(module, exports) {
|
|
355
953
|
|
|
356
954
|
module.exports = require("element-ui/lib/time-picker");
|
|
357
955
|
|
|
358
956
|
/***/ }),
|
|
359
|
-
/*
|
|
957
|
+
/* 48 */
|
|
360
958
|
/***/ (function(module, exports) {
|
|
361
959
|
|
|
362
960
|
module.exports = require("element-ui/lib/upload");
|
|
363
961
|
|
|
364
962
|
/***/ }),
|
|
365
|
-
/*
|
|
963
|
+
/* 49 */
|
|
366
964
|
/***/ (function(module, exports) {
|
|
367
965
|
|
|
368
966
|
module.exports = require("element-ui/lib/form-item");
|
|
369
967
|
|
|
370
968
|
/***/ }),
|
|
371
|
-
/*
|
|
969
|
+
/* 50 */
|
|
372
970
|
/***/ (function(module, exports) {
|
|
373
971
|
|
|
374
972
|
module.exports = require("element-ui/lib/descriptions");
|
|
375
973
|
|
|
376
974
|
/***/ }),
|
|
377
|
-
/*
|
|
975
|
+
/* 51 */
|
|
378
976
|
/***/ (function(module, exports) {
|
|
379
977
|
|
|
380
978
|
module.exports = require("element-ui/lib/descriptions-item");
|
|
381
979
|
|
|
382
980
|
/***/ }),
|
|
383
|
-
/*
|
|
981
|
+
/* 52 */
|
|
384
982
|
/***/ (function(module, exports) {
|
|
385
983
|
|
|
386
984
|
module.exports = require("element-ui/lib/pagination");
|
|
387
985
|
|
|
388
986
|
/***/ }),
|
|
389
|
-
/*
|
|
987
|
+
/* 53 */
|
|
390
988
|
/***/ (function(module, exports) {
|
|
391
989
|
|
|
392
990
|
module.exports = require("element-ui/lib/dropdown");
|
|
393
991
|
|
|
394
992
|
/***/ }),
|
|
395
|
-
/*
|
|
993
|
+
/* 54 */
|
|
396
994
|
/***/ (function(module, exports) {
|
|
397
995
|
|
|
398
996
|
module.exports = require("element-ui/lib/dropdown-item");
|
|
399
997
|
|
|
400
998
|
/***/ }),
|
|
401
|
-
/*
|
|
999
|
+
/* 55 */
|
|
402
1000
|
/***/ (function(module, exports) {
|
|
403
1001
|
|
|
404
1002
|
module.exports = require("element-ui/lib/dropdown-menu");
|
|
405
1003
|
|
|
406
1004
|
/***/ }),
|
|
407
|
-
/*
|
|
1005
|
+
/* 56 */
|
|
408
1006
|
/***/ (function(module, exports) {
|
|
409
1007
|
|
|
410
1008
|
module.exports = require("@panpanzhao/component-ui/lib/components/form-query");
|
|
411
1009
|
|
|
412
1010
|
/***/ }),
|
|
413
|
-
/*
|
|
1011
|
+
/* 57 */
|
|
414
1012
|
/***/ (function(module, exports) {
|
|
415
1013
|
|
|
416
1014
|
module.exports = require("@panpanzhao/component-ui/lib/components/table");
|
|
417
1015
|
|
|
418
1016
|
/***/ }),
|
|
419
|
-
/*
|
|
1017
|
+
/* 58 */
|
|
420
1018
|
/***/ (function(module, exports) {
|
|
421
1019
|
|
|
422
1020
|
module.exports = require("element-ui/lib/popover");
|
|
423
1021
|
|
|
424
1022
|
/***/ }),
|
|
425
|
-
/*
|
|
1023
|
+
/* 59 */
|
|
426
1024
|
/***/ (function(module, exports) {
|
|
427
1025
|
|
|
428
1026
|
module.exports = require("async-validator");
|
|
429
1027
|
|
|
430
1028
|
/***/ }),
|
|
431
|
-
/*
|
|
1029
|
+
/* 60 */
|
|
432
1030
|
/***/ (function(module, exports) {
|
|
433
1031
|
|
|
434
1032
|
module.exports = require("element-ui/lib/tree");
|
|
435
1033
|
|
|
436
1034
|
/***/ }),
|
|
437
|
-
/*
|
|
1035
|
+
/* 61 */
|
|
438
1036
|
/***/ (function(module, exports) {
|
|
439
1037
|
|
|
440
1038
|
module.exports = require("element-ui/lib/badge");
|
|
441
1039
|
|
|
442
1040
|
/***/ }),
|
|
443
|
-
/*
|
|
1041
|
+
/* 62 */
|
|
444
1042
|
/***/ (function(module, exports) {
|
|
445
1043
|
|
|
446
1044
|
module.exports = require("element-ui/lib/mixins/migrating");
|
|
447
1045
|
|
|
448
1046
|
/***/ }),
|
|
449
|
-
/*
|
|
1047
|
+
/* 63 */
|
|
450
1048
|
/***/ (function(module, exports, __webpack_require__) {
|
|
451
1049
|
|
|
452
|
-
module.exports = __webpack_require__(
|
|
1050
|
+
module.exports = __webpack_require__(69);
|
|
453
1051
|
|
|
454
1052
|
|
|
455
1053
|
/***/ }),
|
|
456
|
-
/*
|
|
1054
|
+
/* 64 */
|
|
1055
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1056
|
+
|
|
1057
|
+
module.exports = __webpack_require__.p + "0.worker.js"
|
|
1058
|
+
|
|
1059
|
+
/***/ }),
|
|
1060
|
+
/* 65 */
|
|
457
1061
|
/***/ (function(module, exports) {
|
|
458
1062
|
|
|
459
1063
|
module.exports = require("codemirror/mode/javascript/javascript");
|
|
460
1064
|
|
|
461
1065
|
/***/ }),
|
|
462
|
-
/*
|
|
1066
|
+
/* 66 */
|
|
463
1067
|
/***/ (function(module, exports) {
|
|
464
1068
|
|
|
465
1069
|
module.exports = require("codemirror/mode/htmlmixed/htmlmixed");
|
|
466
1070
|
|
|
467
1071
|
/***/ }),
|
|
468
|
-
/*
|
|
1072
|
+
/* 67 */
|
|
469
1073
|
/***/ (function(module, exports) {
|
|
470
1074
|
|
|
471
1075
|
module.exports = require("codemirror/addon/mode/simple");
|
|
472
1076
|
|
|
473
1077
|
/***/ }),
|
|
474
|
-
/*
|
|
1078
|
+
/* 68 */
|
|
475
1079
|
/***/ (function(module, exports) {
|
|
476
1080
|
|
|
477
1081
|
module.exports = require("codemirror/addon/mode/multiplex");
|
|
478
1082
|
|
|
479
1083
|
/***/ }),
|
|
480
|
-
/*
|
|
1084
|
+
/* 69 */
|
|
481
1085
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
482
1086
|
|
|
483
1087
|
"use strict";
|
|
@@ -1068,7 +1672,7 @@ InputNumbervue_type_template_id_6c463d52_render._withStripped = true
|
|
|
1068
1672
|
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=6c463d52
|
|
1069
1673
|
|
|
1070
1674
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
1071
|
-
var input_number_ = __webpack_require__(
|
|
1675
|
+
var input_number_ = __webpack_require__(31);
|
|
1072
1676
|
var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
1073
1677
|
|
|
1074
1678
|
// 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
|
|
@@ -1111,15 +1715,15 @@ var InputNumber_component = normalizeComponent(
|
|
|
1111
1715
|
|
|
1112
1716
|
/* harmony default export */ var InputNumber = (InputNumber_component.exports);
|
|
1113
1717
|
// EXTERNAL MODULE: external "element-ui/lib/select"
|
|
1114
|
-
var select_ = __webpack_require__(
|
|
1718
|
+
var select_ = __webpack_require__(32);
|
|
1115
1719
|
var select_default = /*#__PURE__*/__webpack_require__.n(select_);
|
|
1116
1720
|
|
|
1117
1721
|
// EXTERNAL MODULE: external "element-ui/lib/option"
|
|
1118
|
-
var option_ = __webpack_require__(
|
|
1722
|
+
var option_ = __webpack_require__(33);
|
|
1119
1723
|
var option_default = /*#__PURE__*/__webpack_require__.n(option_);
|
|
1120
1724
|
|
|
1121
1725
|
// EXTERNAL MODULE: external "element-ui/lib/option-group"
|
|
1122
|
-
var option_group_ = __webpack_require__(
|
|
1726
|
+
var option_group_ = __webpack_require__(34);
|
|
1123
1727
|
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
|
|
1124
1728
|
|
|
1125
1729
|
// 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
|
|
@@ -1215,7 +1819,7 @@ SelectTreevue_type_template_id_0f44d547_render._withStripped = true
|
|
|
1215
1819
|
// CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=0f44d547
|
|
1216
1820
|
|
|
1217
1821
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/tree-line"
|
|
1218
|
-
var tree_line_ = __webpack_require__(
|
|
1822
|
+
var tree_line_ = __webpack_require__(35);
|
|
1219
1823
|
var tree_line_default = /*#__PURE__*/__webpack_require__.n(tree_line_);
|
|
1220
1824
|
|
|
1221
1825
|
// 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
|
|
@@ -1546,6 +2150,7 @@ var SelectTree_component = normalizeComponent(
|
|
|
1546
2150
|
}
|
|
1547
2151
|
return Object.assign({
|
|
1548
2152
|
clearable: true,
|
|
2153
|
+
filterable: true,
|
|
1549
2154
|
placeholder: "请选择"
|
|
1550
2155
|
}, this.$attrs, {
|
|
1551
2156
|
value: _value
|
|
@@ -1750,7 +2355,7 @@ var Select_component = normalizeComponent(
|
|
|
1750
2355
|
|
|
1751
2356
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1752
2357
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1753
|
-
var radio_group_ = __webpack_require__(
|
|
2358
|
+
var radio_group_ = __webpack_require__(36);
|
|
1754
2359
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1755
2360
|
|
|
1756
2361
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
@@ -1758,7 +2363,7 @@ var radio_ = __webpack_require__(22);
|
|
|
1758
2363
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1759
2364
|
|
|
1760
2365
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1761
|
-
var radio_button_ = __webpack_require__(
|
|
2366
|
+
var radio_button_ = __webpack_require__(37);
|
|
1762
2367
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1763
2368
|
|
|
1764
2369
|
// 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
|
|
@@ -1953,15 +2558,15 @@ var Radio_component = normalizeComponent(
|
|
|
1953
2558
|
|
|
1954
2559
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1955
2560
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1956
|
-
var checkbox_group_ = __webpack_require__(
|
|
2561
|
+
var checkbox_group_ = __webpack_require__(38);
|
|
1957
2562
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1958
2563
|
|
|
1959
2564
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1960
|
-
var checkbox_ = __webpack_require__(
|
|
2565
|
+
var checkbox_ = __webpack_require__(39);
|
|
1961
2566
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1962
2567
|
|
|
1963
2568
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1964
|
-
var checkbox_button_ = __webpack_require__(
|
|
2569
|
+
var checkbox_button_ = __webpack_require__(40);
|
|
1965
2570
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1966
2571
|
|
|
1967
2572
|
// 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
|
|
@@ -2676,7 +3281,7 @@ var CascaderAddr_component = normalizeComponent(
|
|
|
2676
3281
|
|
|
2677
3282
|
/* harmony default export */ var CascaderAddr = (CascaderAddr_component.exports);
|
|
2678
3283
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
2679
|
-
var date_picker_ = __webpack_require__(
|
|
3284
|
+
var date_picker_ = __webpack_require__(41);
|
|
2680
3285
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
2681
3286
|
|
|
2682
3287
|
// 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
|
|
@@ -2778,13 +3383,16 @@ var DatePicker_component = normalizeComponent(
|
|
|
2778
3383
|
)
|
|
2779
3384
|
|
|
2780
3385
|
/* harmony default export */ var DatePicker = (DatePicker_component.exports);
|
|
2781
|
-
// 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/
|
|
2782
|
-
var
|
|
3386
|
+
// 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
|
|
3387
|
+
var upload_processvue_type_template_id_b7318202_render = function render() {
|
|
2783
3388
|
var _vm = this,
|
|
2784
3389
|
_c = _vm._self._c
|
|
2785
3390
|
return _c(
|
|
2786
3391
|
"div",
|
|
2787
|
-
{
|
|
3392
|
+
{
|
|
3393
|
+
staticClass: "upload-process",
|
|
3394
|
+
class: { "upload-process__readonly": _vm.isReadonly },
|
|
3395
|
+
},
|
|
2788
3396
|
[
|
|
2789
3397
|
_c(
|
|
2790
3398
|
"el-upload",
|
|
@@ -2806,7 +3414,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2806
3414
|
},
|
|
2807
3415
|
[_vm._v("选取文件")]
|
|
2808
3416
|
)
|
|
2809
|
-
:
|
|
3417
|
+
: _c("div", { attrs: { slot: "trigger" }, slot: "trigger" }),
|
|
2810
3418
|
!_vm.isReadonly && !_vm.autoUpload && _vm.uploadButton
|
|
2811
3419
|
? _c(
|
|
2812
3420
|
"span",
|
|
@@ -2874,10 +3482,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2874
3482
|
_vm._l(_vm.fileList, function (file, index) {
|
|
2875
3483
|
return _c(
|
|
2876
3484
|
"li",
|
|
2877
|
-
{
|
|
2878
|
-
key: file.uid || index,
|
|
2879
|
-
staticClass: "file-list__item is-success",
|
|
2880
|
-
},
|
|
3485
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2881
3486
|
[
|
|
2882
3487
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2883
3488
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2906,7 +3511,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2906
3511
|
staticClass: "el-icon-success",
|
|
2907
3512
|
staticStyle: { color: "#67c23a" },
|
|
2908
3513
|
})
|
|
2909
|
-
: file.state === 500
|
|
3514
|
+
: file.state === 500 || file.state === 50
|
|
2910
3515
|
? _c("i", {
|
|
2911
3516
|
staticClass: "el-icon-warning",
|
|
2912
3517
|
staticStyle: { color: "#f56c6c !important" },
|
|
@@ -2934,6 +3539,23 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2934
3539
|
},
|
|
2935
3540
|
})
|
|
2936
3541
|
: _vm._e(),
|
|
3542
|
+
file.state === 200
|
|
3543
|
+
? _c("el-button", {
|
|
3544
|
+
attrs: {
|
|
3545
|
+
type: "primary",
|
|
3546
|
+
circle: "",
|
|
3547
|
+
icon: "el-icon-download",
|
|
3548
|
+
size: "mini",
|
|
3549
|
+
title: "下载",
|
|
3550
|
+
},
|
|
3551
|
+
on: {
|
|
3552
|
+
click: function ($event) {
|
|
3553
|
+
$event.stopPropagation()
|
|
3554
|
+
return _vm.handDownLoad(file)
|
|
3555
|
+
},
|
|
3556
|
+
},
|
|
3557
|
+
})
|
|
3558
|
+
: _vm._e(),
|
|
2937
3559
|
file.state === 500
|
|
2938
3560
|
? _c("el-button", {
|
|
2939
3561
|
attrs: {
|
|
@@ -2951,7 +3573,24 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2951
3573
|
},
|
|
2952
3574
|
})
|
|
2953
3575
|
: _vm._e(),
|
|
2954
|
-
file.state ===
|
|
3576
|
+
file.state === 50
|
|
3577
|
+
? _c("el-button", {
|
|
3578
|
+
attrs: {
|
|
3579
|
+
type: "primary",
|
|
3580
|
+
circle: "",
|
|
3581
|
+
icon: "el-icon-upload",
|
|
3582
|
+
size: "mini",
|
|
3583
|
+
title: "继续上传",
|
|
3584
|
+
},
|
|
3585
|
+
on: {
|
|
3586
|
+
click: function ($event) {
|
|
3587
|
+
$event.stopPropagation()
|
|
3588
|
+
return _vm.handResumeUpload(file)
|
|
3589
|
+
},
|
|
3590
|
+
},
|
|
3591
|
+
})
|
|
3592
|
+
: _vm._e(),
|
|
3593
|
+
file.state === 500 || file.state === 50
|
|
2955
3594
|
? _c("el-button", {
|
|
2956
3595
|
attrs: {
|
|
2957
3596
|
type: "warning",
|
|
@@ -2998,10 +3637,7 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
2998
3637
|
_vm._l(_vm.pendingFileList, function (file, index) {
|
|
2999
3638
|
return _c(
|
|
3000
3639
|
"li",
|
|
3001
|
-
{
|
|
3002
|
-
key: file.uid || index,
|
|
3003
|
-
staticClass: "file-list__item is-success",
|
|
3004
|
-
},
|
|
3640
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
3005
3641
|
[
|
|
3006
3642
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
3007
3643
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -3048,11 +3684,11 @@ var UploadProcessvue_type_template_id_080e65b0_render = function render() {
|
|
|
3048
3684
|
1
|
|
3049
3685
|
)
|
|
3050
3686
|
}
|
|
3051
|
-
var
|
|
3052
|
-
|
|
3687
|
+
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3688
|
+
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
3053
3689
|
|
|
3054
3690
|
|
|
3055
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3691
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
3056
3692
|
|
|
3057
3693
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
3058
3694
|
var message_ = __webpack_require__(6);
|
|
@@ -3062,10 +3698,14 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
3062
3698
|
var message_box_ = __webpack_require__(8);
|
|
3063
3699
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
3064
3700
|
|
|
3065
|
-
//
|
|
3701
|
+
// EXTERNAL MODULE: ./src/components/form/src/item/upload-process/large-upload/index.js
|
|
3702
|
+
var large_upload = __webpack_require__(42);
|
|
3703
|
+
|
|
3704
|
+
// 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
|
|
3066
3705
|
|
|
3067
3706
|
|
|
3068
|
-
|
|
3707
|
+
|
|
3708
|
+
/* harmony default export */ var upload_processvue_type_script_lang_js = ({
|
|
3069
3709
|
name: "UploadProcess",
|
|
3070
3710
|
components: {},
|
|
3071
3711
|
props: {
|
|
@@ -3108,10 +3748,30 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3108
3748
|
type: Number,
|
|
3109
3749
|
default: 0
|
|
3110
3750
|
},
|
|
3751
|
+
limit: {
|
|
3752
|
+
type: Number,
|
|
3753
|
+
default: null
|
|
3754
|
+
},
|
|
3755
|
+
useLarge: {
|
|
3756
|
+
type: Boolean,
|
|
3757
|
+
default: false
|
|
3758
|
+
},
|
|
3759
|
+
largeSize: {
|
|
3760
|
+
type: Number,
|
|
3761
|
+
default: 1 * 1024 * 1024
|
|
3762
|
+
},
|
|
3763
|
+
largeChunkSize: {
|
|
3764
|
+
type: Number,
|
|
3765
|
+
default: 1 * 1024 * 1024
|
|
3766
|
+
},
|
|
3767
|
+
busiType: {
|
|
3768
|
+
type: String,
|
|
3769
|
+
default: ""
|
|
3770
|
+
},
|
|
3111
3771
|
// 批量上传最大数 0表示不批量上传
|
|
3112
3772
|
batchMaxCount: {
|
|
3113
3773
|
type: Number,
|
|
3114
|
-
default:
|
|
3774
|
+
default: 6
|
|
3115
3775
|
},
|
|
3116
3776
|
//是否自动上传
|
|
3117
3777
|
autoUpload: {
|
|
@@ -3145,28 +3805,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3145
3805
|
},
|
|
3146
3806
|
watch: {
|
|
3147
3807
|
value: function value(val) {
|
|
3148
|
-
|
|
3149
|
-
if (val && val[0] === null) {
|
|
3150
|
-
this.fileValue = [];
|
|
3151
|
-
this.fileList = [];
|
|
3152
|
-
this.$emit("input", this.fileValue);
|
|
3153
|
-
}
|
|
3154
|
-
if (val === this.fileValue) {
|
|
3155
|
-
return false;
|
|
3156
|
-
}
|
|
3157
|
-
this.fileValue = [];
|
|
3158
|
-
this.fileList = [];
|
|
3159
|
-
if (val && val.length) {
|
|
3160
|
-
var _this$fileValue, _this$fileList;
|
|
3161
|
-
var valList = this.value.map(function (item) {
|
|
3162
|
-
item.state = 200;
|
|
3163
|
-
item.percentage = 100; // 进度条
|
|
3164
|
-
item.name = item.fileName;
|
|
3165
|
-
return item;
|
|
3166
|
-
});
|
|
3167
|
-
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
3168
|
-
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
3169
|
-
}
|
|
3808
|
+
this.setValue(val);
|
|
3170
3809
|
}
|
|
3171
3810
|
},
|
|
3172
3811
|
computed: {
|
|
@@ -3175,6 +3814,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3175
3814
|
action: this.api.url,
|
|
3176
3815
|
headers: this.api.headers,
|
|
3177
3816
|
data: this.api.data,
|
|
3817
|
+
limit: this.limit,
|
|
3178
3818
|
multiple: true,
|
|
3179
3819
|
accept: ".doc,.docx,.ppt,.pptx,.xls,.xlsx,.pot,.pps,.vsd,.rtf,.wps,.et,.dps,.pdf,.txt,.jpg,.png,.jpeg,.jif,.zip,.rar,.gif,.mp4"
|
|
3180
3820
|
}, this.$attrs, {
|
|
@@ -3202,13 +3842,13 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3202
3842
|
// 上传中
|
|
3203
3843
|
uploadingFiles: function uploadingFiles() {
|
|
3204
3844
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3205
|
-
return item.state === 100;
|
|
3845
|
+
return item.state === 100 || item.state === 10 || item.state === 30;
|
|
3206
3846
|
});
|
|
3207
3847
|
},
|
|
3208
3848
|
// 上传处理完成(成功加失败)
|
|
3209
3849
|
finishFiles: function finishFiles() {
|
|
3210
3850
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3211
|
-
return item.state === 200 || item.state === 500;
|
|
3851
|
+
return item.state === 200 || item.state === 500 || item.state === 50;
|
|
3212
3852
|
});
|
|
3213
3853
|
},
|
|
3214
3854
|
// 上传成功
|
|
@@ -3220,7 +3860,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3220
3860
|
// 上传失败
|
|
3221
3861
|
errorFiles: function errorFiles() {
|
|
3222
3862
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3223
|
-
return item.state === 500;
|
|
3863
|
+
return item.state === 500 || item.state === 50;
|
|
3224
3864
|
});
|
|
3225
3865
|
},
|
|
3226
3866
|
isReadonly: function isReadonly() {
|
|
@@ -3237,6 +3877,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3237
3877
|
* id: 唯一编码
|
|
3238
3878
|
* name: 文件名称
|
|
3239
3879
|
* state: 0待上传 100上传中 200上传成功 500上传失败
|
|
3880
|
+
* 大文件特有状态 10文件处理中,30是暂停,50上传中断
|
|
3240
3881
|
* percentage: 上传进度 数字 100表示100%
|
|
3241
3882
|
* errorMsg: 错误信息
|
|
3242
3883
|
* size: 文件大小
|
|
@@ -3265,17 +3906,39 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3265
3906
|
// eslint-disable-next-line vue/no-mutating-props
|
|
3266
3907
|
this.extend.that = this;
|
|
3267
3908
|
}
|
|
3268
|
-
|
|
3269
|
-
var _this$fileList2;
|
|
3270
|
-
(_this$fileList2 = this.fileList).push.apply(_this$fileList2, this.value.map(function (item) {
|
|
3271
|
-
item.state = 200;
|
|
3272
|
-
item.percentage = 100; // 进度条
|
|
3273
|
-
item.name = item.fileName;
|
|
3274
|
-
return item;
|
|
3275
|
-
}));
|
|
3276
|
-
}
|
|
3909
|
+
this.setValue(this.value);
|
|
3277
3910
|
},
|
|
3278
3911
|
methods: {
|
|
3912
|
+
setValue: function setValue(val) {
|
|
3913
|
+
if (!val) {
|
|
3914
|
+
return false;
|
|
3915
|
+
}
|
|
3916
|
+
// 解决重置第一个元素为null
|
|
3917
|
+
if (val && val[0] === null) {
|
|
3918
|
+
this.fileValue = [];
|
|
3919
|
+
this.fileList = [];
|
|
3920
|
+
this.$emit("input", this.fileValue);
|
|
3921
|
+
}
|
|
3922
|
+
if (val === this.fileValue) {
|
|
3923
|
+
return false;
|
|
3924
|
+
}
|
|
3925
|
+
this.fileValue = [];
|
|
3926
|
+
this.fileList = [];
|
|
3927
|
+
if (val && val.length) {
|
|
3928
|
+
var _this$value, _this$fileValue, _this$fileList;
|
|
3929
|
+
var valList = (_this$value = this.value) == null ? void 0 : _this$value.map(function (item) {
|
|
3930
|
+
if (!item) {
|
|
3931
|
+
return item;
|
|
3932
|
+
}
|
|
3933
|
+
item.state = 200;
|
|
3934
|
+
item.percentage = 100; // 进度条
|
|
3935
|
+
item.name = item.fileName;
|
|
3936
|
+
return item;
|
|
3937
|
+
});
|
|
3938
|
+
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
3939
|
+
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
3940
|
+
}
|
|
3941
|
+
},
|
|
3279
3942
|
removeSpecialCharacters: function removeSpecialCharacters(filename) {
|
|
3280
3943
|
// 定义正则表达式,匹配除了字母、数字、下划线、空格和点号之外的所有字符
|
|
3281
3944
|
var pattern = /[^\w\u4e00-\u9fa5.]/gi;
|
|
@@ -3298,8 +3961,8 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3298
3961
|
}).indexOf(file.fileId);
|
|
3299
3962
|
_this.fileValue.splice(indexVal, 1);
|
|
3300
3963
|
_this.$emit("input", _this.fileValue);
|
|
3301
|
-
} else if (file.state === 100) {
|
|
3302
|
-
file.cancel && file.cancel(
|
|
3964
|
+
} else if (file.state === 100 || file.state === 10 || file.state === 30) {
|
|
3965
|
+
file.cancel && file.cancel();
|
|
3303
3966
|
}
|
|
3304
3967
|
}).catch(function () {});
|
|
3305
3968
|
},
|
|
@@ -3313,6 +3976,17 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3313
3976
|
window.open(file.fileUrl || file.filePath, "_blank");
|
|
3314
3977
|
}
|
|
3315
3978
|
},
|
|
3979
|
+
handDownLoad: function handDownLoad(file) {
|
|
3980
|
+
var link = document.createElement("a");
|
|
3981
|
+
link.style.display = "none";
|
|
3982
|
+
link.target = "_blank";
|
|
3983
|
+
link.href = file.filePath || file.fileUrl;
|
|
3984
|
+
link.download = file.fileName || file.name;
|
|
3985
|
+
// 使用该方法触发点击下载
|
|
3986
|
+
document.body.appendChild(link);
|
|
3987
|
+
link.click();
|
|
3988
|
+
document.body.removeChild(link);
|
|
3989
|
+
},
|
|
3316
3990
|
handUpload: function handUpload(file) {
|
|
3317
3991
|
if (!this.verification(file)) {
|
|
3318
3992
|
return false;
|
|
@@ -3320,6 +3994,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3320
3994
|
file.percentage = 0;
|
|
3321
3995
|
this.uploading(file);
|
|
3322
3996
|
},
|
|
3997
|
+
handResumeUpload: function handResumeUpload(file) {
|
|
3998
|
+
file.resume();
|
|
3999
|
+
},
|
|
3323
4000
|
handError: function handError(file) {
|
|
3324
4001
|
if (this.$listeners.error) {
|
|
3325
4002
|
this.$emit("error", file);
|
|
@@ -3350,8 +4027,45 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3350
4027
|
_this2.uploading(pending);
|
|
3351
4028
|
});
|
|
3352
4029
|
},
|
|
4030
|
+
uploadingLarge: function uploadingLarge(fileUpload) {
|
|
4031
|
+
var _this$api,
|
|
4032
|
+
_this3 = this;
|
|
4033
|
+
var largeUpload = new large_upload["a" /* default */](fileUpload, {
|
|
4034
|
+
request: this.request,
|
|
4035
|
+
uploadFileList: this.fileList,
|
|
4036
|
+
chunkSize: this.largeChunkSize,
|
|
4037
|
+
busiType: this.busiType || ((_this$api = this.api) == null || (_this$api = _this$api.data) == null ? void 0 : _this$api.busiType),
|
|
4038
|
+
//"piclib",
|
|
4039
|
+
maxRequest: this.batchMaxCount,
|
|
4040
|
+
batchMaxCount: this.batchMaxCount
|
|
4041
|
+
}, {
|
|
4042
|
+
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
4043
|
+
var percent = progressEvent.percentage;
|
|
4044
|
+
var percentCompleted = Math.round(percent);
|
|
4045
|
+
// 处理上传进度,可根据实际需求进行操作
|
|
4046
|
+
if (percentCompleted == 100) {
|
|
4047
|
+
fileUpload.percentage = 99;
|
|
4048
|
+
} else {
|
|
4049
|
+
fileUpload.percentage = percentCompleted;
|
|
4050
|
+
}
|
|
4051
|
+
},
|
|
4052
|
+
onUploadFinish: function onUploadFinish(res) {
|
|
4053
|
+
_this3.uploadFinish(res, fileUpload);
|
|
4054
|
+
},
|
|
4055
|
+
onUploadError: function onUploadError(error) {
|
|
4056
|
+
fileUpload.state = 500; //上传失败
|
|
4057
|
+
fileUpload.errorMsg = error.message;
|
|
4058
|
+
_this3.batchUpload();
|
|
4059
|
+
}
|
|
4060
|
+
});
|
|
4061
|
+
largeUpload.hanldeUploadFile(fileUpload);
|
|
4062
|
+
},
|
|
3353
4063
|
uploading: function uploading(fileUpload) {
|
|
3354
|
-
var
|
|
4064
|
+
var _this4 = this;
|
|
4065
|
+
if (fileUpload.isLargeFile) {
|
|
4066
|
+
this.uploadingLarge(fileUpload);
|
|
4067
|
+
return false;
|
|
4068
|
+
}
|
|
3355
4069
|
// 数据处理
|
|
3356
4070
|
var formData = new FormData();
|
|
3357
4071
|
for (var key in this.api.data || {}) {
|
|
@@ -3363,11 +4077,15 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3363
4077
|
"Content-Type": "multipart/form-data"
|
|
3364
4078
|
}, this.api.headers);
|
|
3365
4079
|
fileUpload.state = 100; //上传中...
|
|
4080
|
+
var controller = new AbortController();
|
|
4081
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
3366
4082
|
var requestObj = {
|
|
3367
4083
|
url: this.api.url,
|
|
3368
4084
|
method: "POST",
|
|
3369
4085
|
headers: headers,
|
|
3370
4086
|
data: formData,
|
|
4087
|
+
signal: signal,
|
|
4088
|
+
// 将 signal 传递给服务函数
|
|
3371
4089
|
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
3372
4090
|
var percent = progressEvent.loaded * 100 / progressEvent.total;
|
|
3373
4091
|
var percentCompleted = Math.round(percent);
|
|
@@ -3379,30 +4097,36 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3379
4097
|
}
|
|
3380
4098
|
}
|
|
3381
4099
|
};
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
4100
|
+
fileUpload.cancel = function () {
|
|
4101
|
+
return controller.abort();
|
|
4102
|
+
};
|
|
4103
|
+
// if (this.CancelToken) {
|
|
4104
|
+
// requestObj.cancelToken = new this.CancelToken(function executor(c) {
|
|
4105
|
+
// // An executor function receives a cancel function as a parameter
|
|
4106
|
+
// fileUpload.cancel = c;
|
|
4107
|
+
// });
|
|
4108
|
+
// }
|
|
3388
4109
|
this.request(requestObj).then(function (res) {
|
|
3389
|
-
|
|
3390
|
-
fileUpload.percentage = 100; // 进度条
|
|
3391
|
-
fileUpload.state = 200; //上传成功
|
|
3392
|
-
var fileId = res[_this3.remoteProp.id];
|
|
3393
|
-
var fileUrl = typeof _this3.formatUrl === "function" ? _this3.formatUrl.call(_this3, res, fileUpload) : res[_this3.remoteProp.url];
|
|
3394
|
-
fileUpload.fileId = fileId;
|
|
3395
|
-
fileUpload.fileUrl = fileUrl;
|
|
3396
|
-
_this3.batchUpload();
|
|
3397
|
-
var fileName = _this3.removeSpecialCharacters(fileUpload.name);
|
|
3398
|
-
_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));
|
|
3399
|
-
_this3.$emit("input", _this3.fileValue);
|
|
4110
|
+
_this4.uploadFinish(res, fileUpload);
|
|
3400
4111
|
}).catch(function (error) {
|
|
3401
4112
|
fileUpload.state = 500; //上传失败
|
|
3402
4113
|
fileUpload.errorMsg = error.message;
|
|
3403
|
-
|
|
4114
|
+
_this4.batchUpload();
|
|
3404
4115
|
});
|
|
3405
4116
|
},
|
|
4117
|
+
uploadFinish: function uploadFinish(res, fileUpload) {
|
|
4118
|
+
var _this$fileValue$push;
|
|
4119
|
+
fileUpload.percentage = 100; // 进度条
|
|
4120
|
+
fileUpload.state = 200; //上传成功
|
|
4121
|
+
var fileId = res[this.remoteProp.id];
|
|
4122
|
+
var fileUrl = typeof this.formatUrl === "function" ? this.formatUrl.call(this, res, fileUpload) : res[this.remoteProp.url];
|
|
4123
|
+
fileUpload.fileId = fileId;
|
|
4124
|
+
fileUpload.fileUrl = fileUrl;
|
|
4125
|
+
this.batchUpload();
|
|
4126
|
+
var fileName = this.removeSpecialCharacters(fileUpload.name);
|
|
4127
|
+
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));
|
|
4128
|
+
this.$emit("input", this.fileValue);
|
|
4129
|
+
},
|
|
3406
4130
|
verification: function verification(upload) {
|
|
3407
4131
|
if (this.uploadMaxSize && this.uploadMaxSize > 0) {
|
|
3408
4132
|
var fileSize = upload.size / 1024 / 1024;
|
|
@@ -3425,20 +4149,23 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3425
4149
|
var type = upload.raw.type;
|
|
3426
4150
|
// 准备上传数据
|
|
3427
4151
|
var fileUpload = {
|
|
3428
|
-
id: upload.uid,
|
|
4152
|
+
// id: upload.uid,
|
|
3429
4153
|
name: upload.name,
|
|
3430
4154
|
file: upload,
|
|
3431
4155
|
state: 0,
|
|
3432
4156
|
percentage: 0,
|
|
3433
4157
|
errorMsg: null,
|
|
3434
4158
|
size: size,
|
|
3435
|
-
type: type
|
|
4159
|
+
type: type,
|
|
4160
|
+
isLargeFile: false
|
|
3436
4161
|
};
|
|
3437
4162
|
if (!this.verification(fileUpload)) {
|
|
3438
|
-
|
|
3439
|
-
}
|
|
3440
|
-
|
|
4163
|
+
return false;
|
|
4164
|
+
}
|
|
4165
|
+
if (this.useLarge && size > this.largeSize) {
|
|
4166
|
+
fileUpload.isLargeFile = true;
|
|
3441
4167
|
}
|
|
4168
|
+
this.pendingFileList.push(fileUpload);
|
|
3442
4169
|
this.$emit("beforeUpload", {
|
|
3443
4170
|
ref: this,
|
|
3444
4171
|
fileList: this.fileList,
|
|
@@ -3458,9 +4185,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3458
4185
|
}
|
|
3459
4186
|
}
|
|
3460
4187
|
});
|
|
3461
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3462
|
-
/* harmony default export */ var
|
|
3463
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
4188
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=script&lang=js
|
|
4189
|
+
/* harmony default export */ var item_upload_processvue_type_script_lang_js = (upload_processvue_type_script_lang_js);
|
|
4190
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue
|
|
3464
4191
|
|
|
3465
4192
|
|
|
3466
4193
|
|
|
@@ -3468,10 +4195,10 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3468
4195
|
|
|
3469
4196
|
/* normalize component */
|
|
3470
4197
|
|
|
3471
|
-
var
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
4198
|
+
var upload_process_component = normalizeComponent(
|
|
4199
|
+
item_upload_processvue_type_script_lang_js,
|
|
4200
|
+
upload_processvue_type_template_id_b7318202_render,
|
|
4201
|
+
upload_processvue_type_template_id_b7318202_staticRenderFns,
|
|
3475
4202
|
false,
|
|
3476
4203
|
null,
|
|
3477
4204
|
null,
|
|
@@ -3479,25 +4206,25 @@ var UploadProcess_component = normalizeComponent(
|
|
|
3479
4206
|
|
|
3480
4207
|
)
|
|
3481
4208
|
|
|
3482
|
-
/* harmony default export */ var
|
|
4209
|
+
/* harmony default export */ var upload_process = (upload_process_component.exports);
|
|
3483
4210
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
3484
|
-
var switch_ = __webpack_require__(
|
|
4211
|
+
var switch_ = __webpack_require__(44);
|
|
3485
4212
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
3486
4213
|
|
|
3487
4214
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
3488
|
-
var slider_ = __webpack_require__(
|
|
4215
|
+
var slider_ = __webpack_require__(45);
|
|
3489
4216
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
3490
4217
|
|
|
3491
4218
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
3492
|
-
var transfer_ = __webpack_require__(
|
|
4219
|
+
var transfer_ = __webpack_require__(46);
|
|
3493
4220
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
3494
4221
|
|
|
3495
4222
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
3496
|
-
var time_picker_ = __webpack_require__(
|
|
4223
|
+
var time_picker_ = __webpack_require__(47);
|
|
3497
4224
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
3498
4225
|
|
|
3499
4226
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
3500
|
-
var upload_ = __webpack_require__(
|
|
4227
|
+
var upload_ = __webpack_require__(48);
|
|
3501
4228
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
3502
4229
|
|
|
3503
4230
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -3537,7 +4264,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
3537
4264
|
Radio: Radio,
|
|
3538
4265
|
Checkbox: Checkbox,
|
|
3539
4266
|
InputText: InputText,
|
|
3540
|
-
UploadProcess:
|
|
4267
|
+
UploadProcess: upload_process
|
|
3541
4268
|
},
|
|
3542
4269
|
props: {
|
|
3543
4270
|
control: String,
|
|
@@ -3584,7 +4311,7 @@ form_input.install = function (Vue) {
|
|
|
3584
4311
|
};
|
|
3585
4312
|
/* harmony default export */ var components_form_input = (form_input);
|
|
3586
4313
|
// EXTERNAL MODULE: external "element-ui/lib/form-item"
|
|
3587
|
-
var lib_form_item_ = __webpack_require__(
|
|
4314
|
+
var lib_form_item_ = __webpack_require__(49);
|
|
3588
4315
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item_);
|
|
3589
4316
|
|
|
3590
4317
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-input"
|
|
@@ -3671,6 +4398,14 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
3671
4398
|
}
|
|
3672
4399
|
var rulesList = Array.isArray(this.rules) ? this.rules : [this.rules];
|
|
3673
4400
|
return rulesList.filter(function (item) {
|
|
4401
|
+
if (typeof item.disabled === "function") {
|
|
4402
|
+
return item.disabled.call(_this, {
|
|
4403
|
+
trigger: _this.form,
|
|
4404
|
+
triggerConfig: _this.form.formItemLayout[_this.prop],
|
|
4405
|
+
triggerForm: _this.form.formModel,
|
|
4406
|
+
triggerFormConfig: _this.form.formItemLayout
|
|
4407
|
+
});
|
|
4408
|
+
}
|
|
3674
4409
|
return item.disabled !== true;
|
|
3675
4410
|
}).map(function (item) {
|
|
3676
4411
|
if (typeof item.validator === "function") {
|
|
@@ -3801,9 +4536,17 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
3801
4536
|
}
|
|
3802
4537
|
}, [h("div", {
|
|
3803
4538
|
"class": "form-input_wrap"
|
|
3804
|
-
}, [typeof ((_this$slots = this.slots) == null ? void 0 : _this$slots.prependItem) === "function" ? (_this$slots2 = this.slots) == null || (_this$slots2 = _this$slots2.prependItem) == null ? void 0 : _this$slots2.call(this, h
|
|
4539
|
+
}, [typeof ((_this$slots = this.slots) == null ? void 0 : _this$slots.prependItem) === "function" ? (_this$slots2 = this.slots) == null || (_this$slots2 = _this$slots2.prependItem) == null ? void 0 : _this$slots2.call(this, h, {
|
|
4540
|
+
form: this.form,
|
|
4541
|
+
formModel: this.form.formModel,
|
|
4542
|
+
formItemLayout: this.form.formItemLayout
|
|
4543
|
+
}) : (_this$slots3 = this.slots) == null ? void 0 : _this$slots3.prependItem, h("div", {
|
|
3805
4544
|
"class": "form-input_content"
|
|
3806
|
-
}, [h("form-input", babel_helper_vue_jsx_merge_props_default()([{}, itemProp]))]), typeof ((_this$slots4 = this.slots) == null ? void 0 : _this$slots4.appendItem) === "function" ? (_this$slots5 = this.slots) == null || (_this$slots5 = _this$slots5.appendItem) == null ? void 0 : _this$slots5.call(this, h
|
|
4545
|
+
}, [h("form-input", babel_helper_vue_jsx_merge_props_default()([{}, itemProp]))]), typeof ((_this$slots4 = this.slots) == null ? void 0 : _this$slots4.appendItem) === "function" ? (_this$slots5 = this.slots) == null || (_this$slots5 = _this$slots5.appendItem) == null ? void 0 : _this$slots5.call(this, h, {
|
|
4546
|
+
form: this.form,
|
|
4547
|
+
formModel: this.form.formModel,
|
|
4548
|
+
formItemLayout: this.form.formItemLayout
|
|
4549
|
+
}) : (_this$slots6 = this.slots) == null ? void 0 : _this$slots6.appendItem])]);
|
|
3807
4550
|
}
|
|
3808
4551
|
});
|
|
3809
4552
|
// CONCATENATED MODULE: ./src/components/form-item/index.js
|
|
@@ -5001,7 +5744,7 @@ form_dialog_src.install = function (Vue) {
|
|
|
5001
5744
|
};
|
|
5002
5745
|
/* harmony default export */ var form_dialog = (form_dialog_src);
|
|
5003
5746
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/drawer"
|
|
5004
|
-
var drawer_ = __webpack_require__(
|
|
5747
|
+
var drawer_ = __webpack_require__(29);
|
|
5005
5748
|
var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
5006
5749
|
|
|
5007
5750
|
// 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-drawer/src/index.vue?vue&type=script&lang=js
|
|
@@ -5291,11 +6034,11 @@ form_drawer_src.install = function (Vue) {
|
|
|
5291
6034
|
};
|
|
5292
6035
|
/* harmony default export */ var form_drawer = (form_drawer_src);
|
|
5293
6036
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
5294
|
-
var descriptions_ = __webpack_require__(
|
|
6037
|
+
var descriptions_ = __webpack_require__(50);
|
|
5295
6038
|
var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
|
|
5296
6039
|
|
|
5297
6040
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
|
|
5298
|
-
var descriptions_item_ = __webpack_require__(
|
|
6041
|
+
var descriptions_item_ = __webpack_require__(51);
|
|
5299
6042
|
var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
|
|
5300
6043
|
|
|
5301
6044
|
// EXTERNAL MODULE: external "dayjs"
|
|
@@ -6126,7 +6869,7 @@ var table_column_ = __webpack_require__(4);
|
|
|
6126
6869
|
var table_column_default = /*#__PURE__*/__webpack_require__.n(table_column_);
|
|
6127
6870
|
|
|
6128
6871
|
// EXTERNAL MODULE: external "element-ui/lib/pagination"
|
|
6129
|
-
var pagination_ = __webpack_require__(
|
|
6872
|
+
var pagination_ = __webpack_require__(52);
|
|
6130
6873
|
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
|
|
6131
6874
|
|
|
6132
6875
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-column"
|
|
@@ -6987,19 +7730,19 @@ var dict_component = normalizeComponent(
|
|
|
6987
7730
|
|
|
6988
7731
|
/* harmony default export */ var dict = (dict_component.exports);
|
|
6989
7732
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown"
|
|
6990
|
-
var dropdown_ = __webpack_require__(
|
|
7733
|
+
var dropdown_ = __webpack_require__(53);
|
|
6991
7734
|
var dropdown_default = /*#__PURE__*/__webpack_require__.n(dropdown_);
|
|
6992
7735
|
|
|
6993
7736
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-item"
|
|
6994
|
-
var dropdown_item_ = __webpack_require__(
|
|
7737
|
+
var dropdown_item_ = __webpack_require__(54);
|
|
6995
7738
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
|
|
6996
7739
|
|
|
6997
7740
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-menu"
|
|
6998
|
-
var dropdown_menu_ = __webpack_require__(
|
|
7741
|
+
var dropdown_menu_ = __webpack_require__(55);
|
|
6999
7742
|
var dropdown_menu_default = /*#__PURE__*/__webpack_require__.n(dropdown_menu_);
|
|
7000
7743
|
|
|
7001
7744
|
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
7002
|
-
var link_ = __webpack_require__(
|
|
7745
|
+
var link_ = __webpack_require__(30);
|
|
7003
7746
|
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
7004
7747
|
|
|
7005
7748
|
// 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/table/src/column/operate.vue?vue&type=script&lang=js
|
|
@@ -7488,11 +8231,11 @@ srcvue_type_template_id_1e4d345a_render._withStripped = true
|
|
|
7488
8231
|
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=1e4d345a
|
|
7489
8232
|
|
|
7490
8233
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-query"
|
|
7491
|
-
var form_query_ = __webpack_require__(
|
|
8234
|
+
var form_query_ = __webpack_require__(56);
|
|
7492
8235
|
var form_query_default = /*#__PURE__*/__webpack_require__.n(form_query_);
|
|
7493
8236
|
|
|
7494
8237
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table"
|
|
7495
|
-
var components_table_ = __webpack_require__(
|
|
8238
|
+
var components_table_ = __webpack_require__(57);
|
|
7496
8239
|
var components_table_default = /*#__PURE__*/__webpack_require__.n(components_table_);
|
|
7497
8240
|
|
|
7498
8241
|
// 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/table-search/src/index.vue?vue&type=script&lang=js
|
|
@@ -7656,11 +8399,11 @@ srcvue_type_template_id_6b45ef10_render._withStripped = true
|
|
|
7656
8399
|
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=6b45ef10
|
|
7657
8400
|
|
|
7658
8401
|
// EXTERNAL MODULE: external "element-ui/lib/popover"
|
|
7659
|
-
var popover_ = __webpack_require__(
|
|
8402
|
+
var popover_ = __webpack_require__(58);
|
|
7660
8403
|
var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
|
|
7661
8404
|
|
|
7662
8405
|
// EXTERNAL MODULE: external "async-validator"
|
|
7663
|
-
var external_async_validator_ = __webpack_require__(
|
|
8406
|
+
var external_async_validator_ = __webpack_require__(59);
|
|
7664
8407
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
7665
8408
|
|
|
7666
8409
|
// CONCATENATED MODULE: ./src/components/table-editable/src/form-item.js
|
|
@@ -9181,20 +9924,20 @@ crud_src.install = function (Vue) {
|
|
|
9181
9924
|
};
|
|
9182
9925
|
/* harmony default export */ var crud = (crud_src);
|
|
9183
9926
|
// EXTERNAL MODULE: external "codemirror"
|
|
9184
|
-
var external_codemirror_ = __webpack_require__(
|
|
9927
|
+
var external_codemirror_ = __webpack_require__(28);
|
|
9185
9928
|
var external_codemirror_default = /*#__PURE__*/__webpack_require__.n(external_codemirror_);
|
|
9186
9929
|
|
|
9187
9930
|
// EXTERNAL MODULE: external "codemirror/mode/javascript/javascript"
|
|
9188
|
-
var javascript_ = __webpack_require__(
|
|
9931
|
+
var javascript_ = __webpack_require__(65);
|
|
9189
9932
|
|
|
9190
9933
|
// EXTERNAL MODULE: external "codemirror/mode/htmlmixed/htmlmixed"
|
|
9191
|
-
var htmlmixed_ = __webpack_require__(
|
|
9934
|
+
var htmlmixed_ = __webpack_require__(66);
|
|
9192
9935
|
|
|
9193
9936
|
// EXTERNAL MODULE: external "codemirror/addon/mode/simple"
|
|
9194
|
-
var simple_ = __webpack_require__(
|
|
9937
|
+
var simple_ = __webpack_require__(67);
|
|
9195
9938
|
|
|
9196
9939
|
// EXTERNAL MODULE: external "codemirror/addon/mode/multiplex"
|
|
9197
|
-
var multiplex_ = __webpack_require__(
|
|
9940
|
+
var multiplex_ = __webpack_require__(68);
|
|
9198
9941
|
|
|
9199
9942
|
// CONCATENATED MODULE: ./src/components/formula/src/codeMirror.js
|
|
9200
9943
|
function codeMirror_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ codeMirror_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; }
|
|
@@ -9413,11 +10156,11 @@ function funcList_extends() { funcList_extends = Object.assign ? Object.assign.b
|
|
|
9413
10156
|
}
|
|
9414
10157
|
});
|
|
9415
10158
|
// EXTERNAL MODULE: external "element-ui/lib/tree"
|
|
9416
|
-
var tree_ = __webpack_require__(
|
|
10159
|
+
var tree_ = __webpack_require__(60);
|
|
9417
10160
|
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
|
|
9418
10161
|
|
|
9419
10162
|
// EXTERNAL MODULE: external "element-ui/lib/badge"
|
|
9420
|
-
var badge_ = __webpack_require__(
|
|
10163
|
+
var badge_ = __webpack_require__(61);
|
|
9421
10164
|
var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
9422
10165
|
|
|
9423
10166
|
// CONCATENATED MODULE: ./src/components/formula/src/variableList.js
|
|
@@ -11804,7 +12547,7 @@ var popup_ = __webpack_require__(25);
|
|
|
11804
12547
|
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
11805
12548
|
|
|
11806
12549
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
11807
|
-
var migrating_ = __webpack_require__(
|
|
12550
|
+
var migrating_ = __webpack_require__(62);
|
|
11808
12551
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
11809
12552
|
|
|
11810
12553
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|