dlt-for-react 1.0.23 → 1.1.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 (213) hide show
  1. package/README.md +12 -2
  2. package/lib/components/Button/index.js +79 -0
  3. package/lib/components/HqSelector/HqLsrySelector/index.js +3 -5
  4. package/lib/components/HqSelector/HqRySelector/index.js +3 -5
  5. package/lib/components/HqSelector/HqWzSelector/index.js +3 -5
  6. package/lib/components/KyEditableTable/component.js +3 -5
  7. package/lib/components/KyEditableTable/index.js +7 -13
  8. package/lib/components/KyExcel/index.js +3 -5
  9. package/lib/components/KyInputPicker/render.js +13 -43
  10. package/lib/components/KyInputPicker/setting-checkbox.js +3 -5
  11. package/lib/components/KyInputPicker/setting-multiSelect.js +3 -5
  12. package/lib/components/KyInputPicker/setting-nhcascader.js +3 -5
  13. package/lib/components/KyInputPicker/setting-select.js +3 -5
  14. package/lib/components/KyInputPicker/setting-stu-selector.js +3 -5
  15. package/lib/components/KyInputPicker/setting-tea-selector.js +3 -5
  16. package/lib/components/KyTable/checkButtons.js +4 -7
  17. package/lib/components/KyTree/index.js +6 -16
  18. package/lib/components/KyUpload/index.js +13 -21
  19. package/lib/components/NHAuditPanel/config/Axios.js +263 -0
  20. package/lib/components/NHAuditPanel/config/api.js +479 -0
  21. package/lib/components/NHAuditPanel/config/data.js +156 -0
  22. package/lib/components/NHAuditPanel/config/typeMap.js +1234 -0
  23. package/lib/components/NHAuditPanel/config/uiValidate.js +92 -0
  24. package/lib/components/NHAuditPanel/index.js +413 -0
  25. package/lib/components/NHAuditPanel/node.js +619 -0
  26. package/lib/components/NHCascader/index.js +355 -0
  27. package/lib/components/NHCheckboxGroup/index.js +135 -0
  28. package/lib/components/NHDynamicFormShow/baseInfo/index.js +194 -0
  29. package/lib/components/NHDynamicFormShow/custom/index.js +553 -0
  30. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +43 -0
  31. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +1113 -0
  32. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +263 -0
  33. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +880 -0
  34. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +171 -0
  35. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +865 -0
  36. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +138 -0
  37. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +571 -0
  38. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +147 -0
  39. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +474 -0
  40. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +139 -0
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +506 -0
  42. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +143 -0
  43. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +1074 -0
  44. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +172 -0
  45. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +927 -0
  46. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +195 -0
  47. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +1064 -0
  48. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +183 -0
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +763 -0
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +137 -0
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +819 -0
  52. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +137 -0
  53. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +700 -0
  54. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +162 -0
  55. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +743 -0
  56. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +177 -0
  57. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +848 -0
  58. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +138 -0
  59. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +777 -0
  60. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +161 -0
  61. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +706 -0
  62. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +130 -0
  63. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +413 -0
  64. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +135 -0
  65. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +1013 -0
  66. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +175 -0
  67. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +1345 -0
  68. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +274 -0
  69. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +669 -0
  70. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +134 -0
  71. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +378 -0
  72. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +120 -0
  73. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +638 -0
  74. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +133 -0
  75. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +965 -0
  76. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +237 -0
  77. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +823 -0
  78. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +188 -0
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +401 -0
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +472 -0
  81. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +304 -0
  82. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +375 -0
  83. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +118 -0
  84. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +62 -0
  85. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +55 -0
  86. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +1238 -0
  87. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +375 -0
  88. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +554 -0
  89. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +130 -0
  90. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +542 -0
  91. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +133 -0
  92. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +575 -0
  93. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +130 -0
  94. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +563 -0
  95. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +133 -0
  96. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +745 -0
  97. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +164 -0
  98. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +587 -0
  99. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +143 -0
  100. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +743 -0
  101. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +172 -0
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +1410 -0
  103. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +274 -0
  104. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +755 -0
  105. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +130 -0
  106. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +814 -0
  107. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +188 -0
  108. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +769 -0
  109. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +130 -0
  110. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +1004 -0
  111. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +126 -0
  112. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +503 -0
  113. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +149 -0
  114. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +379 -0
  115. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +148 -0
  116. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +748 -0
  117. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +135 -0
  118. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +762 -0
  119. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +134 -0
  120. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +682 -0
  121. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +135 -0
  122. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +152 -0
  123. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +783 -0
  124. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +764 -0
  125. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +138 -0
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +677 -0
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +138 -0
  128. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +1173 -0
  129. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +242 -0
  130. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +862 -0
  131. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +201 -0
  132. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +196 -0
  133. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +167 -0
  134. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +1096 -0
  135. package/lib/components/NHDynamicFormShow/index.js +647 -0
  136. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +279 -0
  137. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +206 -0
  138. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +419 -0
  139. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +401 -0
  140. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +271 -0
  141. package/lib/components/NHImagePicker/index.js +554 -0
  142. package/lib/components/NHInputPicker/RadioGroup.js +118 -0
  143. package/lib/components/NHInputPicker/index.js +62 -0
  144. package/lib/components/NHInputPicker/input-const.js +55 -0
  145. package/lib/components/NHInputPicker/render.js +1271 -0
  146. package/lib/components/NHListView/index.js +374 -0
  147. package/lib/components/NHMapGeolocation/index.js +537 -0
  148. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +104 -0
  149. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +138 -0
  150. package/lib/components/NHMapGeolocation/style.js +51 -0
  151. package/lib/components/NHMultiSelect/index.js +272 -0
  152. package/lib/components/NHRadioGroup/index.js +118 -0
  153. package/lib/components/NHSelect/index.js +364 -0
  154. package/lib/components/NHTreeMenu/index.js +126 -0
  155. package/lib/components/NHTreeMenu/treeNode.js +164 -0
  156. package/lib/components/StuSelector/index.js +611 -0
  157. package/lib/index.js +161 -116
  158. package/lib/layouts/KyInputPicker/edit-page.js +585 -0
  159. package/lib/layouts/KyInputPicker/index.js +220 -0
  160. package/lib/layouts/KyInputPicker/input-const.js +134 -0
  161. package/lib/layouts/KyInputPicker/render.js +2477 -0
  162. package/lib/layouts/KyInputPicker/setting-checkbox.js +850 -0
  163. package/lib/layouts/KyInputPicker/setting-datepicker.js +430 -0
  164. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +443 -0
  165. package/lib/layouts/KyInputPicker/setting-input.js +555 -0
  166. package/lib/layouts/KyInputPicker/setting-inputNumber.js +612 -0
  167. package/lib/layouts/KyInputPicker/setting-monthpicker.js +434 -0
  168. package/lib/layouts/KyInputPicker/setting-multiSelect.js +532 -0
  169. package/lib/layouts/KyInputPicker/setting-nhcascader.js +584 -0
  170. package/lib/layouts/KyInputPicker/setting-old-upload.js +428 -0
  171. package/lib/layouts/KyInputPicker/setting-radio.js +468 -0
  172. package/lib/layouts/KyInputPicker/setting-rangepicker.js +466 -0
  173. package/lib/layouts/KyInputPicker/setting-select.js +534 -0
  174. package/lib/layouts/KyInputPicker/setting-stu-selector.js +507 -0
  175. package/lib/layouts/KyInputPicker/setting-switch.js +274 -0
  176. package/lib/layouts/KyInputPicker/setting-tea-selector.js +507 -0
  177. package/lib/layouts/KyInputPicker/setting-textarea.js +619 -0
  178. package/lib/layouts/KyInputPicker/setting-timepicker.js +437 -0
  179. package/lib/layouts/KyInputPicker/setting-upload.js +766 -0
  180. package/lib/layouts/KyModal/buildTitle.js +81 -0
  181. package/lib/layouts/KyModal/dragM.js +127 -0
  182. package/lib/layouts/KyModal/index.js +321 -0
  183. package/lib/layouts/KyPreview/index.js +219 -0
  184. package/lib/layouts/KyUpload/index.js +1155 -0
  185. package/lib/layouts/LeftMenu/index.js +5 -11
  186. package/lib/layouts/NavigationBar/index.js +4 -10
  187. package/lib/layouts/Top/editPassWord.js +5 -7
  188. package/lib/layouts/Top/index.js +6 -20
  189. package/lib/layouts/TopMenu/index.js +11 -14
  190. package/lib/layouts/layout/index.js +7 -13
  191. package/lib/layouts/{Login → login}/index-pre.js +3 -5
  192. package/lib/layouts/{Login → login}/index.js +6 -8
  193. package/lib/layouts/{Login → login}/login.js +8 -17
  194. package/lib/layouts/mixTop/index.js +13 -28
  195. package/lib/layouts/settingDrawer/index.js +3 -5
  196. package/lib/routes/AuthorizedRoute.js +7 -13
  197. package/lib/utils/NHCore.js +46 -2
  198. package/lib/utils/base64.js +238 -0
  199. package/lib/utils/browserJudge.js +33 -0
  200. package/lib/utils/common.js +18 -20
  201. package/lib/utils/createUuid.js +11 -31
  202. package/lib/utils/device.js +44 -0
  203. package/lib/utils/dynamicLoadCss.js +14 -0
  204. package/lib/utils/dynamicLoadJs.js +21 -0
  205. package/lib/utils/getLoginUser.js +1 -1
  206. package/lib/utils/getSize.js +2 -11
  207. package/lib/utils/getStyle.js +26 -0
  208. package/lib/utils/getSuitHeight.js +49 -0
  209. package/lib/utils/hasAuth.js +11 -0
  210. package/lib/utils/index.js +1 -34
  211. package/lib/utils/loadJS.js +40 -0
  212. package/package.json +1 -1
  213. /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
@@ -0,0 +1,865 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _card = require('antd-mobile/lib/card');
8
+
9
+ var _card2 = _interopRequireDefault(_card);
10
+
11
+ var _whiteSpace = require('antd-mobile/lib/white-space');
12
+
13
+ var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
14
+
15
+ var _textareaItem = require('antd-mobile/lib/textarea-item');
16
+
17
+ var _textareaItem2 = _interopRequireDefault(_textareaItem);
18
+
19
+ var _stepper = require('antd-mobile/lib/stepper');
20
+
21
+ var _stepper2 = _interopRequireDefault(_stepper);
22
+
23
+ var _picker = require('antd-mobile/lib/picker');
24
+
25
+ var _picker2 = _interopRequireDefault(_picker);
26
+
27
+ var _list = require('antd-mobile/lib/list');
28
+
29
+ var _list2 = _interopRequireDefault(_list);
30
+
31
+ var _inputItem = require('antd-mobile/lib/input-item');
32
+
33
+ var _inputItem2 = _interopRequireDefault(_inputItem);
34
+
35
+ var _modal = require('antd-mobile/lib/modal');
36
+
37
+ var _modal2 = _interopRequireDefault(_modal);
38
+
39
+ var _toast = require('antd-mobile/lib/toast');
40
+
41
+ var _toast2 = _interopRequireDefault(_toast);
42
+
43
+ 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; };
44
+
45
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
46
+
47
+ 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; }; }();
48
+
49
+ require('antd-mobile/lib/card/style/css');
50
+
51
+ require('antd-mobile/lib/white-space/style/css');
52
+
53
+ require('antd-mobile/lib/textarea-item/style/css');
54
+
55
+ require('antd-mobile/lib/stepper/style/css');
56
+
57
+ require('antd-mobile/lib/picker/style/css');
58
+
59
+ require('antd-mobile/lib/list/style/css');
60
+
61
+ require('antd-mobile/lib/input-item/style/css');
62
+
63
+ require('antd-mobile/lib/modal/style/css');
64
+
65
+ require('antd-mobile/lib/toast/style/css');
66
+
67
+ var _react = require('react');
68
+
69
+ var _react2 = _interopRequireDefault(_react);
70
+
71
+ var _NHFetch = require('../../../../../utils/NHFetch');
72
+
73
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
74
+
75
+ var _index = require('../../../../NHImagePicker/index');
76
+
77
+ var _index2 = _interopRequireDefault(_index);
78
+
79
+ var _index3 = require('../../../../NHCheckboxGroup/index');
80
+
81
+ var _index4 = _interopRequireDefault(_index3);
82
+
83
+ var _rcForm = require('rc-form');
84
+
85
+ var _classnames = require('classnames');
86
+
87
+ var _classnames2 = _interopRequireDefault(_classnames);
88
+
89
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
90
+
91
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
92
+
93
+ 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; }
94
+
95
+ 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; } // import { Form, Input, InputNumber, Select, Switch } from 'antd';
96
+
97
+ // import { Checkbox, Space } from 'antd-mobile'
98
+
99
+
100
+ var EditInitForm = function (_React$Component) {
101
+ _inherits(EditInitForm, _React$Component);
102
+
103
+ function EditInitForm(props) {
104
+ _classCallCheck(this, EditInitForm);
105
+
106
+ // this.getFieldProps = this.props.form.getFieldProps;
107
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
108
+
109
+ _this.componentDidMount = function () {
110
+ _this.initZxjForm();
111
+ _this.getsqlylxDataSource();
112
+ _this.getknsbzDj();
113
+ };
114
+
115
+ _this.validatorCsz = function (rule, value, callback) {
116
+ if (value) {
117
+ var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);
118
+ if (valueType === 'string') {
119
+ if (value.length < 100) {
120
+ callback("最少字数不能少于100个!");
121
+ } else {
122
+ callback();
123
+ }
124
+ } else {
125
+ callback();
126
+ }
127
+ } else {
128
+ callback();
129
+ }
130
+ };
131
+
132
+ _this.getknsbzDj = function () {
133
+ var objId = _this.props.objId;
134
+
135
+ (0, _NHFetch2.default)('api/sm-difficult-student/czxy/openapi/getPfByXsid', "GET", { xsid: objId }).then(function (res) {
136
+ console.log("res的值:", res);
137
+ console.log("resdata:", res.data);
138
+ if (res && res.data) {
139
+ // if(res.data.BZDJ == "一等保障"){
140
+
141
+ // }
142
+ console.log("resdataBZDJ:", res.data.BZDJ);
143
+ }
144
+ });
145
+ };
146
+
147
+ _this.getsqlylxDataSource = function () {
148
+ (0, _NHFetch2.default)('api/sm-work-study/proData/selectDataList?sign=DMK_ZXJ_SQLYLX', "GET").then(function (res) {
149
+ console.log("res的值:", res);
150
+ console.log("resdata:", res.data);
151
+ if (res && res.data) {
152
+ _this.setState({ sqlylxDataSource: _this.changeJsonArry(res.data) });
153
+ }
154
+ });
155
+ };
156
+
157
+ _this.changeJsonArry = function (jsonArray) {
158
+ var newJsonArray = [];
159
+ jsonArray.map(function (item) {
160
+ var newJson = {};
161
+ newJson.value = item.VALUE || item.value;
162
+ newJson.label = item.LABEL || item.label;
163
+ newJsonArray.push(newJson);
164
+ });
165
+ return newJsonArray;
166
+ };
167
+
168
+ _this.initZxjForm = function () {
169
+ var _this$props = _this.props,
170
+ objId = _this$props.objId,
171
+ pkid = _this$props.pkid,
172
+ params = _this$props.params;
173
+
174
+ var pcid = params.pcid; //批次ID,也就是任务ID
175
+ var t = new Date().getTime();
176
+ (0, _NHFetch2.default)('api/sm-student-grant/openapi/getDymxByGzfbid/' + pcid, 'GET', t).then(function (res) {
177
+ if (res) {
178
+ var mxsm = res.data.length;
179
+ if (mxsm === 1) {
180
+ //对应的奖项定义是不分等级的
181
+ _this.setState({
182
+ mxsm: 1,
183
+ mxid: res.data[0].MXID,
184
+ djmc: res.data[0].DJMC,
185
+ sfgdje: res.data[0].SFGDJE,
186
+ gdjj: res.data[0].GDJJ,
187
+ zdjj: res.data[0].ZDJJ,
188
+ zxjj: res.data[0].ZXJJ,
189
+ pjzqdm: res.data[0].SJDM,
190
+ pjzq: res.data[0].SJMC,
191
+ //当奖项定义不是固定金额的时候,申请时je会被作为奖金的初始化值,这个初始化值取奖项定义的最小奖金
192
+ je: res.data[0].SFGDJE === '1' ? 0 : res.data[0].ZXJJ
193
+
194
+ }, function () {
195
+
196
+ //判断是否有资格申请该奖项
197
+ var param = {
198
+ xsid: objId,
199
+ gzfbid: pcid,
200
+ mxid: res.data[0].MXID
201
+ };
202
+ _this.hasQualification(param);
203
+ });
204
+ } else {
205
+ //对应的奖项是分了多个等级的
206
+
207
+ var djxx = [];
208
+ res.data.map(function (v, i) {
209
+ djxx.push({ label: v.DJMC, value: v.MXID });
210
+ // return <Option value={v.MXID} key={i}>{v.DJMC}</Option>;
211
+ });
212
+ var mxidxx = res.data.map(function (v, i) {
213
+ return v.MXID;
214
+ });
215
+ var gdjjxx = res.data.map(function (v, i) {
216
+ return v.GDJJ;
217
+ });
218
+ _this.setState({
219
+ mxsm: mxsm,
220
+ djxx: djxx,
221
+ pjzqdm: res.data[0].SJDM,
222
+ pjzq: res.data[0].SJMC,
223
+ mxidxx: mxidxx,
224
+ gdjjxx: gdjjxx
225
+ });
226
+ }
227
+
228
+ //通过主键ID获取获奖名单表对应的数据
229
+ _this.getData(pkid);
230
+ }
231
+ });
232
+ };
233
+
234
+ _this.getData = function (pkid) {
235
+ var getHjmdData = _this.props.getHjmdData;
236
+ //通过PKID去查询是否有申请数据,有说明是审核
237
+
238
+ (0, _NHFetch2.default)('api/sm-student-grant/openapi/getXshjmdByPkidCzxy/' + pkid, 'GET').then(function (res) {
239
+ if (res && res.code === 200) {
240
+ if (res.data != null) {
241
+ _this.setState({
242
+
243
+ mxid: res.data.MXID,
244
+ pjzq: res.data.SJMC,
245
+ pjzqdm: res.data.SJDM,
246
+ //对于不固定金额的情况,审核时页面的金额应该是从申请数据里拿了,所以je的值要重新覆盖下
247
+ je: res.data.JE,
248
+ sqly: res.data.SQLY,
249
+ sqlylxList: res.data.SQLYLX,
250
+ bz: res.data.X_BZ,
251
+ jtjjqk: res.data.JTJJQK,
252
+ fjid: res.data.FJID,
253
+ djmc: res.data.DJMC,
254
+ sfgdje: res.data.SFGDJE,
255
+ gdjj: res.data.GDJJ,
256
+ zdjj: res.data.ZDJJ,
257
+ zxjj: res.data.ZXJJ,
258
+ //只有当奖项是分等级的时候,gdjjBydj这个值才会用到。所以直接给它赋值res.data.JE
259
+ gdjjBydj: res.data.JE
260
+ });
261
+ }
262
+ } else {
263
+ _toast2.default.fail("调用接口失败");
264
+ }
265
+ });
266
+ };
267
+
268
+ _this.hasQualification = function (param) {
269
+
270
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(true); //默认办理按钮不可用
271
+ (0, _NHFetch2.default)('api/sm-student-grant/openapi/hasQualification', 'POST', param).then(function (res) {
272
+ if (res && res.code === 200) {
273
+ // const key = `open${Date.now()}`;
274
+ // const btn = (<Button type="primary" size="small" onClick={() => notification.close(key)}>确定</Button>)
275
+
276
+ if (!res.data.ZGMDID) {
277
+ //资格名单表查不到记录,调用资格鉴定接口
278
+ var zgid = res.data.ZGID2 ? res.data.ZGID2 : res.data.ZGID1;
279
+ (0, _NHFetch2.default)("api/sm-qualification/openapi/qualifications/checkOne?zgid=" + zgid + "&id=" + param.xsid + "&t=" + new Date().getTime(), "GET").then(function (res) {
280
+ if (res && res.code === 200) {
281
+
282
+ if (res.data.zt === '0' || res.data.zt === 0) {
283
+ var bfhtjs = res.data.bfhtj.split(";");
284
+ /* let bfhtj = bfhtjs.map((item, index) => {
285
+ return <span key={index + 1}>{index + 1}、{item}<br /></span>
286
+ });*/
287
+ var msgTip = '';
288
+ if (bfhtjs && bfhtjs.length > 0) {
289
+ for (var i = 0; i < bfhtjs.length; i++) {
290
+ var currentTip = i + 1 + ' ' + bfhtjs[i] + ' ';
291
+ msgTip += currentTip;
292
+ }
293
+ }
294
+
295
+ var modelMessage = "您由于不满足以下条件,所以不能执行申请操作:" + msgTip;
296
+ _modal2.default.alert('提示', modelMessage);
297
+ } else {
298
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(false); //CheackOne通过后开启办理按钮
299
+ }
300
+ } else {
301
+ _toast2.default.fail("调用接口失败");
302
+ }
303
+ });
304
+ } else {
305
+ //表里有数据,看sfyx字段的状态
306
+
307
+ if (res.data.SFYX === "0" || res.data.SFYX === 0) {
308
+ var modelMessage = "您由于不满足以下条件,所以不能执行申请操作:" + res.data.SFYXLY;
309
+ _modal2.default.alert('提示', modelMessage);
310
+ } else {
311
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(false); //能办理的话开启办理按钮
312
+ }
313
+ }
314
+ } else {
315
+ _toast2.default.fail("调用接口失败");
316
+ }
317
+ });
318
+ };
319
+
320
+ _this.changeDj = function (v) {
321
+ var _this$props2 = _this.props,
322
+ objId = _this$props2.objId,
323
+ params = _this$props2.params;
324
+ var _this$state = _this.state,
325
+ mxidxx = _this$state.mxidxx,
326
+ gdjjxx = _this$state.gdjjxx;
327
+
328
+ if (!v && v.length < 1) return;
329
+ var index = mxidxx.findIndex(function (item) {
330
+ return item === v[0];
331
+ });
332
+ _this.setState({
333
+ gdjjBydj: gdjjxx[index]
334
+ }, function () {
335
+ //验证是否有资格申请
336
+ var param = {
337
+ xsid: objId,
338
+ gzfbid: params.pcid,
339
+ mxid: v[0]
340
+ };
341
+ _this.props.form.setFieldsValue({ je: gdjjxx[index] });
342
+ _this.hasQualification(param);
343
+ });
344
+ };
345
+
346
+ _this.onChangeStepper = function (val) {
347
+ _this.setState({ je: val });
348
+ };
349
+
350
+ _this.requiredParams = function (required, id) {
351
+ var getFieldError = _this.props.form.getFieldError;
352
+
353
+ return {
354
+ error: getFieldError(id) !== undefined
355
+ };
356
+ };
357
+
358
+ _this.getDataList = function (fieldMap) {
359
+ // const { getFieldDecorator } = this.props.form;
360
+ var _this$props$form = _this.props.form,
361
+ getFieldProps = _this$props$form.getFieldProps,
362
+ getFieldError = _this$props$form.getFieldError;
363
+ var _this$state2 = _this.state,
364
+ mxsm = _this$state2.mxsm,
365
+ mxid = _this$state2.mxid,
366
+ djmc = _this$state2.djmc,
367
+ djxx = _this$state2.djxx,
368
+ sfgdje = _this$state2.sfgdje,
369
+ gdjj = _this$state2.gdjj,
370
+ zdjj = _this$state2.zdjj,
371
+ zxjj = _this$state2.zxjj,
372
+ gdjjBydj = _this$state2.gdjjBydj,
373
+ pjzq = _this$state2.pjzq,
374
+ pjzqdm = _this$state2.pjzqdm,
375
+ je = _this$state2.je,
376
+ sqly = _this$state2.sqly,
377
+ sqlylxList = _this$state2.sqlylxList,
378
+ sqlylxDataSource = _this$state2.sqlylxDataSource,
379
+ bz = _this$state2.bz,
380
+ fjid = _this$state2.fjid;
381
+
382
+ var dataList = [];
383
+
384
+ if (fieldMap.DJMC && fieldMap.DJMC.sfxs === '1') {
385
+ var required = fieldMap.DJMC.sfbt === "1" ? true : false;
386
+ var editable = fieldMap.DJMC.sfbj === "1" ? true : false;
387
+ if (mxsm === 1) {
388
+ //没有分等级的,奖项名称始终显示
389
+ dataList.push({
390
+ title: fieldMap.DJMC.title,
391
+ text: djmc,
392
+ required: required,
393
+ render: function render() {
394
+ getFieldProps('mxid', {
395
+ initialValue: mxid
396
+ });
397
+ return _react2.default.createElement(
398
+ _inputItem2.default,
399
+ {
400
+ className: 'nh-input-item',
401
+ placeholder: '\u8BF7\u8F93\u5165',
402
+ value: djmc,
403
+ editable: false,
404
+ disabled: !editable
405
+ },
406
+ fieldMap.DJMC.title
407
+ );
408
+ }
409
+ });
410
+ } else {
411
+ //分等级,申请的时候奖项名称始终是一个下拉框
412
+ dataList.push({
413
+ // id: 'dymx',
414
+ title: fieldMap.DJMC.title,
415
+ required: required,
416
+ text: djmc,
417
+ render: function render() {
418
+ return _react2.default.createElement(
419
+ 'div',
420
+ {
421
+ className: (0, _classnames2.default)({ 'nh-inputrender': editable, 'nh-inputrender-disabled': !editable })
422
+ },
423
+ _react2.default.createElement(
424
+ _picker2.default,
425
+ _extends({
426
+ data: djxx,
427
+ cols: 1,
428
+ className: 'forss',
429
+ disabled: !editable
430
+ }, getFieldProps('mxid', {
431
+ initialValue: typeof mxid === 'string' ? [mxid] : mxid,
432
+ rules: [{ required: required, message: '\u8BF7\u9009\u62E9' + fieldMap.DJMC.title }],
433
+ onChange: _this.changeDj
434
+ })),
435
+ _react2.default.createElement(
436
+ _list2.default.Item,
437
+ _extends({ arrow: 'horizontal' }, _this.requiredParams(required, 'mxid')),
438
+ fieldMap.DJMC.title
439
+ )
440
+ )
441
+ );
442
+ }
443
+ });
444
+ }
445
+ }
446
+
447
+ if (fieldMap.JE && fieldMap.JE.sfxs === '1') {
448
+ var _required = fieldMap.JE.sfbt === "1" ? true : false;
449
+ var _editable = fieldMap.JE.sfbj === "1" ? true : false;
450
+ if (mxsm === 1) {
451
+ //没有分等级的
452
+ if (sfgdje === '1') {
453
+ //固定奖金
454
+ dataList.push({
455
+ title: '金额',
456
+ text: gdjj,
457
+ required: _required,
458
+ render: function render() {
459
+ return _react2.default.createElement(
460
+ _inputItem2.default,
461
+ _extends({
462
+ className: 'nh-input-item',
463
+ placeholder: '\u8BF7\u8F93\u5165',
464
+ editable: false,
465
+ disabled: !_editable
466
+ }, _this.requiredParams(_required, 'je'), getFieldProps('je', {
467
+ initialValue: gdjj,
468
+ rules: [{ required: _required, message: '请输入金额!' }]
469
+ })),
470
+ '\u91D1\u989D'
471
+ );
472
+ }
473
+ });
474
+ } else {
475
+ //没有固定金额
476
+ dataList.push({
477
+ title: '金额',
478
+ required: _required,
479
+ text: je,
480
+ render: function render() {
481
+ return _react2.default.createElement(
482
+ _list2.default.Item,
483
+ { extra: _react2.default.createElement(_stepper2.default, _extends({
484
+ style: { width: '100%', minWidth: '100px' },
485
+ showNumber: true,
486
+ max: zdjj,
487
+ min: zxjj,
488
+ disabled: !_editable
489
+ }, getFieldProps('je', {
490
+ initialValue: je,
491
+ rules: [{ required: _required, message: '请输入金额!' }],
492
+ onChange: _this.onChangeStepper
493
+ })))
494
+ },
495
+ '\u91D1\u989D'
496
+ );
497
+ }
498
+ });
499
+ }
500
+ } else {
501
+ //分等级的,每个等级都是固定金额,但金额要跟着等级变化
502
+ dataList.push({
503
+ title: '金额',
504
+ text: gdjjBydj,
505
+ required: _required,
506
+ render: function render() {
507
+ return _react2.default.createElement(
508
+ _inputItem2.default,
509
+ _extends({
510
+ className: 'nh-input-item',
511
+ placeholder: '\u8BF7\u8F93\u5165',
512
+ editable: false,
513
+ disabled: !_editable
514
+ }, _this.requiredParams(_required, 'je'), getFieldProps('je', {
515
+ initialValue: gdjjBydj,
516
+ rules: [{ required: _required, message: '请输入金额!' }]
517
+ })),
518
+ '\u91D1\u989D'
519
+ );
520
+ }
521
+ });
522
+ }
523
+ }
524
+
525
+ if (fieldMap.PJZQ && fieldMap.PJZQ.sfxs === '1') {
526
+ var _required2 = fieldMap.PJZQ.sfbt === "1" ? true : false;
527
+ var _editable2 = fieldMap.PJZQ.sfbj === "1" ? true : false;
528
+ dataList.push({
529
+ id: 'pjzq',
530
+ title: '评奖周期',
531
+ text: pjzq,
532
+ required: _required2,
533
+ render: function render() {
534
+ getFieldProps('pjzq', {
535
+ initialValue: pjzqdm
536
+ });
537
+ return _react2.default.createElement(
538
+ _inputItem2.default,
539
+ {
540
+ className: 'nh-input-item',
541
+ placeholder: '\u8BF7\u8F93\u5165',
542
+ editable: false,
543
+ disabled: !_editable2,
544
+ value: pjzq
545
+ },
546
+ '\u8BC4\u5956\u5468\u671F'
547
+ );
548
+ }
549
+
550
+ });
551
+ }
552
+ if (fieldMap.SQLY && fieldMap.SQLY.sfxs === '1') {
553
+ var _required3 = fieldMap.SQLY.sfbt === "1" ? true : false;
554
+ var _editable3 = fieldMap.SQLY.sfbj === "1" ? true : false;
555
+ dataList.push({
556
+ id: 'sqly',
557
+ title: '申请理由',
558
+ text: sqly,
559
+ required: _required3,
560
+ isUpload: false,
561
+ render: function render() {
562
+ return _react2.default.createElement(_textareaItem2.default, _extends({
563
+ title: '\u7533\u8BF7\u7406\u7531',
564
+ placeholder: '\u8BF7\u8F93\u5165\u7533\u8BF7\u7406\u7531\uFF01\uFF0C\u5B57\u6570\u5728100-150\u4E4B\u95F4',
565
+ 'data-seed': 'logId',
566
+ rows: 4,
567
+ count: 150,
568
+ editable: _editable3,
569
+ disabled: !_editable3,
570
+ maxLength: 150
571
+ }, _this.requiredParams(_required3, 'sqly'), getFieldProps('sqly', {
572
+ initialValue: sqly,
573
+ rules: [{ required: _required3, message: '请输入申请理由!' }, { validator: _this.validatorCsz }],
574
+
575
+ onChange: function onChange(v) {
576
+ return _this.setState({ sqly: v });
577
+ }
578
+ })));
579
+ }
580
+ });
581
+ }
582
+
583
+ if (fieldMap.SQLYLX && fieldMap.SQLYLX.sfxs === '1') {
584
+ var _required4 = fieldMap.SQLYLX.sfbt === "1" ? true : false;
585
+ var _editable4 = fieldMap.SQLYLX.sfbj === "1" ? true : false;
586
+ var label = fieldMap.SQLYLX.title;
587
+
588
+ dataList.push({
589
+ id: 'sqlylxList',
590
+ title: label,
591
+ required: _required4,
592
+ text: sqlylxList,
593
+ render: function render() {
594
+ return _react2.default.createElement(
595
+ 'div',
596
+ null,
597
+ _react2.default.createElement(_index4.default, _extends({
598
+ disabled: !_editable4,
599
+ value: sqlylxList.map(function (item) {
600
+ return item;
601
+ }),
602
+ defaultValue: sqlylxList.map(function (item) {
603
+ return item;
604
+ }),
605
+ label: label
606
+ }, getFieldProps('sqlylxList', {
607
+ initialValue: sqlylxList,
608
+ rules: [{ required: _required4, message: label + '\u4E0D\u80FD\u4E3A\u7A7A' }],
609
+ onChange: function onChange(v) {
610
+ return _this.setState({ sqlylxList: v });
611
+ }
612
+ }), {
613
+ options: sqlylxDataSource
614
+
615
+ }))
616
+ );
617
+ },
618
+ span: 1
619
+ });
620
+ }
621
+ if (fieldMap.BZ && fieldMap.BZ.sfxs === '1' && _this.state.sqlylxList.includes('H')) {
622
+ var _required5 = fieldMap.BZ.sfbt === "1" ? true : false;
623
+ var _editable5 = fieldMap.BZ.sfbj === "1" ? true : false;
624
+ var _label = fieldMap.BZ.title;
625
+ dataList.push({
626
+ id: 'bz',
627
+ title: _label,
628
+ text: bz,
629
+ required: _required5,
630
+ isUpload: false,
631
+ render: function render() {
632
+ return _react2.default.createElement(_textareaItem2.default, _extends({
633
+ id: 'bz',
634
+ title: '\u5907\u6CE8',
635
+ placeholder: '\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F\uFF01\u4E0D\u8D85\u8FC720\u5B57',
636
+ 'data-seed': 'logId',
637
+ rows: 2,
638
+ count: 20,
639
+ editable: _editable5,
640
+ disabled: !_editable5,
641
+ maxLength: 20
642
+ }, _this.requiredParams(_required5, 'bz'), getFieldProps('bz', {
643
+ initialValue: bz,
644
+ rules: [{ required: _required5, message: '请输入备注信息!' }],
645
+
646
+ onChange: function onChange(v) {
647
+ return _this.setState({ bz: v });
648
+ }
649
+ })));
650
+ }
651
+ });
652
+ }
653
+ if (fieldMap.FJID && fieldMap.FJID.sfxs === '1') {
654
+ var _required6 = fieldMap.FJID.sfbt === "1" ? true : false;
655
+ var _editable6 = fieldMap.FJID.sfbj === "1" ? true : false;
656
+ dataList.push({
657
+ id: 'fjid',
658
+ title: '附件上传',
659
+ text: fjid,
660
+ required: _required6,
661
+ isUpload: true,
662
+ render: function render() {
663
+ return _react2.default.createElement(
664
+ _list2.default.Item,
665
+ _this.requiredParams(_required6, 'fjid'),
666
+ _react2.default.createElement(
667
+ 'label',
668
+ { className: (0, _classnames2.default)({ 'nh-dynamic-form-disabled': !_editable6 }) },
669
+ '\u9644\u4EF6\u4E0A\u4F20'
670
+ ),
671
+ _react2.default.createElement(_index2.default, _extends({
672
+ serviceMark: 'sm-student-grant',
673
+ moduleName: '助学金',
674
+ isEdit: _this.props.isEdit && _editable6,
675
+ numberOfLimit: 10,
676
+ numberOfSize: 5
677
+ }, getFieldProps('fjid', {
678
+ initialValue: fjid,
679
+ rules: [{ required: _required6, message: '请上传附件' }]
680
+ })))
681
+ );
682
+ },
683
+ renderView: function renderView() {
684
+ return _react2.default.createElement(_index2.default, {
685
+ serviceMark: 'sm-student-grant',
686
+ moduleName: '助学金',
687
+ isEdit: false,
688
+ value: fjid
689
+ });
690
+ }
691
+ });
692
+ }
693
+ return dataList;
694
+ };
695
+
696
+ _this.state = {
697
+ mxsm: 1, //明细数目
698
+ mxid: '', //明细id
699
+ djmc: '', //等级名称
700
+ sfgdje: '', //是否固定金额
701
+ gdjj: '', //固定奖金
702
+ zdjj: 0, //最大奖金
703
+ zxjj: 0, //最小奖金
704
+ pjzqdm: '', //评奖周期代码
705
+ pjzq: '', //评奖周期
706
+ sffdj: '', //是否分等级
707
+ sqlylxDataSource: [], //临时存放sqlylx数据
708
+ fjid: '',
709
+ sqly: '',
710
+ sqlylxList: [], //申请理由类型
711
+ bz: '', //备注信息
712
+ je: 0,
713
+ djxx: [], //等级信息,用于存有多个等级的情况
714
+ mxidxx: [], //分等级情况下,记录下所有的mxid
715
+ gdjjxx: [], //分等级情况下,记录下所有的固定金额,跟mxidxx对应
716
+ gdjjBydj: 0, //用于分等级情况下,根据不同等级显示不同金额
717
+ dqxx: '' //当前学校,截至2020-11-10前,该参数特用于常州机电(基线还没有这个需求)
718
+ };
719
+
720
+ return _this;
721
+ }
722
+ //字数小限制
723
+
724
+
725
+ //获取困难生保障等级
726
+
727
+ // 获取申请理由类型数据源
728
+
729
+ // buildGwszlxm = (sqlylxList) => {
730
+ // if (sqlylxList) {
731
+ // NHFetch(`api/sm-work-study/proData/selectDataList?sign=DMK_ZXJ_SQLYLX`, "GET").then(res => {
732
+ // console.log("res选择后的值:",res)
733
+ // console.log("resdata选择后的值:",res.data)
734
+ // if (res && res.data) {
735
+ // this.setState({ sqlylxDataSource: this.changeJsonArry(res.data) });
736
+ // let sqlylxList = "";
737
+ // let x_gwszlx_arr = sqlylxList.split(",");
738
+ // x_gwszlx_arr.map(gwszlxItem => {
739
+ // res.data.map(item => {
740
+ // if ((item.value || item.VALUE) === gwszlxItem) {
741
+ // sqlylxList += (item.label || item.LABEL) + ",";
742
+ // }
743
+ // });
744
+ // });
745
+ // if (sqlylxList) {
746
+ // this.setState({ sqlylxList: sqlylxList.substr(0, sqlylxList.length - 1) });
747
+ // }
748
+ // }
749
+ // });
750
+ // }
751
+ // }
752
+
753
+ _createClass(EditInitForm, [{
754
+ key: 'calcSapan',
755
+
756
+
757
+ //计算span跨度
758
+ value: function calcSapan(fieldMapList) {
759
+
760
+ var totalSpan = 0; // 到目前为止的所有列数
761
+ var hasUseSpan = void 0; // 当前行已使用的列数
762
+ fieldMapList.map(function (item, index) {
763
+
764
+ var span = item.span;
765
+ hasUseSpan = totalSpan % 3;
766
+ if (3 - hasUseSpan < span) {
767
+ fieldMapList[index - 1].span += 3 - hasUseSpan;
768
+ totalSpan += 3 - hasUseSpan;
769
+ }
770
+
771
+ totalSpan += span;
772
+ });
773
+ return fieldMapList;
774
+ }
775
+
776
+ //改变等级
777
+
778
+
779
+ //步进器改变
780
+
781
+ }, {
782
+ key: 'render',
783
+ value: function render() {
784
+ var _props = this.props,
785
+ form = _props.form,
786
+ isEdit = _props.isEdit,
787
+ fieldMap = _props.fieldMap,
788
+ title = _props.title;
789
+
790
+ var dataList = this.getDataList(fieldMap);
791
+ if (isEdit) {
792
+ return _react2.default.createElement(
793
+ 'form',
794
+ null,
795
+ _react2.default.createElement(
796
+ _list2.default,
797
+ { renderHeader: function renderHeader() {
798
+ return title;
799
+ } },
800
+ dataList.map(function (item, index) {
801
+ return _react2.default.createElement(
802
+ 'div',
803
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
804
+ item.render !== undefined ? item.render() : null
805
+ );
806
+ })
807
+ ),
808
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
809
+ );
810
+ }
811
+ return _react2.default.createElement(
812
+ 'div',
813
+ null,
814
+ _react2.default.createElement(
815
+ _card2.default,
816
+ { full: true },
817
+ _react2.default.createElement(_card2.default.Header, {
818
+ title: _react2.default.createElement(
819
+ 'div',
820
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
821
+ title
822
+ )
823
+ }),
824
+ _react2.default.createElement(
825
+ _card2.default.Body,
826
+ null,
827
+ dataList.map(function (item, index) {
828
+ if (item.isUpload) {
829
+ return _react2.default.createElement(
830
+ 'div',
831
+ { key: index },
832
+ _react2.default.createElement(
833
+ 'font',
834
+ { color: 'grey' },
835
+ item.title,
836
+ '\uFF1A '
837
+ ),
838
+ item.renderView()
839
+ );
840
+ }
841
+ return _react2.default.createElement(
842
+ 'div',
843
+ null,
844
+ _react2.default.createElement(
845
+ 'font',
846
+ { color: 'grey' },
847
+ item.title,
848
+ '\uFF1A '
849
+ ),
850
+ item.text,
851
+ _react2.default.createElement('br', null)
852
+ );
853
+ })
854
+ )
855
+ ),
856
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
857
+ );
858
+ }
859
+ }]);
860
+
861
+ return EditInitForm;
862
+ }(_react2.default.Component);
863
+
864
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
865
+ exports.default = EditForm;