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
+ /**
38
+ * 销假申请流程
39
+ */
40
+ var XjglEditForm = function (_React$Component) {
41
+ _inherits(XjglEditForm, _React$Component);
42
+
43
+ function XjglEditForm(props) {
44
+ _classCallCheck(this, XjglEditForm);
45
+
46
+ var _this = _possibleConstructorReturn(this, (XjglEditForm.__proto__ || Object.getPrototypeOf(XjglEditForm)).call(this, props));
47
+
48
+ _this.validate = function (func) {
49
+ _this.nhEditFormQjgl.validateFields(function (err, formData) {
50
+ if (err) {
51
+ func(false);
52
+ } else {
53
+ _this.setState({ formData: formData }, function () {
54
+ func(true);
55
+ });
56
+ }
57
+ });
58
+ };
59
+
60
+ _this.childCallback = function (id) {
61
+ if (id) {
62
+ _this.setState({
63
+ qjjlid: id
64
+ });
65
+ }
66
+ };
67
+
68
+ _this.save = function (func) {
69
+ var _this$props = _this.props,
70
+ processApplyId = _this$props.processApplyId,
71
+ objId = _this$props.objId,
72
+ pkid = _this$props.pkid;
73
+ var _this$state = _this.state,
74
+ formData = _this$state.formData,
75
+ qjjlid = _this$state.qjjlid;
76
+
77
+ var param = formData;
78
+
79
+ param.pkid = pkid;
80
+ param.qjjlid = qjjlid;
81
+ param.lcslid = processApplyId;
82
+ (0, _NHFetch2.default)('api/sm-holiday/hljwgy/openapi/saveCancellationOfLeaveApply', 'POST', param).then(function (res) {
83
+ if (res && res.code === 200) {
84
+ func();
85
+ } else {
86
+ _toast2.default.fail("保存失败");
87
+ }
88
+ });
89
+ };
90
+
91
+ _this.state = {
92
+ formData: {},
93
+ qjjlid: ''
94
+ };
95
+ return _this;
96
+ }
97
+
98
+ /**
99
+ * 校验该分类表单是否全部填写完成,该方法必须存在
100
+ */
101
+
102
+
103
+ //保存
104
+
105
+
106
+ _createClass(XjglEditForm, [{
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.nhEditFormQjgl = ele;
113
+ } }, this.props, { childCallback: this.childCallback }));
114
+ }
115
+ }]);
116
+
117
+ return XjglEditForm;
118
+ }(_react2.default.Component);
119
+
120
+ XjglEditForm.propTypes = {};
121
+ XjglEditForm.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 = XjglEditForm;
@@ -0,0 +1,413 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _card = require("antd-mobile/lib/card");
8
+
9
+ var _card2 = _interopRequireDefault(_card);
10
+
11
+ var _whiteSpace = require("antd-mobile/lib/white-space");
12
+
13
+ var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
14
+
15
+ var _textareaItem = require("antd-mobile/lib/textarea-item");
16
+
17
+ var _textareaItem2 = _interopRequireDefault(_textareaItem);
18
+
19
+ var _inputItem = require("antd-mobile/lib/input-item");
20
+
21
+ var _inputItem2 = _interopRequireDefault(_inputItem);
22
+
23
+ var _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/input-item/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 _moment = require("moment");
52
+
53
+ var _moment2 = _interopRequireDefault(_moment);
54
+
55
+ var _NHFetch = require("../../../../../utils/NHFetch");
56
+
57
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
58
+
59
+ var _index = require("../../../../NHImagePicker/index");
60
+
61
+ var _index2 = _interopRequireDefault(_index);
62
+
63
+ var _rcForm = require("rc-form");
64
+
65
+ var _classnames = require("classnames");
66
+
67
+ var _classnames2 = _interopRequireDefault(_classnames);
68
+
69
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70
+
71
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
72
+
73
+ 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; }
74
+
75
+ 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; }
76
+
77
+ var basicUrl = 'api/sm-punish/';
78
+ var getHashParam = function getHashParam(name) {
79
+ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)'),
80
+ queryString = window.location.hash.split('?')[1] || '',
81
+ result = queryString.match(reg);
82
+ return result ? decodeURIComponent(result[2]) : null;
83
+ };
84
+
85
+ var CfjcEditForm = function (_React$Component) {
86
+ _inherits(CfjcEditForm, _React$Component);
87
+
88
+ function CfjcEditForm(props) {
89
+ _classCallCheck(this, CfjcEditForm);
90
+
91
+ var _this = _possibleConstructorReturn(this, (CfjcEditForm.__proto__ || Object.getPrototypeOf(CfjcEditForm)).call(this, props));
92
+
93
+ _this.componentDidMount = function () {
94
+ var pkid = _this.props.pkid;
95
+
96
+ _this.getXscfjcxxByPkid(pkid, function (data) {
97
+ if (data) {
98
+ _this.initData(data);
99
+ } else {
100
+ //非审核
101
+ var wjdjid = getHashParam('wjdjid');
102
+ if (wjdjid) {
103
+ (0, _NHFetch2.default)(basicUrl + ("openapi/getXsWjdjByPkid/" + wjdjid), 'GET').then(function (res) {
104
+ if (res && res.code === 200) {
105
+ _this.initData(_extends({}, res.data, { FJID: undefined }));
106
+ } else {
107
+ _toast2.default.fail("获取处分信息失败");
108
+ }
109
+ }).catch(function (e) {
110
+ _toast2.default.fail("获取处分信息失败");
111
+ });
112
+ } else {
113
+ _toast2.default.info('缺少处分信息');
114
+ }
115
+ }
116
+ });
117
+ };
118
+
119
+ _this.initData = function (data) {
120
+ _this.setState({
121
+ cfjgid: data.CFJGID,
122
+ wjlxmc: data.WJLXMC,
123
+ wjsj: data.WJSJSTR || data.WJSJ,
124
+ wjnr: data.WJNR,
125
+ wjss: data.WJSS,
126
+ cflxmc: data.CFMC,
127
+ cfxqmc: data.CFXQMC || data.XQMC,
128
+ cfkssj: data.CFKSSJSTR || data.CFKSSJ,
129
+ cfjssj: data.CFJSSJSTR || data.CFJSSJ,
130
+ cfwh: data.CFWH,
131
+ cfjcwh: data.CFJCWH,
132
+ jcly: data.JCLY,
133
+ fjid: data.FJID || _this.state.fjid
134
+ });
135
+ };
136
+
137
+ _this.onChange = function (seq, value, text) {
138
+ _this.props.onChange && _this.props.onChange(seq, value, text);
139
+ };
140
+
141
+ _this.getXscfjcxxByPkid = function (pkid, callback) {
142
+ (0, _NHFetch2.default)(basicUrl + 'openapi/' + pkid + '/getXscfjcxxByPkid', 'GET').then(function (res) {
143
+ if (res && res.code === 200) {
144
+ callback(res.data);
145
+ } else {
146
+ _toast2.default.fail("获取处分信息失败");
147
+ }
148
+ });
149
+ };
150
+
151
+ _this.requiredParams = function (required, id) {
152
+ var getFieldError = _this.props.form.getFieldError;
153
+
154
+ return {
155
+ error: getFieldError(id) !== undefined
156
+ };
157
+ };
158
+
159
+ _this.getDataList = function (fieldMap) {
160
+ var _this$props$form = _this.props.form,
161
+ getFieldProps = _this$props$form.getFieldProps,
162
+ getFieldError = _this$props$form.getFieldError;
163
+ var _this$state = _this.state,
164
+ wjlxmc = _this$state.wjlxmc,
165
+ wjsj = _this$state.wjsj,
166
+ wjnr = _this$state.wjnr,
167
+ wjss = _this$state.wjss,
168
+ cflxmc = _this$state.cflxmc,
169
+ cfxqmc = _this$state.cfxqmc,
170
+ cfkssj = _this$state.cfkssj,
171
+ cfjssj = _this$state.cfjssj,
172
+ cfjcwh = _this$state.cfjcwh,
173
+ jcly = _this$state.jcly,
174
+ cfjgid = _this$state.cfjgid,
175
+ fjid = _this$state.fjid,
176
+ cfwh = _this$state.cfwh;
177
+
178
+ var fieldMapList = [];
179
+
180
+ //违纪时间
181
+ if (fieldMap.WJSJ && fieldMap.WJSJ.sfxs === '1') {
182
+ var required = fieldMap.WJSJ.sfbt === "1" ? true : false;
183
+ var editable = false;
184
+ fieldMapList.push({
185
+ id: 'wjsj',
186
+ title: '违纪时间',
187
+ isUpload: false,
188
+ text: wjsj,
189
+ required: required,
190
+ render: function render() {
191
+ getFieldProps('cfjgid', {
192
+ initialValue: cfjgid
193
+ });
194
+ return _react2.default.createElement(
195
+ "div",
196
+ { className: (0, _classnames2.default)({ 'nh-inputrender': editable, 'nh-inputrender-disabled': !editable }) },
197
+ _react2.default.createElement(
198
+ _list2.default.Item,
199
+ {
200
+ extra: wjsj
201
+ },
202
+ "\u8FDD\u7EAA\u65F6\u95F4"
203
+ )
204
+ );
205
+ }
206
+ });
207
+ }
208
+
209
+ //处分文号
210
+ if (fieldMap.CFWH && fieldMap.CFWH.sfxs === '1') {
211
+ //处分文号
212
+ var _required = fieldMap.CFWH.sfbt === "1" ? true : false;
213
+ var _editable = fieldMap.CFWH.sfbj === "1" ? true : false;
214
+
215
+ fieldMapList.push({
216
+ id: 'cfwh',
217
+ title: '处分文号',
218
+ isUpload: false,
219
+ text: cfwh,
220
+ required: _required,
221
+ render: function render() {
222
+ return _react2.default.createElement(
223
+ _inputItem2.default,
224
+ _extends({
225
+ placeholder: "\u8BF7\u8F93\u5165",
226
+ className: "nh-input-item",
227
+ editable: _editable,
228
+ count: 15,
229
+ disabled: !_editable
230
+ }, _this.requiredParams(_required, 'cfwh'), getFieldProps('cfwh', {
231
+ initialValue: cfwh,
232
+ rules: [{ required: _required, message: '请输入处分文号' }]
233
+ })),
234
+ "\u5904\u5206\u6587\u53F7"
235
+ );
236
+ }
237
+ });
238
+ }
239
+
240
+ //解除处分申请
241
+ if (fieldMap.JCLY && fieldMap.JCLY.sfxs === '1') {
242
+ var _required2 = fieldMap.JCLY.sfbt === "1" ? true : false;
243
+ var _editable2 = fieldMap.JCLY.sfbj === "1" ? true : false;
244
+ fieldMapList.push({
245
+ id: 'jcly',
246
+ title: '解除处分申请',
247
+ isUpload: false,
248
+ text: jcly,
249
+ required: _required2,
250
+ render: function render() {
251
+ return _react2.default.createElement(_textareaItem2.default, _extends({
252
+ title: "\u89E3\u9664\u5904\u5206\u7533\u8BF7",
253
+ placeholder: "\u8BF7\u8F93\u5165",
254
+ rows: 4,
255
+ count: 120,
256
+ editable: _editable2,
257
+ disabled: !_editable2
258
+ }, _this.requiredParams(_required2, 'jcly'), getFieldProps('jcly', {
259
+ initialValue: jcly,
260
+ rules: [{ required: _required2, message: '请输入解除处分申请' }]
261
+ })));
262
+ }
263
+ });
264
+ }
265
+
266
+ if (fieldMap.FJID && fieldMap.FJID.sfxs === '1') {
267
+ var _required3 = fieldMap.FJID.sfbt === "1" ? true : false;
268
+ var _editable3 = fieldMap.FJID.sfbj === "1" ? true : false;
269
+ fieldMapList.push({
270
+ id: 'fjid',
271
+ title: '学生手写违纪处分解除申请材料上传(附件)',
272
+ text: fjid,
273
+ required: _required3,
274
+ isUpload: true,
275
+ render: function render() {
276
+ return _react2.default.createElement(
277
+ _list2.default.Item,
278
+ _this.requiredParams(_required3, 'fjid'),
279
+ _react2.default.createElement(
280
+ "label",
281
+ { className: (0, _classnames2.default)({ 'nh-dynamic-form-disabled': !_editable3 }) },
282
+ "\u9644\u4EF6\u4E0A\u4F20"
283
+ ),
284
+ _react2.default.createElement(_index2.default, _extends({
285
+ serviceMark: 'sm-punish',
286
+ moduleName: '违纪处分-处分解除',
287
+ isEdit: _this.props.isEdit && _editable3,
288
+ numberOfLimit: 10,
289
+ numberOfSize: 5
290
+ }, getFieldProps('fjid', {
291
+ initialValue: fjid,
292
+ rules: [{ required: _required3, message: '请上传附件' }]
293
+ })))
294
+ );
295
+ },
296
+ renderView: function renderView() {
297
+ return _react2.default.createElement(_index2.default, {
298
+ serviceMark: 'sm-punish',
299
+ moduleName: '违纪处分-处分解除',
300
+ isEdit: false,
301
+ value: fjid
302
+ });
303
+ }
304
+ });
305
+ }
306
+ return fieldMapList;
307
+ };
308
+
309
+ _this.state = {
310
+ wjlxmc: '', //违纪类型名称
311
+ wjsj: '', //违纪时间--
312
+ wjnr: '', //违纪内容
313
+ wjss: '', //违纪事实
314
+ cflxmc: '', //处分类型
315
+ cfxqmc: '', //处分学期
316
+ cfkssj: '', //处分开始时间
317
+ cfjssj: '', //处分结束时间
318
+ cfwh: '', //处分文号--
319
+ cfjcwh: '', //处分解除文号
320
+ jcly: '', //申请理由--
321
+ cfjgid: '', //处分结果ID
322
+ fjid: undefined //申请材料ID--
323
+ };
324
+ return _this;
325
+ }
326
+
327
+ //查询学生处分解除信息
328
+
329
+
330
+ _createClass(CfjcEditForm, [{
331
+ key: "render",
332
+ value: function render() {
333
+ var _props = this.props,
334
+ form = _props.form,
335
+ isEdit = _props.isEdit,
336
+ fieldMap = _props.fieldMap,
337
+ title = _props.title;
338
+
339
+ var dataList = this.getDataList(fieldMap);
340
+ if (isEdit) {
341
+ return _react2.default.createElement(
342
+ "form",
343
+ null,
344
+ _react2.default.createElement(
345
+ _list2.default,
346
+ { renderHeader: function renderHeader() {
347
+ return title;
348
+ } },
349
+ dataList.map(function (item, index) {
350
+ return _react2.default.createElement(
351
+ "div",
352
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
353
+ item.render !== undefined ? item.render() : null
354
+ );
355
+ })
356
+ ),
357
+ _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
358
+ );
359
+ }
360
+ return _react2.default.createElement(
361
+ "div",
362
+ null,
363
+ _react2.default.createElement(
364
+ _card2.default,
365
+ { full: true },
366
+ _react2.default.createElement(_card2.default.Header, {
367
+ title: _react2.default.createElement(
368
+ "div",
369
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
370
+ title
371
+ )
372
+ }),
373
+ _react2.default.createElement(
374
+ _card2.default.Body,
375
+ null,
376
+ dataList.map(function (item, index) {
377
+ if (item.isUpload) {
378
+ return _react2.default.createElement(
379
+ "div",
380
+ { key: index },
381
+ _react2.default.createElement(
382
+ "font",
383
+ { color: "grey" },
384
+ item.title,
385
+ "\uFF1A "
386
+ ),
387
+ item.renderView()
388
+ );
389
+ }
390
+ return _react2.default.createElement(
391
+ "div",
392
+ { key: index },
393
+ _react2.default.createElement(
394
+ "font",
395
+ { color: "grey" },
396
+ item.title,
397
+ "\uFF1A "
398
+ ),
399
+ item.text,
400
+ _react2.default.createElement("br", null)
401
+ );
402
+ })
403
+ )
404
+ ),
405
+ _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
406
+ );
407
+ }
408
+ }]);
409
+
410
+ return CfjcEditForm;
411
+ }(_react2.default.Component);
412
+
413
+ exports.default = (0, _rcForm.createForm)()(CfjcEditForm);
@@ -0,0 +1,135 @@
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 _cfjcEditForm = require('./cfjcEditForm');
26
+
27
+ var _cfjcEditForm2 = _interopRequireDefault(_cfjcEditForm);
28
+
29
+ var _moment = require('moment');
30
+
31
+ var _moment2 = _interopRequireDefault(_moment);
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 basicUrl = 'api/sm-punish/';
42
+
43
+ var WjsbForm = function (_React$Component) {
44
+ _inherits(WjsbForm, _React$Component);
45
+
46
+ function WjsbForm(props) {
47
+ _classCallCheck(this, WjsbForm);
48
+
49
+ var _this = _possibleConstructorReturn(this, (WjsbForm.__proto__ || Object.getPrototypeOf(WjsbForm)).call(this, props));
50
+
51
+ _this.validate = function (func) {
52
+ _this.cfjcForm.validateFields(function (err, formData) {
53
+ if (err) {
54
+ func(false);
55
+ } else {
56
+ console.log(formData);
57
+ _this.setState({ formData: formData }, function () {
58
+ func(true);
59
+ });
60
+ }
61
+ });
62
+ };
63
+
64
+ _this.save = function (func, failCallback) {
65
+ var _this$props = _this.props,
66
+ processApplyId = _this$props.processApplyId,
67
+ objId = _this$props.objId,
68
+ pkid = _this$props.pkid;
69
+ var formData = _this.state.formData;
70
+
71
+
72
+ var param = formData;
73
+
74
+ param.cfjcid = pkid;
75
+ param.xsid = objId;
76
+ param.shlcid = processApplyId;
77
+ var list = [formData.fjid];
78
+ (0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
79
+ if (res && res.code === 200) {
80
+ (0, _NHFetch2.default)(basicUrl + 'openapi/saveOrUpdateCfjcInfo', 'POST', param).then(function (res) {
81
+ if (res && res.code === 200) {
82
+ func();
83
+ } else {
84
+ failCallback && failCallback();
85
+ _toast2.default.fail("保存处分解除信息失败");
86
+ }
87
+ });
88
+ } else {
89
+ failCallback && failCallback();
90
+ _toast2.default.fail("附件保存失败");
91
+ }
92
+ });
93
+ };
94
+
95
+ _this.state = {
96
+ formData: {}
97
+ };
98
+ return _this;
99
+ }
100
+
101
+ /**
102
+ * 校验该分类表单是否全部填写完成,该方法必须存在
103
+ */
104
+
105
+
106
+ /**
107
+ * 保存方法,该方法必须存在
108
+ * 改分类的信息保存成功后,调用func方法进行后续信息的保存
109
+ */
110
+
111
+
112
+ _createClass(WjsbForm, [{
113
+ key: 'render',
114
+ value: function render() {
115
+ var _this2 = this;
116
+
117
+ return _react2.default.createElement(_cfjcEditForm2.default, _extends({ ref: function ref(ele) {
118
+ return _this2.cfjcForm = ele;
119
+ } }, this.props));
120
+ }
121
+ }]);
122
+
123
+ return WjsbForm;
124
+ }(_react2.default.Component);
125
+
126
+ WjsbForm.defaultProps = {
127
+ isEdit: undefined, //是否是编辑状态
128
+ fieldMap: {}, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
129
+ processId: undefined, //流程ID
130
+ processApplyId: undefined, //流程申请主键ID
131
+ objId: undefined, //对象ID
132
+ pkid: undefined, //业务表主键ID
133
+ params: {} //参数集合,主要通过该参数集合给自定义面板传参
134
+ };
135
+ exports.default = WjsbForm;