fmui-base 2.3.22 → 2.3.23
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 +1 -0
- package/lib/comment_list/List.js +33 -6
- package/lib/comment_list/List.less +43 -0
- package/lib/process_info/processInfo.js +117 -10
- package/lib/process_list/processList.js +19 -5
- package/lib/upload/upload.js +39 -20
- package/lib/upload/upload.less +345 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/comment_list/List.js
CHANGED
|
@@ -280,14 +280,38 @@ var PageHome = function (_React$Component) {
|
|
|
280
280
|
value: function view(file) {
|
|
281
281
|
var id = file.id;
|
|
282
282
|
if (this.state.viewType == 'view') {
|
|
283
|
-
// var isLoadWatermark = this.props.isLoadWatermark;
|
|
284
|
-
// var allowDownLoad = this.props.allowDownLoad;
|
|
285
283
|
var fileExt = file.fileExt;
|
|
286
284
|
downloadFile(id, 'android', fileExt);
|
|
287
285
|
} else {
|
|
288
286
|
downloadFile(id);
|
|
289
287
|
}
|
|
290
288
|
}
|
|
289
|
+
|
|
290
|
+
//下载批示意见附件
|
|
291
|
+
|
|
292
|
+
}, {
|
|
293
|
+
key: 'downloadAttach',
|
|
294
|
+
value: function downloadAttach(file, e) {
|
|
295
|
+
if (e && e.stopPropagation) {
|
|
296
|
+
e.stopPropagation();
|
|
297
|
+
}
|
|
298
|
+
if (e && e.preventDefault) {
|
|
299
|
+
e.preventDefault();
|
|
300
|
+
}
|
|
301
|
+
// 公众号不支持下载
|
|
302
|
+
if (getLoginUserInfo().thirdMenuType == 'WeChat') {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
var id = file.id;
|
|
306
|
+
var fileExt = file.fileExt;
|
|
307
|
+
if (typeof downloadFile === 'function') {
|
|
308
|
+
try {
|
|
309
|
+
downloadFile(id, 'download', fileExt);
|
|
310
|
+
} catch (err) {
|
|
311
|
+
downloadFile(id);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
291
315
|
}, {
|
|
292
316
|
key: 'getCommentSign',
|
|
293
317
|
value: function getCommentSign(item) {
|
|
@@ -382,7 +406,7 @@ var PageHome = function (_React$Component) {
|
|
|
382
406
|
),
|
|
383
407
|
_react2.default.createElement(
|
|
384
408
|
'div',
|
|
385
|
-
{ className: '' },
|
|
409
|
+
{ className: 'comment-attach-list' },
|
|
386
410
|
item.fileList && item.fileList.length > 0 ? item.fileList.map(function (item2, i) {
|
|
387
411
|
function calculate(no) {
|
|
388
412
|
var a = no / 1024;
|
|
@@ -395,9 +419,10 @@ var PageHome = function (_React$Component) {
|
|
|
395
419
|
}
|
|
396
420
|
return Math.round(b * 100) / 100 + 'MB';
|
|
397
421
|
}
|
|
422
|
+
var showDownload = getLoginUserInfo().thirdMenuType != 'WeChat';
|
|
398
423
|
return _react2.default.createElement(
|
|
399
424
|
'div',
|
|
400
|
-
{ className: 't-FBH', key: i },
|
|
425
|
+
{ className: 't-FBH comment-attach-item', key: i },
|
|
401
426
|
_react2.default.createElement(
|
|
402
427
|
'div',
|
|
403
428
|
{ className: 'dd-t-border t-P6 t-MB10 t-FB1', onClick: t.view.bind(t, item2) },
|
|
@@ -407,7 +432,7 @@ var PageHome = function (_React$Component) {
|
|
|
407
432
|
{ className: 'dd-t-list-text-content' },
|
|
408
433
|
_react2.default.createElement(
|
|
409
434
|
'div',
|
|
410
|
-
{ className: 't-list-title
|
|
435
|
+
{ className: 't-list-title comment-attach-name t-LH1_4' },
|
|
411
436
|
typeof item2.fileDisplayName == 'undefined' ? item2.name : item2.fileDisplayName
|
|
412
437
|
),
|
|
413
438
|
_react2.default.createElement(
|
|
@@ -416,7 +441,9 @@ var PageHome = function (_React$Component) {
|
|
|
416
441
|
calculate(typeof item2.fileSize == 'undefined' ? item2.size : item2.fileSize)
|
|
417
442
|
)
|
|
418
443
|
)
|
|
419
|
-
)
|
|
444
|
+
),
|
|
445
|
+
_react2.default.createElement('i', { className: showDownload ? 'iconfont icon-download1 comment-attach-download' : 't-DN',
|
|
446
|
+
onClick: t.downloadAttach.bind(t, item2) })
|
|
420
447
|
);
|
|
421
448
|
}) : ""
|
|
422
449
|
),
|
|
@@ -4,3 +4,46 @@
|
|
|
4
4
|
.t-FBH.flex-comment.t-field-box{
|
|
5
5
|
padding-right:0px;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
/* 批示意见附件:名称完整换行显示 */
|
|
9
|
+
.comment-attach-list {
|
|
10
|
+
.comment-attach-item {
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.comment-attach-name,
|
|
15
|
+
.t-list-title.comment-attach-name {
|
|
16
|
+
display: block !important;
|
|
17
|
+
white-space: normal !important;
|
|
18
|
+
word-break: break-all !important;
|
|
19
|
+
overflow-wrap: break-word !important;
|
|
20
|
+
word-wrap: break-word !important;
|
|
21
|
+
overflow: visible !important;
|
|
22
|
+
text-overflow: clip !important;
|
|
23
|
+
-webkit-line-clamp: unset !important;
|
|
24
|
+
line-clamp: unset !important;
|
|
25
|
+
-webkit-box-orient: horizontal !important;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
line-height: 1.4;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dd-t-list-text-content {
|
|
31
|
+
min-width: 0;
|
|
32
|
+
overflow: visible;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* 与表单附件下载按钮保持一致:普通图标,无蓝色圆底 */
|
|
36
|
+
.comment-attach-download {
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
margin-right: 5px;
|
|
39
|
+
margin-top: 8px;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
background: transparent;
|
|
42
|
+
color: inherit;
|
|
43
|
+
width: auto;
|
|
44
|
+
height: auto;
|
|
45
|
+
line-height: inherit;
|
|
46
|
+
border-radius: 0;
|
|
47
|
+
text-align: center;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -445,6 +445,7 @@ var PageHome = function (_React$Component) {
|
|
|
445
445
|
circulateNodePersonValue: [], //传阅节点选择的用户
|
|
446
446
|
forwardNodePersonValue: [], //转发节点选择的用户
|
|
447
447
|
circulatePersonValue: [], //通过传阅的用户
|
|
448
|
+
circulateReason: '', //传阅原因
|
|
448
449
|
chaoSongPersonValue: [], //邮件转发抄送的用户
|
|
449
450
|
sendMailPersonValue: [], //邮件转发选择的用户
|
|
450
451
|
buttonList: [], //待办按钮列表
|
|
@@ -902,8 +903,30 @@ var PageHome = function (_React$Component) {
|
|
|
902
903
|
if (content.subProcessType && typeof content.subProcessType != "undefined") {
|
|
903
904
|
subProcessType = content.subProcessType;
|
|
904
905
|
}
|
|
905
|
-
|
|
906
|
-
|
|
906
|
+
// 办理缓急默认(与 PC 对齐):
|
|
907
|
+
// 发起/草稿/发起人:流程配置 processUrgency 优先
|
|
908
|
+
// 待办等:实例 urgency(非默认50)> processUrgency > 实例 urgency > 50
|
|
909
|
+
var processUrgencyVal = '';
|
|
910
|
+
if (content.processUrgency && typeof content.processUrgency != "undefined" && content.processUrgency != '') {
|
|
911
|
+
processUrgencyVal = String(content.processUrgency);
|
|
912
|
+
}
|
|
913
|
+
var instanceUrgency = '';
|
|
914
|
+
if (content.urgency != null && typeof content.urgency != "undefined" && content.urgency !== '') {
|
|
915
|
+
instanceUrgency = String(content.urgency);
|
|
916
|
+
}
|
|
917
|
+
var listTypeForUrgency = t.state && t.state.listType != null ? String(t.state.listType) : '';
|
|
918
|
+
var startLike = listTypeForUrgency === '5' || content.isStart == 'true' || content.isStart === true || content.isStart === 'true' || content.permissionCode == 'start' || content.owntype == 'initiator' || content.ownType == 'initiator';
|
|
919
|
+
// 与 PC 对齐:发起/发起人节点流程配置优先;其他待办非默认50用实例值,否则回落流程配置
|
|
920
|
+
if (startLike && processUrgencyVal) {
|
|
921
|
+
urgency = processUrgencyVal;
|
|
922
|
+
} else if (instanceUrgency && instanceUrgency !== '50') {
|
|
923
|
+
urgency = instanceUrgency;
|
|
924
|
+
} else if (processUrgencyVal) {
|
|
925
|
+
urgency = processUrgencyVal;
|
|
926
|
+
} else if (instanceUrgency) {
|
|
927
|
+
urgency = instanceUrgency;
|
|
928
|
+
} else {
|
|
929
|
+
urgency = '50';
|
|
907
930
|
}
|
|
908
931
|
if (content.backInitiatorEndFlow && typeof content.backInitiatorEndFlow != "undefined") {
|
|
909
932
|
backInitiatorEndFlow = content.backInitiatorEndFlow;
|
|
@@ -915,7 +938,18 @@ var PageHome = function (_React$Component) {
|
|
|
915
938
|
urgencyList = content.urgencyList;
|
|
916
939
|
if (urgencyList.length > 0) {
|
|
917
940
|
for (var i = 0; i < urgencyList.length; i++) {
|
|
918
|
-
|
|
941
|
+
// 兼容 value / urgencyCode,统一转字符串比较
|
|
942
|
+
var optCode = urgencyList[i].value;
|
|
943
|
+
if (optCode == null || optCode === '') {
|
|
944
|
+
optCode = urgencyList[i].urgencyCode;
|
|
945
|
+
}
|
|
946
|
+
if (optCode != null && optCode !== '' && !urgencyList[i].value) {
|
|
947
|
+
urgencyList[i].value = optCode;
|
|
948
|
+
}
|
|
949
|
+
if (optCode != null && urgencyList[i].urgencyName && !urgencyList[i].text) {
|
|
950
|
+
urgencyList[i].text = urgencyList[i].urgencyName;
|
|
951
|
+
}
|
|
952
|
+
if (String(urgency) === String(optCode)) {
|
|
919
953
|
urgentSelectList = urgencyList[i];
|
|
920
954
|
}
|
|
921
955
|
}
|
|
@@ -1322,6 +1356,22 @@ var PageHome = function (_React$Component) {
|
|
|
1322
1356
|
details.fullMessage = details.operationDetails;
|
|
1323
1357
|
commentBackAlert.push(content.details);
|
|
1324
1358
|
}
|
|
1359
|
+
var readtype = content.readtype;
|
|
1360
|
+
if (!readtype) {
|
|
1361
|
+
readtype = "2";
|
|
1362
|
+
}
|
|
1363
|
+
// 待阅传阅原因:与退回原因弹窗完全一致(CommentList + Dialog)
|
|
1364
|
+
var listTypeForReason = t.state && t.state.listType != null ? String(t.state.listType) : '';
|
|
1365
|
+
if ((readtype == '1' || listTypeForReason === '1') && content.circulateReason && content.circulateReason != 'null' && commentBackAlert.length == 0) {
|
|
1366
|
+
titleCommentBackAlert = '传阅原因';
|
|
1367
|
+
commentBackAlert.push({
|
|
1368
|
+
type: 'text',
|
|
1369
|
+
inscriptionShow: 'userName,date',
|
|
1370
|
+
userName: content.circulateSenderName || '',
|
|
1371
|
+
time: content.circulateTime || '',
|
|
1372
|
+
fullMessage: content.circulateReason
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1325
1375
|
//退回意见弹框
|
|
1326
1376
|
// var commentBackAlert = [{
|
|
1327
1377
|
// "type":"text",
|
|
@@ -1356,10 +1406,6 @@ var PageHome = function (_React$Component) {
|
|
|
1356
1406
|
commentDefaultList.push(commentItem);
|
|
1357
1407
|
}
|
|
1358
1408
|
}
|
|
1359
|
-
var readtype = content.readtype;
|
|
1360
|
-
if (!readtype) {
|
|
1361
|
-
readtype = "2";
|
|
1362
|
-
}
|
|
1363
1409
|
|
|
1364
1410
|
//已办记录
|
|
1365
1411
|
var processLogList = content.processLogList;
|
|
@@ -1718,6 +1764,10 @@ var PageHome = function (_React$Component) {
|
|
|
1718
1764
|
if (buttonCode == 'PAGE_SAVE' || buttonCode == 'BASE_SUMBIT') {
|
|
1719
1765
|
buttonArrayNew.push(buttonCode);
|
|
1720
1766
|
}
|
|
1767
|
+
// 发起人已配置作废,且流程已有数据(退回/撤回到发起人)时显示作废
|
|
1768
|
+
if (buttonCode == 'BASE_INVALID' && dataId) {
|
|
1769
|
+
buttonArrayNew.push(buttonCode);
|
|
1770
|
+
}
|
|
1721
1771
|
} else {
|
|
1722
1772
|
if (buttonCode != '') {
|
|
1723
1773
|
buttonArrayNew.push(buttonCode);
|
|
@@ -1768,6 +1818,10 @@ var PageHome = function (_React$Component) {
|
|
|
1768
1818
|
//发起人撤销按钮
|
|
1769
1819
|
buttonList.push({ name: t.state.finalButtons.get("FLOW_REVOKE"), type: 'secondary', display: 'inline', no: 7 });
|
|
1770
1820
|
}
|
|
1821
|
+
// 发起人配置了作废,且流程在发起人节点时(退回/撤回后)可作废
|
|
1822
|
+
if (startButtons.indexOf('BASE_INVALID') >= 0 && (isStart == true || isStart == 'true')) {
|
|
1823
|
+
buttonList.push({ name: t.state.finalButtons.get("BASE_INVALID"), type: 'danger', display: 'inline', no: 9 });
|
|
1824
|
+
}
|
|
1771
1825
|
}
|
|
1772
1826
|
if (t.state.urgeDataList != null && t.state.urgeDataList.length > 0) {
|
|
1773
1827
|
buttonList.push({ name: t.state.finalButtons.get("PAGE_URGE"), type: 'secondary', display: 'inline', no: 12 });
|
|
@@ -1792,6 +1846,9 @@ var PageHome = function (_React$Component) {
|
|
|
1792
1846
|
if (buttonCode == 'PAGE_SAVE' || buttonCode == 'BASE_SUMBIT') {
|
|
1793
1847
|
buttonArrayNew.push(buttonCode);
|
|
1794
1848
|
}
|
|
1849
|
+
if (buttonCode == 'BASE_INVALID' && dataId) {
|
|
1850
|
+
buttonArrayNew.push(buttonCode);
|
|
1851
|
+
}
|
|
1795
1852
|
}
|
|
1796
1853
|
}
|
|
1797
1854
|
|
|
@@ -1801,6 +1858,8 @@ var PageHome = function (_React$Component) {
|
|
|
1801
1858
|
buttonList.push({ name: t.state.finalButtons.get("BASE_SUMBIT"), type: 'primary', display: 'inline', no: 1 });
|
|
1802
1859
|
} else if (buttonCode == 'PAGE_SAVE') {
|
|
1803
1860
|
buttonList.push({ name: t.state.finalButtons.get("PAGE_SAVE"), type: 'secondary', display: 'inline', no: 13 });
|
|
1861
|
+
} else if (buttonCode == 'BASE_INVALID') {
|
|
1862
|
+
buttonList.push({ name: t.state.finalButtons.get("BASE_INVALID"), type: 'danger', display: 'inline', no: 9 });
|
|
1804
1863
|
}
|
|
1805
1864
|
}
|
|
1806
1865
|
}
|
|
@@ -2931,7 +2990,8 @@ var PageHome = function (_React$Component) {
|
|
|
2931
2990
|
nextActivityList: nextActivityList,
|
|
2932
2991
|
pageStatus: '1',
|
|
2933
2992
|
operate: operate,
|
|
2934
|
-
//
|
|
2993
|
+
// 打开提交页时兜底回填办理缓急,避免取消后再进显示「无」
|
|
2994
|
+
urgentSelectList: t.state.urgentSelectList && (t.state.urgentSelectList.value || t.state.urgentSelectList.urgencyCode) ? t.state.urgentSelectList : t.resolveUrgentSelectList(t.state.urgent, t.state.urgencyList),
|
|
2935
2995
|
urgentList: urgentList,
|
|
2936
2996
|
urgentHidden: urgentHidden,
|
|
2937
2997
|
isEnd: isEnd,
|
|
@@ -6001,7 +6061,8 @@ var PageHome = function (_React$Component) {
|
|
|
6001
6061
|
formId: t.state.formId,
|
|
6002
6062
|
permissionCode: t.state.permissionCode,
|
|
6003
6063
|
processInstanceId: t.state.processInstanceId,
|
|
6004
|
-
shortMessage: circulateShortMessage
|
|
6064
|
+
shortMessage: circulateShortMessage,
|
|
6065
|
+
circulateReason: t.state.circulateReason || ''
|
|
6005
6066
|
}).then(function (content) {
|
|
6006
6067
|
_Toast2.default.show({
|
|
6007
6068
|
type: 'success',
|
|
@@ -7275,12 +7336,14 @@ var PageHome = function (_React$Component) {
|
|
|
7275
7336
|
}
|
|
7276
7337
|
this.refs["selectMember_mailsend"].dialogClearItem();
|
|
7277
7338
|
this.refs["selectMember_chaosong"].dialogClearItem();
|
|
7339
|
+
// 取消后恢复办理缓急选中,避免再次打开显示「无」
|
|
7340
|
+
var restoreUrgent = this.resolveUrgentSelectList(this.state.urgent, this.state.urgencyList);
|
|
7278
7341
|
this.setState({
|
|
7279
7342
|
pageStatus: '0',
|
|
7280
7343
|
operate: 0,
|
|
7281
7344
|
nextActivityList: [], //下一个活动节点列表
|
|
7282
7345
|
nextRadomList: [], //下一个随机节点
|
|
7283
|
-
urgentSelectList:
|
|
7346
|
+
urgentSelectList: restoreUrgent, //紧急选项(按当前 urgent 回填)
|
|
7284
7347
|
circulatePersonValue: [], //清空传阅人
|
|
7285
7348
|
sendMailPersonValue: [],
|
|
7286
7349
|
chaosongPersonValue: [],
|
|
@@ -7561,6 +7624,13 @@ var PageHome = function (_React$Component) {
|
|
|
7561
7624
|
circulateNodePersonValue: value
|
|
7562
7625
|
});
|
|
7563
7626
|
}
|
|
7627
|
+
}, {
|
|
7628
|
+
key: 'changeCirculateReason',
|
|
7629
|
+
value: function changeCirculateReason(value) {
|
|
7630
|
+
this.setState({
|
|
7631
|
+
circulateReason: value
|
|
7632
|
+
});
|
|
7633
|
+
}
|
|
7564
7634
|
|
|
7565
7635
|
//转发回调
|
|
7566
7636
|
|
|
@@ -8089,6 +8159,27 @@ var PageHome = function (_React$Component) {
|
|
|
8089
8159
|
});
|
|
8090
8160
|
}
|
|
8091
8161
|
}
|
|
8162
|
+
/** 按缓急编码从选项列表解析已选项(兼容 value / urgencyCode) */
|
|
8163
|
+
|
|
8164
|
+
}, {
|
|
8165
|
+
key: 'resolveUrgentSelectList',
|
|
8166
|
+
value: function resolveUrgentSelectList(urgencyCode, urgencyList) {
|
|
8167
|
+
var list = urgencyList || [];
|
|
8168
|
+
var code = urgencyCode != null && urgencyCode !== '' ? String(urgencyCode) : '';
|
|
8169
|
+
if (!code || list.length === 0) {
|
|
8170
|
+
return {};
|
|
8171
|
+
}
|
|
8172
|
+
for (var i = 0; i < list.length; i++) {
|
|
8173
|
+
var optCode = list[i].value;
|
|
8174
|
+
if (optCode == null || optCode === '') {
|
|
8175
|
+
optCode = list[i].urgencyCode;
|
|
8176
|
+
}
|
|
8177
|
+
if (optCode != null && String(optCode) === code) {
|
|
8178
|
+
return list[i];
|
|
8179
|
+
}
|
|
8180
|
+
}
|
|
8181
|
+
return {};
|
|
8182
|
+
}
|
|
8092
8183
|
}, {
|
|
8093
8184
|
key: 'changeJumpShortMessage',
|
|
8094
8185
|
value: function changeJumpShortMessage(data) {
|
|
@@ -8784,6 +8875,14 @@ var PageHome = function (_React$Component) {
|
|
|
8784
8875
|
isDelete: true,
|
|
8785
8876
|
onChange: this.getCirculatePerson.bind(this)
|
|
8786
8877
|
}),
|
|
8878
|
+
_react2.default.createElement(_TextareaField2.default, {
|
|
8879
|
+
readOnly: false,
|
|
8880
|
+
label: '传阅原因',
|
|
8881
|
+
required: false,
|
|
8882
|
+
minRows: 3, maxRows: 6,
|
|
8883
|
+
placeholder: '请输入传阅原因',
|
|
8884
|
+
value: this.state.circulateReason,
|
|
8885
|
+
onChange: this.changeCirculateReason.bind(this) }),
|
|
8787
8886
|
_react2.default.createElement(_CheckboxField2.default, {
|
|
8788
8887
|
data: this.state.readShortMessageList,
|
|
8789
8888
|
className: '',
|
|
@@ -9045,6 +9144,14 @@ var PageHome = function (_React$Component) {
|
|
|
9045
9144
|
isDelete: true,
|
|
9046
9145
|
onChange: this.circulateCallback.bind(this)
|
|
9047
9146
|
}),
|
|
9147
|
+
_react2.default.createElement(_TextareaField2.default, {
|
|
9148
|
+
readOnly: false,
|
|
9149
|
+
label: '传阅原因',
|
|
9150
|
+
required: false,
|
|
9151
|
+
minRows: 3, maxRows: 6,
|
|
9152
|
+
placeholder: '请输入传阅原因',
|
|
9153
|
+
value: this.state.circulateReason,
|
|
9154
|
+
onChange: this.changeCirculateReason.bind(this) }),
|
|
9048
9155
|
_react2.default.createElement(_CheckboxField2.default, {
|
|
9049
9156
|
data: this.state.readShortMessageList,
|
|
9050
9157
|
className: '',
|
|
@@ -722,7 +722,7 @@ var PageHome = function (_React$Component2) {
|
|
|
722
722
|
category: category
|
|
723
723
|
};
|
|
724
724
|
_this3.getTransactionTitleCount(module, "undo,unread", category);
|
|
725
|
-
_this3.getCategoryListByModule(module, category);
|
|
725
|
+
_this3.getCategoryListByModule(module, category, activeIndex);
|
|
726
726
|
/**
|
|
727
727
|
* 办理页面搜索框设置项
|
|
728
728
|
* @type {{locale: string, instantSearch: boolean, hasHistory: boolean, searchDelay: number, onEnter: (()), onExit: (()), onChange: ((p1:*)), onSearch: ((p1?:*))}}
|
|
@@ -802,6 +802,8 @@ var PageHome = function (_React$Component2) {
|
|
|
802
802
|
|
|
803
803
|
// 点击tab页签,关闭遮罩
|
|
804
804
|
$('.title-wrapper.active').click();
|
|
805
|
+
// 切换 Tab 时按当前列表重新拉取「有数据」的分类
|
|
806
|
+
this.getCategoryListByModule(this.state.module, this.state.category, active);
|
|
805
807
|
}
|
|
806
808
|
|
|
807
809
|
/**
|
|
@@ -827,21 +829,33 @@ var PageHome = function (_React$Component2) {
|
|
|
827
829
|
}
|
|
828
830
|
|
|
829
831
|
/**
|
|
830
|
-
*
|
|
832
|
+
* 获取分类(仅当前列表有数据的分类)
|
|
833
|
+
* @param listType 0待办/1待阅/2已办/3已阅/4我的,默认当前 Tab
|
|
831
834
|
*/
|
|
832
835
|
|
|
833
836
|
}, {
|
|
834
837
|
key: 'getCategoryListByModule',
|
|
835
|
-
value: function getCategoryListByModule(module, category) {
|
|
838
|
+
value: function getCategoryListByModule(module, category, listType) {
|
|
836
839
|
var _this5 = this;
|
|
837
840
|
|
|
838
841
|
var t = this;
|
|
842
|
+
var type = listType;
|
|
843
|
+
if (type === undefined || type === null || type === '') {
|
|
844
|
+
type = this.state.activeTabIndex;
|
|
845
|
+
}
|
|
839
846
|
_db2.default.FlowApproval.getCategoryListByModule({
|
|
840
847
|
module: module,
|
|
841
|
-
code: category
|
|
848
|
+
code: category,
|
|
849
|
+
listType: type
|
|
842
850
|
}).then(function (content) {
|
|
843
851
|
if (content) {
|
|
844
|
-
_this5.
|
|
852
|
+
_this5.setState({
|
|
853
|
+
categoryList: content
|
|
854
|
+
});
|
|
855
|
+
} else {
|
|
856
|
+
_this5.setState({
|
|
857
|
+
categoryList: []
|
|
858
|
+
});
|
|
845
859
|
}
|
|
846
860
|
}).catch(function (error) {
|
|
847
861
|
console.log(error);
|
package/lib/upload/upload.js
CHANGED
|
@@ -33,6 +33,8 @@ require('whatwg-fetch');
|
|
|
33
33
|
|
|
34
34
|
require('es6-promise');
|
|
35
35
|
|
|
36
|
+
require('./upload.less');
|
|
37
|
+
|
|
36
38
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
37
39
|
|
|
38
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -262,19 +264,28 @@ var PageHome = function (_React$Component) {
|
|
|
262
264
|
key: 'componentDidMount',
|
|
263
265
|
value: function componentDidMount() {
|
|
264
266
|
var t = this;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
267
|
+
try {
|
|
268
|
+
var param = {
|
|
269
|
+
name: 'file',
|
|
270
|
+
url: this.state.uploadUrl,
|
|
271
|
+
autoPending: true,
|
|
272
|
+
accept: t.state.accept,
|
|
273
|
+
multiple: true,
|
|
274
|
+
fileSizeLimit: t.state.fileSizeLimit
|
|
275
|
+
};
|
|
276
|
+
var up = this.getCore(param);
|
|
277
|
+
var picker = up.getPickerCollector();
|
|
278
|
+
var areaEl = document.getElementById('ddUploadPic' + t.state.keyNum);
|
|
279
|
+
if (areaEl) {
|
|
280
|
+
picker.addArea(areaEl);
|
|
281
|
+
}
|
|
282
|
+
} catch (e) {
|
|
283
|
+
console.log('upload picker init error:', e);
|
|
284
|
+
}
|
|
285
|
+
// 父级 ref 回调偶发未触发时,自行按 initIds 拉附件列表
|
|
286
|
+
if (this.props.initIds) {
|
|
287
|
+
this.initData();
|
|
288
|
+
}
|
|
278
289
|
}
|
|
279
290
|
}, {
|
|
280
291
|
key: 'getCore',
|
|
@@ -613,21 +624,29 @@ var PageHome = function (_React$Component) {
|
|
|
613
624
|
// t.props.onChange(initList);
|
|
614
625
|
if (res.ok) {
|
|
615
626
|
res.json().then(function (obj) {
|
|
616
|
-
|
|
627
|
+
// 接口常 HTTP 200 + body failure;data 非数组时不能 concat,否则渲染崩溃导致附件区空白
|
|
628
|
+
var objList = obj && obj.data ? obj.data : [];
|
|
629
|
+
if (!(objList instanceof Array)) {
|
|
630
|
+
objList = [];
|
|
631
|
+
}
|
|
632
|
+
if (obj && obj.type === 'failure') {
|
|
633
|
+
console.log('getAttachmentByIds failure:', obj.message || obj.code);
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
617
636
|
initList = initList.concat(objList);
|
|
618
637
|
if (t.props.onChange) {
|
|
619
|
-
|
|
638
|
+
// 初始化回填:传 '1',避免触发表单向上 onChange 导致重挂载丢列表
|
|
639
|
+
t.props.onChange(initList, '1');
|
|
620
640
|
}
|
|
621
641
|
t.setState({
|
|
622
642
|
initList: initList
|
|
623
643
|
});
|
|
624
|
-
// Get the JSON
|
|
625
644
|
});
|
|
626
645
|
} else if (res.status == 401) {
|
|
627
|
-
|
|
646
|
+
console.log('getAttachmentByIds 401');
|
|
628
647
|
}
|
|
629
648
|
}, function (e) {
|
|
630
|
-
|
|
649
|
+
console.log('getAttachmentByIds network error', e);
|
|
631
650
|
}).catch(function (error) {
|
|
632
651
|
console.log("错误:" + error);
|
|
633
652
|
});
|
|
@@ -731,7 +750,7 @@ var PageHome = function (_React$Component) {
|
|
|
731
750
|
_react2.default.createElement('i', { className: _this3.getIcon(item.fileExt) }),
|
|
732
751
|
_react2.default.createElement(
|
|
733
752
|
'div',
|
|
734
|
-
{ className: 't-list-title
|
|
753
|
+
{ className: 't-list-title upload-file-name t-LH1_4' },
|
|
735
754
|
typeof item.fileDisplayName == 'undefined' ? item.name : item.fileDisplayName
|
|
736
755
|
)
|
|
737
756
|
),
|
|
@@ -751,7 +770,7 @@ var PageHome = function (_React$Component) {
|
|
|
751
770
|
_react2.default.createElement('i', { className: _this3.getIcon(item.fileExt) }),
|
|
752
771
|
_react2.default.createElement(
|
|
753
772
|
'div',
|
|
754
|
-
{ className: 't-list-title
|
|
773
|
+
{ className: 't-list-title upload-file-name t-LH1_4' },
|
|
755
774
|
typeof item.fileDisplayName == 'undefined' ? item.name : item.fileDisplayName
|
|
756
775
|
)
|
|
757
776
|
),
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/* 上传组件基础样式(勿整文件覆盖,否则附件区会空白) */
|
|
2
|
+
.upload {
|
|
3
|
+
width: 100%;
|
|
4
|
+
text-align: left;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.upload .t-field-box {
|
|
9
|
+
padding-right: 10px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.upload-list {
|
|
13
|
+
margin: 5px 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.upload-list-item {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 100%;
|
|
20
|
+
padding: 5px 10px 5px 10px;
|
|
21
|
+
border-radius: 5px;
|
|
22
|
+
background: #f5f5f5;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.upload-list-item-content {
|
|
26
|
+
max-width: 85%;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.upload-name-icon {
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.upload-icon {
|
|
40
|
+
margin-left: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.upload-list-item .icon-delete {
|
|
44
|
+
margin-left: auto;
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
color: #fa5151;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.upload-list-item .t-list-title {
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
color: #000000;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.upload-list-item .iconfont-fontsize {
|
|
55
|
+
margin-right: 5px;
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.upload-list-item .icon-PDF {
|
|
60
|
+
color: #ee3434;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.upload-list-item .icon-DPS {
|
|
64
|
+
color: #ff6a10;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.upload-list-item .icon-XLS {
|
|
68
|
+
color: #4ec10f;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.upload-list-item .icon-DOC {
|
|
72
|
+
color: #4799e7;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.upload-list-item .icon-ET {
|
|
76
|
+
color: #4ec10f;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.upload-list-item .icon-OFD {
|
|
80
|
+
color: #ee3434;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.upload-list-item .icon-WPS {
|
|
84
|
+
color: #ff6a10;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.upload-list-item .icon-ZIP {
|
|
88
|
+
color: #337ab7;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.upload-list-item .icon-TXT {
|
|
92
|
+
color: #4799e7;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.upload-list-item .icon-TIF {
|
|
96
|
+
color: #ff9900;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.upload-list-item .icon-SWF {
|
|
100
|
+
color: #a94442;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.upload-list-item .icon-RAR {
|
|
104
|
+
color: #337ab7;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.upload-list-item .icon-PPT {
|
|
108
|
+
color: #ff6a10;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.upload-list-item .icon-MP3 {
|
|
112
|
+
color: #a06feb;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.upload-list-item .icon-MP4 {
|
|
116
|
+
color: #a06feb;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.upload-list-item .icon-MOV {
|
|
120
|
+
color: #0fb8c3;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.upload-list-item .icon-GIF {
|
|
124
|
+
color: #ff9900;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.upload-list-item .icon-FLV {
|
|
128
|
+
color: #0fb8c3;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.upload-list-item .icon-EXE {
|
|
132
|
+
color: #31708f;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.upload-list-item .icon-AVI {
|
|
136
|
+
color: #0fb8c3;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.upload-list-item .icon-7Z {
|
|
140
|
+
color: #337ab7;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.upload-list-item .icon-download1 {
|
|
144
|
+
margin-right: 5px;
|
|
145
|
+
font-size: 16px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.upload-list-item .dd-t-list-time {
|
|
149
|
+
font-size: 10px;
|
|
150
|
+
line-height: 12px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.upload-file {
|
|
154
|
+
display: flex;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
align-items: center;
|
|
157
|
+
position: relative;
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 40px;
|
|
160
|
+
font-size: 20px;
|
|
161
|
+
background: #ffffff;
|
|
162
|
+
color: rgba(0, 0, 0, 0.3);
|
|
163
|
+
border-radius: 10px;
|
|
164
|
+
border: 1px dashed rgba(0, 0, 0, 0.3);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.upload-image {
|
|
168
|
+
position: relative;
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
align-items: center;
|
|
172
|
+
width: 100px;
|
|
173
|
+
height: 99px;
|
|
174
|
+
background: #ffffff;
|
|
175
|
+
font-size: 20px;
|
|
176
|
+
color: rgba(0, 0, 0, 0.3);
|
|
177
|
+
border-radius: 10px;
|
|
178
|
+
border: 1px dashed rgba(0, 0, 0, 0.3);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.upload-image .icon-plus {
|
|
182
|
+
color: rgba(0, 0, 0, 0.3);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.upload-file-p {
|
|
186
|
+
display: flex;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
align-items: center;
|
|
189
|
+
position: relative;
|
|
190
|
+
width: 100%;
|
|
191
|
+
padding: 4px;
|
|
192
|
+
margin-bottom: 5px;
|
|
193
|
+
font-size: 20px;
|
|
194
|
+
background: #ffffff;
|
|
195
|
+
color: rgba(0, 0, 0, 0.3);
|
|
196
|
+
border-radius: 10px;
|
|
197
|
+
border: 1px dashed rgba(0, 0, 0, 0.3);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.upload-image-p {
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
align-items: center;
|
|
204
|
+
width: 100px;
|
|
205
|
+
height: 99px;
|
|
206
|
+
margin-right: 10px;
|
|
207
|
+
padding: 0 4px;
|
|
208
|
+
background: #ffffff;
|
|
209
|
+
font-size: 20px;
|
|
210
|
+
color: rgba(0, 0, 0, 0.3);
|
|
211
|
+
border-radius: 10px;
|
|
212
|
+
border: 1px dashed rgba(0, 0, 0, 0.3);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.upload-image-item {
|
|
216
|
+
width: 100px;
|
|
217
|
+
height: 98px;
|
|
218
|
+
position: relative;
|
|
219
|
+
margin: 0 10px 25px 0px;
|
|
220
|
+
border-radius: 10px;
|
|
221
|
+
background: rgba(0, 0, 0, 0.2);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.upload-progress {
|
|
225
|
+
margin-bottom: 15px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.upload-progress-tip {
|
|
229
|
+
width: 100%;
|
|
230
|
+
display: block;
|
|
231
|
+
text-align: center;
|
|
232
|
+
font-size: 12px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.upload-progress .progress-bar.green-bar .bar-core {
|
|
236
|
+
box-shadow: 0 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.upload-image-item img {
|
|
240
|
+
border-radius: 10px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.upload-image-content {
|
|
244
|
+
position: relative;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dd-upload-file {
|
|
248
|
+
flex-wrap: wrap;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.upload-image-item .iconfont {
|
|
252
|
+
position: absolute;
|
|
253
|
+
right: -10px;
|
|
254
|
+
top: -10px;
|
|
255
|
+
background: #fa5151;
|
|
256
|
+
font-size: 14px;
|
|
257
|
+
width: 21px;
|
|
258
|
+
height: 21px;
|
|
259
|
+
line-height: 21px;
|
|
260
|
+
text-align: center;
|
|
261
|
+
border-radius: 50%;
|
|
262
|
+
color: #fff;
|
|
263
|
+
z-index: 10;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.upload-image-test-hidden {
|
|
267
|
+
display: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.upload-image-test {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
justify-content: space-between;
|
|
274
|
+
width: 100%;
|
|
275
|
+
padding-right: 27px;
|
|
276
|
+
margin-top: 18px;
|
|
277
|
+
margin-bottom: 21px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.upload-image-test-left {
|
|
281
|
+
font-family: PingFangSC-Regular;
|
|
282
|
+
font-size: 16px;
|
|
283
|
+
color: rgba(0, 0, 0, 0.85);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.upload-image-test-right {
|
|
287
|
+
font-size: 12px;
|
|
288
|
+
color: rgba(0, 0, 0, 0.3);
|
|
289
|
+
font-family: SourceHanSansSC-Regular;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.dd-uploaded-delete {
|
|
293
|
+
background: #ff213b;
|
|
294
|
+
font-size: 14px;
|
|
295
|
+
width: 21px;
|
|
296
|
+
height: 21px;
|
|
297
|
+
line-height: 21px;
|
|
298
|
+
text-align: center;
|
|
299
|
+
border-radius: 50%;
|
|
300
|
+
color: #fff;
|
|
301
|
+
margin: 14px 0 0 16px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* 流程表单附件:名称完整显示,过长换行(不截断省略) */
|
|
305
|
+
.upload-list {
|
|
306
|
+
.upload-list-item {
|
|
307
|
+
align-items: flex-start;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.upload-content,
|
|
311
|
+
.upload-list-item,
|
|
312
|
+
.upload-list-item-content,
|
|
313
|
+
.upload-name-icon {
|
|
314
|
+
min-width: 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.upload-list-item-content {
|
|
318
|
+
flex: 1;
|
|
319
|
+
max-width: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.upload-name-icon {
|
|
323
|
+
align-items: flex-start;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.upload-name-icon > i {
|
|
327
|
+
flex-shrink: 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.upload-file-name,
|
|
331
|
+
.t-list-title.upload-file-name {
|
|
332
|
+
flex: 1;
|
|
333
|
+
min-width: 0;
|
|
334
|
+
white-space: normal !important;
|
|
335
|
+
word-break: break-all !important;
|
|
336
|
+
overflow-wrap: break-word !important;
|
|
337
|
+
word-wrap: break-word !important;
|
|
338
|
+
overflow: visible !important;
|
|
339
|
+
text-overflow: clip !important;
|
|
340
|
+
-webkit-line-clamp: unset !important;
|
|
341
|
+
line-clamp: unset !important;
|
|
342
|
+
max-width: 100%;
|
|
343
|
+
line-height: 1.4;
|
|
344
|
+
}
|
|
345
|
+
}
|