fmui-base 2.3.52 → 2.3.54

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.
@@ -80,6 +80,34 @@ var HBox = _Boxs2.default.HBox,
80
80
 
81
81
  var searchVal = '';
82
82
  var isPageHide = false;
83
+
84
+ function resolveFormKey(itemInfo, callback) {
85
+ var formKey = itemInfo.formKey || itemInfo.formId;
86
+ if (formKey && formKey !== 'undefined' && formKey !== 'null') {
87
+ callback(formKey);
88
+ return;
89
+ }
90
+ var processInstanceId = itemInfo.processInstanceId;
91
+ if (!processInstanceId) {
92
+ callback('');
93
+ return;
94
+ }
95
+ _db2.default.FlowModuleAPI.getDoneTaskListByProcessId({
96
+ processInstanceId: processInstanceId,
97
+ module: itemInfo.module || ''
98
+ }).then(function (content) {
99
+ var rows = content && (content.data || content.rows || content);
100
+ if (rows && !Array.isArray(rows) && rows.data) {
101
+ rows = rows.data;
102
+ }
103
+ if (Array.isArray(rows) && rows.length > 0 && rows[0].formKey) {
104
+ formKey = rows[0].formKey;
105
+ }
106
+ callback(formKey || '');
107
+ }).catch(function () {
108
+ callback('');
109
+ });
110
+ }
83
111
  window.addEventListener('pageshow', function () {
84
112
  console.log("isPageHide===" + isPageHide);
85
113
  if (isPageHide) {
@@ -100,86 +128,194 @@ var ListItem = function (_React$Component) {
100
128
  }
101
129
 
102
130
  _createClass(ListItem, [{
131
+ key: 'navigateToProcessDetails',
132
+ value: function navigateToProcessDetails(itemInfo, param_list_type, param_formKey) {
133
+ var param_businessKey = itemInfo.businessKey;
134
+ var module = itemInfo.module;
135
+ var type = this.props.fromType;
136
+ var projectPath = this.props.projectPath;
137
+ var taskId = '';
138
+ var processInstanceId = itemInfo.processInstanceId;
139
+ // 避免 formKey 为空时拼出字面量 undefined
140
+ if (!param_formKey || param_formKey === 'undefined' || param_formKey === 'null') {
141
+ param_formKey = itemInfo.formKey || itemInfo.formId || '-1';
142
+ }
143
+ if (param_list_type == '2') {
144
+ taskId = itemInfo.taskId;
145
+ } else {
146
+ taskId = itemInfo.id;
147
+ }
148
+ var loginUserId = getLoginUserInfo().userId;
149
+ if (type == "self") {
150
+ var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
151
+ if (searchVal != '') {
152
+ url += "/" + searchVal;
153
+ }
154
+ decodeURI(url);
155
+ location.hash = url;
156
+ } else {
157
+ isPageHide = true;
158
+ var fullUrl = window.location.href;
159
+ fullUrl = fullUrl.replace(/clientType/g, "");
160
+ fullUrl = fullUrl.replace(/thirdMenuType/g, "");
161
+ fullUrl = fullUrl.replace(/clientAppType/g, "");
162
+ var mobilePath = module;
163
+ if (module == 'bud_cost') {
164
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('/approval/all')[0];
165
+ } else if (module == 'bud_project') {
166
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
167
+ } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
168
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
169
+ } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
170
+ fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
171
+ } else if (module.indexOf("hoa_") != '-1') {
172
+ var category = module.split("_")[0];
173
+ mobilePath = module.substring(module.indexOf("_") + 1);
174
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
175
+ } else {
176
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
177
+ }
178
+ var _url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
179
+ _url = fullUrl + '/' + _url;
180
+ decodeURI(_url);
181
+ location.href = _url;
182
+ }
183
+ }
184
+ }, {
185
+ key: 'openProcessDetails',
186
+ value: function openProcessDetails(itemInfo, param_list_type) {
187
+ var _this2 = this;
188
+
189
+ resolveFormKey(itemInfo, function (param_formKey) {
190
+ _this2.navigateToProcessDetails(itemInfo, param_list_type, param_formKey);
191
+ });
192
+ }
193
+ }, {
103
194
  key: 'clickDetail',
104
195
  value: function clickDetail(event) {
105
- var _this2 = this;
196
+ var _this3 = this;
106
197
 
107
198
  //我的流程
108
- if (this.props.type == '4') {
109
- var t = this;
110
- this.setState({
111
- timeOutEvent: setTimeout(function () {
112
- _ActionSheet2.default.show({
113
- options: ['详情', '再次发送'],
114
- destructiveButtonIndex: 2,
115
- message: '',
116
- maskClosable: true
117
- }, function (index) {
118
- var itemInfo = _this2.props.data;
119
- console.log(itemInfo);
120
- var param_processKey = itemInfo.processKey; // 流程类型code
121
- var param_formKey = itemInfo.formKey; // 表单id
122
- var param_businessKey = itemInfo.businessKey; // 表单数据id;
123
- var param_startUserId = itemInfo.startUserId; // 流程发起人id
124
- var param_list_type = _this2.props.type; // 列表类型 待办-0,待阅-1,
125
- var processName = itemInfo.processName; // 流程名称
126
- var module = itemInfo.module; // 流程名称
127
- var type = _this2.props.fromType; //self:本应用,all:全模块
128
- var projectPath = _this2.props.projectPath; //项目路径
129
-
130
- var taskId = '';
131
- var processInstanceId = itemInfo.processInstanceId;
132
- if (index == 0) {
133
- if (param_list_type == '2') {
134
- taskId = itemInfo.taskId;
135
- } else {
136
- taskId = itemInfo.id;
137
- }
138
- var loginUserId = getLoginUserInfo().userId;
139
- if (type == "self") {
140
- var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
141
- if (searchVal != '') {
142
- url += "/" + searchVal;
143
- }
144
- decodeURI(url);
145
- location.hash = url;
146
- } else {
147
- isPageHide = true;
148
- var fullUrl = window.location.href;
149
- fullUrl = fullUrl.replace(/clientType/g, "");
150
- fullUrl = fullUrl.replace(/thirdMenuType/g, "");
151
- fullUrl = fullUrl.replace(/clientAppType/g, "");
152
- var mobilePath = module;
153
- //projectPath = modules/mobileoffice
154
- // 预算模块跳转特殊处理
155
- if (module == 'bud_cost') {
156
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('/approval/all')[0];
157
- } else if (module == 'bud_project') {
158
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
159
- } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
160
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
161
- } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
162
- fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
163
- } else if (module.indexOf("hoa_") != '-1') {
164
- var category = module.split("_")[0];
165
- mobilePath = module.substring(module.indexOf("_") + 1);
166
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
199
+ if (this.props.listTabType == '4') {
200
+ try {
201
+ _Popup2.default.hide();
202
+ } catch (e) {}
203
+ var itemInfo = this.props.data;
204
+ var status = String(itemInfo.status != null ? itemInfo.status : '');
205
+ var canDelete = status === '3' || status === '4' || status === '5';
206
+ // 删除项用内联红色,避免主题色覆盖 ActionSheet destructive 样式
207
+ var options = canDelete ? [_react2.default.createElement(
208
+ 'span',
209
+ { style: { color: '#F03118' } },
210
+ '\u5220\u9664'
211
+ ), '详情', '再次发送'] : ['详情', '再次发送'];
212
+ _ActionSheet2.default.show({
213
+ options: options,
214
+ destructiveButtonIndex: canDelete ? 0 : undefined,
215
+ maskClosable: true
216
+ }, function (index) {
217
+ var param_processKey = itemInfo.processKey; // 流程类型code
218
+ var param_businessKey = itemInfo.businessKey; // 表单数据id;
219
+ var param_startUserId = itemInfo.startUserId; // 流程发起人id
220
+ var param_list_type = _this3.props.listTabType; // 列表类型 待办-0,待阅-1,
221
+ var processName = itemInfo.processName; // 流程名称
222
+ var module = itemInfo.module; // 流程名称
223
+ var type = _this3.props.fromType; //self:本应用,all:全模块
224
+ var projectPath = _this3.props.projectPath; //项目路径
225
+
226
+ var detailIndex = canDelete ? 1 : 0;
227
+ var resendIndex = canDelete ? 2 : 1;
228
+ if (canDelete && index == 0) {
229
+ var t = _this3;
230
+ _Dialog2.default.confirm({
231
+ locale: 'zh_CN',
232
+ title: '提示',
233
+ content: '确定删除该流程吗?',
234
+ onConfirm: function onConfirm() {
235
+ _db2.default.FlowModuleAPI.delMyProcess({
236
+ processInstanceId: itemInfo.processInstanceId,
237
+ module: module || 'approve'
238
+ }).then(function () {
239
+ _Toast2.default.show({ type: 'success', content: '删除成功' });
240
+ if (typeof t.props.onRefresh === 'function') {
241
+ t.props.onRefresh();
167
242
  } else {
168
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
243
+ try {
244
+ window.location.reload();
245
+ } catch (e) {}
169
246
  }
170
- var _url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
171
- _url = fullUrl + '/' + _url;
172
- decodeURI(_url);
173
- location.href = _url;
174
- }
175
- } else if (index == 1) {
176
- var param = {
177
- code: param_processKey
178
- };
179
- _db2.default.FlowModuleAPI.startFlowTest(param).then(function (content) {
180
- var canStart = content.canStart;
181
- var reminder = content.reminder;
182
- if (canStart == "1") {
247
+ }).catch(function (error) {
248
+ _Toast2.default.show({
249
+ type: 'error',
250
+ content: error && (error.errorMsg || error.message) || '删除失败'
251
+ });
252
+ });
253
+ },
254
+ onCancel: function onCancel() {}
255
+ });
256
+ return;
257
+ }
258
+ if (index == detailIndex) {
259
+ _this3.openProcessDetails(itemInfo, param_list_type);
260
+ } else if (index == resendIndex) {
261
+ var param = {
262
+ code: param_processKey
263
+ };
264
+ _db2.default.FlowModuleAPI.startFlowTest(param).then(function (content) {
265
+ var canStart = content.canStart;
266
+ var reminder = content.reminder;
267
+ if (canStart == "1") {
268
+ _db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
269
+ var openTaskId = content.openTaskId;
270
+ var processInstanceId = content.processInstanceId;
271
+ var list = content.list;
272
+ if (openTaskId != null && openTaskId != '') {
273
+ if (list != null && list != '' && list.length > 0) {
274
+ for (var j = 0; j < list.length; j++) {
275
+ if (openTaskId == list[j].id && module == 'approve') {
276
+
277
+ var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';
278
+ location.hash = path;
279
+ } else if (openTaskId == list[j].id && module != 'approve') {
280
+ var fullUrl = window.location.href;
281
+ fullUrl = fullUrl.replace(/clientType/g, "");
282
+ fullUrl = fullUrl.replace(/thirdMenuType/g, "");
283
+ fullUrl = fullUrl.replace(/clientAppType/g, "");
284
+ var projectPath = 'modules/approve';
285
+ var mobilePath = '';
286
+ // 预算模块跳转特殊处理
287
+ if (module == 'bud_cost') {
288
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('#/')[0];
289
+ } else if (module == 'bud_project') {
290
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('#/')[0];
291
+ } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
292
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('#/')[0];
293
+ } else if (module == 'contract_sign' || module == 'contract_exmanage') {
294
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/contract/contract/").split('?_')[0].split('#/')[0];
295
+ } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
296
+ fullUrl = fullUrl.split('?_')[0].split('#/')[0];
297
+ } else if (module.indexOf("hoa_") != '-1') {
298
+ var category = module.split("_")[0];
299
+ mobilePath = module.substring(module.indexOf("_") + 1);
300
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('#/')[0];
301
+ } else {
302
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + module + "/").split('?_')[0].split('#/')[0];
303
+ }
304
+ var url = "process/processDetails/" + openTaskId + "/" + list[j].formKey + "/" + param_businessKey + "/0/0/" + list[j].processInstanceId + "/" + module + "/" + param_startUserId + "/null/" + "2";
305
+ url = fullUrl + '#/' + url;
306
+ decodeURI(url);
307
+ location.href = url;
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }).catch(function (error) {});
313
+ } else {
314
+ _Dialog2.default.confirm({
315
+ locale: 'zh_CN',
316
+ title: '提示',
317
+ content: reminder,
318
+ onConfirm: function onConfirm() {
183
319
  _db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
184
320
  var openTaskId = content.openTaskId;
185
321
  var processInstanceId = content.processInstanceId;
@@ -189,87 +325,34 @@ var ListItem = function (_React$Component) {
189
325
  for (var j = 0; j < list.length; j++) {
190
326
  if (openTaskId == list[j].id && module == 'approve') {
191
327
 
192
- var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';
328
+ var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';;
193
329
  location.hash = path;
194
- } else if (openTaskId == list[j].id && module != 'approve') {
195
- var _fullUrl = window.location.href;
196
- _fullUrl = _fullUrl.replace(/clientType/g, "");
197
- _fullUrl = _fullUrl.replace(/thirdMenuType/g, "");
198
- _fullUrl = _fullUrl.replace(/clientAppType/g, "");
199
- var projectPath = 'modules/approve';
200
- var mobilePath = '';
201
- // 预算模块跳转特殊处理
202
- if (module == 'bud_cost') {
203
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('#/')[0];
204
- } else if (module == 'bud_project') {
205
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('#/')[0];
206
- } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
207
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('#/')[0];
208
- } else if (module == 'contract_sign' || module == 'contract_exmanage') {
209
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/contract/contract/").split('?_')[0].split('#/')[0];
210
- } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
211
- _fullUrl = _fullUrl.split('?_')[0].split('#/')[0];
212
- } else if (module.indexOf("hoa_") != '-1') {
213
- var category = module.split("_")[0];
214
- mobilePath = module.substring(module.indexOf("_") + 1);
215
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('#/')[0];
216
- } else {
217
- _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/modules/" + module + "/").split('?_')[0].split('#/')[0];
218
- }
219
- var _url2 = "process/processDetails/" + openTaskId + "/" + list[j].formKey + "/" + param_businessKey + "/0/0/" + list[j].processInstanceId + "/" + module + "/" + param_startUserId + "/null/" + "2";
220
- _url2 = _fullUrl + '#/' + _url2;
221
- decodeURI(_url2);
222
- location.href = _url2;
223
330
  }
224
331
  }
225
332
  }
226
- }
227
- }).catch(function (error) {});
228
- } else {
229
- _Dialog2.default.confirm({
230
- locale: 'zh_CN',
231
- title: '提示',
232
- content: reminder,
233
- onConfirm: function onConfirm() {
234
- _db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
235
- var openTaskId = content.openTaskId;
236
- var processInstanceId = content.processInstanceId;
237
- var list = content.list;
238
- if (openTaskId != null && openTaskId != '') {
239
- if (list != null && list != '' && list.length > 0) {
240
- for (var j = 0; j < list.length; j++) {
241
- if (openTaskId == list[j].id && module == 'approve') {
242
-
243
- var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';;
244
- location.hash = path;
245
- }
246
- }
247
- }
248
- } else {
249
- if (list != null && list != '' && list.length > 0) {
250
- var assigneeName = '';
251
- for (var i = 0; i < list.length; i++) {
252
- if (list[i].assigneeName != null && list[i].assigneeName != '') {
253
- assigneeName = assigneeName + ',' + list[i].assigneeName;
254
- }
255
- }
256
- _Toast2.default.show({
257
- type: 'success',
258
- content: "流程已发送给" + assigneeName.substring(1)
259
- });
333
+ } else {
334
+ if (list != null && list != '' && list.length > 0) {
335
+ var assigneeName = '';
336
+ for (var i = 0; i < list.length; i++) {
337
+ if (list[i].assigneeName != null && list[i].assigneeName != '') {
338
+ assigneeName = assigneeName + ',' + list[i].assigneeName;
260
339
  }
261
340
  }
262
- }).catch(function (error) {});
263
- },
264
- onCancel: function onCancel() {
265
- console.log('confirm cancel');
341
+ _Toast2.default.show({
342
+ type: 'success',
343
+ content: "流程已发送给" + assigneeName.substring(1)
344
+ });
345
+ }
266
346
  }
267
- });
347
+ }).catch(function (error) {});
348
+ },
349
+ onCancel: function onCancel() {
350
+ console.log('confirm cancel');
268
351
  }
269
- }).catch(function (error) {});
352
+ });
270
353
  }
271
- });
272
- }, 1)
354
+ }).catch(function (error) {});
355
+ }
273
356
  });
274
357
  } else {
275
358
  if (this.props.isBatch) {
@@ -285,64 +368,10 @@ var ListItem = function (_React$Component) {
285
368
  }
286
369
  } else {
287
370
  if (this.props.ableClick) {
288
- var itemInfo = this.props.data;
289
- console.log(itemInfo);
290
- var param_processKey = itemInfo.processKey; // 流程类型code
291
- var param_formKey = itemInfo.formKey; // 表单id
292
- var param_businessKey = itemInfo.businessKey; // 表单数据id;
293
- var param_startUserId = itemInfo.startUserId; // 流程发起人id
294
- var param_list_type = this.props.type; // 列表类型 待办-0,待阅-1,
295
- var processName = itemInfo.processName; // 流程名称
296
- var module = itemInfo.module; // 流程名称
297
- var type = this.props.fromType; //self:本应用,all:全模块
298
- var projectPath = this.props.projectPath; //项目路径
299
-
300
- var taskId = '';
301
- var processInstanceId = itemInfo.processInstanceId;
302
- if (param_list_type == '2') {
303
- taskId = itemInfo.taskId;
304
- } else {
305
- taskId = itemInfo.id;
306
- }
307
- var loginUserId = getLoginUserInfo().userId;
308
- if (type == "self") {
309
- var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
310
- if (searchVal != '') {
311
- url += "/" + searchVal;
312
- }
313
- decodeURI(url);
314
- location.hash = url;
315
- } else {
316
- isPageHide = true;
317
- var fullUrl = window.location.href;
318
- fullUrl = fullUrl.replace(/clientType/g, "");
319
- fullUrl = fullUrl.replace(/thirdMenuType/g, "");
320
- fullUrl = fullUrl.replace(/clientAppType/g, "");
321
- var mobilePath = module;
322
- //projectPath = modules/mobileoffice
323
- // 预算模块跳转特殊处理
324
- if (module == 'bud_cost') {
325
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('#/')[0];
326
- } else if (module == 'bud_project') {
327
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('#/')[0];
328
- } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
329
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('#/')[0];
330
- } else if (module == 'contract_sign' || module == 'contract_exmanage') {
331
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/contract/contract/").split('?_')[0].split('#/')[0];
332
- } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
333
- fullUrl = fullUrl.split('?_')[0].split('#/')[0];
334
- } else if (module.indexOf("hoa_") != '-1') {
335
- var category = module.split("_")[0];
336
- mobilePath = module.substring(module.indexOf("_") + 1);
337
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('#/')[0];
338
- } else {
339
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('#/')[0];
340
- }
341
- var _url3 = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
342
- _url3 = fullUrl + '#/' + _url3;
343
- decodeURI(_url3);
344
- location.href = _url3;
345
- }
371
+ var _itemInfo = this.props.data;
372
+ console.log(_itemInfo);
373
+ var param_list_type = this.props.listTabType;
374
+ this.openProcessDetails(_itemInfo, param_list_type);
346
375
  } else {
347
376
  this.props.updateAbleClick(true);
348
377
  }
@@ -356,9 +385,9 @@ var ListItem = function (_React$Component) {
356
385
  var checkIsNotComplete = true;
357
386
  var urgencyTag = false;
358
387
  var tagClass = '';
359
- if (data.type == 0 || data.type == 2) {
388
+ if (data.listTabType == 0 || data.listTabType == 2) {
360
389
  //待办 / 已办:缓急角标
361
- if (data.type == 0) {
390
+ if (data.listTabType == 0) {
362
391
  checkIsNotComplete = true;
363
392
  } else if (data.status == 2) {
364
393
  checkIsNotComplete = false;
@@ -380,14 +409,14 @@ var ListItem = function (_React$Component) {
380
409
  } else {
381
410
  urgencyTag = false;
382
411
  }
383
- } else if (data.type == 1) {
412
+ } else if (data.listTabType == 1) {
384
413
  //待阅
385
414
  if (data.status == 2) {
386
415
  checkIsNotComplete = false;
387
416
  } else {
388
417
  checkIsNotComplete = true;
389
418
  }
390
- } else if (data.type == 3) {
419
+ } else if (data.listTabType == 3) {
391
420
  //已阅
392
421
  if (data.status == 2) {
393
422
  checkIsNotComplete = false;
@@ -403,12 +432,12 @@ var ListItem = function (_React$Component) {
403
432
  }
404
433
  }
405
434
  var comleteName = data.name;
406
- if (data.type == 0) {//待办
435
+ if (data.listTabType == 0) {//待办
407
436
  // comleteName= data.curStepName;
408
- } else if (data.type == 1) {
437
+ } else if (data.listTabType == 1) {
409
438
  //待阅
410
439
  comleteName = data.nodeName;
411
- } else if (data.type == 2) {
440
+ } else if (data.listTabType == 2) {
412
441
  //已办
413
442
  if (data.status == '2') {
414
443
  comleteName = "结束";
@@ -422,10 +451,13 @@ var ListItem = function (_React$Component) {
422
451
  } else if (data.status == '5') {
423
452
  comleteName = "结束(退回)";
424
453
  checkIsNotComplete = false;
454
+ } else if (data.status == '6') {
455
+ comleteName = "不通过";
456
+ checkIsNotComplete = false;
425
457
  } else {
426
458
  comleteName = data.nodeName;
427
459
  }
428
- } else if (data.type == 3) {
460
+ } else if (data.listTabType == 3) {
429
461
  //已阅
430
462
  comleteName = data.nodeName;
431
463
  } else {
@@ -442,6 +474,9 @@ var ListItem = function (_React$Component) {
442
474
  } else if (data.status == '5') {
443
475
  comleteName = "结束(退回)";
444
476
  checkIsNotComplete = false;
477
+ } else if (data.status == '6') {
478
+ comleteName = "不通过";
479
+ checkIsNotComplete = false;
445
480
  } else {
446
481
  comleteName = data.nodeName;
447
482
  }
@@ -452,23 +487,23 @@ var ListItem = function (_React$Component) {
452
487
 
453
488
  var assigneeName = '申请人:' + data.startUserName;
454
489
 
455
- if (data.type == 0) {
490
+ if (data.listTabType == 0) {
456
491
  //待办
457
492
  assigneeName = '申请人:' + data.startUserName;
458
- } else if (data.type == 1) {
493
+ } else if (data.listTabType == 1) {
459
494
  //待阅
460
495
  assigneeName = '申请人:' + data.startUserName;
461
- } else if (data.type == 2) {
496
+ } else if (data.listTabType == 2) {
462
497
  //已办
463
498
  if (data.curUserName) {
464
499
  assigneeName = '办理人:' + data.curUserName;
465
500
  }
466
- } else if (data.type == 3) {
501
+ } else if (data.listTabType == 3) {
467
502
  //已阅
468
503
  if (data.startUserName) {
469
504
  assigneeName = '申请人:' + data.startUserName;
470
505
  }
471
- } else if (data.type == 4) {
506
+ } else if (data.listTabType == 4) {
472
507
  //我的
473
508
  if (data.curUserName) {
474
509
  assigneeName = '办理人:' + data.curUserName;
@@ -479,16 +514,16 @@ var ListItem = function (_React$Component) {
479
514
  }
480
515
  var formatTime = data.createTime;
481
516
 
482
- if (data.type == 0) {
517
+ if (data.listTabType == 0) {
483
518
  //待办
484
519
  formatTime = data.createTime;
485
- } else if (data.type == 1) {
520
+ } else if (data.listTabType == 1) {
486
521
  //待阅
487
522
  formatTime = data.createTime;
488
- } else if (data.type == 2) {
523
+ } else if (data.listTabType == 2) {
489
524
  //已办
490
525
  formatTime = data.dealTime;
491
- } else if (data.type == 3) {
526
+ } else if (data.listTabType == 3) {
492
527
  //已阅
493
528
  formatTime = data.endTime;
494
529
  } else {
@@ -551,7 +586,7 @@ var ListItem = function (_React$Component) {
551
586
  { className: this.props.isBatch == false ? 't-DN' : 'approve-check' },
552
587
  _react2.default.createElement(
553
588
  Box,
554
- { className: this.props.isBatch == false ? 't-DN' : 't-checkbox-field-icon-list un-checked t-MR10', 'data-taskId': this.props.id, 'data-module': this.props.module, 'data-processInstanceId': this.props.processInstanceId },
589
+ { className: this.props.isBatch == false ? 't-DN' : 't-checkbox-field-icon-list un-checked t-MR10', 'data-taskid': this.props.id, 'data-module': this.props.module, 'data-processinstanceid': this.props.processInstanceId },
555
590
  _react2.default.createElement('i', { className: 'iconfont icon-checked t-FCf t-FS14' })
556
591
  )
557
592
  ),
@@ -568,12 +603,12 @@ var ListItem = function (_React$Component) {
568
603
  ),
569
604
  _react2.default.createElement(
570
605
  Box,
571
- { className: this.props.dueDate != null && this.props.dueDate < clock && this.props.type == 0 ? 'label label-warn' : 't-DN' },
606
+ { className: this.props.dueDate != null && this.props.dueDate < clock && this.props.listTabType == 0 ? 'label label-warn' : 't-DN' },
572
607
  '\u8D85\u65F6'
573
608
  ),
574
609
  _react2.default.createElement(
575
610
  Box,
576
- { className: this.props.deleted != null && this.props.deleted == '1' && this.props.type == 0 ? 'label label-info' : 't-DN' },
611
+ { className: this.props.deleted != null && this.props.deleted == '1' && this.props.listTabType == 0 ? 'label label-info' : 't-DN' },
577
612
  '\u6682\u4E0D\u529E\u7406'
578
613
  ),
579
614
  _react2.default.createElement(
@@ -629,7 +664,7 @@ var PageHome = function (_React$Component2) {
629
664
 
630
665
  document.addEventListener('resume', function (e) {});
631
666
 
632
- var _this3 = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
667
+ var _this4 = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
633
668
 
634
669
  setPageTitle('办理');
635
670
  // 禁用iOS弹性事件
@@ -678,7 +713,7 @@ var PageHome = function (_React$Component2) {
678
713
  readListUrl = _variables2.default.URLS.transaction.read + "&unified=1&sourceType=unitedapprove&module=" + module + "&category=" + category;
679
714
  myselfListUrl = _variables2.default.URLS.transaction.myself + "&unified=1&sourceType=unitedapprove&module=" + module + "&category=" + category;
680
715
  }
681
- _this3.state = {
716
+ _this4.state = {
682
717
  tabCodes: tabCodes,
683
718
  type: type,
684
719
  activeTabIndex: activeIndex, // 待办-0;待阅-1;已办-2;已阅-3;我的-4
@@ -720,13 +755,13 @@ var PageHome = function (_React$Component2) {
720
755
  category4: [],
721
756
  category: category
722
757
  };
723
- _this3.getTransactionTitleCount(module, "undo,unread", category);
724
- _this3.getCategoryListByModule(module, category, activeIndex);
758
+ _this4.getTransactionTitleCount(module, "undo,unread", category);
759
+ _this4.getCategoryListByModule(module, category, activeIndex);
725
760
  /**
726
761
  * 办理页面搜索框设置项
727
762
  * @type {{locale: string, instantSearch: boolean, hasHistory: boolean, searchDelay: number, onEnter: (()), onExit: (()), onChange: ((p1:*)), onSearch: ((p1?:*))}}
728
763
  */
729
- _this3.searchBarProps = {
764
+ _this4.searchBarProps = {
730
765
  placeholder: "请输入流程标题查询",
731
766
  instantSearch: false,
732
767
  hasHistory: false,
@@ -736,14 +771,14 @@ var PageHome = function (_React$Component2) {
736
771
  onEnter: function onEnter() {
737
772
  console.log('enter');
738
773
  },
739
- onExit: _this3.onExit.bind(_this3),
774
+ onExit: _this4.onExit.bind(_this4),
740
775
  onChange: function onChange(value) {
741
776
  console.log('Typing>>' + value);
742
777
  },
743
- onSearch: _this3.onSearch.bind(_this3)
778
+ onSearch: _this4.onSearch.bind(_this4)
744
779
  };
745
780
 
746
- return _this3;
781
+ return _this4;
747
782
  }
748
783
 
749
784
  _createClass(PageHome, [{
@@ -812,7 +847,7 @@ var PageHome = function (_React$Component2) {
812
847
  }, {
813
848
  key: 'getTransactionTitleCount',
814
849
  value: function getTransactionTitleCount(module, codes, category) {
815
- var _this4 = this;
850
+ var _this5 = this;
816
851
 
817
852
  var t = this;
818
853
  _db2.default.FlowApproval.getApproveCount({
@@ -820,8 +855,8 @@ var PageHome = function (_React$Component2) {
820
855
  codes: codes,
821
856
  category: category
822
857
  }).then(function (content) {
823
- _this4.state.titleCount.undo = content.undo;
824
- _this4.state.titleCount.unread = content.unread;
858
+ _this5.state.titleCount.undo = content.undo;
859
+ _this5.state.titleCount.unread = content.unread;
825
860
  }).catch(function (error) {
826
861
  console.log(error);
827
862
  });
@@ -835,7 +870,7 @@ var PageHome = function (_React$Component2) {
835
870
  }, {
836
871
  key: 'getCategoryListByModule',
837
872
  value: function getCategoryListByModule(module, category, listType) {
838
- var _this5 = this;
873
+ var _this6 = this;
839
874
 
840
875
  var t = this;
841
876
  var type = listType;
@@ -848,11 +883,11 @@ var PageHome = function (_React$Component2) {
848
883
  listType: type
849
884
  }).then(function (content) {
850
885
  if (content) {
851
- _this5.setState({
886
+ _this6.setState({
852
887
  categoryList: content
853
888
  });
854
889
  } else {
855
- _this5.setState({
890
+ _this6.setState({
856
891
  categoryList: []
857
892
  });
858
893
  }
@@ -1204,7 +1239,7 @@ var PageHome = function (_React$Component2) {
1204
1239
  var _module = '';
1205
1240
  $(".checked").map(function (index, item) {
1206
1241
  taskIds += $(item).attr("data-taskid") + ",";
1207
- processInstanceIds += $(item).attr("data-processInstanceId") + ",";
1242
+ processInstanceIds += $(item).attr("data-processinstanceid") + ",";
1208
1243
 
1209
1244
  if (index == 0) {
1210
1245
  taskId = $(item).attr("data-taskid");
@@ -1310,7 +1345,7 @@ var PageHome = function (_React$Component2) {
1310
1345
  var permissionCode = "unRead";
1311
1346
  $(".checked").map(function (index, item) {
1312
1347
  taskIds += $(item).attr("data-taskid") + ",";
1313
- processInstanceIds += $(item).attr("data-processInstanceId") + ",";
1348
+ processInstanceIds += $(item).attr("data-processinstanceid") + ",";
1314
1349
 
1315
1350
  if (index == 0) {
1316
1351
  module = $(item).attr("data-module");
@@ -1423,7 +1458,7 @@ var PageHome = function (_React$Component2) {
1423
1458
  }, {
1424
1459
  key: 'render',
1425
1460
  value: function render() {
1426
- var _this6 = this;
1461
+ var _this7 = this;
1427
1462
 
1428
1463
  var tabBarStyle = {};
1429
1464
  var winHeightStyle = { height: this.state.winHeight };
@@ -1489,7 +1524,7 @@ var PageHome = function (_React$Component2) {
1489
1524
  items: this.state.categoryList
1490
1525
  }],
1491
1526
  onConfirm: function onConfirm(data) {
1492
- _this6.filterConfirm(data);
1527
+ _this7.filterConfirm(data);
1493
1528
  } }),
1494
1529
  _react2.default.createElement(
1495
1530
  'div',
@@ -1506,7 +1541,7 @@ var PageHome = function (_React$Component2) {
1506
1541
  noDataImage: _variables2.default.nodataIcon,
1507
1542
  currentPageKey: 'page'
1508
1543
  },
1509
- _react2.default.createElement(ListItem, { type: '0', isBatch: this.state.isBatch, ableClick: this.state.ableClick, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1544
+ _react2.default.createElement(ListItem, { listTabType: '0', isBatch: this.state.isBatch, ableClick: this.state.ableClick, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1510
1545
  )
1511
1546
  )
1512
1547
  ) : "",
@@ -1523,7 +1558,7 @@ var PageHome = function (_React$Component2) {
1523
1558
  ),
1524
1559
  _react2.default.createElement(
1525
1560
  Box,
1526
- { className: this.state.hasBatch ? this.state.isBatch ? "t-FCc t-PR16" : "theme-color t-PR16" : "t-DN", isBatch: this.state.isBatch, onClick: this.clickBatch.bind(this, this.state.isBatch) },
1561
+ { className: this.state.hasBatch ? this.state.isBatch ? "t-FCc t-PR16" : "theme-color t-PR16" : "t-DN", onClick: this.clickBatch.bind(this, this.state.isBatch) },
1527
1562
  '\u6279\u91CF'
1528
1563
  )
1529
1564
  ),
@@ -1538,7 +1573,7 @@ var PageHome = function (_React$Component2) {
1538
1573
  items: this.state.categoryList
1539
1574
  }],
1540
1575
  onConfirm: function onConfirm(data) {
1541
- _this6.filterConfirm(data);
1576
+ _this7.filterConfirm(data);
1542
1577
  } }),
1543
1578
  _react2.default.createElement(
1544
1579
  'div',
@@ -1555,7 +1590,7 @@ var PageHome = function (_React$Component2) {
1555
1590
  noDataImage: _variables2.default.nodataIcon,
1556
1591
  currentPageKey: 'page'
1557
1592
  },
1558
- _react2.default.createElement(ListItem, { type: '1', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1593
+ _react2.default.createElement(ListItem, { listTabType: '1', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1559
1594
  )
1560
1595
  )
1561
1596
  ) : "",
@@ -1582,7 +1617,7 @@ var PageHome = function (_React$Component2) {
1582
1617
  items: this.state.categoryList
1583
1618
  }],
1584
1619
  onConfirm: function onConfirm(data) {
1585
- _this6.filterConfirm(data);
1620
+ _this7.filterConfirm(data);
1586
1621
  } }),
1587
1622
  _react2.default.createElement(
1588
1623
  'div',
@@ -1599,7 +1634,7 @@ var PageHome = function (_React$Component2) {
1599
1634
  noDataImage: _variables2.default.nodataIcon,
1600
1635
  currentPageKey: 'page'
1601
1636
  },
1602
- _react2.default.createElement(ListItem, { type: '2', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1637
+ _react2.default.createElement(ListItem, { listTabType: '2', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1603
1638
  )
1604
1639
  )
1605
1640
  ) : "",
@@ -1626,7 +1661,7 @@ var PageHome = function (_React$Component2) {
1626
1661
  items: this.state.categoryList
1627
1662
  }],
1628
1663
  onConfirm: function onConfirm(data) {
1629
- _this6.filterConfirm(data);
1664
+ _this7.filterConfirm(data);
1630
1665
  } }),
1631
1666
  _react2.default.createElement(
1632
1667
  'div',
@@ -1643,7 +1678,7 @@ var PageHome = function (_React$Component2) {
1643
1678
  noDataImage: _variables2.default.nodataIcon,
1644
1679
  currentPageKey: 'page'
1645
1680
  },
1646
- _react2.default.createElement(ListItem, { type: '3', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1681
+ _react2.default.createElement(ListItem, { listTabType: '3', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1647
1682
  )
1648
1683
  )
1649
1684
  ) : "",
@@ -1670,7 +1705,7 @@ var PageHome = function (_React$Component2) {
1670
1705
  items: this.state.categoryList
1671
1706
  }],
1672
1707
  onConfirm: function onConfirm(data) {
1673
- _this6.filterConfirm(data);
1708
+ _this7.filterConfirm(data);
1674
1709
  } }),
1675
1710
  _react2.default.createElement(
1676
1711
  'div',
@@ -1688,7 +1723,11 @@ var PageHome = function (_React$Component2) {
1688
1723
  currentPageKey: 'page'
1689
1724
 
1690
1725
  },
1691
- _react2.default.createElement(ListItem, { type: '4', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this) })
1726
+ _react2.default.createElement(ListItem, { listTabType: '4', ableClick: this.state.ableClick, isBatch: this.state.isBatch, fromType: this.state.type, projectPath: this.state.projectPath, updateAbleClick: this.updateAbleClick.bind(this), onRefresh: function onRefresh() {
1727
+ if (_this7.refs.transaction_myself_ref) {
1728
+ _this7.refs.transaction_myself_ref.fetchData({ type: 'refresh' });
1729
+ }
1730
+ } })
1692
1731
  )
1693
1732
  )
1694
1733
  ) : ""