eoss-ui 0.8.22 → 0.8.24
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/button-group.js +228 -231
- package/lib/button.js +166 -153
- package/lib/calendar.js +2 -2
- package/lib/calogin.js +160 -146
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +162 -148
- package/lib/clients.js +2 -2
- package/lib/config/api.js +5 -0
- package/lib/data-table-form.js +162 -148
- package/lib/data-table.js +165 -151
- package/lib/date-picker.js +159 -146
- package/lib/dialog.js +166 -153
- package/lib/enable-drag.js +2 -2
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +732 -256
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +159 -146
- package/lib/flow-list.js +270 -257
- package/lib/flow.js +286 -272
- package/lib/form.js +161 -148
- package/lib/handle-user.js +160 -147
- package/lib/handler.js +160 -147
- package/lib/icon.js +160 -147
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +159 -146
- package/lib/input.js +159 -146
- package/lib/label.js +2 -2
- package/lib/layout.js +2 -2
- package/lib/login.js +174 -160
- package/lib/main.js +263 -244
- package/lib/menu.js +2 -2
- package/lib/nav.js +159 -146
- package/lib/notify.js +157 -148
- package/lib/page.js +159 -146
- package/lib/pagination.js +159 -146
- package/lib/player.js +164 -151
- package/lib/qr-code.js +161 -148
- package/lib/radio-group.js +161 -148
- package/lib/retrial-auth.js +163 -150
- package/lib/select-ganged.js +161 -148
- package/lib/select.js +161 -148
- package/lib/selector-panel.js +178 -164
- package/lib/selector.js +161 -148
- package/lib/sizer.js +168 -155
- package/lib/steps.js +159 -146
- package/lib/switch.js +159 -146
- package/lib/table-form.js +159 -146
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +159 -146
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/tips.js +160 -147
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +159 -146
- package/lib/tree.js +160 -147
- package/lib/upload.js +698 -223
- package/lib/utils/util.js +5 -1
- package/lib/wujie.js +159 -146
- package/lib/wxlogin.js +159 -146
- package/package.json +162 -161
- package/packages/.DS_Store +0 -0
- package/packages/button-group/src/main.vue +346 -346
- package/packages/calogin/.DS_Store +0 -0
- package/packages/calogin/src/main.vue +412 -412
- package/packages/clients/src/main.vue +151 -151
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/dialog/.DS_Store +0 -0
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/src/.DS_Store +0 -0
- package/packages/flow/src/component/CommonOpinions.vue +376 -376
- package/packages/flow/src/component/FileList.vue +97 -97
- package/packages/flow/src/component/SendMsg.vue +242 -242
- package/packages/flow/src/component/SortFlow.vue +110 -110
- package/packages/flow/src/form.vue +123 -123
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-list/.DS_Store +0 -0
- package/packages/flow-list/src/main.vue +2337 -2337
- package/packages/form/.DS_Store +0 -0
- package/packages/form/src/table.vue +1512 -1512
- package/packages/icon/.DS_Store +0 -0
- package/packages/icon/src/main.vue +104 -104
- package/packages/login/.DS_Store +0 -0
- package/packages/login/src/resetPassword.vue +557 -557
- package/packages/main/.DS_Store +0 -0
- package/packages/main/src/.DS_Store +0 -0
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +464 -464
- package/packages/main/src/public/settings.vue +273 -273
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +158 -158
- package/packages/main/src/simplicity/index.vue +11 -5
- package/packages/main/src/simplicity/menu-list.vue +135 -135
- package/packages/main/src/simplicity/message.vue +293 -293
- package/packages/main/src/simplicity/notice.vue +222 -222
- package/packages/main/src/simplicity/sub-menu.vue +276 -276
- package/packages/main/src/simplicity/user.vue +259 -259
- package/packages/main/src/simplicityTop/apps.vue +388 -388
- package/packages/main/src/simplicityTop/avatar.vue +82 -82
- package/packages/main/src/simplicityTop/handler.vue +215 -215
- package/packages/main/src/simplicityTop/lists.vue +84 -84
- package/packages/main/src/simplicityTop/menu-list.vue +135 -135
- package/packages/main/src/simplicityTop/message.vue +293 -293
- package/packages/main/src/simplicityTop/notice.vue +222 -222
- package/packages/main/src/simplicityTop/router-page.vue +45 -45
- package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
- package/packages/main/src/simplicityTop/user.vue +259 -259
- package/packages/menu/.DS_Store +0 -0
- package/packages/nav/src/main.vue +351 -351
- package/packages/player/src/main.vue +1 -1
- package/packages/select/.DS_Store +0 -0
- package/packages/selector/.DS_Store +0 -0
- package/packages/selector/src/main.vue +761 -761
- package/packages/selector-panel/.DS_Store +0 -0
- package/packages/selector-panel/src/main.vue +1036 -1036
- package/packages/selector-panel/src/selection.vue +174 -174
- package/packages/switch/src/main.vue +170 -170
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/tree.css +1 -1
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/packages/theme-chalk/src/data-table.scss +297 -297
- package/packages/theme-chalk/src/flow-list.scss +55 -55
- package/packages/theme-chalk/src/form.scss +501 -501
- package/packages/theme-chalk/src/handler.scss +148 -148
- package/packages/theme-chalk/src/icon.scss +3452 -3452
- package/packages/theme-chalk/src/login.scss +1006 -1006
- package/packages/theme-chalk/src/main.scss +664 -664
- package/packages/theme-chalk/src/menu.scss +224 -224
- package/packages/theme-chalk/src/selector.scss +114 -114
- package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
- package/packages/theme-chalk/src/simplicity.scss +1403 -1403
- package/packages/theme-chalk/src/tree.scss +167 -165
- package/packages/theme-chalk/src/upload.scss +172 -172
- package/packages/tips/src/main.vue +141 -141
- package/packages/upload/.DS_Store +0 -0
- package/packages/upload/src/main.vue +482 -14
- package/packages/wujie/src/main.vue +146 -146
- package/src/.DS_Store +0 -0
- package/src/config/api.js +5 -0
- package/src/index.js +163 -163
- package/src/utils/.DS_Store +0 -0
- package/src/utils/rules.js +18 -18
- package/src/utils/util.js +6 -1
package/lib/eoss-ui.common.js
CHANGED
|
@@ -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 = 20);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -132,7 +132,7 @@ module.exports = require("video.js");
|
|
|
132
132
|
/***/ (function(module, exports, __webpack_require__) {
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
var content = __webpack_require__(
|
|
135
|
+
var content = __webpack_require__(24);
|
|
136
136
|
|
|
137
137
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
138
138
|
|
|
@@ -146,7 +146,7 @@ var options = {"hmr":true}
|
|
|
146
146
|
options.transform = transform
|
|
147
147
|
options.insertInto = undefined;
|
|
148
148
|
|
|
149
|
-
var update = __webpack_require__(
|
|
149
|
+
var update = __webpack_require__(26)(content, options);
|
|
150
150
|
|
|
151
151
|
if(content.locals) module.exports = content.locals;
|
|
152
152
|
|
|
@@ -220,25 +220,31 @@ module.exports = require("js-base64");
|
|
|
220
220
|
|
|
221
221
|
/***/ }),
|
|
222
222
|
/* 19 */
|
|
223
|
+
/***/ (function(module, exports) {
|
|
224
|
+
|
|
225
|
+
module.exports = require("spark-md5");
|
|
226
|
+
|
|
227
|
+
/***/ }),
|
|
228
|
+
/* 20 */
|
|
223
229
|
/***/ (function(module, exports, __webpack_require__) {
|
|
224
230
|
|
|
225
|
-
module.exports = __webpack_require__(
|
|
231
|
+
module.exports = __webpack_require__(30);
|
|
226
232
|
|
|
227
233
|
|
|
228
234
|
/***/ }),
|
|
229
|
-
/*
|
|
235
|
+
/* 21 */
|
|
230
236
|
/***/ (function(module, exports) {
|
|
231
237
|
|
|
232
238
|
module.exports = require("sm-crypto");
|
|
233
239
|
|
|
234
240
|
/***/ }),
|
|
235
|
-
/*
|
|
241
|
+
/* 22 */
|
|
236
242
|
/***/ (function(module, exports) {
|
|
237
243
|
|
|
238
244
|
module.exports = require("lodash");
|
|
239
245
|
|
|
240
246
|
/***/ }),
|
|
241
|
-
/*
|
|
247
|
+
/* 23 */
|
|
242
248
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
243
249
|
|
|
244
250
|
"use strict";
|
|
@@ -248,17 +254,17 @@ module.exports = require("lodash");
|
|
|
248
254
|
|
|
249
255
|
|
|
250
256
|
/***/ }),
|
|
251
|
-
/*
|
|
257
|
+
/* 24 */
|
|
252
258
|
/***/ (function(module, exports, __webpack_require__) {
|
|
253
259
|
|
|
254
|
-
exports = module.exports = __webpack_require__(
|
|
260
|
+
exports = module.exports = __webpack_require__(25)(false);
|
|
255
261
|
// Module
|
|
256
|
-
exports.push([module.i, "\n.es-setting-top-nav-side[data-v-1b15d77c]::before {\
|
|
262
|
+
exports.push([module.i, "\n.es-setting-top-nav-side[data-v-1b15d77c]::before {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n width: 8px;\n top: 10px;\n bottom: 0;\n z-index: 2;\n background-color: rgb(0, 80, 179);\n}\n", ""]);
|
|
257
263
|
|
|
258
264
|
|
|
259
265
|
|
|
260
266
|
/***/ }),
|
|
261
|
-
/*
|
|
267
|
+
/* 25 */
|
|
262
268
|
/***/ (function(module, exports, __webpack_require__) {
|
|
263
269
|
|
|
264
270
|
"use strict";
|
|
@@ -349,7 +355,7 @@ function toComment(sourceMap) {
|
|
|
349
355
|
}
|
|
350
356
|
|
|
351
357
|
/***/ }),
|
|
352
|
-
/*
|
|
358
|
+
/* 26 */
|
|
353
359
|
/***/ (function(module, exports, __webpack_require__) {
|
|
354
360
|
|
|
355
361
|
/*
|
|
@@ -418,7 +424,7 @@ var singleton = null;
|
|
|
418
424
|
var singletonCounter = 0;
|
|
419
425
|
var stylesInsertedAtTop = [];
|
|
420
426
|
|
|
421
|
-
var fixUrls = __webpack_require__(
|
|
427
|
+
var fixUrls = __webpack_require__(27);
|
|
422
428
|
|
|
423
429
|
module.exports = function(list, options) {
|
|
424
430
|
if (typeof DEBUG !== "undefined" && DEBUG) {
|
|
@@ -753,7 +759,7 @@ function updateLink (link, options, obj) {
|
|
|
753
759
|
|
|
754
760
|
|
|
755
761
|
/***/ }),
|
|
756
|
-
/*
|
|
762
|
+
/* 27 */
|
|
757
763
|
/***/ (function(module, exports) {
|
|
758
764
|
|
|
759
765
|
|
|
@@ -848,19 +854,19 @@ module.exports = function (css) {
|
|
|
848
854
|
|
|
849
855
|
|
|
850
856
|
/***/ }),
|
|
851
|
-
/*
|
|
857
|
+
/* 28 */
|
|
852
858
|
/***/ (function(module, exports) {
|
|
853
859
|
|
|
854
860
|
module.exports = require("video.js/dist/video-js.css");
|
|
855
861
|
|
|
856
862
|
/***/ }),
|
|
857
|
-
/*
|
|
863
|
+
/* 29 */
|
|
858
864
|
/***/ (function(module, exports) {
|
|
859
865
|
|
|
860
866
|
module.exports = require("qrcode");
|
|
861
867
|
|
|
862
868
|
/***/ }),
|
|
863
|
-
/*
|
|
869
|
+
/* 30 */
|
|
864
870
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
865
871
|
|
|
866
872
|
"use strict";
|
|
@@ -936,6 +942,11 @@ var api_previewAdjunct = '/main2/mecpfileManagement/previewAdjunct'; // 预览
|
|
|
936
942
|
var previewAdjunct2 = '/main2/mecpfileManagement/previewAdjunct2/'; // 预览附件(带文件名)
|
|
937
943
|
var previewAdjunctOffice = '/document/webDocument/documentIndex.dhtml'; // 预览附件word excel ppt
|
|
938
944
|
var delAdjunct = '/main2/mecpfileManagement/delAdjunct'; // 删除附件
|
|
945
|
+
// 分片上传(dochub v2),优先使用 dochubConfig 下发的同名 url,这里仅作兜底
|
|
946
|
+
var chunkCheckFile = '/dochub/v2/chunk/checkFile'; // 秒传检测/断点续传查询
|
|
947
|
+
var chunkUploadChunk = '/dochub/v2/chunk/uploadChunk'; // 上传单个分片
|
|
948
|
+
var chunkMergeChunk = '/dochub/v2/chunk/mergeChunk'; // 合并分片并写入文档库
|
|
949
|
+
var getDochubBucket = '/dochub/v2/getBucket'; // 根据桶编码获取文档中台桶配置(含分片上传开关/参数)
|
|
939
950
|
var upload_updateClassify = '/main2/mecpfileManagement/updateClassify'; // 根据附件id保存该附件的分类信息
|
|
940
951
|
var getDeleteAdjunctFileInfos = '/main2/mecpfileManagement/getDeleteAdjunctFileInfos'; // 根据业务id和附件code获取相关已删除附件的元数据列表
|
|
941
952
|
var getPictureBase64 = '/main2/mecpfileManagement/getPictureBase64'; // 获取图片的base64编码
|
|
@@ -1346,8 +1357,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
1346
1357
|
**/
|
|
1347
1358
|
|
|
1348
1359
|
/* eslint-disable indent */
|
|
1349
|
-
var sm2 = __webpack_require__(
|
|
1350
|
-
var lodash = __webpack_require__(
|
|
1360
|
+
var sm2 = __webpack_require__(21).sm2;
|
|
1361
|
+
var lodash = __webpack_require__(22);
|
|
1351
1362
|
|
|
1352
1363
|
|
|
1353
1364
|
|
|
@@ -1610,7 +1621,11 @@ var util_ajax = function ajax(_ref) {
|
|
|
1610
1621
|
}
|
|
1611
1622
|
}
|
|
1612
1623
|
}
|
|
1613
|
-
|
|
1624
|
+
var isFormData = typeof FormData !== 'undefined' && data instanceof FormData;
|
|
1625
|
+
if (isFormData) {
|
|
1626
|
+
// FormData(如分片上传):不做序列化,也不强制 content-type,
|
|
1627
|
+
// 交给浏览器/axios 自动设置 multipart/form-data 及 boundary
|
|
1628
|
+
} else if (method === 'post' && format) {
|
|
1614
1629
|
data = external_qs_default.a.stringify(data, formatConfig);
|
|
1615
1630
|
if (!header['content-type'] && !header['Content-Type']) {
|
|
1616
1631
|
header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
@@ -32357,21 +32372,21 @@ var CommonOpinionsvue_type_script_lang_js_components;
|
|
|
32357
32372
|
return validSate;
|
|
32358
32373
|
},
|
|
32359
32374
|
|
|
32360
|
-
/**
|
|
32361
|
-
* changeOpinion
|
|
32362
|
-
* @desc:监听意见变化
|
|
32363
|
-
* @author liufan
|
|
32364
|
-
* @date 2022年10月28日
|
|
32375
|
+
/**
|
|
32376
|
+
* changeOpinion
|
|
32377
|
+
* @desc:监听意见变化
|
|
32378
|
+
* @author liufan
|
|
32379
|
+
* @date 2022年10月28日
|
|
32365
32380
|
**/
|
|
32366
32381
|
changeOpinion: function changeOpinion() {
|
|
32367
32382
|
this.$emit('change', this.form.value);
|
|
32368
32383
|
},
|
|
32369
32384
|
|
|
32370
|
-
/**
|
|
32371
|
-
* getCommonOpion
|
|
32372
|
-
* @desc:获取意见
|
|
32373
|
-
* @author liufan
|
|
32374
|
-
* @date 2022年5月25日
|
|
32385
|
+
/**
|
|
32386
|
+
* getCommonOpion
|
|
32387
|
+
* @desc:获取意见
|
|
32388
|
+
* @author liufan
|
|
32389
|
+
* @date 2022年5月25日
|
|
32375
32390
|
**/
|
|
32376
32391
|
getCommonOpion: function getCommonOpion() {
|
|
32377
32392
|
var _this = this;
|
|
@@ -32400,24 +32415,24 @@ var CommonOpinionsvue_type_script_lang_js_components;
|
|
|
32400
32415
|
});
|
|
32401
32416
|
},
|
|
32402
32417
|
|
|
32403
|
-
/**
|
|
32404
|
-
* upDate
|
|
32405
|
-
* @desc:修改常用语
|
|
32406
|
-
* @author liufan
|
|
32407
|
-
* @param {Object} val 修改值
|
|
32408
|
-
* @date 2022年5月25日
|
|
32418
|
+
/**
|
|
32419
|
+
* upDate
|
|
32420
|
+
* @desc:修改常用语
|
|
32421
|
+
* @author liufan
|
|
32422
|
+
* @param {Object} val 修改值
|
|
32423
|
+
* @date 2022年5月25日
|
|
32409
32424
|
**/
|
|
32410
32425
|
upDate: function upDate(val) {
|
|
32411
32426
|
this.FormData.id = val.id;
|
|
32412
32427
|
this.addVisible = true;
|
|
32413
32428
|
},
|
|
32414
32429
|
|
|
32415
|
-
/**
|
|
32416
|
-
* selectChange
|
|
32417
|
-
* @desc:常用语选择
|
|
32418
|
-
* @author liufan
|
|
32419
|
-
* @param {String} val 选中值
|
|
32420
|
-
* @date 2022年5月25日
|
|
32430
|
+
/**
|
|
32431
|
+
* selectChange
|
|
32432
|
+
* @desc:常用语选择
|
|
32433
|
+
* @author liufan
|
|
32434
|
+
* @param {String} val 选中值
|
|
32435
|
+
* @date 2022年5月25日
|
|
32421
32436
|
**/
|
|
32422
32437
|
selectChange: function selectChange(val) {
|
|
32423
32438
|
var _this2 = this;
|
|
@@ -32436,12 +32451,12 @@ var CommonOpinionsvue_type_script_lang_js_components;
|
|
|
32436
32451
|
});
|
|
32437
32452
|
},
|
|
32438
32453
|
|
|
32439
|
-
/**
|
|
32440
|
-
* del
|
|
32441
|
-
* @desc:删除常用语
|
|
32442
|
-
* @author liufan
|
|
32443
|
-
* @param {Object} val 删除的数据
|
|
32444
|
-
* @date 2022年5月25日
|
|
32454
|
+
/**
|
|
32455
|
+
* del
|
|
32456
|
+
* @desc:删除常用语
|
|
32457
|
+
* @author liufan
|
|
32458
|
+
* @param {Object} val 删除的数据
|
|
32459
|
+
* @date 2022年5月25日
|
|
32445
32460
|
**/
|
|
32446
32461
|
del: function del(val) {
|
|
32447
32462
|
var _this3 = this;
|
|
@@ -32483,12 +32498,12 @@ var CommonOpinionsvue_type_script_lang_js_components;
|
|
|
32483
32498
|
}).catch(function (e) {});
|
|
32484
32499
|
},
|
|
32485
32500
|
|
|
32486
|
-
/**
|
|
32487
|
-
* submit
|
|
32488
|
-
* @desc:新增/编辑意见保存
|
|
32489
|
-
* @author liufan
|
|
32490
|
-
* @param {Object} val 保存数据
|
|
32491
|
-
* @date 2022年5月25日
|
|
32501
|
+
/**
|
|
32502
|
+
* submit
|
|
32503
|
+
* @desc:新增/编辑意见保存
|
|
32504
|
+
* @author liufan
|
|
32505
|
+
* @param {Object} val 保存数据
|
|
32506
|
+
* @date 2022年5月25日
|
|
32492
32507
|
**/
|
|
32493
32508
|
submit: function submit(val) {
|
|
32494
32509
|
var _this4 = this;
|
|
@@ -56065,11 +56080,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56065
56080
|
|
|
56066
56081
|
|
|
56067
56082
|
methods: {
|
|
56068
|
-
/**
|
|
56069
|
-
* handleBatchDelete
|
|
56070
|
-
* @desc:批量删除
|
|
56071
|
-
* @author liufan
|
|
56072
|
-
* @date 2025年12月31日
|
|
56083
|
+
/**
|
|
56084
|
+
* handleBatchDelete
|
|
56085
|
+
* @desc:批量删除
|
|
56086
|
+
* @author liufan
|
|
56087
|
+
* @date 2025年12月31日
|
|
56073
56088
|
**/
|
|
56074
56089
|
handleBatchDelete: function handleBatchDelete() {
|
|
56075
56090
|
var _this6 = this;
|
|
@@ -56366,12 +56381,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56366
56381
|
}
|
|
56367
56382
|
},
|
|
56368
56383
|
|
|
56369
|
-
/**
|
|
56370
|
-
* handleFormSubmit
|
|
56371
|
-
* @desc:删除节点点击事件
|
|
56372
|
-
* @param {Object} formData 点击删除的form数据
|
|
56373
|
-
* @author liufan
|
|
56374
|
-
* @date 2022年11月29日
|
|
56384
|
+
/**
|
|
56385
|
+
* handleFormSubmit
|
|
56386
|
+
* @desc:删除节点点击事件
|
|
56387
|
+
* @param {Object} formData 点击删除的form数据
|
|
56388
|
+
* @author liufan
|
|
56389
|
+
* @date 2022年11月29日
|
|
56375
56390
|
**/
|
|
56376
56391
|
handleFormSubmit: function handleFormSubmit(formData) {
|
|
56377
56392
|
var _this12 = this;
|
|
@@ -56407,12 +56422,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56407
56422
|
});
|
|
56408
56423
|
},
|
|
56409
56424
|
|
|
56410
|
-
/**
|
|
56411
|
-
* del
|
|
56412
|
-
* @desc:展示删除弹窗
|
|
56413
|
-
* @param {String} id 当前点击数据id
|
|
56414
|
-
* @author liufan
|
|
56415
|
-
* @date 2022年11月29日
|
|
56425
|
+
/**
|
|
56426
|
+
* del
|
|
56427
|
+
* @desc:展示删除弹窗
|
|
56428
|
+
* @param {String} id 当前点击数据id
|
|
56429
|
+
* @author liufan
|
|
56430
|
+
* @date 2022年11月29日
|
|
56416
56431
|
**/
|
|
56417
56432
|
del: function del(id, type) {
|
|
56418
56433
|
this.modalType = type;
|
|
@@ -56420,12 +56435,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56420
56435
|
this.showDel = true;
|
|
56421
56436
|
},
|
|
56422
56437
|
|
|
56423
|
-
/**
|
|
56424
|
-
* handleCurrentChange
|
|
56425
|
-
* @desc:监听页码变化
|
|
56426
|
-
* @param {String} val 当前页
|
|
56427
|
-
* @author liufan
|
|
56428
|
-
* @date 2022年11月29日
|
|
56438
|
+
/**
|
|
56439
|
+
* handleCurrentChange
|
|
56440
|
+
* @desc:监听页码变化
|
|
56441
|
+
* @param {String} val 当前页
|
|
56442
|
+
* @author liufan
|
|
56443
|
+
* @date 2022年11月29日
|
|
56429
56444
|
**/
|
|
56430
56445
|
handleCurrentChange: function handleCurrentChange(val, type) {
|
|
56431
56446
|
this.currentPage = val;
|
|
@@ -56434,12 +56449,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56434
56449
|
}
|
|
56435
56450
|
},
|
|
56436
56451
|
|
|
56437
|
-
/**
|
|
56438
|
-
* handleSizeChange
|
|
56439
|
-
* @desc:监听每页数据显示数量变化
|
|
56440
|
-
* @param {String} val 每页展示数量
|
|
56441
|
-
* @author liufan
|
|
56442
|
-
* @date 2022年11月29日
|
|
56452
|
+
/**
|
|
56453
|
+
* handleSizeChange
|
|
56454
|
+
* @desc:监听每页数据显示数量变化
|
|
56455
|
+
* @param {String} val 每页展示数量
|
|
56456
|
+
* @author liufan
|
|
56457
|
+
* @date 2022年11月29日
|
|
56443
56458
|
**/
|
|
56444
56459
|
handleSizeChange: function handleSizeChange(val) {
|
|
56445
56460
|
this.pageSize = val;
|
|
@@ -56448,12 +56463,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56448
56463
|
}
|
|
56449
56464
|
},
|
|
56450
56465
|
|
|
56451
|
-
/**
|
|
56452
|
-
* sortChange
|
|
56453
|
-
* @desc:监听排序变化
|
|
56454
|
-
* @param {Object} info 需要排序的字段及排序方式
|
|
56455
|
-
* @author liufan
|
|
56456
|
-
* @date 2022年11月29日
|
|
56466
|
+
/**
|
|
56467
|
+
* sortChange
|
|
56468
|
+
* @desc:监听排序变化
|
|
56469
|
+
* @param {Object} info 需要排序的字段及排序方式
|
|
56470
|
+
* @author liufan
|
|
56471
|
+
* @date 2022年11月29日
|
|
56457
56472
|
**/
|
|
56458
56473
|
sortChange: function sortChange(info, type) {
|
|
56459
56474
|
var prop = info.prop;
|
|
@@ -56469,11 +56484,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56469
56484
|
}
|
|
56470
56485
|
},
|
|
56471
56486
|
|
|
56472
|
-
/**
|
|
56473
|
-
* getDeletList
|
|
56474
|
-
* @desc:删除列表数据
|
|
56475
|
-
* @author liufan
|
|
56476
|
-
* @date 2025年12月30日
|
|
56487
|
+
/**
|
|
56488
|
+
* getDeletList
|
|
56489
|
+
* @desc:删除列表数据
|
|
56490
|
+
* @author liufan
|
|
56491
|
+
* @date 2025年12月30日
|
|
56477
56492
|
**/
|
|
56478
56493
|
getDeletList: function getDeletList() {
|
|
56479
56494
|
var _this13 = this;
|
|
@@ -56502,11 +56517,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56502
56517
|
});
|
|
56503
56518
|
},
|
|
56504
56519
|
|
|
56505
|
-
/**
|
|
56506
|
-
* getResetList
|
|
56507
|
-
* @desc:重设列表数据
|
|
56508
|
-
* @author liufan
|
|
56509
|
-
* @date 2025年12月30日
|
|
56520
|
+
/**
|
|
56521
|
+
* getResetList
|
|
56522
|
+
* @desc:重设列表数据
|
|
56523
|
+
* @author liufan
|
|
56524
|
+
* @date 2025年12月30日
|
|
56510
56525
|
**/
|
|
56511
56526
|
getResetList: function getResetList() {
|
|
56512
56527
|
var _this14 = this;
|
|
@@ -56536,11 +56551,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56536
56551
|
});
|
|
56537
56552
|
},
|
|
56538
56553
|
|
|
56539
|
-
/**
|
|
56540
|
-
* getPressList
|
|
56541
|
-
* @desc:催办列表数据
|
|
56542
|
-
* @author liufan
|
|
56543
|
-
* @date 2022年11月29日
|
|
56554
|
+
/**
|
|
56555
|
+
* getPressList
|
|
56556
|
+
* @desc:催办列表数据
|
|
56557
|
+
* @author liufan
|
|
56558
|
+
* @date 2022年11月29日
|
|
56544
56559
|
**/
|
|
56545
56560
|
getPressList: function getPressList() {
|
|
56546
56561
|
var _this15 = this;
|
|
@@ -56570,12 +56585,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56570
56585
|
});
|
|
56571
56586
|
},
|
|
56572
56587
|
|
|
56573
|
-
/**
|
|
56574
|
-
* goPress
|
|
56575
|
-
* @desc:催办列表查看
|
|
56576
|
-
* @param {String} id 催办列表id
|
|
56577
|
-
* @author liufan
|
|
56578
|
-
* @date 2022年11月29日
|
|
56588
|
+
/**
|
|
56589
|
+
* goPress
|
|
56590
|
+
* @desc:催办列表查看
|
|
56591
|
+
* @param {String} id 催办列表id
|
|
56592
|
+
* @author liufan
|
|
56593
|
+
* @date 2022年11月29日
|
|
56579
56594
|
**/
|
|
56580
56595
|
goPress: function goPress(id) {
|
|
56581
56596
|
this.historyId = id;
|
|
@@ -56583,23 +56598,23 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56583
56598
|
this.getPressList();
|
|
56584
56599
|
},
|
|
56585
56600
|
|
|
56586
|
-
/**
|
|
56587
|
-
* showFile
|
|
56588
|
-
* @desc:附件查看
|
|
56589
|
-
* @param {String} ownId 附件id
|
|
56590
|
-
* @author liufan
|
|
56591
|
-
* @date 2022年11月29日
|
|
56601
|
+
/**
|
|
56602
|
+
* showFile
|
|
56603
|
+
* @desc:附件查看
|
|
56604
|
+
* @param {String} ownId 附件id
|
|
56605
|
+
* @author liufan
|
|
56606
|
+
* @date 2022年11月29日
|
|
56592
56607
|
**/
|
|
56593
56608
|
showFile: function showFile(ownId) {
|
|
56594
56609
|
this.wfpendingid = ownId;
|
|
56595
56610
|
this.showFileList = true;
|
|
56596
56611
|
},
|
|
56597
56612
|
|
|
56598
|
-
/**
|
|
56599
|
-
* handleChange
|
|
56600
|
-
* @desc:切换排序方式
|
|
56601
|
-
* @author liufan
|
|
56602
|
-
* @date 2022年11月22日
|
|
56613
|
+
/**
|
|
56614
|
+
* handleChange
|
|
56615
|
+
* @desc:切换排序方式
|
|
56616
|
+
* @author liufan
|
|
56617
|
+
* @date 2022年11月22日
|
|
56603
56618
|
**/
|
|
56604
56619
|
handleChange: function handleChange(key, value) {
|
|
56605
56620
|
if (value) {
|
|
@@ -56649,11 +56664,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56649
56664
|
}))();
|
|
56650
56665
|
},
|
|
56651
56666
|
|
|
56652
|
-
/**
|
|
56653
|
-
* getFlowList
|
|
56654
|
-
* @desc:获取流程列表
|
|
56655
|
-
* @author liufan
|
|
56656
|
-
* @date 2022年11月22日
|
|
56667
|
+
/**
|
|
56668
|
+
* getFlowList
|
|
56669
|
+
* @desc:获取流程列表
|
|
56670
|
+
* @author liufan
|
|
56671
|
+
* @date 2022年11月22日
|
|
56657
56672
|
**/
|
|
56658
56673
|
getFlowList: function getFlowList(type) {
|
|
56659
56674
|
var _this17 = this;
|
|
@@ -56733,12 +56748,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56733
56748
|
});
|
|
56734
56749
|
},
|
|
56735
56750
|
|
|
56736
|
-
/**
|
|
56737
|
-
* handleClick
|
|
56738
|
-
* @desc:表单点击事件
|
|
56739
|
-
* @param {Object} val 当前点击行数据及按钮
|
|
56740
|
-
* @author liufan
|
|
56741
|
-
* @date 2022年11月10日
|
|
56751
|
+
/**
|
|
56752
|
+
* handleClick
|
|
56753
|
+
* @desc:表单点击事件
|
|
56754
|
+
* @param {Object} val 当前点击行数据及按钮
|
|
56755
|
+
* @author liufan
|
|
56756
|
+
* @date 2022年11月10日
|
|
56742
56757
|
**/
|
|
56743
56758
|
handleClick: function handleClick(val) {
|
|
56744
56759
|
var _this18 = this;
|
|
@@ -56784,13 +56799,13 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56784
56799
|
}
|
|
56785
56800
|
},
|
|
56786
56801
|
|
|
56787
|
-
/**
|
|
56788
|
-
* getCodeValue
|
|
56789
|
-
* @desc:获取代码表过滤后的值
|
|
56790
|
-
* @param {String} value 展示数据的代码值
|
|
56791
|
-
* @param {String} type 代码表类型
|
|
56792
|
-
* @author liufan
|
|
56793
|
-
* @date 2022年11月10日
|
|
56802
|
+
/**
|
|
56803
|
+
* getCodeValue
|
|
56804
|
+
* @desc:获取代码表过滤后的值
|
|
56805
|
+
* @param {String} value 展示数据的代码值
|
|
56806
|
+
* @param {String} type 代码表类型
|
|
56807
|
+
* @author liufan
|
|
56808
|
+
* @date 2022年11月10日
|
|
56794
56809
|
**/
|
|
56795
56810
|
getCodeValue: function getCodeValue(value, type) {
|
|
56796
56811
|
var val = this[type].filter(function (item) {
|
|
@@ -56799,12 +56814,12 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56799
56814
|
return val[0].shortName;
|
|
56800
56815
|
},
|
|
56801
56816
|
|
|
56802
|
-
/**
|
|
56803
|
-
* getSysInfo
|
|
56804
|
-
* @desc:获取代码表
|
|
56805
|
-
* @param {String} code 编码code值
|
|
56806
|
-
* @author liufan
|
|
56807
|
-
* @date 2022年11月10日
|
|
56817
|
+
/**
|
|
56818
|
+
* getSysInfo
|
|
56819
|
+
* @desc:获取代码表
|
|
56820
|
+
* @param {String} code 编码code值
|
|
56821
|
+
* @author liufan
|
|
56822
|
+
* @date 2022年11月10日
|
|
56808
56823
|
**/
|
|
56809
56824
|
getSysInfo: function getSysInfo(code) {
|
|
56810
56825
|
var _this19 = this;
|
|
@@ -56826,11 +56841,11 @@ function flow_list_src_mainvue_type_script_lang_js_asyncToGenerator(fn) { return
|
|
|
56826
56841
|
}).catch(function (e) {});
|
|
56827
56842
|
},
|
|
56828
56843
|
|
|
56829
|
-
/**
|
|
56830
|
-
* getListInfo
|
|
56831
|
-
* @desc:获取预设列表数据
|
|
56832
|
-
* @author liufan
|
|
56833
|
-
* @date 2022年11月10日
|
|
56844
|
+
/**
|
|
56845
|
+
* getListInfo
|
|
56846
|
+
* @desc:获取预设列表数据
|
|
56847
|
+
* @author liufan
|
|
56848
|
+
* @date 2022年11月10日
|
|
56834
56849
|
**/
|
|
56835
56850
|
getListInfo: function getListInfo() {
|
|
56836
56851
|
var _this20 = this;
|
|
@@ -63515,8 +63530,8 @@ mainvue_type_template_id_b3cc50dc_render._withStripped = true
|
|
|
63515
63530
|
|
|
63516
63531
|
// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=b3cc50dc&
|
|
63517
63532
|
|
|
63518
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
63519
|
-
var
|
|
63533
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=7b9689e2&scoped=true&
|
|
63534
|
+
var simplicityvue_type_template_id_7b9689e2_scoped_true_render = function () {
|
|
63520
63535
|
var _vm = this
|
|
63521
63536
|
var _h = _vm.$createElement
|
|
63522
63537
|
var _c = _vm._self._c || _h
|
|
@@ -64282,11 +64297,11 @@ var simplicityvue_type_template_id_65535c71_scoped_true_render = function () {
|
|
|
64282
64297
|
),
|
|
64283
64298
|
])
|
|
64284
64299
|
}
|
|
64285
|
-
var
|
|
64286
|
-
|
|
64300
|
+
var simplicityvue_type_template_id_7b9689e2_scoped_true_staticRenderFns = []
|
|
64301
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_render._withStripped = true
|
|
64287
64302
|
|
|
64288
64303
|
|
|
64289
|
-
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=
|
|
64304
|
+
// CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=7b9689e2&scoped=true&
|
|
64290
64305
|
|
|
64291
64306
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=e722b45c&scoped=true&
|
|
64292
64307
|
var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
|
|
@@ -66344,10 +66359,10 @@ appsvue_type_template_id_f094d33e_scoped_true_render._withStripped = true
|
|
|
66344
66359
|
this.$emit('click', res);
|
|
66345
66360
|
},
|
|
66346
66361
|
|
|
66347
|
-
/**
|
|
66348
|
-
* @desc:获取气泡提醒
|
|
66349
|
-
* @author huangbo
|
|
66350
|
-
* @date 2024年9月7日
|
|
66362
|
+
/**
|
|
66363
|
+
* @desc:获取气泡提醒
|
|
66364
|
+
* @author huangbo
|
|
66365
|
+
* @date 2024年9月7日
|
|
66351
66366
|
**/
|
|
66352
66367
|
getBadge: function getBadge(res) {
|
|
66353
66368
|
var num = res.tips || 0;
|
|
@@ -68762,7 +68777,7 @@ settingsvue_type_template_id_1b15d77c_scoped_true_render._withStripped = true
|
|
|
68762
68777
|
// CONCATENATED MODULE: ./packages/main/src/public/settings.vue?vue&type=script&lang=js&
|
|
68763
68778
|
/* harmony default export */ var public_settingsvue_type_script_lang_js_ = (settingsvue_type_script_lang_js_);
|
|
68764
68779
|
// EXTERNAL MODULE: ./packages/main/src/public/settings.vue?vue&type=style&index=0&id=1b15d77c&prod&scoped=true&lang=css&
|
|
68765
|
-
var settingsvue_type_style_index_0_id_1b15d77c_prod_scoped_true_lang_css_ = __webpack_require__(
|
|
68780
|
+
var settingsvue_type_style_index_0_id_1b15d77c_prod_scoped_true_lang_css_ = __webpack_require__(23);
|
|
68766
68781
|
|
|
68767
68782
|
// CONCATENATED MODULE: ./packages/main/src/public/settings.vue
|
|
68768
68783
|
|
|
@@ -71683,6 +71698,8 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
71683
71698
|
* @date 2024年9月7日
|
|
71684
71699
|
**/
|
|
71685
71700
|
handleRefresh: function handleRefresh(arg) {
|
|
71701
|
+
var _this7 = this;
|
|
71702
|
+
|
|
71686
71703
|
var i = arg && arg != true && arg !== 'pageData' && !((typeof arg === 'undefined' ? 'undefined' : simplicityvue_type_script_lang_js_typeof(arg)) === 'object' && arg.path) ? utils_util.indexOfObj(this.tabs, arg, 'appCode,code,id,url') : utils_util.indexOfObj(this.tabs, this.activeName, 'id');
|
|
71687
71704
|
var tab = this.tabs[i];
|
|
71688
71705
|
if (simplicityvue_type_script_lang_js_isIE || tab.method === 'iframe') {
|
|
@@ -71711,11 +71728,14 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
71711
71728
|
if (arg && (typeof arg === 'undefined' ? 'undefined' : simplicityvue_type_script_lang_js_typeof(arg)) === 'object' && arg.path) {
|
|
71712
71729
|
url = this.buildWujieUrl(tab.url, arg);
|
|
71713
71730
|
}
|
|
71714
|
-
|
|
71731
|
+
// 1. 获取带新时间戳的 URL
|
|
71732
|
+
var newUrl = utils_util.handlerUrl(url);
|
|
71733
|
+
// 2. 关键:先置空,等待 Wujie 销毁实例
|
|
71715
71734
|
tab.url = '';
|
|
71716
|
-
|
|
71717
|
-
|
|
71718
|
-
|
|
71735
|
+
// 3. 使用 setTimeout 替代 $nextTick,给 Wujie 更多时间清理内存和 DOM
|
|
71736
|
+
setTimeout(function () {
|
|
71737
|
+
_this7.$set(_this7.tabs, i, simplicityvue_type_script_lang_js_extends({}, tab, { url: newUrl }));
|
|
71738
|
+
}, 50); // 50ms 的延迟通常足以让 Wujie 完成卸载
|
|
71719
71739
|
}
|
|
71720
71740
|
return;
|
|
71721
71741
|
}
|
|
@@ -71960,7 +71980,7 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
71960
71980
|
* @date 2024年9月7日
|
|
71961
71981
|
**/
|
|
71962
71982
|
handleQuit: function handleQuit() {
|
|
71963
|
-
var
|
|
71983
|
+
var _this8 = this;
|
|
71964
71984
|
|
|
71965
71985
|
this.$confirm('确定退出吗?', '退出系统', {
|
|
71966
71986
|
confirmButtonText: '确定',
|
|
@@ -71976,19 +71996,19 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
71976
71996
|
}
|
|
71977
71997
|
break;
|
|
71978
71998
|
}
|
|
71979
|
-
if (
|
|
71980
|
-
for (var _i2 = 0; _i2 <
|
|
71999
|
+
if (_this8.singleLogout) {
|
|
72000
|
+
for (var _i2 = 0; _i2 < _this8.singleLogout.length; _i2++) {
|
|
71981
72001
|
var iframe = document.createElement('iframe');
|
|
71982
72002
|
iframe.style.display = 'none';
|
|
71983
|
-
iframe.src =
|
|
72003
|
+
iframe.src = _this8.singleLogout[_i2];
|
|
71984
72004
|
document.body.appendChild(iframe);
|
|
71985
72005
|
}
|
|
71986
72006
|
}
|
|
71987
72007
|
utils_util.ajax({ method: 'post', url: logout }).then(function (res) {
|
|
71988
72008
|
if (res.rCode == 0) {
|
|
71989
72009
|
utils_util.removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
|
|
71990
|
-
if (
|
|
71991
|
-
|
|
72010
|
+
if (_this8.onQuit && typeof _this8.onQuit === 'function') {
|
|
72011
|
+
_this8.onQuit();
|
|
71992
72012
|
} else {
|
|
71993
72013
|
try {
|
|
71994
72014
|
var loginPage = utils_util.getStorage('login') || utils_util.getStorage('loginPage');
|
|
@@ -72032,7 +72052,7 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
72032
72052
|
}
|
|
72033
72053
|
}).catch(function (err) {
|
|
72034
72054
|
if (err.message && err.message !== 'canceled') {
|
|
72035
|
-
|
|
72055
|
+
_this8.$message.error(err.message);
|
|
72036
72056
|
}
|
|
72037
72057
|
});
|
|
72038
72058
|
}).catch(function (e) {});
|
|
@@ -72090,13 +72110,13 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
72090
72110
|
* @date 2024年9月7日
|
|
72091
72111
|
**/
|
|
72092
72112
|
handleOpened: function handleOpened(res) {
|
|
72093
|
-
var
|
|
72113
|
+
var _this9 = this;
|
|
72094
72114
|
|
|
72095
72115
|
if (res === undefined) {
|
|
72096
72116
|
this.sysMsg = [];
|
|
72097
72117
|
} else if (res == false && this.sysMsg.length) {
|
|
72098
72118
|
this.sysMsgOut = setTimeout(function () {
|
|
72099
|
-
|
|
72119
|
+
_this9.sysMsg = [];
|
|
72100
72120
|
}, 3000);
|
|
72101
72121
|
} else if (this.sysMsgOut) {
|
|
72102
72122
|
clearTimeout(this.sysMsgOut);
|
|
@@ -72172,13 +72192,13 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
72172
72192
|
|
|
72173
72193
|
//监听改变菜单
|
|
72174
72194
|
handleListener: function handleListener() {
|
|
72175
|
-
var
|
|
72195
|
+
var _this10 = this;
|
|
72176
72196
|
|
|
72177
72197
|
utils_util.win.addEventListener('message', function (e) {
|
|
72178
72198
|
var msg = e.data;
|
|
72179
72199
|
if (msg.key == 'jump_Menu') {
|
|
72180
72200
|
var res = msg.data1;
|
|
72181
|
-
|
|
72201
|
+
_this10.jumpMenu(res);
|
|
72182
72202
|
}
|
|
72183
72203
|
}, false);
|
|
72184
72204
|
},
|
|
@@ -72215,11 +72235,11 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
|
|
|
72215
72235
|
|
|
72216
72236
|
var simplicity_component = normalizeComponent(
|
|
72217
72237
|
src_simplicityvue_type_script_lang_js_,
|
|
72218
|
-
|
|
72219
|
-
|
|
72238
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_render,
|
|
72239
|
+
simplicityvue_type_template_id_7b9689e2_scoped_true_staticRenderFns,
|
|
72220
72240
|
false,
|
|
72221
72241
|
null,
|
|
72222
|
-
"
|
|
72242
|
+
"7b9689e2",
|
|
72223
72243
|
null
|
|
72224
72244
|
|
|
72225
72245
|
)
|
|
@@ -84563,8 +84583,8 @@ page_src_main.install = function (Vue) {
|
|
|
84563
84583
|
};
|
|
84564
84584
|
|
|
84565
84585
|
/* harmony default export */ var packages_page = (page_src_main);
|
|
84566
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/player/src/main.vue?vue&type=template&id=
|
|
84567
|
-
var
|
|
84586
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/player/src/main.vue?vue&type=template&id=751e6084&
|
|
84587
|
+
var mainvue_type_template_id_751e6084_render = function () {
|
|
84568
84588
|
var _vm = this
|
|
84569
84589
|
var _h = _vm.$createElement
|
|
84570
84590
|
var _c = _vm._self._c || _h
|
|
@@ -84577,11 +84597,11 @@ var mainvue_type_template_id_29c1659e_render = function () {
|
|
|
84577
84597
|
}),
|
|
84578
84598
|
])
|
|
84579
84599
|
}
|
|
84580
|
-
var
|
|
84581
|
-
|
|
84600
|
+
var mainvue_type_template_id_751e6084_staticRenderFns = []
|
|
84601
|
+
mainvue_type_template_id_751e6084_render._withStripped = true
|
|
84582
84602
|
|
|
84583
84603
|
|
|
84584
|
-
// CONCATENATED MODULE: ./packages/player/src/main.vue?vue&type=template&id=
|
|
84604
|
+
// CONCATENATED MODULE: ./packages/player/src/main.vue?vue&type=template&id=751e6084&
|
|
84585
84605
|
|
|
84586
84606
|
// EXTERNAL MODULE: external "video.js"
|
|
84587
84607
|
var external_video_js_ = __webpack_require__(6);
|
|
@@ -84592,7 +84612,7 @@ var zh_CN_json_ = __webpack_require__(15);
|
|
|
84592
84612
|
var zh_CN_json_default = /*#__PURE__*/__webpack_require__.n(zh_CN_json_);
|
|
84593
84613
|
|
|
84594
84614
|
// EXTERNAL MODULE: external "video.js/dist/video-js.css"
|
|
84595
|
-
var video_js_css_ = __webpack_require__(
|
|
84615
|
+
var video_js_css_ = __webpack_require__(28);
|
|
84596
84616
|
|
|
84597
84617
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/player/src/main.vue?vue&type=script&lang=js&
|
|
84598
84618
|
var player_src_mainvue_type_script_lang_js_extends = Object.assign || 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; };
|
|
@@ -84708,7 +84728,7 @@ external_video_js_default.a.addLanguage('zh-CN', zh_CN_json_default.a);
|
|
|
84708
84728
|
sources: [{
|
|
84709
84729
|
withCredentials: false,
|
|
84710
84730
|
type: this.type,
|
|
84711
|
-
src: this.isObject ? this.source.src : source
|
|
84731
|
+
src: this.isObject ? this.source.src : this.source
|
|
84712
84732
|
}],
|
|
84713
84733
|
poster: this.isObject ? this.source.poster : ''
|
|
84714
84734
|
});
|
|
@@ -84802,8 +84822,8 @@ external_video_js_default.a.addLanguage('zh-CN', zh_CN_json_default.a);
|
|
|
84802
84822
|
|
|
84803
84823
|
var player_src_main_component = normalizeComponent(
|
|
84804
84824
|
packages_player_src_mainvue_type_script_lang_js_,
|
|
84805
|
-
|
|
84806
|
-
|
|
84825
|
+
mainvue_type_template_id_751e6084_render,
|
|
84826
|
+
mainvue_type_template_id_751e6084_staticRenderFns,
|
|
84807
84827
|
false,
|
|
84808
84828
|
null,
|
|
84809
84829
|
null,
|
|
@@ -84887,7 +84907,7 @@ mainvue_type_template_id_15448f0a_render._withStripped = true
|
|
|
84887
84907
|
//
|
|
84888
84908
|
|
|
84889
84909
|
|
|
84890
|
-
var QRCode = __webpack_require__(
|
|
84910
|
+
var QRCode = __webpack_require__(29);
|
|
84891
84911
|
/* harmony default export */ var qr_code_src_mainvue_type_script_lang_js_ = ({
|
|
84892
84912
|
name: 'EsQrCode',
|
|
84893
84913
|
props: {
|
|
@@ -101165,8 +101185,8 @@ form_src_table.install = function (Vue) {
|
|
|
101165
101185
|
};
|
|
101166
101186
|
|
|
101167
101187
|
/* harmony default export */ var table_form = (form_src_table);
|
|
101168
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=
|
|
101169
|
-
var
|
|
101188
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=6e200c92&
|
|
101189
|
+
var mainvue_type_template_id_6e200c92_render = function () {
|
|
101170
101190
|
var _vm = this
|
|
101171
101191
|
var _h = _vm.$createElement
|
|
101172
101192
|
var _c = _vm._self._c || _h
|
|
@@ -101191,6 +101211,8 @@ var mainvue_type_template_id_f3cb4f04_render = function () {
|
|
|
101191
101211
|
height: _vm.boxHeight,
|
|
101192
101212
|
multiple: _vm.portrait ? false : _vm.multiple,
|
|
101193
101213
|
action: _vm.uploadUrl,
|
|
101214
|
+
"http-request": _vm.chunkHttpRequest,
|
|
101215
|
+
handles: _vm.chunkHandles,
|
|
101194
101216
|
"show-file-list": _vm.showList,
|
|
101195
101217
|
"file-list": _vm.lists,
|
|
101196
101218
|
"result-file": _vm.resultFile,
|
|
@@ -101335,7 +101357,7 @@ var mainvue_type_template_id_f3cb4f04_render = function () {
|
|
|
101335
101357
|
: _vm.autoUpload
|
|
101336
101358
|
? "点击上传"
|
|
101337
101359
|
: "选择文件"
|
|
101338
|
-
)
|
|
101360
|
+
) + "\n "
|
|
101339
101361
|
),
|
|
101340
101362
|
]
|
|
101341
101363
|
),
|
|
@@ -101547,11 +101569,11 @@ var mainvue_type_template_id_f3cb4f04_render = function () {
|
|
|
101547
101569
|
)
|
|
101548
101570
|
: _vm._e()
|
|
101549
101571
|
}
|
|
101550
|
-
var
|
|
101551
|
-
|
|
101572
|
+
var mainvue_type_template_id_6e200c92_staticRenderFns = []
|
|
101573
|
+
mainvue_type_template_id_6e200c92_render._withStripped = true
|
|
101552
101574
|
|
|
101553
101575
|
|
|
101554
|
-
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=
|
|
101576
|
+
// CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=6e200c92&
|
|
101555
101577
|
|
|
101556
101578
|
// CONCATENATED MODULE: ./packages/upload/src/picture.js
|
|
101557
101579
|
/* harmony default export */ var picture = ({
|
|
@@ -101572,6 +101594,10 @@ mainvue_type_template_id_f3cb4f04_render._withStripped = true
|
|
|
101572
101594
|
// EXTERNAL MODULE: external "js-base64"
|
|
101573
101595
|
var external_js_base64_ = __webpack_require__(18);
|
|
101574
101596
|
|
|
101597
|
+
// EXTERNAL MODULE: external "spark-md5"
|
|
101598
|
+
var external_spark_md5_ = __webpack_require__(19);
|
|
101599
|
+
var external_spark_md5_default = /*#__PURE__*/__webpack_require__.n(external_spark_md5_);
|
|
101600
|
+
|
|
101575
101601
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=script&lang=js&
|
|
101576
101602
|
var upload_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
101577
101603
|
|
|
@@ -101764,6 +101790,8 @@ var mainvue_type_script_lang_js_props;
|
|
|
101764
101790
|
|
|
101765
101791
|
|
|
101766
101792
|
|
|
101793
|
+
|
|
101794
|
+
|
|
101767
101795
|
/* harmony default export */ var upload_src_mainvue_type_script_lang_js_ = ({
|
|
101768
101796
|
name: 'EsUpload',
|
|
101769
101797
|
components: {
|
|
@@ -101996,7 +102024,9 @@ var mainvue_type_script_lang_js_props;
|
|
|
101996
102024
|
boxHeight: this.listHeight,
|
|
101997
102025
|
previewAdjunct: api_previewAdjunct,
|
|
101998
102026
|
kkfileview: null,
|
|
101999
|
-
dochubConfig: {}
|
|
102027
|
+
dochubConfig: {},
|
|
102028
|
+
// 文档中台桶配置下发的分片上传配置(baseBucketConfig),null 表示未下发 → 回退组件 props
|
|
102029
|
+
bucketChunkConfig: null
|
|
102000
102030
|
};
|
|
102001
102031
|
},
|
|
102002
102032
|
|
|
@@ -102151,6 +102181,90 @@ var mainvue_type_script_lang_js_props;
|
|
|
102151
102181
|
}
|
|
102152
102182
|
}
|
|
102153
102183
|
return this.photo;
|
|
102184
|
+
},
|
|
102185
|
+
|
|
102186
|
+
// 是否走分片上传:完全由后台桶配置(/v2/chunk/config)的开关决定,且具备桶编码(code)与业务id(ownId)
|
|
102187
|
+
isChunk: function isChunk() {
|
|
102188
|
+
var cfg = this.bucketChunkConfig;
|
|
102189
|
+
return !!(cfg && cfg.enableChunkUpload) && !!this.code && !!this.ownId;
|
|
102190
|
+
},
|
|
102191
|
+
|
|
102192
|
+
// 生效的分片大小(字节):桶配置 > 默认 5MB
|
|
102193
|
+
_chunkSize: function _chunkSize() {
|
|
102194
|
+
var cfg = this.bucketChunkConfig;
|
|
102195
|
+
return cfg && Number(cfg.chunkSize) > 0 && Number(cfg.chunkSize) || 5 * 1024 * 1024;
|
|
102196
|
+
},
|
|
102197
|
+
|
|
102198
|
+
// 生效的分片并发数:桶配置 > 默认 3
|
|
102199
|
+
_chunkConcurrent: function _chunkConcurrent() {
|
|
102200
|
+
var cfg = this.bucketChunkConfig;
|
|
102201
|
+
return cfg && Number(cfg.chunkConcurrent) > 0 && Number(cfg.chunkConcurrent) || 3;
|
|
102202
|
+
},
|
|
102203
|
+
|
|
102204
|
+
// 分片三接口地址:优先 dochubConfig 下发,否则回退 api.js 常量(与本组件 dochubConfig.x || 常量 的写法一致)
|
|
102205
|
+
chunkUrls: function chunkUrls() {
|
|
102206
|
+
var cfg = this.dochubConfig || {};
|
|
102207
|
+
return {
|
|
102208
|
+
check: cfg.chunkCheckUrl || chunkCheckFile,
|
|
102209
|
+
upload: cfg.chunkUploadUrl || chunkUploadChunk,
|
|
102210
|
+
merge: cfg.chunkMergeUrl || chunkMergeChunk
|
|
102211
|
+
};
|
|
102212
|
+
},
|
|
102213
|
+
|
|
102214
|
+
// 传给 el-upload 的自定义上传实现;非分片模式返回 undefined 以走默认上传
|
|
102215
|
+
chunkHttpRequest: function chunkHttpRequest() {
|
|
102216
|
+
return this.isChunk ? this.chunkUpload : undefined;
|
|
102217
|
+
},
|
|
102218
|
+
|
|
102219
|
+
// 操作列按钮:非分片模式回退用户经 $attrs 传入的 handles(或 undefined → el-upload 默认),
|
|
102220
|
+
// 分片模式注入"暂停/继续"并保留预览/下载/删除(emit 复用既有事件链)。仅分片模式改变渲染,不影响存量业务。
|
|
102221
|
+
chunkHandles: function chunkHandles() {
|
|
102222
|
+
var _this = this;
|
|
102223
|
+
|
|
102224
|
+
if (!this.isChunk) return this.$attrs.handles;
|
|
102225
|
+
var done = function done(f) {
|
|
102226
|
+
return f.status === 'success' || f.status == 0;
|
|
102227
|
+
};
|
|
102228
|
+
return [{
|
|
102229
|
+
icon: 'el-icon-video-pause',
|
|
102230
|
+
title: '暂停',
|
|
102231
|
+
rules: function rules(f) {
|
|
102232
|
+
return _this.isChunkUploading(f) && !f.chunkPaused;
|
|
102233
|
+
},
|
|
102234
|
+
event: function event(f) {
|
|
102235
|
+
return _this.pauseUpload(f);
|
|
102236
|
+
}
|
|
102237
|
+
}, {
|
|
102238
|
+
icon: 'el-icon-video-play',
|
|
102239
|
+
title: '继续',
|
|
102240
|
+
rules: function rules(f) {
|
|
102241
|
+
return _this.isChunkUploading(f) && !!f.chunkPaused;
|
|
102242
|
+
},
|
|
102243
|
+
event: function event(f) {
|
|
102244
|
+
return _this.resumeUpload(f);
|
|
102245
|
+
}
|
|
102246
|
+
}, {
|
|
102247
|
+
icon: 'el-icon-document-copy',
|
|
102248
|
+
title: '预览',
|
|
102249
|
+
rules: function rules(f) {
|
|
102250
|
+
return !!_this.preview && done(f);
|
|
102251
|
+
},
|
|
102252
|
+
emit: 'preview'
|
|
102253
|
+
}, {
|
|
102254
|
+
icon: 'el-icon-download',
|
|
102255
|
+
title: '下载',
|
|
102256
|
+
rules: function rules(f) {
|
|
102257
|
+
return _this.isDownload && done(f);
|
|
102258
|
+
},
|
|
102259
|
+
emit: 'download'
|
|
102260
|
+
}, {
|
|
102261
|
+
icon: 'el-icon-delete',
|
|
102262
|
+
title: '删除',
|
|
102263
|
+
rules: function rules(f) {
|
|
102264
|
+
return _this.isRemove;
|
|
102265
|
+
},
|
|
102266
|
+
emit: 'remove'
|
|
102267
|
+
}];
|
|
102154
102268
|
}
|
|
102155
102269
|
},
|
|
102156
102270
|
watch: {
|
|
@@ -102204,16 +102318,18 @@ var mainvue_type_script_lang_js_props;
|
|
|
102204
102318
|
}
|
|
102205
102319
|
},
|
|
102206
102320
|
beforeCreate: function beforeCreate() {
|
|
102207
|
-
var
|
|
102321
|
+
var _this2 = this;
|
|
102208
102322
|
|
|
102209
102323
|
this.getFiles = Object(external_throttle_debounce_["debounce"])(500, function () {
|
|
102210
|
-
|
|
102324
|
+
_this2.getFileLists();
|
|
102211
102325
|
});
|
|
102212
102326
|
this.getAdjunctPropertie = Object(external_throttle_debounce_["debounce"])(500, function () {
|
|
102213
|
-
|
|
102327
|
+
_this2.getAdjunctProperties();
|
|
102214
102328
|
});
|
|
102215
102329
|
},
|
|
102216
102330
|
created: function created() {
|
|
102331
|
+
// 分片上传的运行态(按 file.uid 索引,非响应式,仅用于流程控制)
|
|
102332
|
+
this._chunkState = {};
|
|
102217
102333
|
var dochubConfig = sessionStorage.getItem('dochubConfig');
|
|
102218
102334
|
if (dochubConfig) {
|
|
102219
102335
|
this.dochubConfig = JSON.parse(dochubConfig);
|
|
@@ -102221,10 +102337,10 @@ var mainvue_type_script_lang_js_props;
|
|
|
102221
102337
|
this.getAdjunctPropertie();
|
|
102222
102338
|
},
|
|
102223
102339
|
mounted: function mounted() {
|
|
102224
|
-
var
|
|
102340
|
+
var _this3 = this;
|
|
102225
102341
|
|
|
102226
102342
|
this.$nextTick(function () {
|
|
102227
|
-
|
|
102343
|
+
_this3.getHeight();
|
|
102228
102344
|
});
|
|
102229
102345
|
},
|
|
102230
102346
|
|
|
@@ -102240,7 +102356,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102240
102356
|
|
|
102241
102357
|
//根据code获取附件参数配置
|
|
102242
102358
|
getAdjunctProperties: function getAdjunctProperties() {
|
|
102243
|
-
var
|
|
102359
|
+
var _this4 = this;
|
|
102244
102360
|
|
|
102245
102361
|
if (this.code !== undefined) {
|
|
102246
102362
|
var config = utils_store.get(this.code);
|
|
@@ -102250,6 +102366,11 @@ var mainvue_type_script_lang_js_props;
|
|
|
102250
102366
|
this.fileTotalSize = config.totalSize;
|
|
102251
102367
|
if (config.dochubConfig) {
|
|
102252
102368
|
this.dochubConfig = config.dochubConfig;
|
|
102369
|
+
if (config.bucketChunkConfig !== undefined) {
|
|
102370
|
+
this.bucketChunkConfig = config.bucketChunkConfig;
|
|
102371
|
+
} else {
|
|
102372
|
+
this.getBucketChunkConfig();
|
|
102373
|
+
}
|
|
102253
102374
|
}
|
|
102254
102375
|
|
|
102255
102376
|
var url = this.portrait || this.documentId ? this.dochubConfig.reuploadDocumentUrl || uploadOnlyOne : this.dochubConfig.uploadDocumentUrl || uploads;
|
|
@@ -102264,43 +102385,80 @@ var mainvue_type_script_lang_js_props;
|
|
|
102264
102385
|
}).then(function (res) {
|
|
102265
102386
|
if (res.rCode === 0) {
|
|
102266
102387
|
if (res.results) {
|
|
102267
|
-
|
|
102388
|
+
_this4.excludeNames = res.results.excludeName;
|
|
102268
102389
|
if (res.results.fileTypeExtName) {
|
|
102269
102390
|
var fileTypeExtName = res.results.fileTypeExtName.split(';');
|
|
102270
|
-
|
|
102391
|
+
_this4.fileAccept = fileTypeExtName.filter(function (item) {
|
|
102271
102392
|
return item;
|
|
102272
102393
|
}).join(',');
|
|
102273
102394
|
}
|
|
102274
102395
|
if (res.results.dochubConfig) {
|
|
102275
|
-
|
|
102396
|
+
_this4.dochubConfig = res.results.dochubConfig;
|
|
102276
102397
|
sessionStorage.setItem('dochubConfig', JSON.stringify(res.results.dochubConfig));
|
|
102398
|
+
// dochubConfig 有数据 → 走文档中台,再拉取该桶的桶配置(分片上传开关/参数)
|
|
102399
|
+
_this4.getBucketChunkConfig();
|
|
102277
102400
|
}
|
|
102278
|
-
var _url =
|
|
102279
|
-
|
|
102401
|
+
var _url = _this4.portrait ? _this4.dochubConfig.reuploadDocumentUrl || uploadOnlyOne : _this4.dochubConfig.uploadDocumentUrl || uploads;
|
|
102402
|
+
_this4.uploadUrl = _url.indexOf(_this4.host) > -1 ? _url : _this4.host + _url;
|
|
102280
102403
|
if (res.results.kkViewRootPath) {
|
|
102281
|
-
|
|
102404
|
+
_this4.kkfileview = res.results.kkViewRootPath;
|
|
102282
102405
|
}
|
|
102283
|
-
|
|
102284
|
-
|
|
102285
|
-
utils_store.set(
|
|
102286
|
-
accept:
|
|
102287
|
-
size:
|
|
102288
|
-
totalSize:
|
|
102289
|
-
dochubConfig:
|
|
102406
|
+
_this4.fileSize = res.results.limitFileSize ? res.results.limitFileSize : 0;
|
|
102407
|
+
_this4.fileTotalSize = res.results.limitTotalSize;
|
|
102408
|
+
utils_store.set(_this4.code, {
|
|
102409
|
+
accept: _this4.fileAccept,
|
|
102410
|
+
size: _this4.fileSize,
|
|
102411
|
+
totalSize: _this4.fileTotalSize,
|
|
102412
|
+
dochubConfig: _this4.dochubConfig
|
|
102290
102413
|
});
|
|
102291
102414
|
}
|
|
102292
|
-
|
|
102415
|
+
_this4.requestFiles && _this4.getFiles();
|
|
102293
102416
|
}
|
|
102294
102417
|
}).catch(function (err) {
|
|
102295
102418
|
if (err.message && err.message !== 'canceled') {
|
|
102296
|
-
|
|
102419
|
+
_this4.$message.error(err.message);
|
|
102297
102420
|
}
|
|
102298
102421
|
});
|
|
102299
102422
|
}
|
|
102300
102423
|
}
|
|
102301
102424
|
},
|
|
102425
|
+
|
|
102426
|
+
// 根据桶编码调中台获取桶配置接口(/v2/getBucket),取 baseBucketConfig 中的分片上传开关与参数。
|
|
102427
|
+
getBucketChunkConfig: function getBucketChunkConfig() {
|
|
102428
|
+
var _this5 = this;
|
|
102429
|
+
|
|
102430
|
+
if (!this.code) return;
|
|
102431
|
+
var url = getDochubBucket;
|
|
102432
|
+
utils_util.ajax({
|
|
102433
|
+
method: this.method,
|
|
102434
|
+
url: url,
|
|
102435
|
+
data: { bucketCode: this.code },
|
|
102436
|
+
params: { bucketCode: this.code }
|
|
102437
|
+
}).then(function (res) {
|
|
102438
|
+
if (res.rCode === 0 && res.results && res.results.baseBucketConfig) {
|
|
102439
|
+
var cfg = res.results.baseBucketConfig;
|
|
102440
|
+
_this5.bucketChunkConfig = {
|
|
102441
|
+
enableChunkUpload: cfg.enableChunkUpload,
|
|
102442
|
+
chunkSize: cfg.chunkSize,
|
|
102443
|
+
chunkConcurrent: cfg.chunkConcurrent
|
|
102444
|
+
};
|
|
102445
|
+
} else {
|
|
102446
|
+
_this5.bucketChunkConfig = null;
|
|
102447
|
+
}
|
|
102448
|
+
// 回写本地缓存,避免同 code 的其他实例重复请求
|
|
102449
|
+
var cached = utils_store.get(_this5.code);
|
|
102450
|
+
if (cached) {
|
|
102451
|
+
utils_store.set(_this5.code, upload_src_mainvue_type_script_lang_js_extends({}, cached, {
|
|
102452
|
+
bucketChunkConfig: _this5.bucketChunkConfig
|
|
102453
|
+
}));
|
|
102454
|
+
}
|
|
102455
|
+
}).catch(function () {
|
|
102456
|
+
// 桶配置获取失败不阻断上传,维持 props 行为
|
|
102457
|
+
_this5.bucketChunkConfig = null;
|
|
102458
|
+
});
|
|
102459
|
+
},
|
|
102302
102460
|
getFileLists: function getFileLists() {
|
|
102303
|
-
var
|
|
102461
|
+
var _this6 = this;
|
|
102304
102462
|
|
|
102305
102463
|
if (!this.show || this.fileList && Array.isArray(this.fileList) && this.fileList.length || this.requiredOwnId && !Object.prototype.hasOwnProperty.call(this.params, 'ownId')) {
|
|
102306
102464
|
return false;
|
|
@@ -102314,30 +102472,30 @@ var mainvue_type_script_lang_js_props;
|
|
|
102314
102472
|
format: false
|
|
102315
102473
|
}).then(function (res) {
|
|
102316
102474
|
if (res.rCode === 0) {
|
|
102317
|
-
if (
|
|
102318
|
-
|
|
102475
|
+
if (_this6.portrait === true) {
|
|
102476
|
+
_this6.image = JSON.parse(JSON.stringify(res.results))[0];
|
|
102319
102477
|
} else {
|
|
102320
|
-
|
|
102478
|
+
_this6.lists = JSON.parse(JSON.stringify(res.results));
|
|
102321
102479
|
var filesTotalSize = 0;
|
|
102322
|
-
|
|
102480
|
+
_this6.lists.forEach(function (item) {
|
|
102323
102481
|
if (Object.prototype.hasOwnProperty.call(item, 'fileSize') && item.fileSize) {
|
|
102324
102482
|
filesTotalSize += parseFloat(item.fileSize, 10);
|
|
102325
102483
|
} else {
|
|
102326
102484
|
filesTotalSize += item.size ? Math.round(item.size / 1024 * 10) / 10 : 0;
|
|
102327
102485
|
}
|
|
102328
102486
|
});
|
|
102329
|
-
|
|
102330
|
-
if (
|
|
102331
|
-
|
|
102487
|
+
_this6.filesTotalSize = filesTotalSize;
|
|
102488
|
+
if (_this6.lists.length) {
|
|
102489
|
+
_this6.$emit('input', _this6.lists);
|
|
102332
102490
|
}
|
|
102333
102491
|
}
|
|
102334
102492
|
} else {
|
|
102335
102493
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
102336
|
-
|
|
102494
|
+
_this6.$message.error(msg);
|
|
102337
102495
|
}
|
|
102338
102496
|
}).catch(function (err) {
|
|
102339
102497
|
if (err.message && err.message !== 'canceled') {
|
|
102340
|
-
|
|
102498
|
+
_this6.$message.error(err.message);
|
|
102341
102499
|
}
|
|
102342
102500
|
});
|
|
102343
102501
|
},
|
|
@@ -102357,7 +102515,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102357
102515
|
utils_util.win.open(this.kkfileview + '?url=' + url);
|
|
102358
102516
|
},
|
|
102359
102517
|
handlePreview: function handlePreview(res) {
|
|
102360
|
-
var
|
|
102518
|
+
var _this7 = this;
|
|
102361
102519
|
|
|
102362
102520
|
if (this.preview) {
|
|
102363
102521
|
if (this.onPreview) {
|
|
@@ -102374,7 +102532,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102374
102532
|
this.title = file.originalName;
|
|
102375
102533
|
this.showImg = true;
|
|
102376
102534
|
this.$nextTick(function () {
|
|
102377
|
-
|
|
102535
|
+
_this7.loadImage();
|
|
102378
102536
|
});
|
|
102379
102537
|
} else if (suffix.includes('mp4')) {
|
|
102380
102538
|
this.source = {
|
|
@@ -102403,7 +102561,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102403
102561
|
this.title = file.originalName;
|
|
102404
102562
|
this.showImg = true;
|
|
102405
102563
|
this.$nextTick(function () {
|
|
102406
|
-
|
|
102564
|
+
_this7.loadImage();
|
|
102407
102565
|
});
|
|
102408
102566
|
} else if (suffix.includes('mp4')) {
|
|
102409
102567
|
this.source = {
|
|
@@ -102429,24 +102587,24 @@ var mainvue_type_script_lang_js_props;
|
|
|
102429
102587
|
this.showImg = false;
|
|
102430
102588
|
},
|
|
102431
102589
|
loadImage: function loadImage() {
|
|
102432
|
-
var
|
|
102590
|
+
var _this8 = this;
|
|
102433
102591
|
|
|
102434
102592
|
this.$refs.showImg && (this.$refs.showImg.onload = function () {
|
|
102435
|
-
|
|
102436
|
-
var w =
|
|
102437
|
-
var h =
|
|
102438
|
-
var pw =
|
|
102439
|
-
var ph =
|
|
102593
|
+
_this8.imgChange = false;
|
|
102594
|
+
var w = _this8.$refs.showImg.naturalWidth;
|
|
102595
|
+
var h = _this8.$refs.showImg.naturalHeight;
|
|
102596
|
+
var pw = _this8.$refs.showImg.parentNode.offsetWidth;
|
|
102597
|
+
var ph = _this8.$refs.showImg.parentNode.offsetHeight;
|
|
102440
102598
|
if (w / h > pw / ph) {
|
|
102441
|
-
|
|
102599
|
+
_this8.styles = { 'max-width': '100%' };
|
|
102442
102600
|
} else {
|
|
102443
|
-
|
|
102601
|
+
_this8.styles = { 'max-height': '100%' };
|
|
102444
102602
|
}
|
|
102445
102603
|
if (w < pw) {
|
|
102446
|
-
|
|
102604
|
+
_this8.styles.width = w + 'px';
|
|
102447
102605
|
}
|
|
102448
102606
|
if (h < ph) {
|
|
102449
|
-
|
|
102607
|
+
_this8.styles.height = h + 'px';
|
|
102450
102608
|
}
|
|
102451
102609
|
});
|
|
102452
102610
|
},
|
|
@@ -102508,7 +102666,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102508
102666
|
return flag;
|
|
102509
102667
|
},
|
|
102510
102668
|
handleBeforeRemove: function handleBeforeRemove(file, fileList) {
|
|
102511
|
-
var
|
|
102669
|
+
var _this9 = this;
|
|
102512
102670
|
|
|
102513
102671
|
if (file && (file.status === 'success' || file.status == 0)) {
|
|
102514
102672
|
return this.$confirm('确定删除文件吗?', '提示', {
|
|
@@ -102516,15 +102674,15 @@ var mainvue_type_script_lang_js_props;
|
|
|
102516
102674
|
cancelButtonText: '取消',
|
|
102517
102675
|
type: 'warning'
|
|
102518
102676
|
}).then(function () {
|
|
102519
|
-
if (
|
|
102520
|
-
return
|
|
102677
|
+
if (_this9.beforeRemove) {
|
|
102678
|
+
return _this9.beforeRemove(file, fileList);
|
|
102521
102679
|
} else if (file.status === 'success' || file.status == 0) {
|
|
102522
102680
|
var userName = file.userName || file.response && file.response.userName || utils_util.getStorage('userName');
|
|
102523
102681
|
// eslint-disable-next-line no-undef
|
|
102524
102682
|
return new Promise(function (resolve, reject) {
|
|
102525
|
-
var url = typeof
|
|
102683
|
+
var url = typeof _this9.deleted === 'string' ? _this9.deleted : _this9.remove === 'string' ? _this9.remove : _this9.dochubConfig.deleteDocumentUrl || delAdjunct;
|
|
102526
102684
|
utils_util.ajax({
|
|
102527
|
-
method:
|
|
102685
|
+
method: _this9.method,
|
|
102528
102686
|
url: url,
|
|
102529
102687
|
data: {
|
|
102530
102688
|
userName: userName,
|
|
@@ -102538,18 +102696,18 @@ var mainvue_type_script_lang_js_props;
|
|
|
102538
102696
|
}
|
|
102539
102697
|
}).then(function (res) {
|
|
102540
102698
|
if (res.rCode === 0) {
|
|
102541
|
-
var se =
|
|
102542
|
-
|
|
102543
|
-
|
|
102699
|
+
var se = _this9.filesTotalSize - Math.round(file.size / 1024 * 10) / 10;
|
|
102700
|
+
_this9.filesTotalSize = se;
|
|
102701
|
+
_this9.$message.success(res.msg);
|
|
102544
102702
|
resolve();
|
|
102545
102703
|
} else {
|
|
102546
102704
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
102547
|
-
|
|
102705
|
+
_this9.$message.error(msg);
|
|
102548
102706
|
reject();
|
|
102549
102707
|
}
|
|
102550
102708
|
}).catch(function (err) {
|
|
102551
102709
|
if (err.message && err.message !== 'canceled') {
|
|
102552
|
-
|
|
102710
|
+
_this9.$message.error(err.message);
|
|
102553
102711
|
}
|
|
102554
102712
|
});
|
|
102555
102713
|
});
|
|
@@ -102587,7 +102745,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102587
102745
|
a.dispatchEvent(event);
|
|
102588
102746
|
},
|
|
102589
102747
|
handleSort: function handleSort(files) {
|
|
102590
|
-
var
|
|
102748
|
+
var _this10 = this;
|
|
102591
102749
|
|
|
102592
102750
|
if (this.isSort) {
|
|
102593
102751
|
if (this.onSort) {
|
|
@@ -102621,14 +102779,14 @@ var mainvue_type_script_lang_js_props;
|
|
|
102621
102779
|
}
|
|
102622
102780
|
}).then(function (res) {
|
|
102623
102781
|
if (res.rCode === 0) {
|
|
102624
|
-
|
|
102782
|
+
_this10.$message.success(res.msg);
|
|
102625
102783
|
} else {
|
|
102626
102784
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
102627
|
-
|
|
102785
|
+
_this10.$message.error(msg);
|
|
102628
102786
|
}
|
|
102629
102787
|
}).catch(function (err) {
|
|
102630
102788
|
if (err.message && err.message !== 'canceled') {
|
|
102631
|
-
|
|
102789
|
+
_this10.$message.error(err.message);
|
|
102632
102790
|
}
|
|
102633
102791
|
});
|
|
102634
102792
|
}
|
|
@@ -102675,6 +102833,7 @@ var mainvue_type_script_lang_js_props;
|
|
|
102675
102833
|
this.onChange && this.onChange(file, fileList);
|
|
102676
102834
|
},
|
|
102677
102835
|
handleRemove: function handleRemove(file, fileList) {
|
|
102836
|
+
this.cleanupChunk(file);
|
|
102678
102837
|
this.$emit('input', fileList.length ? fileList : '');
|
|
102679
102838
|
this.$emit('remove', file, fileList);
|
|
102680
102839
|
this.$emit('change', fileList);
|
|
@@ -102696,6 +102855,323 @@ var mainvue_type_script_lang_js_props;
|
|
|
102696
102855
|
}
|
|
102697
102856
|
this.$emit('error', err, file, fileList);
|
|
102698
102857
|
this.onError && this.onError(err, file, fileList);
|
|
102858
|
+
},
|
|
102859
|
+
|
|
102860
|
+
// el-upload 的自定义上传实现:建立可暂停的运行态并返回受控 Promise。
|
|
102861
|
+
// 暂停时不 resolve/reject(promise 维持 pending,文件保持"上传中"而非失败),继续时再次进入流程。
|
|
102862
|
+
chunkUpload: function chunkUpload(options) {
|
|
102863
|
+
var _this11 = this;
|
|
102864
|
+
|
|
102865
|
+
var file = options.file;
|
|
102866
|
+
var uid = file.uid;
|
|
102867
|
+
var state = {
|
|
102868
|
+
paused: false,
|
|
102869
|
+
controller: null,
|
|
102870
|
+
fileMd5: '',
|
|
102871
|
+
totalChunks: Math.max(1, Math.ceil(file.size / this._chunkSize)),
|
|
102872
|
+
options: options
|
|
102873
|
+
};
|
|
102874
|
+
this._chunkState[uid] = state;
|
|
102875
|
+
return new Promise(function (resolve, reject) {
|
|
102876
|
+
state.resolve = resolve;
|
|
102877
|
+
state.reject = reject;
|
|
102878
|
+
_this11.runChunkFlow(uid);
|
|
102879
|
+
});
|
|
102880
|
+
},
|
|
102881
|
+
|
|
102882
|
+
// 分片主流程(可被"继续"重新进入):MD5(缓存) → 秒传/断点续传检测 → 并发上传缺失分片 → 合并入库。
|
|
102883
|
+
runChunkFlow: function runChunkFlow(uid) {
|
|
102884
|
+
var _this12 = this;
|
|
102885
|
+
|
|
102886
|
+
var state = this._chunkState[uid];
|
|
102887
|
+
if (!state) return;
|
|
102888
|
+
var options = state.options;
|
|
102889
|
+
var file = options.file;
|
|
102890
|
+
var onProgress = options.onProgress || function () {};
|
|
102891
|
+
var baseParams = function baseParams() {
|
|
102892
|
+
return upload_src_mainvue_type_script_lang_js_extends({}, _this12.param, {
|
|
102893
|
+
fileMd5: state.fileMd5,
|
|
102894
|
+
fileName: file.name,
|
|
102895
|
+
fileSize: file.size,
|
|
102896
|
+
totalChunks: state.totalChunks,
|
|
102897
|
+
bucketCode: _this12.code,
|
|
102898
|
+
businessId: _this12.ownId
|
|
102899
|
+
});
|
|
102900
|
+
};
|
|
102901
|
+
var isAbort = function isAbort(e) {
|
|
102902
|
+
return !!e && (e.__aborted === true || e.name === 'CanceledError' || e.name === 'AbortError' || typeof e.message === 'string' && /cancel|abort/i.test(e.message));
|
|
102903
|
+
};
|
|
102904
|
+
|
|
102905
|
+
Promise.resolve().then(function () {
|
|
102906
|
+
return state.fileMd5 || _this12.computeFileMd5(file, onProgress);
|
|
102907
|
+
}).then(function (md5) {
|
|
102908
|
+
state.fileMd5 = md5;
|
|
102909
|
+
if (state.paused) return null;
|
|
102910
|
+
return utils_util.ajax({
|
|
102911
|
+
method: 'post',
|
|
102912
|
+
url: _this12.chunkUrls.check,
|
|
102913
|
+
data: baseParams(),
|
|
102914
|
+
params: baseParams(),
|
|
102915
|
+
headers: options.headers
|
|
102916
|
+
});
|
|
102917
|
+
}).then(function (checkRes) {
|
|
102918
|
+
if (!checkRes) return; // 暂停于 MD5/检测阶段,维持 pending
|
|
102919
|
+
if (checkRes.rCode !== 0) return Promise.reject(checkRes);
|
|
102920
|
+
var info = checkRes.results || {};
|
|
102921
|
+
// 秒传命中:该业务桶下已存在同 MD5 文件,直接视为成功
|
|
102922
|
+
if (info.instant) {
|
|
102923
|
+
onProgress({ percent: 100 });
|
|
102924
|
+
_this12.normalizeChunkDoc(info, file.name);
|
|
102925
|
+
_this12.finishChunk(uid, {
|
|
102926
|
+
rCode: 0,
|
|
102927
|
+
msg: checkRes.msg || '秒传成功',
|
|
102928
|
+
results: info
|
|
102929
|
+
});
|
|
102930
|
+
// 秒传文件已存在于服务端,刷新列表以展示其完整信息(含可下载/预览的 id)
|
|
102931
|
+
_this12.requestFiles && _this12.getFiles();
|
|
102932
|
+
return;
|
|
102933
|
+
}
|
|
102934
|
+
// 断点续传:跳过服务端已存在的分片
|
|
102935
|
+
var uploaded = new Set(info.uploadedChunks || []);
|
|
102936
|
+
var pending = [];
|
|
102937
|
+
for (var i = 0; i < state.totalChunks; i++) {
|
|
102938
|
+
if (!uploaded.has(i)) pending.push(i);
|
|
102939
|
+
}
|
|
102940
|
+
var finished = state.totalChunks - pending.length;
|
|
102941
|
+
// 上传阶段占 5~95%(MD5 校验已占 0~5%),保证进度单调不回退
|
|
102942
|
+
onProgress({
|
|
102943
|
+
percent: Math.min(95, 5 + Math.round(finished / state.totalChunks * 90))
|
|
102944
|
+
});
|
|
102945
|
+
state.controller = typeof AbortController !== 'undefined' ? new AbortController() : null;
|
|
102946
|
+
var signal = state.controller ? state.controller.signal : undefined;
|
|
102947
|
+
return _this12.runChunkQueue(pending, _this12._chunkConcurrent, function (index) {
|
|
102948
|
+
if (state.paused) return Promise.reject({ __aborted: true });
|
|
102949
|
+
return _this12.uploadOneChunk(file, index, state.totalChunks, state.fileMd5, options.headers, signal).then(function () {
|
|
102950
|
+
finished++;
|
|
102951
|
+
onProgress({
|
|
102952
|
+
percent: Math.min(95, 5 + Math.round(finished / state.totalChunks * 90))
|
|
102953
|
+
});
|
|
102954
|
+
});
|
|
102955
|
+
}).then(function () {
|
|
102956
|
+
if (state.paused) return; // 暂停于上传阶段,维持 pending
|
|
102957
|
+
return utils_util.ajax({
|
|
102958
|
+
method: 'post',
|
|
102959
|
+
url: _this12.chunkUrls.merge,
|
|
102960
|
+
data: baseParams(),
|
|
102961
|
+
params: baseParams(),
|
|
102962
|
+
headers: options.headers
|
|
102963
|
+
}).then(function (mergeRes) {
|
|
102964
|
+
if (mergeRes.rCode !== 0) return Promise.reject(mergeRes);
|
|
102965
|
+
onProgress({ percent: 100 });
|
|
102966
|
+
_this12.normalizeChunkDoc(mergeRes.results, file.name);
|
|
102967
|
+
_this12.finishChunk(uid, mergeRes);
|
|
102968
|
+
// 刷新列表:让刚入库的文件以与其他行一致的结构展示(时间/大小/上传人等)
|
|
102969
|
+
_this12.requestFiles && _this12.getFiles();
|
|
102970
|
+
});
|
|
102971
|
+
});
|
|
102972
|
+
}).catch(function (e) {
|
|
102973
|
+
// 暂停导致的中止:保持 pending 等待"继续";其余才算失败
|
|
102974
|
+
if (state.paused || isAbort(e)) return;
|
|
102975
|
+
_this12.failChunk(uid, e);
|
|
102976
|
+
});
|
|
102977
|
+
},
|
|
102978
|
+
|
|
102979
|
+
// 暂停:置暂停标记并中止在传分片;promise 维持 pending,文件保持"上传中"
|
|
102980
|
+
pauseUpload: function pauseUpload(file) {
|
|
102981
|
+
var state = file && this._chunkState[file.uid];
|
|
102982
|
+
if (!state) return;
|
|
102983
|
+
state.paused = true;
|
|
102984
|
+
if (state.controller) {
|
|
102985
|
+
try {
|
|
102986
|
+
state.controller.abort();
|
|
102987
|
+
} catch (e) {
|
|
102988
|
+
/* ignore */
|
|
102989
|
+
}
|
|
102990
|
+
}
|
|
102991
|
+
this.$set(file, 'chunkPaused', true);
|
|
102992
|
+
this.$emit('chunk-pause', file);
|
|
102993
|
+
},
|
|
102994
|
+
|
|
102995
|
+
// 继续:清暂停标记,重新进入流程(checkFile 会返回已传分片,自动续传)
|
|
102996
|
+
resumeUpload: function resumeUpload(file) {
|
|
102997
|
+
var state = file && this._chunkState[file.uid];
|
|
102998
|
+
if (!state || !state.paused) return; // 仅暂停态可续传,防止重复触发并发流程
|
|
102999
|
+
state.paused = false;
|
|
103000
|
+
this.$set(file, 'chunkPaused', false);
|
|
103001
|
+
this.$emit('chunk-resume', file);
|
|
103002
|
+
this.runChunkFlow(file.uid);
|
|
103003
|
+
},
|
|
103004
|
+
|
|
103005
|
+
// 该文件是否处于分片上传运行态(用于操作列按钮显隐)
|
|
103006
|
+
isChunkUploading: function isChunkUploading(file) {
|
|
103007
|
+
return !!(file && this._chunkState && this._chunkState[file.uid]);
|
|
103008
|
+
},
|
|
103009
|
+
|
|
103010
|
+
// 归一化合并响应:dochub Document 用 docTagId 标识、且无 suffix 字段,
|
|
103011
|
+
// 而组件下载读 adjunctId、预览读 suffix/originalName,这里统一映射补齐,避免预览取 suffix 报错。
|
|
103012
|
+
normalizeChunkDoc: function normalizeChunkDoc(results, fileName) {
|
|
103013
|
+
if (!results || (typeof results === 'undefined' ? 'undefined' : upload_src_mainvue_type_script_lang_js_typeof(results)) !== 'object') return results;
|
|
103014
|
+
var id = results.adjunctId || results.docTagId || results.documentId || results.id;
|
|
103015
|
+
if (id) {
|
|
103016
|
+
if (!results.adjunctId) results.adjunctId = id;
|
|
103017
|
+
if (!results.documentId) results.documentId = id;
|
|
103018
|
+
}
|
|
103019
|
+
// 文件名:优先用上传时的原始名,其次后端 documentFile.docName
|
|
103020
|
+
var name = fileName || results.documentFile && results.documentFile.docName || results.originalName || results.name || '';
|
|
103021
|
+
if (!results.originalName && name) results.originalName = name;
|
|
103022
|
+
// 后缀:预览按后缀判断类型,缺省从文件名推导;始终保证为字符串
|
|
103023
|
+
if (results.suffix === undefined || results.suffix === null) {
|
|
103024
|
+
results.suffix = name && name.lastIndexOf('.') > -1 ? name.slice(name.lastIndexOf('.') + 1) : '';
|
|
103025
|
+
}
|
|
103026
|
+
// 展示字段:dochub 的元数据在 documentFile 下且字段名不同,映射成 showInfo 默认读取的扁平字段
|
|
103027
|
+
var df = results.documentFile;
|
|
103028
|
+
if (df && (typeof df === 'undefined' ? 'undefined' : upload_src_mainvue_type_script_lang_js_typeof(df)) === 'object') {
|
|
103029
|
+
if (!results.uploadTime) {
|
|
103030
|
+
results.uploadTime = df.createTime || df.lastModifyTime || '';
|
|
103031
|
+
}
|
|
103032
|
+
if (!results.userName) {
|
|
103033
|
+
results.userName = df.createUserName || df.lastModifyUserName || '';
|
|
103034
|
+
}
|
|
103035
|
+
if (!results.fileSize && (df.docSize || df.docSize === 0)) {
|
|
103036
|
+
results.fileSize = this.formatFileSize(df.docSize);
|
|
103037
|
+
}
|
|
103038
|
+
}
|
|
103039
|
+
return results;
|
|
103040
|
+
},
|
|
103041
|
+
|
|
103042
|
+
// 字节数格式化为可读大小(与列表展示风格一致:1 位小数、无空格)
|
|
103043
|
+
formatFileSize: function formatFileSize(bytes) {
|
|
103044
|
+
var n = Number(bytes);
|
|
103045
|
+
if (!n || n <= 0) return '0B';
|
|
103046
|
+
if (n >= 1073741824) return (n / 1073741824).toFixed(1) + 'GB';
|
|
103047
|
+
if (n >= 1048576) return (n / 1048576).toFixed(1) + 'MB';
|
|
103048
|
+
if (n >= 1024) return (n / 1024).toFixed(1) + 'KB';
|
|
103049
|
+
return n + 'B';
|
|
103050
|
+
},
|
|
103051
|
+
|
|
103052
|
+
// 完成:兑现 promise 并清理运行态
|
|
103053
|
+
finishChunk: function finishChunk(uid, response) {
|
|
103054
|
+
var state = this._chunkState[uid];
|
|
103055
|
+
if (!state) return;
|
|
103056
|
+
state.resolve && state.resolve(response);
|
|
103057
|
+
delete this._chunkState[uid];
|
|
103058
|
+
},
|
|
103059
|
+
|
|
103060
|
+
// 失败:拒绝 promise 并清理运行态
|
|
103061
|
+
failChunk: function failChunk(uid, err) {
|
|
103062
|
+
var state = this._chunkState[uid];
|
|
103063
|
+
if (!state) return;
|
|
103064
|
+
state.reject && state.reject(err);
|
|
103065
|
+
delete this._chunkState[uid];
|
|
103066
|
+
},
|
|
103067
|
+
|
|
103068
|
+
// 移除文件时清理分片运行态(中止在传分片,孤立 pending promise 不再触发回调)
|
|
103069
|
+
cleanupChunk: function cleanupChunk(file) {
|
|
103070
|
+
var uid = file && file.uid;
|
|
103071
|
+
var state = uid && this._chunkState && this._chunkState[uid];
|
|
103072
|
+
if (!state) return;
|
|
103073
|
+
state.paused = true;
|
|
103074
|
+
state.resolve = null;
|
|
103075
|
+
state.reject = null;
|
|
103076
|
+
if (state.controller) {
|
|
103077
|
+
try {
|
|
103078
|
+
state.controller.abort();
|
|
103079
|
+
} catch (e) {
|
|
103080
|
+
/* ignore */
|
|
103081
|
+
}
|
|
103082
|
+
}
|
|
103083
|
+
delete this._chunkState[uid];
|
|
103084
|
+
},
|
|
103085
|
+
|
|
103086
|
+
// 上传单个分片(multipart/form-data);signal 用于暂停时中止
|
|
103087
|
+
uploadOneChunk: function uploadOneChunk(file, index, totalChunks, fileMd5, headers, signal) {
|
|
103088
|
+
var _this13 = this;
|
|
103089
|
+
|
|
103090
|
+
var start = index * this._chunkSize;
|
|
103091
|
+
var end = Math.min(start + this._chunkSize, file.size);
|
|
103092
|
+
var formData = new FormData();
|
|
103093
|
+
formData.append('file', file.slice(start, end), file.name);
|
|
103094
|
+
formData.append('fileMd5', fileMd5);
|
|
103095
|
+
formData.append('fileName', file.name);
|
|
103096
|
+
formData.append('fileSize', file.size);
|
|
103097
|
+
formData.append('chunkIndex', index);
|
|
103098
|
+
formData.append('totalChunks', totalChunks);
|
|
103099
|
+
formData.append('bucketCode', this.code);
|
|
103100
|
+
formData.append('businessId', this.ownId);
|
|
103101
|
+
Object.keys(this.param || {}).forEach(function (key) {
|
|
103102
|
+
formData.append(key, _this13.param[key]);
|
|
103103
|
+
});
|
|
103104
|
+
return utils_util.ajax({
|
|
103105
|
+
method: 'post',
|
|
103106
|
+
url: this.chunkUrls.upload,
|
|
103107
|
+
data: formData,
|
|
103108
|
+
format: false,
|
|
103109
|
+
headers: headers,
|
|
103110
|
+
signal: signal
|
|
103111
|
+
}).then(function (res) {
|
|
103112
|
+
if (res.rCode !== 0) return Promise.reject(res);
|
|
103113
|
+
return res;
|
|
103114
|
+
});
|
|
103115
|
+
},
|
|
103116
|
+
|
|
103117
|
+
// 分块读取文件并增量计算 MD5(避免大文件一次性读入内存)
|
|
103118
|
+
computeFileMd5: function computeFileMd5(file, onProgress) {
|
|
103119
|
+
var _this14 = this;
|
|
103120
|
+
|
|
103121
|
+
return new Promise(function (resolve, reject) {
|
|
103122
|
+
var size = _this14._chunkSize;
|
|
103123
|
+
var chunks = Math.max(1, Math.ceil(file.size / size));
|
|
103124
|
+
var spark = new external_spark_md5_default.a.ArrayBuffer();
|
|
103125
|
+
var reader = new FileReader();
|
|
103126
|
+
var current = 0;
|
|
103127
|
+
var loadNext = function loadNext() {
|
|
103128
|
+
var start = current * size;
|
|
103129
|
+
reader.readAsArrayBuffer(file.slice(start, Math.min(start + size, file.size)));
|
|
103130
|
+
};
|
|
103131
|
+
reader.onload = function (e) {
|
|
103132
|
+
spark.append(e.target.result);
|
|
103133
|
+
current++;
|
|
103134
|
+
// 校验阶段占进度 0~5%,剩余留给上传与合并
|
|
103135
|
+
onProgress && onProgress({ percent: Math.round(current / chunks * 5) });
|
|
103136
|
+
if (current < chunks) {
|
|
103137
|
+
loadNext();
|
|
103138
|
+
} else {
|
|
103139
|
+
// 取标准 32 位 MD5 的中间 16 位,与后端 hutool digestHex16(即 doc_md5)口径一致,
|
|
103140
|
+
// 否则秒传按 md5 比对永远不命中
|
|
103141
|
+
resolve(spark.end().substring(8, 24));
|
|
103142
|
+
}
|
|
103143
|
+
};
|
|
103144
|
+
reader.onerror = function () {
|
|
103145
|
+
return reject({ msg: '文件读取失败,无法计算MD5' });
|
|
103146
|
+
};
|
|
103147
|
+
loadNext();
|
|
103148
|
+
});
|
|
103149
|
+
},
|
|
103150
|
+
|
|
103151
|
+
// 限制并发的分片任务队列
|
|
103152
|
+
runChunkQueue: function runChunkQueue(indexes, concurrency, worker) {
|
|
103153
|
+
return new Promise(function (resolve, reject) {
|
|
103154
|
+
if (!indexes.length) return resolve();
|
|
103155
|
+
var cursor = 0;
|
|
103156
|
+
var active = 0;
|
|
103157
|
+
var failed = false;
|
|
103158
|
+
var schedule = function schedule() {
|
|
103159
|
+
if (failed) return;
|
|
103160
|
+
if (cursor >= indexes.length && active === 0) return resolve();
|
|
103161
|
+
while (active < concurrency && cursor < indexes.length) {
|
|
103162
|
+
var index = indexes[cursor++];
|
|
103163
|
+
active++;
|
|
103164
|
+
worker(index).then(function () {
|
|
103165
|
+
active--;
|
|
103166
|
+
schedule();
|
|
103167
|
+
}).catch(function (err) {
|
|
103168
|
+
failed = true;
|
|
103169
|
+
reject(err);
|
|
103170
|
+
});
|
|
103171
|
+
}
|
|
103172
|
+
};
|
|
103173
|
+
schedule();
|
|
103174
|
+
});
|
|
102699
103175
|
}
|
|
102700
103176
|
}
|
|
102701
103177
|
});
|
|
@@ -102711,8 +103187,8 @@ var mainvue_type_script_lang_js_props;
|
|
|
102711
103187
|
|
|
102712
103188
|
var upload_src_main_component = normalizeComponent(
|
|
102713
103189
|
packages_upload_src_mainvue_type_script_lang_js_,
|
|
102714
|
-
|
|
102715
|
-
|
|
103190
|
+
mainvue_type_template_id_6e200c92_render,
|
|
103191
|
+
mainvue_type_template_id_6e200c92_staticRenderFns,
|
|
102716
103192
|
false,
|
|
102717
103193
|
null,
|
|
102718
103194
|
null,
|
|
@@ -103214,7 +103690,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
103214
103690
|
}
|
|
103215
103691
|
|
|
103216
103692
|
/* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
|
|
103217
|
-
version: '0.8.
|
|
103693
|
+
version: '0.8.24',
|
|
103218
103694
|
install: install,
|
|
103219
103695
|
Button: packages_button,
|
|
103220
103696
|
ButtonGroup: button_group,
|