dlt-for-react 1.1.3 → 1.1.5

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 (188) hide show
  1. package/README.md +9 -1
  2. package/lib/components/KyContainerFrame/index.js +46 -39
  3. package/lib/index.js +7 -1
  4. package/lib/layouts/Top/index.js +1 -1
  5. package/lib/layouts/layout/index.js +77 -31
  6. package/lib/layouts/mixTop/index.js +3 -3
  7. package/lib/utils/createUuid.js +31 -11
  8. package/lib/utils/getLoginUser.js +1 -1
  9. package/lib/utils/getSize.js +11 -2
  10. package/lib/utils/index.js +35 -2
  11. package/package.json +1 -1
  12. package/lib/components/Button/index.js +0 -79
  13. package/lib/components/NHAuditPanel/config/Axios.js +0 -263
  14. package/lib/components/NHAuditPanel/config/api.js +0 -479
  15. package/lib/components/NHAuditPanel/config/data.js +0 -156
  16. package/lib/components/NHAuditPanel/config/typeMap.js +0 -1234
  17. package/lib/components/NHAuditPanel/config/uiValidate.js +0 -92
  18. package/lib/components/NHAuditPanel/index.js +0 -413
  19. package/lib/components/NHAuditPanel/node.js +0 -619
  20. package/lib/components/NHCascader/index.js +0 -355
  21. package/lib/components/NHCheckboxGroup/index.js +0 -135
  22. package/lib/components/NHDynamicFormShow/baseInfo/index.js +0 -194
  23. package/lib/components/NHDynamicFormShow/custom/index.js +0 -553
  24. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +0 -43
  25. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +0 -1113
  26. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +0 -263
  27. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +0 -880
  28. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +0 -171
  29. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +0 -865
  30. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +0 -138
  31. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +0 -571
  32. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +0 -147
  33. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +0 -474
  34. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +0 -139
  35. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +0 -506
  36. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +0 -143
  37. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +0 -1074
  38. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +0 -172
  39. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +0 -927
  40. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +0 -195
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +0 -1064
  42. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +0 -183
  43. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +0 -763
  44. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +0 -137
  45. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +0 -819
  46. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +0 -137
  47. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +0 -700
  48. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +0 -162
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +0 -743
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +0 -177
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +0 -848
  52. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +0 -138
  53. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +0 -777
  54. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +0 -161
  55. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +0 -706
  56. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +0 -130
  57. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +0 -413
  58. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +0 -135
  59. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +0 -1013
  60. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +0 -175
  61. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +0 -1345
  62. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +0 -274
  63. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +0 -669
  64. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +0 -134
  65. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +0 -378
  66. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +0 -120
  67. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +0 -638
  68. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +0 -133
  69. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +0 -965
  70. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +0 -237
  71. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +0 -823
  72. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +0 -188
  73. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +0 -401
  74. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +0 -472
  75. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +0 -304
  76. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +0 -375
  77. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +0 -118
  78. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +0 -62
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +0 -55
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +0 -1238
  81. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +0 -375
  82. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +0 -554
  83. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +0 -130
  84. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +0 -542
  85. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +0 -133
  86. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +0 -575
  87. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +0 -130
  88. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +0 -563
  89. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +0 -133
  90. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +0 -745
  91. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +0 -164
  92. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +0 -587
  93. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +0 -143
  94. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +0 -743
  95. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +0 -172
  96. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +0 -1410
  97. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +0 -274
  98. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +0 -755
  99. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +0 -130
  100. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +0 -814
  101. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +0 -188
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +0 -769
  103. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +0 -130
  104. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +0 -1004
  105. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +0 -126
  106. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +0 -503
  107. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +0 -149
  108. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +0 -379
  109. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +0 -148
  110. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +0 -748
  111. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +0 -135
  112. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +0 -762
  113. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +0 -134
  114. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +0 -682
  115. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +0 -135
  116. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +0 -152
  117. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +0 -783
  118. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +0 -764
  119. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +0 -138
  120. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +0 -677
  121. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +0 -138
  122. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +0 -1173
  123. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +0 -242
  124. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +0 -862
  125. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +0 -201
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +0 -196
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +0 -167
  128. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +0 -1096
  129. package/lib/components/NHDynamicFormShow/index.js +0 -647
  130. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +0 -279
  131. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +0 -206
  132. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +0 -419
  133. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +0 -401
  134. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +0 -271
  135. package/lib/components/NHImagePicker/index.js +0 -554
  136. package/lib/components/NHInputPicker/RadioGroup.js +0 -118
  137. package/lib/components/NHInputPicker/index.js +0 -62
  138. package/lib/components/NHInputPicker/input-const.js +0 -55
  139. package/lib/components/NHInputPicker/render.js +0 -1271
  140. package/lib/components/NHListView/index.js +0 -374
  141. package/lib/components/NHMapGeolocation/index.js +0 -537
  142. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +0 -104
  143. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +0 -138
  144. package/lib/components/NHMapGeolocation/style.js +0 -51
  145. package/lib/components/NHMultiSelect/index.js +0 -272
  146. package/lib/components/NHRadioGroup/index.js +0 -118
  147. package/lib/components/NHSelect/index.js +0 -364
  148. package/lib/components/NHTreeMenu/index.js +0 -126
  149. package/lib/components/NHTreeMenu/treeNode.js +0 -164
  150. package/lib/components/StuSelector/index.js +0 -611
  151. package/lib/layouts/KyInputPicker/edit-page.js +0 -585
  152. package/lib/layouts/KyInputPicker/index.js +0 -220
  153. package/lib/layouts/KyInputPicker/input-const.js +0 -134
  154. package/lib/layouts/KyInputPicker/render.js +0 -2477
  155. package/lib/layouts/KyInputPicker/setting-checkbox.js +0 -850
  156. package/lib/layouts/KyInputPicker/setting-datepicker.js +0 -430
  157. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +0 -443
  158. package/lib/layouts/KyInputPicker/setting-input.js +0 -555
  159. package/lib/layouts/KyInputPicker/setting-inputNumber.js +0 -612
  160. package/lib/layouts/KyInputPicker/setting-monthpicker.js +0 -434
  161. package/lib/layouts/KyInputPicker/setting-multiSelect.js +0 -532
  162. package/lib/layouts/KyInputPicker/setting-nhcascader.js +0 -584
  163. package/lib/layouts/KyInputPicker/setting-old-upload.js +0 -428
  164. package/lib/layouts/KyInputPicker/setting-radio.js +0 -468
  165. package/lib/layouts/KyInputPicker/setting-rangepicker.js +0 -466
  166. package/lib/layouts/KyInputPicker/setting-select.js +0 -534
  167. package/lib/layouts/KyInputPicker/setting-stu-selector.js +0 -507
  168. package/lib/layouts/KyInputPicker/setting-switch.js +0 -274
  169. package/lib/layouts/KyInputPicker/setting-tea-selector.js +0 -507
  170. package/lib/layouts/KyInputPicker/setting-textarea.js +0 -619
  171. package/lib/layouts/KyInputPicker/setting-timepicker.js +0 -437
  172. package/lib/layouts/KyInputPicker/setting-upload.js +0 -766
  173. package/lib/layouts/KyModal/buildTitle.js +0 -81
  174. package/lib/layouts/KyModal/dragM.js +0 -127
  175. package/lib/layouts/KyModal/index.js +0 -321
  176. package/lib/layouts/KyPreview/index.js +0 -219
  177. package/lib/layouts/KyUpload/index.js +0 -1155
  178. package/lib/utils/browserJudge.js +0 -33
  179. package/lib/utils/dynamicLoadCss.js +0 -14
  180. package/lib/utils/dynamicLoadJs.js +0 -21
  181. package/lib/utils/getStyle.js +0 -26
  182. package/lib/utils/getSuitHeight.js +0 -49
  183. package/lib/utils/hasAuth.js +0 -11
  184. package/lib/utils/loadJS.js +0 -40
  185. /package/lib/layouts/{login → Login}/index-pre.js +0 -0
  186. /package/lib/layouts/{login → Login}/index.js +0 -0
  187. /package/lib/layouts/{login → Login}/login.js +0 -0
  188. /package/lib/layouts/{login → Login}/lyPassword.js +0 -0
@@ -1,619 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _modal = require('antd-mobile/lib/modal');
8
-
9
- var _modal2 = _interopRequireDefault(_modal);
10
-
11
- var _toast = require('antd-mobile/lib/toast');
12
-
13
- var _toast2 = _interopRequireDefault(_toast);
14
-
15
- var _wingBlank = require('antd-mobile/lib/wing-blank');
16
-
17
- var _wingBlank2 = _interopRequireDefault(_wingBlank);
18
-
19
- var _button = require('antd-mobile/lib/button');
20
-
21
- var _button2 = _interopRequireDefault(_button);
22
-
23
- var _textareaItem = require('antd-mobile/lib/textarea-item');
24
-
25
- var _textareaItem2 = _interopRequireDefault(_textareaItem);
26
-
27
- var _switch = require('antd-mobile/lib/switch');
28
-
29
- var _switch2 = _interopRequireDefault(_switch);
30
-
31
- var _whiteSpace = require('antd-mobile/lib/white-space');
32
-
33
- var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
34
-
35
- var _list = require('antd-mobile/lib/list');
36
-
37
- var _list2 = _interopRequireDefault(_list);
38
-
39
- var _searchBar = require('antd-mobile/lib/search-bar');
40
-
41
- var _searchBar2 = _interopRequireDefault(_searchBar);
42
-
43
- var _listView = require('antd-mobile/lib/list-view');
44
-
45
- var _listView2 = _interopRequireDefault(_listView);
46
-
47
- 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; };
48
-
49
- 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; }; }();
50
-
51
- require('antd-mobile/lib/modal/style/css');
52
-
53
- require('antd-mobile/lib/toast/style/css');
54
-
55
- require('antd-mobile/lib/wing-blank/style/css');
56
-
57
- require('antd-mobile/lib/button/style/css');
58
-
59
- require('antd-mobile/lib/textarea-item/style/css');
60
-
61
- require('antd-mobile/lib/switch/style/css');
62
-
63
- require('antd-mobile/lib/white-space/style/css');
64
-
65
- require('antd-mobile/lib/list/style/css');
66
-
67
- require('antd-mobile/lib/search-bar/style/css');
68
-
69
- require('antd-mobile/lib/list-view/style/css');
70
-
71
- var _react = require('react');
72
-
73
- var _react2 = _interopRequireDefault(_react);
74
-
75
- var _rcForm = require('rc-form');
76
-
77
- var _index = require('../NHRadioGroup/index');
78
-
79
- var _index2 = _interopRequireDefault(_index);
80
-
81
- var _index3 = require('../NHCheckboxGroup/index');
82
-
83
- var _index4 = _interopRequireDefault(_index3);
84
-
85
- var _data = require('./config/data');
86
-
87
- var _api = require('./config/api');
88
-
89
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
90
-
91
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
92
-
93
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
94
-
95
- 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; }
96
-
97
- 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; }
98
-
99
- var isNotEmpty = function isNotEmpty(value) {
100
- return value !== undefined && value !== null && value !== '';
101
- };
102
-
103
- var AuditNode = function (_React$Component) {
104
- _inherits(AuditNode, _React$Component);
105
-
106
- function AuditNode(props) {
107
- _classCallCheck(this, AuditNode);
108
-
109
- var _this = _possibleConstructorReturn(this, (AuditNode.__proto__ || Object.getPrototypeOf(AuditNode)).call(this, props));
110
-
111
- _initialiseProps.call(_this);
112
-
113
- var dataSource = new _listView2.default.DataSource({
114
- // getRowData,
115
- // getSectionHeaderData: getSectionData,
116
- rowHasChanged: function rowHasChanged(row1, row2) {
117
- return row1 !== row2;
118
- }
119
- // sectionHeaderHasChanged: (s1, s2) => s1 !== s2,
120
- });
121
- _this.state = {
122
- allNodeAuditUsers: _extends({}, props.allNodeAuditUsers),
123
- WF_OtherUserList: [],
124
- dataSource: dataSource
125
- };
126
- _this.pageNum = 1;
127
- _this.keyword = '';
128
- _this.data = [];
129
- _this.data2 = [];
130
- return _this;
131
- }
132
-
133
- _createClass(AuditNode, [{
134
- key: 'componentDidMount',
135
- value: function componentDidMount() {
136
- this.setOtherUserList(this.props);
137
- }
138
- }, {
139
- key: 'UNSAFE_componentWillReceiveProps',
140
- value: function UNSAFE_componentWillReceiveProps(nextprops) {
141
- if (nextprops.processFormData !== this.props.processFormData) {
142
- this.setOtherUserList(nextprops);
143
- }
144
- if (nextprops.allNodeAuditUsers !== this.props.allNodeAuditUsers) {
145
- this.setState({ allNodeAuditUsers: _extends({}, nextprops.allNodeAuditUsers) });
146
- }
147
- }
148
- }, {
149
- key: 'render',
150
- value: function render() {
151
- var _this2 = this;
152
-
153
- var _props = this.props,
154
- _props$processFormDat = _props.processFormData,
155
- _props$processFormDat2 = _props$processFormDat.currentNodeName,
156
- currentNodeName = _props$processFormDat2 === undefined ? "" : _props$processFormDat2,
157
- _props$processFormDat3 = _props$processFormDat.nextNodeConfig,
158
- nextNodeConfig = _props$processFormDat3 === undefined ? "[]" : _props$processFormDat3,
159
- _props$processFormDat4 = _props$processFormDat.currentNodeConfig,
160
- currentNodeConfig = _props$processFormDat4 === undefined ? "{}" : _props$processFormDat4,
161
- _props$processFormDat5 = _props$processFormDat.currentNodeToolbar,
162
- currentNodeToolbar = _props$processFormDat5 === undefined ? "[]" : _props$processFormDat5,
163
- _props$processFormDat6 = _props$processFormDat.isFirstNodeFlag,
164
- isFirstNodeFlag = _props$processFormDat6 === undefined ? "true" : _props$processFormDat6,
165
- _props$form = _props.form,
166
- getFieldProps = _props$form.getFieldProps,
167
- getFieldValue = _props$form.getFieldValue,
168
- getFieldsValue = _props$form.getFieldsValue,
169
- selectedNextNodeList = _props.selectedNextNodeList;
170
-
171
- var _nextNodeConfig = nextNodeConfig ? JSON.parse(nextNodeConfig) : []; // 后继节点
172
- var _currentNodeConfig = currentNodeConfig !== "" ? JSON.parse(currentNodeConfig) : {}; // 当前节点
173
- var _currentNodeToolbar = currentNodeToolbar ? JSON.parse(currentNodeToolbar) : []; // 操作按钮
174
- var _isFirstNodeFlag = isFirstNodeFlag ? JSON.parse(isFirstNodeFlag) : true; // 是否首环节
175
- var _isSendToOtherUser = getFieldValue("WF_SendToOtherUser"); // 是否转他人处理
176
- // console.log(this.props)
177
- var selectedNodeId = isNotEmpty(getFieldValue('WF_NextNodeid')) ? getFieldValue('WF_NextNodeid') : selectedNextNodeList[0];
178
- var selectedNode = _nextNodeConfig.find(function (item) {
179
- return item.NODEID === selectedNodeId;
180
- }) || {};
181
- // console.log(selectedNodeId, selectedNode)
182
- var auditUsers = this.state.allNodeAuditUsers['WF_' + selectedNodeId] || [];
183
- // console.log(auditUsers)
184
- auditUsers = auditUsers.filter(function (item) {
185
- return isNotEmpty(item.value) && isNotEmpty(item.label);
186
- });
187
- var renderNextNodeItem = function renderNextNodeItem() {
188
- var isHide = _currentNodeToolbar.some(function (item) {
189
- return ["BU1006", "BU1007", "BU1009", "BU1010"].includes(item.TOOLBARID);
190
- });
191
-
192
- // 转他人处理、以下按钮:BU1006, BU1007, BU1009, BU1010 不需要选择后继节点选项
193
- if (_isSendToOtherUser || isHide) {
194
- return null;
195
- }
196
- // console.log(selectedNode, selectedNextNodeList)
197
- return _react2.default.createElement(
198
- _react2.default.Fragment,
199
- null,
200
- _react2.default.createElement(_index2.default, _extends({
201
- label: _react2.default.createElement(
202
- 'span',
203
- null,
204
- '\u8BF7\u9009\u62E9\u4E0B\u4E00\u8282\u70B9(\u5F53\u524D\u8282\u70B9:',
205
- currentNodeName || _currentNodeConfig.NODENAME,
206
- ')'
207
- ),
208
- options: _nextNodeConfig.map(function (item) {
209
- var row = {};
210
- row.value = item.NODEID;
211
- row.label = item.NodeName_Router;
212
- return row;
213
- })
214
- }, getFieldProps('WF_NextNodeid', {
215
- initialValue: selectedNextNodeList[0],
216
- rules: [{ required: true, message: '下一节点不能为空' }]
217
- }))),
218
- _react2.default.createElement(
219
- 'div',
220
- {
221
- style: {
222
- display: selectedNode.USEPOSTOWNER === "1" && selectedNode.initType !== 'end' ? "block" : "none"
223
- }
224
- },
225
- _react2.default.createElement(_index4.default, _extends({
226
- label: '\u5BA1\u6838\u4EBA'
227
- }, getFieldProps('WF_' + selectedNodeId, {
228
- initialValue: auditUsers.map(function (item) {
229
- return item.value;
230
- }),
231
- rules: [{ required: true, message: '审核人不能为空' }]
232
- }), {
233
- options: auditUsers
234
- })),
235
- _react2.default.createElement(_searchBar2.default, { placeholder: '搜索审核人', onSubmit: _this2.searchSubmit }),
236
- _react2.default.createElement(_listView2.default, {
237
- dataSource: _this2.state.dataSource,
238
- renderRow: function renderRow(rowData, sectionID, rowID, highlightRow) {
239
- return _react2.default.createElement(
240
- _list2.default.Item,
241
- { onClick: function onClick() {
242
- return _this2.handleListClick(rowData);
243
- } },
244
- rowData.userName,
245
- '-',
246
- rowData.userId,
247
- '-',
248
- rowData.departmentName
249
- );
250
- },
251
- pageSize: 4,
252
- style: { height: _this2.data.length === 0 ? 0 : 100, overflow: 'auto' },
253
- onEndReached: _this2.handleEndReached,
254
- onEndReachedThreshold: 20
255
- }),
256
- _react2.default.createElement(_whiteSpace2.default, null)
257
- )
258
- );
259
- };
260
- return _react2.default.createElement(
261
- 'div',
262
- null,
263
- renderNextNodeItem(),
264
- _currentNodeConfig.NoReassFlag !== "1" && !_isFirstNodeFlag && _react2.default.createElement(
265
- _react2.default.Fragment,
266
- null,
267
- _react2.default.createElement(
268
- _list2.default.Item,
269
- {
270
- extra: _react2.default.createElement(_switch2.default, getFieldProps("WF_SendToOtherUser", {
271
- valuePropName: "checked",
272
- initialValue: false,
273
- onChange: function onChange() {
274
- _this2.data = [];
275
- _this2.pageNum = 1;
276
- _this2.keyword = '';
277
- }
278
- }))
279
- },
280
- '\u8F6C\u4ED6\u4EBA\u5904\u7406'
281
- ),
282
- _isSendToOtherUser && _react2.default.createElement(
283
- _react2.default.Fragment,
284
- null,
285
- _react2.default.createElement(_index4.default, _extends({
286
- label: '\u5BA1\u6838\u4EBA'
287
- }, getFieldProps('WF_OtherUserList', {
288
- initialValue: this.state['WF_OtherUserList'] ? this.state['WF_OtherUserList'].map(function (item) {
289
- return item.value;
290
- }) : [],
291
- rules: [{ required: true, message: '审核人不能为空' }]
292
- }), {
293
- options: this.state['WF_OtherUserList']
294
- })),
295
- _react2.default.createElement(_searchBar2.default, { placeholder: '搜索审核人', onSubmit: this.searchSubmit }),
296
- _react2.default.createElement(_listView2.default, {
297
- dataSource: this.state.dataSource,
298
- renderRow: function renderRow(rowData, sectionID, rowID, highlightRow) {
299
- return _react2.default.createElement(
300
- _list2.default.Item,
301
- { onClick: function onClick() {
302
- return _this2.handleListClick2(rowData);
303
- } },
304
- rowData.userName,
305
- '-',
306
- rowData.userId,
307
- '-',
308
- rowData.departmentName
309
- );
310
- },
311
- pageSize: 4,
312
- style: { height: this.data.length === 0 ? 0 : 100, overflow: 'auto' },
313
- onEndReached: this.handleEndReached,
314
- onEndReachedThreshold: 20
315
- }),
316
- _react2.default.createElement(_whiteSpace2.default, null)
317
- )
318
- ),
319
- _react2.default.createElement(_textareaItem2.default, _extends({
320
- title: '\u529E\u7406\u610F\u89C1'
321
- }, getFieldProps('WF_Remark'), {
322
- placeholder: '\u8BF7\u586B\u5199\u529E\u7406\u610F\u89C1',
323
- rows: 2
324
- })),
325
- _react2.default.createElement(_whiteSpace2.default, null),
326
- _react2.default.createElement(
327
- _wingBlank2.default,
328
- null,
329
- _currentNodeToolbar.map(function (item, index) {
330
- var _id = item.TOOLBARID,
331
- _name = item.TOOLBARNAME;
332
- // 首环节不显示转他人处理按钮
333
- if (_isFirstNodeFlag && _id === "BU1002") {
334
- return null;
335
- }
336
- // 不显示暂存文档按钮
337
- if (_id === 'BU1022') {
338
- return null;
339
- }
340
- if (["BU1001", "BU1005", "BU1004"].includes(_id) && _isSendToOtherUser || _id === "BU1002" && !_isSendToOtherUser) {
341
- return null;
342
- }
343
- return _react2.default.createElement(
344
- _button2.default,
345
- {
346
- key: _id,
347
- type: index === 0 ? 'primary' : '',
348
- style: { marginRight: 4 },
349
- onClick: function onClick() {
350
- return _this2.handleNodeToolBarClick(item);
351
- },
352
- inline: true, size: 'small'
353
- },
354
- _name
355
- );
356
- })
357
- )
358
- );
359
- }
360
- }]);
361
-
362
- return AuditNode;
363
- }(_react2.default.Component);
364
-
365
- var _initialiseProps = function _initialiseProps() {
366
- var _this3 = this;
367
-
368
- this.setOtherUserList = function (props) {
369
- var currentNodeConfig = props.processFormData.currentNodeConfig;
370
-
371
- if (currentNodeConfig) {
372
- var _currentNodeConfig = currentNodeConfig !== "" ? JSON.parse(currentNodeConfig) : {};
373
- if (_currentNodeConfig.ReassignmentOwner) {
374
- var WF_OtherUserList = _currentNodeConfig.ReassignmentOwner.split(",").map(function (item, index) {
375
- return {
376
- label: _currentNodeConfig.ReassignmentOwner_show.split(",")[index],
377
- value: item
378
- };
379
- });
380
- _this3.setState({ WF_OtherUserList: WF_OtherUserList });
381
- }
382
- }
383
- };
384
-
385
- this.handleNodeToolBarClick = function (btnInfo) {
386
- var btnId = btnInfo.TOOLBARID,
387
- btnName = btnInfo.TOOLBARNAME,
388
- actionId = _data.btnActionIdMap[btnId];
389
- // 判断操作按钮是否有设置对应的id
390
-
391
- if (!actionId) {
392
- _toast2.default.fail("未绑定的actionId!");
393
- return false;
394
- }
395
- // 操作按钮提示信息
396
- var _msg = {
397
- BU1001: "您确认要提交本流程吗?",
398
- BU1002: "您确认要转交本文档吗?"
399
- };
400
- // 回退上一环节
401
- if (btnId === 'BU1004') {
402
- _modal2.default.alert('', _msg[btnId] ? _msg[btnId] : '\u60A8\u786E\u8BA4\u8981' + btnName + '\u5417?', [{ text: '取消', onPress: function onPress() {} }, {
403
- text: '确定', onPress: function onPress() {
404
- var params = _this3.getAllFormData();
405
- var _params = _extends({}, params, {
406
- actionId: actionId
407
- });
408
- console.log(_params);
409
- _this3.props.submit(_params);
410
- }
411
- }]);
412
- return;
413
- }
414
-
415
- // 回退首环节按钮
416
- if (btnId === "BU1005") {
417
- _modal2.default.operation([{
418
- text: '需要用户再次提交审批', onPress: function onPress() {
419
- var data = _this3.getAllFormData();
420
- var params = _extends({}, data, {
421
- WF_IsBackFlag: '1',
422
- actionId: "GoToFirstNode"
423
- });
424
- console.log(params);
425
- // this.props.submit(params);
426
- }
427
- }, {
428
- text: '用户修改后直接提交给我', onPress: function onPress() {
429
- var data = _this3.getAllFormData();
430
- var params = _extends({}, data, {
431
- WF_IsBackFlag: '2',
432
- actionId: "GoToFirstNode"
433
- });
434
- console.log(params);
435
- // this.props.submit(params);
436
- }
437
- }]);
438
- return;
439
- }
440
- _this3.props.form.validateFields(function (err, values) {
441
- if (err) {
442
- (function () {
443
- var msg = [];
444
- for (var error in err) {
445
- err[error].errors.forEach(function (item) {
446
- return msg.push(item.message);
447
- });
448
- }
449
- _toast2.default.fail(msg[0]);
450
- })();
451
- } else {
452
- var params = _this3.getAllFormData();
453
- var _params = _extends({}, params, {
454
- actionId: actionId
455
- });
456
- _modal2.default.alert('', _msg[btnId] ? _msg[btnId] : '\u60A8\u786E\u8BA4\u8981' + btnName + '\u5417?', [{ text: '取消', onPress: function onPress() {} }, {
457
- text: '确定', onPress: function onPress() {
458
- console.log(_params);
459
- // this.props.submit(_params);
460
- }
461
- }]);
462
- return;
463
- }
464
- });
465
- };
466
-
467
- this.getAllFormData = function () {
468
- var processFormData = _this3.props.processFormData;
469
-
470
- var values = _this3.props.form.getFieldsValue();
471
- var WF_NextNodeid = values.WF_NextNodeid,
472
- _values$WF_SelCopyUse = values.WF_SelCopyUser,
473
- WF_SelCopyUser = _values$WF_SelCopyUse === undefined ? [] : _values$WF_SelCopyUse,
474
- WF_Remark = values.WF_Remark,
475
- WF_OtherUserList = values.WF_OtherUserList,
476
- WF_SendToOtherUser = values.WF_SendToOtherUser,
477
- WF_SendToOtherUserAndBack = values.WF_SendToOtherUserAndBack;
478
-
479
- var _currentNodeConfig = JSON.parse(processFormData.currentNodeConfig); // 当前节点
480
-
481
- // 后继节点参与者处理
482
- var _WF_NextUserList = [],
483
- _WF_NextNodeid = [];
484
- if (WF_NextNodeid) {
485
- _WF_NextNodeid = typeof WF_NextNodeid === "string" ? Array.of(WF_NextNodeid) : WF_NextNodeid; // 单选、多选
486
- var _iteratorNormalCompletion = true;
487
- var _didIteratorError = false;
488
- var _iteratorError = undefined;
489
-
490
- try {
491
- for (var _iterator = _WF_NextNodeid[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
492
- var node = _step.value;
493
-
494
- var data = values['WF_' + node];
495
- var userList = typeof data === "string" ? Array.of(data) : data;
496
- var _iteratorNormalCompletion2 = true;
497
- var _didIteratorError2 = false;
498
- var _iteratorError2 = undefined;
499
-
500
- try {
501
- for (var _iterator2 = userList[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
502
- var user = _step2.value;
503
-
504
- _WF_NextUserList.push(user + '$' + node);
505
- }
506
- } catch (err) {
507
- _didIteratorError2 = true;
508
- _iteratorError2 = err;
509
- } finally {
510
- try {
511
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
512
- _iterator2.return();
513
- }
514
- } finally {
515
- if (_didIteratorError2) {
516
- throw _iteratorError2;
517
- }
518
- }
519
- }
520
- }
521
- } catch (err) {
522
- _didIteratorError = true;
523
- _iteratorError = err;
524
- } finally {
525
- try {
526
- if (!_iteratorNormalCompletion && _iterator.return) {
527
- _iterator.return();
528
- }
529
- } finally {
530
- if (_didIteratorError) {
531
- throw _iteratorError;
532
- }
533
- }
534
- }
535
- }
536
-
537
- // 传参
538
- var params = _extends({
539
- docUnid: processFormData.docUnid,
540
- processId: processFormData.processId,
541
- nextNodeId: _WF_NextNodeid.join(","),
542
- nextUserList: _WF_NextUserList.join(","),
543
- appId: processFormData.appId,
544
- currentNodeId: processFormData.currentNodeId,
545
- currentNodeName: _currentNodeConfig.NODENAME,
546
- isNewDocFlag: processFormData.isNewDocFlag,
547
- isFirstNodeFlag: processFormData.isFirstNodeFlag,
548
- WF_CopyUserList: WF_SelCopyUser.join(","),
549
- WF_Remark: WF_Remark,
550
- docStatus: processFormData.status
551
- }, WF_OtherUserList && {
552
- otherUserList: WF_OtherUserList.join(","),
553
- sendToOtherUser: WF_SendToOtherUser ? "on" : "",
554
- WF_ReassignmentFlag: WF_SendToOtherUserAndBack ? "2" : "1",
555
- nextUserList: WF_OtherUserList.join(",")
556
- });
557
- // console.log("👉全部数据: ", params);
558
- return params;
559
- };
560
-
561
- this.searchSubmit = function (val) {
562
- var params = {
563
- selectType: '1',
564
- pageNum: 1,
565
- pageSize: 10,
566
- keyword: val
567
- };
568
- _this3.keyword = val;
569
- _this3.pageSize = 1;
570
- (0, _api.reqGetUserList)(params).then(function (res) {
571
- // console.log(res)
572
- if (res && res.meta && res.meta.success) {
573
- _this3.data = [].concat(_toConsumableArray(res.data.list));
574
- _this3.setState({ dataSource: _this3.state.dataSource.cloneWithRows(_this3.data) });
575
- }
576
- });
577
- };
578
-
579
- this.handleEndReached = function () {
580
- var params = {
581
- selectType: '1',
582
- pageNum: ++_this3.pageSize,
583
- pageSize: 10,
584
- keyword: _this3.keyword
585
- };
586
- (0, _api.reqGetUserList)(params).then(function (res) {
587
- // console.log(res)
588
- if (res && res.meta && res.meta.success) {
589
- _this3.data = [].concat(_toConsumableArray(_this3.data), _toConsumableArray(res.data.list));
590
- _this3.setState({ dataSource: _this3.state.dataSource.cloneWithRows(_this3.data) });
591
- }
592
- });
593
- };
594
-
595
- this.handleListClick = function (rowData) {
596
- var nodeId = _this3.props.form.getFieldValue('WF_NextNodeid');
597
- var allNodeAuditUsers = _extends({}, _this3.state.allNodeAuditUsers);
598
- allNodeAuditUsers['WF_' + nodeId] = allNodeAuditUsers['WF_' + nodeId] || [];
599
- if (allNodeAuditUsers['WF_' + nodeId].findIndex(function (item) {
600
- return item.value === rowData.userId;
601
- }) === -1) {
602
- allNodeAuditUsers['WF_' + nodeId] = [].concat(_toConsumableArray(allNodeAuditUsers['WF_' + nodeId]), [{ value: rowData.userId, label: rowData.userName }]);
603
- _this3.setState({ allNodeAuditUsers: allNodeAuditUsers });
604
- }
605
- };
606
-
607
- this.handleListClick2 = function (rowData) {
608
- var otherUserList = _this3.state['WF_OtherUserList'] || [];
609
- if (otherUserList.findIndex(function (item) {
610
- return item.value === rowData.userId;
611
- }) === -1) {
612
- otherUserList = [].concat(_toConsumableArray(otherUserList), [{ value: rowData.userId, label: rowData.userName }]);
613
- _this3.setState({ WF_OtherUserList: otherUserList });
614
- }
615
- };
616
- };
617
-
618
- var AuditNodeForm = (0, _rcForm.createForm)()(AuditNode);
619
- exports.default = AuditNodeForm;