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 CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.24:流程办理选人组件支持选择群组和职务
7
+ - 2.3.23:传阅增加传阅原因,被传阅人打开流程提示传阅原因,移动端流程办理中流程分类筛选支持只显示存在的数据的分类,流程管理支持设置流程办理缓急
6
8
  - 2.3.22:排他网关支持直接连其他网关
7
9
  - 2.3.21:移动端切换组织时支持重新加载当前组织选人字段
8
10
  - 2.3.20:移动端流程表单选人字段默认值支持选择当前用户,当前用户组织,与宏值逻辑一致
@@ -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 t-omit t-LH1_4' },
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
  });
@@ -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",