easy3wui 1.6.0 → 1.6.1
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/README.md +7 -1
- package/assets/btn.css +9 -3
- package/assets/card.css +8 -0
- package/assets/flow.css +287 -133
- package/assets/formPage.css +87 -6
- package/assets/gridPage.css +53 -1
- package/assets/index.css +446 -144
- package/assets/login.css +4 -0
- package/assets/userLayout.css +2 -1
- package/lib/Easy3wButton/index.js +8 -4
- package/lib/Easy3wButtonOne/index.js +1 -1
- package/lib/Easy3wFlow/index.js +216 -36
- package/lib/Easy3wFormPage/easy3wFormPage.less +37 -0
- package/lib/Easy3wFormPage/index.js +585 -115
- package/lib/Easy3wGridInput/index.js +10 -1
- package/lib/Easy3wGridPage/index.js +1 -1
- package/lib/Easy3wGridTextArea/index.js +9 -1
- package/lib/Easy3wPositionButton/easy3wPositionButton.less +8 -0
- package/lib/Easy3wPositionButton/index.js +1 -1
- package/lib/Easy3wUpload/index.js +4 -3
- package/lib/Easy3wUploadB/index copy.js +1020 -0
- package/lib/Easy3wUploadB/index.js +29 -37
- package/lib/Easy3wUploadM/index.js +4 -3
- package/package.json +2 -1
|
@@ -93,7 +93,8 @@ var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
|
93
93
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
94
94
|
|
|
95
95
|
var formItemStyle = {
|
|
96
|
-
marginBottom:
|
|
96
|
+
// marginBottom: 0,
|
|
97
|
+
margin: 3
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
var BigFileUpload = function (_Component) {
|
|
@@ -248,7 +249,7 @@ var BigFileUpload = function (_Component) {
|
|
|
248
249
|
});
|
|
249
250
|
return false;
|
|
250
251
|
}
|
|
251
|
-
var acceptDefault = '.rplib,.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
252
|
+
var acceptDefault = '.msg,.rplib,.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
252
253
|
if (accept && accept.length > 0) {
|
|
253
254
|
acceptDefault = accept;
|
|
254
255
|
}
|
|
@@ -274,9 +275,6 @@ var BigFileUpload = function (_Component) {
|
|
|
274
275
|
fileList = _state3.fileList,
|
|
275
276
|
iniSetedFlag = _state3.iniSetedFlag;
|
|
276
277
|
|
|
277
|
-
if (!iniSetedFlag) {
|
|
278
|
-
iniSetedFlag = true;
|
|
279
|
-
}
|
|
280
278
|
if (!multiple) {
|
|
281
279
|
fileList = [file];
|
|
282
280
|
} else {
|
|
@@ -499,7 +497,6 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
499
497
|
_this3.setState({ uploadRequest: true });
|
|
500
498
|
var formData = new FormData();
|
|
501
499
|
var authToken = (0, _Easy3wGetCookie2['default'])('userToken') || 'E3WSAFEAPPQWEFGHYI7I483S';
|
|
502
|
-
|
|
503
500
|
// const timeStr = new Date().getTime();
|
|
504
501
|
// if (AESFlag && AESFlag === '1') {
|
|
505
502
|
// authToken = Easy3wAESEncrypt(`${authToken}@#${timeStr}`, AESKey, AESIV);
|
|
@@ -612,7 +609,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
612
609
|
var _index2 = _fileList2.indexOf(_currentFile);
|
|
613
610
|
if (_index2 >= 0) {
|
|
614
611
|
_fileList2.splice(_index2, 1);
|
|
615
|
-
_this3.setState((0, _extends3['default'])({}, _this3.state, {
|
|
612
|
+
_this3.setState((0, _extends3['default'])({}, _this3.state, { loading: false, fileList: _fileList2 }), function () {
|
|
616
613
|
_this3.setUploadValue(_fileList2);
|
|
617
614
|
});
|
|
618
615
|
}
|
|
@@ -620,7 +617,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
620
617
|
});
|
|
621
618
|
};
|
|
622
619
|
|
|
623
|
-
this.handlePartUpload = function (
|
|
620
|
+
this.handlePartUpload = function () {
|
|
624
621
|
try {
|
|
625
622
|
var _state6 = _this3.state,
|
|
626
623
|
currentFile = _state6.currentFile,
|
|
@@ -682,18 +679,10 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
682
679
|
} else {
|
|
683
680
|
end = fileSize;
|
|
684
681
|
}
|
|
685
|
-
var start = CUSize;
|
|
686
|
-
if (sIndex && sIndex > 0 && eIndex && eIndex > 0) {
|
|
687
|
-
end = eIndex;
|
|
688
|
-
start = sIndex;
|
|
689
|
-
}
|
|
690
682
|
uploadFileReader.onload = function (e) {
|
|
691
683
|
if (chunkCheckErr) {
|
|
692
684
|
return;
|
|
693
685
|
}
|
|
694
|
-
var mainFileSpark = new _sparkMd2['default'].ArrayBuffer(); // 对arrayBuffer数据进行md5加密,产生一个md5字符串 主文件
|
|
695
|
-
mainFileSpark.append(e.target.result);
|
|
696
|
-
var chunkMD5 = mainFileSpark.end();
|
|
697
686
|
// 上传附件
|
|
698
687
|
var file = uploadData.file;
|
|
699
688
|
|
|
@@ -704,7 +693,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
704
693
|
// authToken = Easy3wAESEncrypt(`${authToken}@#${timeStr}`, AESKey, AESIV);
|
|
705
694
|
// }
|
|
706
695
|
var blob = new Blob([e.target.result], { type: 'application/octet-stream' });
|
|
707
|
-
var postParam = (0, _extends3['default'])({ fileInfo: file }, sendData, { currentSize: end
|
|
696
|
+
var postParam = (0, _extends3['default'])({ fileInfo: file }, sendData, { currentSize: end });
|
|
708
697
|
formData.append('chunk', blob);
|
|
709
698
|
formData.append('sendTime', new Date().getTime());
|
|
710
699
|
formData.append('appType', '01');
|
|
@@ -744,26 +733,16 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
744
733
|
blob = null;
|
|
745
734
|
formData = null;
|
|
746
735
|
if (res && res.body.rspCode === '0000') {
|
|
736
|
+
var useTime = (new Date().getTime() - startTime) / 1000; // 用时秒
|
|
737
|
+
// 1秒传输速率
|
|
738
|
+
var curSpeed = Math.floor(1 / useTime * size);
|
|
747
739
|
var _res$body$data2 = res.body.data,
|
|
748
740
|
uploadStatus = _res$body$data2.uploadStatus,
|
|
749
741
|
fileId = _res$body$data2.fileId,
|
|
750
742
|
checkStatus = _res$body$data2.checkStatus,
|
|
751
|
-
uploadedSize = _res$body$data2.uploadedSize
|
|
752
|
-
startIndex = _res$body$data2.startIndex,
|
|
753
|
-
endIndex = _res$body$data2.endIndex;
|
|
743
|
+
uploadedSize = _res$body$data2.uploadedSize;
|
|
754
744
|
|
|
755
|
-
var useTime = (new Date().getTime() - startTime) / 1000; // 用时秒
|
|
756
745
|
var upSize = Number(uploadedSize);
|
|
757
|
-
// 1秒传输速率
|
|
758
|
-
var curSpeed = Math.floor(1 / useTime * size);
|
|
759
|
-
if (checkStatus && checkStatus === 'RETRY') {
|
|
760
|
-
_this3.setState((0, _extends3['default'])({}, _this3.state, {
|
|
761
|
-
speed: curSpeed
|
|
762
|
-
}), function () {
|
|
763
|
-
setImmediate(_this3.handlePartUpload, startIndex, endIndex);
|
|
764
|
-
});
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
746
|
// 计算上传进度
|
|
768
747
|
uploadPercent = Math.floor(upSize / fileSize * 100 * 10) / 10;
|
|
769
748
|
if (checkStatus === '0') {
|
|
@@ -849,10 +828,10 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
849
828
|
setImmediate(_this3.handlePartUpload);
|
|
850
829
|
});
|
|
851
830
|
}
|
|
852
|
-
} else {
|
|
831
|
+
} else if (res && res.body.rspMsg) {
|
|
853
832
|
_modal2['default'].error({
|
|
854
833
|
style: { top: '38%' },
|
|
855
|
-
content: res
|
|
834
|
+
content: res.body.rspMsg
|
|
856
835
|
});
|
|
857
836
|
var _fileList4 = _this3.state.fileList;
|
|
858
837
|
|
|
@@ -863,11 +842,25 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
863
842
|
_this3.setUploadValue(_fileList4);
|
|
864
843
|
});
|
|
865
844
|
}
|
|
845
|
+
} else {
|
|
846
|
+
_modal2['default'].error({
|
|
847
|
+
style: { top: '38%' },
|
|
848
|
+
content: '上传失败'
|
|
849
|
+
});
|
|
850
|
+
var _fileList5 = _this3.state.fileList;
|
|
851
|
+
|
|
852
|
+
var _index5 = _fileList5.indexOf(currentFile);
|
|
853
|
+
if (_index5 >= 0) {
|
|
854
|
+
_fileList5.splice(_index5, 1);
|
|
855
|
+
_this3.setState((0, _extends3['default'])({}, _this3.state, { loading: false, fileList: _fileList5 }), function () {
|
|
856
|
+
_this3.setUploadValue(_fileList5);
|
|
857
|
+
});
|
|
858
|
+
}
|
|
866
859
|
}
|
|
867
860
|
});
|
|
868
861
|
};
|
|
869
|
-
// console.log('读取文件', `文件大小:${currentFile.size}`, `已上传大小${
|
|
870
|
-
uploadFileReader.readAsArrayBuffer(blobSlice.call(currentFile,
|
|
862
|
+
// console.log('读取文件', `文件大小:${currentFile.size}`, `已上传大小${CUSize}`, `结束值${end}`, `切片大小${speed}`);
|
|
863
|
+
uploadFileReader.readAsArrayBuffer(blobSlice.call(currentFile, CUSize, end));
|
|
871
864
|
} catch (error) {
|
|
872
865
|
_modal2['default'].error({
|
|
873
866
|
style: { top: '38%' },
|
|
@@ -947,8 +940,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
947
940
|
if (sliceIndex < sliceCount) {
|
|
948
941
|
_this3.setState((0, _extends3['default'])({}, _this3.state, {
|
|
949
942
|
preUploading: true,
|
|
950
|
-
preUploadPercent: Number((sliceIndex / sliceCount * 100).toFixed(1))
|
|
951
|
-
}));
|
|
943
|
+
preUploadPercent: Number((sliceIndex / sliceCount * 100).toFixed(1)) }));
|
|
952
944
|
setImmediate(_loadNext, sliceIndex, tempreadFileSize);
|
|
953
945
|
} else {
|
|
954
946
|
var mainFileMD5 = mainFileSpark.end();
|
|
@@ -79,7 +79,8 @@ var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
|
79
79
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
80
80
|
|
|
81
81
|
var formItemStyle = {
|
|
82
|
-
marginBottom:
|
|
82
|
+
// marginBottom: 0,
|
|
83
|
+
margin: 3
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
var Easy3wUploadM = function (_Component) {
|
|
@@ -199,7 +200,7 @@ var Easy3wUploadM = function (_Component) {
|
|
|
199
200
|
|
|
200
201
|
var fileNameArr = name.toLowerCase().split('.');
|
|
201
202
|
var fileType = fileNameArr[fileNameArr.length - 1];
|
|
202
|
-
var acceptDefault = '.rplib,.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
203
|
+
var acceptDefault = '.msg,.rplib,.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
203
204
|
if (name.length > 100) {
|
|
204
205
|
_modal2['default'].info({
|
|
205
206
|
style: { top: '38%' },
|
|
@@ -256,7 +257,7 @@ var Easy3wUploadM = function (_Component) {
|
|
|
256
257
|
var correctTypeFlag = true;
|
|
257
258
|
var fileNameArr = name.toLowerCase().split('.');
|
|
258
259
|
var fileType = fileNameArr[fileNameArr.length - 1];
|
|
259
|
-
var acceptDefault = '.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
260
|
+
var acceptDefault = '.msg,.rplib,.xls,.doc,.jpg,.pdf,.png,.zip,.bmp,.rar,.txt,.docx,.ico,.bid,.xlsx,.jpeg,.json,.xml,.ebid,.dwg,.pptx,.xmind,.xps,.crx,.7z,.ppt,.svg,.pdm,.xlsm,.vsd,.gif,.tif,.docm,.csv,.ttf,.wps,.psd,.mp4,.tiff,.rtf,.tlb,.xlsb';
|
|
260
261
|
if (name.length > 100) {
|
|
261
262
|
return false;
|
|
262
263
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy3wui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "easy3wui components for react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"antd": "3.24.2",
|
|
106
106
|
"braft-editor": "^2.3.8",
|
|
107
107
|
"lodash": "4.17.11",
|
|
108
|
+
"node-red": "^2.1.4",
|
|
108
109
|
"react-images": "^1.0.0",
|
|
109
110
|
"react-number-format": "^4.3.1",
|
|
110
111
|
"react-number-input": "^15.5.1",
|