dlt-for-react 1.0.24 → 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 (212) 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 +10 -20
  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 +156 -120
  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/browserJudge.js +33 -0
  199. package/lib/utils/common.js +18 -20
  200. package/lib/utils/createUuid.js +11 -31
  201. package/lib/utils/device.js +44 -0
  202. package/lib/utils/dynamicLoadCss.js +14 -0
  203. package/lib/utils/dynamicLoadJs.js +21 -0
  204. package/lib/utils/getLoginUser.js +1 -1
  205. package/lib/utils/getSize.js +2 -11
  206. package/lib/utils/getStyle.js +26 -0
  207. package/lib/utils/getSuitHeight.js +49 -0
  208. package/lib/utils/hasAuth.js +11 -0
  209. package/lib/utils/index.js +1 -34
  210. package/lib/utils/loadJS.js +40 -0
  211. package/package.json +1 -1
  212. /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
@@ -0,0 +1,147 @@
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 _EditForm = require('./EditForm');
26
+
27
+ var _EditForm2 = _interopRequireDefault(_EditForm);
28
+
29
+ var _NHFetch = require('../../../../../utils/NHFetch');
30
+
31
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
32
+
33
+ var _moment = require('moment');
34
+
35
+ var _moment2 = _interopRequireDefault(_moment);
36
+
37
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
+
39
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
40
+
41
+ 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; }
42
+
43
+ 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; }
44
+
45
+ /**
46
+ * 勤工助学岗位申请(移动端自定义表单)
47
+ * @author: zengxiangkai
48
+ * @date: 2020-05-19 10:55:40
49
+ */
50
+ var ApplyForXxhdIndex = function (_React$Component) {
51
+ _inherits(ApplyForXxhdIndex, _React$Component);
52
+
53
+ function ApplyForXxhdIndex(props) {
54
+ _classCallCheck(this, ApplyForXxhdIndex);
55
+
56
+ var _this = _possibleConstructorReturn(this, (ApplyForXxhdIndex.__proto__ || Object.getPrototypeOf(ApplyForXxhdIndex)).call(this, props));
57
+
58
+ _this.validate = function (func) {
59
+ _this.nhEditForm.validateFields(function (err, formData) {
60
+ if (err) {
61
+ func(false);
62
+ } else {
63
+ _this.setState({ formData: formData }, function () {
64
+ func(true);
65
+ });
66
+ }
67
+ });
68
+ };
69
+
70
+ _this.save = function (func) {
71
+ var _this$props = _this.props,
72
+ processApplyId = _this$props.processApplyId,
73
+ objId = _this$props.objId,
74
+ pkid = _this$props.pkid;
75
+
76
+ var param = _this.state.hdxx;
77
+ param.xsid = objId;
78
+ param.pkid = pkid;
79
+ param.lcid = processApplyId;
80
+ console.info('formData: ', param);
81
+ (0, _NHFetch2.default)('api/zhxg-gyxt/hdxx/add', 'POST', param).then(function (res) {
82
+ if (res && res.code === 200) {
83
+ func();
84
+ } else {
85
+ _toast2.default.fail("保存失败");
86
+ }
87
+ });
88
+ };
89
+
90
+ _this.state = {
91
+ formData: {},
92
+ cwxx: undefined,
93
+ hdxx: undefined
94
+ };
95
+ return _this;
96
+ }
97
+
98
+ /**
99
+ * 校验该分类表单是否全部填写完成,该方法必须存在
100
+ */
101
+
102
+
103
+ //保存
104
+
105
+
106
+ _createClass(ApplyForXxhdIndex, [{
107
+ key: 'render',
108
+ value: function render() {
109
+ var _this2 = this;
110
+
111
+ return _react2.default.createElement(_EditForm2.default, _extends({
112
+ ref: function ref(form) {
113
+ _this2.nhEditForm = form;
114
+ }
115
+ }, this.props, {
116
+ cwxx: this.state.cwxx,
117
+ changecwxx: function changecwxx(value) {
118
+ _this2.setState({ cwxx: value });
119
+ },
120
+ changeInfo: function changeInfo(value) {
121
+ _this2.setState({ hdxx: value });
122
+ }
123
+ }));
124
+ }
125
+ }]);
126
+
127
+ return ApplyForXxhdIndex;
128
+ }(_react2.default.Component);
129
+
130
+ exports.default = ApplyForXxhdIndex;
131
+
132
+
133
+ ApplyForXxhdIndex.defaultProps = {
134
+ fieldMap: {},
135
+ params: {}
136
+ };
137
+
138
+ ApplyForXxhdIndex.propTypes = {
139
+ pkid: _propTypes2.default.string, //业务表主键ID
140
+ objId: _propTypes2.default.string, //对象ID
141
+ processId: _propTypes2.default.string, //流程ID
142
+ processApplyId: _propTypes2.default.string, //流程申请主键ID
143
+ fieldMap: _propTypes2.default.object, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
144
+ params: _propTypes2.default.object, //参数集合,主要通过该参数集合给自定义面板传参
145
+ isEdit: _propTypes2.default.bool, //是否是编辑状态
146
+ title: _propTypes2.default.string
147
+ };
@@ -0,0 +1,474 @@
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 _picker = require('antd-mobile/lib/picker');
20
+
21
+ var _picker2 = _interopRequireDefault(_picker);
22
+
23
+ var _list = require('antd-mobile/lib/list');
24
+
25
+ var _list2 = _interopRequireDefault(_list);
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/textarea-item/style/css');
40
+
41
+ require('antd-mobile/lib/picker/style/css');
42
+
43
+ require('antd-mobile/lib/list/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 _NHFetch = require('../../../../../utils/NHFetch');
52
+
53
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
54
+
55
+ var _rcForm = require('rc-form');
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 baseCLURL = 'api/sm-student/proData/selectCascaderList';
70
+
71
+ var EditInitForm = function (_React$Component) {
72
+ _inherits(EditInitForm, _React$Component);
73
+
74
+ function EditInitForm(props) {
75
+ _classCallCheck(this, EditInitForm);
76
+
77
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
78
+
79
+ _this.componentDidMount = function () {
80
+ _this.getInitData();
81
+ _this.getYxSource();
82
+ };
83
+
84
+ _this.getInitData = function () {
85
+ //通过流程ID去查询是否有数据,有说明是审核
86
+ var param = { lcslid: _this.props.processApplyId };
87
+ (0, _NHFetch2.default)('api/sm-student/openapi/getZybjtzDataByLcslid', 'GET', param).then(function (res) {
88
+ if (res && res.code == 200) {
89
+ var initData = res.data;
90
+ if (initData != null) {
91
+ _this.setState({
92
+ xyxid: initData.XYXID,
93
+ xzyid: initData.XZYID,
94
+ xbjid: initData.XBJID,
95
+ yxmc: initData.YXMC,
96
+ zymc: initData.ZYMC,
97
+ bjmc: initData.BJMC,
98
+ ydsm: initData.YDSM
99
+ });
100
+ }
101
+ } else {
102
+ _toast2.default.fail("调用接口失败");
103
+ }
104
+ });
105
+ };
106
+
107
+ _this.getYxSource = function () {
108
+ var param = { level: 1, sign: 'zhxg_xsxx_yxzybj_select' };
109
+ (0, _NHFetch2.default)(baseCLURL, 'GET', param).then(function (res) {
110
+ if (res && res.data) {
111
+ var yxDataSource = res.data;
112
+ if (yxDataSource != null) {
113
+ var yxSource = [];
114
+ yxDataSource.map(function (v, i) {
115
+ yxSource.push({ label: v.label, value: v.value });
116
+ });
117
+ _this.setState({
118
+ yxList: yxSource
119
+ });
120
+ }
121
+ } else {
122
+ _toast2.default.fail("获取院系数据源失败");
123
+ }
124
+ });
125
+ };
126
+
127
+ _this.initZyList = function (cascaderVal) {
128
+ var param = { level: 2, sign: 'zhxg_xsxx_yxzybj_select', cascaderValue: cascaderVal };
129
+ (0, _NHFetch2.default)(baseCLURL, 'GET', param).then(function (res) {
130
+ if (res && res.code == 200) {
131
+ var zyDataSource = res.data;
132
+ if (zyDataSource != null) {
133
+ var zySource = [];
134
+ var zyList = zyDataSource.map(function (v, i) {
135
+ zySource.push({ label: v.label, value: v.value });
136
+ });
137
+ _this.setState({
138
+ zyList: zySource
139
+ });
140
+ }
141
+ } else {
142
+ _toast2.default.fail("获取专业数据源失败");
143
+ }
144
+ });
145
+ };
146
+
147
+ _this.initBjList = function (cascaderVal) {
148
+ var param = { level: 3, sign: 'zhxg_xsxx_yxzybj_select', cascaderValue: cascaderVal };
149
+ (0, _NHFetch2.default)(baseCLURL, 'GET', param).then(function (res) {
150
+ if (res && res.code == 200) {
151
+ var bjDataSource = res.data;
152
+ if (bjDataSource != null) {
153
+ var bjSource = [];
154
+ var bjList = bjDataSource.map(function (v, i) {
155
+ bjSource.push({ label: v.label, value: v.value });
156
+ });
157
+ _this.setState({
158
+ bjList: bjSource
159
+ });
160
+ }
161
+ } else {
162
+ _toast2.default.fail("获取班级数据源失败");
163
+ }
164
+ });
165
+ };
166
+
167
+ _this.onChangeYx = function (value) {
168
+ _this.setState({
169
+ xyxid: value[0]
170
+ }, function () {
171
+ _this.initZyList(value[0]);
172
+ });
173
+ };
174
+
175
+ _this.onChangeZy = function (value) {
176
+ _this.setState({
177
+ xzyid: value[0]
178
+ }, function () {
179
+ _this.initBjList(value[0]);
180
+ });
181
+ };
182
+
183
+ _this.onChangeBj = function (value) {
184
+ _this.setState({
185
+ xbjid: value
186
+ });
187
+ };
188
+
189
+ _this.requiredParams = function (required, id) {
190
+ var getFieldError = _this.props.form.getFieldError;
191
+
192
+ return {
193
+ error: getFieldError(id) !== undefined
194
+ };
195
+ };
196
+
197
+ _this.getDataList = function (fieldMap) {
198
+ var _this$props$form = _this.props.form,
199
+ getFieldProps = _this$props$form.getFieldProps,
200
+ getFieldError = _this$props$form.getFieldError;
201
+ var _this$state = _this.state,
202
+ yxList = _this$state.yxList,
203
+ xyxid = _this$state.xyxid,
204
+ yxmc = _this$state.yxmc,
205
+ xzyid = _this$state.xzyid,
206
+ zymc = _this$state.zymc,
207
+ zyList = _this$state.zyList,
208
+ xbjid = _this$state.xbjid,
209
+ bjmc = _this$state.bjmc,
210
+ bjList = _this$state.bjList,
211
+ ydsm = _this$state.ydsm;
212
+
213
+ var dataList = [];
214
+
215
+ //现院系
216
+ if (fieldMap.XYXID && fieldMap.XYXID.sfxs === '1') {
217
+ var required = fieldMap.XYXID.sfbt === "1";
218
+ var editable = fieldMap.XYXID.sfbj === "1";
219
+ var initXyxid = xyxid ? [xyxid] : '';
220
+ dataList.push({
221
+ title: fieldMap.XYXID.title,
222
+ text: yxmc,
223
+ render: function render() {
224
+ return _react2.default.createElement(
225
+ 'div',
226
+ { className: !editable ? 'nh-inputrender-disabled' : 'nh-inputrender' },
227
+ _react2.default.createElement(
228
+ _picker2.default,
229
+ _extends({
230
+ data: yxList,
231
+ cols: 1,
232
+ className: 'forss',
233
+ disabled: !editable
234
+ }, getFieldProps('xyxid', {
235
+ initialValue: initXyxid,
236
+ rules: [{ required: required, message: '\u8BF7\u9009\u62E9' }],
237
+ onChange: _this.onChangeYx
238
+ })),
239
+ _react2.default.createElement(
240
+ _list2.default.Item,
241
+ _extends({ arrow: 'horizontal' }, _this.requiredParams(required, 'xyxid')),
242
+ ' ',
243
+ fieldMap.XYXID.title
244
+ )
245
+ )
246
+ );
247
+ }
248
+ });
249
+ }
250
+
251
+ // 现专业
252
+ if (fieldMap.XZYID && fieldMap.XZYID.sfxs === '1') {
253
+ var _required = fieldMap.XZYID.sfbt === "1";
254
+ var _editable = fieldMap.XZYID.sfbj === "1";
255
+ var initXzyid = xzyid ? [xzyid] : '';
256
+ dataList.push({
257
+ title: fieldMap.XZYID.title,
258
+ text: zymc,
259
+ render: function render() {
260
+ return _react2.default.createElement(
261
+ 'div',
262
+ { className: !_editable ? 'nh-inputrender-disabled' : 'nh-inputrender' },
263
+ _react2.default.createElement(
264
+ _picker2.default,
265
+ _extends({
266
+ data: zyList,
267
+ cols: 1,
268
+ className: 'forss',
269
+ disabled: !_editable
270
+ }, getFieldProps('xzyid', {
271
+ initialValue: initXzyid,
272
+ rules: [{ required: _required, message: '\u8BF7\u9009\u62E9' }],
273
+ onChange: _this.onChangeZy
274
+ })),
275
+ _react2.default.createElement(
276
+ _list2.default.Item,
277
+ _extends({ arrow: 'horizontal' }, _this.requiredParams(_required, 'xzyid')),
278
+ ' ',
279
+ fieldMap.XZYID.title
280
+ )
281
+ )
282
+ );
283
+ }
284
+ });
285
+ }
286
+
287
+ // 现班级
288
+ if (fieldMap.XBJID && fieldMap.XBJID.sfxs === '1') {
289
+ var _required2 = fieldMap.XBJID.sfbt === "1";
290
+ var _editable2 = fieldMap.XBJID.sfbj === "1";
291
+ var initXbjid = xbjid ? [xbjid] : '';
292
+ dataList.push({
293
+ title: fieldMap.XBJID.title,
294
+ text: bjmc,
295
+ render: function render() {
296
+ return _react2.default.createElement(
297
+ 'div',
298
+ { className: !_editable2 ? 'nh-inputrender-disabled' : 'nh-inputrender' },
299
+ _react2.default.createElement(
300
+ _picker2.default,
301
+ _extends({
302
+ data: bjList,
303
+ cols: 1,
304
+ className: 'forss',
305
+ disabled: !_editable2
306
+ }, getFieldProps('xbjid', {
307
+ initialValue: initXbjid,
308
+ rules: [{ required: _required2, message: '\u8BF7\u9009\u62E9' }],
309
+ onChange: _this.onChangeBj
310
+ })),
311
+ _react2.default.createElement(
312
+ _list2.default.Item,
313
+ _extends({ arrow: 'horizontal' }, _this.requiredParams(_required2, 'xbjid')),
314
+ ' ',
315
+ fieldMap.XBJID.title
316
+ )
317
+ )
318
+ );
319
+ }
320
+ });
321
+ }
322
+
323
+ // 异动说明
324
+ if (fieldMap.YDSM && fieldMap.YDSM.sfxs === '1') {
325
+ var _required3 = fieldMap.YDSM.sfbt === "1";
326
+ var _editable3 = fieldMap.YDSM.sfbj === "1";
327
+ dataList.push({
328
+ id: 'ydsm',
329
+ title: '调整理由',
330
+ text: ydsm,
331
+ required: _required3,
332
+ isUpload: false,
333
+ render: function render() {
334
+ return _react2.default.createElement(_textareaItem2.default, _extends({
335
+ title: '\u8C03\u6574\u7406\u7531',
336
+ placeholder: '\u8BF7\u8F93\u5165',
337
+ rows: 3,
338
+ count: 500,
339
+ editable: _editable3,
340
+ disabled: !_editable3
341
+ }, _this.requiredParams(_required3, 'ydsm'), getFieldProps('ydsm', {
342
+ initialValue: ydsm,
343
+ rules: [{ required: _required3, message: '请输入调整理由!' }],
344
+ onChange: function onChange(v) {
345
+ return _this.setState({ ydsm: v });
346
+ }
347
+ })));
348
+ }
349
+ });
350
+ }
351
+ return dataList;
352
+ };
353
+
354
+ _this.state = {
355
+ xyxid: '', // 现学院id
356
+ xzyid: '', // 现专业id
357
+ xbjid: '', // 现班级id
358
+ yxmc: '', // 现院系名称
359
+ zymc: '', // 现专业名称
360
+ bjmc: '', // 现班级名称
361
+ ydsm: '', // 异动说明
362
+ yxList: [], // 院系数据源
363
+ zyList: [], // 专业数据源
364
+ bjList: [] // 班级数据源
365
+ };
366
+ return _this;
367
+ }
368
+
369
+ // 审核时获取要填充的数据
370
+
371
+
372
+ // 流程刚申请时需要获取的院系数据
373
+
374
+
375
+ // 流程刚申请时需要获取的专业数据
376
+
377
+
378
+ // 流程刚申请时需要获取的班级数据
379
+
380
+
381
+ // 调整学院
382
+
383
+
384
+ // 调整专业
385
+
386
+
387
+ // 调整班级
388
+
389
+
390
+ _createClass(EditInitForm, [{
391
+ key: 'render',
392
+ value: function render() {
393
+ var _props = this.props,
394
+ form = _props.form,
395
+ isEdit = _props.isEdit,
396
+ fieldMap = _props.fieldMap,
397
+ title = _props.title;
398
+
399
+ var dataList = this.getDataList(fieldMap);
400
+ if (isEdit) {
401
+ return _react2.default.createElement(
402
+ 'form',
403
+ null,
404
+ _react2.default.createElement(
405
+ _list2.default,
406
+ { renderHeader: function renderHeader() {
407
+ return title;
408
+ } },
409
+ dataList.map(function (item, index) {
410
+ return _react2.default.createElement(
411
+ 'div',
412
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
413
+ item.render !== undefined ? item.render() : null
414
+ );
415
+ })
416
+ ),
417
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
418
+ );
419
+ }
420
+ return _react2.default.createElement(
421
+ 'div',
422
+ null,
423
+ _react2.default.createElement(
424
+ _card2.default,
425
+ { full: true },
426
+ _react2.default.createElement(_card2.default.Header, {
427
+ title: _react2.default.createElement(
428
+ 'div',
429
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
430
+ title
431
+ )
432
+ }),
433
+ _react2.default.createElement(
434
+ _card2.default.Body,
435
+ null,
436
+ dataList.map(function (item, index) {
437
+ if (item.isUpload) {
438
+ return _react2.default.createElement(
439
+ 'div',
440
+ { key: index },
441
+ _react2.default.createElement(
442
+ 'font',
443
+ { color: 'grey' },
444
+ item.title,
445
+ '\uFF1A '
446
+ ),
447
+ item.renderView()
448
+ );
449
+ }
450
+ return _react2.default.createElement(
451
+ 'div',
452
+ null,
453
+ _react2.default.createElement(
454
+ 'font',
455
+ { color: 'grey' },
456
+ item.title,
457
+ '\uFF1A '
458
+ ),
459
+ item.text,
460
+ _react2.default.createElement('br', null)
461
+ );
462
+ })
463
+ )
464
+ ),
465
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
466
+ );
467
+ }
468
+ }]);
469
+
470
+ return EditInitForm;
471
+ }(_react2.default.Component);
472
+
473
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
474
+ exports.default = EditForm;