dlt-for-react 1.1.2 → 1.1.4

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 (188) hide show
  1. package/README.md +9 -2
  2. package/lib/index.js +13 -1
  3. package/lib/layouts/LeftMenu/index.js +322 -296
  4. package/lib/layouts/Top/index.js +1 -1
  5. package/lib/layouts/layout/index.js +77 -31
  6. package/lib/layouts/mixTop/index.js +3 -3
  7. package/lib/utils/createUuid.js +31 -11
  8. package/lib/utils/getLoginUser.js +1 -1
  9. package/lib/utils/getSize.js +11 -2
  10. package/lib/utils/index.js +46 -2
  11. package/package.json +1 -1
  12. package/lib/components/Button/index.js +0 -79
  13. package/lib/components/NHAuditPanel/config/Axios.js +0 -263
  14. package/lib/components/NHAuditPanel/config/api.js +0 -479
  15. package/lib/components/NHAuditPanel/config/data.js +0 -156
  16. package/lib/components/NHAuditPanel/config/typeMap.js +0 -1234
  17. package/lib/components/NHAuditPanel/config/uiValidate.js +0 -92
  18. package/lib/components/NHAuditPanel/index.js +0 -413
  19. package/lib/components/NHAuditPanel/node.js +0 -619
  20. package/lib/components/NHCascader/index.js +0 -355
  21. package/lib/components/NHCheckboxGroup/index.js +0 -135
  22. package/lib/components/NHDynamicFormShow/baseInfo/index.js +0 -194
  23. package/lib/components/NHDynamicFormShow/custom/index.js +0 -553
  24. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +0 -43
  25. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +0 -1113
  26. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +0 -263
  27. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +0 -880
  28. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +0 -171
  29. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +0 -865
  30. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +0 -138
  31. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +0 -571
  32. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +0 -147
  33. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +0 -474
  34. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +0 -139
  35. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +0 -506
  36. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +0 -143
  37. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +0 -1074
  38. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +0 -172
  39. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +0 -927
  40. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +0 -195
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +0 -1064
  42. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +0 -183
  43. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +0 -763
  44. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +0 -137
  45. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +0 -819
  46. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +0 -137
  47. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +0 -700
  48. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +0 -162
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +0 -743
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +0 -177
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +0 -848
  52. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +0 -138
  53. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +0 -777
  54. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +0 -161
  55. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +0 -706
  56. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +0 -130
  57. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +0 -413
  58. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +0 -135
  59. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +0 -1013
  60. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +0 -175
  61. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +0 -1345
  62. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +0 -274
  63. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +0 -669
  64. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +0 -134
  65. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +0 -378
  66. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +0 -120
  67. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +0 -638
  68. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +0 -133
  69. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +0 -965
  70. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +0 -237
  71. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +0 -823
  72. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +0 -188
  73. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +0 -401
  74. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +0 -472
  75. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +0 -304
  76. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +0 -375
  77. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +0 -118
  78. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +0 -62
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +0 -55
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +0 -1238
  81. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +0 -375
  82. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +0 -554
  83. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +0 -130
  84. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +0 -542
  85. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +0 -133
  86. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +0 -575
  87. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +0 -130
  88. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +0 -563
  89. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +0 -133
  90. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +0 -745
  91. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +0 -164
  92. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +0 -587
  93. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +0 -143
  94. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +0 -743
  95. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +0 -172
  96. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +0 -1410
  97. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +0 -274
  98. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +0 -755
  99. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +0 -130
  100. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +0 -814
  101. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +0 -188
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +0 -769
  103. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +0 -130
  104. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +0 -1004
  105. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +0 -126
  106. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +0 -503
  107. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +0 -149
  108. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +0 -379
  109. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +0 -148
  110. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +0 -748
  111. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +0 -135
  112. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +0 -762
  113. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +0 -134
  114. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +0 -682
  115. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +0 -135
  116. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +0 -152
  117. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +0 -783
  118. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +0 -764
  119. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +0 -138
  120. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +0 -677
  121. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +0 -138
  122. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +0 -1173
  123. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +0 -242
  124. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +0 -862
  125. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +0 -201
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +0 -196
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +0 -167
  128. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +0 -1096
  129. package/lib/components/NHDynamicFormShow/index.js +0 -647
  130. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +0 -279
  131. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +0 -206
  132. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +0 -419
  133. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +0 -401
  134. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +0 -271
  135. package/lib/components/NHImagePicker/index.js +0 -554
  136. package/lib/components/NHInputPicker/RadioGroup.js +0 -118
  137. package/lib/components/NHInputPicker/index.js +0 -62
  138. package/lib/components/NHInputPicker/input-const.js +0 -55
  139. package/lib/components/NHInputPicker/render.js +0 -1271
  140. package/lib/components/NHListView/index.js +0 -374
  141. package/lib/components/NHMapGeolocation/index.js +0 -537
  142. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +0 -104
  143. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +0 -138
  144. package/lib/components/NHMapGeolocation/style.js +0 -51
  145. package/lib/components/NHMultiSelect/index.js +0 -272
  146. package/lib/components/NHRadioGroup/index.js +0 -118
  147. package/lib/components/NHSelect/index.js +0 -364
  148. package/lib/components/NHTreeMenu/index.js +0 -126
  149. package/lib/components/NHTreeMenu/treeNode.js +0 -164
  150. package/lib/components/StuSelector/index.js +0 -611
  151. package/lib/layouts/KyInputPicker/edit-page.js +0 -585
  152. package/lib/layouts/KyInputPicker/index.js +0 -220
  153. package/lib/layouts/KyInputPicker/input-const.js +0 -134
  154. package/lib/layouts/KyInputPicker/render.js +0 -2477
  155. package/lib/layouts/KyInputPicker/setting-checkbox.js +0 -850
  156. package/lib/layouts/KyInputPicker/setting-datepicker.js +0 -430
  157. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +0 -443
  158. package/lib/layouts/KyInputPicker/setting-input.js +0 -555
  159. package/lib/layouts/KyInputPicker/setting-inputNumber.js +0 -612
  160. package/lib/layouts/KyInputPicker/setting-monthpicker.js +0 -434
  161. package/lib/layouts/KyInputPicker/setting-multiSelect.js +0 -532
  162. package/lib/layouts/KyInputPicker/setting-nhcascader.js +0 -584
  163. package/lib/layouts/KyInputPicker/setting-old-upload.js +0 -428
  164. package/lib/layouts/KyInputPicker/setting-radio.js +0 -468
  165. package/lib/layouts/KyInputPicker/setting-rangepicker.js +0 -466
  166. package/lib/layouts/KyInputPicker/setting-select.js +0 -534
  167. package/lib/layouts/KyInputPicker/setting-stu-selector.js +0 -507
  168. package/lib/layouts/KyInputPicker/setting-switch.js +0 -274
  169. package/lib/layouts/KyInputPicker/setting-tea-selector.js +0 -507
  170. package/lib/layouts/KyInputPicker/setting-textarea.js +0 -619
  171. package/lib/layouts/KyInputPicker/setting-timepicker.js +0 -437
  172. package/lib/layouts/KyInputPicker/setting-upload.js +0 -766
  173. package/lib/layouts/KyModal/buildTitle.js +0 -81
  174. package/lib/layouts/KyModal/dragM.js +0 -127
  175. package/lib/layouts/KyModal/index.js +0 -321
  176. package/lib/layouts/KyPreview/index.js +0 -219
  177. package/lib/layouts/KyUpload/index.js +0 -1155
  178. package/lib/utils/browserJudge.js +0 -33
  179. package/lib/utils/dynamicLoadCss.js +0 -14
  180. package/lib/utils/dynamicLoadJs.js +0 -21
  181. package/lib/utils/getStyle.js +0 -26
  182. package/lib/utils/getSuitHeight.js +0 -49
  183. package/lib/utils/hasAuth.js +0 -11
  184. package/lib/utils/loadJS.js +0 -40
  185. /package/lib/layouts/{login → Login}/index-pre.js +0 -0
  186. /package/lib/layouts/{login → Login}/index.js +0 -0
  187. /package/lib/layouts/{login → Login}/login.js +0 -0
  188. /package/lib/layouts/{login → Login}/lyPassword.js +0 -0
@@ -1,571 +0,0 @@
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;