fmui-base 2.3.23 → 2.3.25

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.25:表单乐观锁只有自定义流程生效 非approve流程不生效
7
+ - 2.3.24:流程办理选人组件支持选择群组和职务
6
8
  - 2.3.23:传阅增加传阅原因,被传阅人打开流程提示传阅原因,移动端流程办理中流程分类筛选支持只显示存在的数据的分类,流程管理支持设置流程办理缓急
7
9
  - 2.3.22:排他网关支持直接连其他网关
8
10
  - 2.3.21:移动端切换组织时支持重新加载当前组织选人字段
@@ -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",