dlt-for-react 1.0.24 → 1.1.1

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 +187 -118
  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,130 @@
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 basicUrl = 'api/sm-honorary-title/';
38
+
39
+ var SxgyJtEditFormIndex = function (_React$Component) {
40
+ _inherits(SxgyJtEditFormIndex, _React$Component);
41
+
42
+ function SxgyJtEditFormIndex(props) {
43
+ _classCallCheck(this, SxgyJtEditFormIndex);
44
+
45
+ var _this = _possibleConstructorReturn(this, (SxgyJtEditFormIndex.__proto__ || Object.getPrototypeOf(SxgyJtEditFormIndex)).call(this, props));
46
+
47
+ _this.validate = function (func) {
48
+ _this.nhEditFormRych.validateFields(function (err, formData) {
49
+ if (err) {
50
+ func(false);
51
+ } else {
52
+ _this.setState({ formData: formData }, function () {
53
+ func(true);
54
+ });
55
+ }
56
+ });
57
+ };
58
+
59
+ _this.save = function (func, failCallback) {
60
+ var _this$props = _this.props,
61
+ processApplyId = _this$props.processApplyId,
62
+ objId = _this$props.objId,
63
+ pkid = _this$props.pkid,
64
+ params = _this$props.params;
65
+ var formData = _this.state.formData;
66
+
67
+ var param = formData;
68
+ param.hjmdid = pkid;
69
+ param.gzfbid = params.pcid;
70
+ param.objId = objId;
71
+ param.lcslid = processApplyId;
72
+ var list = [param.fjid];
73
+ (0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
74
+ if (res && res.code === 200) {
75
+ (0, _NHFetch2.default)(basicUrl + 'openapi/saveOrUpdateCollectiveHjmd', 'POST', param).then(function (res) {
76
+ if (res && res.code === 200) {
77
+ func();
78
+ } else {
79
+ failCallback && failCallback();
80
+ _toast2.default.fail("保存失败");
81
+ }
82
+ });
83
+ } else {
84
+ _toast2.default.fail("附件保存失败");
85
+ }
86
+ });
87
+ };
88
+
89
+ _this.state = {
90
+ formData: {}
91
+ };
92
+ return _this;
93
+ }
94
+
95
+ /**
96
+ * 校验该分类表单是否全部填写完成,该方法必须存在
97
+ */
98
+
99
+
100
+ /**
101
+ * 保存方法,该方法必须存在
102
+ * 改分类的信息保存成功后,调用func方法进行后续信息的保存
103
+ */
104
+
105
+
106
+ _createClass(SxgyJtEditFormIndex, [{
107
+ key: 'render',
108
+ value: function render() {
109
+ var _this2 = this;
110
+
111
+ return _react2.default.createElement(_EditForm2.default, _extends({ ref: function ref(ele) {
112
+ return _this2.nhEditFormRych = ele;
113
+ } }, this.props));
114
+ }
115
+ }]);
116
+
117
+ return SxgyJtEditFormIndex;
118
+ }(_react2.default.Component);
119
+
120
+ SxgyJtEditFormIndex.propTypes = {};
121
+ SxgyJtEditFormIndex.defaultProps = {
122
+ isEdit: undefined, //是否是编辑状态
123
+ fieldMap: {}, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
124
+ processId: undefined, //流程ID
125
+ processApplyId: undefined, //流程申请主键ID
126
+ objId: undefined, //对象ID
127
+ pkid: undefined, //业务表主键ID
128
+ params: {} //参数集合,主要通过该参数集合给自定义面板传参
129
+ };
130
+ exports.default = SxgyJtEditFormIndex;
@@ -0,0 +1,563 @@
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 _modal = require('antd-mobile/lib/modal');
32
+
33
+ var _modal2 = _interopRequireDefault(_modal);
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/list/style/css');
44
+
45
+ require('antd-mobile/lib/textarea-item/style/css');
46
+
47
+ require('antd-mobile/lib/input-item/style/css');
48
+
49
+ require('antd-mobile/lib/toast/style/css');
50
+
51
+ require('antd-mobile/lib/modal/style/css');
52
+
53
+ var _react = require('react');
54
+
55
+ var _react2 = _interopRequireDefault(_react);
56
+
57
+ var _NHFetch = require('../../../../../../utils/NHFetch');
58
+
59
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
60
+
61
+ var _index = require('../../../../../NHImagePicker/index');
62
+
63
+ var _index2 = _interopRequireDefault(_index);
64
+
65
+ var _rcForm = require('rc-form');
66
+
67
+ var _classnames = require('classnames');
68
+
69
+ var _classnames2 = _interopRequireDefault(_classnames);
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; } // import { Form, Input, InputNumber, Select, Switch } from 'antd';
78
+
79
+
80
+ var basicUrl = 'api/sm-honorary-title/';
81
+
82
+ var EditInitForm = function (_React$Component) {
83
+ _inherits(EditInitForm, _React$Component);
84
+
85
+ function EditInitForm(props) {
86
+ _classCallCheck(this, EditInitForm);
87
+
88
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
89
+
90
+ _this.componentDidMount = function () {
91
+ var _this$props = _this.props,
92
+ objId = _this$props.objId,
93
+ pkid = _this$props.pkid,
94
+ params = _this$props.params;
95
+
96
+ var pcid = params.pcid; //批次ID,也就是任务ID
97
+
98
+ _this.getGzfbDetail(pcid, function (data) {
99
+ _this.setState({
100
+
101
+ rychid: data.RYCHID,
102
+ rychmc: data.MC,
103
+ pdzq: data.PXZQ,
104
+ pdzqmc: data.PXZQMC,
105
+ rychlbm: data.RYCHLBM,
106
+ rychlbmc: data.RYCHLBMC,
107
+ rychjbm: data.RYCHJBM,
108
+ rychjbmc: data.RYCHJBMC,
109
+ rychjj: data.JJ
110
+
111
+ }, function () {
112
+ //判断该学生是否有权限申请
113
+ _this.checkPersonalRychQualification({ objId: objId, gzfbid: pcid }, function () {
114
+ _this.judgeTaskIsOverTime();
115
+ });
116
+ //如果不是申请环节,还要获取到数据库中已有的数据用于回显
117
+ _this.getXshjmdByPkid(pkid);
118
+ });
119
+ });
120
+ };
121
+
122
+ _this.judgeTaskIsOverTime = function () {
123
+ var _this$props2 = _this.props,
124
+ processId = _this$props2.processId,
125
+ rwid = _this$props2.rwid;
126
+
127
+ console.log(_this.props);
128
+ (0, _NHFetch2.default)(basicUrl + 'openapi/sxgy/judgeTaskIsOverTime', 'POST', { "processId": processId, "rwid": rwid }).then(function (res) {
129
+ if (res && res.data) {
130
+ var isOver = res.data.isOver;
131
+ if (isOver === 1) {
132
+ _modal2.default.alert('提示', "任务已超时,如需进行操作需要管理员进行任务时间调整!");
133
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(true);
134
+ }
135
+ }
136
+ });
137
+ };
138
+
139
+ _this.getGzfbDetail = function (gzfbid, callback) {
140
+ (0, _NHFetch2.default)(basicUrl + 'openapi/getGzfbDetail/' + gzfbid, 'GET').then(function (res) {
141
+ if (res && res.data) {
142
+ if (callback && typeof callback === 'function') {
143
+ callback(res.data);
144
+ }
145
+ }
146
+ });
147
+ };
148
+
149
+ _this.getXshjmdByPkid = function (pkid) {
150
+ //通过PKID去查询是否有申请数据,有说明是审核
151
+ (0, _NHFetch2.default)(basicUrl + 'openapi/getXshjmdByPkid/' + pkid, 'GET').then(function (res) {
152
+ if (res && res.code === 200) {
153
+ if (res.data) {
154
+ var data = res.data;
155
+ _this.setState({
156
+ rychid: data.RYCHID,
157
+ rychmc: data.RYCHMC,
158
+ pdzq: data.PDZQ,
159
+ pdzqmc: data.PDZQMC,
160
+ rychlbm: data.RYCHLBM,
161
+ rychlbmc: data.RYCHLBMC,
162
+ rychjbm: data.RYCHJBM,
163
+ rychjbmc: data.RYCHJBMC,
164
+ rychjj: data.JJ,
165
+ sqly: data.SQLY,
166
+ fjid: res.data.FJID
167
+ });
168
+ }
169
+ } else {
170
+ _toast2.default.fail("调用接口失败");
171
+ }
172
+ });
173
+ };
174
+
175
+ _this.checkPersonalRychQualification = function (param, callback) {
176
+ //默认办理按钮不可用
177
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(true);
178
+ (0, _NHFetch2.default)(basicUrl + 'openapi/hasQualification', 'POST', param).then(function (res) {
179
+ if (res && res.code === 200) {
180
+ //资格名单表查不到记录,调用资格鉴定接口
181
+ if (!res.data.ZGMDID) {
182
+ var zgid = res.data.ZGID || '';
183
+ qualificationCheckOne(zgid, param.objId, function (data) {
184
+ var bfhtjs = data.bfhtj.split(";");
185
+ var bfhtj = bfhtjs.map(function (item, index) {
186
+ return _react2.default.createElement(
187
+ 'span',
188
+ { key: index + 1 },
189
+ index + 1,
190
+ '\u3001',
191
+ item,
192
+ _react2.default.createElement('br', null)
193
+ );
194
+ });
195
+ var modelMessage = "您由于不满足以下条件,所以不能执行申请操作:" + bfhtj;
196
+ _modal2.default.alert('提示', modelMessage);
197
+ }, function () {
198
+ //CheckOne通过后开启办理按钮
199
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(false);
200
+ });
201
+ } else {
202
+ //表里有数据,看sfyx字段的状态
203
+ if (res.data.SFYX === "0" || res.data.SFYX === 0) {
204
+ var modelMessage = "您由于不满足以下条件,所以不能执行申请操作:" + res.data.SCSM;
205
+ _modal2.default.alert('提示', modelMessage);
206
+ } else {
207
+ //能办理的话开启办理按钮
208
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(false);
209
+ }
210
+ }
211
+ } else {
212
+ _toast2.default.fail("调用接口失败");
213
+ }
214
+ if (callback) {
215
+ callback();
216
+ }
217
+ });
218
+ };
219
+
220
+ _this.requiredParams = function (required, id) {
221
+ var getFieldError = _this.props.form.getFieldError;
222
+
223
+ return {
224
+ error: getFieldError(id) !== undefined
225
+ };
226
+ };
227
+
228
+ _this.getDataList = function (fieldMap) {
229
+ // const { getFieldDecorator } = this.props.form;
230
+ var _this$props$form = _this.props.form,
231
+ getFieldProps = _this$props$form.getFieldProps,
232
+ getFieldError = _this$props$form.getFieldError;
233
+ var _this$state = _this.state,
234
+ rychid = _this$state.rychid,
235
+ rychmc = _this$state.rychmc,
236
+ rychjj = _this$state.rychjj,
237
+ pdzq = _this$state.pdzq,
238
+ pdzqmc = _this$state.pdzqmc,
239
+ rychlbm = _this$state.rychlbm,
240
+ rychlbmc = _this$state.rychlbmc,
241
+ rychjbm = _this$state.rychjbm,
242
+ rychjbmc = _this$state.rychjbmc,
243
+ sqly = _this$state.sqly,
244
+ fjid = _this$state.fjid;
245
+
246
+ var dataList = [];
247
+ //荣誉称号名称
248
+ if (fieldMap.MC && fieldMap.MC.sfxs === '1') {
249
+ var required = fieldMap.MC.sfbt === "1" ? true : false;
250
+ var editable = fieldMap.MC.sfbj === "1" ? true : false;
251
+ dataList.push({
252
+ id: fieldMap.MC.id,
253
+ title: fieldMap.MC.title,
254
+ text: rychmc,
255
+ required: required,
256
+ render: function render() {
257
+ getFieldProps('rychid', {
258
+ initialValue: rychid
259
+ });
260
+ return _react2.default.createElement(
261
+ _inputItem2.default,
262
+ {
263
+ className: 'nh-input-item',
264
+ placeholder: '\u8BF7\u8F93\u5165',
265
+ value: rychmc,
266
+ editable: false,
267
+ disabled: !editable
268
+ },
269
+ fieldMap.MC.title
270
+ );
271
+ }
272
+ });
273
+ }
274
+
275
+ //奖金
276
+ if (fieldMap.JJ && fieldMap.JJ.sfxs === '1') {
277
+ var _required = fieldMap.JJ.sfbt === "1" ? true : false;
278
+ var _editable = fieldMap.JJ.sfbj === "1" ? true : false;
279
+ dataList.push({
280
+ id: fieldMap.JJ.id,
281
+ title: fieldMap.JJ.title,
282
+ text: rychjj ? rychjj + '\u5143' : '\u65E0',
283
+ required: _required,
284
+ render: function render() {
285
+ getFieldProps('jj', {
286
+ initialValue: rychjj
287
+ });
288
+ return _react2.default.createElement(
289
+ _inputItem2.default,
290
+ {
291
+ className: 'nh-input-item',
292
+ placeholder: '\u8BF7\u8F93\u5165',
293
+ value: rychjj ? rychjj + '\u5143' : '\u65E0',
294
+ editable: false,
295
+ disabled: !_editable
296
+ },
297
+ fieldMap.JJ.title
298
+ );
299
+ }
300
+ });
301
+ }
302
+
303
+ //评定周期
304
+ if (fieldMap.PDZQ && fieldMap.PDZQ.sfxs === '1') {
305
+ var _required2 = fieldMap.PDZQ.sfbt === "1" ? true : false;
306
+ dataList.push({
307
+ id: fieldMap.PDZQ.id,
308
+ title: fieldMap.PDZQ.title,
309
+ text: pdzqmc,
310
+ required: _required2,
311
+ render: function render() {
312
+ getFieldProps('pdzq', {
313
+ initialValue: pdzq
314
+ });
315
+ return _react2.default.createElement(
316
+ _inputItem2.default,
317
+ {
318
+ className: 'nh-input-item',
319
+ placeholder: '\u8BF7\u8F93\u5165',
320
+ value: pdzqmc,
321
+ editable: false,
322
+ disabled: true
323
+ },
324
+ fieldMap.PDZQ.title
325
+ );
326
+ }
327
+ });
328
+ }
329
+
330
+ //荣誉称号类型
331
+ if (fieldMap.RYCHLBMC && fieldMap.RYCHLBMC.sfxs === '1') {
332
+ var _required3 = fieldMap.RYCHLBMC.sfbt === "1" ? true : false;
333
+ dataList.push({
334
+ id: fieldMap.RYCHLBMC.id,
335
+ title: fieldMap.RYCHLBMC.title,
336
+ text: rychlbmc,
337
+ required: _required3,
338
+ render: function render() {
339
+ getFieldProps('rychlbm', {
340
+ initialValue: rychlbm
341
+ });
342
+ return _react2.default.createElement(
343
+ _inputItem2.default,
344
+ {
345
+ className: 'nh-input-item',
346
+ placeholder: '\u8BF7\u8F93\u5165',
347
+ value: rychlbmc,
348
+ editable: false,
349
+ disabled: true
350
+ },
351
+ fieldMap.RYCHLBMC.title
352
+ );
353
+ }
354
+ });
355
+ }
356
+
357
+ //荣誉称号级别
358
+ if (fieldMap.RYCHJBMC && fieldMap.RYCHJBMC.sfxs === '1') {
359
+ var _required4 = fieldMap.RYCHJBMC.sfbt === "1" ? true : false;
360
+ dataList.push({
361
+ id: fieldMap.RYCHJBMC.id,
362
+ title: fieldMap.RYCHJBMC.title,
363
+ text: rychjbmc,
364
+ required: _required4,
365
+ render: function render() {
366
+ getFieldProps('rychjbm', {
367
+ initialValue: rychjbm
368
+ });
369
+ return _react2.default.createElement(
370
+ _inputItem2.default,
371
+ {
372
+ className: 'nh-input-item',
373
+ placeholder: '\u8BF7\u8F93\u5165',
374
+ value: rychjbmc,
375
+ editable: false,
376
+ disabled: true
377
+ },
378
+ fieldMap.RYCHJBMC.title
379
+ );
380
+ }
381
+ });
382
+ }
383
+
384
+ if (fieldMap.SQLY && fieldMap.SQLY.sfxs === '1') {
385
+ var _required5 = fieldMap.SQLY.sfbt === "1" ? true : false;
386
+ var _editable2 = fieldMap.SQLY.sfbj === "1" ? true : false;
387
+ dataList.push({
388
+ id: fieldMap.SQLY.id,
389
+ title: fieldMap.SQLY.title,
390
+ text: sqly,
391
+ required: _required5,
392
+ isUpload: false,
393
+ render: function render() {
394
+ return _react2.default.createElement(_textareaItem2.default, _extends({
395
+ title: fieldMap.SQLY.title,
396
+ placeholder: '\u8BF7\u8F93\u5165',
397
+ 'data-seed': 'logId',
398
+ rows: 3,
399
+ count: 500,
400
+ editable: _editable2,
401
+ disabled: !_editable2
402
+ }, _this.requiredParams(_required5, 'sqly'), getFieldProps('sqly', {
403
+ initialValue: sqly,
404
+ rules: [{ required: _required5, message: '请输入申请理由!' }],
405
+ onChange: function onChange(v) {
406
+ return _this.setState({ sqly: v });
407
+ }
408
+ })));
409
+ }
410
+ });
411
+ }
412
+
413
+ if (fieldMap.FJID && fieldMap.FJID.sfxs === '1') {
414
+ var _required6 = fieldMap.FJID.sfbt === "1" ? true : false;
415
+ var _editable3 = fieldMap.FJID.sfbj === "1" ? true : false;
416
+ dataList.push({
417
+ id: fieldMap.FJID.id,
418
+ title: fieldMap.FJID.title,
419
+ text: fjid,
420
+ required: _required6,
421
+ isUpload: true,
422
+ render: function render() {
423
+ return _react2.default.createElement(
424
+ _list2.default.Item,
425
+ _this.requiredParams(_required6, 'fjid'),
426
+ _react2.default.createElement(
427
+ 'label',
428
+ { className: (0, _classnames2.default)({ 'nh-dynamic-form-disabled': !_editable3 }) },
429
+ fieldMap.FJID.title
430
+ ),
431
+ _react2.default.createElement(_index2.default, _extends({
432
+ serviceMark: 'sm-honorary-title',
433
+ moduleName: '个人荣誉称号',
434
+ isEdit: _this.props.isEdit && _editable3,
435
+ numberOfLimit: 10,
436
+ numberOfSize: 5
437
+ }, getFieldProps('fjid', {
438
+ initialValue: fjid,
439
+ rules: [{ required: _required6, message: '请上传附件' }]
440
+ })))
441
+ );
442
+ },
443
+ renderView: function renderView() {
444
+ return _react2.default.createElement(_index2.default, {
445
+ serviceMark: 'sm-honorary-title',
446
+ moduleName: '个人荣誉称号',
447
+ isEdit: false,
448
+ value: fjid
449
+ });
450
+ }
451
+ });
452
+ }
453
+ return dataList;
454
+ };
455
+
456
+ _this.state = {
457
+ rychid: '', //荣誉称号ID
458
+ rychmc: '', //荣誉称号名称
459
+ pdzq: '', //评定周期
460
+ pdzqmc: '', //评定周期
461
+ rychlbm: '',
462
+ rychlbmc: '', //荣誉称号类别
463
+ ychjbm: '',
464
+ rychjbmc: '', //荣誉称号级别
465
+ rychjj: '', //荣誉称号奖金
466
+
467
+ sqly: '', //申请理由
468
+ fjid: '' //附件ID
469
+ };
470
+
471
+ return _this;
472
+ }
473
+ //根据工作发布ID查询详情
474
+
475
+
476
+ //获取学生获奖情况信息
477
+
478
+
479
+ _createClass(EditInitForm, [{
480
+ key: 'render',
481
+ value: function render() {
482
+ var _props = this.props,
483
+ form = _props.form,
484
+ isEdit = _props.isEdit,
485
+ fieldMap = _props.fieldMap,
486
+ title = _props.title;
487
+
488
+ var dataList = this.getDataList(fieldMap);
489
+ if (isEdit) {
490
+ return _react2.default.createElement(
491
+ 'form',
492
+ null,
493
+ _react2.default.createElement(
494
+ _list2.default,
495
+ { renderHeader: function renderHeader() {
496
+ return title;
497
+ } },
498
+ dataList.map(function (item) {
499
+ return _react2.default.createElement(
500
+ 'div',
501
+ { className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
502
+ item.render !== undefined ? item.render() : null
503
+ );
504
+ })
505
+ ),
506
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
507
+ );
508
+ }
509
+ return _react2.default.createElement(
510
+ 'div',
511
+ null,
512
+ _react2.default.createElement(
513
+ _card2.default,
514
+ { full: true },
515
+ _react2.default.createElement(_card2.default.Header, {
516
+ title: _react2.default.createElement(
517
+ 'div',
518
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
519
+ title
520
+ )
521
+ }),
522
+ _react2.default.createElement(
523
+ _card2.default.Body,
524
+ null,
525
+ dataList.map(function (item, index) {
526
+ if (item.isUpload) {
527
+ return _react2.default.createElement(
528
+ 'div',
529
+ { key: index },
530
+ _react2.default.createElement(
531
+ 'font',
532
+ { color: 'grey' },
533
+ item.title,
534
+ '\uFF1A '
535
+ ),
536
+ item.renderView()
537
+ );
538
+ }
539
+ return _react2.default.createElement(
540
+ 'div',
541
+ null,
542
+ _react2.default.createElement(
543
+ 'font',
544
+ { color: 'grey' },
545
+ item.title,
546
+ '\uFF1A '
547
+ ),
548
+ item.text,
549
+ _react2.default.createElement('br', null)
550
+ );
551
+ })
552
+ )
553
+ ),
554
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
555
+ );
556
+ }
557
+ }]);
558
+
559
+ return EditInitForm;
560
+ }(_react2.default.Component);
561
+
562
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
563
+ exports.default = EditForm;