@panpanzhao/component-ui 1.24.1105 → 1.24.1217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/0.worker.js +1 -0
- package/lib/component-ui.common.js +946 -181
- 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 +910 -152
- package/lib/components/form-item.js +14 -6
- package/lib/components/form-query.js +2 -2
- package/lib/components/formula.js +21 -21
- package/lib/components/table-column.js +10 -10
- package/lib/components/table-editable.js +6 -6
- package/lib/components/table-operate.js +6 -2
- package/lib/components/table-search.js +6 -6
- package/lib/components/table.js +4 -4
- package/lib/components/timeline.js +4 -5
- 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
|
@@ -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
|
|
@@ -1750,7 +2354,7 @@ var Select_component = normalizeComponent(
|
|
|
1750
2354
|
|
|
1751
2355
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
1752
2356
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
1753
|
-
var radio_group_ = __webpack_require__(
|
|
2357
|
+
var radio_group_ = __webpack_require__(36);
|
|
1754
2358
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
1755
2359
|
|
|
1756
2360
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
@@ -1758,7 +2362,7 @@ var radio_ = __webpack_require__(22);
|
|
|
1758
2362
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
1759
2363
|
|
|
1760
2364
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
1761
|
-
var radio_button_ = __webpack_require__(
|
|
2365
|
+
var radio_button_ = __webpack_require__(37);
|
|
1762
2366
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
1763
2367
|
|
|
1764
2368
|
// 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 +2557,15 @@ var Radio_component = normalizeComponent(
|
|
|
1953
2557
|
|
|
1954
2558
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
1955
2559
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
1956
|
-
var checkbox_group_ = __webpack_require__(
|
|
2560
|
+
var checkbox_group_ = __webpack_require__(38);
|
|
1957
2561
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
1958
2562
|
|
|
1959
2563
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
1960
|
-
var checkbox_ = __webpack_require__(
|
|
2564
|
+
var checkbox_ = __webpack_require__(39);
|
|
1961
2565
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
1962
2566
|
|
|
1963
2567
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
1964
|
-
var checkbox_button_ = __webpack_require__(
|
|
2568
|
+
var checkbox_button_ = __webpack_require__(40);
|
|
1965
2569
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
1966
2570
|
|
|
1967
2571
|
// 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 +3280,7 @@ var CascaderAddr_component = normalizeComponent(
|
|
|
2676
3280
|
|
|
2677
3281
|
/* harmony default export */ var CascaderAddr = (CascaderAddr_component.exports);
|
|
2678
3282
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
2679
|
-
var date_picker_ = __webpack_require__(
|
|
3283
|
+
var date_picker_ = __webpack_require__(41);
|
|
2680
3284
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
2681
3285
|
|
|
2682
3286
|
// 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 +3382,16 @@ var DatePicker_component = normalizeComponent(
|
|
|
2778
3382
|
)
|
|
2779
3383
|
|
|
2780
3384
|
/* 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
|
|
3385
|
+
// 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
|
|
3386
|
+
var upload_processvue_type_template_id_b7318202_render = function render() {
|
|
2783
3387
|
var _vm = this,
|
|
2784
3388
|
_c = _vm._self._c
|
|
2785
3389
|
return _c(
|
|
2786
3390
|
"div",
|
|
2787
|
-
{
|
|
3391
|
+
{
|
|
3392
|
+
staticClass: "upload-process",
|
|
3393
|
+
class: { "upload-process__readonly": _vm.isReadonly },
|
|
3394
|
+
},
|
|
2788
3395
|
[
|
|
2789
3396
|
_c(
|
|
2790
3397
|
"el-upload",
|
|
@@ -2797,15 +3404,17 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2797
3404
|
false
|
|
2798
3405
|
),
|
|
2799
3406
|
[
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
3407
|
+
!_vm.isReadonly
|
|
3408
|
+
? _c(
|
|
3409
|
+
"el-button",
|
|
3410
|
+
{
|
|
3411
|
+
attrs: { slot: "trigger", size: "small", type: "primary" },
|
|
3412
|
+
slot: "trigger",
|
|
3413
|
+
},
|
|
3414
|
+
[_vm._v("选取文件")]
|
|
3415
|
+
)
|
|
3416
|
+
: _c("div", { attrs: { slot: "trigger" }, slot: "trigger" }),
|
|
3417
|
+
!_vm.isReadonly && !_vm.autoUpload && _vm.uploadButton
|
|
2809
3418
|
? _c(
|
|
2810
3419
|
"span",
|
|
2811
3420
|
{ staticStyle: { "padding-left": "10px" } },
|
|
@@ -2823,7 +3432,7 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2823
3432
|
1
|
|
2824
3433
|
)
|
|
2825
3434
|
: _vm._e(),
|
|
2826
|
-
_vm.uploadDesc && _vm.fileList.length > 0
|
|
3435
|
+
!_vm.isReadonly && _vm.uploadDesc && _vm.fileList.length > 0
|
|
2827
3436
|
? _c("div", { staticClass: "el-upload__tip" }, [
|
|
2828
3437
|
_c("div", { staticClass: "file-desc" }, [
|
|
2829
3438
|
_c("span", [
|
|
@@ -2872,10 +3481,7 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2872
3481
|
_vm._l(_vm.fileList, function (file, index) {
|
|
2873
3482
|
return _c(
|
|
2874
3483
|
"li",
|
|
2875
|
-
{
|
|
2876
|
-
key: file.uid || index,
|
|
2877
|
-
staticClass: "file-list__item is-success",
|
|
2878
|
-
},
|
|
3484
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
2879
3485
|
[
|
|
2880
3486
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
2881
3487
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -2904,7 +3510,7 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2904
3510
|
staticClass: "el-icon-success",
|
|
2905
3511
|
staticStyle: { color: "#67c23a" },
|
|
2906
3512
|
})
|
|
2907
|
-
: file.state === 500
|
|
3513
|
+
: file.state === 500 || file.state === 50
|
|
2908
3514
|
? _c("i", {
|
|
2909
3515
|
staticClass: "el-icon-warning",
|
|
2910
3516
|
staticStyle: { color: "#f56c6c !important" },
|
|
@@ -2932,6 +3538,23 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2932
3538
|
},
|
|
2933
3539
|
})
|
|
2934
3540
|
: _vm._e(),
|
|
3541
|
+
file.state === 200
|
|
3542
|
+
? _c("el-button", {
|
|
3543
|
+
attrs: {
|
|
3544
|
+
type: "primary",
|
|
3545
|
+
circle: "",
|
|
3546
|
+
icon: "el-icon-download",
|
|
3547
|
+
size: "mini",
|
|
3548
|
+
title: "下载",
|
|
3549
|
+
},
|
|
3550
|
+
on: {
|
|
3551
|
+
click: function ($event) {
|
|
3552
|
+
$event.stopPropagation()
|
|
3553
|
+
return _vm.handDownLoad(file)
|
|
3554
|
+
},
|
|
3555
|
+
},
|
|
3556
|
+
})
|
|
3557
|
+
: _vm._e(),
|
|
2935
3558
|
file.state === 500
|
|
2936
3559
|
? _c("el-button", {
|
|
2937
3560
|
attrs: {
|
|
@@ -2949,7 +3572,24 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2949
3572
|
},
|
|
2950
3573
|
})
|
|
2951
3574
|
: _vm._e(),
|
|
2952
|
-
file.state ===
|
|
3575
|
+
file.state === 50
|
|
3576
|
+
? _c("el-button", {
|
|
3577
|
+
attrs: {
|
|
3578
|
+
type: "primary",
|
|
3579
|
+
circle: "",
|
|
3580
|
+
icon: "el-icon-upload",
|
|
3581
|
+
size: "mini",
|
|
3582
|
+
title: "继续上传",
|
|
3583
|
+
},
|
|
3584
|
+
on: {
|
|
3585
|
+
click: function ($event) {
|
|
3586
|
+
$event.stopPropagation()
|
|
3587
|
+
return _vm.handResumeUpload(file)
|
|
3588
|
+
},
|
|
3589
|
+
},
|
|
3590
|
+
})
|
|
3591
|
+
: _vm._e(),
|
|
3592
|
+
file.state === 500 || file.state === 50
|
|
2953
3593
|
? _c("el-button", {
|
|
2954
3594
|
attrs: {
|
|
2955
3595
|
type: "warning",
|
|
@@ -2966,20 +3606,22 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2966
3606
|
},
|
|
2967
3607
|
})
|
|
2968
3608
|
: _vm._e(),
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
3609
|
+
!_vm.isReadonly
|
|
3610
|
+
? _c("el-button", {
|
|
3611
|
+
attrs: {
|
|
3612
|
+
type: "danger",
|
|
3613
|
+
circle: "",
|
|
3614
|
+
icon: "el-icon-delete",
|
|
3615
|
+
title: "删除",
|
|
3616
|
+
},
|
|
3617
|
+
on: {
|
|
3618
|
+
click: function ($event) {
|
|
3619
|
+
$event.stopPropagation()
|
|
3620
|
+
return _vm.handDelete(file, index)
|
|
3621
|
+
},
|
|
3622
|
+
},
|
|
3623
|
+
})
|
|
3624
|
+
: _vm._e(),
|
|
2983
3625
|
],
|
|
2984
3626
|
1
|
|
2985
3627
|
),
|
|
@@ -2994,10 +3636,7 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
2994
3636
|
_vm._l(_vm.pendingFileList, function (file, index) {
|
|
2995
3637
|
return _c(
|
|
2996
3638
|
"li",
|
|
2997
|
-
{
|
|
2998
|
-
key: file.uid || index,
|
|
2999
|
-
staticClass: "file-list__item is-success",
|
|
3000
|
-
},
|
|
3639
|
+
{ key: index, staticClass: "file-list__item is-success" },
|
|
3001
3640
|
[
|
|
3002
3641
|
_c("div", { staticClass: "file-list__item-name" }, [
|
|
3003
3642
|
_c("i", { staticClass: "el-icon-document" }),
|
|
@@ -3044,11 +3683,11 @@ var UploadProcessvue_type_template_id_f0c82e34_render = function render() {
|
|
|
3044
3683
|
1
|
|
3045
3684
|
)
|
|
3046
3685
|
}
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3686
|
+
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3687
|
+
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
3049
3688
|
|
|
3050
3689
|
|
|
3051
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3690
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
3052
3691
|
|
|
3053
3692
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
3054
3693
|
var message_ = __webpack_require__(6);
|
|
@@ -3058,10 +3697,14 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
|
3058
3697
|
var message_box_ = __webpack_require__(8);
|
|
3059
3698
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
3060
3699
|
|
|
3061
|
-
//
|
|
3700
|
+
// EXTERNAL MODULE: ./src/components/form/src/item/upload-process/large-upload/index.js
|
|
3701
|
+
var large_upload = __webpack_require__(42);
|
|
3702
|
+
|
|
3703
|
+
// 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
|
|
3704
|
+
|
|
3062
3705
|
|
|
3063
3706
|
|
|
3064
|
-
/* harmony default export */ var
|
|
3707
|
+
/* harmony default export */ var upload_processvue_type_script_lang_js = ({
|
|
3065
3708
|
name: "UploadProcess",
|
|
3066
3709
|
components: {},
|
|
3067
3710
|
props: {
|
|
@@ -3104,10 +3747,30 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3104
3747
|
type: Number,
|
|
3105
3748
|
default: 0
|
|
3106
3749
|
},
|
|
3750
|
+
limit: {
|
|
3751
|
+
type: Number,
|
|
3752
|
+
default: null
|
|
3753
|
+
},
|
|
3754
|
+
useLarge: {
|
|
3755
|
+
type: Boolean,
|
|
3756
|
+
default: false
|
|
3757
|
+
},
|
|
3758
|
+
largeSize: {
|
|
3759
|
+
type: Number,
|
|
3760
|
+
default: 1 * 1024 * 1024
|
|
3761
|
+
},
|
|
3762
|
+
largeChunkSize: {
|
|
3763
|
+
type: Number,
|
|
3764
|
+
default: 1 * 1024 * 1024
|
|
3765
|
+
},
|
|
3766
|
+
busiType: {
|
|
3767
|
+
type: String,
|
|
3768
|
+
default: ""
|
|
3769
|
+
},
|
|
3107
3770
|
// 批量上传最大数 0表示不批量上传
|
|
3108
3771
|
batchMaxCount: {
|
|
3109
3772
|
type: Number,
|
|
3110
|
-
default:
|
|
3773
|
+
default: 6
|
|
3111
3774
|
},
|
|
3112
3775
|
//是否自动上传
|
|
3113
3776
|
autoUpload: {
|
|
@@ -3132,16 +3795,16 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3132
3795
|
rules: {
|
|
3133
3796
|
type: Array
|
|
3134
3797
|
},
|
|
3798
|
+
readonly: {
|
|
3799
|
+
type: [Function, Boolean],
|
|
3800
|
+
default: false
|
|
3801
|
+
},
|
|
3135
3802
|
isPreview: Function,
|
|
3136
3803
|
isDelete: Function
|
|
3137
3804
|
},
|
|
3138
3805
|
watch: {
|
|
3139
3806
|
value: function value(val) {
|
|
3140
|
-
|
|
3141
|
-
if (val && val[0] === null) {
|
|
3142
|
-
this.fileValue = [];
|
|
3143
|
-
this.$emit("input", this.fileValue);
|
|
3144
|
-
}
|
|
3807
|
+
this.setValue(val);
|
|
3145
3808
|
}
|
|
3146
3809
|
},
|
|
3147
3810
|
computed: {
|
|
@@ -3150,6 +3813,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3150
3813
|
action: this.api.url,
|
|
3151
3814
|
headers: this.api.headers,
|
|
3152
3815
|
data: this.api.data,
|
|
3816
|
+
limit: this.limit,
|
|
3153
3817
|
multiple: true,
|
|
3154
3818
|
accept: ".doc,.docx,.ppt,.pptx,.xls,.xlsx,.pot,.pps,.vsd,.rtf,.wps,.et,.dps,.pdf,.txt,.jpg,.png,.jpeg,.jif,.zip,.rar,.gif,.mp4"
|
|
3155
3819
|
}, this.$attrs, {
|
|
@@ -3177,13 +3841,13 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3177
3841
|
// 上传中
|
|
3178
3842
|
uploadingFiles: function uploadingFiles() {
|
|
3179
3843
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3180
|
-
return item.state === 100;
|
|
3844
|
+
return item.state === 100 || item.state === 10 || item.state === 30;
|
|
3181
3845
|
});
|
|
3182
3846
|
},
|
|
3183
3847
|
// 上传处理完成(成功加失败)
|
|
3184
3848
|
finishFiles: function finishFiles() {
|
|
3185
3849
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3186
|
-
return item.state === 200 || item.state === 500;
|
|
3850
|
+
return item.state === 200 || item.state === 500 || item.state === 50;
|
|
3187
3851
|
});
|
|
3188
3852
|
},
|
|
3189
3853
|
// 上传成功
|
|
@@ -3195,8 +3859,14 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3195
3859
|
// 上传失败
|
|
3196
3860
|
errorFiles: function errorFiles() {
|
|
3197
3861
|
return this.fileList && this.fileList.filter(function (item) {
|
|
3198
|
-
return item.state === 500;
|
|
3862
|
+
return item.state === 500 || item.state === 50;
|
|
3199
3863
|
});
|
|
3864
|
+
},
|
|
3865
|
+
isReadonly: function isReadonly() {
|
|
3866
|
+
if (typeof this.readonly === "function") {
|
|
3867
|
+
return this.readonly.call(this);
|
|
3868
|
+
}
|
|
3869
|
+
return this.readonly;
|
|
3200
3870
|
}
|
|
3201
3871
|
},
|
|
3202
3872
|
data: function data() {
|
|
@@ -3206,6 +3876,7 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3206
3876
|
* id: 唯一编码
|
|
3207
3877
|
* name: 文件名称
|
|
3208
3878
|
* state: 0待上传 100上传中 200上传成功 500上传失败
|
|
3879
|
+
* 大文件特有状态 10文件处理中,30是暂停,50上传中断
|
|
3209
3880
|
* percentage: 上传进度 数字 100表示100%
|
|
3210
3881
|
* errorMsg: 错误信息
|
|
3211
3882
|
* size: 文件大小
|
|
@@ -3234,16 +3905,39 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3234
3905
|
// eslint-disable-next-line vue/no-mutating-props
|
|
3235
3906
|
this.extend.that = this;
|
|
3236
3907
|
}
|
|
3237
|
-
|
|
3238
|
-
var _this$fileList;
|
|
3239
|
-
(_this$fileList = this.fileList).push.apply(_this$fileList, this.value.map(function (item) {
|
|
3240
|
-
item.state = 200;
|
|
3241
|
-
item.name = item.fileName;
|
|
3242
|
-
return item;
|
|
3243
|
-
}));
|
|
3244
|
-
}
|
|
3908
|
+
this.setValue(this.value);
|
|
3245
3909
|
},
|
|
3246
3910
|
methods: {
|
|
3911
|
+
setValue: function setValue(val) {
|
|
3912
|
+
if (!val) {
|
|
3913
|
+
return false;
|
|
3914
|
+
}
|
|
3915
|
+
// 解决重置第一个元素为null
|
|
3916
|
+
if (val && val[0] === null) {
|
|
3917
|
+
this.fileValue = [];
|
|
3918
|
+
this.fileList = [];
|
|
3919
|
+
this.$emit("input", this.fileValue);
|
|
3920
|
+
}
|
|
3921
|
+
if (val === this.fileValue) {
|
|
3922
|
+
return false;
|
|
3923
|
+
}
|
|
3924
|
+
this.fileValue = [];
|
|
3925
|
+
this.fileList = [];
|
|
3926
|
+
if (val && val.length) {
|
|
3927
|
+
var _this$value, _this$fileValue, _this$fileList;
|
|
3928
|
+
var valList = (_this$value = this.value) == null ? void 0 : _this$value.map(function (item) {
|
|
3929
|
+
if (!item) {
|
|
3930
|
+
return item;
|
|
3931
|
+
}
|
|
3932
|
+
item.state = 200;
|
|
3933
|
+
item.percentage = 100; // 进度条
|
|
3934
|
+
item.name = item.fileName;
|
|
3935
|
+
return item;
|
|
3936
|
+
});
|
|
3937
|
+
(_this$fileValue = this.fileValue).push.apply(_this$fileValue, valList);
|
|
3938
|
+
(_this$fileList = this.fileList).push.apply(_this$fileList, valList);
|
|
3939
|
+
}
|
|
3940
|
+
},
|
|
3247
3941
|
removeSpecialCharacters: function removeSpecialCharacters(filename) {
|
|
3248
3942
|
// 定义正则表达式,匹配除了字母、数字、下划线、空格和点号之外的所有字符
|
|
3249
3943
|
var pattern = /[^\w\u4e00-\u9fa5.]/gi;
|
|
@@ -3266,8 +3960,8 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3266
3960
|
}).indexOf(file.fileId);
|
|
3267
3961
|
_this.fileValue.splice(indexVal, 1);
|
|
3268
3962
|
_this.$emit("input", _this.fileValue);
|
|
3269
|
-
} else if (file.state === 100) {
|
|
3270
|
-
file.cancel && file.cancel(
|
|
3963
|
+
} else if (file.state === 100 || file.state === 10 || file.state === 30) {
|
|
3964
|
+
file.cancel && file.cancel();
|
|
3271
3965
|
}
|
|
3272
3966
|
}).catch(function () {});
|
|
3273
3967
|
},
|
|
@@ -3281,6 +3975,17 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3281
3975
|
window.open(file.fileUrl || file.filePath, "_blank");
|
|
3282
3976
|
}
|
|
3283
3977
|
},
|
|
3978
|
+
handDownLoad: function handDownLoad(file) {
|
|
3979
|
+
var link = document.createElement("a");
|
|
3980
|
+
link.style.display = "none";
|
|
3981
|
+
link.target = "_blank";
|
|
3982
|
+
link.href = file.filePath || file.fileUrl;
|
|
3983
|
+
link.download = file.fileName || file.name;
|
|
3984
|
+
// 使用该方法触发点击下载
|
|
3985
|
+
document.body.appendChild(link);
|
|
3986
|
+
link.click();
|
|
3987
|
+
document.body.removeChild(link);
|
|
3988
|
+
},
|
|
3284
3989
|
handUpload: function handUpload(file) {
|
|
3285
3990
|
if (!this.verification(file)) {
|
|
3286
3991
|
return false;
|
|
@@ -3288,6 +3993,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3288
3993
|
file.percentage = 0;
|
|
3289
3994
|
this.uploading(file);
|
|
3290
3995
|
},
|
|
3996
|
+
handResumeUpload: function handResumeUpload(file) {
|
|
3997
|
+
file.resume();
|
|
3998
|
+
},
|
|
3291
3999
|
handError: function handError(file) {
|
|
3292
4000
|
if (this.$listeners.error) {
|
|
3293
4001
|
this.$emit("error", file);
|
|
@@ -3318,8 +4026,45 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3318
4026
|
_this2.uploading(pending);
|
|
3319
4027
|
});
|
|
3320
4028
|
},
|
|
4029
|
+
uploadingLarge: function uploadingLarge(fileUpload) {
|
|
4030
|
+
var _this$api,
|
|
4031
|
+
_this3 = this;
|
|
4032
|
+
var largeUpload = new large_upload["a" /* default */](fileUpload, {
|
|
4033
|
+
request: this.request,
|
|
4034
|
+
uploadFileList: this.fileList,
|
|
4035
|
+
chunkSize: this.largeChunkSize,
|
|
4036
|
+
busiType: this.busiType || ((_this$api = this.api) == null || (_this$api = _this$api.data) == null ? void 0 : _this$api.busiType),
|
|
4037
|
+
//"piclib",
|
|
4038
|
+
maxRequest: this.batchMaxCount,
|
|
4039
|
+
batchMaxCount: this.batchMaxCount
|
|
4040
|
+
}, {
|
|
4041
|
+
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
4042
|
+
var percent = progressEvent.percentage;
|
|
4043
|
+
var percentCompleted = Math.round(percent);
|
|
4044
|
+
// 处理上传进度,可根据实际需求进行操作
|
|
4045
|
+
if (percentCompleted == 100) {
|
|
4046
|
+
fileUpload.percentage = 99;
|
|
4047
|
+
} else {
|
|
4048
|
+
fileUpload.percentage = percentCompleted;
|
|
4049
|
+
}
|
|
4050
|
+
},
|
|
4051
|
+
onUploadFinish: function onUploadFinish(res) {
|
|
4052
|
+
_this3.uploadFinish(res, fileUpload);
|
|
4053
|
+
},
|
|
4054
|
+
onUploadError: function onUploadError(error) {
|
|
4055
|
+
fileUpload.state = 500; //上传失败
|
|
4056
|
+
fileUpload.errorMsg = error.message;
|
|
4057
|
+
_this3.batchUpload();
|
|
4058
|
+
}
|
|
4059
|
+
});
|
|
4060
|
+
largeUpload.hanldeUploadFile(fileUpload);
|
|
4061
|
+
},
|
|
3321
4062
|
uploading: function uploading(fileUpload) {
|
|
3322
|
-
var
|
|
4063
|
+
var _this4 = this;
|
|
4064
|
+
if (fileUpload.isLargeFile) {
|
|
4065
|
+
this.uploadingLarge(fileUpload);
|
|
4066
|
+
return false;
|
|
4067
|
+
}
|
|
3323
4068
|
// 数据处理
|
|
3324
4069
|
var formData = new FormData();
|
|
3325
4070
|
for (var key in this.api.data || {}) {
|
|
@@ -3331,11 +4076,15 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3331
4076
|
"Content-Type": "multipart/form-data"
|
|
3332
4077
|
}, this.api.headers);
|
|
3333
4078
|
fileUpload.state = 100; //上传中...
|
|
4079
|
+
var controller = new AbortController();
|
|
4080
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
3334
4081
|
var requestObj = {
|
|
3335
4082
|
url: this.api.url,
|
|
3336
4083
|
method: "POST",
|
|
3337
4084
|
headers: headers,
|
|
3338
4085
|
data: formData,
|
|
4086
|
+
signal: signal,
|
|
4087
|
+
// 将 signal 传递给服务函数
|
|
3339
4088
|
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
3340
4089
|
var percent = progressEvent.loaded * 100 / progressEvent.total;
|
|
3341
4090
|
var percentCompleted = Math.round(percent);
|
|
@@ -3347,30 +4096,36 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3347
4096
|
}
|
|
3348
4097
|
}
|
|
3349
4098
|
};
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
4099
|
+
fileUpload.cancel = function () {
|
|
4100
|
+
return controller.abort();
|
|
4101
|
+
};
|
|
4102
|
+
// if (this.CancelToken) {
|
|
4103
|
+
// requestObj.cancelToken = new this.CancelToken(function executor(c) {
|
|
4104
|
+
// // An executor function receives a cancel function as a parameter
|
|
4105
|
+
// fileUpload.cancel = c;
|
|
4106
|
+
// });
|
|
4107
|
+
// }
|
|
3356
4108
|
this.request(requestObj).then(function (res) {
|
|
3357
|
-
|
|
3358
|
-
fileUpload.percentage = 100; // 进度条
|
|
3359
|
-
fileUpload.state = 200; //上传成功
|
|
3360
|
-
var fileId = res[_this3.remoteProp.id];
|
|
3361
|
-
var fileUrl = typeof _this3.formatUrl === "function" ? _this3.formatUrl.call(_this3, res, fileUpload) : res[_this3.remoteProp.url];
|
|
3362
|
-
fileUpload.fileId = fileId;
|
|
3363
|
-
fileUpload.fileUrl = fileUrl;
|
|
3364
|
-
_this3.batchUpload();
|
|
3365
|
-
var fileName = _this3.removeSpecialCharacters(fileUpload.name);
|
|
3366
|
-
_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));
|
|
3367
|
-
_this3.$emit("input", _this3.fileValue);
|
|
4109
|
+
_this4.uploadFinish(res, fileUpload);
|
|
3368
4110
|
}).catch(function (error) {
|
|
3369
4111
|
fileUpload.state = 500; //上传失败
|
|
3370
4112
|
fileUpload.errorMsg = error.message;
|
|
3371
|
-
|
|
4113
|
+
_this4.batchUpload();
|
|
3372
4114
|
});
|
|
3373
4115
|
},
|
|
4116
|
+
uploadFinish: function uploadFinish(res, fileUpload) {
|
|
4117
|
+
var _this$fileValue$push;
|
|
4118
|
+
fileUpload.percentage = 100; // 进度条
|
|
4119
|
+
fileUpload.state = 200; //上传成功
|
|
4120
|
+
var fileId = res[this.remoteProp.id];
|
|
4121
|
+
var fileUrl = typeof this.formatUrl === "function" ? this.formatUrl.call(this, res, fileUpload) : res[this.remoteProp.url];
|
|
4122
|
+
fileUpload.fileId = fileId;
|
|
4123
|
+
fileUpload.fileUrl = fileUrl;
|
|
4124
|
+
this.batchUpload();
|
|
4125
|
+
var fileName = this.removeSpecialCharacters(fileUpload.name);
|
|
4126
|
+
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));
|
|
4127
|
+
this.$emit("input", this.fileValue);
|
|
4128
|
+
},
|
|
3374
4129
|
verification: function verification(upload) {
|
|
3375
4130
|
if (this.uploadMaxSize && this.uploadMaxSize > 0) {
|
|
3376
4131
|
var fileSize = upload.size / 1024 / 1024;
|
|
@@ -3393,20 +4148,23 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3393
4148
|
var type = upload.raw.type;
|
|
3394
4149
|
// 准备上传数据
|
|
3395
4150
|
var fileUpload = {
|
|
3396
|
-
id: upload.uid,
|
|
4151
|
+
// id: upload.uid,
|
|
3397
4152
|
name: upload.name,
|
|
3398
4153
|
file: upload,
|
|
3399
4154
|
state: 0,
|
|
3400
4155
|
percentage: 0,
|
|
3401
4156
|
errorMsg: null,
|
|
3402
4157
|
size: size,
|
|
3403
|
-
type: type
|
|
4158
|
+
type: type,
|
|
4159
|
+
isLargeFile: false
|
|
3404
4160
|
};
|
|
3405
4161
|
if (!this.verification(fileUpload)) {
|
|
3406
|
-
|
|
3407
|
-
}
|
|
3408
|
-
|
|
4162
|
+
return false;
|
|
4163
|
+
}
|
|
4164
|
+
if (this.useLarge && size > this.largeSize) {
|
|
4165
|
+
fileUpload.isLargeFile = true;
|
|
3409
4166
|
}
|
|
4167
|
+
this.pendingFileList.push(fileUpload);
|
|
3410
4168
|
this.$emit("beforeUpload", {
|
|
3411
4169
|
ref: this,
|
|
3412
4170
|
fileList: this.fileList,
|
|
@@ -3426,9 +4184,9 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3426
4184
|
}
|
|
3427
4185
|
}
|
|
3428
4186
|
});
|
|
3429
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
3430
|
-
/* harmony default export */ var
|
|
3431
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/
|
|
4187
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=script&lang=js
|
|
4188
|
+
/* harmony default export */ var item_upload_processvue_type_script_lang_js = (upload_processvue_type_script_lang_js);
|
|
4189
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue
|
|
3432
4190
|
|
|
3433
4191
|
|
|
3434
4192
|
|
|
@@ -3436,10 +4194,10 @@ var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
|
3436
4194
|
|
|
3437
4195
|
/* normalize component */
|
|
3438
4196
|
|
|
3439
|
-
var
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
4197
|
+
var upload_process_component = normalizeComponent(
|
|
4198
|
+
item_upload_processvue_type_script_lang_js,
|
|
4199
|
+
upload_processvue_type_template_id_b7318202_render,
|
|
4200
|
+
upload_processvue_type_template_id_b7318202_staticRenderFns,
|
|
3443
4201
|
false,
|
|
3444
4202
|
null,
|
|
3445
4203
|
null,
|
|
@@ -3447,25 +4205,25 @@ var UploadProcess_component = normalizeComponent(
|
|
|
3447
4205
|
|
|
3448
4206
|
)
|
|
3449
4207
|
|
|
3450
|
-
/* harmony default export */ var
|
|
4208
|
+
/* harmony default export */ var upload_process = (upload_process_component.exports);
|
|
3451
4209
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
3452
|
-
var switch_ = __webpack_require__(
|
|
4210
|
+
var switch_ = __webpack_require__(44);
|
|
3453
4211
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
3454
4212
|
|
|
3455
4213
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
3456
|
-
var slider_ = __webpack_require__(
|
|
4214
|
+
var slider_ = __webpack_require__(45);
|
|
3457
4215
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
3458
4216
|
|
|
3459
4217
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
3460
|
-
var transfer_ = __webpack_require__(
|
|
4218
|
+
var transfer_ = __webpack_require__(46);
|
|
3461
4219
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
3462
4220
|
|
|
3463
4221
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
3464
|
-
var time_picker_ = __webpack_require__(
|
|
4222
|
+
var time_picker_ = __webpack_require__(47);
|
|
3465
4223
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
3466
4224
|
|
|
3467
4225
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
3468
|
-
var upload_ = __webpack_require__(
|
|
4226
|
+
var upload_ = __webpack_require__(48);
|
|
3469
4227
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
3470
4228
|
|
|
3471
4229
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -3505,7 +4263,7 @@ var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
|
3505
4263
|
Radio: Radio,
|
|
3506
4264
|
Checkbox: Checkbox,
|
|
3507
4265
|
InputText: InputText,
|
|
3508
|
-
UploadProcess:
|
|
4266
|
+
UploadProcess: upload_process
|
|
3509
4267
|
},
|
|
3510
4268
|
props: {
|
|
3511
4269
|
control: String,
|
|
@@ -3552,7 +4310,7 @@ form_input.install = function (Vue) {
|
|
|
3552
4310
|
};
|
|
3553
4311
|
/* harmony default export */ var components_form_input = (form_input);
|
|
3554
4312
|
// EXTERNAL MODULE: external "element-ui/lib/form-item"
|
|
3555
|
-
var lib_form_item_ = __webpack_require__(
|
|
4313
|
+
var lib_form_item_ = __webpack_require__(49);
|
|
3556
4314
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item_);
|
|
3557
4315
|
|
|
3558
4316
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-input"
|
|
@@ -3769,9 +4527,17 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
3769
4527
|
}
|
|
3770
4528
|
}, [h("div", {
|
|
3771
4529
|
"class": "form-input_wrap"
|
|
3772
|
-
}, [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
|
|
4530
|
+
}, [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, {
|
|
4531
|
+
form: this.form,
|
|
4532
|
+
formModel: this.form.formModel,
|
|
4533
|
+
formItemLayout: this.form.formItemLayout
|
|
4534
|
+
}) : (_this$slots3 = this.slots) == null ? void 0 : _this$slots3.prependItem, h("div", {
|
|
3773
4535
|
"class": "form-input_content"
|
|
3774
|
-
}, [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
|
|
4536
|
+
}, [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, {
|
|
4537
|
+
form: this.form,
|
|
4538
|
+
formModel: this.form.formModel,
|
|
4539
|
+
formItemLayout: this.form.formItemLayout
|
|
4540
|
+
}) : (_this$slots6 = this.slots) == null ? void 0 : _this$slots6.appendItem])]);
|
|
3775
4541
|
}
|
|
3776
4542
|
});
|
|
3777
4543
|
// CONCATENATED MODULE: ./src/components/form-item/index.js
|
|
@@ -4969,7 +5735,7 @@ form_dialog_src.install = function (Vue) {
|
|
|
4969
5735
|
};
|
|
4970
5736
|
/* harmony default export */ var form_dialog = (form_dialog_src);
|
|
4971
5737
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/drawer"
|
|
4972
|
-
var drawer_ = __webpack_require__(
|
|
5738
|
+
var drawer_ = __webpack_require__(29);
|
|
4973
5739
|
var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
4974
5740
|
|
|
4975
5741
|
// 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
|
|
@@ -5259,11 +6025,11 @@ form_drawer_src.install = function (Vue) {
|
|
|
5259
6025
|
};
|
|
5260
6026
|
/* harmony default export */ var form_drawer = (form_drawer_src);
|
|
5261
6027
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
5262
|
-
var descriptions_ = __webpack_require__(
|
|
6028
|
+
var descriptions_ = __webpack_require__(50);
|
|
5263
6029
|
var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
|
|
5264
6030
|
|
|
5265
6031
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
|
|
5266
|
-
var descriptions_item_ = __webpack_require__(
|
|
6032
|
+
var descriptions_item_ = __webpack_require__(51);
|
|
5267
6033
|
var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
|
|
5268
6034
|
|
|
5269
6035
|
// EXTERNAL MODULE: external "dayjs"
|
|
@@ -6094,7 +6860,7 @@ var table_column_ = __webpack_require__(4);
|
|
|
6094
6860
|
var table_column_default = /*#__PURE__*/__webpack_require__.n(table_column_);
|
|
6095
6861
|
|
|
6096
6862
|
// EXTERNAL MODULE: external "element-ui/lib/pagination"
|
|
6097
|
-
var pagination_ = __webpack_require__(
|
|
6863
|
+
var pagination_ = __webpack_require__(52);
|
|
6098
6864
|
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
|
|
6099
6865
|
|
|
6100
6866
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-column"
|
|
@@ -6955,19 +7721,19 @@ var dict_component = normalizeComponent(
|
|
|
6955
7721
|
|
|
6956
7722
|
/* harmony default export */ var dict = (dict_component.exports);
|
|
6957
7723
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown"
|
|
6958
|
-
var dropdown_ = __webpack_require__(
|
|
7724
|
+
var dropdown_ = __webpack_require__(53);
|
|
6959
7725
|
var dropdown_default = /*#__PURE__*/__webpack_require__.n(dropdown_);
|
|
6960
7726
|
|
|
6961
7727
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-item"
|
|
6962
|
-
var dropdown_item_ = __webpack_require__(
|
|
7728
|
+
var dropdown_item_ = __webpack_require__(54);
|
|
6963
7729
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
|
|
6964
7730
|
|
|
6965
7731
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-menu"
|
|
6966
|
-
var dropdown_menu_ = __webpack_require__(
|
|
7732
|
+
var dropdown_menu_ = __webpack_require__(55);
|
|
6967
7733
|
var dropdown_menu_default = /*#__PURE__*/__webpack_require__.n(dropdown_menu_);
|
|
6968
7734
|
|
|
6969
7735
|
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
6970
|
-
var link_ = __webpack_require__(
|
|
7736
|
+
var link_ = __webpack_require__(30);
|
|
6971
7737
|
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
6972
7738
|
|
|
6973
7739
|
// 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
|
|
@@ -7456,11 +8222,11 @@ srcvue_type_template_id_1e4d345a_render._withStripped = true
|
|
|
7456
8222
|
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=1e4d345a
|
|
7457
8223
|
|
|
7458
8224
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-query"
|
|
7459
|
-
var form_query_ = __webpack_require__(
|
|
8225
|
+
var form_query_ = __webpack_require__(56);
|
|
7460
8226
|
var form_query_default = /*#__PURE__*/__webpack_require__.n(form_query_);
|
|
7461
8227
|
|
|
7462
8228
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table"
|
|
7463
|
-
var components_table_ = __webpack_require__(
|
|
8229
|
+
var components_table_ = __webpack_require__(57);
|
|
7464
8230
|
var components_table_default = /*#__PURE__*/__webpack_require__.n(components_table_);
|
|
7465
8231
|
|
|
7466
8232
|
// 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
|
|
@@ -7624,11 +8390,11 @@ srcvue_type_template_id_6b45ef10_render._withStripped = true
|
|
|
7624
8390
|
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=6b45ef10
|
|
7625
8391
|
|
|
7626
8392
|
// EXTERNAL MODULE: external "element-ui/lib/popover"
|
|
7627
|
-
var popover_ = __webpack_require__(
|
|
8393
|
+
var popover_ = __webpack_require__(58);
|
|
7628
8394
|
var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
|
|
7629
8395
|
|
|
7630
8396
|
// EXTERNAL MODULE: external "async-validator"
|
|
7631
|
-
var external_async_validator_ = __webpack_require__(
|
|
8397
|
+
var external_async_validator_ = __webpack_require__(59);
|
|
7632
8398
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
7633
8399
|
|
|
7634
8400
|
// CONCATENATED MODULE: ./src/components/table-editable/src/form-item.js
|
|
@@ -9149,20 +9915,20 @@ crud_src.install = function (Vue) {
|
|
|
9149
9915
|
};
|
|
9150
9916
|
/* harmony default export */ var crud = (crud_src);
|
|
9151
9917
|
// EXTERNAL MODULE: external "codemirror"
|
|
9152
|
-
var external_codemirror_ = __webpack_require__(
|
|
9918
|
+
var external_codemirror_ = __webpack_require__(28);
|
|
9153
9919
|
var external_codemirror_default = /*#__PURE__*/__webpack_require__.n(external_codemirror_);
|
|
9154
9920
|
|
|
9155
9921
|
// EXTERNAL MODULE: external "codemirror/mode/javascript/javascript"
|
|
9156
|
-
var javascript_ = __webpack_require__(
|
|
9922
|
+
var javascript_ = __webpack_require__(65);
|
|
9157
9923
|
|
|
9158
9924
|
// EXTERNAL MODULE: external "codemirror/mode/htmlmixed/htmlmixed"
|
|
9159
|
-
var htmlmixed_ = __webpack_require__(
|
|
9925
|
+
var htmlmixed_ = __webpack_require__(66);
|
|
9160
9926
|
|
|
9161
9927
|
// EXTERNAL MODULE: external "codemirror/addon/mode/simple"
|
|
9162
|
-
var simple_ = __webpack_require__(
|
|
9928
|
+
var simple_ = __webpack_require__(67);
|
|
9163
9929
|
|
|
9164
9930
|
// EXTERNAL MODULE: external "codemirror/addon/mode/multiplex"
|
|
9165
|
-
var multiplex_ = __webpack_require__(
|
|
9931
|
+
var multiplex_ = __webpack_require__(68);
|
|
9166
9932
|
|
|
9167
9933
|
// CONCATENATED MODULE: ./src/components/formula/src/codeMirror.js
|
|
9168
9934
|
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; }
|
|
@@ -9381,11 +10147,11 @@ function funcList_extends() { funcList_extends = Object.assign ? Object.assign.b
|
|
|
9381
10147
|
}
|
|
9382
10148
|
});
|
|
9383
10149
|
// EXTERNAL MODULE: external "element-ui/lib/tree"
|
|
9384
|
-
var tree_ = __webpack_require__(
|
|
10150
|
+
var tree_ = __webpack_require__(60);
|
|
9385
10151
|
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
|
|
9386
10152
|
|
|
9387
10153
|
// EXTERNAL MODULE: external "element-ui/lib/badge"
|
|
9388
|
-
var badge_ = __webpack_require__(
|
|
10154
|
+
var badge_ = __webpack_require__(61);
|
|
9389
10155
|
var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
9390
10156
|
|
|
9391
10157
|
// CONCATENATED MODULE: ./src/components/formula/src/variableList.js
|
|
@@ -11772,7 +12538,7 @@ var popup_ = __webpack_require__(25);
|
|
|
11772
12538
|
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
11773
12539
|
|
|
11774
12540
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
11775
|
-
var migrating_ = __webpack_require__(
|
|
12541
|
+
var migrating_ = __webpack_require__(62);
|
|
11776
12542
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
11777
12543
|
|
|
11778
12544
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
@@ -12470,8 +13236,8 @@ tree_line_src.install = function (Vue) {
|
|
|
12470
13236
|
Vue.component(tree_line_src.name, tree_line_src);
|
|
12471
13237
|
};
|
|
12472
13238
|
/* harmony default export */ var tree_line = (tree_line_src);
|
|
12473
|
-
// 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/timeline/src/index.vue?vue&type=template&id=
|
|
12474
|
-
var
|
|
13239
|
+
// 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/timeline/src/index.vue?vue&type=template&id=31901d48
|
|
13240
|
+
var srcvue_type_template_id_31901d48_render = function render() {
|
|
12475
13241
|
var _vm = this,
|
|
12476
13242
|
_c = _vm._self._c
|
|
12477
13243
|
return _c(
|
|
@@ -12495,11 +13261,11 @@ var srcvue_type_template_id_33f1a40a_render = function render() {
|
|
|
12495
13261
|
1
|
|
12496
13262
|
)
|
|
12497
13263
|
}
|
|
12498
|
-
var
|
|
12499
|
-
|
|
13264
|
+
var srcvue_type_template_id_31901d48_staticRenderFns = []
|
|
13265
|
+
srcvue_type_template_id_31901d48_render._withStripped = true
|
|
12500
13266
|
|
|
12501
13267
|
|
|
12502
|
-
// CONCATENATED MODULE: ./src/components/timeline/src/index.vue?vue&type=template&id=
|
|
13268
|
+
// CONCATENATED MODULE: ./src/components/timeline/src/index.vue?vue&type=template&id=31901d48
|
|
12503
13269
|
|
|
12504
13270
|
// 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/timeline/src/time-item.vue?vue&type=template&id=5f314a3e
|
|
12505
13271
|
var time_itemvue_type_template_id_5f314a3e_render = function render() {
|
|
@@ -12685,7 +13451,6 @@ var time_item_component = normalizeComponent(
|
|
|
12685
13451
|
|
|
12686
13452
|
/* harmony default export */ var timeline_srcvue_type_script_lang_js = ({
|
|
12687
13453
|
name: "Timeline",
|
|
12688
|
-
componentName: "Timeline",
|
|
12689
13454
|
components: {
|
|
12690
13455
|
TimeItem: time_item
|
|
12691
13456
|
},
|
|
@@ -12731,8 +13496,8 @@ var time_item_component = normalizeComponent(
|
|
|
12731
13496
|
|
|
12732
13497
|
var timeline_src_component = normalizeComponent(
|
|
12733
13498
|
components_timeline_srcvue_type_script_lang_js,
|
|
12734
|
-
|
|
12735
|
-
|
|
13499
|
+
srcvue_type_template_id_31901d48_render,
|
|
13500
|
+
srcvue_type_template_id_31901d48_staticRenderFns,
|
|
12736
13501
|
false,
|
|
12737
13502
|
null,
|
|
12738
13503
|
null,
|