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,706 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _card = require('antd-mobile/lib/card');
8
+
9
+ var _card2 = _interopRequireDefault(_card);
10
+
11
+ var _whiteSpace = require('antd-mobile/lib/white-space');
12
+
13
+ var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
14
+
15
+ var _textareaItem = require('antd-mobile/lib/textarea-item');
16
+
17
+ var _textareaItem2 = _interopRequireDefault(_textareaItem);
18
+
19
+ var _inputItem = require('antd-mobile/lib/input-item');
20
+
21
+ var _inputItem2 = _interopRequireDefault(_inputItem);
22
+
23
+ var _picker = require('antd-mobile/lib/picker');
24
+
25
+ var _picker2 = _interopRequireDefault(_picker);
26
+
27
+ var _list = require('antd-mobile/lib/list');
28
+
29
+ var _list2 = _interopRequireDefault(_list);
30
+
31
+ var _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/picker/style/css');
44
+
45
+ require('antd-mobile/lib/list/style/css');
46
+
47
+ var _react = require('react');
48
+
49
+ var _react2 = _interopRequireDefault(_react);
50
+
51
+ var _rcForm = require('rc-form');
52
+
53
+ var _moment = require('moment');
54
+
55
+ var _moment2 = _interopRequireDefault(_moment);
56
+
57
+ var _NHFetch = require('../../../../../utils/NHFetch');
58
+
59
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
60
+
61
+ var _classnames = require('classnames');
62
+
63
+ var _classnames2 = _interopRequireDefault(_classnames);
64
+
65
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66
+
67
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
68
+
69
+ 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; }
70
+
71
+ 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; }
72
+
73
+ var EditInitForm = function (_React$Component) {
74
+ _inherits(EditInitForm, _React$Component);
75
+
76
+ function EditInitForm(props) {
77
+ _classCallCheck(this, EditInitForm);
78
+
79
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
80
+
81
+ _this.componentDidMount = function () {
82
+ //通过PKID去查询是否有申请数据,有说明是审核
83
+ var pkid = _this.props.pkid;
84
+
85
+ _this.getKxjInfoByXsid(pkid, function (data) {
86
+ if (data) {
87
+ _this.setState({
88
+ qjjlid: data.QJID,
89
+ qjlxm: data.QJLXM,
90
+ qjlxmc: data.QJLX,
91
+ sfxylx: data.SFXYLX,
92
+ qjkssj: data.QJKSSJ,
93
+ qjjssj: data.QJJSSJ,
94
+ qjsct: data.QJSCT,
95
+ qjscxs: data.QJSCXS,
96
+ jjlxr: data.JJLXR,
97
+ jjlxrdh: data.JJLXRDH,
98
+ qjly: data.QJLY,
99
+ fjid: data.FJID
100
+ }, function () {
101
+ _this.onCallback(data.QJID);
102
+ });
103
+ } else {
104
+ _this.props.params.setSubmitBtnDisabled && _this.props.params.setSubmitBtnDisabled(true);
105
+ _this.setState({
106
+ selector: true
107
+ }, function () {
108
+ _this.initXjjlList();
109
+ });
110
+ // this.getQjlxDataSource();
111
+ // message.warn("暂无可销假信息!")
112
+ }
113
+ });
114
+ };
115
+
116
+ _this.getKxjInfoByXsid = function (pkid, callback) {
117
+ (0, _NHFetch2.default)('api/sm-holiday/hljwgy/openapi/getKxjInfoByXsid', 'GET', { pkid: pkid }).then(function (res) {
118
+ if (res && res.code === 200) {
119
+ callback(res.data);
120
+ } else {
121
+ message.error("调用接口失败");
122
+ }
123
+ });
124
+ };
125
+
126
+ _this.initXjjlList = function () {
127
+ var xsid = _this.props.objId;
128
+
129
+ (0, _NHFetch2.default)('api/sm-holiday/jxsl/openapi/getStuQjxx', 'GET', { xsid: xsid }).then(function (res) {
130
+ if (res && res.code === 200) {
131
+ var xjlxDataSource = res.data;
132
+ if (xjlxDataSource != null) {
133
+ var xjlxSelect = [];
134
+ xjlxDataSource.map(function (v, i) {
135
+ xjlxSelect.push({ label: v.QJLX + ' (' + v.SJMC + ')', value: v.PKID });
136
+ });
137
+ _this.setState({
138
+ kxjjl: xjlxDataSource,
139
+ xjxx: xjlxSelect
140
+ });
141
+ }
142
+ } else {
143
+ message.error("调用接口失败");
144
+ }
145
+ });
146
+ };
147
+
148
+ _this.onCallback = function (id) {
149
+ _this.props.childCallback(id);
150
+ };
151
+
152
+ _this.radioOnChange = function (val) {
153
+ var list = _this.state.kxjjl.filter(function (item) {
154
+ return item.PKID === val[0] ? true : false;
155
+ });
156
+ console.log('list', list);
157
+ if (list.length > 0) {
158
+ _this.setState({
159
+ qjlxm: list[0].QJLXM,
160
+ qjlxmc: list[0].QJLX,
161
+ sfxylx: list[0].SFXYLX,
162
+ qjkssj: list[0].QJKSSJ,
163
+ qjjssj: list[0].QJJSSJ,
164
+ qjsct: list[0].QJSCT,
165
+ qjscxs: list[0].QJSCXS,
166
+ jjlxr: list[0].JJLXR,
167
+ jjlxrdh: list[0].JJLXRDH,
168
+ qjly: list[0].QJLY,
169
+ fjid: list[0].FJID
170
+ }, function () {
171
+ _this.onCallback(list[0].PKID);
172
+ _this.props.params.setSubmitBtnDisabled && _this.props.params.setSubmitBtnDisabled(false);
173
+ });
174
+ }
175
+ };
176
+
177
+ _this.getDataList = function (fieldMap) {
178
+ var getFieldProps = _this.props.form.getFieldProps;
179
+ var _this$state = _this.state,
180
+ selector = _this$state.selector,
181
+ kxjjl = _this$state.kxjjl,
182
+ xjxx = _this$state.xjxx,
183
+ qjlxSelect = _this$state.qjlxSelect,
184
+ qjlxmc = _this$state.qjlxmc,
185
+ qjlxm = _this$state.qjlxm,
186
+ qjkssj = _this$state.qjkssj,
187
+ qjjssj = _this$state.qjjssj,
188
+ qjsct = _this$state.qjsct,
189
+ qjscxs = _this$state.qjscxs,
190
+ sfxylx = _this$state.sfxylx,
191
+ jjlxr = _this$state.jjlxr,
192
+ jjlxrdh = _this$state.jjlxrdh,
193
+ qjly = _this$state.qjly,
194
+ fjid = _this$state.fjid;
195
+
196
+ var dataList = [];
197
+
198
+ //请假记录选择
199
+ if (selector) {
200
+ // 是否必填
201
+ var required = true;
202
+ dataList.push({
203
+ title: '请假记录选择',
204
+ render: function render() {
205
+ return _react2.default.createElement(
206
+ 'div',
207
+ { className: 'nh-inputrender' },
208
+ _react2.default.createElement(
209
+ _picker2.default,
210
+ _extends({
211
+ data: xjxx,
212
+ cols: 1,
213
+ className: 'forss'
214
+ }, getFieldProps('xjxx', {
215
+ rules: [{ required: required, message: '请选择需要销假事务' }],
216
+ onChange: function onChange(val) {
217
+ return _this.radioOnChange(val);
218
+ }
219
+ })),
220
+ _react2.default.createElement(
221
+ _list2.default.Item,
222
+ { arrow: 'horizontal' },
223
+ required ? _react2.default.createElement(
224
+ 'span',
225
+ { style: { color: 'red' } },
226
+ '*'
227
+ ) : null,
228
+ '\u8BF7\u5047\u8BB0\u5F55\u9009\u62E9'
229
+ )
230
+ )
231
+ );
232
+ }
233
+ });
234
+ }
235
+
236
+ //请假类型
237
+ if (fieldMap.QJLXM && fieldMap.QJLXM.sfxs === '1') {
238
+
239
+ var _required = fieldMap.QJLXM.sfbt === "1";
240
+ var editable = fieldMap.QJLXM.sfbj === "1";
241
+
242
+ dataList.push({
243
+ title: fieldMap.QJLXM.title,
244
+ text: qjlxmc,
245
+ render: function render() {
246
+ return _react2.default.createElement(
247
+ _inputItem2.default,
248
+ _extends({
249
+ className: 'nh-input-item',
250
+ placeholder: '',
251
+ disabled: true,
252
+ editable: editable
253
+ }, getFieldProps('qjlxmc', {
254
+ initialValue: qjlxmc,
255
+ rules: [{ required: _required, message: '\u8BF7\u8F93\u5165' + fieldMap.QJLXM.title }]
256
+ })),
257
+ _required ? _react2.default.createElement(
258
+ 'span',
259
+ { style: { color: 'red' } },
260
+ '*'
261
+ ) : null,
262
+ fieldMap.QJLXM.title
263
+ );
264
+ }
265
+ });
266
+ }
267
+
268
+ //是否需要离校
269
+ if (fieldMap.SFXYLX && fieldMap.SFXYLX.sfxs === '1') {
270
+
271
+ var _required2 = fieldMap.SFXYLX.sfbt === "1";
272
+ var _editable = fieldMap.SFXYLX.sfbj === "1";
273
+
274
+ dataList.push({
275
+ title: fieldMap.SFXYLX.title,
276
+ text: sfxylx,
277
+ render: function render() {
278
+ return _react2.default.createElement(
279
+ _inputItem2.default,
280
+ _extends({
281
+ className: 'nh-input-item',
282
+ placeholder: '',
283
+ disabled: true,
284
+ editable: _editable
285
+ }, getFieldProps('sfxylx', {
286
+ initialValue: sfxylx,
287
+ rules: [{ required: _required2, message: '\u8BF7\u8F93\u5165' + fieldMap.SFXYLX.title }]
288
+ })),
289
+ _required2 ? _react2.default.createElement(
290
+ 'span',
291
+ { style: { color: 'red' } },
292
+ '*'
293
+ ) : null,
294
+ fieldMap.SFXYLX.title
295
+ );
296
+ }
297
+ });
298
+ }
299
+
300
+ //请假开始时间
301
+ if (fieldMap.QJKSSJSTR && fieldMap.QJKSSJSTR.sfxs === '1') {
302
+
303
+ var _required3 = fieldMap.QJKSSJSTR.sfbt === "1";
304
+ var _editable2 = fieldMap.QJKSSJSTR.sfbj === "1";
305
+
306
+ dataList.push({
307
+ title: fieldMap.QJKSSJSTR.title,
308
+ text: (0, _moment2.default)(qjkssj).format("YYYY-MM-DD HH:mm"),
309
+ render: function render() {
310
+ return _react2.default.createElement(
311
+ 'div',
312
+ { className: !_editable2 ? 'nh-inputrender-disabled' : 'nh-inputrender' },
313
+ _react2.default.createElement(
314
+ _inputItem2.default,
315
+ _extends({
316
+ className: 'nh-input-item',
317
+ placeholder: '',
318
+ disabled: true,
319
+ editable: _editable2
320
+ }, getFieldProps('qjkssj', {
321
+ initialValue: qjkssj,
322
+ rules: [{ required: _required3, message: '\u8BF7\u8F93\u5165' + fieldMap.QJKSSJSTR.title }]
323
+ })),
324
+ _required3 ? _react2.default.createElement(
325
+ 'span',
326
+ { style: { color: 'red' } },
327
+ '*'
328
+ ) : null,
329
+ fieldMap.QJKSSJSTR.title
330
+ )
331
+ );
332
+ }
333
+ });
334
+ }
335
+
336
+ // //请假结束时间
337
+ if (fieldMap.QJJSSJSTR && fieldMap.QJJSSJSTR.sfxs === '1') {
338
+
339
+ var _required4 = fieldMap.QJJSSJSTR.sfbt === "1";
340
+ var _editable3 = fieldMap.QJJSSJSTR.sfbj === "1";
341
+
342
+ dataList.push({
343
+ title: fieldMap.QJJSSJSTR.title,
344
+ text: (0, _moment2.default)(qjjssj).format("YYYY-MM-DD HH:mm"),
345
+ render: function render() {
346
+ return _react2.default.createElement(
347
+ 'div',
348
+ { className: !_editable3 ? 'nh-inputrender-disabled' : 'nh-inputrender' },
349
+ _react2.default.createElement(
350
+ _inputItem2.default,
351
+ _extends({
352
+ className: 'nh-input-item',
353
+ placeholder: '',
354
+ disabled: true,
355
+ editable: _editable3
356
+ }, getFieldProps('qjjssj', {
357
+ initialValue: qjjssj,
358
+ rules: [{ required: _required4, message: '\u8BF7\u8F93\u5165' + fieldMap.QJJSSJSTR.title }]
359
+ })),
360
+ _required4 ? _react2.default.createElement(
361
+ 'span',
362
+ { style: { color: 'red' } },
363
+ '*'
364
+ ) : null,
365
+ fieldMap.QJJSSJSTR.title
366
+ )
367
+ );
368
+ }
369
+ });
370
+ }
371
+
372
+ //请假时长
373
+ if (fieldMap.QJSCT && fieldMap.QJSCT.sfxs === '1') {
374
+
375
+ var _required5 = fieldMap.QJSCT.sfbt === "1";
376
+ var _editable4 = fieldMap.QJSCT.sfbj === "1";
377
+
378
+ var qjsc = "";
379
+ if (qjsct == 0 && qjscxs == 0) {
380
+ qjsc = "0小时";
381
+ } else if (qjsct == 0 && qjscxs != 0) {
382
+ qjsc = qjscxs + "小时";
383
+ } else if (qjsct != 0 && qjscxs == 0) {
384
+ qjsc = qjsct + "天";
385
+ } else {
386
+ qjsc = qjsct + "天" + qjscxs + "小时";
387
+ }
388
+
389
+ dataList.push({
390
+ title: fieldMap.QJSCT.title,
391
+ text: qjsc,
392
+ render: function render() {
393
+ return _react2.default.createElement(
394
+ 'div',
395
+ null,
396
+ _react2.default.createElement(
397
+ 'div',
398
+ { style: { display: 'none' } },
399
+ _react2.default.createElement(_inputItem2.default, _extends({}, getFieldProps('qjsc'), getFieldProps('qjsct', { initialValue: qjsct }), getFieldProps('qjscxs', { initialValue: qjscxs })))
400
+ ),
401
+ _react2.default.createElement(
402
+ _inputItem2.default,
403
+ {
404
+ disabled: true,
405
+ className: 'nh-input-item',
406
+ value: qjsc,
407
+ editable: false
408
+ },
409
+ fieldMap.QJSCT.title
410
+ )
411
+ );
412
+ }
413
+ });
414
+ }
415
+
416
+ //紧急联系人
417
+ if (fieldMap.JJLXR && fieldMap.JJLXR.sfxs === '1') {
418
+
419
+ var _required6 = fieldMap.JJLXR.sfbt === "1";
420
+ var _editable5 = fieldMap.JJLXR.sfbj === "1";
421
+
422
+ dataList.push({
423
+ title: fieldMap.JJLXR.title,
424
+ text: jjlxr,
425
+ render: function render() {
426
+ return _react2.default.createElement(
427
+ _inputItem2.default,
428
+ _extends({
429
+ className: 'nh-input-item',
430
+ placeholder: '',
431
+ disabled: true,
432
+ editable: _editable5
433
+ }, getFieldProps('jjlxr', {
434
+ initialValue: jjlxr,
435
+ rules: [{ required: _required6, message: '\u8BF7\u8F93\u5165' + fieldMap.JJLXR.title }]
436
+ })),
437
+ _required6 ? _react2.default.createElement(
438
+ 'span',
439
+ { style: { color: 'red' } },
440
+ '*'
441
+ ) : null,
442
+ fieldMap.JJLXR.title
443
+ );
444
+ }
445
+ });
446
+ }
447
+
448
+ //紧急联系人电话
449
+ if (fieldMap.JJLXRDH && fieldMap.JJLXRDH.sfxs === '1') {
450
+
451
+ var _required7 = fieldMap.JJLXRDH.sfbt === "1";
452
+ var _editable6 = fieldMap.JJLXRDH.sfbj === "1";
453
+
454
+ dataList.push({
455
+ title: fieldMap.JJLXRDH.title,
456
+ text: jjlxrdh,
457
+ render: function render() {
458
+ return _react2.default.createElement(
459
+ _inputItem2.default,
460
+ _extends({
461
+ className: 'nh-input-item',
462
+ type: 'phone',
463
+ placeholder: '',
464
+ disabled: true,
465
+ editable: _editable6
466
+ }, getFieldProps('jjlxrdh', {
467
+ initialValue: jjlxrdh,
468
+ rules: [{ required: _required7, message: '\u8BF7\u8F93\u5165' + fieldMap.JJLXRDH.title }]
469
+ })),
470
+ _required7 ? _react2.default.createElement(
471
+ 'span',
472
+ { style: { color: 'red' } },
473
+ '*'
474
+ ) : null,
475
+ fieldMap.JJLXRDH.title
476
+ );
477
+ }
478
+ });
479
+ }
480
+
481
+ //请假理由
482
+ if (fieldMap.QJLY && fieldMap.QJLY.sfxs === '1') {
483
+
484
+ var _required8 = fieldMap.QJLY.sfbt === "1";
485
+ var _editable7 = fieldMap.QJLY.sfbj === "1";
486
+
487
+ dataList.push({
488
+ title: fieldMap.QJLY.title,
489
+ text: qjly,
490
+ render: function render() {
491
+ return _react2.default.createElement(_textareaItem2.default, _extends({
492
+ className: 'nh-textarea-item',
493
+ title: _required8 ? _react2.default.createElement(
494
+ 'div',
495
+ null,
496
+ _react2.default.createElement(
497
+ 'span',
498
+ { style: { color: 'red' } },
499
+ '*'
500
+ ),
501
+ fieldMap.QJLY.title
502
+ ) : _react2.default.createElement(
503
+ 'span',
504
+ null,
505
+ fieldMap.QJLY.title
506
+ ),
507
+ placeholder: '',
508
+ disabled: true,
509
+ 'data-seed': 'logId',
510
+ rows: 3,
511
+ count: 300,
512
+ editable: _editable7
513
+ }, getFieldProps('qjly', {
514
+ initialValue: qjly,
515
+ rules: [{ required: _required8, message: '\u8BF7\u8F93\u5165' + fieldMap.QJLY.title }]
516
+ })));
517
+ }
518
+ });
519
+ }
520
+
521
+ //附件
522
+ // if (fieldMap.FJID && fieldMap.FJID.sfxs === '1') {
523
+ // const required = fieldMap.FJID.sfbt === "1" ? true : false;
524
+ // const editable = fieldMap.FJID.sfbj === "1" ? true : false;
525
+ // dataList.push({
526
+ // id: 'fjid',
527
+ // title: fieldMap.FJID.title,
528
+ // text: fjid,
529
+ // required: required,
530
+ // isUpload:true,
531
+ // render: () => {
532
+ // return (
533
+ // <List.Item {...this.requiredParams(required,'fjid')}>
534
+ // <label className={classNames({'nh-dynamic-form-disabled':!editable})}>{fieldMap.FJID.title}</label>
535
+ // <NHImagePicker
536
+ // serviceMark={'sm-holiday'}
537
+ // moduleName={'请假申请'}
538
+ // isEdit={this.props.isEdit && editable}
539
+ // numberOfLimit={10}
540
+ // numberOfSize={5}
541
+ // {...getFieldProps('fjid',{
542
+ // initialValue:fjid,
543
+ // rules: [
544
+ // { required: required, message: `请上传${fieldMap.FJID.title}` },
545
+ // ],
546
+ // })}
547
+ // />
548
+ // </List.Item>
549
+ // )
550
+ // },
551
+ // renderView: () => {
552
+ // return (
553
+ // <NHImagePicker
554
+ // serviceMark={'sm-holiday'}
555
+ // moduleName={'请假申请'}
556
+ // isEdit={false}
557
+ // value={fjid}
558
+ // />
559
+ // );
560
+ // }
561
+ // });
562
+ // }
563
+
564
+ return dataList;
565
+ };
566
+
567
+ _this.state = {
568
+ qjlxm: '', //请假类型码
569
+ qjlxmc: '', //请假类型名称
570
+ qjlx: '', //请假类型
571
+ qjkssj: '', //请假开始时间
572
+ qjjssj: '', //请假结束时间
573
+ qjsqsj: '', //请假申请时间
574
+ qjsct: '', //请假时长天
575
+ qjscxs: '', //请假时长小时
576
+ sjhm: '', //手机号码
577
+ sfxylx: '', //是否需要离校
578
+ jjlxr: '', //紧急联系人
579
+ jjlxrdh: '', //紧急联系人电话
580
+ qjly: '', //请假理由
581
+ fjid: '', //附件ID
582
+
583
+ qjlxSelect: '', //请假类型数据源
584
+ qjjlid: '', //请假记录ID
585
+ selector: false,
586
+ kxjjl: [], //可销假记录
587
+ xjxx: '' //销假信息
588
+ };
589
+ return _this;
590
+ }
591
+
592
+ //获取请假类型数据源
593
+ // getQjlxDataSource = () => {
594
+ // let t = new Date().getTime();
595
+ // NHFetch('api/sm-holiday/openapi/getQjlxDataSource', 'GET', t)
596
+ // .then(res => {
597
+ // if (res && res.code === 200) {
598
+ // let qjlxDataSource = res.data
599
+ // if (qjlxDataSource != null) {
600
+ // // let qjlxSelect = qjlxDataSource.map((v, i) => {
601
+ // // return <Option value={v.DM} key={i}>{v.MC}</Option>;
602
+ // // })
603
+ // qjlxDataSource.map((v, i) => {
604
+ // qjlxSelect.push({ label: v.MC, value: v.DM });
605
+ // })
606
+ // this.setState({
607
+ // qjlxSelect: qjlxSelect
608
+ // })
609
+ // }
610
+ // } else {
611
+ // message.error("调用接口失败")
612
+ // }
613
+ // })
614
+ // }
615
+
616
+ //获取销假记录
617
+
618
+
619
+ //回调方法
620
+
621
+
622
+ _createClass(EditInitForm, [{
623
+ key: 'render',
624
+ value: function render() {
625
+ var _props = this.props,
626
+ form = _props.form,
627
+ isEdit = _props.isEdit,
628
+ fieldMap = _props.fieldMap,
629
+ title = _props.title;
630
+
631
+ var dataList = this.getDataList(fieldMap);
632
+ if (isEdit) {
633
+ return _react2.default.createElement(
634
+ 'form',
635
+ null,
636
+ _react2.default.createElement(
637
+ _list2.default,
638
+ { renderHeader: function renderHeader() {
639
+ return title;
640
+ } },
641
+ dataList.map(function (item, index) {
642
+ return _react2.default.createElement(
643
+ 'div',
644
+ { key: index, className: (0, _classnames2.default)('nh-dynamic-list-item', { 'nh-dynamic-required': item.required }) },
645
+ item.render !== undefined ? item.render() : null
646
+ );
647
+ })
648
+ ),
649
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
650
+ );
651
+ }
652
+ return _react2.default.createElement(
653
+ 'div',
654
+ null,
655
+ _react2.default.createElement(
656
+ _card2.default,
657
+ { full: true },
658
+ _react2.default.createElement(_card2.default.Header, {
659
+ title: _react2.default.createElement(
660
+ 'div',
661
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
662
+ title
663
+ )
664
+ }),
665
+ _react2.default.createElement(
666
+ _card2.default.Body,
667
+ null,
668
+ dataList.map(function (item, index) {
669
+ if (item.isUpload) {
670
+ return _react2.default.createElement(
671
+ 'div',
672
+ { key: index },
673
+ _react2.default.createElement(
674
+ 'font',
675
+ { color: 'grey' },
676
+ item.title,
677
+ '\uFF1A '
678
+ ),
679
+ item.renderView()
680
+ );
681
+ }
682
+ return _react2.default.createElement(
683
+ 'div',
684
+ { key: index },
685
+ _react2.default.createElement(
686
+ 'font',
687
+ { color: 'grey' },
688
+ item.title,
689
+ '\uFF1A '
690
+ ),
691
+ item.text,
692
+ _react2.default.createElement('br', null)
693
+ );
694
+ })
695
+ )
696
+ ),
697
+ _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
698
+ );
699
+ }
700
+ }]);
701
+
702
+ return EditInitForm;
703
+ }(_react2.default.Component);
704
+
705
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
706
+ exports.default = EditForm;