fmui-base 1.0.0

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.
Files changed (66) hide show
  1. package/lib/button/button.js +109 -0
  2. package/lib/button/index.js +16 -0
  3. package/lib/care/care.js +55 -0
  4. package/lib/care/index.js +16 -0
  5. package/lib/comment_list/List.js +101 -0
  6. package/lib/comment_list/List.less +3 -0
  7. package/lib/comment_list/index.js +16 -0
  8. package/lib/db/db.js +789 -0
  9. package/lib/db/variables.js +110 -0
  10. package/lib/form/answer.less +3 -0
  11. package/lib/form/form.js +2048 -0
  12. package/lib/form/index.js +16 -0
  13. package/lib/form/subForm.js +724 -0
  14. package/lib/form/table.js +1071 -0
  15. package/lib/index.js +43 -0
  16. package/lib/loading/index.js +16 -0
  17. package/lib/loading/loading.js +56 -0
  18. package/lib/no_data/index.js +16 -0
  19. package/lib/no_data/no_data.js +72 -0
  20. package/lib/poppage/check.js +572 -0
  21. package/lib/poppage/check.less +0 -0
  22. package/lib/poppage/index.js +16 -0
  23. package/lib/poppage/table/index.js +16 -0
  24. package/lib/poppage/table/table.js +776 -0
  25. package/lib/poppage/table/table.less +35 -0
  26. package/lib/poppage/tree/index.js +16 -0
  27. package/lib/poppage/tree/tree.js +705 -0
  28. package/lib/poppage/tree/tree.less +9 -0
  29. package/lib/poppage/treetable/index.js +16 -0
  30. package/lib/poppage/treetable/treetable.js +445 -0
  31. package/lib/poppage/treetable/treetable.less +9 -0
  32. package/lib/poppage/utils.js +40 -0
  33. package/lib/positioning/index.js +16 -0
  34. package/lib/positioning/positioning.js +136 -0
  35. package/lib/process_batch/index.js +16 -0
  36. package/lib/process_batch/pageHome.less +3 -0
  37. package/lib/process_batch/processBatch.js +1669 -0
  38. package/lib/process_info/FlowChart.js +231 -0
  39. package/lib/process_info/RelationProcess.js +173 -0
  40. package/lib/process_info/index.js +16 -0
  41. package/lib/process_info/processInfo.js +6090 -0
  42. package/lib/process_list/index.js +16 -0
  43. package/lib/process_list/processList.js +1378 -0
  44. package/lib/process_list/processList.less +5 -0
  45. package/lib/select-fileno/index.js +16 -0
  46. package/lib/select-fileno/pageHome.js +722 -0
  47. package/lib/select-fileno/pageHome.less +0 -0
  48. package/lib/select-fileno/utils.js +40 -0
  49. package/lib/select-serialnumber/index.js +16 -0
  50. package/lib/select-serialnumber/pageHome.js +651 -0
  51. package/lib/select-serialnumber/pageHome.less +0 -0
  52. package/lib/select-serialnumber/pageHome1.js +649 -0
  53. package/lib/select-serialnumber/utils.js +40 -0
  54. package/lib/selectMember/index.js +16 -0
  55. package/lib/selectMember/select.js +7061 -0
  56. package/lib/selectMember/select.less +25 -0
  57. package/lib/selectMember/utils.js +40 -0
  58. package/lib/selectMember//347/247/273/345/212/250/347/253/257/351/200/211/344/272/272/347/273/204/344/273/266/350/257/264/346/230/216/346/226/207/346/241/243.md +145 -0
  59. package/lib/signature/draw.js +268 -0
  60. package/lib/signature/index.js +16 -0
  61. package/lib/signature/sign.js +359 -0
  62. package/lib/signature/sign.less +73 -0
  63. package/lib/signature//346/211/213/345/206/231/347/255/276/345/220/215/344/275/277/347/224/250/346/226/207/346/241/243.md +12 -0
  64. package/lib/upload/index.js +16 -0
  65. package/lib/upload/upload.js +566 -0
  66. package/package.json +72 -0
@@ -0,0 +1,1378 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = undefined;
7
+
8
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
9
+
10
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
11
+
12
+ var _react = require('react');
13
+
14
+ var _react2 = _interopRequireDefault(_react);
15
+
16
+ var _Tab = require('saltui/lib/Tab');
17
+
18
+ var _Tab2 = _interopRequireDefault(_Tab);
19
+
20
+ var _SearchBar = require('saltui/lib/SearchBar');
21
+
22
+ var _SearchBar2 = _interopRequireDefault(_SearchBar);
23
+
24
+ var _ScrollList = require('saltui/lib/ScrollList');
25
+
26
+ var _ScrollList2 = _interopRequireDefault(_ScrollList);
27
+
28
+ var _Boxs = require('saltui/lib/Boxs');
29
+
30
+ var _Boxs2 = _interopRequireDefault(_Boxs);
31
+
32
+ var _Toast = require('saltui/lib/Toast');
33
+
34
+ var _Toast2 = _interopRequireDefault(_Toast);
35
+
36
+ var _Button = require('saltui/lib/Button');
37
+
38
+ var _Button2 = _interopRequireDefault(_Button);
39
+
40
+ var _Popup = require('saltui/lib/Popup');
41
+
42
+ var _Popup2 = _interopRequireDefault(_Popup);
43
+
44
+ var _AngleRight = require('salt-icon/lib/AngleRight');
45
+
46
+ var _AngleRight2 = _interopRequireDefault(_AngleRight);
47
+
48
+ var _variables = require('../db/variables');
49
+
50
+ var _variables2 = _interopRequireDefault(_variables);
51
+
52
+ var _db = require('../db/db');
53
+
54
+ var _db2 = _interopRequireDefault(_db);
55
+
56
+ require('./processList.less');
57
+
58
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59
+
60
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
61
+
62
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
63
+
64
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
65
+
66
+ var HBox = _Boxs2.default.HBox,
67
+ Box = _Boxs2.default.Box;
68
+
69
+ var searchVal = '';
70
+
71
+ var ListItem = function (_React$Component) {
72
+ _inherits(ListItem, _React$Component);
73
+
74
+ function ListItem(props) {
75
+ _classCallCheck(this, ListItem);
76
+
77
+ var _this = _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).call(this, props));
78
+
79
+ setPageTitle('办理');
80
+ return _this;
81
+ }
82
+
83
+ _createClass(ListItem, [{
84
+ key: 'clickDetail',
85
+ value: function clickDetail(event) {
86
+ if (this.props.isBatch) {
87
+ //批量状态
88
+ var checkDiv = $(event.currentTarget).find(".t-checkbox-field-icon-list");
89
+ if (checkDiv.hasClass("un-checked")) {
90
+ //判断是否未选中
91
+ checkDiv.removeClass("un-checked");
92
+ checkDiv.addClass("checked");
93
+ } else {
94
+ checkDiv.removeClass("checked");
95
+ checkDiv.addClass("un-checked");
96
+ }
97
+ } else {
98
+ if (this.props.ableClick) {
99
+ var itemInfo = this.props.data;
100
+ console.log(itemInfo);
101
+ var param_processKey = itemInfo.processKey; // 流程类型code
102
+ var param_formKey = itemInfo.formKey; // 表单id
103
+ var param_businessKey = itemInfo.businessKey; // 表单数据id;
104
+ var param_startUserId = itemInfo.startUserId; // 流程发起人id
105
+ var param_list_type = this.props.type; // 列表类型 待办-0,待阅-1,
106
+ var processName = itemInfo.processName; // 流程名称
107
+ var module = itemInfo.module; // 流程名称
108
+
109
+ var taskId = '';
110
+ var processInstanceId = itemInfo.processInstanceId;
111
+ if (param_list_type == '2') {
112
+ taskId = itemInfo.taskId;
113
+ } else {
114
+ taskId = itemInfo.id;
115
+ }
116
+ var loginUserId = getLoginUserInfo().userId;
117
+ // location.hash = 'approval/approval-details/detail-servlet/' + param_list_type + '/1/' + param_processKey + '/' + param_formKey + '/' +param_businessKey +
118
+ // '/' + param_startUserId;
119
+ // alert(searchVal);
120
+ var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
121
+ if (searchVal != '') {
122
+ url += "/" + searchVal;
123
+ }
124
+ decodeURI(url);
125
+ location.hash = url;
126
+ // window.salt.router.push({
127
+ // id: 'detailPage',
128
+ // url: url,
129
+ // anim: 1,
130
+ // needPost: true,
131
+ // param: {
132
+ // title: processName,
133
+ // }
134
+ // }).then().catch((e) => {
135
+ // // alert(e);
136
+ // });
137
+ } else {
138
+ this.props.updateAbleClick(true);
139
+ }
140
+ }
141
+ }
142
+ }, {
143
+ key: 'render',
144
+ value: function render() {
145
+ var data = this.props;
146
+ var checkIsNotComplete = true;
147
+ if (data.type == 0) {
148
+ //待办
149
+ checkIsNotComplete = true;
150
+ } else if (data.type == 1) {
151
+ //待阅
152
+ if (data.status == 2) {
153
+ checkIsNotComplete = false;
154
+ } else {
155
+ checkIsNotComplete = true;
156
+ }
157
+ } else if (data.type == 2) {
158
+ //已办
159
+ if (data.status == 2) {
160
+ checkIsNotComplete = false;
161
+ } else {
162
+ checkIsNotComplete = true;
163
+ }
164
+ } else if (data.type == 3) {
165
+ //已阅
166
+ if (data.status == 2) {
167
+ checkIsNotComplete = false;
168
+ } else {
169
+ checkIsNotComplete = true;
170
+ }
171
+ } else {
172
+ //我的
173
+ if (typeof data.finishedTime == 'undefined' || data.finishedTime == null) {
174
+ checkIsNotComplete = true;
175
+ } else {
176
+ checkIsNotComplete = false;
177
+ }
178
+ }
179
+ var comleteName = data.name;
180
+ if (data.type == 0) {
181
+ //待办
182
+ comleteName = data.curStepName;
183
+ } else if (data.type == 1) {
184
+ //待阅
185
+ comleteName = data.nodeName;
186
+ } else if (data.type == 2) {
187
+ //已办
188
+ if (data.status == '2') {
189
+ comleteName = "结束";
190
+ checkIsNotComplete = false;
191
+ } else if (data.status == '3') {
192
+ comleteName = "作废";
193
+ checkIsNotComplete = false;
194
+ } else if (data.status == '4') {
195
+ comleteName = "取消";
196
+ checkIsNotComplete = false;
197
+ } else {
198
+ comleteName = data.curStepName;
199
+ }
200
+ } else if (data.type == 3) {
201
+ //已阅
202
+ comleteName = data.nodeName;
203
+ } else {
204
+ //我的
205
+ if (data.status == '2') {
206
+ comleteName = "结束";
207
+ checkIsNotComplete = false;
208
+ } else if (data.status == '3') {
209
+ comleteName = "作废";
210
+ checkIsNotComplete = false;
211
+ } else if (data.status == '4') {
212
+ comleteName = "取消";
213
+ checkIsNotComplete = false;
214
+ } else {
215
+ comleteName = data.curStepName;
216
+ }
217
+ }
218
+ if (typeof comleteName == 'undefined' || comleteName == null) {
219
+ checkIsNotComplete = false;
220
+ }
221
+
222
+ var assigneeName = data.startUserName;
223
+
224
+ if (data.type == 0) {
225
+ //待办
226
+ assigneeName = data.startUserName;
227
+ } else if (data.type == 1) {
228
+ //待阅
229
+ assigneeName = data.startUserName;
230
+ } else if (data.type == 2) {
231
+ //已办
232
+ assigneeName = data.curUserName;
233
+ } else if (data.type == 3) {
234
+ //已阅
235
+ assigneeName = data.assigneeName;
236
+ } else {
237
+ //我的
238
+ assigneeName = data.curUserName;
239
+ }
240
+ if (typeof assigneeName == 'undefined' || assigneeName == null) {
241
+ checkIsNotComplete = false;
242
+ }
243
+ var formatTime = data.createTime;
244
+
245
+ if (data.type == 0) {
246
+ //待办
247
+ formatTime = data.createTime;
248
+ } else if (data.type == 1) {
249
+ //待阅
250
+ formatTime = data.createTime;
251
+ } else if (data.type == 2) {
252
+ //已办
253
+ formatTime = data.dealTime;
254
+ } else if (data.type == 3) {
255
+ //已阅
256
+ formatTime = data.endTime;
257
+ } else {
258
+ //我的
259
+ formatTime = data.createTime;
260
+ }
261
+
262
+ var now = new Date();
263
+ var year = now.getFullYear(); //年
264
+ var month = now.getMonth() + 1; //月
265
+ var day = now.getDate(); //日
266
+ var hh = now.getHours(); //时
267
+ var mm = now.getMinutes(); //分
268
+ var ss = now.getSeconds(); //秒
269
+ var clock = year + "-";
270
+ if (month < 10) clock += "0";
271
+ clock += month + "-";
272
+ if (day < 10) clock += "0";
273
+ clock += day + " ";
274
+
275
+ if (hh < 10) clock += "0";
276
+
277
+ clock += hh + ":";
278
+ if (mm < 10) clock += '0';
279
+ clock += mm + ":";
280
+
281
+ if (ss < 10) clock += '0';
282
+ clock += ss;
283
+ return _react2.default.createElement(
284
+ 'div',
285
+ null,
286
+ _react2.default.createElement(
287
+ HBox,
288
+ { className: 't-BCf t-P16 t-PR12 dd-bottom-border', onClick: this.clickDetail.bind(this) },
289
+ _react2.default.createElement(
290
+ Box,
291
+ { 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 },
292
+ _react2.default.createElement('i', { className: 'iconfont icon-checked t-FCf t-FS14' })
293
+ ),
294
+ _react2.default.createElement(
295
+ Box,
296
+ { flex: 1 },
297
+ _react2.default.createElement(
298
+ 'div',
299
+ { className: 't-omit t-FC3 t-FS16 t-LH1_3 t-MR8' },
300
+ _react2.default.createElement('i', { className: this.props.urgency == '1' && this.props.type == 0 ? 'iconfont icon-caution t-FCoranger t-MR8 t-FS16' : 't-DN' }),
301
+ _react2.default.createElement(
302
+ 'i',
303
+ { className: this.props.dueDate != null && this.props.dueDate < clock && this.props.type == 0 ? 't-MR6 t-tag-orange t-FS10 t-P2' : 't-DN', 'data-reactid': '.0.0.1.0.$/=10.0.0.1.2' },
304
+ '\u8D85\u65F6'
305
+ ),
306
+ this.props.title,
307
+ _react2.default.createElement('i', { className: this.props.deleted != null && this.props.deleted == '1' && this.props.type == 0 ? 'iconfont icon-suspension t-MR8 t-FS16' : 't-DN' })
308
+ ),
309
+ _react2.default.createElement(
310
+ HBox,
311
+ { className: 't-FCddfontblue-40 t-LH1_3 t-PT8 t-FS14', vAlign: 'center' },
312
+ _react2.default.createElement(
313
+ HBox,
314
+ { vAlign: 'center' },
315
+ _react2.default.createElement(
316
+ Box,
317
+ null,
318
+ _react2.default.createElement('i', { className: 'iconfont icon-time t-MR4 t-FS14' })
319
+ ),
320
+ _react2.default.createElement(
321
+ Box,
322
+ null,
323
+ _react2.default.createElement(
324
+ 'span',
325
+ { className: 't-omit t-MR26' },
326
+ formatTime
327
+ )
328
+ )
329
+ ),
330
+ _react2.default.createElement(
331
+ HBox,
332
+ { flex: 1, vAlign: 'center' },
333
+ _react2.default.createElement(
334
+ Box,
335
+ null,
336
+ _react2.default.createElement(
337
+ 'span',
338
+ { className: checkIsNotComplete ? 't-list-text t-FCoranger t-omit t-MR4' : 't-list-text t-FCgreen t-omit t-MR4' },
339
+ checkIsNotComplete ? comleteName + ' ' + assigneeName : comleteName
340
+ )
341
+ )
342
+ )
343
+ )
344
+ ),
345
+ _react2.default.createElement(
346
+ Box,
347
+ null,
348
+ _react2.default.createElement(_AngleRight2.default, { width: 20, fill: '#ccc', className: 'demo-t-list-arrow' })
349
+ )
350
+ )
351
+ );
352
+ }
353
+ }]);
354
+
355
+ return ListItem;
356
+ }(_react2.default.Component);
357
+
358
+ ;
359
+
360
+ // const ItemCollapse = React.createClass({
361
+ // getInitialState: function () {//组件相关的状态对象
362
+ // return {
363
+ // show: false,
364
+ // itemList: []
365
+ // }
366
+ // },
367
+ // clickList: function (item) {
368
+ // if (this.props.ableClick) {
369
+ // let processInstanceId = item.processInstanceId;
370
+ // let taskId = item.id;
371
+ // //let handleUserId = item.assignee;
372
+ // let formId = item.formKey;
373
+ // let dataId = item.businessKey;
374
+ // let type = this.props.type;
375
+ // let processKey = this.props.processKey;
376
+ // let category = item.category;
377
+ // let id = "";
378
+ // // if(type == 1){//已办
379
+ // // id = processInstanceId;
380
+ // // }else{
381
+ // id = taskId;
382
+ // //}
383
+ // let url = "process/processDetails/" + id + "/" + formId + "/" + dataId + "/" + type + "/0/" + processInstanceId +"/approve";
384
+ // location.hash = url;
385
+ // } else {
386
+ // this.props.updateAbleClick(true);
387
+ // }
388
+ // },
389
+ // clickList2: function (show) {
390
+ // let t = this;
391
+ // if(!show){
392
+ // DB.FlowModuleAPI.getDoneTaskListByProcessId({
393
+ // processInstanceId:this.props.processInstanceId,
394
+ // module:"approve",
395
+ // })
396
+ // .then((content) => {
397
+ // t.setState({
398
+ // itemList:content.list,
399
+ // show: !show
400
+ // })
401
+ // }).catch((error) => {
402
+ // console.error(error);
403
+ // });
404
+ // }else{
405
+ // t.setState({
406
+ // itemList:[],
407
+ // show: !show
408
+ // })
409
+ // }
410
+ // },
411
+ // render: function () {
412
+ // let checkIsNotComplete = function (data) { //检查是否办理完成
413
+ // if (data.type == 0) { //待办
414
+ // return true;
415
+ // } else if (data.type == 1) { //待阅
416
+ // if(data.status == 2){
417
+ // return false;
418
+ // }else{
419
+ // return true;
420
+ // }
421
+ // } else if (data.type == 2) { //已办
422
+ // if (typeof (data.processEndTime) == 'undefined' || data.processEndTime == null) {
423
+ // if(typeof (data.curStepName) == 'undefined' || data.curStepName == null){
424
+ // return false;
425
+ // }
426
+ // return true;
427
+ // } else {
428
+ // return false;
429
+ // }
430
+ // } else if (data.type == 3) { //已阅
431
+ // if (data.status == 2) {
432
+ // return false;
433
+ // } else {
434
+ // return true;
435
+ // }
436
+ // } else { //我的
437
+ // if (typeof (data.finishedTime) == 'undefined' || data.finishedTime == null) {
438
+ // return true;
439
+ // } else {
440
+ // return false;
441
+ // }
442
+ // }
443
+ // }
444
+
445
+ // //主列表
446
+ // let comleteName = function (data) {
447
+ // if (data.type == 0) { //待办
448
+ // return data.name;
449
+ // } else if (data.type == 1) { //待阅
450
+ // return data.name;
451
+ // } else if (data.type == 2) { //已办
452
+ // if(data.status=='2') {
453
+ // return "结束";
454
+ // }else if(data.status=='3') {
455
+ // return "作废";
456
+ // }else if(data.status=='4') {
457
+ // return "取消";
458
+ // }
459
+ // return data.curStepName;
460
+ // } else if (data.type == 3) { //已阅
461
+ // return data.name;
462
+ // } else { //我的
463
+ // if(data.status=='2') {
464
+ // return "结束";
465
+ // }else if(data.status=='3') {
466
+ // return "作废";
467
+ // }else if(data.status=='4') {
468
+ // return "取消";
469
+ // }
470
+ // return data.curStepName;
471
+ // }
472
+ // }
473
+
474
+ // //子列表
475
+ // let comleteName2 = function (data,type) {
476
+ // if (type == 0) { //待办
477
+ // return data.name;
478
+ // } else if (type == 1) { //待阅
479
+ // return data.name;
480
+ // } else if (type == 2) { //已办
481
+ // return data.curStepName;
482
+ // } else if (type == 3) { //已阅
483
+ // return data.name;
484
+ // } else { //我的
485
+ // return data.curStepName;
486
+ // }
487
+ // }
488
+ // //主列表
489
+ // let assigneeName = function (data) {
490
+ // if (data.type == 0) { //待办
491
+ // return data.startUserName;
492
+ // } else if (data.type == 1) { //待阅
493
+ // return data.startUserName;
494
+ // } else if (data.type == 2) { //已办
495
+ // return data.curUserName;
496
+ // } else if (data.type == 3) { //已阅
497
+ // return data.assigneeName;
498
+ // } else { //我的
499
+ // return data.curUserName;
500
+ // }
501
+ // }
502
+
503
+ // //主列表
504
+ // let formatTime = function (data) {
505
+ // if (data.type == 0) { //待办
506
+ // return data.createTime;
507
+ // } else if (data.type == 1) { //待阅
508
+ // return data.createTime;
509
+ // } else if (data.type == 2) { //已办
510
+ // return data.createTime;
511
+ // } else if (data.type == 3) { //已阅
512
+ // return data.endTime;
513
+ // } else { //我的
514
+ // return data.createTime;
515
+ // }
516
+ // }
517
+
518
+ // //子列表
519
+ // let formatTime2 = function (data,type) {
520
+ // if (type == 0) { //待办
521
+ // return data.createTime;
522
+ // } else if (type == 1) { //待阅
523
+ // return data.createTime;
524
+ // } else if (type == 2) { //已办
525
+ // return data.endTime;
526
+ // } else if (type == 3) { //已阅
527
+ // return data.endTime;
528
+ // } else { //我的
529
+ // return data.createTime;
530
+ // }
531
+ // }
532
+
533
+ // //子列表
534
+ // let formatAction = function (data) {
535
+ // if (data.action == 'submit') {
536
+ // return "提交";;
537
+ // } else if (data.action == 'transfer') {
538
+ // return "转交";
539
+ // } else if (data.action == 'back') {
540
+ // return "驳回";
541
+ // } else if (data.action == 'jump') {
542
+ // return "跳转";
543
+ // } else if (data.action == 'end') {
544
+ // return "结束";
545
+ // } else if (data.action == 'cancel') {
546
+ // return "取消";
547
+ // } else if(data.action == 'finish'){
548
+ // return "完成";
549
+ // }
550
+ // }
551
+
552
+ // return <div className="t-BCf dd-bottom-border">
553
+ // <div className="dd-t-list-wrap text-omit" >
554
+ // <HBox className="t-BCf t-P16 t-PR12 " onClick={this.clickList2.bind(this)}>
555
+ // <Box flex={1}>
556
+ // <div className="t-omit t-FC3 t-FS16 t-LH1_3 t-MR8">
557
+ // <i className="t-list-title t-omit t-LH1_4"></i>
558
+ // {this.props.title}
559
+ // </div>
560
+ // <HBox className="t-FCddfontblue-40 t-LH1_3 t-PT8 t-FS14" vAlign="center">
561
+ // <HBox vAlign="center">
562
+ // <Box><i className="iconfont icon-time t-MR4 t-FS14"></i></Box>
563
+ // <Box><span className="t-omit t-MR26">{formatTime(this.props)}</span></Box>
564
+ // </HBox>
565
+ // <HBox flex={1} vAlign="center">
566
+ // <Box><span className={checkIsNotComplete(this.props)?'t-list-text t-FCoranger t-omit t-MR4':'t-list-text t-FCgreen t-omit t-MR4'}>{checkIsNotComplete(this.props)?comleteName(this.props)+' '+assigneeName(this.props):comleteName(this.props)}</span></Box>
567
+ // </HBox>
568
+ // </HBox>
569
+ // </Box>
570
+ // <Box>
571
+ // <AngleRight width={20} fill="#ccc" className="demo-t-list-arrow" />
572
+ // </Box>
573
+ // </HBox>
574
+ // </div>
575
+ // <div className={this.state.shows ? "t-DN" : "t-DN"}>
576
+ // {
577
+ // this.state.itemList.map(function (item, i) {
578
+ // return (
579
+ // <div className="dd-t-list-wrap t-PL0 t-ML67 dd-top-border" onClick={this.clickList.bind(this,item)}>
580
+ // <HBox flex={1} vAlign="center">
581
+ // <Box className="dd-t-list-text-content" flex={1}>
582
+ // <p className="dd-t-list-title t-LH1_4 t-omit">{item.title}</p>
583
+ // <div className="dd-t-list-time t-FBAC t-FBH">
584
+ // <i className="iconfont icon-time t-FCc t-MR4 t-FS14"></i>
585
+ // <span className="t-list-text t-omit t-MR12">{formatTime2(item,this.props.type)}</span>
586
+ // <i className="iconfont icon-approval t-MR4" style={{ fontSize: 14 }}></i>
587
+ // <span className="t-list-text t-omit t-MR4"> {comleteName2(item,this.props.type)}</span>
588
+ // <span className="t-list-text t-MR4 t-omit">{formatAction(item)}</span>
589
+ // </div>
590
+ // </Box>
591
+ // </HBox>
592
+
593
+ // </div>
594
+ // )
595
+ // }.bind(this))
596
+ // }
597
+ // </div>
598
+ // </div>;
599
+ // }
600
+ // });
601
+
602
+
603
+ var transactionIndex = {
604
+ activeTabIndex: ''
605
+ };
606
+
607
+ var PageHome = function (_React$Component2) {
608
+ _inherits(PageHome, _React$Component2);
609
+
610
+ function PageHome(props) {
611
+ _classCallCheck(this, PageHome);
612
+
613
+ document.addEventListener('resume', function (e) {});
614
+
615
+ var _this2 = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
616
+
617
+ setPageTitle('办理');
618
+ // 禁用iOS弹性事件
619
+ dd.ui.webViewBounce.disable();
620
+ //获取内容显示区域高度
621
+ var hasBottomTab = document.getElementById("hasBottomTab").value;
622
+ var winHeight = getScrollHigh(1, 1, hasBottomTab);
623
+
624
+ var constIndex = document.getElementById("activeTabIndex").value; //常量
625
+ var activeIndex = props.activeIndex ? props.activeIndex : 0;
626
+ var module = props.module ? props.module : "approve";
627
+ var searchVal = props.search;
628
+ if (constIndex == '') {
629
+ if (!activeIndex) {
630
+ activeIndex = '0';
631
+ }
632
+ constIndex = activeIndex;
633
+ } else {
634
+ activeIndex = constIndex;
635
+ }
636
+ _this2.state = {
637
+ activeTabIndex: activeIndex, // 待办-0;待阅-1;已办-2;已阅-3;我的-4
638
+ winHeight: winHeight,
639
+ page: 0,
640
+ search0: searchVal,
641
+ search1: searchVal,
642
+ search2: searchVal,
643
+ search3: searchVal,
644
+ search4: searchVal,
645
+ titleCount: {
646
+ undo: 0, // 待办
647
+ unread: 0, // 待阅
648
+ done: 0, // 已办
649
+ read: 0, // 已阅
650
+ myself: 0 // 我的
651
+ },
652
+ ableClick: true, //列表是否可点击,
653
+ isBatch: false,
654
+ noDataTip0: '暂无数据',
655
+ noDataTip1: '暂无数据',
656
+ noDataTip2: '暂无数据',
657
+ noDataTip3: '暂无数据',
658
+ noDataTip4: '暂无数据',
659
+ module: module
660
+ };
661
+
662
+ /**
663
+ * 办理页面搜索框设置项
664
+ * @type {{locale: string, instantSearch: boolean, hasHistory: boolean, searchDelay: number, onEnter: (()), onExit: (()), onChange: ((p1:*)), onSearch: ((p1?:*))}}
665
+ */
666
+ _this2.searchBarProps = {
667
+ placeholder: "请输入流程标题查询",
668
+ instantSearch: false,
669
+ hasHistory: false,
670
+ searchDelay: 450,
671
+ value: searchVal,
672
+ exitAfterEnter: false,
673
+ onEnter: function onEnter() {
674
+ console.log('enter');
675
+ },
676
+ onExit: _this2.onExit.bind(_this2),
677
+ onChange: function onChange(value) {
678
+ console.log('Typing>>' + value);
679
+ },
680
+ onSearch: _this2.onSearch.bind(_this2)
681
+ };
682
+
683
+ return _this2;
684
+ }
685
+
686
+ _createClass(PageHome, [{
687
+ key: 'componentDidMount',
688
+ value: function componentDidMount() {
689
+ var obj = $("title");
690
+ obj.text("办理");
691
+ var thirdMenuType = getLoginUserInfo().thirdMenuType;
692
+ if (thirdMenuType == 'DING') {
693
+ dd.biz.navigation.setTitle({
694
+ title: "办理", //控制标题文本,空字符串表示显示默认文本
695
+ onSuccess: function onSuccess(result) {},
696
+ onFail: function onFail(err) {}
697
+ });
698
+ } else if (thirdMenuType == 'MH' && typeof emp != "undefined") {
699
+ emp.window.setTitle({
700
+ title: {
701
+ text: "办理",
702
+ icon: '',
703
+ actionmenu: {}
704
+ }
705
+ });
706
+ }
707
+ $("#App").removeAttr("style");
708
+ _Popup2.default.hide();
709
+ // dd.ready(function(){
710
+ // document.addEventListener('resume', function(e) {
711
+ // this.refs.transaction_undo_ref.fetchData(param);
712
+ // this.refs.transaction_done_ref.fetchData(param);
713
+ // this.refs.transaction_myself_ref.fetchData(param);
714
+ // });
715
+ // });
716
+ }
717
+
718
+ /**
719
+ * tab页切换方法
720
+ * @param obj
721
+ */
722
+
723
+ }, {
724
+ key: 'handleTabChange',
725
+ value: function handleTabChange(obj) {
726
+ var t = this;
727
+ // this.setState({ activeTabIndex:obj.active });
728
+ var active = obj.active;
729
+ console.log(active);
730
+ document.getElementById("activeTabIndex").value = active;
731
+ this.setState({
732
+ activeTabIndex: active,
733
+ page: 0,
734
+ selectAll: true,
735
+ isBatch: false
736
+ });
737
+ var preActive = obj.preActive;
738
+ }
739
+
740
+ /**
741
+ * 获取页面 标题数量 方法
742
+ */
743
+
744
+ }, {
745
+ key: 'getTransactionTitleCount',
746
+ value: function getTransactionTitleCount() {}
747
+ // this.dispatch('getTransactionListDate', this.state.activeTabItemIndex);
748
+
749
+
750
+ /**
751
+ * ScrollList 请求数据之前的函数
752
+ */
753
+
754
+ }, {
755
+ key: 'beforeFetch0',
756
+ value: function beforeFetch0(data, from) {
757
+ this.setState({
758
+ ableClick: false
759
+ });
760
+ //alert("this.state.search: " + JSON.stringify(this.state.search) + ';;;param: ' + JSON.stringify(from));
761
+ data.corpId = corpid;
762
+ // data.code = ;
763
+ var search = from.title;
764
+ if (search == undefined) {
765
+ data.title = this.state.search0;
766
+ } else {
767
+ data.title = from.title;
768
+ }
769
+ return data;
770
+ }
771
+ }, {
772
+ key: 'beforeFetch1',
773
+ value: function beforeFetch1(data, from) {
774
+ this.setState({
775
+ ableClick: false
776
+ });
777
+ //alert("this.state.search: " + JSON.stringify(this.state.search) + ';;;param: ' + JSON.stringify(from));
778
+ data.corpId = corpid;
779
+ // data.code = ;
780
+ var search = from.title;
781
+ if (search == undefined) {
782
+ data.title = this.state.search1;
783
+ } else {
784
+ data.title = from.title;
785
+ }
786
+ return data;
787
+ }
788
+ }, {
789
+ key: 'beforeFetch2',
790
+ value: function beforeFetch2(data, from) {
791
+ this.setState({
792
+ ableClick: false
793
+ });
794
+ //alert("this.state.search: " + JSON.stringify(this.state.search) + ';;;param: ' + JSON.stringify(from));
795
+ data.corpId = corpid;
796
+ // data.code = ;
797
+ var search = from.title;
798
+ if (search == undefined) {
799
+ data.title = this.state.search2;
800
+ } else {
801
+ data.title = from.title;
802
+ }
803
+ return data;
804
+ }
805
+ }, {
806
+ key: 'beforeFetch3',
807
+ value: function beforeFetch3(data, from) {
808
+ this.setState({
809
+ ableClick: false
810
+ });
811
+ //alert("this.state.search: " + JSON.stringify(this.state.search) + ';;;param: ' + JSON.stringify(from));
812
+ data.corpId = corpid;
813
+ // data.code = ;
814
+ var search = from.title;
815
+ if (search == undefined) {
816
+ data.title = this.state.search3;
817
+ } else {
818
+ data.title = from.title;
819
+ }
820
+ return data;
821
+ }
822
+ }, {
823
+ key: 'beforeFetch4',
824
+ value: function beforeFetch4(data, from) {
825
+ this.setState({
826
+ ableClick: false
827
+ });
828
+ //alert("this.state.search: " + JSON.stringify(this.state.search) + ';;;param: ' + JSON.stringify(from));
829
+ data.corpId = corpid;
830
+ // data.code = ;
831
+ var search = from.title;
832
+ if (search == undefined) {
833
+ data.title = this.state.search4;
834
+ } else {
835
+ data.title = from.title;
836
+ }
837
+ return data;
838
+ }
839
+
840
+ /**
841
+ * ScrollList 得到返回数据
842
+ * @param data
843
+ * @returns {*}
844
+ */
845
+
846
+ }, {
847
+ key: 'processData',
848
+ value: function processData(data) {
849
+ this.setState({
850
+ ableClick: true
851
+ });
852
+ $('.empty-content').show();
853
+ return data;
854
+ }
855
+
856
+ /**
857
+ * 搜索栏,确认搜索
858
+ */
859
+
860
+ }, {
861
+ key: 'onSearch',
862
+ value: function onSearch(searchValue) {
863
+ searchVal = searchValue;
864
+ var url = 'approval/transaction/' + this.state.activeTabIndex + '/' + searchVal;
865
+ location.hash = url;
866
+ console.log('onSearch>>' + searchValue);
867
+ var noDataTip = '无搜索结果';
868
+ if (this.state.activeTabIndex == 0) {
869
+ this.setState({
870
+ search0: searchValue,
871
+ noDataTip0: noDataTip
872
+ });
873
+ var param = {
874
+ title: searchValue
875
+ };
876
+ this.refs.transaction_undo_ref.fetchData(param);
877
+ } else if (this.state.activeTabIndex == 1) {
878
+ this.setState({
879
+ search1: searchValue,
880
+ noDataTip1: noDataTip
881
+ });
882
+ var _param = {
883
+ title: searchValue
884
+ };
885
+ this.refs.transaction_unread_ref.fetchData(_param);
886
+ } else if (this.state.activeTabIndex == 2) {
887
+ this.setState({
888
+ search2: searchValue,
889
+ noDataTip2: noDataTip
890
+ });
891
+ var _param2 = {
892
+ title: searchValue
893
+ };
894
+ this.refs.transaction_done_ref.fetchData(_param2);
895
+ } else if (this.state.activeTabIndex == 3) {
896
+ this.setState({
897
+ search3: searchValue,
898
+ noDataTip3: noDataTip
899
+ });
900
+ var _param3 = {
901
+ title: searchValue
902
+ };
903
+ this.refs.transaction_read_ref.fetchData(_param3);
904
+ } else if (this.state.activeTabIndex == 4) {
905
+ this.setState({
906
+ search4: searchValue,
907
+ noDataTip4: noDataTip
908
+ });
909
+ var _param4 = {
910
+ title: searchValue
911
+ };
912
+ this.refs.transaction_myself_ref.fetchData(_param4);
913
+ }
914
+ }
915
+
916
+ /**
917
+ * 退出搜索栏工具
918
+ */
919
+
920
+ }, {
921
+ key: 'onExit',
922
+ value: function onExit() {
923
+ // debugger;
924
+ console.log('onExit!');
925
+ var noDataTip = '暂无数据';
926
+ var searchValue = '';
927
+ var url = 'approval/transaction/' + this.state.activeTabIndex;
928
+ location.hash = url;
929
+ searchVal = '';
930
+ $('.empty-content').hide();
931
+ if (this.state.activeTabIndex == 0) {
932
+ this.refs.transaction_undo_ref.fetchData({
933
+ title: searchValue
934
+ });
935
+ this.setState({
936
+ search0: '',
937
+ noDataTip0: noDataTip
938
+ });
939
+ } else if (this.state.activeTabIndex == 1) {
940
+ this.refs.transaction_unread_ref.fetchData({
941
+ title: searchValue
942
+ });
943
+ this.setState({
944
+ search1: '',
945
+ noDataTip1: noDataTip
946
+ });
947
+ } else if (this.state.activeTabIndex == 2) {
948
+ this.refs.transaction_done_ref.fetchData({
949
+ title: searchValue
950
+ });
951
+ this.setState({
952
+ search2: '',
953
+ noDataTip2: noDataTip
954
+ });
955
+ } else if (this.state.activeTabIndex == 3) {
956
+ this.refs.transaction_read_ref.fetchData({
957
+ title: searchValue
958
+ });
959
+ this.setState({
960
+ search3: '',
961
+ noDataTip3: noDataTip
962
+ });
963
+ } else if (this.state.activeTabIndex == 4) {
964
+ this.refs.transaction_myself_ref.fetchData({
965
+ title: searchValue
966
+ });
967
+ this.setState({
968
+ search4: '',
969
+ noDataTip4: noDataTip
970
+ });
971
+ }
972
+ }
973
+ }, {
974
+ key: 'onScrollRefresh',
975
+ value: function onScrollRefresh() {}
976
+ }, {
977
+ key: 'onLoad',
978
+ value: function onLoad() {}
979
+ //更新可点击状态
980
+
981
+ }, {
982
+ key: 'updateAbleClick',
983
+ value: function updateAbleClick(boolean) {
984
+ this.setState({
985
+ ableClick: boolean
986
+ });
987
+ }
988
+
989
+ //点击批量
990
+
991
+ }, {
992
+ key: 'clickBatch',
993
+ value: function clickBatch(boolean) {
994
+ this.setState({
995
+ isBatch: !boolean,
996
+ selectAll: true
997
+ });
998
+ }
999
+
1000
+ //全选
1001
+
1002
+ }, {
1003
+ key: 'selectAll',
1004
+ value: function selectAll() {
1005
+ var t = this;
1006
+ if (this.state.selectAll) {
1007
+ $(".t-checkbox-field-icon-list").map(function (index, item) {
1008
+ $(item).removeClass("un-checked");
1009
+ $(item).addClass("checked");
1010
+ });
1011
+ this.setState({
1012
+ selectAll: false
1013
+ });
1014
+ } else {
1015
+ $(".t-checkbox-field-icon-list").map(function (index, item) {
1016
+ $(item).removeClass("checked");
1017
+ $(item).addClass("un-checked");
1018
+ });
1019
+ this.setState({
1020
+ selectAll: true
1021
+ });
1022
+ }
1023
+ }
1024
+ }, {
1025
+ key: 'clickBatchButton',
1026
+ value: function clickBatchButton() {
1027
+ var t = this;
1028
+ if (this.state.activeTabIndex == 0) {
1029
+
1030
+ //遍历循环选中
1031
+ var taskIds = "";
1032
+ var processInstanceIds = "";
1033
+ var taskId = '';
1034
+ var _module = '';
1035
+ $(".checked").map(function (index, item) {
1036
+ taskIds += $(item).attr("data-taskid") + ",";
1037
+ processInstanceIds += $(item).attr("data-processInstanceId") + ",";
1038
+
1039
+ if (index == 0) {
1040
+ taskId = $(item).attr("data-taskid");
1041
+ _module = $(item).attr("data-module");
1042
+ }
1043
+ });
1044
+ //alert(taskIds);
1045
+ if (taskIds) {
1046
+ taskIds = taskIds.substring(0, taskIds.length - 1);
1047
+ processInstanceIds = processInstanceIds.substring(0, processInstanceIds.length - 1);
1048
+ } else {
1049
+ _Toast2.default.show({
1050
+ type: 'error',
1051
+ content: '请选择记录'
1052
+ });
1053
+ return;
1054
+ }
1055
+ _db2.default.FlowModuleAPI.getUndoTaskInfo({
1056
+ taskId: taskId,
1057
+ type: 0
1058
+ }).then(function (taskContent) {
1059
+ var buttonCodes = taskContent.buttons;
1060
+ var tasktype = taskContent.tasktype;
1061
+ if (tasktype != 'radom') {
1062
+ //是否有批示意见
1063
+ var commentIsNotNull = taskContent.commentIsNotNull; //审批意见是否为空
1064
+ if (!commentIsNotNull) {
1065
+ commentIsNotNull = '0';
1066
+ }
1067
+ var hasCommentField = taskContent.hasCommentField;
1068
+ if (!hasCommentField) {
1069
+ hasCommentField = '0';
1070
+ }
1071
+ var commentType = taskContent.commentType; //审批意见类型
1072
+ if (!commentType) {
1073
+ commentType = '-1';
1074
+ }
1075
+
1076
+ var signPicId = taskContent.signPicId; //签名图片id
1077
+ if (!signPicId) {
1078
+ signPicId = "-1";
1079
+ }
1080
+
1081
+ //紧急
1082
+ var urgent = taskContent.urgency;
1083
+ if (!urgent) {
1084
+ urgent = '0';
1085
+ }
1086
+
1087
+ //是否有锁
1088
+ var lock = taskContent.lock;
1089
+
1090
+ //流程编码
1091
+ var code = taskContent.code;
1092
+
1093
+ //是否是起点
1094
+ var isStart = taskContent.isStart == true ? "1" : "0";
1095
+
1096
+ location.hash = 'approval/batch/' + taskIds + "/" + processInstanceIds + "/1/" + code + "/" + hasCommentField + "/" + commentIsNotNull + "/" + commentType + "/" + signPicId + "/" + urgent + "/" + isStart + "/" + _module + "?project=mobileportal";
1097
+ } else {
1098
+ _Toast2.default.show({
1099
+ type: 'error',
1100
+ content: '当前勾选的任务中,含有不支持批量通过的任务!'
1101
+ });
1102
+ return;
1103
+ }
1104
+ }).catch(function (error) {
1105
+ _Toast2.default.show({
1106
+ type: 'error',
1107
+ content: error.errorMsg
1108
+ });
1109
+ });
1110
+ } else if (this.state.activeTabIndex == 1) {
1111
+ //待阅
1112
+ var taskIds = "";
1113
+ var processInstanceIds = "";
1114
+ var module = "";
1115
+ var permissionCode = "unRead";
1116
+ $(".checked").map(function (index, item) {
1117
+ taskIds += $(item).attr("data-taskid") + ",";
1118
+ processInstanceIds += $(item).attr("data-processInstanceId") + ",";
1119
+
1120
+ if (index == 0) {
1121
+ module = $(item).attr("data-module");
1122
+ }
1123
+ });
1124
+
1125
+ if (taskIds) {
1126
+ taskIds = taskIds.substring(0, taskIds.length - 1);
1127
+ processInstanceIds = processInstanceIds.substring(0, processInstanceIds.length - 1);
1128
+ } else {
1129
+ _Toast2.default.show({
1130
+ type: 'error',
1131
+ content: '请选择记录'
1132
+ });
1133
+ return;
1134
+ }
1135
+ _db2.default.FlowModuleAPI.readCompleteTaskBatch({
1136
+ taskIds: taskIds,
1137
+ processInstanceIds: processInstanceIds,
1138
+ module: module,
1139
+ permissionCode: permissionCode
1140
+ }).then(function (content) {
1141
+ _Toast2.default.show({
1142
+ type: 'success',
1143
+ content: '已阅成功'
1144
+ });
1145
+ t.setState({
1146
+ isBatch: false
1147
+ });
1148
+ t.refs.transaction_unread_ref.fetchData({
1149
+ value: t.state.search1
1150
+ });
1151
+ }).catch(function (error) {
1152
+ _Toast2.default.show({
1153
+ type: 'error',
1154
+ content: error.errorMsg
1155
+ });
1156
+ });
1157
+ }
1158
+ }
1159
+ }, {
1160
+ key: 'render',
1161
+ value: function render() {
1162
+ var tabBarStyle = {};
1163
+ var winHeightStyle = { height: this.state.winHeight };
1164
+
1165
+ var Item = function Item(props) {
1166
+ return _react2.default.createElement(
1167
+ 'div',
1168
+ { className: 'demo-item' },
1169
+ props.id + ' ' + props.name
1170
+ );
1171
+ };
1172
+
1173
+ return _react2.default.createElement(
1174
+ 'div',
1175
+ null,
1176
+ _react2.default.createElement(
1177
+ _Tab2.default,
1178
+ { activeKey: this.state.activeTabIndex, onChange: this.handleTabChange.bind(this), destroyInactiveTabPane: false },
1179
+ _react2.default.createElement(
1180
+ _Tab2.default.Item,
1181
+ { title: "待办" + (this.state.titleCount.undo == 0 ? '' : '(' + this.state.titleCount.undo + ')') },
1182
+ _react2.default.createElement(
1183
+ HBox,
1184
+ { vAlign: 'center', className: 't-BCf' },
1185
+ _react2.default.createElement(
1186
+ Box,
1187
+ { flex: 1 },
1188
+ _react2.default.createElement(_SearchBar2.default, _extends({ ref: 'search_undo_ref', className: 'searchActive' }, this.searchBarProps))
1189
+ ),
1190
+ _react2.default.createElement(
1191
+ Box,
1192
+ { className: this.state.isBatch ? "t-FCc t-PR16" : "t-FCddblue t-PR16", onClick: this.clickBatch.bind(this, this.state.isBatch) },
1193
+ '\u6279\u91CF'
1194
+ )
1195
+ ),
1196
+ _react2.default.createElement(
1197
+ 'div',
1198
+ { className: 'scrollHeight', style: winHeightStyle },
1199
+ _react2.default.createElement(
1200
+ _ScrollList2.default,
1201
+ {
1202
+ url: _variables2.default.URLS.transaction.undo + "&module=" + this.state.module,
1203
+ dataType: 'json',
1204
+ pageSize: 10,
1205
+ beforeFetch: this.beforeFetch0.bind(this),
1206
+ processData: this.processData.bind(this),
1207
+ ref: 'transaction_undo_ref',
1208
+ noDataImage: _variables2.default.nodataIcon,
1209
+ currentPageKey: 'page',
1210
+ onRefresh: this.onScrollRefresh.bind(this),
1211
+ noDataTip: this.state.noDataTip0,
1212
+ onLoad: this.onLoad.bind(this)
1213
+ },
1214
+ _react2.default.createElement(ListItem, { type: '0', isBatch: this.state.isBatch, ableClick: this.state.ableClick, updateAbleClick: this.updateAbleClick.bind(this) })
1215
+ )
1216
+ )
1217
+ ),
1218
+ _react2.default.createElement(
1219
+ _Tab2.default.Item,
1220
+ { title: "待阅" + (this.state.titleCount.unread == 0 ? '' : '(' + this.state.titleCount.unread + ')') },
1221
+ _react2.default.createElement(
1222
+ HBox,
1223
+ { vAlign: 'center', className: 't-BCf' },
1224
+ _react2.default.createElement(
1225
+ Box,
1226
+ { flex: 1 },
1227
+ _react2.default.createElement(_SearchBar2.default, _extends({ ref: 'search_unread_ref', className: 'searchActive' }, this.searchBarProps))
1228
+ ),
1229
+ _react2.default.createElement(
1230
+ Box,
1231
+ { className: this.state.isBatch ? "t-FCc t-PR16" : "t-FCddblue t-PR16", isBatch: this.state.isBatch, onClick: this.clickBatch.bind(this, this.state.isBatch) },
1232
+ '\u6279\u91CF'
1233
+ )
1234
+ ),
1235
+ _react2.default.createElement(
1236
+ 'div',
1237
+ { className: 'scrollHeight', style: winHeightStyle },
1238
+ _react2.default.createElement(
1239
+ _ScrollList2.default,
1240
+ {
1241
+ url: _variables2.default.URLS.transaction.unread + "&module=" + this.state.module,
1242
+ dataType: 'json',
1243
+ pageSize: 10,
1244
+ beforeFetch: this.beforeFetch1.bind(this),
1245
+ processData: this.processData.bind(this),
1246
+ ref: 'transaction_unread_ref',
1247
+ noDataImage: _variables2.default.nodataIcon,
1248
+ currentPageKey: 'page',
1249
+ noDataTip: this.state.noDataTip1
1250
+ },
1251
+ _react2.default.createElement(ListItem, { type: '1', ableClick: this.state.ableClick, isBatch: this.state.isBatch, updateAbleClick: this.updateAbleClick.bind(this) })
1252
+ )
1253
+ )
1254
+ ),
1255
+ _react2.default.createElement(
1256
+ _Tab2.default.Item,
1257
+ { title: "已办" + (this.state.titleCount.done == 0 ? '' : '(' + this.state.titleCount.done + ')') },
1258
+ _react2.default.createElement(
1259
+ HBox,
1260
+ { vAlign: 'center', className: 't-BCf' },
1261
+ _react2.default.createElement(
1262
+ Box,
1263
+ { flex: 1 },
1264
+ _react2.default.createElement(_SearchBar2.default, _extends({ ref: 'search_done_ref', className: 'searchActive' }, this.searchBarProps))
1265
+ )
1266
+ ),
1267
+ _react2.default.createElement(
1268
+ 'div',
1269
+ { className: 'scrollHeight', style: winHeightStyle },
1270
+ _react2.default.createElement(
1271
+ _ScrollList2.default,
1272
+ {
1273
+ url: _variables2.default.URLS.transaction.done + "&module=" + this.state.module,
1274
+ dataType: 'json',
1275
+ pageSize: 10,
1276
+ beforeFetch: this.beforeFetch2.bind(this),
1277
+ processData: this.processData.bind(this),
1278
+ ref: 'transaction_done_ref',
1279
+ noDataImage: _variables2.default.nodataIcon,
1280
+ currentPageKey: 'page',
1281
+ noDataTip: this.state.noDataTip2
1282
+ },
1283
+ _react2.default.createElement(ListItem, { type: '2', ableClick: this.state.ableClick, isBatch: this.state.isBatch, updateAbleClick: this.updateAbleClick.bind(this) })
1284
+ )
1285
+ )
1286
+ ),
1287
+ _react2.default.createElement(
1288
+ _Tab2.default.Item,
1289
+ { title: "已阅" + (this.state.titleCount.read == 0 ? '' : '(' + this.state.titleCount.read + ')') },
1290
+ _react2.default.createElement(
1291
+ HBox,
1292
+ { vAlign: 'center', className: 't-BCf' },
1293
+ _react2.default.createElement(
1294
+ Box,
1295
+ { flex: 1 },
1296
+ _react2.default.createElement(_SearchBar2.default, _extends({ ref: 'search_read_ref', className: 'searchActive' }, this.searchBarProps))
1297
+ )
1298
+ ),
1299
+ _react2.default.createElement(
1300
+ 'div',
1301
+ { className: 'scrollHeight', style: winHeightStyle },
1302
+ _react2.default.createElement(
1303
+ _ScrollList2.default,
1304
+ {
1305
+ url: _variables2.default.URLS.transaction.read + "&module=" + this.state.module,
1306
+ dataType: 'json',
1307
+ pageSize: 10,
1308
+ beforeFetch: this.beforeFetch3.bind(this),
1309
+ processData: this.processData.bind(this),
1310
+ ref: 'transaction_read_ref',
1311
+ noDataImage: _variables2.default.nodataIcon,
1312
+ currentPageKey: 'page',
1313
+ noDataTip: this.state.noDataTip3
1314
+ },
1315
+ _react2.default.createElement(ListItem, { type: '3', ableClick: this.state.ableClick, isBatch: this.state.isBatch, updateAbleClick: this.updateAbleClick.bind(this) })
1316
+ )
1317
+ )
1318
+ ),
1319
+ _react2.default.createElement(
1320
+ _Tab2.default.Item,
1321
+ { title: "我的" + (this.state.titleCount.myself == 0 ? '' : '(' + this.state.titleCount.myself + ')') },
1322
+ _react2.default.createElement(
1323
+ HBox,
1324
+ { vAlign: 'center', className: 't-BCf' },
1325
+ _react2.default.createElement(
1326
+ Box,
1327
+ { flex: 1 },
1328
+ _react2.default.createElement(_SearchBar2.default, _extends({ ref: 'search_myself_ref', className: 'searchActive' }, this.searchBarProps))
1329
+ )
1330
+ ),
1331
+ _react2.default.createElement(
1332
+ 'div',
1333
+ { className: 'scrollHeight', style: winHeightStyle },
1334
+ _react2.default.createElement(
1335
+ _ScrollList2.default,
1336
+ {
1337
+ url: _variables2.default.URLS.transaction.myself + "&module=" + this.state.module,
1338
+ dataType: 'json',
1339
+ pageSize: 10,
1340
+ beforeFetch: this.beforeFetch4.bind(this),
1341
+ processData: this.processData.bind(this),
1342
+ ref: 'transaction_myself_ref',
1343
+ noDataImage: _variables2.default.nodataIcon,
1344
+ currentPageKey: 'page',
1345
+ noDataTip: this.state.noDataTip4
1346
+ },
1347
+ _react2.default.createElement(ListItem, { type: '4', ableClick: this.state.ableClick, isBatch: this.state.isBatch, updateAbleClick: this.updateAbleClick.bind(this) })
1348
+ )
1349
+ )
1350
+ )
1351
+ ),
1352
+ _react2.default.createElement(
1353
+ 'div',
1354
+ { className: this.state.isBatch ? "t-P0 t-bottom-fixed" : "t-DN" },
1355
+ _react2.default.createElement(
1356
+ _Button2.default.Group,
1357
+ null,
1358
+ _react2.default.createElement(
1359
+ _Button2.default,
1360
+ { type: 'secondary', display: 'banner', onClick: this.selectAll.bind(this) },
1361
+ this.state.selectAll ? '全选' : '取消'
1362
+ ),
1363
+ _react2.default.createElement(
1364
+ _Button2.default,
1365
+ { type: 'primary', display: 'banner',
1366
+ onClick: this.clickBatchButton.bind(this) },
1367
+ this.state.activeTabIndex == 0 ? '通过' : '已阅'
1368
+ )
1369
+ )
1370
+ )
1371
+ );
1372
+ }
1373
+ }]);
1374
+
1375
+ return PageHome;
1376
+ }(_react2.default.Component);
1377
+
1378
+ exports.default = PageHome;