@panpanzhao/component-ui 1.24.1217 → 1.24.1224
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/component-ui.common.js +759 -755
- package/lib/components/crud.js +2 -5
- 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 +826 -829
- package/lib/components/form-item.js +11 -4
- package/lib/components/form-query.js +2 -2
- package/lib/components/formula.js +20 -20
- package/lib/components/table-column.js +10 -10
- package/lib/components/table-editable.js +6 -6
- package/lib/components/table-operate.js +2 -5
- package/lib/components/table-search.js +6 -6
- package/lib/components/table.js +4 -4
- package/lib/components/timeline.js +2 -2
- package/lib/components/tree-line.js +2 -2
- package/lib/index.js +1 -1
- package/package.json +2 -4
- package/lib/0.worker.js +0 -1
- package/lib/components/0.worker.js +0 -1052
|
@@ -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 = 61);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -249,839 +249,241 @@ module.exports = require("element-ui/lib/mixins/emitter");
|
|
|
249
249
|
|
|
250
250
|
/***/ }),
|
|
251
251
|
/* 27 */
|
|
252
|
-
/***/ (function(module,
|
|
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
|
-
*/
|
|
252
|
+
/***/ (function(module, exports) {
|
|
328
253
|
|
|
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
|
-
}
|
|
254
|
+
module.exports = require("codemirror");
|
|
345
255
|
|
|
346
256
|
/***/ }),
|
|
347
257
|
/* 28 */
|
|
348
258
|
/***/ (function(module, exports) {
|
|
349
259
|
|
|
350
|
-
module.exports = require("
|
|
260
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/drawer");
|
|
351
261
|
|
|
352
262
|
/***/ }),
|
|
353
263
|
/* 29 */
|
|
354
264
|
/***/ (function(module, exports) {
|
|
355
265
|
|
|
356
|
-
module.exports = require("
|
|
266
|
+
module.exports = require("element-ui/lib/link");
|
|
357
267
|
|
|
358
268
|
/***/ }),
|
|
359
269
|
/* 30 */
|
|
360
270
|
/***/ (function(module, exports) {
|
|
361
271
|
|
|
362
|
-
module.exports = require("element-ui/lib/
|
|
272
|
+
module.exports = require("element-ui/lib/input-number");
|
|
363
273
|
|
|
364
274
|
/***/ }),
|
|
365
275
|
/* 31 */
|
|
366
276
|
/***/ (function(module, exports) {
|
|
367
277
|
|
|
368
|
-
module.exports = require("element-ui/lib/
|
|
278
|
+
module.exports = require("element-ui/lib/select");
|
|
369
279
|
|
|
370
280
|
/***/ }),
|
|
371
281
|
/* 32 */
|
|
372
282
|
/***/ (function(module, exports) {
|
|
373
283
|
|
|
374
|
-
module.exports = require("element-ui/lib/
|
|
284
|
+
module.exports = require("element-ui/lib/option");
|
|
375
285
|
|
|
376
286
|
/***/ }),
|
|
377
287
|
/* 33 */
|
|
378
288
|
/***/ (function(module, exports) {
|
|
379
289
|
|
|
380
|
-
module.exports = require("element-ui/lib/option");
|
|
290
|
+
module.exports = require("element-ui/lib/option-group");
|
|
381
291
|
|
|
382
292
|
/***/ }),
|
|
383
293
|
/* 34 */
|
|
384
294
|
/***/ (function(module, exports) {
|
|
385
295
|
|
|
386
|
-
module.exports = require("
|
|
296
|
+
module.exports = require("@panpanzhao/component-ui/lib/components/tree-line");
|
|
387
297
|
|
|
388
298
|
/***/ }),
|
|
389
299
|
/* 35 */
|
|
390
300
|
/***/ (function(module, exports) {
|
|
391
301
|
|
|
392
|
-
module.exports = require("
|
|
302
|
+
module.exports = require("element-ui/lib/radio-group");
|
|
393
303
|
|
|
394
304
|
/***/ }),
|
|
395
305
|
/* 36 */
|
|
396
306
|
/***/ (function(module, exports) {
|
|
397
307
|
|
|
398
|
-
module.exports = require("element-ui/lib/radio-
|
|
308
|
+
module.exports = require("element-ui/lib/radio-button");
|
|
399
309
|
|
|
400
310
|
/***/ }),
|
|
401
311
|
/* 37 */
|
|
402
312
|
/***/ (function(module, exports) {
|
|
403
313
|
|
|
404
|
-
module.exports = require("element-ui/lib/
|
|
314
|
+
module.exports = require("element-ui/lib/checkbox-group");
|
|
405
315
|
|
|
406
316
|
/***/ }),
|
|
407
317
|
/* 38 */
|
|
408
318
|
/***/ (function(module, exports) {
|
|
409
319
|
|
|
410
|
-
module.exports = require("element-ui/lib/checkbox
|
|
320
|
+
module.exports = require("element-ui/lib/checkbox");
|
|
411
321
|
|
|
412
322
|
/***/ }),
|
|
413
323
|
/* 39 */
|
|
414
324
|
/***/ (function(module, exports) {
|
|
415
325
|
|
|
416
|
-
module.exports = require("element-ui/lib/checkbox");
|
|
326
|
+
module.exports = require("element-ui/lib/checkbox-button");
|
|
417
327
|
|
|
418
328
|
/***/ }),
|
|
419
329
|
/* 40 */
|
|
420
330
|
/***/ (function(module, exports) {
|
|
421
331
|
|
|
422
|
-
module.exports = require("element-ui/lib/
|
|
332
|
+
module.exports = require("element-ui/lib/date-picker");
|
|
423
333
|
|
|
424
334
|
/***/ }),
|
|
425
335
|
/* 41 */
|
|
426
336
|
/***/ (function(module, exports) {
|
|
427
337
|
|
|
428
|
-
module.exports = require("
|
|
338
|
+
module.exports = require("js-md5");
|
|
429
339
|
|
|
430
340
|
/***/ }),
|
|
431
341
|
/* 42 */
|
|
432
|
-
/***/ (function(module,
|
|
342
|
+
/***/ (function(module, exports) {
|
|
433
343
|
|
|
434
|
-
|
|
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; }
|
|
344
|
+
module.exports = require("element-ui/lib/switch");
|
|
449
345
|
|
|
346
|
+
/***/ }),
|
|
347
|
+
/* 43 */
|
|
348
|
+
/***/ (function(module, exports) {
|
|
450
349
|
|
|
451
|
-
|
|
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;
|
|
350
|
+
module.exports = require("element-ui/lib/slider");
|
|
537
351
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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("文件开始解析");
|
|
352
|
+
/***/ }),
|
|
353
|
+
/* 44 */
|
|
354
|
+
/***/ (function(module, exports) {
|
|
596
355
|
|
|
597
|
-
|
|
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计算完成");
|
|
356
|
+
module.exports = require("element-ui/lib/transfer");
|
|
605
357
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
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
|
-
});
|
|
358
|
+
/***/ }),
|
|
359
|
+
/* 45 */
|
|
360
|
+
/***/ (function(module, exports) {
|
|
662
361
|
|
|
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
|
-
});
|
|
362
|
+
module.exports = require("element-ui/lib/time-picker");
|
|
673
363
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
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
|
-
});
|
|
364
|
+
/***/ }),
|
|
365
|
+
/* 46 */
|
|
366
|
+
/***/ (function(module, exports) {
|
|
817
367
|
|
|
818
|
-
|
|
819
|
-
// 浏览器同域名同一时间请求的最大并发数限制为6
|
|
820
|
-
// 例如如果有3个文件同时上传/处理中,则每个文件切片接口最多调 6 / 3 == 2个相同的接口
|
|
821
|
-
this.maxRequest = Math.ceil(this.batchMaxCount / isTaskArrIng.length);
|
|
368
|
+
module.exports = require("element-ui/lib/upload");
|
|
822
369
|
|
|
823
|
-
|
|
824
|
-
|
|
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 */
|
|
934
|
-
/***/ (function(module, exports) {
|
|
935
|
-
|
|
936
|
-
module.exports = require("element-ui/lib/switch");
|
|
937
|
-
|
|
938
|
-
/***/ }),
|
|
939
|
-
/* 45 */
|
|
940
|
-
/***/ (function(module, exports) {
|
|
941
|
-
|
|
942
|
-
module.exports = require("element-ui/lib/slider");
|
|
943
|
-
|
|
944
|
-
/***/ }),
|
|
945
|
-
/* 46 */
|
|
946
|
-
/***/ (function(module, exports) {
|
|
947
|
-
|
|
948
|
-
module.exports = require("element-ui/lib/transfer");
|
|
949
|
-
|
|
950
|
-
/***/ }),
|
|
951
|
-
/* 47 */
|
|
952
|
-
/***/ (function(module, exports) {
|
|
953
|
-
|
|
954
|
-
module.exports = require("element-ui/lib/time-picker");
|
|
955
|
-
|
|
956
|
-
/***/ }),
|
|
957
|
-
/* 48 */
|
|
958
|
-
/***/ (function(module, exports) {
|
|
959
|
-
|
|
960
|
-
module.exports = require("element-ui/lib/upload");
|
|
961
|
-
|
|
962
|
-
/***/ }),
|
|
963
|
-
/* 49 */
|
|
964
|
-
/***/ (function(module, exports) {
|
|
370
|
+
/***/ }),
|
|
371
|
+
/* 47 */
|
|
372
|
+
/***/ (function(module, exports) {
|
|
965
373
|
|
|
966
374
|
module.exports = require("element-ui/lib/form-item");
|
|
967
375
|
|
|
968
376
|
/***/ }),
|
|
969
|
-
/*
|
|
377
|
+
/* 48 */
|
|
970
378
|
/***/ (function(module, exports) {
|
|
971
379
|
|
|
972
380
|
module.exports = require("element-ui/lib/descriptions");
|
|
973
381
|
|
|
974
382
|
/***/ }),
|
|
975
|
-
/*
|
|
383
|
+
/* 49 */
|
|
976
384
|
/***/ (function(module, exports) {
|
|
977
385
|
|
|
978
386
|
module.exports = require("element-ui/lib/descriptions-item");
|
|
979
387
|
|
|
980
388
|
/***/ }),
|
|
981
|
-
/*
|
|
389
|
+
/* 50 */
|
|
982
390
|
/***/ (function(module, exports) {
|
|
983
391
|
|
|
984
392
|
module.exports = require("element-ui/lib/pagination");
|
|
985
393
|
|
|
986
394
|
/***/ }),
|
|
987
|
-
/*
|
|
395
|
+
/* 51 */
|
|
988
396
|
/***/ (function(module, exports) {
|
|
989
397
|
|
|
990
398
|
module.exports = require("element-ui/lib/dropdown");
|
|
991
399
|
|
|
992
400
|
/***/ }),
|
|
993
|
-
/*
|
|
401
|
+
/* 52 */
|
|
994
402
|
/***/ (function(module, exports) {
|
|
995
403
|
|
|
996
404
|
module.exports = require("element-ui/lib/dropdown-item");
|
|
997
405
|
|
|
998
406
|
/***/ }),
|
|
999
|
-
/*
|
|
407
|
+
/* 53 */
|
|
1000
408
|
/***/ (function(module, exports) {
|
|
1001
409
|
|
|
1002
410
|
module.exports = require("element-ui/lib/dropdown-menu");
|
|
1003
411
|
|
|
1004
412
|
/***/ }),
|
|
1005
|
-
/*
|
|
413
|
+
/* 54 */
|
|
1006
414
|
/***/ (function(module, exports) {
|
|
1007
415
|
|
|
1008
416
|
module.exports = require("@panpanzhao/component-ui/lib/components/form-query");
|
|
1009
417
|
|
|
1010
418
|
/***/ }),
|
|
1011
|
-
/*
|
|
419
|
+
/* 55 */
|
|
1012
420
|
/***/ (function(module, exports) {
|
|
1013
421
|
|
|
1014
422
|
module.exports = require("@panpanzhao/component-ui/lib/components/table");
|
|
1015
423
|
|
|
1016
424
|
/***/ }),
|
|
1017
|
-
/*
|
|
425
|
+
/* 56 */
|
|
1018
426
|
/***/ (function(module, exports) {
|
|
1019
427
|
|
|
1020
428
|
module.exports = require("element-ui/lib/popover");
|
|
1021
429
|
|
|
1022
430
|
/***/ }),
|
|
1023
|
-
/*
|
|
431
|
+
/* 57 */
|
|
1024
432
|
/***/ (function(module, exports) {
|
|
1025
433
|
|
|
1026
434
|
module.exports = require("async-validator");
|
|
1027
435
|
|
|
1028
436
|
/***/ }),
|
|
1029
|
-
/*
|
|
437
|
+
/* 58 */
|
|
1030
438
|
/***/ (function(module, exports) {
|
|
1031
439
|
|
|
1032
440
|
module.exports = require("element-ui/lib/tree");
|
|
1033
441
|
|
|
1034
442
|
/***/ }),
|
|
1035
|
-
/*
|
|
443
|
+
/* 59 */
|
|
1036
444
|
/***/ (function(module, exports) {
|
|
1037
445
|
|
|
1038
446
|
module.exports = require("element-ui/lib/badge");
|
|
1039
447
|
|
|
1040
448
|
/***/ }),
|
|
1041
|
-
/*
|
|
449
|
+
/* 60 */
|
|
1042
450
|
/***/ (function(module, exports) {
|
|
1043
451
|
|
|
1044
452
|
module.exports = require("element-ui/lib/mixins/migrating");
|
|
1045
453
|
|
|
1046
454
|
/***/ }),
|
|
1047
|
-
/*
|
|
455
|
+
/* 61 */
|
|
1048
456
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1049
457
|
|
|
1050
|
-
module.exports = __webpack_require__(
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
/***/ }),
|
|
1054
|
-
/* 64 */
|
|
1055
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
458
|
+
module.exports = __webpack_require__(66);
|
|
1056
459
|
|
|
1057
|
-
module.exports = __webpack_require__.p + "0.worker.js"
|
|
1058
460
|
|
|
1059
461
|
/***/ }),
|
|
1060
|
-
/*
|
|
462
|
+
/* 62 */
|
|
1061
463
|
/***/ (function(module, exports) {
|
|
1062
464
|
|
|
1063
465
|
module.exports = require("codemirror/mode/javascript/javascript");
|
|
1064
466
|
|
|
1065
467
|
/***/ }),
|
|
1066
|
-
/*
|
|
468
|
+
/* 63 */
|
|
1067
469
|
/***/ (function(module, exports) {
|
|
1068
470
|
|
|
1069
471
|
module.exports = require("codemirror/mode/htmlmixed/htmlmixed");
|
|
1070
472
|
|
|
1071
473
|
/***/ }),
|
|
1072
|
-
/*
|
|
474
|
+
/* 64 */
|
|
1073
475
|
/***/ (function(module, exports) {
|
|
1074
476
|
|
|
1075
477
|
module.exports = require("codemirror/addon/mode/simple");
|
|
1076
478
|
|
|
1077
479
|
/***/ }),
|
|
1078
|
-
/*
|
|
480
|
+
/* 65 */
|
|
1079
481
|
/***/ (function(module, exports) {
|
|
1080
482
|
|
|
1081
483
|
module.exports = require("codemirror/addon/mode/multiplex");
|
|
1082
484
|
|
|
1083
485
|
/***/ }),
|
|
1084
|
-
/*
|
|
486
|
+
/* 66 */
|
|
1085
487
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1086
488
|
|
|
1087
489
|
"use strict";
|
|
@@ -1672,7 +1074,7 @@ InputNumbervue_type_template_id_6c463d52_render._withStripped = true
|
|
|
1672
1074
|
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=6c463d52
|
|
1673
1075
|
|
|
1674
1076
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
1675
|
-
var input_number_ = __webpack_require__(
|
|
1077
|
+
var input_number_ = __webpack_require__(30);
|
|
1676
1078
|
var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
1677
1079
|
|
|
1678
1080
|
// 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
|
|
@@ -1715,15 +1117,15 @@ var InputNumber_component = normalizeComponent(
|
|
|
1715
1117
|
|
|
1716
1118
|
/* harmony default export */ var InputNumber = (InputNumber_component.exports);
|
|
1717
1119
|
// EXTERNAL MODULE: external "element-ui/lib/select"
|
|
1718
|
-
var select_ = __webpack_require__(
|
|
1120
|
+
var select_ = __webpack_require__(31);
|
|
1719
1121
|
var select_default = /*#__PURE__*/__webpack_require__.n(select_);
|
|
1720
1122
|
|
|
1721
1123
|
// EXTERNAL MODULE: external "element-ui/lib/option"
|
|
1722
|
-
var option_ = __webpack_require__(
|
|
1124
|
+
var option_ = __webpack_require__(32);
|
|
1723
1125
|
var option_default = /*#__PURE__*/__webpack_require__.n(option_);
|
|
1724
1126
|
|
|
1725
1127
|
// EXTERNAL MODULE: external "element-ui/lib/option-group"
|
|
1726
|
-
var option_group_ = __webpack_require__(
|
|
1128
|
+
var option_group_ = __webpack_require__(33);
|
|
1727
1129
|
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);
|
|
1728
1130
|
|
|
1729
1131
|
// 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
|
|
@@ -1819,7 +1221,7 @@ SelectTreevue_type_template_id_0f44d547_render._withStripped = true
|
|
|
1819
1221
|
// CONCATENATED MODULE: ./src/components/form/src/item/SelectTree.vue?vue&type=template&id=0f44d547
|
|
1820
1222
|
|
|
1821
1223
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/tree-line"
|
|
1822
|
-
var tree_line_ = __webpack_require__(
|
|
1224
|
+
var tree_line_ = __webpack_require__(34);
|
|
1823
1225
|
var tree_line_default = /*#__PURE__*/__webpack_require__.n(tree_line_);
|
|
1824
1226
|
|
|
1825
1227
|
// 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
|
|
@@ -2150,6 +1552,7 @@ var SelectTree_component = normalizeComponent(
|
|
|
2150
1552
|
}
|
|
2151
1553
|
return Object.assign({
|
|
2152
1554
|
clearable: true,
|
|
1555
|
+
filterable: true,
|
|
2153
1556
|
placeholder: "请选择"
|
|
2154
1557
|
}, this.$attrs, {
|
|
2155
1558
|
value: _value
|
|
@@ -2354,7 +1757,7 @@ var Select_component = normalizeComponent(
|
|
|
2354
1757
|
|
|
2355
1758
|
/* harmony default export */ var Select = (Select_component.exports);
|
|
2356
1759
|
// EXTERNAL MODULE: external "element-ui/lib/radio-group"
|
|
2357
|
-
var radio_group_ = __webpack_require__(
|
|
1760
|
+
var radio_group_ = __webpack_require__(35);
|
|
2358
1761
|
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);
|
|
2359
1762
|
|
|
2360
1763
|
// EXTERNAL MODULE: external "element-ui/lib/radio"
|
|
@@ -2362,7 +1765,7 @@ var radio_ = __webpack_require__(22);
|
|
|
2362
1765
|
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
|
|
2363
1766
|
|
|
2364
1767
|
// EXTERNAL MODULE: external "element-ui/lib/radio-button"
|
|
2365
|
-
var radio_button_ = __webpack_require__(
|
|
1768
|
+
var radio_button_ = __webpack_require__(36);
|
|
2366
1769
|
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);
|
|
2367
1770
|
|
|
2368
1771
|
// 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
|
|
@@ -2557,15 +1960,15 @@ var Radio_component = normalizeComponent(
|
|
|
2557
1960
|
|
|
2558
1961
|
/* harmony default export */ var Radio = (Radio_component.exports);
|
|
2559
1962
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
|
|
2560
|
-
var checkbox_group_ = __webpack_require__(
|
|
1963
|
+
var checkbox_group_ = __webpack_require__(37);
|
|
2561
1964
|
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);
|
|
2562
1965
|
|
|
2563
1966
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
|
|
2564
|
-
var checkbox_ = __webpack_require__(
|
|
1967
|
+
var checkbox_ = __webpack_require__(38);
|
|
2565
1968
|
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
|
|
2566
1969
|
|
|
2567
1970
|
// EXTERNAL MODULE: external "element-ui/lib/checkbox-button"
|
|
2568
|
-
var checkbox_button_ = __webpack_require__(
|
|
1971
|
+
var checkbox_button_ = __webpack_require__(39);
|
|
2569
1972
|
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);
|
|
2570
1973
|
|
|
2571
1974
|
// 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
|
|
@@ -2901,8 +2304,8 @@ var Cascader_component = normalizeComponent(
|
|
|
2901
2304
|
)
|
|
2902
2305
|
|
|
2903
2306
|
/* harmony default export */ var Cascader = (Cascader_component.exports);
|
|
2904
|
-
// 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/CascaderAddr.vue?vue&type=template&id=
|
|
2905
|
-
var
|
|
2307
|
+
// 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/CascaderAddr.vue?vue&type=template&id=df02c66e
|
|
2308
|
+
var CascaderAddrvue_type_template_id_df02c66e_render = function render() {
|
|
2906
2309
|
var _vm = this,
|
|
2907
2310
|
_c = _vm._self._c
|
|
2908
2311
|
return _c(
|
|
@@ -2965,11 +2368,11 @@ var CascaderAddrvue_type_template_id_12c36b3c_render = function render() {
|
|
|
2965
2368
|
]
|
|
2966
2369
|
)
|
|
2967
2370
|
}
|
|
2968
|
-
var
|
|
2969
|
-
|
|
2371
|
+
var CascaderAddrvue_type_template_id_df02c66e_staticRenderFns = []
|
|
2372
|
+
CascaderAddrvue_type_template_id_df02c66e_render._withStripped = true
|
|
2970
2373
|
|
|
2971
2374
|
|
|
2972
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/CascaderAddr.vue?vue&type=template&id=
|
|
2375
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/CascaderAddr.vue?vue&type=template&id=df02c66e
|
|
2973
2376
|
|
|
2974
2377
|
// 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/CascaderAddr.vue?vue&type=script&lang=js
|
|
2975
2378
|
|
|
@@ -3042,13 +2445,30 @@ CascaderAddrvue_type_template_id_12c36b3c_render._withStripped = true
|
|
|
3042
2445
|
watch: {
|
|
3043
2446
|
value: {
|
|
3044
2447
|
handler: function handler(val) {
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
2448
|
+
var _this$_form;
|
|
2449
|
+
var provinceCodeVal = val == null ? void 0 : val[this._fieldProps['provinceCode']];
|
|
2450
|
+
var cityCodeVal = val == null ? void 0 : val[this._fieldProps['cityCode']];
|
|
2451
|
+
var countyCodeVal = val == null ? void 0 : val[this._fieldProps['countyCode']];
|
|
2452
|
+
var provinceNameVal = val == null ? void 0 : val[this._fieldProps['provinceName']];
|
|
2453
|
+
var cityNameVal = val == null ? void 0 : val[this._fieldProps['cityName']];
|
|
2454
|
+
var countyNameVal = val == null ? void 0 : val[this._fieldProps['countyName']];
|
|
2455
|
+
var addressVal = val == null ? void 0 : val[this._fieldProps['address']];
|
|
2456
|
+
this.valueCached['provinceCode'] = provinceCodeVal;
|
|
2457
|
+
this.valueCached['cityCode'] = cityCodeVal;
|
|
2458
|
+
this.valueCached['countyCode'] = countyCodeVal;
|
|
2459
|
+
this.valueCached['provinceName'] = provinceNameVal;
|
|
2460
|
+
this.valueCached['cityName'] = cityNameVal;
|
|
2461
|
+
this.valueCached['countyName'] = countyNameVal;
|
|
2462
|
+
this.valueCached['address'] = addressVal;
|
|
2463
|
+
if ((_this$_form = this._form) != null && _this$_form.formModel) {
|
|
2464
|
+
this._form.formModel[this._fieldProps['provinceCode']] = provinceCodeVal;
|
|
2465
|
+
this._form.formModel[this._fieldProps['cityCode']] = cityCodeVal;
|
|
2466
|
+
this._form.formModel[this._fieldProps['countyCode']] = countyCodeVal;
|
|
2467
|
+
this._form.formModel[this._fieldProps['provinceName']] = provinceNameVal;
|
|
2468
|
+
this._form.formModel[this._fieldProps['cityName']] = cityNameVal;
|
|
2469
|
+
this._form.formModel[this._fieldProps['countyName']] = countyNameVal;
|
|
2470
|
+
this._form.formModel[this._fieldProps['address']] = addressVal;
|
|
2471
|
+
}
|
|
3052
2472
|
},
|
|
3053
2473
|
deep: true
|
|
3054
2474
|
},
|
|
@@ -3168,11 +2588,10 @@ CascaderAddrvue_type_template_id_12c36b3c_render._withStripped = true
|
|
|
3168
2588
|
}
|
|
3169
2589
|
},
|
|
3170
2590
|
created: function created() {
|
|
3171
|
-
var _this$
|
|
2591
|
+
var _this$_form2;
|
|
3172
2592
|
//设置为可响应数据
|
|
3173
|
-
this.initVal(this == null || (_this$
|
|
2593
|
+
this.initVal(this == null || (_this$_form2 = this._form) == null ? void 0 : _this$_form2.formModel);
|
|
3174
2594
|
this.initVal(this.value);
|
|
3175
|
-
debugger;
|
|
3176
2595
|
},
|
|
3177
2596
|
mounted: function mounted() {
|
|
3178
2597
|
this.initApi();
|
|
@@ -3226,7 +2645,7 @@ CascaderAddrvue_type_template_id_12c36b3c_render._withStripped = true
|
|
|
3226
2645
|
});
|
|
3227
2646
|
},
|
|
3228
2647
|
cascaderChange: function cascaderChange(val) {
|
|
3229
|
-
var _nodes$, _this$
|
|
2648
|
+
var _nodes$, _this$_form3, _this$_form4;
|
|
3230
2649
|
var nodes = this.$refs.cascaderRef.getCheckedNodes();
|
|
3231
2650
|
var pathLabels = nodes == null || (_nodes$ = nodes[0]) == null ? void 0 : _nodes$.pathLabels;
|
|
3232
2651
|
this.valueCached.provinceCode = val[0];
|
|
@@ -3235,23 +2654,25 @@ CascaderAddrvue_type_template_id_12c36b3c_render._withStripped = true
|
|
|
3235
2654
|
this.valueCached.cityName = pathLabels == null ? void 0 : pathLabels[1];
|
|
3236
2655
|
this.valueCached.countyCode = val[2];
|
|
3237
2656
|
this.valueCached.countyName = pathLabels == null ? void 0 : pathLabels[2];
|
|
3238
|
-
this.valueCached.address = this.valueCached.address || ((_this$
|
|
2657
|
+
this.valueCached.address = this.valueCached.address || ((_this$_form3 = this._form) == null || (_this$_form3 = _this$_form3.formModel) == null ? void 0 : _this$_form3[this._fieldProps['address']]);
|
|
3239
2658
|
this.$emit("change", this.valueCached);
|
|
3240
|
-
|
|
2659
|
+
this.$emit("cascaderChange", val, this.valueCached);
|
|
2660
|
+
if (this != null && (_this$_form4 = this._form) != null && _this$_form4.formModel) {
|
|
3241
2661
|
Object.assign(this._form.formModel, this.valueCached);
|
|
3242
2662
|
}
|
|
3243
2663
|
},
|
|
3244
2664
|
inputChange: function inputChange(val) {
|
|
3245
|
-
var _this$
|
|
3246
|
-
this.valueCached.provinceCode = this.valueCached.provinceCode || ((_this$
|
|
3247
|
-
this.valueCached.provinceName = this.valueCached.provinceName || ((_this$
|
|
3248
|
-
this.valueCached.cityCode = this.valueCached.cityCode || ((_this$
|
|
3249
|
-
this.valueCached.cityName = this.valueCached.cityName || ((_this$
|
|
3250
|
-
this.valueCached.countyCode = this.valueCached.countyCode || ((_this$
|
|
3251
|
-
this.valueCached.countyName = this.valueCached.provinceCode || ((_this$
|
|
2665
|
+
var _this$_form5, _this$_form6, _this$_form7, _this$_form8, _this$_form9, _this$_form10, _this$_form11;
|
|
2666
|
+
this.valueCached.provinceCode = this.valueCached.provinceCode || ((_this$_form5 = this._form) == null || (_this$_form5 = _this$_form5.formModel) == null ? void 0 : _this$_form5[this._fieldProps['provinceCode']]);
|
|
2667
|
+
this.valueCached.provinceName = this.valueCached.provinceName || ((_this$_form6 = this._form) == null || (_this$_form6 = _this$_form6.formModel) == null ? void 0 : _this$_form6[this._fieldProps['provinceName']]);
|
|
2668
|
+
this.valueCached.cityCode = this.valueCached.cityCode || ((_this$_form7 = this._form) == null || (_this$_form7 = _this$_form7.formModel) == null ? void 0 : _this$_form7[this._fieldProps['cityCode']]);
|
|
2669
|
+
this.valueCached.cityName = this.valueCached.cityName || ((_this$_form8 = this._form) == null || (_this$_form8 = _this$_form8.formModel) == null ? void 0 : _this$_form8[this._fieldProps['cityName']]);
|
|
2670
|
+
this.valueCached.countyCode = this.valueCached.countyCode || ((_this$_form9 = this._form) == null || (_this$_form9 = _this$_form9.formModel) == null ? void 0 : _this$_form9[this._fieldProps['countyCode']]);
|
|
2671
|
+
this.valueCached.countyName = this.valueCached.provinceCode || ((_this$_form10 = this._form) == null || (_this$_form10 = _this$_form10.formModel) == null ? void 0 : _this$_form10[this._fieldProps['countyName']]);
|
|
3252
2672
|
this.valueCached.address = val;
|
|
3253
2673
|
this.$emit("change", this.valueCached);
|
|
3254
|
-
|
|
2674
|
+
this.$emit("inputChange", val, this.valueCached);
|
|
2675
|
+
if (this != null && (_this$_form11 = this._form) != null && _this$_form11.formModel) {
|
|
3255
2676
|
this._form.formModel[this._fieldProps['address']] = val;
|
|
3256
2677
|
}
|
|
3257
2678
|
}
|
|
@@ -3269,8 +2690,8 @@ CascaderAddrvue_type_template_id_12c36b3c_render._withStripped = true
|
|
|
3269
2690
|
|
|
3270
2691
|
var CascaderAddr_component = normalizeComponent(
|
|
3271
2692
|
item_CascaderAddrvue_type_script_lang_js,
|
|
3272
|
-
|
|
3273
|
-
|
|
2693
|
+
CascaderAddrvue_type_template_id_df02c66e_render,
|
|
2694
|
+
CascaderAddrvue_type_template_id_df02c66e_staticRenderFns,
|
|
3274
2695
|
false,
|
|
3275
2696
|
null,
|
|
3276
2697
|
null,
|
|
@@ -3280,7 +2701,7 @@ var CascaderAddr_component = normalizeComponent(
|
|
|
3280
2701
|
|
|
3281
2702
|
/* harmony default export */ var CascaderAddr = (CascaderAddr_component.exports);
|
|
3282
2703
|
// EXTERNAL MODULE: external "element-ui/lib/date-picker"
|
|
3283
|
-
var date_picker_ = __webpack_require__(
|
|
2704
|
+
var date_picker_ = __webpack_require__(40);
|
|
3284
2705
|
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);
|
|
3285
2706
|
|
|
3286
2707
|
// 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
|
|
@@ -3683,22 +3104,598 @@ var upload_processvue_type_template_id_b7318202_render = function render() {
|
|
|
3683
3104
|
1
|
|
3684
3105
|
)
|
|
3685
3106
|
}
|
|
3686
|
-
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3687
|
-
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
3688
|
-
|
|
3107
|
+
var upload_processvue_type_template_id_b7318202_staticRenderFns = []
|
|
3108
|
+
upload_processvue_type_template_id_b7318202_render._withStripped = true
|
|
3109
|
+
|
|
3110
|
+
|
|
3111
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/index.vue?vue&type=template&id=b7318202
|
|
3112
|
+
|
|
3113
|
+
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
3114
|
+
var message_ = __webpack_require__(6);
|
|
3115
|
+
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
3116
|
+
|
|
3117
|
+
// EXTERNAL MODULE: external "element-ui/lib/message-box"
|
|
3118
|
+
var message_box_ = __webpack_require__(8);
|
|
3119
|
+
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
3120
|
+
|
|
3121
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/large-upload/remote.js
|
|
3122
|
+
/**
|
|
3123
|
+
* [uploadFile] - 上传切片参数
|
|
3124
|
+
* @param fileHash 文件hash,String
|
|
3125
|
+
* @param fileSize 文件大小,Number
|
|
3126
|
+
* @param fileName 文件名称,String
|
|
3127
|
+
* @param index 多文件上传中的所在index,number
|
|
3128
|
+
* @param chunkFile 切片文件本身,File || Blob || void
|
|
3129
|
+
* @param chunkHash 切片文件hash,String
|
|
3130
|
+
* @param chunkSize 分片大小,Number
|
|
3131
|
+
* @param chunkNumber 切片总数量,Number
|
|
3132
|
+
* @param finish 是否上传完成,可选参数,Boolean
|
|
3133
|
+
*/
|
|
3134
|
+
|
|
3135
|
+
// 上传单个切片
|
|
3136
|
+
function uploadFile(data, _ref) {
|
|
3137
|
+
var onCancel = _ref.onCancel,
|
|
3138
|
+
service = _ref.service;
|
|
3139
|
+
var controller = new AbortController();
|
|
3140
|
+
var signal = controller.signal; // 获取 signal 对象
|
|
3141
|
+
// 封装 axios 请求或 HTTP 客户端请求
|
|
3142
|
+
var request = service({
|
|
3143
|
+
url: "/tengine/dfs/bigStorage/upload",
|
|
3144
|
+
method: "post",
|
|
3145
|
+
data: data,
|
|
3146
|
+
headers: {
|
|
3147
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
3148
|
+
},
|
|
3149
|
+
signal: signal // 将 signal 传递给服务函数
|
|
3150
|
+
});
|
|
3151
|
+
// 如果提供了 onCancel 回调,则传递取消函数
|
|
3152
|
+
if (typeof onCancel === "function") {
|
|
3153
|
+
// 如果是一个函数,则直接调用传一个取消方法给 这个方法
|
|
3154
|
+
// 所以只要传进来是方法,就会直接传一个参数并直接触发这个函数
|
|
3155
|
+
// 那传过来的这个方法就会接收到一个参数(就是取消函数() => controller.abort())
|
|
3156
|
+
// 在调用uploadFile就可以拿到这个参数
|
|
3157
|
+
onCancel(function () {
|
|
3158
|
+
return controller.abort();
|
|
3159
|
+
}); // 调用 onCancel 时传入取消函数
|
|
3160
|
+
}
|
|
3161
|
+
return request;
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
/**
|
|
3165
|
+
* [mergeChunk] - 合并切片
|
|
3166
|
+
* @param chunkSize 分片大小,Number
|
|
3167
|
+
* @param fileName 文件名称,String
|
|
3168
|
+
* @param fileSize 文件大小,Number
|
|
3169
|
+
*/
|
|
3170
|
+
|
|
3171
|
+
// 合并所有切片
|
|
3172
|
+
function mergeChunk(data, _ref2) {
|
|
3173
|
+
var service = _ref2.service;
|
|
3174
|
+
return service({
|
|
3175
|
+
url: "/tengine/dfs/bigStorage/merge",
|
|
3176
|
+
method: "post",
|
|
3177
|
+
data: {
|
|
3178
|
+
fileMd5: data.fileHash,
|
|
3179
|
+
fsign: data.fsign,
|
|
3180
|
+
fileName: data.fileName,
|
|
3181
|
+
fileSize: data.fileSize,
|
|
3182
|
+
busiType: data.busiType
|
|
3183
|
+
}
|
|
3184
|
+
});
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
/**
|
|
3188
|
+
* [checkFile] - 检查文件是否存在
|
|
3189
|
+
* @param fileHash 文件hash,String
|
|
3190
|
+
* @param fileName 文件名称,String
|
|
3191
|
+
*/
|
|
3192
|
+
|
|
3193
|
+
// 检查文件是否存在
|
|
3194
|
+
function checkFile(data, _ref3) {
|
|
3195
|
+
var service = _ref3.service;
|
|
3196
|
+
return service({
|
|
3197
|
+
url: "/tengine/dfs/bigStorage/checkChunk",
|
|
3198
|
+
method: "post",
|
|
3199
|
+
data: {
|
|
3200
|
+
fileMd5: data.fileHash,
|
|
3201
|
+
fileName: data.fileName,
|
|
3202
|
+
busiType: data.busiType
|
|
3203
|
+
},
|
|
3204
|
+
headers: {
|
|
3205
|
+
Content_Type: "application/x-www-form-urlencoded"
|
|
3206
|
+
}
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
// EXTERNAL MODULE: external "js-md5"
|
|
3210
|
+
var external_js_md5_ = __webpack_require__(41);
|
|
3211
|
+
|
|
3212
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/upload-process/large-upload/index.js
|
|
3213
|
+
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); }
|
|
3214
|
+
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."); }
|
|
3215
|
+
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); }
|
|
3216
|
+
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; }
|
|
3217
|
+
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; }
|
|
3218
|
+
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); } }
|
|
3219
|
+
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); }); }; }
|
|
3220
|
+
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
|
|
3221
|
+
var large_upload_id = 0;
|
|
3222
|
+
function _classPrivateFieldLooseKey(name) { return "__private_" + large_upload_id++ + "_" + name; }
|
|
3223
|
+
|
|
3224
|
+
|
|
3225
|
+
var _useWorker = /*#__PURE__*/_classPrivateFieldLooseKey("useWorker");
|
|
3226
|
+
var _finishTask = /*#__PURE__*/_classPrivateFieldLooseKey("finishTask");
|
|
3227
|
+
var _handleMerge = /*#__PURE__*/_classPrivateFieldLooseKey("handleMerge");
|
|
3228
|
+
var _signleFileProgress = /*#__PURE__*/_classPrivateFieldLooseKey("signleFileProgress");
|
|
3229
|
+
var _uploadSignleFile = /*#__PURE__*/_classPrivateFieldLooseKey("uploadSignleFile");
|
|
3230
|
+
var large_upload_LargeUpload = /*#__PURE__*/function () {
|
|
3231
|
+
function LargeUpload(fileObj, options, callBack) {
|
|
3232
|
+
// 单个文件上传
|
|
3233
|
+
Object.defineProperty(this, _uploadSignleFile, {
|
|
3234
|
+
value: _uploadSignleFile2
|
|
3235
|
+
});
|
|
3236
|
+
// 更新单个文件进度条
|
|
3237
|
+
Object.defineProperty(this, _signleFileProgress, {
|
|
3238
|
+
value: _signleFileProgress2
|
|
3239
|
+
});
|
|
3240
|
+
// 调取合并接口处理所有切片
|
|
3241
|
+
Object.defineProperty(this, _handleMerge, {
|
|
3242
|
+
value: _handleMerge2
|
|
3243
|
+
});
|
|
3244
|
+
// 设置单个文件上传已完成
|
|
3245
|
+
Object.defineProperty(this, _finishTask, {
|
|
3246
|
+
value: _finishTask2
|
|
3247
|
+
});
|
|
3248
|
+
// 生成文件 hash(web-worker)
|
|
3249
|
+
Object.defineProperty(this, _useWorker, {
|
|
3250
|
+
value: _useWorker2
|
|
3251
|
+
});
|
|
3252
|
+
var request = options.request,
|
|
3253
|
+
uploadFileList = options.uploadFileList,
|
|
3254
|
+
_chunkSize = options.chunkSize,
|
|
3255
|
+
maxRequest = options.maxRequest,
|
|
3256
|
+
_busiType = options.busiType,
|
|
3257
|
+
batchMaxCount = options.batchMaxCount;
|
|
3258
|
+
this.fileObj = fileObj;
|
|
3259
|
+
this.request = request;
|
|
3260
|
+
this.uploadFileList = uploadFileList;
|
|
3261
|
+
this.chunkSize = _chunkSize;
|
|
3262
|
+
this.busiType = _busiType;
|
|
3263
|
+
this.maxRequest = maxRequest || 6;
|
|
3264
|
+
this.batchMaxCount = batchMaxCount || 6;
|
|
3265
|
+
this.onUploadProgress = callBack == null ? void 0 : callBack.onUploadProgress;
|
|
3266
|
+
this.onUploadFinish = callBack == null ? void 0 : callBack.onUploadFinish;
|
|
3267
|
+
this.onUploadError = callBack == null ? void 0 : callBack.onUploadError;
|
|
3268
|
+
}
|
|
3269
|
+
// 取消单个
|
|
3270
|
+
var _proto = LargeUpload.prototype;
|
|
3271
|
+
_proto.cancelSingle =
|
|
3272
|
+
/*#__PURE__*/
|
|
3273
|
+
function () {
|
|
3274
|
+
var _cancelSingle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3275
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3276
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3277
|
+
case 0:
|
|
3278
|
+
this.pauseUpload(true);
|
|
3279
|
+
//情况所有需要上传的分片
|
|
3280
|
+
this.fileObj.allChunkList = [];
|
|
3281
|
+
// 取消上传后列表删除该文件
|
|
3282
|
+
// const list = uploadFileList.filter((itemB) => itemB.fileHash !== this.fileObj.fileHash);
|
|
3283
|
+
// uploadFileList = list;
|
|
3284
|
+
case 2:
|
|
3285
|
+
case "end":
|
|
3286
|
+
return _context.stop();
|
|
3287
|
+
}
|
|
3288
|
+
}, _callee, this);
|
|
3289
|
+
}));
|
|
3290
|
+
function cancelSingle() {
|
|
3291
|
+
return _cancelSingle.apply(this, arguments);
|
|
3292
|
+
}
|
|
3293
|
+
return cancelSingle;
|
|
3294
|
+
}() // 暂停上传(是暂停剩下未上传的)
|
|
3295
|
+
;
|
|
3296
|
+
_proto.pauseUpload = function pauseUpload(elsePause, error) {
|
|
3297
|
+
if (elsePause === void 0) {
|
|
3298
|
+
elsePause = true;
|
|
3299
|
+
}
|
|
3300
|
+
// elsePause为true就是主动暂停,为false就是请求中断
|
|
3301
|
+
// 4是成功 6是失败 如果不是成功或者失败状态,
|
|
3302
|
+
if (![200, 500].includes(this.fileObj.state)) {
|
|
3303
|
+
// 3是暂停,5是中断
|
|
3304
|
+
if (elsePause) {
|
|
3305
|
+
this.fileObj.state = 30;
|
|
3306
|
+
} else {
|
|
3307
|
+
this.fileObj.state = 50;
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
this.fileObj.errNumber = 0;
|
|
3311
|
+
|
|
3312
|
+
// 取消还在请求中的所有接口
|
|
3313
|
+
if (this.fileObj.whileRequests.length > 0) {
|
|
3314
|
+
for (var _iterator = _createForOfIteratorHelperLoose(this.fileObj.whileRequests), _step; !(_step = _iterator()).done;) {
|
|
3315
|
+
var itemB = _step.value;
|
|
3316
|
+
itemB.cancel ? itemB.cancel() : "";
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
if (typeof this.onUploadError === "function") {
|
|
3320
|
+
this.onUploadError(error || new Error("上传失败"));
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
// 继续上传
|
|
3324
|
+
;
|
|
3325
|
+
_proto.resumeUpload = function resumeUpload() {
|
|
3326
|
+
var _this$fileObj$allChun;
|
|
3327
|
+
// 2为上传中
|
|
3328
|
+
this.fileObj.state = 100;
|
|
3329
|
+
// 把刚才暂停的正在上传中所有切片放到待上传切片列表中
|
|
3330
|
+
(_this$fileObj$allChun = this.fileObj.allChunkList).push.apply(_this$fileObj$allChun, this.fileObj.whileRequests);
|
|
3331
|
+
this.fileObj.whileRequests = [];
|
|
3332
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
3333
|
+
}
|
|
3334
|
+
// 开始上传事件
|
|
3335
|
+
;
|
|
3336
|
+
_proto.hanldeUploadFile =
|
|
3337
|
+
/*#__PURE__*/
|
|
3338
|
+
function () {
|
|
3339
|
+
var _hanldeUploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
3340
|
+
var _this = this;
|
|
3341
|
+
var _yield$_classPrivateF, fileHash, fileChunkList, baseName, lastIndex, res, skipUpload, uploadedChunks;
|
|
3342
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3343
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
3344
|
+
case 0:
|
|
3345
|
+
_context2.prev = 0;
|
|
3346
|
+
this.fileObj.state = 10,
|
|
3347
|
+
// 0是什么都不做,1文件处理中,2是上传中,3是暂停,4是上传完成,5上传中断,6是上传失败
|
|
3348
|
+
this.fileObj.fileHash = "", this.fileObj.fileName = this.fileObj.name, this.fileObj.fileSize = this.fileObj.size, this.fileObj.allChunkList = [],
|
|
3349
|
+
// 所有请求的数据
|
|
3350
|
+
this.fileObj.whileRequests = [],
|
|
3351
|
+
// 正在请求中的请求个数,目前是要永远都保存请求个数为6
|
|
3352
|
+
this.fileObj.finishNumber = 0,
|
|
3353
|
+
//请求完成的个数
|
|
3354
|
+
this.fileObj.errNumber = 0,
|
|
3355
|
+
// 报错的个数,默认是0个,超多3个就是直接上传中断
|
|
3356
|
+
this.fileObj.percentage = 0,
|
|
3357
|
+
// 单个文件上传进度条
|
|
3358
|
+
this.fileObj.cancel = null,
|
|
3359
|
+
// 用于取消切片上传接口
|
|
3360
|
+
this.fileObj.busiType = this.busiType, this.fileObj.resume = this.resumeUpload.bind(this),
|
|
3361
|
+
//用于重新上传
|
|
3362
|
+
this.fileObj.cancel = this.cancelSingle.bind(this); //用于取消上传
|
|
3363
|
+
if (this.fileObj.size === 0) {
|
|
3364
|
+
// 文件大小为0直接上传失败
|
|
3365
|
+
this.fileObj.state = 500;
|
|
3366
|
+
// 上传中断
|
|
3367
|
+
this.pauseUpload(false, new Error("文件大小为0"));
|
|
3368
|
+
}
|
|
3369
|
+
console.log("文件开始解析");
|
|
3370
|
+
|
|
3371
|
+
// 计算文件hash
|
|
3372
|
+
_context2.next = 6;
|
|
3373
|
+
return _classPrivateFieldLooseBase(this, _useWorker)[_useWorker](this.fileObj.raw || this.fileObj.file.raw);
|
|
3374
|
+
case 6:
|
|
3375
|
+
_yield$_classPrivateF = _context2.sent;
|
|
3376
|
+
fileHash = _yield$_classPrivateF.fileHash;
|
|
3377
|
+
fileChunkList = _yield$_classPrivateF.fileChunkList;
|
|
3378
|
+
console.log(fileHash, "文件hash计算完成");
|
|
3379
|
+
|
|
3380
|
+
// 解析完成开始上传文件
|
|
3381
|
+
baseName = ""; // 查找'.'在fileName中最后出现的位置
|
|
3382
|
+
lastIndex = this.fileObj.name.lastIndexOf("."); // 如果'.'不存在,则返回整个文件名
|
|
3383
|
+
if (lastIndex === -1) {
|
|
3384
|
+
baseName = this.fileObj.name;
|
|
3385
|
+
}
|
|
3386
|
+
// 否则,返回从fileName开始到'.'前一个字符的子串作为文件名(不包含'.')
|
|
3387
|
+
baseName = "_" + Object(external_js_md5_["md5"])(this.fileObj.name.slice(0, lastIndex));
|
|
3388
|
+
// 这里要注意!可能同一个文件,是复制出来的,出现文件名不同但是内容相同,导致获取到的hash值也是相同的
|
|
3389
|
+
// 所以文件hash要特殊处理
|
|
3390
|
+
this.fileObj.fileHash = "" + fileHash + baseName;
|
|
3391
|
+
this.fileObj.fsign = fileHash;
|
|
3392
|
+
this.fileObj.state = 100;
|
|
3393
|
+
// console.log(uploadFileList.value, 'uploadFileList.value')
|
|
3394
|
+
// 上传之前要检查服务器是否存在该文件
|
|
3395
|
+
_context2.next = 19;
|
|
3396
|
+
return checkFile({
|
|
3397
|
+
fileHash: "" + fileHash + baseName,
|
|
3398
|
+
fileName: this.fileObj.name,
|
|
3399
|
+
busiType: this.fileObj.busiType
|
|
3400
|
+
}, {
|
|
3401
|
+
service: this.request
|
|
3402
|
+
});
|
|
3403
|
+
case 19:
|
|
3404
|
+
res = _context2.sent;
|
|
3405
|
+
skipUpload = res.skipUpload, uploadedChunks = res.uploadedChunks;
|
|
3406
|
+
if (skipUpload) {
|
|
3407
|
+
_context2.next = 25;
|
|
3408
|
+
break;
|
|
3409
|
+
}
|
|
3410
|
+
//this.#finishTask(fileObj)
|
|
3411
|
+
_classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
3412
|
+
console.log("文件已存在,实现秒传");
|
|
3413
|
+
return _context2.abrupt("return", false);
|
|
3414
|
+
case 25:
|
|
3415
|
+
this.fileObj.allChunkList = fileChunkList.map(function (item, index) {
|
|
3416
|
+
return {
|
|
3417
|
+
// 总文件hash
|
|
3418
|
+
fileHash: "" + fileHash + baseName,
|
|
3419
|
+
// 总文件size
|
|
3420
|
+
fileSize: _this.fileObj.size,
|
|
3421
|
+
// 总文件name
|
|
3422
|
+
fileName: _this.fileObj.name,
|
|
3423
|
+
index: index,
|
|
3424
|
+
// 切片文件本身
|
|
3425
|
+
chunkFile: item.chunkFile,
|
|
3426
|
+
// 单个切片hash,以 - 连接
|
|
3427
|
+
chunkHash: "" + fileHash + baseName + "-" + index,
|
|
3428
|
+
// 切片文件大小
|
|
3429
|
+
chunkSize: _this.chunkSize,
|
|
3430
|
+
// 切片个数
|
|
3431
|
+
chunkNumber: fileChunkList.length,
|
|
3432
|
+
// 切片是否已经完成
|
|
3433
|
+
finish: false
|
|
3434
|
+
};
|
|
3435
|
+
});
|
|
3436
|
+
|
|
3437
|
+
// 如果已存在部分文件切片,则要过滤调已经上传的切片
|
|
3438
|
+
if (!((uploadedChunks == null ? void 0 : uploadedChunks.length) > 0)) {
|
|
3439
|
+
_context2.next = 35;
|
|
3440
|
+
break;
|
|
3441
|
+
}
|
|
3442
|
+
// 过滤掉已经上传过的切片
|
|
3443
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.filter(function (item) {
|
|
3444
|
+
return !uploadedChunks.includes(item.chunkHash);
|
|
3445
|
+
// return !uploadedChunks.includes(String(item.index));
|
|
3446
|
+
});
|
|
3447
|
+
|
|
3448
|
+
// 如果存在需要上传的,但是又为空,可能是因为还没合并,
|
|
3449
|
+
if (this.fileObj.allChunkList.length) {
|
|
3450
|
+
_context2.next = 34;
|
|
3451
|
+
break;
|
|
3452
|
+
}
|
|
3453
|
+
_context2.next = 31;
|
|
3454
|
+
return _classPrivateFieldLooseBase(this, _handleMerge)[_handleMerge]();
|
|
3455
|
+
case 31:
|
|
3456
|
+
return _context2.abrupt("return", false);
|
|
3457
|
+
case 34:
|
|
3458
|
+
// 同时要注意处理切片数量
|
|
3459
|
+
this.fileObj.allChunkList = this.fileObj.allChunkList.map(function (item) {
|
|
3460
|
+
return _extends({}, item, {
|
|
3461
|
+
chunkNumber: _this.fileObj.allChunkList.length
|
|
3462
|
+
});
|
|
3463
|
+
});
|
|
3464
|
+
case 35:
|
|
3465
|
+
// 逐步对单个文件进行切片上传
|
|
3466
|
+
_classPrivateFieldLooseBase(this, _uploadSignleFile)[_uploadSignleFile]();
|
|
3467
|
+
_context2.next = 42;
|
|
3468
|
+
break;
|
|
3469
|
+
case 38:
|
|
3470
|
+
_context2.prev = 38;
|
|
3471
|
+
_context2.t0 = _context2["catch"](0);
|
|
3472
|
+
console.log(_context2.t0);
|
|
3473
|
+
this.pauseUpload(false, _context2.t0);
|
|
3474
|
+
case 42:
|
|
3475
|
+
case "end":
|
|
3476
|
+
return _context2.stop();
|
|
3477
|
+
}
|
|
3478
|
+
}, _callee2, this, [[0, 38]]);
|
|
3479
|
+
}));
|
|
3480
|
+
function hanldeUploadFile() {
|
|
3481
|
+
return _hanldeUploadFile.apply(this, arguments);
|
|
3482
|
+
}
|
|
3483
|
+
return hanldeUploadFile;
|
|
3484
|
+
}();
|
|
3485
|
+
return LargeUpload;
|
|
3486
|
+
}();
|
|
3487
|
+
function _useWorker2(file) {
|
|
3488
|
+
var _this2 = this;
|
|
3489
|
+
return new Promise(function (resolve) {
|
|
3490
|
+
// const worker = new Worker(new URL("./hash-worker.js", import.meta.url), {
|
|
3491
|
+
// type: "module",
|
|
3492
|
+
// });
|
|
3493
|
+
var worker = new Worker("./hash-worker.js", {
|
|
3494
|
+
type: "module"
|
|
3495
|
+
});
|
|
3496
|
+
worker.postMessage({
|
|
3497
|
+
file: file,
|
|
3498
|
+
chunkSize: _this2.chunkSize
|
|
3499
|
+
});
|
|
3500
|
+
worker.onmessage = function (e) {
|
|
3501
|
+
var _e$data = e.data,
|
|
3502
|
+
fileHash = _e$data.fileHash,
|
|
3503
|
+
fileChunkList = _e$data.fileChunkList;
|
|
3504
|
+
if (fileHash) {
|
|
3505
|
+
resolve({
|
|
3506
|
+
fileHash: fileHash,
|
|
3507
|
+
fileChunkList: fileChunkList
|
|
3508
|
+
});
|
|
3509
|
+
}
|
|
3510
|
+
};
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
function _finishTask2() {
|
|
3514
|
+
// 200是上传完成
|
|
3515
|
+
// this.fileObj.state = 200;
|
|
3516
|
+
if (typeof this.onUploadProgress === "function") {
|
|
3517
|
+
this.onUploadProgress({
|
|
3518
|
+
percentage: 100
|
|
3519
|
+
});
|
|
3520
|
+
return false;
|
|
3521
|
+
}
|
|
3522
|
+
this.fileObj.percentage = 100;
|
|
3523
|
+
}
|
|
3524
|
+
function _handleMerge2() {
|
|
3525
|
+
return _handleMerge3.apply(this, arguments);
|
|
3526
|
+
}
|
|
3527
|
+
function _handleMerge3() {
|
|
3528
|
+
_handleMerge3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
3529
|
+
var _this$fileObj, fileName, fileHash, fsign, fileSize, busiType, res;
|
|
3530
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
3531
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3532
|
+
case 0:
|
|
3533
|
+
_this$fileObj = this.fileObj, fileName = _this$fileObj.fileName, fileHash = _this$fileObj.fileHash, fsign = _this$fileObj.fsign, fileSize = _this$fileObj.fileSize, busiType = _this$fileObj.busiType;
|
|
3534
|
+
_context4.prev = 1;
|
|
3535
|
+
_context4.next = 4;
|
|
3536
|
+
return mergeChunk({
|
|
3537
|
+
fileName: fileName,
|
|
3538
|
+
fileHash: fileHash,
|
|
3539
|
+
fsign: fsign,
|
|
3540
|
+
fileSize: fileSize,
|
|
3541
|
+
busiType: busiType
|
|
3542
|
+
}, {
|
|
3543
|
+
service: this.request
|
|
3544
|
+
});
|
|
3545
|
+
case 4:
|
|
3546
|
+
res = _context4.sent;
|
|
3547
|
+
// 设置文件上传状态
|
|
3548
|
+
_classPrivateFieldLooseBase(this, _finishTask)[_finishTask]();
|
|
3549
|
+
console.log("文件合并成功!");
|
|
3550
|
+
// 最后赋值文件切片上传完成个数为0
|
|
3551
|
+
this.fileObj.finishNumber = 0;
|
|
3552
|
+
this.onUploadFinish(res);
|
|
3553
|
+
return _context4.abrupt("return", res);
|
|
3554
|
+
case 12:
|
|
3555
|
+
_context4.prev = 12;
|
|
3556
|
+
_context4.t0 = _context4["catch"](1);
|
|
3557
|
+
this.pauseUpload(false, _context4.t0);
|
|
3558
|
+
console.log("文件合并失败!");
|
|
3559
|
+
// 最后赋值文件切片上传完成个数为0
|
|
3560
|
+
this.fileObj.finishNumber = 0;
|
|
3561
|
+
this.onUploadError(_context4.t0);
|
|
3562
|
+
return _context4.abrupt("return", null);
|
|
3563
|
+
case 19:
|
|
3564
|
+
case "end":
|
|
3565
|
+
return _context4.stop();
|
|
3566
|
+
}
|
|
3567
|
+
}, _callee4, this, [[1, 12]]);
|
|
3568
|
+
}));
|
|
3569
|
+
return _handleMerge3.apply(this, arguments);
|
|
3570
|
+
}
|
|
3571
|
+
function _signleFileProgress2(needObj) {
|
|
3572
|
+
// 即使是超时请求也是会频繁的返回上传进度的,所以只能写成完成一片就添加它所占百分之多少,否则会造成误会
|
|
3573
|
+
var percentage = Number((this.fileObj.finishNumber / needObj.chunkNumber * 100).toFixed(2));
|
|
3574
|
+
if (typeof this.onUploadProgress === "function") {
|
|
3575
|
+
this.onUploadProgress({
|
|
3576
|
+
percentage: percentage
|
|
3577
|
+
});
|
|
3578
|
+
return false;
|
|
3579
|
+
}
|
|
3580
|
+
this.fileObj.percentage = percentage;
|
|
3581
|
+
}
|
|
3582
|
+
function _uploadSignleFile2() {
|
|
3583
|
+
var _this$fileObj$whileRe,
|
|
3584
|
+
_this3 = this;
|
|
3585
|
+
// 如果没有需要上传的切片 / 正在上传的切片还没传完,就不做处理
|
|
3586
|
+
if (this.fileObj.allChunkList.length === 0 || this.fileObj.whileRequests.length > 0) {
|
|
3587
|
+
return false;
|
|
3588
|
+
}
|
|
3589
|
+
// 找到文件处于处理中/上传中的 文件列表(是文件而不是切片)
|
|
3590
|
+
var isTaskArrIng = this.uploadFileList.filter(function (itemB) {
|
|
3591
|
+
return itemB.state === 10 || itemB.state === 100;
|
|
3592
|
+
});
|
|
3689
3593
|
|
|
3690
|
-
//
|
|
3594
|
+
// 实时动态获取并发请求数,每次调请求前都获取一次最大并发数
|
|
3595
|
+
// 浏览器同域名同一时间请求的最大并发数限制为6
|
|
3596
|
+
// 例如如果有3个文件同时上传/处理中,则每个文件切片接口最多调 6 / 3 == 2个相同的接口
|
|
3597
|
+
this.maxRequest = Math.ceil(this.batchMaxCount / isTaskArrIng.length);
|
|
3691
3598
|
|
|
3692
|
-
//
|
|
3693
|
-
var
|
|
3694
|
-
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
3599
|
+
// 从数组的末尾开始提取 maxRequest 个元素。
|
|
3600
|
+
var whileRequest = this.fileObj.allChunkList.slice(-this.maxRequest);
|
|
3695
3601
|
|
|
3696
|
-
//
|
|
3697
|
-
|
|
3698
|
-
|
|
3602
|
+
// 设置正在请求中的个数
|
|
3603
|
+
(_this$fileObj$whileRe = this.fileObj.whileRequests).push.apply(_this$fileObj$whileRe, whileRequest);
|
|
3604
|
+
// 如果总请求数大于并发数
|
|
3605
|
+
if (this.fileObj.allChunkList.length > this.maxRequest) {
|
|
3606
|
+
// 则减去并发数
|
|
3607
|
+
this.fileObj.allChunkList.splice(-this.maxRequest);
|
|
3608
|
+
} else {
|
|
3609
|
+
// 否则总请求数置空,说明已经把没请求的全部放进请求列表了,不需要做过多请求
|
|
3610
|
+
this.fileObj.allChunkList = [];
|
|
3611
|
+
}
|
|
3699
3612
|
|
|
3700
|
-
//
|
|
3701
|
-
var
|
|
3613
|
+
// 单个分片请求
|
|
3614
|
+
var uploadChunk = /*#__PURE__*/function () {
|
|
3615
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(needObj) {
|
|
3616
|
+
var fd, fileHash, fileSize, fileName, index, chunkFile, chunkHash, chunkSize, chunkNumber;
|
|
3617
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
3618
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
3619
|
+
case 0:
|
|
3620
|
+
fd = new FormData();
|
|
3621
|
+
fileHash = needObj.fileHash, fileSize = needObj.fileSize, fileName = needObj.fileName, index = needObj.index, chunkFile = needObj.chunkFile, chunkHash = needObj.chunkHash, chunkSize = needObj.chunkSize, chunkNumber = needObj.chunkNumber;
|
|
3622
|
+
fd.append("fileHash", fileHash);
|
|
3623
|
+
fd.append("fileSize", String(fileSize));
|
|
3624
|
+
fd.append("fileName", fileName);
|
|
3625
|
+
fd.append("index", String(index));
|
|
3626
|
+
fd.append("chunkFile", chunkFile);
|
|
3627
|
+
fd.append("chunkHash", chunkHash);
|
|
3628
|
+
fd.append("chunkSize", String(chunkSize));
|
|
3629
|
+
fd.append("chunkNumber", String(chunkNumber));
|
|
3630
|
+
fd.append("fileMd5", fileHash);
|
|
3631
|
+
fd.append("chunkIndex", String(index));
|
|
3632
|
+
_context3.prev = 12;
|
|
3633
|
+
_context3.next = 15;
|
|
3634
|
+
return uploadFile(fd, {
|
|
3635
|
+
onCancel: function onCancel(onCancelFunc) {
|
|
3636
|
+
// 在调用接口的同时,相当于同时调用了传入的这个函数,又能同时拿到返回的取消方法去赋值
|
|
3637
|
+
needObj.cancel = onCancelFunc;
|
|
3638
|
+
},
|
|
3639
|
+
service: _this3.request
|
|
3640
|
+
});
|
|
3641
|
+
case 15:
|
|
3642
|
+
if (!(_this3.fileObj.state === 30 || _this3.fileObj.state === 50)) {
|
|
3643
|
+
_context3.next = 17;
|
|
3644
|
+
break;
|
|
3645
|
+
}
|
|
3646
|
+
return _context3.abrupt("return", false);
|
|
3647
|
+
case 17:
|
|
3648
|
+
// 单个文件上传失败次数大于0则要减少一个
|
|
3649
|
+
_this3.fileObj.errNumber > 0 ? _this3.fileObj.errNumber-- : 0;
|
|
3650
|
+
// 单个文件切片上传成功数+1
|
|
3651
|
+
_this3.fileObj.finishNumber++;
|
|
3652
|
+
// 单个切片上传完成
|
|
3653
|
+
needObj.finish = true;
|
|
3654
|
+
_classPrivateFieldLooseBase(_this3, _signleFileProgress)[_signleFileProgress](needObj); // 更新进度条
|
|
3655
|
+
// 上传成功了就删掉请求中数组中的那一片请求
|
|
3656
|
+
_this3.fileObj.whileRequests = _this3.fileObj.whileRequests.filter(function (item) {
|
|
3657
|
+
return item.chunkFile !== needObj.chunkFile;
|
|
3658
|
+
});
|
|
3659
|
+
// 如果单个文件最终成功数等于切片个数
|
|
3660
|
+
if (_this3.fileObj.finishNumber === chunkNumber) {
|
|
3661
|
+
// 全部上传完切片后就开始合并切片
|
|
3662
|
+
_classPrivateFieldLooseBase(_this3, _handleMerge)[_handleMerge]();
|
|
3663
|
+
} else {
|
|
3664
|
+
// 如果还没完全上传完,则继续上传
|
|
3665
|
+
_classPrivateFieldLooseBase(_this3, _uploadSignleFile)[_uploadSignleFile]();
|
|
3666
|
+
}
|
|
3667
|
+
_context3.next = 30;
|
|
3668
|
+
break;
|
|
3669
|
+
case 25:
|
|
3670
|
+
_context3.prev = 25;
|
|
3671
|
+
_context3.t0 = _context3["catch"](12);
|
|
3672
|
+
// 请求异常,或者请求成功服务端返回报错都按单片上传失败逻辑处理,.then.catch的.catch是只能捕捉请求异常的
|
|
3673
|
+
_this3.fileObj.errNumber++;
|
|
3674
|
+
// 超过3次之后直接上传中断
|
|
3675
|
+
if (_this3.fileObj.errNumber > 3) {
|
|
3676
|
+
console.log("切片上传失败超过三次了");
|
|
3677
|
+
_this3.pauseUpload(false, _context3.t0); // 上传中断
|
|
3678
|
+
} else {
|
|
3679
|
+
console.log("切片上传失败还没超过3次");
|
|
3680
|
+
uploadChunk(needObj); // 失败了一片,继续当前分片请求
|
|
3681
|
+
}
|
|
3682
|
+
return _context3.abrupt("return", false);
|
|
3683
|
+
case 30:
|
|
3684
|
+
case "end":
|
|
3685
|
+
return _context3.stop();
|
|
3686
|
+
}
|
|
3687
|
+
}, _callee3, null, [[12, 25]]);
|
|
3688
|
+
}));
|
|
3689
|
+
return function uploadChunk(_x) {
|
|
3690
|
+
return _ref.apply(this, arguments);
|
|
3691
|
+
};
|
|
3692
|
+
}();
|
|
3693
|
+
// 开始单个上传
|
|
3694
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(whileRequest), _step2; !(_step2 = _iterator2()).done;) {
|
|
3695
|
+
var item = _step2.value;
|
|
3696
|
+
uploadChunk(item);
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3702
3699
|
|
|
3703
3700
|
// 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
3701
|
|
|
@@ -4029,7 +4026,7 @@ var large_upload = __webpack_require__(42);
|
|
|
4029
4026
|
uploadingLarge: function uploadingLarge(fileUpload) {
|
|
4030
4027
|
var _this$api,
|
|
4031
4028
|
_this3 = this;
|
|
4032
|
-
var largeUpload = new
|
|
4029
|
+
var largeUpload = new large_upload_LargeUpload(fileUpload, {
|
|
4033
4030
|
request: this.request,
|
|
4034
4031
|
uploadFileList: this.fileList,
|
|
4035
4032
|
chunkSize: this.largeChunkSize,
|
|
@@ -4207,23 +4204,23 @@ var upload_process_component = normalizeComponent(
|
|
|
4207
4204
|
|
|
4208
4205
|
/* harmony default export */ var upload_process = (upload_process_component.exports);
|
|
4209
4206
|
// EXTERNAL MODULE: external "element-ui/lib/switch"
|
|
4210
|
-
var switch_ = __webpack_require__(
|
|
4207
|
+
var switch_ = __webpack_require__(42);
|
|
4211
4208
|
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);
|
|
4212
4209
|
|
|
4213
4210
|
// EXTERNAL MODULE: external "element-ui/lib/slider"
|
|
4214
|
-
var slider_ = __webpack_require__(
|
|
4211
|
+
var slider_ = __webpack_require__(43);
|
|
4215
4212
|
var slider_default = /*#__PURE__*/__webpack_require__.n(slider_);
|
|
4216
4213
|
|
|
4217
4214
|
// EXTERNAL MODULE: external "element-ui/lib/transfer"
|
|
4218
|
-
var transfer_ = __webpack_require__(
|
|
4215
|
+
var transfer_ = __webpack_require__(44);
|
|
4219
4216
|
var transfer_default = /*#__PURE__*/__webpack_require__.n(transfer_);
|
|
4220
4217
|
|
|
4221
4218
|
// EXTERNAL MODULE: external "element-ui/lib/time-picker"
|
|
4222
|
-
var time_picker_ = __webpack_require__(
|
|
4219
|
+
var time_picker_ = __webpack_require__(45);
|
|
4223
4220
|
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);
|
|
4224
4221
|
|
|
4225
4222
|
// EXTERNAL MODULE: external "element-ui/lib/upload"
|
|
4226
|
-
var upload_ = __webpack_require__(
|
|
4223
|
+
var upload_ = __webpack_require__(46);
|
|
4227
4224
|
var upload_default = /*#__PURE__*/__webpack_require__.n(upload_);
|
|
4228
4225
|
|
|
4229
4226
|
// CONCATENATED MODULE: ./src/components/form/src/form-input.js
|
|
@@ -4310,7 +4307,7 @@ form_input.install = function (Vue) {
|
|
|
4310
4307
|
};
|
|
4311
4308
|
/* harmony default export */ var components_form_input = (form_input);
|
|
4312
4309
|
// EXTERNAL MODULE: external "element-ui/lib/form-item"
|
|
4313
|
-
var lib_form_item_ = __webpack_require__(
|
|
4310
|
+
var lib_form_item_ = __webpack_require__(47);
|
|
4314
4311
|
var lib_form_item_default = /*#__PURE__*/__webpack_require__.n(lib_form_item_);
|
|
4315
4312
|
|
|
4316
4313
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-input"
|
|
@@ -4397,6 +4394,13 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
4397
4394
|
}
|
|
4398
4395
|
var rulesList = Array.isArray(this.rules) ? this.rules : [this.rules];
|
|
4399
4396
|
return rulesList.filter(function (item) {
|
|
4397
|
+
if (typeof item.disabled === "function") {
|
|
4398
|
+
return item.disabled.call(_this, {
|
|
4399
|
+
form: _this.form,
|
|
4400
|
+
formModel: _this.form.formModel,
|
|
4401
|
+
config: _this.config
|
|
4402
|
+
});
|
|
4403
|
+
}
|
|
4400
4404
|
return item.disabled !== true;
|
|
4401
4405
|
}).map(function (item) {
|
|
4402
4406
|
if (typeof item.validator === "function") {
|
|
@@ -4550,7 +4554,7 @@ form_item.install = function (Vue) {
|
|
|
4550
4554
|
// 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-query/src/form.vue?vue&type=script&lang=js
|
|
4551
4555
|
|
|
4552
4556
|
|
|
4553
|
-
function
|
|
4557
|
+
function formvue_type_script_lang_js_extends() { formvue_type_script_lang_js_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 formvue_type_script_lang_js_extends.apply(this, arguments); }
|
|
4554
4558
|
|
|
4555
4559
|
|
|
4556
4560
|
|
|
@@ -4819,12 +4823,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
4819
4823
|
}
|
|
4820
4824
|
currentSpan += colSpan;
|
|
4821
4825
|
var itemProp = {
|
|
4822
|
-
attrs: Object.assign(
|
|
4826
|
+
attrs: Object.assign(formvue_type_script_lang_js_extends({}, itemDom), {
|
|
4823
4827
|
config: itemDom,
|
|
4824
4828
|
value: _this2.formModel[itemDom.prop],
|
|
4825
4829
|
actions: _this2.actionItem[itemDom.prop]
|
|
4826
4830
|
}),
|
|
4827
|
-
on: Object.assign(
|
|
4831
|
+
on: Object.assign(formvue_type_script_lang_js_extends({}, itemDom.on))
|
|
4828
4832
|
};
|
|
4829
4833
|
return h("el-col", {
|
|
4830
4834
|
"key": itemKey,
|
|
@@ -5353,9 +5357,9 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
5353
5357
|
|
|
5354
5358
|
|
|
5355
5359
|
|
|
5356
|
-
function
|
|
5357
|
-
function
|
|
5358
|
-
function
|
|
5360
|
+
function srcvue_type_script_lang_js_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ srcvue_type_script_lang_js_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; }
|
|
5361
|
+
function srcvue_type_script_lang_js_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); } }
|
|
5362
|
+
function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { srcvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { srcvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5359
5363
|
|
|
5360
5364
|
|
|
5361
5365
|
|
|
@@ -5528,9 +5532,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
5528
5532
|
submit: function submit(button) {
|
|
5529
5533
|
var _this3 = this;
|
|
5530
5534
|
this.$refs.form.validate( /*#__PURE__*/function () {
|
|
5531
|
-
var _ref =
|
|
5535
|
+
var _ref = srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee(isValidate, errorMessage) {
|
|
5532
5536
|
var reqData;
|
|
5533
|
-
return
|
|
5537
|
+
return srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5534
5538
|
while (1) switch (_context.prev = _context.next) {
|
|
5535
5539
|
case 0:
|
|
5536
5540
|
if (isValidate) {
|
|
@@ -5735,7 +5739,7 @@ form_dialog_src.install = function (Vue) {
|
|
|
5735
5739
|
};
|
|
5736
5740
|
/* harmony default export */ var form_dialog = (form_dialog_src);
|
|
5737
5741
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/drawer"
|
|
5738
|
-
var drawer_ = __webpack_require__(
|
|
5742
|
+
var drawer_ = __webpack_require__(28);
|
|
5739
5743
|
var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
5740
5744
|
|
|
5741
5745
|
// 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
|
|
@@ -6025,11 +6029,11 @@ form_drawer_src.install = function (Vue) {
|
|
|
6025
6029
|
};
|
|
6026
6030
|
/* harmony default export */ var form_drawer = (form_drawer_src);
|
|
6027
6031
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
6028
|
-
var descriptions_ = __webpack_require__(
|
|
6032
|
+
var descriptions_ = __webpack_require__(48);
|
|
6029
6033
|
var descriptions_default = /*#__PURE__*/__webpack_require__.n(descriptions_);
|
|
6030
6034
|
|
|
6031
6035
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions-item"
|
|
6032
|
-
var descriptions_item_ = __webpack_require__(
|
|
6036
|
+
var descriptions_item_ = __webpack_require__(49);
|
|
6033
6037
|
var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_item_);
|
|
6034
6038
|
|
|
6035
6039
|
// EXTERNAL MODULE: external "dayjs"
|
|
@@ -6860,7 +6864,7 @@ var table_column_ = __webpack_require__(4);
|
|
|
6860
6864
|
var table_column_default = /*#__PURE__*/__webpack_require__.n(table_column_);
|
|
6861
6865
|
|
|
6862
6866
|
// EXTERNAL MODULE: external "element-ui/lib/pagination"
|
|
6863
|
-
var pagination_ = __webpack_require__(
|
|
6867
|
+
var pagination_ = __webpack_require__(50);
|
|
6864
6868
|
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);
|
|
6865
6869
|
|
|
6866
6870
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-column"
|
|
@@ -7721,19 +7725,19 @@ var dict_component = normalizeComponent(
|
|
|
7721
7725
|
|
|
7722
7726
|
/* harmony default export */ var dict = (dict_component.exports);
|
|
7723
7727
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown"
|
|
7724
|
-
var dropdown_ = __webpack_require__(
|
|
7728
|
+
var dropdown_ = __webpack_require__(51);
|
|
7725
7729
|
var dropdown_default = /*#__PURE__*/__webpack_require__.n(dropdown_);
|
|
7726
7730
|
|
|
7727
7731
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-item"
|
|
7728
|
-
var dropdown_item_ = __webpack_require__(
|
|
7732
|
+
var dropdown_item_ = __webpack_require__(52);
|
|
7729
7733
|
var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
|
|
7730
7734
|
|
|
7731
7735
|
// EXTERNAL MODULE: external "element-ui/lib/dropdown-menu"
|
|
7732
|
-
var dropdown_menu_ = __webpack_require__(
|
|
7736
|
+
var dropdown_menu_ = __webpack_require__(53);
|
|
7733
7737
|
var dropdown_menu_default = /*#__PURE__*/__webpack_require__.n(dropdown_menu_);
|
|
7734
7738
|
|
|
7735
7739
|
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
7736
|
-
var link_ = __webpack_require__(
|
|
7740
|
+
var link_ = __webpack_require__(29);
|
|
7737
7741
|
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
7738
7742
|
|
|
7739
7743
|
// 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
|
|
@@ -8222,11 +8226,11 @@ srcvue_type_template_id_1e4d345a_render._withStripped = true
|
|
|
8222
8226
|
// CONCATENATED MODULE: ./src/components/table-search/src/index.vue?vue&type=template&id=1e4d345a
|
|
8223
8227
|
|
|
8224
8228
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/form-query"
|
|
8225
|
-
var form_query_ = __webpack_require__(
|
|
8229
|
+
var form_query_ = __webpack_require__(54);
|
|
8226
8230
|
var form_query_default = /*#__PURE__*/__webpack_require__.n(form_query_);
|
|
8227
8231
|
|
|
8228
8232
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table"
|
|
8229
|
-
var components_table_ = __webpack_require__(
|
|
8233
|
+
var components_table_ = __webpack_require__(55);
|
|
8230
8234
|
var components_table_default = /*#__PURE__*/__webpack_require__.n(components_table_);
|
|
8231
8235
|
|
|
8232
8236
|
// 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
|
|
@@ -8390,11 +8394,11 @@ srcvue_type_template_id_6b45ef10_render._withStripped = true
|
|
|
8390
8394
|
// CONCATENATED MODULE: ./src/components/table-editable/src/index.vue?vue&type=template&id=6b45ef10
|
|
8391
8395
|
|
|
8392
8396
|
// EXTERNAL MODULE: external "element-ui/lib/popover"
|
|
8393
|
-
var popover_ = __webpack_require__(
|
|
8397
|
+
var popover_ = __webpack_require__(56);
|
|
8394
8398
|
var popover_default = /*#__PURE__*/__webpack_require__.n(popover_);
|
|
8395
8399
|
|
|
8396
8400
|
// EXTERNAL MODULE: external "async-validator"
|
|
8397
|
-
var external_async_validator_ = __webpack_require__(
|
|
8401
|
+
var external_async_validator_ = __webpack_require__(57);
|
|
8398
8402
|
var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
|
|
8399
8403
|
|
|
8400
8404
|
// CONCATENATED MODULE: ./src/components/table-editable/src/form-item.js
|
|
@@ -9439,9 +9443,9 @@ srcvue_type_template_id_0100425c_render._withStripped = true
|
|
|
9439
9443
|
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=0100425c
|
|
9440
9444
|
|
|
9441
9445
|
// 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/crud/src/index.vue?vue&type=script&lang=js
|
|
9442
|
-
function
|
|
9443
|
-
function
|
|
9444
|
-
function
|
|
9446
|
+
function crud_srcvue_type_script_lang_js_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ crud_srcvue_type_script_lang_js_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; }
|
|
9447
|
+
function crud_srcvue_type_script_lang_js_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); } }
|
|
9448
|
+
function crud_srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { crud_srcvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { crud_srcvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
9445
9449
|
|
|
9446
9450
|
|
|
9447
9451
|
|
|
@@ -9681,9 +9685,9 @@ function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () {
|
|
|
9681
9685
|
},
|
|
9682
9686
|
handleUpdate: function handleUpdate(rowProps, that) {
|
|
9683
9687
|
var _this2 = this;
|
|
9684
|
-
return
|
|
9688
|
+
return crud_srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/crud_srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee2() {
|
|
9685
9689
|
var rowData, detailApi, request, reqData;
|
|
9686
|
-
return
|
|
9690
|
+
return crud_srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9687
9691
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9688
9692
|
case 0:
|
|
9689
9693
|
rowData = rowProps.row;
|
|
@@ -9707,8 +9711,8 @@ function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () {
|
|
|
9707
9711
|
method: detailApi.method || "GET",
|
|
9708
9712
|
data: reqData
|
|
9709
9713
|
}).then( /*#__PURE__*/function () {
|
|
9710
|
-
var _ref =
|
|
9711
|
-
return
|
|
9714
|
+
var _ref = crud_srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/crud_srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee(res) {
|
|
9715
|
+
return crud_srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9712
9716
|
while (1) switch (_context.prev = _context.next) {
|
|
9713
9717
|
case 0:
|
|
9714
9718
|
that.loading = false;
|
|
@@ -9763,9 +9767,9 @@ function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () {
|
|
|
9763
9767
|
confirmButtonText: '确定',
|
|
9764
9768
|
cancelButtonText: '取消',
|
|
9765
9769
|
type: 'warning'
|
|
9766
|
-
}).then( /*#__PURE__*/
|
|
9770
|
+
}).then( /*#__PURE__*/crud_srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/crud_srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee3() {
|
|
9767
9771
|
var request, reqData;
|
|
9768
|
-
return
|
|
9772
|
+
return crud_srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
9769
9773
|
while (1) switch (_context3.prev = _context3.next) {
|
|
9770
9774
|
case 0:
|
|
9771
9775
|
request = _this3.getRequest(deleteApi.request);
|
|
@@ -9816,9 +9820,9 @@ function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () {
|
|
|
9816
9820
|
},
|
|
9817
9821
|
handleView: function handleView(rowProps, that) {
|
|
9818
9822
|
var _this4 = this;
|
|
9819
|
-
return
|
|
9823
|
+
return crud_srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/crud_srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee5() {
|
|
9820
9824
|
var rowData, viewApi, request, reqData;
|
|
9821
|
-
return
|
|
9825
|
+
return crud_srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
9822
9826
|
while (1) switch (_context5.prev = _context5.next) {
|
|
9823
9827
|
case 0:
|
|
9824
9828
|
rowData = rowProps.row;
|
|
@@ -9842,8 +9846,8 @@ function srcvue_type_script_lang_js_asyncToGenerator(fn) { return function () {
|
|
|
9842
9846
|
method: viewApi.method || "GET",
|
|
9843
9847
|
data: reqData
|
|
9844
9848
|
}).then( /*#__PURE__*/function () {
|
|
9845
|
-
var _ref3 =
|
|
9846
|
-
return
|
|
9849
|
+
var _ref3 = crud_srcvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/crud_srcvue_type_script_lang_js_regeneratorRuntime().mark(function _callee4(res) {
|
|
9850
|
+
return crud_srcvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
9847
9851
|
while (1) switch (_context4.prev = _context4.next) {
|
|
9848
9852
|
case 0:
|
|
9849
9853
|
that.loading = false;
|
|
@@ -9915,20 +9919,20 @@ crud_src.install = function (Vue) {
|
|
|
9915
9919
|
};
|
|
9916
9920
|
/* harmony default export */ var crud = (crud_src);
|
|
9917
9921
|
// EXTERNAL MODULE: external "codemirror"
|
|
9918
|
-
var external_codemirror_ = __webpack_require__(
|
|
9922
|
+
var external_codemirror_ = __webpack_require__(27);
|
|
9919
9923
|
var external_codemirror_default = /*#__PURE__*/__webpack_require__.n(external_codemirror_);
|
|
9920
9924
|
|
|
9921
9925
|
// EXTERNAL MODULE: external "codemirror/mode/javascript/javascript"
|
|
9922
|
-
var javascript_ = __webpack_require__(
|
|
9926
|
+
var javascript_ = __webpack_require__(62);
|
|
9923
9927
|
|
|
9924
9928
|
// EXTERNAL MODULE: external "codemirror/mode/htmlmixed/htmlmixed"
|
|
9925
|
-
var htmlmixed_ = __webpack_require__(
|
|
9929
|
+
var htmlmixed_ = __webpack_require__(63);
|
|
9926
9930
|
|
|
9927
9931
|
// EXTERNAL MODULE: external "codemirror/addon/mode/simple"
|
|
9928
|
-
var simple_ = __webpack_require__(
|
|
9932
|
+
var simple_ = __webpack_require__(64);
|
|
9929
9933
|
|
|
9930
9934
|
// EXTERNAL MODULE: external "codemirror/addon/mode/multiplex"
|
|
9931
|
-
var multiplex_ = __webpack_require__(
|
|
9935
|
+
var multiplex_ = __webpack_require__(65);
|
|
9932
9936
|
|
|
9933
9937
|
// CONCATENATED MODULE: ./src/components/formula/src/codeMirror.js
|
|
9934
9938
|
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; }
|
|
@@ -10147,11 +10151,11 @@ function funcList_extends() { funcList_extends = Object.assign ? Object.assign.b
|
|
|
10147
10151
|
}
|
|
10148
10152
|
});
|
|
10149
10153
|
// EXTERNAL MODULE: external "element-ui/lib/tree"
|
|
10150
|
-
var tree_ = __webpack_require__(
|
|
10154
|
+
var tree_ = __webpack_require__(58);
|
|
10151
10155
|
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
|
|
10152
10156
|
|
|
10153
10157
|
// EXTERNAL MODULE: external "element-ui/lib/badge"
|
|
10154
|
-
var badge_ = __webpack_require__(
|
|
10158
|
+
var badge_ = __webpack_require__(59);
|
|
10155
10159
|
var badge_default = /*#__PURE__*/__webpack_require__.n(badge_);
|
|
10156
10160
|
|
|
10157
10161
|
// CONCATENATED MODULE: ./src/components/formula/src/variableList.js
|
|
@@ -12538,7 +12542,7 @@ var popup_ = __webpack_require__(25);
|
|
|
12538
12542
|
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);
|
|
12539
12543
|
|
|
12540
12544
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
12541
|
-
var migrating_ = __webpack_require__(
|
|
12545
|
+
var migrating_ = __webpack_require__(60);
|
|
12542
12546
|
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
12543
12547
|
|
|
12544
12548
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|