ecinc-cloud-mappaio 9.7.13 → 9.7.14
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/ecmappaio.common.js +1230 -76
- package/lib/ecmappaio.umd.js +1230 -76
- package/lib/ecmappaio.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecmappaio.common.js
CHANGED
|
@@ -8750,7 +8750,7 @@ src.install = function (Vue) {
|
|
|
8750
8750
|
|
|
8751
8751
|
/***/ }),
|
|
8752
8752
|
|
|
8753
|
-
/***/
|
|
8753
|
+
/***/ 8388:
|
|
8754
8754
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8755
8755
|
|
|
8756
8756
|
"use strict";
|
|
@@ -8770,7 +8770,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
8770
8770
|
WriteToReadIdea: function() { return /* binding */ Wflowform_WriteToReadIdea; }
|
|
8771
8771
|
});
|
|
8772
8772
|
|
|
8773
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=template&id=
|
|
8773
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=template&id=d820d2a0&scoped=true
|
|
8774
8774
|
var render = function render() {
|
|
8775
8775
|
var _vm = this,
|
|
8776
8776
|
_c = _vm._self._c;
|
|
@@ -8781,9 +8781,9 @@ var render = function render() {
|
|
|
8781
8781
|
}) : _vm._e(), _vm.attachModeType === 'default' ? _c('van-cell-group', {
|
|
8782
8782
|
staticClass: "van-attachment-field",
|
|
8783
8783
|
class: {
|
|
8784
|
-
'wflow-attach': _vm.
|
|
8784
|
+
'wflow-attach': _vm.localShowAttach || _vm.canUpload
|
|
8785
8785
|
}
|
|
8786
|
-
}, [
|
|
8786
|
+
}, [_c('van-cell', {
|
|
8787
8787
|
staticStyle: {
|
|
8788
8788
|
"height": "44px"
|
|
8789
8789
|
},
|
|
@@ -8793,21 +8793,20 @@ var render = function render() {
|
|
|
8793
8793
|
},
|
|
8794
8794
|
on: {
|
|
8795
8795
|
"click": function click($event) {
|
|
8796
|
-
_vm.
|
|
8796
|
+
_vm.localShowAttach = !_vm.localShowAttach;
|
|
8797
8797
|
}
|
|
8798
8798
|
}
|
|
8799
|
-
}, [
|
|
8800
|
-
class: _vm.showAttachments ? 'icon-play-up' : 'icon-play-down',
|
|
8801
|
-
attrs: {
|
|
8802
|
-
"name": "play"
|
|
8803
|
-
}
|
|
8804
|
-
})] : [_vm._v(_vm._s(_vm.$tx('ecmapp.common.nothing', '无')))]], 2) : _c('van-cell', {
|
|
8799
|
+
}, [_c('span', {
|
|
8805
8800
|
staticStyle: {
|
|
8806
|
-
"
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8801
|
+
"display": "inline-flex",
|
|
8802
|
+
"align-items": "center",
|
|
8803
|
+
"gap": "8px"
|
|
8804
|
+
}
|
|
8805
|
+
}, [_vm.canUpload ? _c('span', {
|
|
8806
|
+
on: {
|
|
8807
|
+
"click": function click($event) {
|
|
8808
|
+
$event.stopPropagation();
|
|
8809
|
+
}
|
|
8811
8810
|
}
|
|
8812
8811
|
}, [_c('van-uploader', {
|
|
8813
8812
|
attrs: {
|
|
@@ -8827,7 +8826,7 @@ var render = function render() {
|
|
|
8827
8826
|
},
|
|
8828
8827
|
expression: "uploadAttach"
|
|
8829
8828
|
}
|
|
8830
|
-
}, [
|
|
8829
|
+
}, [_c('van-icon', {
|
|
8831
8830
|
staticStyle: {
|
|
8832
8831
|
"margin-top": "2px"
|
|
8833
8832
|
},
|
|
@@ -8835,12 +8834,17 @@ var render = function render() {
|
|
|
8835
8834
|
"name": "add-o",
|
|
8836
8835
|
"size": "20px"
|
|
8837
8836
|
}
|
|
8838
|
-
})
|
|
8837
|
+
})], 1)], 1) : _vm._e(), _vm.attachList.length > 0 ? _c('span', [_vm._v(" " + _vm._s(_vm.localShowAttach ? _vm.$tx('ecmapp.pageBtns.fold', '折叠') : _vm.$tx('ecmapp.pageBtns.open', '展开')) + " "), _c('van-icon', {
|
|
8838
|
+
class: _vm.localShowAttach ? 'icon-play-up' : 'icon-play-down',
|
|
8839
|
+
attrs: {
|
|
8840
|
+
"name": "play"
|
|
8841
|
+
}
|
|
8842
|
+
})], 1) : _vm._e(), _vm.attachList.length === 0 && !_vm.canUpload ? _c('span', [_vm._v(" " + _vm._s(_vm.$tx('ecmapp.common.nothing', '无')) + " ")]) : _vm._e()])])], 1) : _vm._e(), _vm.attachModeType === 'default' ? _c('van-cell-group', {
|
|
8839
8843
|
directives: [{
|
|
8840
8844
|
name: "show",
|
|
8841
8845
|
rawName: "v-show",
|
|
8842
|
-
value: _vm.
|
|
8843
|
-
expression: "
|
|
8846
|
+
value: _vm.localShowAttach || _vm.componentType === 'Wflow' && _vm.vo.status < 1,
|
|
8847
|
+
expression: "localShowAttach || (componentType === 'Wflow' && vo.status < 1)"
|
|
8844
8848
|
}],
|
|
8845
8849
|
staticClass: "wfattach-container"
|
|
8846
8850
|
}, [_vm._l(_vm.attachList, function (attach, index) {
|
|
@@ -8867,7 +8871,7 @@ var render = function render() {
|
|
|
8867
8871
|
domProps: {
|
|
8868
8872
|
"innerHTML": _vm._s(attach.fileSize)
|
|
8869
8873
|
}
|
|
8870
|
-
}), _vm.
|
|
8874
|
+
}), _vm.localShowMoreMenu && attach.id !== undefined ? [_c('van-icon', {
|
|
8871
8875
|
attrs: {
|
|
8872
8876
|
"name": "ellipsis"
|
|
8873
8877
|
},
|
|
@@ -8888,7 +8892,13 @@ var render = function render() {
|
|
|
8888
8892
|
return _vm.handleOpenEditor(attach);
|
|
8889
8893
|
}
|
|
8890
8894
|
}
|
|
8891
|
-
}) : _vm._e(), _vm.
|
|
8895
|
+
}) : _vm._e(), _vm.deletingAttachId === attach.id ? [_c('van-icon', {
|
|
8896
|
+
staticClass: "attach-deleting-icon",
|
|
8897
|
+
attrs: {
|
|
8898
|
+
"name": "replay",
|
|
8899
|
+
"color": "#ee0a24"
|
|
8900
|
+
}
|
|
8901
|
+
})] : _vm.canUpload && _vm.canDelete ? _c('van-icon', {
|
|
8892
8902
|
attrs: {
|
|
8893
8903
|
"color": "#ee0a24",
|
|
8894
8904
|
"name": "cross"
|
|
@@ -8900,9 +8910,6 @@ var render = function render() {
|
|
|
8900
8910
|
}
|
|
8901
8911
|
}
|
|
8902
8912
|
}) : _vm._e(), _vm.attachShowDownload && attach.id !== undefined ? _c('van-icon', {
|
|
8903
|
-
staticStyle: {
|
|
8904
|
-
"margin-left": "4px"
|
|
8905
|
-
},
|
|
8906
8913
|
attrs: {
|
|
8907
8914
|
"name": "down"
|
|
8908
8915
|
},
|
|
@@ -8982,7 +8989,13 @@ var render = function render() {
|
|
|
8982
8989
|
"top": "11px",
|
|
8983
8990
|
"padding": "0 5px"
|
|
8984
8991
|
}
|
|
8985
|
-
}, [_vm.
|
|
8992
|
+
}, [_vm.deletingAttachId === attach.id ? [_c('van-icon', {
|
|
8993
|
+
staticClass: "attach-deleting-icon",
|
|
8994
|
+
attrs: {
|
|
8995
|
+
"name": "replay",
|
|
8996
|
+
"color": "#ee0a24"
|
|
8997
|
+
}
|
|
8998
|
+
})] : _vm.canUpload && _vm.canDelete ? _c('van-icon', {
|
|
8986
8999
|
attrs: {
|
|
8987
9000
|
"name": "cross"
|
|
8988
9001
|
},
|
|
@@ -9002,7 +9015,7 @@ var render = function render() {
|
|
|
9002
9015
|
return _vm.handleUploadPreview(attach);
|
|
9003
9016
|
}
|
|
9004
9017
|
}
|
|
9005
|
-
})],
|
|
9018
|
+
})], 2)]), !attach.id && attach.file.progress > 0 ? _c('template', {
|
|
9006
9019
|
slot: "label"
|
|
9007
9020
|
}, [_c('div', {
|
|
9008
9021
|
staticClass: "upload-progress"
|
|
@@ -9198,7 +9211,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9198
9211
|
onZipAttachPreviewClick: {
|
|
9199
9212
|
type: Function,
|
|
9200
9213
|
default: null
|
|
9201
|
-
}
|
|
9214
|
+
},
|
|
9215
|
+
// 自定义压缩附件处理方式
|
|
9216
|
+
autoUpload: {
|
|
9217
|
+
type: Boolean,
|
|
9218
|
+
default: true
|
|
9219
|
+
} // 是否开启自动上传,属性值为true时选择文件后自动上传
|
|
9202
9220
|
},
|
|
9203
9221
|
data: function data() {
|
|
9204
9222
|
return {
|
|
@@ -9210,6 +9228,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9210
9228
|
renameAttach: {
|
|
9211
9229
|
rename: ''
|
|
9212
9230
|
},
|
|
9231
|
+
localShowAttach: this.showAttachments,
|
|
9232
|
+
localShowMoreMenu: this.showMoreMenu,
|
|
9233
|
+
deletingAttachId: null,
|
|
9213
9234
|
licExpiredAlert: null,
|
|
9214
9235
|
loginUser: this.$store.getters.loginUser,
|
|
9215
9236
|
topdfFile: '.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt',
|
|
@@ -9217,7 +9238,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9217
9238
|
imgFile: '.pdf,.pdfx,.jpg,.png,.jpeg,.gif,.bmp' //图片文件格式
|
|
9218
9239
|
};
|
|
9219
9240
|
},
|
|
9220
|
-
computed: _objectSpread({}, (0,vuex_esm/* mapGetters */.L8)(['loginUser'])),
|
|
9241
|
+
computed: _objectSpread({}, (0,vuex_esm/* mapGetters */.L8)(['loginUser', 'maxFileSize'])),
|
|
9221
9242
|
watch: {
|
|
9222
9243
|
attachments: {
|
|
9223
9244
|
handler: function handler(val) {
|
|
@@ -9265,6 +9286,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9265
9286
|
},
|
|
9266
9287
|
deep: true,
|
|
9267
9288
|
immediate: true
|
|
9289
|
+
},
|
|
9290
|
+
showAttachments: function showAttachments(val) {
|
|
9291
|
+
this.localShowAttach = val;
|
|
9292
|
+
},
|
|
9293
|
+
showMoreMenu: function showMoreMenu(val) {
|
|
9294
|
+
this.localShowMoreMenu = val;
|
|
9268
9295
|
}
|
|
9269
9296
|
},
|
|
9270
9297
|
created: function created() {
|
|
@@ -9278,7 +9305,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9278
9305
|
this.curTN.tnCanEdit = $scope.canEdit;
|
|
9279
9306
|
if (this.canEdit == null) this.canEdit = this.curTN.tnCanEdit;
|
|
9280
9307
|
this.canUpload = this.attachEdit !== null ? this.attachEdit.canUpload : this.canEdit === 1;
|
|
9281
|
-
} else if (this.
|
|
9308
|
+
} else if (this.curTN.tnCanEdit === 1 || this.attachsType === 'DONEXT') {
|
|
9282
9309
|
// 流程表单
|
|
9283
9310
|
this.canUpload = true;
|
|
9284
9311
|
}
|
|
@@ -9292,8 +9319,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9292
9319
|
setTimeout(function () {
|
|
9293
9320
|
_this3.setWfAttachUrl();
|
|
9294
9321
|
if (window.mappType !== 'ecinc') {
|
|
9295
|
-
_this3
|
|
9296
|
-
_this3.$forceUpdate();
|
|
9322
|
+
_this3.localShowMoreMenu = false;
|
|
9297
9323
|
}
|
|
9298
9324
|
}, 500);
|
|
9299
9325
|
|
|
@@ -9760,6 +9786,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9760
9786
|
deleteUrl = _this8.wfAttachUrl + '/delete';
|
|
9761
9787
|
if (_this.$vnode.context.wfInstance === undefined || _this.$vnode.context.wfInstance === null || _this.$vnode.context.wfInstance.id === undefined) deleteUrl = _this8.wfAttachUrl + '/deleteAttach'; // 非流程表单
|
|
9762
9788
|
|
|
9789
|
+
_this8.deletingAttachId = file.id;
|
|
9763
9790
|
_this8.$http({
|
|
9764
9791
|
method: 'DELETE',
|
|
9765
9792
|
contentType: 'application/x-www-form-urlencoded',
|
|
@@ -9783,8 +9810,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9783
9810
|
message: res.message
|
|
9784
9811
|
});
|
|
9785
9812
|
}
|
|
9813
|
+
}).finally(function () {
|
|
9814
|
+
_this8.deletingAttachId = null;
|
|
9786
9815
|
});
|
|
9787
|
-
case
|
|
9816
|
+
case 4:
|
|
9788
9817
|
case "end":
|
|
9789
9818
|
return _context2.stop();
|
|
9790
9819
|
}
|
|
@@ -9888,6 +9917,33 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9888
9917
|
return attach.fileType === _this9.attachsType;
|
|
9889
9918
|
});
|
|
9890
9919
|
this.$forceUpdate();
|
|
9920
|
+
|
|
9921
|
+
// 选择文件后自动展开附件列表
|
|
9922
|
+
this.localShowAttach = true;
|
|
9923
|
+
setTimeout(function () {
|
|
9924
|
+
// 自动上传
|
|
9925
|
+
if (_this9.autoUpload) {
|
|
9926
|
+
var scope = null;
|
|
9927
|
+
if (_this9.$vnode.context.wfInstance) {
|
|
9928
|
+
scope = _this9.$vnode.context;
|
|
9929
|
+
} else if (_this9.$vnode.context.$parent.moduleInfo) {
|
|
9930
|
+
scope = _this9.$vnode.context.$parent;
|
|
9931
|
+
scope.wfInstance = {
|
|
9932
|
+
module: scope.moduleCode,
|
|
9933
|
+
bodyDocId: ''
|
|
9934
|
+
};
|
|
9935
|
+
} else if (_this9.$vnode.context.$parent.$vnode.context.moduleInfo) {
|
|
9936
|
+
scope = _this9.$vnode.context.$parent.$vnode.context;
|
|
9937
|
+
scope.wfInstance = {
|
|
9938
|
+
module: scope.moduleCode,
|
|
9939
|
+
bodyDocId: ''
|
|
9940
|
+
};
|
|
9941
|
+
}
|
|
9942
|
+
if (scope) {
|
|
9943
|
+
_this9.uploadWflowAttach(scope);
|
|
9944
|
+
}
|
|
9945
|
+
}
|
|
9946
|
+
}, 100);
|
|
9891
9947
|
},
|
|
9892
9948
|
// 初始化文件头像
|
|
9893
9949
|
initPotourl: function initPotourl(attach) {
|
|
@@ -9927,11 +9983,27 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9927
9983
|
case 0:
|
|
9928
9984
|
_uploadAttachFile = function _uploadAttachFile3() {
|
|
9929
9985
|
_uploadAttachFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(attach, index) {
|
|
9930
|
-
var file, config, module, reqData, uploadRst;
|
|
9986
|
+
var file, maxFileSizeStr, message, config, module, reqData, uploadRst;
|
|
9931
9987
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
9932
9988
|
while (1) switch (_context4.prev = _context4.next) {
|
|
9933
9989
|
case 0:
|
|
9934
|
-
file = attach.file;
|
|
9990
|
+
file = attach.file; // maxFileSize 校验:超过单文件大小限制时拒绝上传
|
|
9991
|
+
if (!(_this.maxFileSize && _this.maxFileSize !== -1)) {
|
|
9992
|
+
_context4.next = 6;
|
|
9993
|
+
break;
|
|
9994
|
+
}
|
|
9995
|
+
if (!(file.file && file.file.size > _this.maxFileSize)) {
|
|
9996
|
+
_context4.next = 6;
|
|
9997
|
+
break;
|
|
9998
|
+
}
|
|
9999
|
+
maxFileSizeStr = (0,utils/* formatFileSize */.v7)(_this.maxFileSize);
|
|
10000
|
+
message = '上传单个文件大小不允许超过' + maxFileSizeStr;
|
|
10001
|
+
return _context4.abrupt("return", {
|
|
10002
|
+
code: 'failure',
|
|
10003
|
+
message: message,
|
|
10004
|
+
body: {}
|
|
10005
|
+
});
|
|
10006
|
+
case 6:
|
|
9935
10007
|
config = {
|
|
9936
10008
|
onUploadProgress: function onUploadProgress(progressEvent) {
|
|
9937
10009
|
var complete = progressEvent.loaded / progressEvent.total * 100 | 0;
|
|
@@ -9962,12 +10034,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9962
10034
|
// 代办佐证材料
|
|
9963
10035
|
reqData.uploadBy = attach.uploadBy;
|
|
9964
10036
|
}
|
|
9965
|
-
_context4.next =
|
|
10037
|
+
_context4.next = 14;
|
|
9966
10038
|
return _this.$wfEngine.upload(_this, _this.wfAttachUrl + '/upload', file.file, reqData, config);
|
|
9967
|
-
case
|
|
10039
|
+
case 14:
|
|
9968
10040
|
uploadRst = _context4.sent;
|
|
9969
10041
|
return _context4.abrupt("return", uploadRst);
|
|
9970
|
-
case
|
|
10042
|
+
case 16:
|
|
9971
10043
|
case "end":
|
|
9972
10044
|
return _context4.stop();
|
|
9973
10045
|
}
|
|
@@ -10173,7 +10245,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10173
10245
|
if (!attachment.id) return;
|
|
10174
10246
|
var downloadUrl = '';
|
|
10175
10247
|
downloadUrl = "/apigw" + '/' + this.wfAttachUrl + '/downloadById?inline=false&attachIds=' + attachment.id + '&httpPort=' + location.port + '&csrfToken=' + window.$auth.getCsrfToken();
|
|
10176
|
-
if (window.
|
|
10248
|
+
if (window.mappType === 'ecinc') {
|
|
10177
10249
|
window.$wv.downloadFile(downloadUrl, null, attachment.fileName, null);
|
|
10178
10250
|
} else {
|
|
10179
10251
|
this.$mappUtils.downLoadAndOpenFile(this, downloadUrl, attachment.fileName, attachment.fileSize);
|
|
@@ -10183,9 +10255,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10183
10255
|
});
|
|
10184
10256
|
;// CONCATENATED MODULE: ./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=script&lang=js
|
|
10185
10257
|
/* harmony default export */ var src_Attachmentvue_type_script_lang_js = (Attachmentvue_type_script_lang_js);
|
|
10186
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=
|
|
10187
|
-
var
|
|
10188
|
-
;// CONCATENATED MODULE: ./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=
|
|
10258
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=d820d2a0&prod&scoped=true&lang=scss
|
|
10259
|
+
var Attachmentvue_type_style_index_0_id_d820d2a0_prod_scoped_true_lang_scss = __webpack_require__(9302);
|
|
10260
|
+
;// CONCATENATED MODULE: ./packages/ecmapp/Wflowform/src/Attachment.vue?vue&type=style&index=0&id=d820d2a0&prod&scoped=true&lang=scss
|
|
10189
10261
|
|
|
10190
10262
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
10191
10263
|
var componentNormalizer = __webpack_require__(1656);
|
|
@@ -10204,7 +10276,7 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
|
10204
10276
|
staticRenderFns,
|
|
10205
10277
|
false,
|
|
10206
10278
|
null,
|
|
10207
|
-
"
|
|
10279
|
+
"d820d2a0",
|
|
10208
10280
|
null
|
|
10209
10281
|
|
|
10210
10282
|
)
|
|
@@ -18780,15 +18852,347 @@ module.exports = {
|
|
|
18780
18852
|
|
|
18781
18853
|
/***/ }),
|
|
18782
18854
|
|
|
18783
|
-
/***/
|
|
18855
|
+
/***/ 8838:
|
|
18784
18856
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
18785
18857
|
|
|
18786
18858
|
"use strict";
|
|
18859
|
+
// ESM COMPAT FLAG
|
|
18787
18860
|
__webpack_require__.r(__webpack_exports__);
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18861
|
+
|
|
18862
|
+
// EXPORTS
|
|
18863
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
18864
|
+
"default": function() { return /* binding */ wfengine; }
|
|
18865
|
+
});
|
|
18866
|
+
|
|
18867
|
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
|
18868
|
+
var lib = __webpack_require__(5373);
|
|
18869
|
+
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
18870
|
+
// EXTERNAL MODULE: ./node_modules/js-cookie/src/js.cookie.js
|
|
18871
|
+
var js_cookie = __webpack_require__(2215);
|
|
18872
|
+
var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);
|
|
18873
|
+
// EXTERNAL MODULE: ./node_modules/spark-md5/spark-md5.js
|
|
18874
|
+
var spark_md5 = __webpack_require__(5735);
|
|
18875
|
+
var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
|
|
18876
|
+
;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/chunkUpload.js
|
|
18877
|
+
/**
|
|
18878
|
+
* 分片上传核心模块
|
|
18879
|
+
* 封装大文件分片上传、断点续传全流程逻辑
|
|
18880
|
+
*/
|
|
18881
|
+
|
|
18882
|
+
|
|
18883
|
+
// ========== 配置 ==========
|
|
18884
|
+
var DEFAULT_CHUNK_SIZE = 5; // 默认分片大小(MB)
|
|
18885
|
+
var MAX_RETRY = 3; // 单分片最大重试次数
|
|
18886
|
+
var RETRY_DELAYS = [1000, 2000, 4000]; // 指数退避延迟(ms)
|
|
18887
|
+
var STORAGE_PREFIX = 'chunk_upload_'; // localStorage key 前缀
|
|
18888
|
+
|
|
18889
|
+
/**
|
|
18890
|
+
* 获取分片大小(字节)
|
|
18891
|
+
*/
|
|
18892
|
+
function getChunkSize() {
|
|
18893
|
+
return (window.chunkUploadSize || DEFAULT_CHUNK_SIZE) * 1024 * 1024;
|
|
18894
|
+
}
|
|
18895
|
+
|
|
18896
|
+
// ========== MD5 计算 ==========
|
|
18897
|
+
|
|
18898
|
+
/**
|
|
18899
|
+
* 使用 spark-md5 增量计算文件 MD5(避免大文件一次性读入内存)
|
|
18900
|
+
* @param {File} file 文件对象
|
|
18901
|
+
* @param {number} chunkSize 切片大小(字节)
|
|
18902
|
+
* @returns {Promise<string>} 文件 MD5 值(32位小写)
|
|
18903
|
+
*/
|
|
18904
|
+
function computeFileMD5(file, chunkSize) {
|
|
18905
|
+
return new Promise(function (resolve, reject) {
|
|
18906
|
+
var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
|
18907
|
+
var chunks = Math.ceil(file.size / chunkSize);
|
|
18908
|
+
var currentChunk = 0;
|
|
18909
|
+
var spark = new (spark_md5_default()).ArrayBuffer();
|
|
18910
|
+
var reader = new FileReader();
|
|
18911
|
+
reader.onload = function (e) {
|
|
18912
|
+
spark.append(e.target.result);
|
|
18913
|
+
currentChunk++;
|
|
18914
|
+
if (currentChunk < chunks) {
|
|
18915
|
+
loadNext();
|
|
18916
|
+
} else {
|
|
18917
|
+
resolve(spark.end());
|
|
18918
|
+
}
|
|
18919
|
+
};
|
|
18920
|
+
reader.onerror = function () {
|
|
18921
|
+
reject(new Error('文件读取失败'));
|
|
18922
|
+
};
|
|
18923
|
+
function loadNext() {
|
|
18924
|
+
var start = currentChunk * chunkSize;
|
|
18925
|
+
var end = Math.min(start + chunkSize, file.size);
|
|
18926
|
+
var chunk = blobSlice.call(file, start, end);
|
|
18927
|
+
reader.readAsArrayBuffer(chunk);
|
|
18928
|
+
}
|
|
18929
|
+
loadNext();
|
|
18930
|
+
});
|
|
18931
|
+
}
|
|
18932
|
+
|
|
18933
|
+
// ========== localStorage 断点进度管理 ==========
|
|
18934
|
+
|
|
18935
|
+
/**
|
|
18936
|
+
* 保存上传进度
|
|
18937
|
+
*/
|
|
18938
|
+
function saveUploadProgress(fileMd5, data) {
|
|
18939
|
+
try {
|
|
18940
|
+
localStorage.setItem(STORAGE_PREFIX + fileMd5, JSON.stringify(data));
|
|
18941
|
+
} catch (e) {
|
|
18942
|
+
// localStorage 满或不可用,静默忽略
|
|
18943
|
+
}
|
|
18944
|
+
}
|
|
18945
|
+
|
|
18946
|
+
/**
|
|
18947
|
+
* 获取上传进度
|
|
18948
|
+
*/
|
|
18949
|
+
function getUploadProgress(fileMd5) {
|
|
18950
|
+
try {
|
|
18951
|
+
var raw = localStorage.getItem(STORAGE_PREFIX + fileMd5);
|
|
18952
|
+
return raw ? JSON.parse(raw) : null;
|
|
18953
|
+
} catch (e) {
|
|
18954
|
+
return null;
|
|
18955
|
+
}
|
|
18956
|
+
}
|
|
18957
|
+
|
|
18958
|
+
/**
|
|
18959
|
+
* 清除上传进度
|
|
18960
|
+
*/
|
|
18961
|
+
function clearUploadProgress(fileMd5) {
|
|
18962
|
+
try {
|
|
18963
|
+
localStorage.removeItem(STORAGE_PREFIX + fileMd5);
|
|
18964
|
+
} catch (e) {
|
|
18965
|
+
// 静默忽略
|
|
18966
|
+
}
|
|
18967
|
+
}
|
|
18968
|
+
|
|
18969
|
+
// ========== 后端接口调用 ==========
|
|
18970
|
+
|
|
18971
|
+
/**
|
|
18972
|
+
* 检查已上传分片
|
|
18973
|
+
* @param {Vue} $scope Vue 实例
|
|
18974
|
+
* @param {string} baseUrl 基础 URL(如 workflow/wfBusiAttach)
|
|
18975
|
+
* @param {string} fileMd5 文件 MD5
|
|
18976
|
+
* @param {number} totalChunks 总分片数
|
|
18977
|
+
* @returns {Promise<number[]>} 已上传分片索引列表
|
|
18978
|
+
*/
|
|
18979
|
+
function checkChunkStatus($scope, baseUrl, fileMd5, totalChunks) {
|
|
18980
|
+
var formData = new FormData();
|
|
18981
|
+
formData.append('fileMd5', fileMd5);
|
|
18982
|
+
formData.append('totalChunks', totalChunks);
|
|
18983
|
+
return $scope.$http({
|
|
18984
|
+
url: baseUrl + '/uploadChunkCheck',
|
|
18985
|
+
method: 'post',
|
|
18986
|
+
data: formData
|
|
18987
|
+
}).then(function (res) {
|
|
18988
|
+
if (res.code === 'success' && res.body) {
|
|
18989
|
+
return res.body.uploadedChunks || [];
|
|
18990
|
+
}
|
|
18991
|
+
return [];
|
|
18992
|
+
}).catch(function () {
|
|
18993
|
+
return [];
|
|
18994
|
+
});
|
|
18995
|
+
}
|
|
18996
|
+
|
|
18997
|
+
/**
|
|
18998
|
+
* 上传单个分片(含重试)
|
|
18999
|
+
* @param {Vue} $scope Vue 实例
|
|
19000
|
+
* @param {string} baseUrl 基础 URL
|
|
19001
|
+
* @param {File} file 完整文件对象
|
|
19002
|
+
* @param {number} chunkIndex 分片索引
|
|
19003
|
+
* @param {string} fileMd5 文件 MD5
|
|
19004
|
+
* @param {number} totalChunks 总分片数
|
|
19005
|
+
* @param {string} fileName 文件名
|
|
19006
|
+
* @param {number} fileSize 文件大小
|
|
19007
|
+
* @returns {Promise}
|
|
19008
|
+
*/
|
|
19009
|
+
function uploadSingleChunk($scope, baseUrl, file, chunkIndex, fileMd5, totalChunks, fileName, fileSize) {
|
|
19010
|
+
var chunkSize = getChunkSize();
|
|
19011
|
+
var start = chunkIndex * chunkSize;
|
|
19012
|
+
var end = Math.min(start + chunkSize, file.size);
|
|
19013
|
+
var chunk = file.slice(start, end);
|
|
19014
|
+
var formData = new FormData();
|
|
19015
|
+
formData.append('chunkFile', chunk, 'chunk_' + chunkIndex);
|
|
19016
|
+
formData.append('fileMd5', fileMd5);
|
|
19017
|
+
formData.append('chunkIndex', chunkIndex);
|
|
19018
|
+
formData.append('totalChunks', totalChunks);
|
|
19019
|
+
formData.append('fileName', fileName);
|
|
19020
|
+
formData.append('fileSize', fileSize);
|
|
19021
|
+
return doUploadWithRetry($scope, baseUrl + '/uploadChunk', formData, 0, chunkIndex);
|
|
19022
|
+
}
|
|
19023
|
+
|
|
19024
|
+
/**
|
|
19025
|
+
* 带重试的上传请求
|
|
19026
|
+
*/
|
|
19027
|
+
function doUploadWithRetry($scope, url, formData, retryCount, chunkIdx) {
|
|
19028
|
+
return $scope.$http({
|
|
19029
|
+
url: url,
|
|
19030
|
+
method: 'post',
|
|
19031
|
+
data: formData
|
|
19032
|
+
}).then(function (res) {
|
|
19033
|
+
if (res.code !== 'success') {
|
|
19034
|
+
console.error('[chunkUpload] chunk_' + chunkIdx + ' failed:', res.message);
|
|
19035
|
+
throw new Error(res.message || 'chunk upload failed');
|
|
19036
|
+
}
|
|
19037
|
+
console.log('[chunkUpload] chunk_' + chunkIdx + ' success');
|
|
19038
|
+
return res;
|
|
19039
|
+
}).catch(function (err) {
|
|
19040
|
+
if (retryCount < MAX_RETRY) {
|
|
19041
|
+
console.warn('[chunkUpload] chunk_' + chunkIdx + ' retry ' + (retryCount + 1) + ':', err.message || err);
|
|
19042
|
+
var delay = RETRY_DELAYS[retryCount] || RETRY_DELAYS[RETRY_DELAYS.length - 1];
|
|
19043
|
+
return new Promise(function (resolve) {
|
|
19044
|
+
setTimeout(resolve, delay);
|
|
19045
|
+
}).then(function () {
|
|
19046
|
+
return doUploadWithRetry($scope, url, formData, retryCount + 1, chunkIdx);
|
|
19047
|
+
});
|
|
19048
|
+
}
|
|
19049
|
+
throw err;
|
|
19050
|
+
});
|
|
19051
|
+
}
|
|
19052
|
+
|
|
19053
|
+
/**
|
|
19054
|
+
* 合并分片
|
|
19055
|
+
* @param {Vue} $scope Vue 实例
|
|
19056
|
+
* @param {string} baseUrl 基础 URL
|
|
19057
|
+
* @param {string} fileMd5 文件 MD5
|
|
19058
|
+
* @param {string} fileName 文件名
|
|
19059
|
+
* @param {number} fileSize 文件大小
|
|
19060
|
+
* @param {number} totalChunks 总分片数
|
|
19061
|
+
* @param {Object} reqData 业务参数(module, busiDataId 等)
|
|
19062
|
+
* @returns {Promise}
|
|
19063
|
+
*/
|
|
19064
|
+
function mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData) {
|
|
19065
|
+
var formData = new FormData();
|
|
19066
|
+
formData.append('fileMd5', fileMd5);
|
|
19067
|
+
formData.append('fileName', fileName);
|
|
19068
|
+
formData.append('fileSize', fileSize);
|
|
19069
|
+
formData.append('totalChunks', totalChunks);
|
|
19070
|
+
if (reqData) {
|
|
19071
|
+
for (var key in reqData) {
|
|
19072
|
+
if (reqData.hasOwnProperty(key) && reqData[key] !== undefined && reqData[key] !== null) {
|
|
19073
|
+
formData.append(key, reqData[key]);
|
|
19074
|
+
}
|
|
19075
|
+
}
|
|
19076
|
+
}
|
|
19077
|
+
return $scope.$http({
|
|
19078
|
+
url: baseUrl + '/uploadChunkMerge',
|
|
19079
|
+
method: 'post',
|
|
19080
|
+
data: formData
|
|
19081
|
+
});
|
|
19082
|
+
}
|
|
19083
|
+
|
|
19084
|
+
// ========== 主编排函数 ==========
|
|
19085
|
+
|
|
19086
|
+
/**
|
|
19087
|
+
* 分片上传主流程
|
|
19088
|
+
* @param {Vue} $scope Vue 实例
|
|
19089
|
+
* @param {string} uploadUrl 上传 URL(如 workflow/wfBusiAttach/upload)
|
|
19090
|
+
* @param {File} file 文件对象
|
|
19091
|
+
* @param {Object} reqData 业务参数
|
|
19092
|
+
* @param {Object} config 配置(含 onUploadProgress 回调)
|
|
19093
|
+
* @returns {Promise} 合并后的响应,与原 upload 接口返回格式一致
|
|
19094
|
+
*/
|
|
19095
|
+
function chunkedUpload($scope, uploadUrl, file, reqData, config) {
|
|
19096
|
+
var chunkSize = getChunkSize();
|
|
19097
|
+
var totalChunks = Math.ceil(file.size / chunkSize);
|
|
19098
|
+
var fileName = file.name || 'unknown';
|
|
19099
|
+
var fileSize = file.size;
|
|
19100
|
+
|
|
19101
|
+
// 从 uploadUrl 中提取 baseUrl(去掉末尾的 /upload)
|
|
19102
|
+
var baseUrl = uploadUrl.replace(/\/upload\/?$/, '');
|
|
19103
|
+
var onProgress = config && config.onUploadProgress || null;
|
|
19104
|
+
return new Promise(function (resolve, reject) {
|
|
19105
|
+
// Step 1: 计算文件 MD5
|
|
19106
|
+
computeFileMD5(file, chunkSize).then(function (fileMd5) {
|
|
19107
|
+
// Step 2: 检查断点续传进度
|
|
19108
|
+
var savedProgress = getUploadProgress(fileMd5);
|
|
19109
|
+
var uploadedBytes = savedProgress ? savedProgress.uploadedBytes || 0 : 0;
|
|
19110
|
+
return checkChunkStatus($scope, baseUrl, fileMd5, totalChunks).then(function (uploadedChunks) {
|
|
19111
|
+
// Step 3: 逐片上传未完成的分片
|
|
19112
|
+
var completedChunks = uploadedChunks.length;
|
|
19113
|
+
var uploadedBytesFromServer = 0;
|
|
19114
|
+
for (var i = 0; i < uploadedChunks.length; i++) {
|
|
19115
|
+
var idx = uploadedChunks[i];
|
|
19116
|
+
var cStart = idx * chunkSize;
|
|
19117
|
+
var cEnd = Math.min(cStart + chunkSize, fileSize);
|
|
19118
|
+
uploadedBytesFromServer += cEnd - cStart;
|
|
19119
|
+
}
|
|
19120
|
+
uploadedBytes = uploadedBytesFromServer;
|
|
19121
|
+
|
|
19122
|
+
// 模拟初始进度回调
|
|
19123
|
+
if (onProgress) {
|
|
19124
|
+
onProgress({
|
|
19125
|
+
loaded: uploadedBytes,
|
|
19126
|
+
total: fileSize
|
|
19127
|
+
});
|
|
19128
|
+
}
|
|
19129
|
+
return uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, function (chunkBytes) {
|
|
19130
|
+
completedChunks++;
|
|
19131
|
+
uploadedBytes += chunkBytes;
|
|
19132
|
+
if (onProgress) {
|
|
19133
|
+
onProgress({
|
|
19134
|
+
loaded: uploadedBytes,
|
|
19135
|
+
total: fileSize
|
|
19136
|
+
});
|
|
19137
|
+
}
|
|
19138
|
+
// 保存进度到 localStorage
|
|
19139
|
+
saveUploadProgress(fileMd5, {
|
|
19140
|
+
completedChunks: completedChunks,
|
|
19141
|
+
uploadedBytes: uploadedBytes,
|
|
19142
|
+
totalChunks: totalChunks,
|
|
19143
|
+
fileName: fileName,
|
|
19144
|
+
fileSize: fileSize,
|
|
19145
|
+
timestamp: Date.now()
|
|
19146
|
+
});
|
|
19147
|
+
}).then(function () {
|
|
19148
|
+
// Step 4: 合并分片
|
|
19149
|
+
return mergeChunks($scope, baseUrl, fileMd5, fileName, fileSize, totalChunks, reqData);
|
|
19150
|
+
}).then(function (mergeResult) {
|
|
19151
|
+
// Step 5: 合并成功,清除进度记录
|
|
19152
|
+
clearUploadProgress(fileMd5);
|
|
19153
|
+
resolve(mergeResult);
|
|
19154
|
+
});
|
|
19155
|
+
});
|
|
19156
|
+
}).catch(function (err) {
|
|
19157
|
+
reject(err);
|
|
19158
|
+
});
|
|
19159
|
+
});
|
|
19160
|
+
}
|
|
19161
|
+
|
|
19162
|
+
/**
|
|
19163
|
+
* 逐片串行上传
|
|
19164
|
+
* 使用 Array.reduce 链式调用,reduce 回调参数 cIdx 天然为每次迭代创建独立闭包,
|
|
19165
|
+
* 避免 for + var 共享变量导致所有分片使用同一个 chunkIndex 的问题。
|
|
19166
|
+
*/
|
|
19167
|
+
function uploadChunksSequentially($scope, baseUrl, file, fileMd5, totalChunks, uploadedChunks, fileName, fileSize, chunkSize, onChunkDone) {
|
|
19168
|
+
var uploadedSet = {};
|
|
19169
|
+
for (var i = 0; i < uploadedChunks.length; i++) {
|
|
19170
|
+
uploadedSet[uploadedChunks[i]] = true;
|
|
19171
|
+
}
|
|
19172
|
+
|
|
19173
|
+
// 构建待上传分片索引数组
|
|
19174
|
+
var chunkIndices = [];
|
|
19175
|
+
for (var chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) {
|
|
19176
|
+
if (!uploadedSet[chunkIndex]) {
|
|
19177
|
+
chunkIndices.push(chunkIndex);
|
|
19178
|
+
}
|
|
19179
|
+
}
|
|
19180
|
+
|
|
19181
|
+
// reduce 的 cIdx 参数每次迭代都是独立的值,无闭包共享问题
|
|
19182
|
+
return chunkIndices.reduce(function (chain, cIdx) {
|
|
19183
|
+
return chain.then(function () {
|
|
19184
|
+
return uploadSingleChunk($scope, baseUrl, file, cIdx, fileMd5, totalChunks, fileName, fileSize).then(function () {
|
|
19185
|
+
var cStart = cIdx * chunkSize;
|
|
19186
|
+
var cEnd = Math.min(cStart + chunkSize, fileSize);
|
|
19187
|
+
var cBytes = cEnd - cStart;
|
|
19188
|
+
if (onChunkDone) {
|
|
19189
|
+
onChunkDone(cBytes);
|
|
19190
|
+
}
|
|
19191
|
+
});
|
|
19192
|
+
});
|
|
19193
|
+
}, Promise.resolve());
|
|
19194
|
+
}
|
|
19195
|
+
;// CONCATENATED MODULE: ./packages/ecwflow/wfengine/index.js
|
|
18792
19196
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
18793
19197
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18794
19198
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -18803,6 +19207,7 @@ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(
|
|
|
18803
19207
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
18804
19208
|
|
|
18805
19209
|
|
|
19210
|
+
|
|
18806
19211
|
var install = function install(Vue) {
|
|
18807
19212
|
var WfEngine = new Vue({
|
|
18808
19213
|
methods: {
|
|
@@ -19020,7 +19425,7 @@ var install = function install(Vue) {
|
|
|
19020
19425
|
}
|
|
19021
19426
|
}
|
|
19022
19427
|
if ($scope.wfJsonData && $scope.wfJsonData.routes) {
|
|
19023
|
-
var rindex =
|
|
19428
|
+
var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
|
|
19024
19429
|
if (rindex !== undefined && rindex !== null) {
|
|
19025
19430
|
rindex = parseInt(rindex);
|
|
19026
19431
|
if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
|
|
@@ -19468,7 +19873,7 @@ var install = function install(Vue) {
|
|
|
19468
19873
|
$scope.$http({
|
|
19469
19874
|
method: 'POST',
|
|
19470
19875
|
contentType: 'application/x-www-form-urlencoded',
|
|
19471
|
-
data:
|
|
19876
|
+
data: lib_default().stringify(saveData),
|
|
19472
19877
|
params: params,
|
|
19473
19878
|
url: wfEngineUrl
|
|
19474
19879
|
}).then(function (res) {
|
|
@@ -19514,7 +19919,7 @@ var install = function install(Vue) {
|
|
|
19514
19919
|
});
|
|
19515
19920
|
}
|
|
19516
19921
|
if ($scope.wfJsonData && $scope.wfJsonData.routes) {
|
|
19517
|
-
var rindex =
|
|
19922
|
+
var rindex = js_cookie_default().get('route-index-' + $scope.wfInstance.id);
|
|
19518
19923
|
if (rindex !== undefined && rindex !== null) {
|
|
19519
19924
|
rindex = parseInt(rindex);
|
|
19520
19925
|
if ($scope.wfJsonData.routes.length > rindex) $scope.submitHandle.route.index = rindex;
|
|
@@ -19589,7 +19994,7 @@ var install = function install(Vue) {
|
|
|
19589
19994
|
}
|
|
19590
19995
|
var submitHandle = JSON.parse(JSON.stringify($scope.submitHandle));
|
|
19591
19996
|
if (submitType.indexOf('Save') !== -1) {
|
|
19592
|
-
|
|
19997
|
+
js_cookie_default().set('route-index-' + $scope.wfInstance.id, submitHandle.route.index);
|
|
19593
19998
|
var route = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
|
|
19594
19999
|
taskNodes: []
|
|
19595
20000
|
} : $scope.wfJsonData.routes[submitHandle.route.index];
|
|
@@ -19600,14 +20005,14 @@ var install = function install(Vue) {
|
|
|
19600
20005
|
if (nextUsers !== '') nextUsers += ';';
|
|
19601
20006
|
nextUsers += user.id;
|
|
19602
20007
|
});
|
|
19603
|
-
|
|
20008
|
+
js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, nextUsers);
|
|
19604
20009
|
}
|
|
19605
20010
|
});
|
|
19606
20011
|
delete submitHandle.submitRoute;
|
|
19607
20012
|
delete submitHandle.nextTNProp;
|
|
19608
20013
|
delete submitHandle.nextTNUser;
|
|
19609
20014
|
} else {
|
|
19610
|
-
|
|
20015
|
+
js_cookie_default().set('route-index-' + $scope.wfInstance.id, '', {
|
|
19611
20016
|
expires: 0
|
|
19612
20017
|
});
|
|
19613
20018
|
var selRoute = $scope.wfJsonData == null || $scope.wfJsonData.routes == null || $scope.wfJsonData.routes.length === 0 ? {
|
|
@@ -19650,7 +20055,7 @@ var install = function install(Vue) {
|
|
|
19650
20055
|
delete wfNode.users;
|
|
19651
20056
|
submitHandle.nextTNProp.push(wfNode);
|
|
19652
20057
|
submitHandle.nextTNUser.push(nextUsers);
|
|
19653
|
-
|
|
20058
|
+
js_cookie_default().set('route-wfuser-' + $scope.curTN.tnID + '-' + wfNode.id, '', {
|
|
19654
20059
|
expires: 0
|
|
19655
20060
|
});
|
|
19656
20061
|
}
|
|
@@ -19683,7 +20088,7 @@ var install = function install(Vue) {
|
|
|
19683
20088
|
headers: {
|
|
19684
20089
|
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
19685
20090
|
},
|
|
19686
|
-
data:
|
|
20091
|
+
data: lib_default().stringify(saveData),
|
|
19687
20092
|
url: (params.wfEngineUrl || $scope.wfEngineUrl || 'workflow/wfInstance') + '/saveWfInstance'
|
|
19688
20093
|
}).then(function (res) {
|
|
19689
20094
|
if (res.code === 'success') {
|
|
@@ -19956,7 +20361,7 @@ var install = function install(Vue) {
|
|
|
19956
20361
|
_this4.$http({
|
|
19957
20362
|
method: 'POST',
|
|
19958
20363
|
contentType: 'application/x-www-form-urlencoded',
|
|
19959
|
-
data:
|
|
20364
|
+
data: lib_default().stringify(saveData),
|
|
19960
20365
|
params: $scope.$vnode.context.wfParams,
|
|
19961
20366
|
url: 'workflow/wfInstance/getUdmNodeUsers'
|
|
19962
20367
|
}).then(function (res) {
|
|
@@ -20006,7 +20411,7 @@ var install = function install(Vue) {
|
|
|
20006
20411
|
headers: {
|
|
20007
20412
|
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
20008
20413
|
},
|
|
20009
|
-
data:
|
|
20414
|
+
data: lib_default().stringify({
|
|
20010
20415
|
wfInstance: JSON.stringify($scope.wfInstance),
|
|
20011
20416
|
nextTNUsers: JSON.stringify(nextTNUsers)
|
|
20012
20417
|
}),
|
|
@@ -20164,6 +20569,11 @@ var install = function install(Vue) {
|
|
|
20164
20569
|
}
|
|
20165
20570
|
},
|
|
20166
20571
|
upload: function upload($scope, uploadUrl, file, params, config) {
|
|
20572
|
+
// 分片上传分流判断:chunkFileSizeThreshold > 0 且文件大小超过阈值
|
|
20573
|
+
var chunkThreshold = window.chunkFileSizeThreshold;
|
|
20574
|
+
if (chunkThreshold > 0 && file && file.size > chunkThreshold * 1024 * 1024) {
|
|
20575
|
+
return chunkedUpload($scope, uploadUrl, file, params, config);
|
|
20576
|
+
}
|
|
20167
20577
|
var formData = new FormData();
|
|
20168
20578
|
if (params != null) {
|
|
20169
20579
|
for (var key in params) {
|
|
@@ -20262,7 +20672,7 @@ var install = function install(Vue) {
|
|
|
20262
20672
|
});
|
|
20263
20673
|
Vue.prototype.$wfEngine = WfEngine;
|
|
20264
20674
|
};
|
|
20265
|
-
/* harmony default export */
|
|
20675
|
+
/* harmony default export */ var wfengine = (install);
|
|
20266
20676
|
|
|
20267
20677
|
/***/ }),
|
|
20268
20678
|
|
|
@@ -21588,7 +21998,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-d6f101a0] .van-nav-bar__title{
|
|
|
21588
21998
|
|
|
21589
21999
|
/***/ }),
|
|
21590
22000
|
|
|
21591
|
-
/***/
|
|
22001
|
+
/***/ 5596:
|
|
21592
22002
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21593
22003
|
|
|
21594
22004
|
"use strict";
|
|
@@ -21602,7 +22012,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21602
22012
|
|
|
21603
22013
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
21604
22014
|
// Module
|
|
21605
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".wfattach-container .van-cell__value[data-v-
|
|
22015
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".wfattach-container .van-cell__value[data-v-d820d2a0],.wfattach-container[data-v-d820d2a0] .van-cell__title{-webkit-box-flex:0;-ms-flex:none;flex:none}.wfattach-container[data-v-d820d2a0] .van-cell__title{width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.wfattach-container[data-v-d820d2a0] .van-cell__value{width:45%;height:24px}.wfattach-container[data-v-d820d2a0] .van-cell__value .van-icon-add-o{line-height:24px}.wfattach-container[data-v-d820d2a0] .van-cell__value .van-circle{margin-top:2px}.wfattach-container[data-v-d820d2a0] .van-cell__value .attach-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.wfattach-container[data-v-d820d2a0] .van-cell__value .attach-icon>span{white-space:nowrap;-ms-flex-negative:0;flex-shrink:0}.wfattach-container[data-v-d820d2a0] .van-cell__value .attach-icon .van-icon{line-height:24px;margin-left:10px;font-size:16px;-ms-flex-negative:0;flex-shrink:0}.wfattach-container[data-v-d820d2a0]:after{border-top-width:0}.attachmants_preview .attachmants .van-cell-group .van-cell[data-v-d820d2a0]{padding-left:70px;padding-right:36px}.attachmants_preview .attachmants .van-cell-group .van-cell[data-v-d820d2a0]:after{right:0}.attachmants_preview .attachmants .van-cell-group .van-cell[data-v-d820d2a0]:first-child:before{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;content:\" \";pointer-events:none;right:0;top:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.attachmants_preview .attachmants .van-cell-group .van-cell .van-cell__title[data-v-d820d2a0]{position:relative}.attachmants_preview .attachmants .van-cell-group .van-cell .van-cell__title .attach_photo[data-v-d820d2a0]{position:absolute;left:-54px;height:44px;width:44px}.attachmants_preview .attachmants .van-cell-group .van-cell .van-cell__title .attach_name[data-v-d820d2a0]{width:calc(100vw - 107px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-attachment-field[data-v-d820d2a0]{position:relative}.van-attachment-field[data-v-d820d2a0]:after{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;content:\" \";pointer-events:none;top:unset;border-width:0;right:0;bottom:0;left:16px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.attach-deleting-icon[data-v-d820d2a0]{display:inline-block;-webkit-animation:attach-spin-d820d2a0 .8s linear infinite;animation:attach-spin-d820d2a0 .8s linear infinite}@-webkit-keyframes attach-spin-d820d2a0{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes attach-spin-d820d2a0{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}", ""]);
|
|
21606
22016
|
// Exports
|
|
21607
22017
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
21608
22018
|
|
|
@@ -48016,6 +48426,750 @@ module.exports = function getSideChannel() {
|
|
|
48016
48426
|
};
|
|
48017
48427
|
|
|
48018
48428
|
|
|
48429
|
+
/***/ }),
|
|
48430
|
+
|
|
48431
|
+
/***/ 5735:
|
|
48432
|
+
/***/ (function(module) {
|
|
48433
|
+
|
|
48434
|
+
(function (factory) {
|
|
48435
|
+
if (true) {
|
|
48436
|
+
// Node/CommonJS
|
|
48437
|
+
module.exports = factory();
|
|
48438
|
+
} else { var glob; }
|
|
48439
|
+
}(function (undefined) {
|
|
48440
|
+
|
|
48441
|
+
'use strict';
|
|
48442
|
+
|
|
48443
|
+
/*
|
|
48444
|
+
* Fastest md5 implementation around (JKM md5).
|
|
48445
|
+
* Credits: Joseph Myers
|
|
48446
|
+
*
|
|
48447
|
+
* @see http://www.myersdaily.org/joseph/javascript/md5-text.html
|
|
48448
|
+
* @see http://jsperf.com/md5-shootout/7
|
|
48449
|
+
*/
|
|
48450
|
+
|
|
48451
|
+
/* this function is much faster,
|
|
48452
|
+
so if possible we use it. Some IEs
|
|
48453
|
+
are the only ones I know of that
|
|
48454
|
+
need the idiotic second function,
|
|
48455
|
+
generated by an if clause. */
|
|
48456
|
+
var add32 = function (a, b) {
|
|
48457
|
+
return (a + b) & 0xFFFFFFFF;
|
|
48458
|
+
},
|
|
48459
|
+
hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
|
48460
|
+
|
|
48461
|
+
|
|
48462
|
+
function cmn(q, a, b, x, s, t) {
|
|
48463
|
+
a = add32(add32(a, q), add32(x, t));
|
|
48464
|
+
return add32((a << s) | (a >>> (32 - s)), b);
|
|
48465
|
+
}
|
|
48466
|
+
|
|
48467
|
+
function md5cycle(x, k) {
|
|
48468
|
+
var a = x[0],
|
|
48469
|
+
b = x[1],
|
|
48470
|
+
c = x[2],
|
|
48471
|
+
d = x[3];
|
|
48472
|
+
|
|
48473
|
+
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
|
|
48474
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
|
48475
|
+
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
|
|
48476
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
|
48477
|
+
c += (d & a | ~d & b) + k[2] + 606105819 | 0;
|
|
48478
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
|
48479
|
+
b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
|
|
48480
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
|
48481
|
+
a += (b & c | ~b & d) + k[4] - 176418897 | 0;
|
|
48482
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
|
48483
|
+
d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
|
|
48484
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
|
48485
|
+
c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
|
|
48486
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
|
48487
|
+
b += (c & d | ~c & a) + k[7] - 45705983 | 0;
|
|
48488
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
|
48489
|
+
a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
|
|
48490
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
|
48491
|
+
d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
|
|
48492
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
|
48493
|
+
c += (d & a | ~d & b) + k[10] - 42063 | 0;
|
|
48494
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
|
48495
|
+
b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
|
|
48496
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
|
48497
|
+
a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
|
|
48498
|
+
a = (a << 7 | a >>> 25) + b | 0;
|
|
48499
|
+
d += (a & b | ~a & c) + k[13] - 40341101 | 0;
|
|
48500
|
+
d = (d << 12 | d >>> 20) + a | 0;
|
|
48501
|
+
c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
|
|
48502
|
+
c = (c << 17 | c >>> 15) + d | 0;
|
|
48503
|
+
b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
|
|
48504
|
+
b = (b << 22 | b >>> 10) + c | 0;
|
|
48505
|
+
|
|
48506
|
+
a += (b & d | c & ~d) + k[1] - 165796510 | 0;
|
|
48507
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
|
48508
|
+
d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
|
|
48509
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
|
48510
|
+
c += (d & b | a & ~b) + k[11] + 643717713 | 0;
|
|
48511
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
|
48512
|
+
b += (c & a | d & ~a) + k[0] - 373897302 | 0;
|
|
48513
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
|
48514
|
+
a += (b & d | c & ~d) + k[5] - 701558691 | 0;
|
|
48515
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
|
48516
|
+
d += (a & c | b & ~c) + k[10] + 38016083 | 0;
|
|
48517
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
|
48518
|
+
c += (d & b | a & ~b) + k[15] - 660478335 | 0;
|
|
48519
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
|
48520
|
+
b += (c & a | d & ~a) + k[4] - 405537848 | 0;
|
|
48521
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
|
48522
|
+
a += (b & d | c & ~d) + k[9] + 568446438 | 0;
|
|
48523
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
|
48524
|
+
d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
|
|
48525
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
|
48526
|
+
c += (d & b | a & ~b) + k[3] - 187363961 | 0;
|
|
48527
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
|
48528
|
+
b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
|
|
48529
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
|
48530
|
+
a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
|
|
48531
|
+
a = (a << 5 | a >>> 27) + b | 0;
|
|
48532
|
+
d += (a & c | b & ~c) + k[2] - 51403784 | 0;
|
|
48533
|
+
d = (d << 9 | d >>> 23) + a | 0;
|
|
48534
|
+
c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
|
|
48535
|
+
c = (c << 14 | c >>> 18) + d | 0;
|
|
48536
|
+
b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
|
|
48537
|
+
b = (b << 20 | b >>> 12) + c | 0;
|
|
48538
|
+
|
|
48539
|
+
a += (b ^ c ^ d) + k[5] - 378558 | 0;
|
|
48540
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
|
48541
|
+
d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
|
|
48542
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
|
48543
|
+
c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
|
|
48544
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
|
48545
|
+
b += (c ^ d ^ a) + k[14] - 35309556 | 0;
|
|
48546
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
|
48547
|
+
a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
|
|
48548
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
|
48549
|
+
d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
|
|
48550
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
|
48551
|
+
c += (d ^ a ^ b) + k[7] - 155497632 | 0;
|
|
48552
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
|
48553
|
+
b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
|
|
48554
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
|
48555
|
+
a += (b ^ c ^ d) + k[13] + 681279174 | 0;
|
|
48556
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
|
48557
|
+
d += (a ^ b ^ c) + k[0] - 358537222 | 0;
|
|
48558
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
|
48559
|
+
c += (d ^ a ^ b) + k[3] - 722521979 | 0;
|
|
48560
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
|
48561
|
+
b += (c ^ d ^ a) + k[6] + 76029189 | 0;
|
|
48562
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
|
48563
|
+
a += (b ^ c ^ d) + k[9] - 640364487 | 0;
|
|
48564
|
+
a = (a << 4 | a >>> 28) + b | 0;
|
|
48565
|
+
d += (a ^ b ^ c) + k[12] - 421815835 | 0;
|
|
48566
|
+
d = (d << 11 | d >>> 21) + a | 0;
|
|
48567
|
+
c += (d ^ a ^ b) + k[15] + 530742520 | 0;
|
|
48568
|
+
c = (c << 16 | c >>> 16) + d | 0;
|
|
48569
|
+
b += (c ^ d ^ a) + k[2] - 995338651 | 0;
|
|
48570
|
+
b = (b << 23 | b >>> 9) + c | 0;
|
|
48571
|
+
|
|
48572
|
+
a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
|
|
48573
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
|
48574
|
+
d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
|
|
48575
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
|
48576
|
+
c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
|
|
48577
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
|
48578
|
+
b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
|
|
48579
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
|
48580
|
+
a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
|
|
48581
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
|
48582
|
+
d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
|
|
48583
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
|
48584
|
+
c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
|
|
48585
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
|
48586
|
+
b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
|
|
48587
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
|
48588
|
+
a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
|
|
48589
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
|
48590
|
+
d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
|
|
48591
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
|
48592
|
+
c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
|
|
48593
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
|
48594
|
+
b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
|
|
48595
|
+
b = (b << 21 |b >>> 11) + c | 0;
|
|
48596
|
+
a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
|
|
48597
|
+
a = (a << 6 | a >>> 26) + b | 0;
|
|
48598
|
+
d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
|
|
48599
|
+
d = (d << 10 | d >>> 22) + a | 0;
|
|
48600
|
+
c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
|
|
48601
|
+
c = (c << 15 | c >>> 17) + d | 0;
|
|
48602
|
+
b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
|
|
48603
|
+
b = (b << 21 | b >>> 11) + c | 0;
|
|
48604
|
+
|
|
48605
|
+
x[0] = a + x[0] | 0;
|
|
48606
|
+
x[1] = b + x[1] | 0;
|
|
48607
|
+
x[2] = c + x[2] | 0;
|
|
48608
|
+
x[3] = d + x[3] | 0;
|
|
48609
|
+
}
|
|
48610
|
+
|
|
48611
|
+
function md5blk(s) {
|
|
48612
|
+
var md5blks = [],
|
|
48613
|
+
i; /* Andy King said do it this way. */
|
|
48614
|
+
|
|
48615
|
+
for (i = 0; i < 64; i += 4) {
|
|
48616
|
+
md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
|
|
48617
|
+
}
|
|
48618
|
+
return md5blks;
|
|
48619
|
+
}
|
|
48620
|
+
|
|
48621
|
+
function md5blk_array(a) {
|
|
48622
|
+
var md5blks = [],
|
|
48623
|
+
i; /* Andy King said do it this way. */
|
|
48624
|
+
|
|
48625
|
+
for (i = 0; i < 64; i += 4) {
|
|
48626
|
+
md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
|
|
48627
|
+
}
|
|
48628
|
+
return md5blks;
|
|
48629
|
+
}
|
|
48630
|
+
|
|
48631
|
+
function md51(s) {
|
|
48632
|
+
var n = s.length,
|
|
48633
|
+
state = [1732584193, -271733879, -1732584194, 271733878],
|
|
48634
|
+
i,
|
|
48635
|
+
length,
|
|
48636
|
+
tail,
|
|
48637
|
+
tmp,
|
|
48638
|
+
lo,
|
|
48639
|
+
hi;
|
|
48640
|
+
|
|
48641
|
+
for (i = 64; i <= n; i += 64) {
|
|
48642
|
+
md5cycle(state, md5blk(s.substring(i - 64, i)));
|
|
48643
|
+
}
|
|
48644
|
+
s = s.substring(i - 64);
|
|
48645
|
+
length = s.length;
|
|
48646
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
48647
|
+
for (i = 0; i < length; i += 1) {
|
|
48648
|
+
tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
|
|
48649
|
+
}
|
|
48650
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
|
48651
|
+
if (i > 55) {
|
|
48652
|
+
md5cycle(state, tail);
|
|
48653
|
+
for (i = 0; i < 16; i += 1) {
|
|
48654
|
+
tail[i] = 0;
|
|
48655
|
+
}
|
|
48656
|
+
}
|
|
48657
|
+
|
|
48658
|
+
// Beware that the final length might not fit in 32 bits so we take care of that
|
|
48659
|
+
tmp = n * 8;
|
|
48660
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
48661
|
+
lo = parseInt(tmp[2], 16);
|
|
48662
|
+
hi = parseInt(tmp[1], 16) || 0;
|
|
48663
|
+
|
|
48664
|
+
tail[14] = lo;
|
|
48665
|
+
tail[15] = hi;
|
|
48666
|
+
|
|
48667
|
+
md5cycle(state, tail);
|
|
48668
|
+
return state;
|
|
48669
|
+
}
|
|
48670
|
+
|
|
48671
|
+
function md51_array(a) {
|
|
48672
|
+
var n = a.length,
|
|
48673
|
+
state = [1732584193, -271733879, -1732584194, 271733878],
|
|
48674
|
+
i,
|
|
48675
|
+
length,
|
|
48676
|
+
tail,
|
|
48677
|
+
tmp,
|
|
48678
|
+
lo,
|
|
48679
|
+
hi;
|
|
48680
|
+
|
|
48681
|
+
for (i = 64; i <= n; i += 64) {
|
|
48682
|
+
md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
|
|
48683
|
+
}
|
|
48684
|
+
|
|
48685
|
+
// Not sure if it is a bug, however IE10 will always produce a sub array of length 1
|
|
48686
|
+
// containing the last element of the parent array if the sub array specified starts
|
|
48687
|
+
// beyond the length of the parent array - weird.
|
|
48688
|
+
// https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
|
|
48689
|
+
a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
|
|
48690
|
+
|
|
48691
|
+
length = a.length;
|
|
48692
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
48693
|
+
for (i = 0; i < length; i += 1) {
|
|
48694
|
+
tail[i >> 2] |= a[i] << ((i % 4) << 3);
|
|
48695
|
+
}
|
|
48696
|
+
|
|
48697
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
|
48698
|
+
if (i > 55) {
|
|
48699
|
+
md5cycle(state, tail);
|
|
48700
|
+
for (i = 0; i < 16; i += 1) {
|
|
48701
|
+
tail[i] = 0;
|
|
48702
|
+
}
|
|
48703
|
+
}
|
|
48704
|
+
|
|
48705
|
+
// Beware that the final length might not fit in 32 bits so we take care of that
|
|
48706
|
+
tmp = n * 8;
|
|
48707
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
48708
|
+
lo = parseInt(tmp[2], 16);
|
|
48709
|
+
hi = parseInt(tmp[1], 16) || 0;
|
|
48710
|
+
|
|
48711
|
+
tail[14] = lo;
|
|
48712
|
+
tail[15] = hi;
|
|
48713
|
+
|
|
48714
|
+
md5cycle(state, tail);
|
|
48715
|
+
|
|
48716
|
+
return state;
|
|
48717
|
+
}
|
|
48718
|
+
|
|
48719
|
+
function rhex(n) {
|
|
48720
|
+
var s = '',
|
|
48721
|
+
j;
|
|
48722
|
+
for (j = 0; j < 4; j += 1) {
|
|
48723
|
+
s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
|
|
48724
|
+
}
|
|
48725
|
+
return s;
|
|
48726
|
+
}
|
|
48727
|
+
|
|
48728
|
+
function hex(x) {
|
|
48729
|
+
var i;
|
|
48730
|
+
for (i = 0; i < x.length; i += 1) {
|
|
48731
|
+
x[i] = rhex(x[i]);
|
|
48732
|
+
}
|
|
48733
|
+
return x.join('');
|
|
48734
|
+
}
|
|
48735
|
+
|
|
48736
|
+
// In some cases the fast add32 function cannot be used..
|
|
48737
|
+
if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {
|
|
48738
|
+
add32 = function (x, y) {
|
|
48739
|
+
var lsw = (x & 0xFFFF) + (y & 0xFFFF),
|
|
48740
|
+
msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
48741
|
+
return (msw << 16) | (lsw & 0xFFFF);
|
|
48742
|
+
};
|
|
48743
|
+
}
|
|
48744
|
+
|
|
48745
|
+
// ---------------------------------------------------
|
|
48746
|
+
|
|
48747
|
+
/**
|
|
48748
|
+
* ArrayBuffer slice polyfill.
|
|
48749
|
+
*
|
|
48750
|
+
* @see https://github.com/ttaubert/node-arraybuffer-slice
|
|
48751
|
+
*/
|
|
48752
|
+
|
|
48753
|
+
if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
|
|
48754
|
+
(function () {
|
|
48755
|
+
function clamp(val, length) {
|
|
48756
|
+
val = (val | 0) || 0;
|
|
48757
|
+
|
|
48758
|
+
if (val < 0) {
|
|
48759
|
+
return Math.max(val + length, 0);
|
|
48760
|
+
}
|
|
48761
|
+
|
|
48762
|
+
return Math.min(val, length);
|
|
48763
|
+
}
|
|
48764
|
+
|
|
48765
|
+
ArrayBuffer.prototype.slice = function (from, to) {
|
|
48766
|
+
var length = this.byteLength,
|
|
48767
|
+
begin = clamp(from, length),
|
|
48768
|
+
end = length,
|
|
48769
|
+
num,
|
|
48770
|
+
target,
|
|
48771
|
+
targetArray,
|
|
48772
|
+
sourceArray;
|
|
48773
|
+
|
|
48774
|
+
if (to !== undefined) {
|
|
48775
|
+
end = clamp(to, length);
|
|
48776
|
+
}
|
|
48777
|
+
|
|
48778
|
+
if (begin > end) {
|
|
48779
|
+
return new ArrayBuffer(0);
|
|
48780
|
+
}
|
|
48781
|
+
|
|
48782
|
+
num = end - begin;
|
|
48783
|
+
target = new ArrayBuffer(num);
|
|
48784
|
+
targetArray = new Uint8Array(target);
|
|
48785
|
+
|
|
48786
|
+
sourceArray = new Uint8Array(this, begin, num);
|
|
48787
|
+
targetArray.set(sourceArray);
|
|
48788
|
+
|
|
48789
|
+
return target;
|
|
48790
|
+
};
|
|
48791
|
+
})();
|
|
48792
|
+
}
|
|
48793
|
+
|
|
48794
|
+
// ---------------------------------------------------
|
|
48795
|
+
|
|
48796
|
+
/**
|
|
48797
|
+
* Helpers.
|
|
48798
|
+
*/
|
|
48799
|
+
|
|
48800
|
+
function toUtf8(str) {
|
|
48801
|
+
if (/[\u0080-\uFFFF]/.test(str)) {
|
|
48802
|
+
str = unescape(encodeURIComponent(str));
|
|
48803
|
+
}
|
|
48804
|
+
|
|
48805
|
+
return str;
|
|
48806
|
+
}
|
|
48807
|
+
|
|
48808
|
+
function utf8Str2ArrayBuffer(str, returnUInt8Array) {
|
|
48809
|
+
var length = str.length,
|
|
48810
|
+
buff = new ArrayBuffer(length),
|
|
48811
|
+
arr = new Uint8Array(buff),
|
|
48812
|
+
i;
|
|
48813
|
+
|
|
48814
|
+
for (i = 0; i < length; i += 1) {
|
|
48815
|
+
arr[i] = str.charCodeAt(i);
|
|
48816
|
+
}
|
|
48817
|
+
|
|
48818
|
+
return returnUInt8Array ? arr : buff;
|
|
48819
|
+
}
|
|
48820
|
+
|
|
48821
|
+
function arrayBuffer2Utf8Str(buff) {
|
|
48822
|
+
return String.fromCharCode.apply(null, new Uint8Array(buff));
|
|
48823
|
+
}
|
|
48824
|
+
|
|
48825
|
+
function concatenateArrayBuffers(first, second, returnUInt8Array) {
|
|
48826
|
+
var result = new Uint8Array(first.byteLength + second.byteLength);
|
|
48827
|
+
|
|
48828
|
+
result.set(new Uint8Array(first));
|
|
48829
|
+
result.set(new Uint8Array(second), first.byteLength);
|
|
48830
|
+
|
|
48831
|
+
return returnUInt8Array ? result : result.buffer;
|
|
48832
|
+
}
|
|
48833
|
+
|
|
48834
|
+
function hexToBinaryString(hex) {
|
|
48835
|
+
var bytes = [],
|
|
48836
|
+
length = hex.length,
|
|
48837
|
+
x;
|
|
48838
|
+
|
|
48839
|
+
for (x = 0; x < length - 1; x += 2) {
|
|
48840
|
+
bytes.push(parseInt(hex.substr(x, 2), 16));
|
|
48841
|
+
}
|
|
48842
|
+
|
|
48843
|
+
return String.fromCharCode.apply(String, bytes);
|
|
48844
|
+
}
|
|
48845
|
+
|
|
48846
|
+
// ---------------------------------------------------
|
|
48847
|
+
|
|
48848
|
+
/**
|
|
48849
|
+
* SparkMD5 OOP implementation.
|
|
48850
|
+
*
|
|
48851
|
+
* Use this class to perform an incremental md5, otherwise use the
|
|
48852
|
+
* static methods instead.
|
|
48853
|
+
*/
|
|
48854
|
+
|
|
48855
|
+
function SparkMD5() {
|
|
48856
|
+
// call reset to init the instance
|
|
48857
|
+
this.reset();
|
|
48858
|
+
}
|
|
48859
|
+
|
|
48860
|
+
/**
|
|
48861
|
+
* Appends a string.
|
|
48862
|
+
* A conversion will be applied if an utf8 string is detected.
|
|
48863
|
+
*
|
|
48864
|
+
* @param {String} str The string to be appended
|
|
48865
|
+
*
|
|
48866
|
+
* @return {SparkMD5} The instance itself
|
|
48867
|
+
*/
|
|
48868
|
+
SparkMD5.prototype.append = function (str) {
|
|
48869
|
+
// Converts the string to utf8 bytes if necessary
|
|
48870
|
+
// Then append as binary
|
|
48871
|
+
this.appendBinary(toUtf8(str));
|
|
48872
|
+
|
|
48873
|
+
return this;
|
|
48874
|
+
};
|
|
48875
|
+
|
|
48876
|
+
/**
|
|
48877
|
+
* Appends a binary string.
|
|
48878
|
+
*
|
|
48879
|
+
* @param {String} contents The binary string to be appended
|
|
48880
|
+
*
|
|
48881
|
+
* @return {SparkMD5} The instance itself
|
|
48882
|
+
*/
|
|
48883
|
+
SparkMD5.prototype.appendBinary = function (contents) {
|
|
48884
|
+
this._buff += contents;
|
|
48885
|
+
this._length += contents.length;
|
|
48886
|
+
|
|
48887
|
+
var length = this._buff.length,
|
|
48888
|
+
i;
|
|
48889
|
+
|
|
48890
|
+
for (i = 64; i <= length; i += 64) {
|
|
48891
|
+
md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
|
|
48892
|
+
}
|
|
48893
|
+
|
|
48894
|
+
this._buff = this._buff.substring(i - 64);
|
|
48895
|
+
|
|
48896
|
+
return this;
|
|
48897
|
+
};
|
|
48898
|
+
|
|
48899
|
+
/**
|
|
48900
|
+
* Finishes the incremental computation, reseting the internal state and
|
|
48901
|
+
* returning the result.
|
|
48902
|
+
*
|
|
48903
|
+
* @param {Boolean} raw True to get the raw string, false to get the hex string
|
|
48904
|
+
*
|
|
48905
|
+
* @return {String} The result
|
|
48906
|
+
*/
|
|
48907
|
+
SparkMD5.prototype.end = function (raw) {
|
|
48908
|
+
var buff = this._buff,
|
|
48909
|
+
length = buff.length,
|
|
48910
|
+
i,
|
|
48911
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
48912
|
+
ret;
|
|
48913
|
+
|
|
48914
|
+
for (i = 0; i < length; i += 1) {
|
|
48915
|
+
tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
|
|
48916
|
+
}
|
|
48917
|
+
|
|
48918
|
+
this._finish(tail, length);
|
|
48919
|
+
ret = hex(this._hash);
|
|
48920
|
+
|
|
48921
|
+
if (raw) {
|
|
48922
|
+
ret = hexToBinaryString(ret);
|
|
48923
|
+
}
|
|
48924
|
+
|
|
48925
|
+
this.reset();
|
|
48926
|
+
|
|
48927
|
+
return ret;
|
|
48928
|
+
};
|
|
48929
|
+
|
|
48930
|
+
/**
|
|
48931
|
+
* Resets the internal state of the computation.
|
|
48932
|
+
*
|
|
48933
|
+
* @return {SparkMD5} The instance itself
|
|
48934
|
+
*/
|
|
48935
|
+
SparkMD5.prototype.reset = function () {
|
|
48936
|
+
this._buff = '';
|
|
48937
|
+
this._length = 0;
|
|
48938
|
+
this._hash = [1732584193, -271733879, -1732584194, 271733878];
|
|
48939
|
+
|
|
48940
|
+
return this;
|
|
48941
|
+
};
|
|
48942
|
+
|
|
48943
|
+
/**
|
|
48944
|
+
* Gets the internal state of the computation.
|
|
48945
|
+
*
|
|
48946
|
+
* @return {Object} The state
|
|
48947
|
+
*/
|
|
48948
|
+
SparkMD5.prototype.getState = function () {
|
|
48949
|
+
return {
|
|
48950
|
+
buff: this._buff,
|
|
48951
|
+
length: this._length,
|
|
48952
|
+
hash: this._hash.slice()
|
|
48953
|
+
};
|
|
48954
|
+
};
|
|
48955
|
+
|
|
48956
|
+
/**
|
|
48957
|
+
* Gets the internal state of the computation.
|
|
48958
|
+
*
|
|
48959
|
+
* @param {Object} state The state
|
|
48960
|
+
*
|
|
48961
|
+
* @return {SparkMD5} The instance itself
|
|
48962
|
+
*/
|
|
48963
|
+
SparkMD5.prototype.setState = function (state) {
|
|
48964
|
+
this._buff = state.buff;
|
|
48965
|
+
this._length = state.length;
|
|
48966
|
+
this._hash = state.hash;
|
|
48967
|
+
|
|
48968
|
+
return this;
|
|
48969
|
+
};
|
|
48970
|
+
|
|
48971
|
+
/**
|
|
48972
|
+
* Releases memory used by the incremental buffer and other additional
|
|
48973
|
+
* resources. If you plan to use the instance again, use reset instead.
|
|
48974
|
+
*/
|
|
48975
|
+
SparkMD5.prototype.destroy = function () {
|
|
48976
|
+
delete this._hash;
|
|
48977
|
+
delete this._buff;
|
|
48978
|
+
delete this._length;
|
|
48979
|
+
};
|
|
48980
|
+
|
|
48981
|
+
/**
|
|
48982
|
+
* Finish the final calculation based on the tail.
|
|
48983
|
+
*
|
|
48984
|
+
* @param {Array} tail The tail (will be modified)
|
|
48985
|
+
* @param {Number} length The length of the remaining buffer
|
|
48986
|
+
*/
|
|
48987
|
+
SparkMD5.prototype._finish = function (tail, length) {
|
|
48988
|
+
var i = length,
|
|
48989
|
+
tmp,
|
|
48990
|
+
lo,
|
|
48991
|
+
hi;
|
|
48992
|
+
|
|
48993
|
+
tail[i >> 2] |= 0x80 << ((i % 4) << 3);
|
|
48994
|
+
if (i > 55) {
|
|
48995
|
+
md5cycle(this._hash, tail);
|
|
48996
|
+
for (i = 0; i < 16; i += 1) {
|
|
48997
|
+
tail[i] = 0;
|
|
48998
|
+
}
|
|
48999
|
+
}
|
|
49000
|
+
|
|
49001
|
+
// Do the final computation based on the tail and length
|
|
49002
|
+
// Beware that the final length may not fit in 32 bits so we take care of that
|
|
49003
|
+
tmp = this._length * 8;
|
|
49004
|
+
tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
|
|
49005
|
+
lo = parseInt(tmp[2], 16);
|
|
49006
|
+
hi = parseInt(tmp[1], 16) || 0;
|
|
49007
|
+
|
|
49008
|
+
tail[14] = lo;
|
|
49009
|
+
tail[15] = hi;
|
|
49010
|
+
md5cycle(this._hash, tail);
|
|
49011
|
+
};
|
|
49012
|
+
|
|
49013
|
+
/**
|
|
49014
|
+
* Performs the md5 hash on a string.
|
|
49015
|
+
* A conversion will be applied if utf8 string is detected.
|
|
49016
|
+
*
|
|
49017
|
+
* @param {String} str The string
|
|
49018
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex string
|
|
49019
|
+
*
|
|
49020
|
+
* @return {String} The result
|
|
49021
|
+
*/
|
|
49022
|
+
SparkMD5.hash = function (str, raw) {
|
|
49023
|
+
// Converts the string to utf8 bytes if necessary
|
|
49024
|
+
// Then compute it using the binary function
|
|
49025
|
+
return SparkMD5.hashBinary(toUtf8(str), raw);
|
|
49026
|
+
};
|
|
49027
|
+
|
|
49028
|
+
/**
|
|
49029
|
+
* Performs the md5 hash on a binary string.
|
|
49030
|
+
*
|
|
49031
|
+
* @param {String} content The binary string
|
|
49032
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex string
|
|
49033
|
+
*
|
|
49034
|
+
* @return {String} The result
|
|
49035
|
+
*/
|
|
49036
|
+
SparkMD5.hashBinary = function (content, raw) {
|
|
49037
|
+
var hash = md51(content),
|
|
49038
|
+
ret = hex(hash);
|
|
49039
|
+
|
|
49040
|
+
return raw ? hexToBinaryString(ret) : ret;
|
|
49041
|
+
};
|
|
49042
|
+
|
|
49043
|
+
// ---------------------------------------------------
|
|
49044
|
+
|
|
49045
|
+
/**
|
|
49046
|
+
* SparkMD5 OOP implementation for array buffers.
|
|
49047
|
+
*
|
|
49048
|
+
* Use this class to perform an incremental md5 ONLY for array buffers.
|
|
49049
|
+
*/
|
|
49050
|
+
SparkMD5.ArrayBuffer = function () {
|
|
49051
|
+
// call reset to init the instance
|
|
49052
|
+
this.reset();
|
|
49053
|
+
};
|
|
49054
|
+
|
|
49055
|
+
/**
|
|
49056
|
+
* Appends an array buffer.
|
|
49057
|
+
*
|
|
49058
|
+
* @param {ArrayBuffer} arr The array to be appended
|
|
49059
|
+
*
|
|
49060
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
|
49061
|
+
*/
|
|
49062
|
+
SparkMD5.ArrayBuffer.prototype.append = function (arr) {
|
|
49063
|
+
var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),
|
|
49064
|
+
length = buff.length,
|
|
49065
|
+
i;
|
|
49066
|
+
|
|
49067
|
+
this._length += arr.byteLength;
|
|
49068
|
+
|
|
49069
|
+
for (i = 64; i <= length; i += 64) {
|
|
49070
|
+
md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
|
|
49071
|
+
}
|
|
49072
|
+
|
|
49073
|
+
this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
|
|
49074
|
+
|
|
49075
|
+
return this;
|
|
49076
|
+
};
|
|
49077
|
+
|
|
49078
|
+
/**
|
|
49079
|
+
* Finishes the incremental computation, reseting the internal state and
|
|
49080
|
+
* returning the result.
|
|
49081
|
+
*
|
|
49082
|
+
* @param {Boolean} raw True to get the raw string, false to get the hex string
|
|
49083
|
+
*
|
|
49084
|
+
* @return {String} The result
|
|
49085
|
+
*/
|
|
49086
|
+
SparkMD5.ArrayBuffer.prototype.end = function (raw) {
|
|
49087
|
+
var buff = this._buff,
|
|
49088
|
+
length = buff.length,
|
|
49089
|
+
tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
49090
|
+
i,
|
|
49091
|
+
ret;
|
|
49092
|
+
|
|
49093
|
+
for (i = 0; i < length; i += 1) {
|
|
49094
|
+
tail[i >> 2] |= buff[i] << ((i % 4) << 3);
|
|
49095
|
+
}
|
|
49096
|
+
|
|
49097
|
+
this._finish(tail, length);
|
|
49098
|
+
ret = hex(this._hash);
|
|
49099
|
+
|
|
49100
|
+
if (raw) {
|
|
49101
|
+
ret = hexToBinaryString(ret);
|
|
49102
|
+
}
|
|
49103
|
+
|
|
49104
|
+
this.reset();
|
|
49105
|
+
|
|
49106
|
+
return ret;
|
|
49107
|
+
};
|
|
49108
|
+
|
|
49109
|
+
/**
|
|
49110
|
+
* Resets the internal state of the computation.
|
|
49111
|
+
*
|
|
49112
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
|
49113
|
+
*/
|
|
49114
|
+
SparkMD5.ArrayBuffer.prototype.reset = function () {
|
|
49115
|
+
this._buff = new Uint8Array(0);
|
|
49116
|
+
this._length = 0;
|
|
49117
|
+
this._hash = [1732584193, -271733879, -1732584194, 271733878];
|
|
49118
|
+
|
|
49119
|
+
return this;
|
|
49120
|
+
};
|
|
49121
|
+
|
|
49122
|
+
/**
|
|
49123
|
+
* Gets the internal state of the computation.
|
|
49124
|
+
*
|
|
49125
|
+
* @return {Object} The state
|
|
49126
|
+
*/
|
|
49127
|
+
SparkMD5.ArrayBuffer.prototype.getState = function () {
|
|
49128
|
+
var state = SparkMD5.prototype.getState.call(this);
|
|
49129
|
+
|
|
49130
|
+
// Convert buffer to a string
|
|
49131
|
+
state.buff = arrayBuffer2Utf8Str(state.buff);
|
|
49132
|
+
|
|
49133
|
+
return state;
|
|
49134
|
+
};
|
|
49135
|
+
|
|
49136
|
+
/**
|
|
49137
|
+
* Gets the internal state of the computation.
|
|
49138
|
+
*
|
|
49139
|
+
* @param {Object} state The state
|
|
49140
|
+
*
|
|
49141
|
+
* @return {SparkMD5.ArrayBuffer} The instance itself
|
|
49142
|
+
*/
|
|
49143
|
+
SparkMD5.ArrayBuffer.prototype.setState = function (state) {
|
|
49144
|
+
// Convert string to buffer
|
|
49145
|
+
state.buff = utf8Str2ArrayBuffer(state.buff, true);
|
|
49146
|
+
|
|
49147
|
+
return SparkMD5.prototype.setState.call(this, state);
|
|
49148
|
+
};
|
|
49149
|
+
|
|
49150
|
+
SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
|
|
49151
|
+
|
|
49152
|
+
SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
|
|
49153
|
+
|
|
49154
|
+
/**
|
|
49155
|
+
* Performs the md5 hash on an array buffer.
|
|
49156
|
+
*
|
|
49157
|
+
* @param {ArrayBuffer} arr The array buffer
|
|
49158
|
+
* @param {Boolean} [raw] True to get the raw string, false to get the hex one
|
|
49159
|
+
*
|
|
49160
|
+
* @return {String} The result
|
|
49161
|
+
*/
|
|
49162
|
+
SparkMD5.ArrayBuffer.hash = function (arr, raw) {
|
|
49163
|
+
var hash = md51_array(new Uint8Array(arr)),
|
|
49164
|
+
ret = hex(hash);
|
|
49165
|
+
|
|
49166
|
+
return raw ? hexToBinaryString(ret) : ret;
|
|
49167
|
+
};
|
|
49168
|
+
|
|
49169
|
+
return SparkMD5;
|
|
49170
|
+
}));
|
|
49171
|
+
|
|
49172
|
+
|
|
48019
49173
|
/***/ }),
|
|
48020
49174
|
|
|
48021
49175
|
/***/ 2048:
|
|
@@ -48530,19 +49684,19 @@ var update = add("4ff8cc4e", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
48530
49684
|
|
|
48531
49685
|
/***/ }),
|
|
48532
49686
|
|
|
48533
|
-
/***/
|
|
49687
|
+
/***/ 9302:
|
|
48534
49688
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
48535
49689
|
|
|
48536
49690
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
48537
49691
|
|
|
48538
49692
|
// load the styles
|
|
48539
|
-
var content = __webpack_require__(
|
|
49693
|
+
var content = __webpack_require__(5596);
|
|
48540
49694
|
if(content.__esModule) content = content.default;
|
|
48541
49695
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
48542
49696
|
if(content.locals) module.exports = content.locals;
|
|
48543
49697
|
// add the styles to the DOM
|
|
48544
49698
|
var add = (__webpack_require__(9548)/* ["default"] */ .A)
|
|
48545
|
-
var update = add("
|
|
49699
|
+
var update = add("06724a92", content, true, {"sourceMap":false,"shadowMode":false});
|
|
48546
49700
|
|
|
48547
49701
|
/***/ }),
|
|
48548
49702
|
|
|
@@ -70803,39 +71957,39 @@ var asyncComponents = [
|
|
|
70803
71957
|
}],
|
|
70804
71958
|
// ========== ecmapp/Wflowform 工作流表单子组件 → chunk: m-wflow-form ==========
|
|
70805
71959
|
['Attachment', function () {
|
|
70806
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71960
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70807
71961
|
return m.Attachment;
|
|
70808
71962
|
});
|
|
70809
71963
|
}], ['BodyFile', function () {
|
|
70810
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71964
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70811
71965
|
return m.BodyFile;
|
|
70812
71966
|
});
|
|
70813
71967
|
}], ['HandleIdea', function () {
|
|
70814
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71968
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70815
71969
|
return m.HandleIdea;
|
|
70816
71970
|
});
|
|
70817
71971
|
}], ['SelectOuterDeputy', function () {
|
|
70818
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71972
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70819
71973
|
return m.SelectOuterDeputy;
|
|
70820
71974
|
});
|
|
70821
71975
|
}], ['SubmitHandle', function () {
|
|
70822
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71976
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70823
71977
|
return m.SubmitHandle;
|
|
70824
71978
|
});
|
|
70825
71979
|
}], ['SubmitDialog', function () {
|
|
70826
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71980
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70827
71981
|
return m.SubmitDialog;
|
|
70828
71982
|
});
|
|
70829
71983
|
}], ['ShortcutProcessing', function () {
|
|
70830
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71984
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70831
71985
|
return m.ShortcutProcessing;
|
|
70832
71986
|
});
|
|
70833
71987
|
}], ['WfNodelogList', function () {
|
|
70834
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71988
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70835
71989
|
return m.WfNodelogList;
|
|
70836
71990
|
});
|
|
70837
71991
|
}], ['WriteToReadIdea', function () {
|
|
70838
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
71992
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388)).then(function (m) {
|
|
70839
71993
|
return m.WriteToReadIdea;
|
|
70840
71994
|
});
|
|
70841
71995
|
}]];
|
|
@@ -70859,7 +72013,7 @@ var mappaio_install = function install(Vue) {
|
|
|
70859
72013
|
});
|
|
70860
72014
|
|
|
70861
72015
|
// 3. 异步加载工作流引擎插件(独立 chunk)
|
|
70862
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
72016
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8838)).then(function (m) {
|
|
70863
72017
|
Vue.use(m.default || m);
|
|
70864
72018
|
});
|
|
70865
72019
|
};
|
|
@@ -70885,10 +72039,10 @@ var webSocket = websocket/* default */.A;
|
|
|
70885
72039
|
|
|
70886
72040
|
// ---------- 工作流相关 ----------
|
|
70887
72041
|
var WfengineModule = function WfengineModule() {
|
|
70888
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
72042
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8838));
|
|
70889
72043
|
};
|
|
70890
72044
|
var WflowformModule = function WflowformModule() {
|
|
70891
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
72045
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8388));
|
|
70892
72046
|
};
|
|
70893
72047
|
|
|
70894
72048
|
// ---------- 重型功能(PDF/富文本,仅特定页面使用) ----------
|