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,134 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _toast = require('antd-mobile/lib/toast');
8
+
9
+ var _toast2 = _interopRequireDefault(_toast);
10
+
11
+ 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; };
12
+
13
+ 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; }; }();
14
+
15
+ require('antd-mobile/lib/toast/style/css');
16
+
17
+ var _react = require('react');
18
+
19
+ var _react2 = _interopRequireDefault(_react);
20
+
21
+ var _propTypes = require('prop-types');
22
+
23
+ var _propTypes2 = _interopRequireDefault(_propTypes);
24
+
25
+ var _NHFetch = require('../../../../utils/NHFetch');
26
+
27
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
28
+
29
+ var _EditForm = require('./EditForm');
30
+
31
+ var _EditForm2 = _interopRequireDefault(_EditForm);
32
+
33
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
34
+
35
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
+
37
+ 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; }
38
+
39
+ 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; }
40
+
41
+ var JxjEditForm = function (_React$Component) {
42
+ _inherits(JxjEditForm, _React$Component);
43
+
44
+ function JxjEditForm(props) {
45
+ _classCallCheck(this, JxjEditForm);
46
+
47
+ var _this = _possibleConstructorReturn(this, (JxjEditForm.__proto__ || Object.getPrototypeOf(JxjEditForm)).call(this, props));
48
+
49
+ _this.validate = function (func) {
50
+ _this.nhEditFormZxj.validateFields(function (err, formData) {
51
+ if (err) {
52
+ func(false);
53
+ } else {
54
+ _this.setState({ formData: formData }, function () {
55
+ func(true);
56
+ });
57
+ }
58
+ });
59
+ };
60
+
61
+ _this.save = function (func, failCallback) {
62
+ var _this$props = _this.props,
63
+ processApplyId = _this$props.processApplyId,
64
+ objId = _this$props.objId,
65
+ pkid = _this$props.pkid,
66
+ params = _this$props.params;
67
+ var formData = _this.state.formData;
68
+
69
+ var param = formData;
70
+ param.hjmdid = pkid;
71
+ param.gzfbid = params.pcid, param.xsid = objId;
72
+ param.lcslid = processApplyId;
73
+ if (Array.isArray(param.mxid)) {
74
+ param.mxid = param.mxid[0];
75
+ }
76
+ var list = [param.fjid];
77
+ (0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
78
+ if (res && res.code === 200) {
79
+ (0, _NHFetch2.default)('api/sm-scholarship/openapi/saveXsHjmd', 'POST', param).then(function (res) {
80
+ if (res && res.code === 200) {
81
+ func();
82
+ } else {
83
+ failCallback && failCallback();
84
+ _toast2.default.fail("表单保存失败,请联系管理员!");
85
+ }
86
+ });
87
+ } else {
88
+ _toast2.default.fail("附件保存失败");
89
+ }
90
+ });
91
+ };
92
+
93
+ _this.state = {
94
+ formData: {}
95
+ };
96
+ return _this;
97
+ }
98
+
99
+ /**
100
+ * 校验该分类表单是否全部填写完成,该方法必须存在
101
+ */
102
+
103
+
104
+ /**
105
+ * 保存方法,该方法必须存在
106
+ * 改分类的信息保存成功后,调用func方法进行后续信息的保存
107
+ */
108
+
109
+
110
+ _createClass(JxjEditForm, [{
111
+ key: 'render',
112
+ value: function render() {
113
+ var _this2 = this;
114
+
115
+ return _react2.default.createElement(_EditForm2.default, _extends({ ref: function ref(ele) {
116
+ return _this2.nhEditFormZxj = ele;
117
+ } }, this.props));
118
+ }
119
+ }]);
120
+
121
+ return JxjEditForm;
122
+ }(_react2.default.Component);
123
+
124
+ JxjEditForm.propTypes = {};
125
+ JxjEditForm.defaultProps = {
126
+ isEdit: undefined, //是否是编辑状态
127
+ fieldMap: {}, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
128
+ processId: undefined, //流程ID
129
+ processApplyId: undefined, //流程申请主键ID
130
+ objId: undefined, //对象ID
131
+ pkid: undefined, //业务表主键ID
132
+ params: {} //参数集合,主要通过该参数集合给自定义面板传参
133
+ };
134
+ exports.default = JxjEditForm;
@@ -0,0 +1,378 @@
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 _list = require('antd-mobile/lib/list');
16
+
17
+ var _list2 = _interopRequireDefault(_list);
18
+
19
+ var _textareaItem = require('antd-mobile/lib/textarea-item');
20
+
21
+ var _textareaItem2 = _interopRequireDefault(_textareaItem);
22
+
23
+ var _inputItem = require('antd-mobile/lib/input-item');
24
+
25
+ var _inputItem2 = _interopRequireDefault(_inputItem);
26
+
27
+ var _toast = require('antd-mobile/lib/toast');
28
+
29
+ var _toast2 = _interopRequireDefault(_toast);
30
+
31
+ 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; };
32
+
33
+ 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; }; }();
34
+
35
+ require('antd-mobile/lib/card/style/css');
36
+
37
+ require('antd-mobile/lib/white-space/style/css');
38
+
39
+ require('antd-mobile/lib/list/style/css');
40
+
41
+ require('antd-mobile/lib/textarea-item/style/css');
42
+
43
+ require('antd-mobile/lib/input-item/style/css');
44
+
45
+ require('antd-mobile/lib/toast/style/css');
46
+
47
+ var _react = require('react');
48
+
49
+ var _react2 = _interopRequireDefault(_react);
50
+
51
+ var _rcForm = require('rc-form');
52
+
53
+ var _NHFetch = require('../../../../../utils/NHFetch');
54
+
55
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
56
+
57
+ var _classnames = require('classnames');
58
+
59
+ var _classnames2 = _interopRequireDefault(_classnames);
60
+
61
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
62
+
63
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64
+
65
+ 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; }
66
+
67
+ 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; }
68
+
69
+ var EditInitForm = function (_React$Component) {
70
+ _inherits(EditInitForm, _React$Component);
71
+
72
+ function EditInitForm(props) {
73
+ _classCallCheck(this, EditInitForm);
74
+
75
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
76
+
77
+ _this.getRdkInitData = function () {
78
+ var objId = _this.props.objId;
79
+
80
+ var t = new Date().getTime();
81
+ (0, _NHFetch2.default)('api/sm-difficult-student/openapi/getRdkInitData/' + objId, 'GET', t).then(function (res) {
82
+ if (res && res.code == 200) {
83
+ var rdkInitData = res.data;
84
+ if (rdkInitData != null) {
85
+ _this.setState({
86
+ rdkid: rdkInitData.PKID,
87
+ rdzq: rdkInitData.RDZQ,
88
+ knsdj: rdkInitData.KNSDJ
89
+ });
90
+ }
91
+ } else {
92
+ _toast2.default.fail("该学生没有困难生认定数据");
93
+ }
94
+ });
95
+ };
96
+
97
+ _this.getFqknsInitData = function () {
98
+ var pkid = _this.props.pkid;
99
+
100
+ var t = new Date().getTime();
101
+ (0, _NHFetch2.default)('api/sm-difficult-student/openapi/getFqknsInitData/' + pkid, 'GET', t).then(function (res) {
102
+ if (res && res.code == 200) {
103
+ var fqknsInitData = res.data;
104
+ if (fqknsInitData != null) {
105
+ fqly: fqknsInitData.FQLY;
106
+ }
107
+ } else {
108
+ _toast2.default.fail("调用接口失败");
109
+ }
110
+ });
111
+ };
112
+
113
+ _this.requiredParams = function (required, id) {
114
+ var getFieldError = _this.props.form.getFieldError;
115
+
116
+ return {
117
+ error: getFieldError(id) !== undefined
118
+ };
119
+ };
120
+
121
+ _this.getDataList = function (fieldMap) {
122
+ var _this$props$form = _this.props.form,
123
+ getFieldProps = _this$props$form.getFieldProps,
124
+ getFieldError = _this$props$form.getFieldError;
125
+ var _this$state = _this.state,
126
+ rdzq = _this$state.rdzq,
127
+ knsdj = _this$state.knsdj,
128
+ fqly = _this$state.fqly,
129
+ rdkid = _this$state.rdkid;
130
+
131
+ var dataList = [];
132
+
133
+ dataList.push({
134
+ id: 'rdkid',
135
+ title: '认定库ID',
136
+ text: rdkid,
137
+ isHide: true,
138
+ render: function render() {
139
+ getFieldProps('rdkid', {
140
+ initialValue: rdkid
141
+ });
142
+ return _react2.default.createElement(
143
+ 'div',
144
+ { style: { display: 'none' } },
145
+ _react2.default.createElement(
146
+ _inputItem2.default,
147
+ {
148
+ className: 'nh-input-item',
149
+ editable: false,
150
+ value: rdkid
151
+ },
152
+ '\u8BA4\u5B9A\u5E93ID'
153
+ )
154
+ );
155
+ }
156
+
157
+ });
158
+
159
+ //认定周期
160
+ if (fieldMap.RDZQ && fieldMap.RDZQ.sfxs === '1') {
161
+ // 是否必填
162
+ var required = fieldMap.RDZQ.sfbt === "1" ? true : false;
163
+ // 是否可编辑
164
+ var editable = fieldMap.RDZQ.sfbj === "1" ? true : false;
165
+ dataList.push({
166
+ id: 'rdzq',
167
+ title: '认定周期',
168
+ text: rdzq,
169
+ render: function render() {
170
+ getFieldProps('rdzq', {
171
+ initialValue: rdzq
172
+ });
173
+ return _react2.default.createElement(
174
+ _inputItem2.default,
175
+ {
176
+ className: 'nh-input-item',
177
+ editable: false,
178
+ disabled: !editable,
179
+ value: rdzq
180
+ },
181
+ '\u8BA4\u5B9A\u5468\u671F'
182
+ );
183
+ }
184
+
185
+ });
186
+ }
187
+
188
+ //困难等级
189
+ if (fieldMap.KNSDJ && fieldMap.KNSDJ.sfxs === '1') {
190
+ // 是否必填
191
+ var _required = fieldMap.KNSDJ.sfbt === "1" ? true : false;
192
+ // 是否可编辑
193
+ var _editable = fieldMap.KNSDJ.sfbj === "1" ? true : false;
194
+ dataList.push({
195
+ id: 'knsdj',
196
+ title: '困难等级',
197
+ text: knsdj,
198
+ render: function render() {
199
+ getFieldProps('knsdj', {
200
+ initialValue: knsdj
201
+ });
202
+ return _react2.default.createElement(
203
+ _inputItem2.default,
204
+ {
205
+ className: 'nh-input-item',
206
+ editable: false,
207
+ disabled: !_editable,
208
+ value: knsdj
209
+ },
210
+ '\u56F0\u96BE\u7B49\u7EA7'
211
+ );
212
+ }
213
+
214
+ });
215
+ }
216
+
217
+ if (fieldMap.FQLY && fieldMap.FQLY.sfxs === '1') {
218
+ var _required2 = fieldMap.FQLY.sfbt === "1" ? true : false;
219
+ var _editable2 = fieldMap.FQLY.sfbj === "1" ? true : false;
220
+ dataList.push({
221
+ id: 'fqly',
222
+ title: '申请理由',
223
+ text: fqly,
224
+ required: _required2,
225
+ isUpload: false,
226
+ render: function render() {
227
+ return _react2.default.createElement(_textareaItem2.default, _extends({
228
+ title: '\u7533\u8BF7\u7406\u7531',
229
+ placeholder: '\u8BF7\u8F93\u5165',
230
+ 'data-seed': 'logId',
231
+ rows: 2,
232
+ count: 120,
233
+ editable: _editable2,
234
+ disabled: !_editable2
235
+ }, _this.requiredParams(_required2, 'fqly'), getFieldProps('fqly', {
236
+ initialValue: fqly,
237
+ rules: [{ required: _required2, message: '请输入放弃理由!' }],
238
+ onChange: function onChange(v) {
239
+ return _this.setState({ fqly: v });
240
+ }
241
+ })));
242
+ }
243
+ });
244
+ }
245
+ return dataList;
246
+ };
247
+
248
+ _this.state = {
249
+ rdkid: '',
250
+ rdzq: '',
251
+ knsdj: '',
252
+ fqly: ''
253
+ };
254
+ return _this;
255
+ }
256
+
257
+ _createClass(EditInitForm, [{
258
+ key: 'componentDidMount',
259
+ value: function componentDidMount() {
260
+ this.getFqknsInitData();
261
+ this.getRdkInitData();
262
+ }
263
+
264
+ //获取困难生认定数据
265
+
266
+
267
+ //获取放弃困难生初始数据
268
+
269
+ }, {
270
+ key: 'calcSapan',
271
+
272
+
273
+ //计算span跨度
274
+ value: function calcSapan(fieldMapList) {
275
+
276
+ var totalSpan = 0; // 到目前为止的所有列数
277
+ var hasUseSpan = void 0; // 当前行已使用的列数
278
+ fieldMapList.map(function (item, index) {
279
+
280
+ var span = item.span;
281
+ hasUseSpan = totalSpan % 3;
282
+ if (3 - hasUseSpan < span) {
283
+ fieldMapList[index - 1].span += 3 - hasUseSpan;
284
+ totalSpan += 3 - hasUseSpan;
285
+ }
286
+
287
+ totalSpan += span;
288
+ });
289
+ return fieldMapList;
290
+ }
291
+ }, {
292
+ key: 'render',
293
+ value: function render() {
294
+ var _props = this.props,
295
+ form = _props.form,
296
+ isEdit = _props.isEdit,
297
+ fieldMap = _props.fieldMap,
298
+ title = _props.title;
299
+
300
+ var dataList = this.getDataList(fieldMap);
301
+ if (isEdit) {
302
+ return _react2.default.createElement(
303
+ 'form',
304
+ null,
305
+ _react2.default.createElement(
306
+ _list2.default,
307
+ { renderHeader: function renderHeader() {
308
+ return title;
309
+ } },
310
+ dataList.map(function (item, index) {
311
+ return _react2.default.createElement(
312
+ 'div',
313
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
314
+ item.render !== undefined ? item.render() : null
315
+ );
316
+ })
317
+ ),
318
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
319
+ );
320
+ }
321
+ return _react2.default.createElement(
322
+ 'div',
323
+ null,
324
+ _react2.default.createElement(
325
+ _card2.default,
326
+ { full: true },
327
+ _react2.default.createElement(_card2.default.Header, {
328
+ title: _react2.default.createElement(
329
+ 'div',
330
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
331
+ title
332
+ )
333
+ }),
334
+ _react2.default.createElement(
335
+ _card2.default.Body,
336
+ null,
337
+ dataList.map(function (item, index) {
338
+ if (item.isUpload) {
339
+ return _react2.default.createElement(
340
+ 'div',
341
+ { key: index },
342
+ _react2.default.createElement(
343
+ 'font',
344
+ { color: 'grey' },
345
+ item.title,
346
+ '\uFF1A '
347
+ ),
348
+ item.renderView()
349
+ );
350
+ }
351
+ if (item.isHide) {
352
+ return null;
353
+ }
354
+ return _react2.default.createElement(
355
+ 'div',
356
+ null,
357
+ _react2.default.createElement(
358
+ 'font',
359
+ { color: 'grey' },
360
+ item.title,
361
+ '\uFF1A '
362
+ ),
363
+ item.text,
364
+ _react2.default.createElement('br', null)
365
+ );
366
+ })
367
+ )
368
+ ),
369
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
370
+ );
371
+ }
372
+ }]);
373
+
374
+ return EditInitForm;
375
+ }(_react2.default.Component);
376
+
377
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
378
+ exports.default = EditForm;
@@ -0,0 +1,120 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _toast = require('antd-mobile/lib/toast');
8
+
9
+ var _toast2 = _interopRequireDefault(_toast);
10
+
11
+ 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; };
12
+
13
+ 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; }; }();
14
+
15
+ require('antd-mobile/lib/toast/style/css');
16
+
17
+ var _react = require('react');
18
+
19
+ var _react2 = _interopRequireDefault(_react);
20
+
21
+ var _NHFetch = require('../../../../../utils/NHFetch');
22
+
23
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
24
+
25
+ var _EditForm = require('./EditForm');
26
+
27
+ var _EditForm2 = _interopRequireDefault(_EditForm);
28
+
29
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
+
31
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
+
33
+ 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; }
34
+
35
+ 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; }
36
+
37
+ var FqknsEditForm = function (_React$Component) {
38
+ _inherits(FqknsEditForm, _React$Component);
39
+
40
+ function FqknsEditForm(props) {
41
+ _classCallCheck(this, FqknsEditForm);
42
+
43
+ var _this = _possibleConstructorReturn(this, (FqknsEditForm.__proto__ || Object.getPrototypeOf(FqknsEditForm)).call(this, props));
44
+
45
+ _this.validate = function (func) {
46
+ _this.nhEditForm.validateFields(function (err, formData) {
47
+ if (err) {
48
+ func(false);
49
+ } else {
50
+ _this.setState({ formData: formData }, function () {
51
+ func(true);
52
+ });
53
+ }
54
+ });
55
+ };
56
+
57
+ _this.save = function (func, failCallback) {
58
+ var _this$props = _this.props,
59
+ processApplyId = _this$props.processApplyId,
60
+ objId = _this$props.objId,
61
+ pkid = _this$props.pkid,
62
+ params = _this$props.params;
63
+ var formData = _this.state.formData;
64
+
65
+ var param = formData;
66
+ param.pkid = pkid;
67
+ param.xsid = objId;
68
+ param.lcslid = processApplyId;
69
+ (0, _NHFetch2.default)('api/sm-difficult-student/openapi/saveFqkns', 'POST', param).then(function (res) {
70
+ if (res && res.code === 200) {
71
+ func();
72
+ } else {
73
+ failCallback && failCallback();
74
+ _toast2.default.fail("保存失败");
75
+ }
76
+ });
77
+ };
78
+
79
+ _this.state = {
80
+ formData: {}
81
+ };
82
+ return _this;
83
+ }
84
+
85
+ /**
86
+ * 校验该分类表单是否全部填写完成,该方法必须存在
87
+ */
88
+
89
+
90
+ /**
91
+ * 保存方法,该方法必须存在
92
+ * 改分类的信息保存成功后,调用func方法进行后续信息的保存
93
+ */
94
+
95
+
96
+ _createClass(FqknsEditForm, [{
97
+ key: 'render',
98
+ value: function render() {
99
+ var _this2 = this;
100
+
101
+ return _react2.default.createElement(_EditForm2.default, _extends({ ref: function ref(ele) {
102
+ return _this2.nhEditForm = ele;
103
+ } }, this.props));
104
+ }
105
+ }]);
106
+
107
+ return FqknsEditForm;
108
+ }(_react2.default.Component);
109
+
110
+ FqknsEditForm.propTypes = {};
111
+ FqknsEditForm.defaultProps = {
112
+ isEdit: undefined, //是否是编辑状态
113
+ fieldMap: {}, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
114
+ processId: undefined, //流程ID
115
+ processApplyId: undefined, //流程申请主键ID
116
+ objId: undefined, //对象ID
117
+ pkid: undefined, //业务表主键ID
118
+ params: {} //参数集合,主要通过该参数集合给自定义面板传参
119
+ };
120
+ exports.default = FqknsEditForm;