fmui-base 2.3.22 → 2.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/comment_list/List.js +33 -6
- package/lib/comment_list/List.less +43 -0
- package/lib/db/approveUserResolve.js +41 -0
- package/lib/db/db.js +18 -0
- package/lib/db/variables.js +3 -1
- package/lib/form_info/formInfo.js +310 -165
- package/lib/process_info/processInfo.js +447 -188
- 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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getUsersByGrpIdSync = getUsersByGrpIdSync;
|
|
7
|
+
exports.getUsersByDutyIdSync = getUsersByDutyIdSync;
|
|
8
|
+
|
|
9
|
+
var _db = require('./db');
|
|
10
|
+
|
|
11
|
+
var _db2 = _interopRequireDefault(_db);
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function resolveApproveUsers(apiFn, paramKey, ids) {
|
|
16
|
+
if (!ids) {
|
|
17
|
+
return Promise.resolve([]);
|
|
18
|
+
}
|
|
19
|
+
var param = {};
|
|
20
|
+
param[paramKey] = ids;
|
|
21
|
+
return apiFn(param).then(function (content) {
|
|
22
|
+
return content || [];
|
|
23
|
+
}).catch(function (err) {
|
|
24
|
+
console.log('approveUserResolve error:', err);
|
|
25
|
+
return [];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** 根据群组id获取用户列表(Promise,走 DB /api/m/approve/getUserIdsByGrpId) */
|
|
30
|
+
/**
|
|
31
|
+
* 办理选人:群组/职务解析为用户(提交组装 selectedActivity 时调用)
|
|
32
|
+
* 通过 DB.FlowModuleAPI 走 /api/m/approve,FORM 提交(与 natty-fetch postDataFomat:FORM 一致)
|
|
33
|
+
*/
|
|
34
|
+
function getUsersByGrpIdSync(groupIds) {
|
|
35
|
+
return resolveApproveUsers(_db2.default.FlowModuleAPI.getUserIdsByGrpId, 'groupIds', groupIds);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** 根据职务id获取用户列表(Promise,走 DB /api/m/approve/getUserIdsByDutyId) */
|
|
39
|
+
function getUsersByDutyIdSync(dutyIds) {
|
|
40
|
+
return resolveApproveUsers(_db2.default.FlowModuleAPI.getUserIdsByDutyId, 'dutyIds', dutyIds);
|
|
41
|
+
}
|
package/lib/db/db.js
CHANGED
|
@@ -1150,6 +1150,24 @@ context.create('FlowModuleAPI', {
|
|
|
1150
1150
|
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
1151
1151
|
},
|
|
1152
1152
|
willFetch: function willFetch() {}
|
|
1153
|
+
},
|
|
1154
|
+
getUserIdsByGrpId: {
|
|
1155
|
+
url: _variables2.default.URLS.getUserIdsByGrpId,
|
|
1156
|
+
method: 'POST',
|
|
1157
|
+
postDataFomat: 'FORM',
|
|
1158
|
+
header: {
|
|
1159
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
1160
|
+
},
|
|
1161
|
+
willFetch: function willFetch() {}
|
|
1162
|
+
},
|
|
1163
|
+
getUserIdsByDutyId: {
|
|
1164
|
+
url: _variables2.default.URLS.getUserIdsByDutyId,
|
|
1165
|
+
method: 'POST',
|
|
1166
|
+
postDataFomat: 'FORM',
|
|
1167
|
+
header: {
|
|
1168
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
1169
|
+
},
|
|
1170
|
+
willFetch: function willFetch() {}
|
|
1153
1171
|
}
|
|
1154
1172
|
|
|
1155
1173
|
});
|
package/lib/db/variables.js
CHANGED
|
@@ -144,7 +144,9 @@ exports.default = {
|
|
|
144
144
|
getUserSetInfo: urlBasicPrefix + 'setting/userinfo/getUserSetInfo' + '?', //获取用户组织信息
|
|
145
145
|
orgSwitch: urlBasicPrefix + 'front/personal/orgSwitch' + '?', //切换组织
|
|
146
146
|
updateStartUserOrg: approveUrlPrefix + 'updateStartUserOrg' + '?', //更新发起人组织
|
|
147
|
-
reloadFuzhiMacroFields: approveUrlPrefix + 'reloadFuzhiMacroFields' + '?' //组织切换后重载赋值宏值
|
|
147
|
+
reloadFuzhiMacroFields: approveUrlPrefix + 'reloadFuzhiMacroFields' + '?', //组织切换后重载赋值宏值
|
|
148
|
+
getUserIdsByGrpId: approveUrlPrefix + 'getUserIdsByGrpId', //根据群组id获取用户(POST FORM)
|
|
149
|
+
getUserIdsByDutyId: approveUrlPrefix + 'getUserIdsByDutyId' //根据职务id获取用户(POST FORM)
|
|
148
150
|
},
|
|
149
151
|
nodataIcon: context + "/mobile/fmui/images/noData.png",
|
|
150
152
|
loadingIcon: context + "/mobile/fmui/images/loading.gif",
|