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,571 @@
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 _switch = require("antd-mobile/lib/switch");
16
+
17
+ var _switch2 = _interopRequireDefault(_switch);
18
+
19
+ var _list = require("antd-mobile/lib/list");
20
+
21
+ var _list2 = _interopRequireDefault(_list);
22
+
23
+ var _toast = require("antd-mobile/lib/toast");
24
+
25
+ var _toast2 = _interopRequireDefault(_toast);
26
+
27
+ var _modal = require("antd-mobile/lib/modal");
28
+
29
+ var _modal2 = _interopRequireDefault(_modal);
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/switch/style/css");
40
+
41
+ require("antd-mobile/lib/list/style/css");
42
+
43
+ require("antd-mobile/lib/toast/style/css");
44
+
45
+ require("antd-mobile/lib/modal/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 _rcForm = require("rc-form");
56
+
57
+ var _NHFetch = require("../../../../../utils/NHFetch");
58
+
59
+ var _NHFetch2 = _interopRequireDefault(_NHFetch);
60
+
61
+ var _NHCascader = require("../../../../NHCascader");
62
+
63
+ var _NHCascader2 = _interopRequireDefault(_NHCascader);
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 alert = _modal2.default.alert;
74
+
75
+ var baseUrl = 'api/zhxg-gyxt';
76
+
77
+ var EditInitForm = function (_React$Component) {
78
+ _inherits(EditInitForm, _React$Component);
79
+
80
+ function EditInitForm(props) {
81
+ _classCallCheck(this, EditInitForm);
82
+
83
+ var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
84
+
85
+ _this.componentDidMount = function () {
86
+ _this.getData();
87
+ };
88
+
89
+ _this.getData = function () {
90
+ var _this$props = _this.props,
91
+ processApplyId = _this$props.processApplyId,
92
+ objId = _this$props.objId;
93
+ // 流程id
94
+
95
+ var lcid = processApplyId;
96
+ // 学生id
97
+ var xsid = objId;
98
+ (0, _NHFetch2.default)(baseUrl + "/openapi/getZsxx/" + xsid + '/' + lcid, 'GET').then(function (res) {
99
+ if (res) {
100
+ var stuInfo = res.data;
101
+ _this.setState({
102
+ ycwxx: stuInfo.ZSXX,
103
+ ycwid: stuInfo.CWID,
104
+ hdxx: {
105
+ xsid: stuInfo.XSID,
106
+ cwid: stuInfo.XCWID,
107
+ ycwid: stuInfo.CWID,
108
+ cwxx: stuInfo.XCWXX,
109
+ ycwxx: stuInfo.ZSXX,
110
+ sfhd: stuInfo.SFHD
111
+ },
112
+ sfhd: stuInfo.SFHD
113
+ }, function () {
114
+ // 默认可以办理
115
+ _this.hasQualification(false);
116
+ });
117
+ } else {
118
+ _this.hasQualification(true);
119
+ _toast2.default.fail("调用接口失败!");
120
+ }
121
+ });
122
+ };
123
+
124
+ _this.hasQualification = function (flag) {
125
+ if (flag === true) {
126
+ // 不可以办理
127
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(true);
128
+ } else {
129
+ _this.props.changeInfo(_this.state.hdxx);
130
+ _this.props.setSubmitBtnDisabled && _this.props.setSubmitBtnDisabled(false);
131
+ }
132
+ };
133
+
134
+ _this.radioOnChange = function (sfyw) {
135
+ console.log('sfyw', sfyw);
136
+ sfyw = sfyw === true ? '1' : '0';
137
+ if (sfyw === '1') {
138
+
139
+ _this.setState({
140
+ sfhd: sfyw
141
+ });
142
+
143
+ _this.hasQualification(true);
144
+ } else {
145
+ _this.setState({
146
+ sfhd: sfyw,
147
+ hdxx: {
148
+ ycwid: _this.state.cwid,
149
+ cwid: '',
150
+ ycwxx: _this.state.ycwxx,
151
+ cwxx: '',
152
+ sfhd: sfyw
153
+ },
154
+ tsxx: ''
155
+ }, function () {
156
+ _this.props.changecwxx('');
157
+ _this.props.changeInfo(_this.state.hdxx);
158
+ });
159
+
160
+ _this.hasQualification(false);
161
+ }
162
+ };
163
+
164
+ _this.changecwxx = function (value, selectedOptions) {
165
+ console.log('changecwxx-value', value);
166
+ var setFieldsValue = _this.props.form.setFieldsValue;
167
+
168
+ var params = { xxqmc: '', xldmc: '', xlcmc: '', xfj: '', xcwh: '', xcwid: '' };
169
+ if (selectedOptions) {
170
+ var _iteratorNormalCompletion = true;
171
+ var _didIteratorError = false;
172
+ var _iteratorError = undefined;
173
+
174
+ try {
175
+ for (var _iterator = selectedOptions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
176
+ var map = _step.value;
177
+
178
+ var currLevel = map.currLevel;
179
+ switch (currLevel) {
180
+ case 1:
181
+ params["xxqmc"] = map.label;
182
+ break;
183
+ case 2:
184
+ params["xldmc"] = map.label;
185
+ break;
186
+ case 3:
187
+ params["xlcmc"] = map.label;
188
+ break;
189
+ case 4:
190
+ params["xfj"] = map.label;
191
+ break;
192
+ case 5:
193
+ params["xcwh"] = map.label;
194
+ params["xcwid"] = map.value;
195
+ break;
196
+ }
197
+ }
198
+ } catch (err) {
199
+ _didIteratorError = true;
200
+ _iteratorError = err;
201
+ } finally {
202
+ try {
203
+ if (!_iteratorNormalCompletion && _iterator.return) {
204
+ _iterator.return();
205
+ }
206
+ } finally {
207
+ if (_didIteratorError) {
208
+ throw _iteratorError;
209
+ }
210
+ }
211
+ }
212
+
213
+ setFieldsValue(params);
214
+ }
215
+ _this.props.changecwxx(value);
216
+ // 拼接新床位信息
217
+ var xcwxx = params["xxqmc"] + (params["xldmc"] != null && params["xldmc"] != "" ? '/' + params["xldmc"] : '') + (params["xlcmc"] != null && params["xlcmc"] != "" ? '/' + params["xlcmc"] : '') + (params["xfj"] != null && params["xfj"] != "" ? '/' + params["xfj"] : '') + (params["xcwh"] != null && params["xcwh"] != "" ? '/' + params["xcwh"] : '');
218
+ var xcwid = params["xcwid"];
219
+ console.log('params', params);
220
+ _this.setState({
221
+ hdxx: {
222
+ cwid: xcwid,
223
+ ycwid: _this.state.ycwid,
224
+ cwxx: xcwxx,
225
+ ycwxx: _this.state.ycwxx,
226
+ sfhd: _this.state.sfhd
227
+ }
228
+ }, function () {
229
+ if (params["xcwid"] != null && params["xcwid"] != "") {
230
+ _this.queryBed(_this.state.hdxx.cwid);
231
+ } else {
232
+ _this.hasQualification(true);
233
+ }
234
+ });
235
+ };
236
+
237
+ _this.queryBed = function (cwid) {
238
+ var objId = _this.props.objId;
239
+
240
+ var params = { xsid: objId, cwid: cwid };
241
+ (0, _NHFetch2.default)(baseUrl + "/openapi/queryBedInfo", 'POST', params).then(function (res) {
242
+ if (res && res.code === 200) {
243
+ // 如果为 0,则没有人入住,
244
+ if (res.data === 0) {
245
+ _this.setState({
246
+ tsxx: '该床位可以选择!'
247
+ });
248
+ _this.props.changeInfo(_this.state.hdxx);
249
+ _this.hasQualification(false);
250
+ } else if (res.data === 1) {
251
+ _this.setState({
252
+ tsxx: '该床位已有人申请!'
253
+ });
254
+
255
+ // 不可以办理
256
+ _this.hasQualification(true);
257
+ _toast2.default.fail("您选择的床位已有人申请!请跟老师反映,核对床位信息!");
258
+ } else if (res.data === 2) {
259
+ _this.setState({
260
+ tsxx: '该床位为您申请的床位!'
261
+ });
262
+ _this.props.changeInfo(_this.state.hdxx);
263
+ _this.hasQualification(false);
264
+ } else if (res.data === 3) {
265
+ _this.setState({
266
+ tsxx: '该床位已有人入住!'
267
+ });
268
+
269
+ // 可以办理
270
+ _this.hasQualification(false);
271
+ _toast2.default.fail("您选择的床位已有人入住!请注意!");
272
+ } else if (res.data === 4) {
273
+ _this.setState({
274
+ tsxx: '该床位为您入住的床位!'
275
+ });
276
+ _this.props.changeInfo(_this.state.hdxx);
277
+ _this.hasQualification(false);
278
+ } else if (res.data === 5) {
279
+ _this.setState({
280
+ tsxx: '该宿舍为男生宿舍!'
281
+ });
282
+
283
+ _this.hasQualification(true);
284
+ _toast2.default.fail("您选择的床位为男生宿舍!如果床位信息有误,请跟老师反映!");
285
+ } else if (res.data === 6) {
286
+ _this.setState({
287
+ tsxx: '该宿舍为女生宿舍!'
288
+ });
289
+
290
+ _this.hasQualification(true);
291
+ _toast2.default.fail("您选择的床位为女生宿舍!如果床位信息有误,请跟老师反映!");
292
+ } else {
293
+ _this.setState({
294
+ tsxx: '该宿舍未分配入住!'
295
+ });
296
+
297
+ _this.hasQualification(true);
298
+ _toast2.default.fail("您选择的床位未分配入住!如果床位信息有误,请跟老师反映!");
299
+ }
300
+ } else {
301
+ _toast2.default.fail("调用接口失败");
302
+ }
303
+ });
304
+ };
305
+
306
+ _this.getDataList = function (fieldMap) {
307
+ console.log('fieldMap', fieldMap);
308
+ var _this$state = _this.state,
309
+ ycwxx = _this$state.ycwxx,
310
+ sfhd = _this$state.sfhd;
311
+ var cwxx = _this.state.hdxx.cwxx;
312
+
313
+ var sfyw = sfhd === '1' ? '有误' : '无误';
314
+ var switchChange = false;
315
+ var formItemLayout = { wrapperCol: { span: 24 } };
316
+ // 存放页面渲染的组件
317
+ var dataList = [];
318
+ var getFieldProps = _this.props.form.getFieldProps;
319
+
320
+ // 原住宿信息
321
+
322
+ if (fieldMap.YCWXX && fieldMap.YCWXX.sfxs === '1') {
323
+ var required = fieldMap.YCWXX.sfbt === "1";
324
+ var editable = fieldMap.YCWXX.sfbj === "1";
325
+ // 将原住宿信息组件加入表单中
326
+ dataList.push({
327
+ title: '住宿信息',
328
+ text: ycwxx,
329
+ render: function render() {
330
+ return _react2.default.createElement(
331
+ "div",
332
+ { className: "ycwxx" },
333
+ _react2.default.createElement(
334
+ _list2.default.Item,
335
+ {
336
+ extra: _react2.default.createElement(
337
+ "div",
338
+ null,
339
+ ycwxx
340
+ )
341
+ },
342
+ "\u4F4F\u5BBF\u4FE1\u606F"
343
+ )
344
+ );
345
+ }
346
+ });
347
+ }
348
+
349
+ // 住宿信息是否有误
350
+ if (fieldMap.SFHD && fieldMap.SFHD.sfxs === '1') {
351
+ var _required = fieldMap.SFHD.sfbt === "1";
352
+ var _editable = fieldMap.SFHD.sfbj === "1";
353
+ dataList.push({
354
+ title: '住宿信息是否有误',
355
+ text: sfyw,
356
+ render: function render() {
357
+ return _react2.default.createElement(
358
+ "div",
359
+ null,
360
+ _editable ? _react2.default.createElement(
361
+ _list2.default.Item,
362
+ {
363
+ extra: _react2.default.createElement(_switch2.default, _extends({
364
+ disabled: !_editable
365
+ }, getFieldProps('sfyw', {
366
+ valuePropName: 'checked',
367
+ initialValue: sfyw === '1' ? true : false,
368
+ rules: [{ required: _required, message: '住宿信息是否有误' }],
369
+ onChange: function onChange(val) {
370
+ return _this.radioOnChange(val);
371
+ }
372
+ })))
373
+ },
374
+ _required ? _react2.default.createElement(
375
+ "span",
376
+ { style: { color: 'red' } },
377
+ "*"
378
+ ) : null,
379
+ "\u4F4F\u5BBF\u4FE1\u606F\u662F\u5426\u6709\u8BEF"
380
+ ) : _react2.default.createElement(
381
+ _list2.default.Item,
382
+ {
383
+ extra: _react2.default.createElement(
384
+ "div",
385
+ null,
386
+ sfyw
387
+ ) },
388
+ "\u4F4F\u5BBF\u4FE1\u606F\u662F\u5426\u6709\u8BEF"
389
+ )
390
+ );
391
+ }
392
+ });
393
+ }
394
+
395
+ // 将新住宿信息组件加入表单中
396
+ if (fieldMap.SFHD && fieldMap.SFHD.sfxs === '1' && _this.state.sfhd === '1') {
397
+ var _required2 = fieldMap.SFHD.sfbt === "1";
398
+ var _editable2 = fieldMap.SFHD.sfbj === "1";
399
+ dataList.push({
400
+ title: '现住宿信息',
401
+ text: cwxx,
402
+ render: function render() {
403
+ return _react2.default.createElement(
404
+ "div",
405
+ { className: "cwxx" },
406
+ _editable2 ? _react2.default.createElement(
407
+ _list2.default.Item,
408
+ {
409
+ extra: _react2.default.createElement(_NHCascader2.default, { sign: 'zhxg_gy_zsxxjl', changeOnSelect: true, style: { width: '100%' },
410
+ onChange: _this.changecwxx, value: _this.props.cwxx, baseUrl: "api/zhxg-gyxt",
411
+ cols: 5 }) },
412
+ _required2 ? _react2.default.createElement(
413
+ "span",
414
+ { style: { color: 'red' } },
415
+ "*"
416
+ ) : null,
417
+ "\u73B0\u4F4F\u5BBF\u4FE1\u606F"
418
+ ) : _react2.default.createElement(
419
+ _list2.default.Item,
420
+ { extra: _react2.default.createElement(
421
+ "div",
422
+ null,
423
+ cwxx
424
+ ) },
425
+ "\u73B0\u4F4F\u5BBF\u4FE1\u606F"
426
+ )
427
+ );
428
+ },
429
+ span: 3
430
+ });
431
+ }
432
+
433
+ return dataList;
434
+ };
435
+
436
+ _this.state = {
437
+ ycwid: '', // 原床位id
438
+ ycwxx: '', // 原床位信息
439
+ hdxx: { // 核对信息
440
+ xsid: '', // 学生id
441
+ ycwid: '', // 原床位 id
442
+ cwid: '', // 床位 id
443
+ ycwxx: '', // 原床位信息
444
+ cwxx: '', // 新住宿信息
445
+ sfhd: '', // 是否有误
446
+ lcid: '' // 流程id
447
+ },
448
+ sfhd: '', // 是否住宿信息有误
449
+ tsxx: '', // 新住宿信息是否有人入住提示信息
450
+ switchChange: false
451
+ };
452
+ return _this;
453
+ }
454
+
455
+ /**
456
+ * * 获取学生住宿信息
457
+ *
458
+ * @memberof EditInitForm
459
+ */
460
+
461
+
462
+ // 是否可以办理
463
+
464
+
465
+ // 住宿信息是否有误单选框
466
+
467
+
468
+ // 修改住宿信息
469
+
470
+
471
+ // 查询选择的床位是否已有人入住,有人入住则不能办理且提示咨询老师
472
+
473
+
474
+ _createClass(EditInitForm, [{
475
+ key: "calcSapan",
476
+
477
+
478
+ //计算span跨度
479
+ value: function calcSapan(fieldMapList) {
480
+ var totalSpan = 0; // 到目前为止的所有列数
481
+ var hasUseSpan = void 0; // 当前行已使用的列数
482
+ fieldMapList.map(function (item, index) {
483
+ var span = item.span;
484
+ hasUseSpan = totalSpan % 3;
485
+ if (3 - hasUseSpan < span) {
486
+ fieldMapList[index - 1].span += 3 - hasUseSpan;
487
+ totalSpan += 3 - hasUseSpan;
488
+ }
489
+ totalSpan += span;
490
+ });
491
+ return fieldMapList;
492
+ }
493
+
494
+ /**
495
+ * * 自定义表单项渲染
496
+ *
497
+ * @memberof EditInitForm
498
+ */
499
+
500
+ }, {
501
+ key: "render",
502
+ value: function render() {
503
+ var _props = this.props,
504
+ isEdit = _props.isEdit,
505
+ fieldMap = _props.fieldMap,
506
+ title = _props.title,
507
+ params = _props.params;
508
+
509
+
510
+ var dataList = this.getDataList(fieldMap);
511
+
512
+ return isEdit ? _react2.default.createElement(
513
+ "form",
514
+ null,
515
+ _react2.default.createElement(
516
+ "style",
517
+ null,
518
+ "\n .am-list-extra{\n -webkit-flex-basis: 50% !important;\n -ms-flex-preferred-size: 50% !important;\n flex-basis: 50% !important;\n }\n .ycwxx .am-list-content{\n width: 20%;\n flex: none;\n }\n .ycwxx .am-list-extra{\n flex: 1;\n }\n .cwxx .am-list-content{\n width: 20%;\n flex: none;\n }\n .cwxx .am-list-extra{\n flex: 1;\n }\n "
519
+ ),
520
+ _react2.default.createElement(
521
+ _list2.default,
522
+ { renderHeader: function renderHeader() {
523
+ return title;
524
+ } },
525
+ dataList.map(function (item) {
526
+ return item.render !== undefined ? item.render() : null;
527
+ })
528
+ ),
529
+ _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
530
+ ) : _react2.default.createElement(
531
+ "div",
532
+ null,
533
+ _react2.default.createElement(
534
+ _card2.default,
535
+ { full: true },
536
+ _react2.default.createElement(_card2.default.Header, {
537
+ title: _react2.default.createElement(
538
+ "div",
539
+ { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
540
+ title
541
+ )
542
+ }),
543
+ _react2.default.createElement(
544
+ _card2.default.Body,
545
+ null,
546
+ dataList.map(function (item) {
547
+ return _react2.default.createElement(
548
+ "div",
549
+ null,
550
+ _react2.default.createElement(
551
+ "font",
552
+ { color: "grey" },
553
+ item.title,
554
+ "\uFF1A "
555
+ ),
556
+ item.text,
557
+ _react2.default.createElement("br", null)
558
+ );
559
+ })
560
+ )
561
+ ),
562
+ _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
563
+ );
564
+ }
565
+ }]);
566
+
567
+ return EditInitForm;
568
+ }(_react2.default.Component);
569
+
570
+ var EditForm = (0, _rcForm.createForm)()(EditInitForm);
571
+ exports.default = EditForm;