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,638 @@
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 _inputItem = require('antd-mobile/lib/input-item');
20
+
21
+ var _inputItem2 = _interopRequireDefault(_inputItem);
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 _toast = require('antd-mobile/lib/toast');
32
+
33
+ var _toast2 = _interopRequireDefault(_toast);
34
+
35
+ 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; };
36
+
37
+ 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; }; }();
38
+
39
+ require('antd-mobile/lib/card/style/css');
40
+
41
+ require('antd-mobile/lib/white-space/style/css');
42
+
43
+ require('antd-mobile/lib/textarea-item/style/css');
44
+
45
+ require('antd-mobile/lib/input-item/style/css');
46
+
47
+ require('antd-mobile/lib/picker/style/css');
48
+
49
+ require('antd-mobile/lib/list/style/css');
50
+
51
+ require('antd-mobile/lib/toast/style/css');
52
+
53
+ var _react = require('react');
54
+
55
+ var _react2 = _interopRequireDefault(_react);
56
+
57
+ var _rcForm = require('rc-form');
58
+
59
+ var _NHFetch = require('../../../../../utils/NHFetch');
60
+
61
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
62
+
63
+ var _classnames = require('classnames');
64
+
65
+ var _classnames2 = _interopRequireDefault(_classnames);
66
+
67
+ var _NHImagePicker = require('../../../../NHImagePicker');
68
+
69
+ var _NHImagePicker2 = _interopRequireDefault(_NHImagePicker);
70
+
71
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72
+
73
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
74
+
75
+ 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; }
76
+
77
+ 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; }
78
+
79
+ var EditInitForm = function (_React$Component) {
80
+ _inherits(EditInitForm, _React$Component);
81
+
82
+ function EditInitForm(props) {
83
+ _classCallCheck(this, EditInitForm);
84
+
85
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
86
+
87
+ _this.componentDidMount = function () {
88
+ _this.getInitData();
89
+ _this.initXnList();
90
+ _this.getSxlbList();
91
+ };
92
+
93
+ _this.initFjsxList = function (value) {
94
+ (0, _NHFetch2.default)('api/sm-student/openapi/getFjsxList', 'GET', { sxlb: value }).then(function (res) {
95
+ if (res && res.code == 200) {
96
+ var FjsxDataSource = res.data;
97
+ if (FjsxDataSource != null) {
98
+ var fjsxList = [];
99
+ var textList = [];
100
+ var jdList = [];
101
+ FjsxDataSource.map(function (v, i) {
102
+ fjsxList.push({ label: v.KEY, value: v.TEXT });
103
+ textList.push(v.TEXT);
104
+ jdList.push(v.JD);
105
+ });
106
+ _this.setState({
107
+ fjsxList: fjsxList,
108
+ textList: textList,
109
+ jdList: jdList
110
+ });
111
+ }
112
+ } else {
113
+ _toast2.default.fail("获取附加事项数据源失败");
114
+ }
115
+ });
116
+ };
117
+
118
+ _this.initXnList = function () {
119
+ (0, _NHFetch2.default)('api/sm-student/openapi/getXnList', 'GET').then(function (res) {
120
+ if (res && res.code == 200) {
121
+ var xnDataSource = res.data;
122
+ if (xnDataSource != null) {
123
+ var xnList = [];
124
+ xnDataSource.map(function (v, i) {
125
+ xnList.push({ label: v.LABEL, value: v.VALUE });
126
+ });
127
+ _this.setState({
128
+ xnList: xnList
129
+ });
130
+ }
131
+ } else {
132
+ _toast2.default.fail("获取学年数据源失败");
133
+ }
134
+ });
135
+ };
136
+
137
+ _this.getInitData = function () {
138
+ var pkid = _this.props.pkid;
139
+ //通过PKID去查询是否有申请数据,有说明是审核
140
+
141
+ var t = new Date().getTime();
142
+ (0, _NHFetch2.default)('api/sm-student/openapi/getFjjdInitData/' + pkid, 'GET', t).then(function (res) {
143
+ if (res && res.code == 200) {
144
+ var initData = res.data;
145
+ if (initData != null) {
146
+ _this.setState({
147
+ xq: initData.XQ,
148
+ xqmc: initData.SJMC,
149
+ fjsx: initData.FJSX,
150
+ sxlb: initData.SXLB,
151
+ fjjd: initData.FJJD,
152
+ xwrymc: initData.XWRYMC,
153
+ xxsx: initData.XXSX,
154
+ fjid: initData.FJID,
155
+ fjsxmc: initData.FJSXMC,
156
+ sxlbmc: initData.SXLBMC
157
+ });
158
+ }
159
+ } else {
160
+ _toast2.default.fail("调用接口失败");
161
+ }
162
+ });
163
+ };
164
+
165
+ _this.getSxlbList = function () {
166
+ (0, _NHFetch2.default)('api/sm-student/openapi/getSxlbList', 'GET').then(function (res) {
167
+ if (res && res.code == 200) {
168
+ var sxlbDataSource = res.data;
169
+ if (sxlbDataSource != null) {
170
+ var sxlbList = [];
171
+ sxlbDataSource.map(function (v, i) {
172
+ sxlbList.push({ label: v.LABEL, value: v.VALUE });
173
+ });
174
+ _this.setState({
175
+ sxlbList: sxlbList
176
+ });
177
+ }
178
+ } else {
179
+ _toast2.default.fail("获取事项类别数据源失败");
180
+ }
181
+ });
182
+ };
183
+
184
+ _this.selectOnChange = function (value) {
185
+ var v = value[0];
186
+ var _this$state = _this.state,
187
+ textList = _this$state.textList,
188
+ jdList = _this$state.jdList;
189
+
190
+ for (var i = 0; i < textList.length; i++) {
191
+ if (v === textList[i]) {
192
+ _this.setState({
193
+ fjjd: jdList[i]
194
+ });
195
+ }
196
+ }
197
+ };
198
+
199
+ _this.selectSxlbOnChange = function (value) {
200
+ var v = value[0];
201
+ console.log(v);
202
+ _this.setState({
203
+ fjjd: ''
204
+ });
205
+ _this.props.form.setFieldsValue({
206
+ fjsx: ''
207
+ }, function () {
208
+ return _this.initFjsxList(v);
209
+ });
210
+ };
211
+
212
+ _this.requiredParams = function (required, id) {
213
+ var getFieldError = _this.props.form.getFieldError;
214
+
215
+ return {
216
+ error: getFieldError(id) !== undefined
217
+ };
218
+ };
219
+
220
+ _this.getDataList = function (fieldMap) {
221
+ var getFieldProps = _this.props.form.getFieldProps;
222
+ var _this$state2 = _this.state,
223
+ xnList = _this$state2.xnList,
224
+ xq = _this$state2.xq,
225
+ xqmc = _this$state2.xqmc,
226
+ fjsx = _this$state2.fjsx,
227
+ fjsxmc = _this$state2.fjsxmc,
228
+ fjsxList = _this$state2.fjsxList,
229
+ sxlbmc = _this$state2.sxlbmc,
230
+ fjjd = _this$state2.fjjd,
231
+ xwrymc = _this$state2.xwrymc,
232
+ fjid = _this$state2.fjid,
233
+ xxsx = _this$state2.xxsx,
234
+ sxlb = _this$state2.sxlb,
235
+ sxlbList = _this$state2.sxlbList;
236
+
237
+ var dataList = [];
238
+
239
+ //学年学期
240
+ if (fieldMap.XNXQ && fieldMap.XNXQ.sfxs === '1') {
241
+ // 是否必填
242
+ var required = fieldMap.XNXQ.sfbt === "1" ? true : false;
243
+ // 是否可编辑
244
+ var editable = fieldMap.XNXQ.sfbj === "1" ? true : false;
245
+ var initXq = xq ? [xq] : '';
246
+ dataList.push({
247
+ title: '学年学期',
248
+ text: xqmc,
249
+ render: function render() {
250
+ return _react2.default.createElement(
251
+ 'div',
252
+ { className: !editable ? 'nh-inputrender-disabled' : 'nh-inputrender' },
253
+ _react2.default.createElement(
254
+ _picker2.default,
255
+ _extends({
256
+ data: xnList,
257
+ cols: 1,
258
+ className: 'forss',
259
+ disabled: !editable
260
+ }, getFieldProps('xq', {
261
+ initialValue: initXq,
262
+ rules: [{ required: required, message: '请选择学年学期' }]
263
+ })),
264
+ _react2.default.createElement(
265
+ _list2.default.Item,
266
+ { arrow: 'horizontal' },
267
+ required ? _react2.default.createElement(
268
+ 'span',
269
+ { style: { color: 'red' } },
270
+ '*'
271
+ ) : null,
272
+ '\u5B66\u5E74\u5B66\u671F'
273
+ )
274
+ )
275
+ );
276
+ }
277
+ });
278
+ }
279
+
280
+ //附加事项类型
281
+ if (fieldMap.SXLBMC && fieldMap.SXLBMC.sfxs === '1') {
282
+ // 是否必填
283
+ var _required = fieldMap.SXLBMC.sfbt === "1" ? true : false;
284
+ // 是否可编辑
285
+ var _editable = fieldMap.SXLBMC.sfbj === "1" ? true : false;
286
+ var initSxlb = sxlb ? [sxlb] : '';
287
+ dataList.push({
288
+ title: '附加事项类型',
289
+ text: sxlbmc,
290
+ render: function render() {
291
+ return _react2.default.createElement(
292
+ 'div',
293
+ { className: !_editable ? 'nh-inputrender-disabled' : 'nh-inputrender' },
294
+ _react2.default.createElement(
295
+ _picker2.default,
296
+ _extends({
297
+ data: sxlbList,
298
+ cols: 1,
299
+ className: 'forss',
300
+ disabled: !_editable
301
+ // onChange={v => this.selectSxlbOnChange(v)}
302
+ }, getFieldProps('sxlb', {
303
+ initialValue: initSxlb,
304
+ rules: [{ required: _required, message: '请选择附加事项类型' }],
305
+ onChange: function onChange(v) {
306
+ return _this.selectSxlbOnChange(v);
307
+ }
308
+ })),
309
+ _react2.default.createElement(
310
+ _list2.default.Item,
311
+ { arrow: 'horizontal' },
312
+ _required ? _react2.default.createElement(
313
+ 'span',
314
+ { style: { color: 'red' } },
315
+ '*'
316
+ ) : null,
317
+ '\u9644\u52A0\u4E8B\u9879\u7C7B\u578B'
318
+ )
319
+ )
320
+ );
321
+ }
322
+ });
323
+ }
324
+
325
+ //附加事项
326
+ if (fieldMap.SXMC && fieldMap.SXMC.sfxs === '1') {
327
+ // 是否必填
328
+ var _required2 = fieldMap.SXMC.sfbt === "1" ? true : false;
329
+ // 是否可编辑
330
+ var _editable2 = fieldMap.SXMC.sfbj === "1" ? true : false;
331
+ var initFjsx = fjsx ? [fjsx] : '';
332
+ dataList.push({
333
+ title: '附加事项',
334
+ text: fjsxmc,
335
+ render: function render() {
336
+ return _react2.default.createElement(
337
+ 'div',
338
+ { className: !_editable2 ? 'nh-inputrender-disabled' : 'nh-inputrender' },
339
+ _react2.default.createElement(
340
+ _picker2.default,
341
+ _extends({
342
+ data: fjsxList,
343
+ cols: 1,
344
+ className: 'forss',
345
+ disabled: !_editable2
346
+ //onChange={v => this.selectOnChange(v)}
347
+ }, getFieldProps('fjsx', {
348
+ initialValue: initFjsx,
349
+ rules: [{ required: _required2, message: '请选择附加事项' }],
350
+ onChange: function onChange(v) {
351
+ return _this.selectOnChange(v);
352
+ }
353
+ })),
354
+ _react2.default.createElement(
355
+ _list2.default.Item,
356
+ { arrow: 'horizontal' },
357
+ _required2 ? _react2.default.createElement(
358
+ 'span',
359
+ { style: { color: 'red' } },
360
+ '*'
361
+ ) : null,
362
+ '\u9644\u52A0\u4E8B\u9879'
363
+ )
364
+ )
365
+ );
366
+ }
367
+ });
368
+ }
369
+
370
+ //绩点
371
+ if (fieldMap.JD && fieldMap.JD.sfxs === '1') {
372
+ // 是否必填
373
+ var _required3 = fieldMap.JD.sfbt === "1" ? true : false;
374
+ // 是否可编辑
375
+ var _editable3 = fieldMap.JD.sfbj === "1" ? true : false;
376
+ dataList.push({
377
+ id: 'fjjd',
378
+ title: '绩点',
379
+ text: fjjd,
380
+ required: _required3,
381
+ render: function render() {
382
+ getFieldProps('fjjd', {
383
+ initialValue: fjjd
384
+ });
385
+ return _react2.default.createElement(
386
+ _inputItem2.default,
387
+ {
388
+ className: 'nh-input-item',
389
+ editable: false,
390
+ disabled: !_editable3,
391
+ value: fjjd
392
+ },
393
+ '\u7EE9\u70B9'
394
+ );
395
+ }
396
+
397
+ });
398
+ }
399
+
400
+ //校外荣誉名称
401
+ if (fieldMap.XWRYMC && fieldMap.XWRYMC.sfxs === '1') {
402
+ var _required4 = fieldMap.XWRYMC.sfbt === "1" ? true : false;
403
+ var _editable4 = fieldMap.XWRYMC.sfbj === "1" ? true : false;
404
+ dataList.push({
405
+ id: 'xwrymc',
406
+ title: '校外荣誉名称',
407
+ text: xwrymc,
408
+ render: function render() {
409
+ return _react2.default.createElement(
410
+ _inputItem2.default,
411
+ _extends({
412
+ className: 'nh-input-item',
413
+ placeholder: '\u8BF7\u8F93\u5165',
414
+ value: xwrymc,
415
+ editable: _editable4,
416
+ disabled: !_editable4
417
+ }, getFieldProps('xwrymc', {
418
+ initialValue: xwrymc,
419
+ rules: [{ required: _required4, message: '请输入校外荣誉名称' }]
420
+ })),
421
+ '\u6821\u5916\u8363\u8A89\u540D\u79F0'
422
+ );
423
+ }
424
+ });
425
+ }
426
+
427
+ if (fieldMap.XXSX && fieldMap.XXSX.sfxs === '1') {
428
+ var _required5 = fieldMap.XXSX.sfbt === "1" ? true : false;
429
+ var _editable5 = fieldMap.XXSX.sfbj === "1" ? true : false;
430
+ dataList.push({
431
+ id: 'xxsx',
432
+ title: '详细说明',
433
+ text: xxsx,
434
+ required: _required5,
435
+ isUpload: false,
436
+ render: function render() {
437
+ return _react2.default.createElement(_textareaItem2.default, _extends({
438
+ title: '\u8BE6\u7EC6\u8BF4\u660E',
439
+ placeholder: '\u8BF7\u8F93\u5165',
440
+ 'data-seed': 'logId',
441
+ rows: 2,
442
+ count: 120,
443
+ editable: _editable5,
444
+ disabled: !_editable5
445
+ }, _this.requiredParams(_required5, 'xxsx'), getFieldProps('xxsx', {
446
+ initialValue: xxsx,
447
+ rules: [{ required: _required5, message: '请输入详细说明!' }],
448
+ onChange: function onChange(v) {
449
+ return _this.setState({ xxsx: v });
450
+ }
451
+ })));
452
+ }
453
+ });
454
+ }
455
+
456
+ //上传附件
457
+ if (fieldMap.FJID && fieldMap.FJID.sfxs === '1') {
458
+ var _required6 = fieldMap.FJID.sfbt === "1" ? true : false;
459
+ var _editable6 = fieldMap.FJID.sfbj === "1" ? true : false;
460
+ dataList.push({
461
+ id: 'fjid',
462
+ title: fieldMap.FJID.title,
463
+ text: fjid,
464
+ required: _required6,
465
+ isUpload: true,
466
+ render: function render() {
467
+ return _react2.default.createElement(
468
+ _list2.default.Item,
469
+ _this.requiredParams(_required6, 'fjid'),
470
+ _react2.default.createElement(
471
+ 'label',
472
+ { className: (0, _classnames2.default)({ 'nh-dynamic-form-disabled': !_editable6 }) },
473
+ fieldMap.FJID.title
474
+ ),
475
+ _react2.default.createElement(_NHImagePicker2.default, _extends({
476
+ serviceMark: 'sm-student',
477
+ moduleName: '学生信息',
478
+ isEdit: _this.props.isEdit && _editable6,
479
+ numberOfLimit: 10,
480
+ numberOfSize: 5
481
+ }, getFieldProps('fjid', {
482
+ initialValue: fjid,
483
+ rules: [{ required: _required6, message: '请上传附件' }]
484
+ })))
485
+ );
486
+ },
487
+ renderView: function renderView() {
488
+ return _react2.default.createElement(_NHImagePicker2.default, {
489
+ serviceMark: 'sm-student',
490
+ moduleName: '学生信息',
491
+ isEdit: false,
492
+ value: fjid
493
+ });
494
+ }
495
+ });
496
+ }
497
+ return dataList;
498
+ };
499
+
500
+ _this.state = {
501
+ xqmc: '', //学年学期
502
+ xq: '', //学期学年码
503
+ fjsx: '', //附加事项
504
+ fjsxmc: '', //附加事项名称
505
+ sxlb: '', //附加事项类型
506
+ sxlbmc: '', //附加事项类型名称
507
+ fjjd: '', //附加绩点
508
+ xwrymc: '', //校外荣誉称号名称
509
+ xxsx: '', //详细说明
510
+ fjid: '', //附加ID
511
+
512
+
513
+ fjsxList: [], //附加事项数据源
514
+ textList: [], //事项名称数据源
515
+ jdList: [], //绩点数据源
516
+
517
+ sxlbList: [], //事项类别数据源
518
+ xnList: [] //学年数据源
519
+ };
520
+ return _this;
521
+ }
522
+
523
+ //获取附加事项数据源
524
+
525
+
526
+ //获取学年学期数据源
527
+
528
+
529
+ //获取事项类别数据源
530
+
531
+
532
+ _createClass(EditInitForm, [{
533
+ key: 'calcSapan',
534
+
535
+
536
+ //计算span跨度
537
+ value: function calcSapan(fieldMapList) {
538
+
539
+ var totalSpan = 0; // 到目前为止的所有列数
540
+ var hasUseSpan = void 0; // 当前行已使用的列数
541
+ fieldMapList.map(function (item, index) {
542
+
543
+ var span = item.span;
544
+ hasUseSpan = totalSpan % 3;
545
+ if (3 - hasUseSpan < span) {
546
+ fieldMapList[index - 1].span += 3 - hasUseSpan;
547
+ totalSpan += 3 - hasUseSpan;
548
+ }
549
+
550
+ totalSpan += span;
551
+ });
552
+ return fieldMapList;
553
+ }
554
+ }, {
555
+ key: 'render',
556
+ value: function render() {
557
+ var _props = this.props,
558
+ form = _props.form,
559
+ isEdit = _props.isEdit,
560
+ fieldMap = _props.fieldMap,
561
+ title = _props.title;
562
+
563
+ var dataList = this.getDataList(fieldMap);
564
+ if (isEdit) {
565
+ return _react2.default.createElement(
566
+ 'form',
567
+ null,
568
+ _react2.default.createElement(
569
+ _list2.default,
570
+ { renderHeader: function renderHeader() {
571
+ return title;
572
+ } },
573
+ dataList.map(function (item, index) {
574
+ return _react2.default.createElement(
575
+ 'div',
576
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
577
+ item.render !== undefined ? item.render() : null
578
+ );
579
+ })
580
+ ),
581
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
582
+ );
583
+ }
584
+ return _react2.default.createElement(
585
+ 'div',
586
+ null,
587
+ _react2.default.createElement(
588
+ _card2.default,
589
+ { full: true },
590
+ _react2.default.createElement(_card2.default.Header, {
591
+ title: _react2.default.createElement(
592
+ 'div',
593
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
594
+ title
595
+ )
596
+ }),
597
+ _react2.default.createElement(
598
+ _card2.default.Body,
599
+ null,
600
+ dataList.map(function (item, index) {
601
+ if (item.isUpload) {
602
+ return _react2.default.createElement(
603
+ 'div',
604
+ { key: index },
605
+ _react2.default.createElement(
606
+ 'font',
607
+ { color: 'grey' },
608
+ item.title,
609
+ '\uFF1A '
610
+ ),
611
+ item.renderView()
612
+ );
613
+ }
614
+ return _react2.default.createElement(
615
+ 'div',
616
+ null,
617
+ _react2.default.createElement(
618
+ 'font',
619
+ { color: 'grey' },
620
+ item.title,
621
+ '\uFF1A '
622
+ ),
623
+ item.text,
624
+ _react2.default.createElement('br', null)
625
+ );
626
+ })
627
+ )
628
+ ),
629
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
630
+ );
631
+ }
632
+ }]);
633
+
634
+ return EditInitForm;
635
+ }(_react2.default.Component);
636
+
637
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
638
+ exports.default = EditForm;