easy3wui 1.5.85 → 1.5.86-2.beta
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/CHANGELOG.md +189 -0
- package/HISTORY.md +8 -0
- package/LICENSE.md +3 -3
- package/README.md +26 -26
- package/lib/Easy3wA/index.js +7 -4
- package/lib/Easy3wBlankLayout/index.js +13 -45
- package/lib/Easy3wButton/index.js +10 -8
- package/lib/Easy3wButtonOne/index.js +7 -5
- package/lib/Easy3wCaHandler/index.js +8 -6
- package/lib/Easy3wCard/indexM.js +7 -3
- package/lib/Easy3wCard/indexPC.js +7 -3
- package/lib/Easy3wDictCode/index.js +3 -1
- package/lib/Easy3wDownLoad/Easy3wFileView.js +1 -1
- package/lib/Easy3wDownLoad/Easy3wImgView.js +1 -1
- package/lib/Easy3wDownLoad/Easy3wPDFView.js +3 -3
- package/lib/Easy3wDownLoad/index.js +2 -8
- package/lib/Easy3wEditBigTable/Easy3wEditBigTableForm.js +10 -9
- package/lib/Easy3wEditBigTable/Editors/EditorsInputNumber.js +0 -7
- package/lib/Easy3wEditBigTable/index.js +37 -28
- package/lib/Easy3wException/index.js +6 -7
- package/lib/Easy3wException/typeConfig.js +6 -3
- package/lib/Easy3wFlow/index.js +17 -15
- package/lib/Easy3wFormPage/indexM.js +600 -174
- package/lib/Easy3wFormPage/indexPC.js +2384 -2245
- package/lib/Easy3wGetCookie/index.js +6 -3
- package/lib/Easy3wGetDesensitization/index.js +3 -0
- package/lib/Easy3wGlobalFooter/index.js +6 -3
- package/lib/Easy3wGlobalHeader/index.js +2 -0
- package/lib/Easy3wGridCheckBox/index.js +3 -1
- package/lib/Easy3wGridDatePicker/index.js +3 -1
- package/lib/Easy3wGridDateTimePicker/index.js +3 -1
- package/lib/Easy3wGridInput/index.js +4 -2
- package/lib/Easy3wGridInputAmount/index.js +3 -1
- package/lib/Easy3wGridInputDigit/index.js +3 -1
- package/lib/Easy3wGridInputEmail/index.js +3 -1
- package/lib/Easy3wGridInputNumber/index.js +3 -1
- package/lib/Easy3wGridInputNumberFormat/index.js +3 -1
- package/lib/Easy3wGridPage/index.js +2 -0
- package/lib/Easy3wGridRadio/index.js +3 -1
- package/lib/Easy3wGridSelect/index.js +3 -1
- package/lib/Easy3wGridTextArea/index.js +3 -1
- package/lib/Easy3wI18N/index.js +58 -0
- package/lib/Easy3wI18N/locales/index.js +19 -0
- package/lib/Easy3wInput/index.js +2 -0
- package/lib/Easy3wLogin/index.js +17 -15
- package/lib/Easy3wLoginLayout/index.js +2 -0
- package/lib/Easy3wModal/index.js +6 -4
- package/lib/Easy3wPositionButton/index.js +4 -2
- package/lib/Easy3wQryGrid/index.js +6 -4
- package/lib/Easy3wResult/index.js +2 -0
- package/lib/Easy3wRow/index.js +2 -0
- package/lib/Easy3wSetCookie/index.js +6 -3
- package/lib/Easy3wSpin/index.js +2 -0
- package/lib/Easy3wTagSelect/index.js +2 -0
- package/lib/Easy3wTagSelect/index.less +120 -120
- package/lib/Easy3wTree/index.js +17 -15
- package/lib/Easy3wUpload/index.js +25 -16
- package/lib/Easy3wUploadB/index.js +45 -40
- package/lib/Easy3wUploadM/index.js +27 -19
- package/lib/Easy3wUserLayout/index.js +20 -28
- package/lib/index.js +9 -0
- package/package.json +122 -122
- package/lib/Easy3wUploadB/index copy 2.js +0 -1011
- package/lib/Easy3wUploadB/index copy 3.js +0 -1088
- package/lib/Easy3wUploadB/index copy.js +0 -1020
- package/lib/Easy3wUploadM/index copy.js +0 -523
|
@@ -28,6 +28,8 @@ var _classnames2 = _interopRequireDefault(_classnames);
|
|
|
28
28
|
|
|
29
29
|
var _antd = require('antd');
|
|
30
30
|
|
|
31
|
+
var _easy3wui = require('easy3wui');
|
|
32
|
+
|
|
31
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
32
34
|
|
|
33
35
|
function Easy3wResult(_ref) {
|
package/lib/Easy3wRow/index.js
CHANGED
|
@@ -24,6 +24,8 @@ var _row2 = _interopRequireDefault(_row);
|
|
|
24
24
|
|
|
25
25
|
require('antd/lib/row/style');
|
|
26
26
|
|
|
27
|
+
var _easy3wui = require('easy3wui');
|
|
28
|
+
|
|
27
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
28
30
|
|
|
29
31
|
var Easy3wRow = function (_Component) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports[
|
|
4
|
+
exports['default'] = Easy3wSetCookie;
|
|
5
|
+
|
|
6
|
+
var _easy3wui = require('easy3wui');
|
|
7
|
+
|
|
5
8
|
function Easy3wSetCookie(name, value, path) {
|
|
6
9
|
var Days = 30 * 12; // cookie 将被保存一年
|
|
7
10
|
var exp = new Date(); // 获得当前时间
|
|
8
11
|
var currentTime = exp.getTime();
|
|
9
12
|
var continued = Days * 24 * 60 * 60 * 1000;
|
|
10
13
|
exp.setTime(currentTime + continued); // 换成毫秒
|
|
11
|
-
document.cookie = name +
|
|
14
|
+
document.cookie = name + '=' + escape(value) + ';expires=' + exp.toGMTString() + ';path=' + path;
|
|
12
15
|
}
|
|
13
16
|
module.exports = exports['default'];
|
package/lib/Easy3wSpin/index.js
CHANGED
|
@@ -28,6 +28,8 @@ var _spin2 = _interopRequireDefault(_spin);
|
|
|
28
28
|
|
|
29
29
|
require('antd/lib/spin/style');
|
|
30
30
|
|
|
31
|
+
var _easy3wui = require('easy3wui');
|
|
32
|
+
|
|
31
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
32
34
|
|
|
33
35
|
var Easy3wSpin = function (_Component) {
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
@import '~antd/lib/style/themes/default.less';
|
|
2
|
-
|
|
3
|
-
.tagSelect {
|
|
4
|
-
user-select: none;
|
|
5
|
-
margin-left: -8px;
|
|
6
|
-
position: relative;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
max-height: 32px;
|
|
9
|
-
// line-height: 32px;
|
|
10
|
-
transition: all 0.3s;
|
|
11
|
-
:global {
|
|
12
|
-
.ant-tag {
|
|
13
|
-
padding: 0 8px;
|
|
14
|
-
margin-right: 24px;
|
|
15
|
-
font-size: @font-size-base;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
&.expanded {
|
|
19
|
-
transition: all 0.3s;
|
|
20
|
-
max-height: 800px;
|
|
21
|
-
}
|
|
22
|
-
.trigger {
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
i {
|
|
27
|
-
font-size: 12px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
&.hasExpandTag {
|
|
31
|
-
padding-right: 50px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.standardFormRow {
|
|
36
|
-
border-bottom: 1px dashed @border-color-split;
|
|
37
|
-
// padding-bottom: 8px;
|
|
38
|
-
// margin-bottom: 8px;
|
|
39
|
-
display: flex;
|
|
40
|
-
:global {
|
|
41
|
-
.ant-form-item {
|
|
42
|
-
margin-right: 24px;
|
|
43
|
-
}
|
|
44
|
-
.ant-form-item-label label {
|
|
45
|
-
color: @text-color;
|
|
46
|
-
margin-right: 0;
|
|
47
|
-
}
|
|
48
|
-
.ant-form-item-label,
|
|
49
|
-
.ant-form-item-control {
|
|
50
|
-
padding: 0;
|
|
51
|
-
line-height: 32px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.label {
|
|
55
|
-
// color: @heading-color;
|
|
56
|
-
// color: rgb(173,124,89);
|
|
57
|
-
font-size: @font-size-base;
|
|
58
|
-
padding-right: 12px;
|
|
59
|
-
margin-right: 12px;
|
|
60
|
-
// margin-right: 24px;
|
|
61
|
-
background:#F8F8FF;
|
|
62
|
-
// background: rgb(84, 104, 178);
|
|
63
|
-
// opacity: 0.5;
|
|
64
|
-
flex: 0 0 auto;
|
|
65
|
-
text-align: right;
|
|
66
|
-
& > span {
|
|
67
|
-
display: inline-block;
|
|
68
|
-
height: 32px;
|
|
69
|
-
line-height: 32px;
|
|
70
|
-
&:after {
|
|
71
|
-
content: '|';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// border-radius: 2px;
|
|
75
|
-
& > a {
|
|
76
|
-
color: @heading-color;
|
|
77
|
-
// color: rgb(255, 255, 255);
|
|
78
|
-
display: inline-block;
|
|
79
|
-
height: 32px;
|
|
80
|
-
line-height: 32px;
|
|
81
|
-
// width: 100%;
|
|
82
|
-
cursor: pointer;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
.content {
|
|
86
|
-
flex: 1 1 0;
|
|
87
|
-
:global {
|
|
88
|
-
.ant-form-item:last-child {
|
|
89
|
-
margin-right: 0;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.standardFormRowLast {
|
|
96
|
-
border: none;
|
|
97
|
-
padding-bottom: 0;
|
|
98
|
-
margin-bottom: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.standardFormRowBlock {
|
|
102
|
-
:global {
|
|
103
|
-
.ant-form-item,
|
|
104
|
-
div.ant-form-item-control-wrapper {
|
|
105
|
-
display: block;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.standardFormRowGrid {
|
|
111
|
-
:global {
|
|
112
|
-
.ant-form-item,
|
|
113
|
-
div.ant-form-item-control-wrapper {
|
|
114
|
-
display: block;
|
|
115
|
-
}
|
|
116
|
-
.ant-form-item-label {
|
|
117
|
-
float: left;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
1
|
+
@import '~antd/lib/style/themes/default.less';
|
|
2
|
+
|
|
3
|
+
.tagSelect {
|
|
4
|
+
user-select: none;
|
|
5
|
+
margin-left: -8px;
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
max-height: 32px;
|
|
9
|
+
// line-height: 32px;
|
|
10
|
+
transition: all 0.3s;
|
|
11
|
+
:global {
|
|
12
|
+
.ant-tag {
|
|
13
|
+
padding: 0 8px;
|
|
14
|
+
margin-right: 24px;
|
|
15
|
+
font-size: @font-size-base;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
&.expanded {
|
|
19
|
+
transition: all 0.3s;
|
|
20
|
+
max-height: 800px;
|
|
21
|
+
}
|
|
22
|
+
.trigger {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
i {
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
&.hasExpandTag {
|
|
31
|
+
padding-right: 50px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.standardFormRow {
|
|
36
|
+
border-bottom: 1px dashed @border-color-split;
|
|
37
|
+
// padding-bottom: 8px;
|
|
38
|
+
// margin-bottom: 8px;
|
|
39
|
+
display: flex;
|
|
40
|
+
:global {
|
|
41
|
+
.ant-form-item {
|
|
42
|
+
margin-right: 24px;
|
|
43
|
+
}
|
|
44
|
+
.ant-form-item-label label {
|
|
45
|
+
color: @text-color;
|
|
46
|
+
margin-right: 0;
|
|
47
|
+
}
|
|
48
|
+
.ant-form-item-label,
|
|
49
|
+
.ant-form-item-control {
|
|
50
|
+
padding: 0;
|
|
51
|
+
line-height: 32px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.label {
|
|
55
|
+
// color: @heading-color;
|
|
56
|
+
// color: rgb(173,124,89);
|
|
57
|
+
font-size: @font-size-base;
|
|
58
|
+
padding-right: 12px;
|
|
59
|
+
margin-right: 12px;
|
|
60
|
+
// margin-right: 24px;
|
|
61
|
+
background:#F8F8FF;
|
|
62
|
+
// background: rgb(84, 104, 178);
|
|
63
|
+
// opacity: 0.5;
|
|
64
|
+
flex: 0 0 auto;
|
|
65
|
+
text-align: right;
|
|
66
|
+
& > span {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
height: 32px;
|
|
69
|
+
line-height: 32px;
|
|
70
|
+
&:after {
|
|
71
|
+
content: '|';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// border-radius: 2px;
|
|
75
|
+
& > a {
|
|
76
|
+
color: @heading-color;
|
|
77
|
+
// color: rgb(255, 255, 255);
|
|
78
|
+
display: inline-block;
|
|
79
|
+
height: 32px;
|
|
80
|
+
line-height: 32px;
|
|
81
|
+
// width: 100%;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.content {
|
|
86
|
+
flex: 1 1 0;
|
|
87
|
+
:global {
|
|
88
|
+
.ant-form-item:last-child {
|
|
89
|
+
margin-right: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.standardFormRowLast {
|
|
96
|
+
border: none;
|
|
97
|
+
padding-bottom: 0;
|
|
98
|
+
margin-bottom: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.standardFormRowBlock {
|
|
102
|
+
:global {
|
|
103
|
+
.ant-form-item,
|
|
104
|
+
div.ant-form-item-control-wrapper {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.standardFormRowGrid {
|
|
111
|
+
:global {
|
|
112
|
+
.ant-form-item,
|
|
113
|
+
div.ant-form-item-control-wrapper {
|
|
114
|
+
display: block;
|
|
115
|
+
}
|
|
116
|
+
.ant-form-item-label {
|
|
117
|
+
float: left;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
package/lib/Easy3wTree/index.js
CHANGED
|
@@ -38,26 +38,28 @@ var _tree2 = _interopRequireDefault(_tree);
|
|
|
38
38
|
|
|
39
39
|
require('antd/lib/tree/style');
|
|
40
40
|
|
|
41
|
+
var _easy3wui = require('easy3wui');
|
|
42
|
+
|
|
41
43
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
42
44
|
|
|
43
45
|
var Search = _input2['default'].Search;
|
|
44
46
|
var TreeNode = _tree2['default'].TreeNode;
|
|
45
47
|
|
|
46
|
-
/**
|
|
47
|
-
* props参数
|
|
48
|
-
* arrData: 树数据源 必须 Array
|
|
49
|
-
* objTreeProps: 树配置参数 非必须 Object
|
|
50
|
-
* 另加属性:touchRenderNode, titleField = 'title', countField = 'count', keyField = 'key'
|
|
51
|
-
* touchRenderNode: 自定义渲染节点 非必须 Function 返回值:{ title, count, key, isLeaf, expanded, selected, loading }
|
|
52
|
-
* titleField: 节点标题字段 非必须 String 默认值:'title'
|
|
53
|
-
* countField: 节点计数字段 非必须 String 默认值:'count'
|
|
54
|
-
* keyField: 节点key字段 非必须 String 默认值:'key'
|
|
55
|
-
* objSearchProps: 搜索配置参数 非必须 Object
|
|
56
|
-
* 另加属性:searchFlag = true, onSearchCallback
|
|
57
|
-
* searchFlag: 是否开启搜索功能 非必须 Boolean 默认值:true
|
|
58
|
-
* onSearchCallback: 搜索回调函数 非必须 Function 返回值:(arrDataVisible, searchValue, expandedKeys)
|
|
59
|
-
* bidPureComponent: 绑定组件方法 非必须 Function
|
|
60
|
-
* intUpdateCount: 数据更新次数 必须 Number
|
|
48
|
+
/**
|
|
49
|
+
* props参数
|
|
50
|
+
* arrData: 树数据源 必须 Array
|
|
51
|
+
* objTreeProps: 树配置参数 非必须 Object
|
|
52
|
+
* 另加属性:touchRenderNode, titleField = 'title', countField = 'count', keyField = 'key'
|
|
53
|
+
* touchRenderNode: 自定义渲染节点 非必须 Function 返回值:{ title, count, key, isLeaf, expanded, selected, loading }
|
|
54
|
+
* titleField: 节点标题字段 非必须 String 默认值:'title'
|
|
55
|
+
* countField: 节点计数字段 非必须 String 默认值:'count'
|
|
56
|
+
* keyField: 节点key字段 非必须 String 默认值:'key'
|
|
57
|
+
* objSearchProps: 搜索配置参数 非必须 Object
|
|
58
|
+
* 另加属性:searchFlag = true, onSearchCallback
|
|
59
|
+
* searchFlag: 是否开启搜索功能 非必须 Boolean 默认值:true
|
|
60
|
+
* onSearchCallback: 搜索回调函数 非必须 Function 返回值:(arrDataVisible, searchValue, expandedKeys)
|
|
61
|
+
* bidPureComponent: 绑定组件方法 非必须 Function
|
|
62
|
+
* intUpdateCount: 数据更新次数 必须 Number
|
|
61
63
|
*/
|
|
62
64
|
|
|
63
65
|
var Easy3wTree = function (_Component) {
|
|
@@ -64,6 +64,8 @@ require('antd/lib/modal/style');
|
|
|
64
64
|
|
|
65
65
|
var _comonConfig = require('comonConfigPath/comonConfig');
|
|
66
66
|
|
|
67
|
+
var _easy3wui = require('easy3wui');
|
|
68
|
+
|
|
67
69
|
var _Easy3wGetCookie = require('../Easy3wGetCookie');
|
|
68
70
|
|
|
69
71
|
var _Easy3wGetCookie2 = _interopRequireDefault(_Easy3wGetCookie);
|
|
@@ -163,26 +165,33 @@ var Easy3wUpload = function (_Component) {
|
|
|
163
165
|
accept = _props.accept,
|
|
164
166
|
required = _props.required,
|
|
165
167
|
initialValue = _props.initialValue,
|
|
166
|
-
help = _props.help,
|
|
167
|
-
buttonName = _props.buttonName,
|
|
168
168
|
form = _props.form,
|
|
169
169
|
isRead = _props.isRead,
|
|
170
|
-
label = _props.label,
|
|
171
170
|
className = _props.className,
|
|
172
171
|
labelCol = _props.labelCol,
|
|
173
172
|
wrapperCol = _props.wrapperCol,
|
|
174
|
-
extend = _props.extend,
|
|
175
|
-
extendBack = _props.extendBack,
|
|
176
173
|
uploadDoneCallback = _props.uploadDoneCallback,
|
|
177
174
|
removeCallback = _props.removeCallback,
|
|
178
175
|
hadUpdBtn = _props.hadUpdBtn,
|
|
179
176
|
propsAFlag = _props.propsAFlag,
|
|
180
177
|
fileViewFlag = _props.fileViewFlag;
|
|
178
|
+
var _props2 = this.props,
|
|
179
|
+
help = _props2.help,
|
|
180
|
+
buttonName = _props2.buttonName,
|
|
181
|
+
label = _props2.label,
|
|
182
|
+
extend = _props2.extend,
|
|
183
|
+
extendBack = _props2.extendBack,
|
|
184
|
+
warnMessage = _props2.warnMessage;
|
|
185
|
+
|
|
186
|
+
help = (0, _easy3wui.Easy3wI18N)(help);
|
|
187
|
+
buttonName = (0, _easy3wui.Easy3wI18N)(buttonName);
|
|
188
|
+
label = (0, _easy3wui.Easy3wI18N)(label);
|
|
189
|
+
extend = (0, _easy3wui.Easy3wI18N)(extend);
|
|
190
|
+
extendBack = (0, _easy3wui.Easy3wI18N)(extendBack);
|
|
191
|
+
warnMessage = (0, _easy3wui.Easy3wI18N)(warnMessage);
|
|
181
192
|
var limitSize = this.props.limitSize;
|
|
182
193
|
|
|
183
194
|
limitSize = limitSize || maxSize || 200;
|
|
184
|
-
var warnMessage = this.props.warnMessage;
|
|
185
|
-
|
|
186
195
|
var iniVal = [];
|
|
187
196
|
if (initialValue) {
|
|
188
197
|
iniVal = initialValue.map(function (obj) {
|
|
@@ -260,28 +269,28 @@ var Easy3wUpload = function (_Component) {
|
|
|
260
269
|
if (name.length > 100) {
|
|
261
270
|
_modal2['default'].info({
|
|
262
271
|
style: { top: '38%' },
|
|
263
|
-
okText: '
|
|
264
|
-
content: '
|
|
272
|
+
okText: (0, _easy3wui.Easy3wI18N)('Easy3wUI:知道了'),
|
|
273
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:文件名至多100个字符')
|
|
265
274
|
});
|
|
266
275
|
return false;
|
|
267
276
|
}
|
|
268
277
|
if (!fileTypePass) {
|
|
269
278
|
_modal2['default'].error({
|
|
270
279
|
style: { top: '38%' },
|
|
271
|
-
content: '
|
|
280
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:不支持fileType类型的文件!', { fileType: fileType })
|
|
272
281
|
});
|
|
273
282
|
return false;
|
|
274
283
|
}
|
|
275
284
|
if (!isLimitSize) {
|
|
276
285
|
_modal2['default'].error({
|
|
277
286
|
style: { top: '38%' },
|
|
278
|
-
content: '
|
|
287
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件必须小于limitSizeMB!', { limitSize: limitSize })
|
|
279
288
|
});
|
|
280
289
|
return false;
|
|
281
290
|
} else if (fileSize === 0) {
|
|
282
291
|
_modal2['default'].error({
|
|
283
292
|
style: { top: '38%' },
|
|
284
|
-
content: '
|
|
293
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件必须大于0MB!')
|
|
285
294
|
});
|
|
286
295
|
return false;
|
|
287
296
|
} else {
|
|
@@ -347,7 +356,7 @@ var Easy3wUpload = function (_Component) {
|
|
|
347
356
|
if (status === 'error') {
|
|
348
357
|
_modal2['default'].error({
|
|
349
358
|
style: { top: '38%' },
|
|
350
|
-
content: '
|
|
359
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件name上传失败!', { name: name })
|
|
351
360
|
});
|
|
352
361
|
return false; // 上传失败
|
|
353
362
|
}
|
|
@@ -363,7 +372,7 @@ var Easy3wUpload = function (_Component) {
|
|
|
363
372
|
} else {
|
|
364
373
|
_modal2['default'].error({
|
|
365
374
|
style: { top: '38%' },
|
|
366
|
-
content: '
|
|
375
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件name上传失败!', { name: name })
|
|
367
376
|
});
|
|
368
377
|
}
|
|
369
378
|
return false;
|
|
@@ -506,8 +515,8 @@ Easy3wUpload.defaultProps = {
|
|
|
506
515
|
// limitSizeDefault: 200,
|
|
507
516
|
urlUpFileService: '',
|
|
508
517
|
urlDownloadFile: '',
|
|
509
|
-
buttonName: '
|
|
510
|
-
help: '
|
|
518
|
+
buttonName: (0, _easy3wui.Easy3wI18N)('Easy3wUI:上传'),
|
|
519
|
+
help: (0, _easy3wui.Easy3wI18N)('Easy3wUI:请上传附件'),
|
|
511
520
|
required: true,
|
|
512
521
|
isRead: false,
|
|
513
522
|
label: '',
|
|
@@ -78,6 +78,8 @@ require('antd/lib/modal/style');
|
|
|
78
78
|
|
|
79
79
|
var _comonConfig = require('comonConfigPath/comonConfig');
|
|
80
80
|
|
|
81
|
+
var _easy3wui = require('easy3wui');
|
|
82
|
+
|
|
81
83
|
var _Easy3wDownLoad = require('../Easy3wDownLoad');
|
|
82
84
|
|
|
83
85
|
var _Easy3wDownLoad2 = _interopRequireDefault(_Easy3wDownLoad);
|
|
@@ -189,11 +191,8 @@ var BigFileUpload = function (_Component) {
|
|
|
189
191
|
listType = _props.listType,
|
|
190
192
|
accept = _props.accept,
|
|
191
193
|
required = _props.required,
|
|
192
|
-
help = _props.help,
|
|
193
|
-
buttonName = _props.buttonName,
|
|
194
194
|
form = _props.form,
|
|
195
195
|
isRead = _props.isRead,
|
|
196
|
-
label = _props.label,
|
|
197
196
|
className = _props.className,
|
|
198
197
|
labelCol = _props.labelCol,
|
|
199
198
|
wrapperCol = _props.wrapperCol,
|
|
@@ -204,7 +203,15 @@ var BigFileUpload = function (_Component) {
|
|
|
204
203
|
removeCallback = _props.removeCallback,
|
|
205
204
|
propsAFlag = _props.propsAFlag,
|
|
206
205
|
fileViewFlag = _props.fileViewFlag;
|
|
207
|
-
var
|
|
206
|
+
var _props2 = this.props,
|
|
207
|
+
maxFileSize = _props2.maxFileSize,
|
|
208
|
+
help = _props2.help,
|
|
209
|
+
buttonName = _props2.buttonName,
|
|
210
|
+
label = _props2.label;
|
|
211
|
+
|
|
212
|
+
help = (0, _easy3wui.Easy3wI18N)(help);
|
|
213
|
+
buttonName = (0, _easy3wui.Easy3wI18N)(buttonName);
|
|
214
|
+
label = (0, _easy3wui.Easy3wI18N)(label);
|
|
208
215
|
var _state = this.state,
|
|
209
216
|
preUploading = _state.preUploading,
|
|
210
217
|
uploadPercent = _state.uploadPercent,
|
|
@@ -305,21 +312,21 @@ var BigFileUpload = function (_Component) {
|
|
|
305
312
|
if (!fileTypePass) {
|
|
306
313
|
_modal2['default'].error({
|
|
307
314
|
style: { top: '38%' },
|
|
308
|
-
content: '
|
|
315
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:不支持fileType类型的文件!', { fileType: fileType })
|
|
309
316
|
});
|
|
310
317
|
return false;
|
|
311
318
|
}
|
|
312
319
|
if (file.size === 0) {
|
|
313
320
|
_modal2['default'].error({
|
|
314
321
|
style: { top: '38%' },
|
|
315
|
-
content: '
|
|
322
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件必须大于0MB!')
|
|
316
323
|
});
|
|
317
324
|
return false;
|
|
318
325
|
}
|
|
319
326
|
if (maxFileSize && maxFileSize > 0 && file.size / 1024 / 1024 > maxFileSize) {
|
|
320
327
|
_modal2['default'].error({
|
|
321
328
|
style: { top: '38%' },
|
|
322
|
-
content: '
|
|
329
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:附件必须小于maxFileSizeMB!', { maxFileSize: maxFileSize })
|
|
323
330
|
});
|
|
324
331
|
return false;
|
|
325
332
|
}
|
|
@@ -456,7 +463,7 @@ var BigFileUpload = function (_Component) {
|
|
|
456
463
|
'span',
|
|
457
464
|
{ style: { margin: '10px auto', color: '#1890ff' } },
|
|
458
465
|
currentFile ? currentFile.name : '',
|
|
459
|
-
'
|
|
466
|
+
(0, _easy3wui.Easy3wI18N)('Easy3wUI:文件读取中...')
|
|
460
467
|
),
|
|
461
468
|
_react2['default'].createElement(
|
|
462
469
|
'div',
|
|
@@ -471,9 +478,7 @@ var BigFileUpload = function (_Component) {
|
|
|
471
478
|
'span',
|
|
472
479
|
{ style: { margin: '10px auto', color: '#1890ff' } },
|
|
473
480
|
currentFile ? currentFile.name : '',
|
|
474
|
-
'
|
|
475
|
-
Math.floor(this.state.speed / 1024),
|
|
476
|
-
'KB/S)'
|
|
481
|
+
(0, _easy3wui.Easy3wI18N)('Easy3wUI:文件上传中(speed KB/S)', { speed: Math.floor(this.state.speed / 1024) })
|
|
477
482
|
),
|
|
478
483
|
this.state.chunkProgressStatus === 'exception' ? _react2['default'].createElement(
|
|
479
484
|
'div',
|
|
@@ -518,8 +523,8 @@ BigFileUpload.defaultProps = {
|
|
|
518
523
|
listType: 'text',
|
|
519
524
|
accept: '',
|
|
520
525
|
limitChunkSize: 1024 * 1024, // 不限定单位 默认单位byte 1024KB
|
|
521
|
-
buttonName: '
|
|
522
|
-
help: '
|
|
526
|
+
buttonName: (0, _easy3wui.Easy3wI18N)('Easy3wUI:选择附件'),
|
|
527
|
+
help: (0, _easy3wui.Easy3wI18N)('Easy3wUI:请上传附件'),
|
|
523
528
|
required: true,
|
|
524
529
|
isRead: false,
|
|
525
530
|
label: '',
|
|
@@ -556,9 +561,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
556
561
|
this.setUploadValue = function (v) {
|
|
557
562
|
var _setFieldsValue;
|
|
558
563
|
|
|
559
|
-
var
|
|
560
|
-
form =
|
|
561
|
-
name =
|
|
564
|
+
var _props3 = _this3.props,
|
|
565
|
+
form = _props3.form,
|
|
566
|
+
name = _props3.name;
|
|
562
567
|
var setFieldsValue = form.setFieldsValue;
|
|
563
568
|
|
|
564
569
|
setFieldsValue((_setFieldsValue = {}, _setFieldsValue[name] = v, _setFieldsValue));
|
|
@@ -627,12 +632,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
627
632
|
|
|
628
633
|
var formData = new FormData();
|
|
629
634
|
var authToken = Easy3wGetCookie('userToken') || '40572da23bee5fd59cc5b6c8d8bfb36d';
|
|
630
|
-
var
|
|
631
|
-
sendData =
|
|
632
|
-
name =
|
|
633
|
-
urlCheckProgress =
|
|
634
|
-
urlDownloadFile =
|
|
635
|
-
uploadDoneCallback =
|
|
635
|
+
var _props4 = _this3.props,
|
|
636
|
+
sendData = _props4.sendData,
|
|
637
|
+
name = _props4.name,
|
|
638
|
+
urlCheckProgress = _props4.urlCheckProgress,
|
|
639
|
+
urlDownloadFile = _props4.urlDownloadFile,
|
|
640
|
+
uploadDoneCallback = _props4.uploadDoneCallback;
|
|
636
641
|
|
|
637
642
|
var sendDataNew = sendData || {};
|
|
638
643
|
formData.append('sendTime', new Date().getTime());
|
|
@@ -663,12 +668,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
663
668
|
if (err.timeout) {
|
|
664
669
|
_modal2['default'].error({
|
|
665
670
|
style: { top: '38%' },
|
|
666
|
-
content: '
|
|
671
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:网络超时,currentFile.name上传失败,请检查网络后,重新续传。', { name: currentFile.name })
|
|
667
672
|
});
|
|
668
673
|
} else {
|
|
669
674
|
_modal2['default'].error({
|
|
670
675
|
style: { top: '38%' },
|
|
671
|
-
content: currentFile.name
|
|
676
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:currentFile.name上传失败,存在服务请求异常,请重试', { name: currentFile.name })
|
|
672
677
|
});
|
|
673
678
|
}
|
|
674
679
|
return;
|
|
@@ -772,14 +777,14 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
772
777
|
var uploadFileReader = new FileReader();
|
|
773
778
|
var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
|
774
779
|
var chunkCheckErr = false;
|
|
775
|
-
var
|
|
776
|
-
name =
|
|
777
|
-
limitChunkSize =
|
|
778
|
-
sendData =
|
|
779
|
-
uploadCallback =
|
|
780
|
-
uploadDoneCallback =
|
|
781
|
-
urlUpBigFileGeneral =
|
|
782
|
-
urlDownloadFile =
|
|
780
|
+
var _props5 = _this3.props,
|
|
781
|
+
name = _props5.name,
|
|
782
|
+
limitChunkSize = _props5.limitChunkSize,
|
|
783
|
+
sendData = _props5.sendData,
|
|
784
|
+
uploadCallback = _props5.uploadCallback,
|
|
785
|
+
uploadDoneCallback = _props5.uploadDoneCallback,
|
|
786
|
+
urlUpBigFileGeneral = _props5.urlUpBigFileGeneral,
|
|
787
|
+
urlDownloadFile = _props5.urlDownloadFile;
|
|
783
788
|
|
|
784
789
|
var sendDataNew = sendData || {};
|
|
785
790
|
var chunkSize = 0;
|
|
@@ -857,13 +862,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
857
862
|
if (err.timeout) {
|
|
858
863
|
_modal2['default'].error({
|
|
859
864
|
style: { top: '38%' },
|
|
860
|
-
content: '
|
|
865
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:网络超时,currentFile.name上传失败,请检查网络后,重新续传。', { name: currentFile.name })
|
|
861
866
|
});
|
|
862
867
|
_this3.dequeueAndProcessNext();
|
|
863
868
|
} else {
|
|
864
869
|
_modal2['default'].error({
|
|
865
870
|
style: { top: '38%' },
|
|
866
|
-
content: currentFile.name
|
|
871
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:currentFile.name上传失败,存在服务请求异常,请重试', { name: currentFile.name })
|
|
867
872
|
});
|
|
868
873
|
_this3.dequeueAndProcessNext();
|
|
869
874
|
}
|
|
@@ -942,12 +947,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
942
947
|
if (checkStatus !== '1') {
|
|
943
948
|
_modal2['default'].error({
|
|
944
949
|
style: { top: '38%' },
|
|
945
|
-
content: currentFile.name
|
|
950
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:currentFile.name文件完整性验证失败:可能由于网络丢包原因,您上传的附件未通过完整性校验,需要您重新上传。', { name: currentFile.name })
|
|
946
951
|
});
|
|
947
952
|
} else {
|
|
948
953
|
_modal2['default'].error({
|
|
949
954
|
style: { top: '38%' },
|
|
950
|
-
content: currentFile.name
|
|
955
|
+
content: (0, _easy3wui.Easy3wI18N)('Easy3wUI:currentFile.name文件上传失败', { name: currentFile.name })
|
|
951
956
|
});
|
|
952
957
|
}
|
|
953
958
|
var _index3 = _fileList3.indexOf(currentFile);
|
|
@@ -983,7 +988,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
983
988
|
} else {
|
|
984
989
|
_modal2['default'].error({
|
|
985
990
|
style: { top: '38%' },
|
|
986
|
-
content: res && res.body.rspMsg ? res.body.rspMsg : currentFile.name
|
|
991
|
+
content: res && res.body.rspMsg ? res.body.rspMsg : (0, _easy3wui.Easy3wI18N)('Easy3wUI:currentFile.name文件上传失败', { name: currentFile.name })
|
|
987
992
|
});
|
|
988
993
|
var _fileList4 = _this3.state.fileList;
|
|
989
994
|
|
|
@@ -1038,9 +1043,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1038
1043
|
this.readFile = function (file) {
|
|
1039
1044
|
try {
|
|
1040
1045
|
var chunkReader = new FileReader();
|
|
1041
|
-
var
|
|
1042
|
-
limitChunkSize =
|
|
1043
|
-
readFileSize =
|
|
1046
|
+
var _props6 = _this3.props,
|
|
1047
|
+
limitChunkSize = _props6.limitChunkSize,
|
|
1048
|
+
readFileSize = _props6.readFileSize;
|
|
1044
1049
|
// ...对文件的预处理
|
|
1045
1050
|
// 兼容性的处理
|
|
1046
1051
|
|