dlt-for-react 1.1.3 → 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 (187) hide show
  1. package/README.md +4 -0
  2. package/lib/index.js +7 -1
  3. package/lib/layouts/Top/index.js +1 -1
  4. package/lib/layouts/layout/index.js +77 -31
  5. package/lib/layouts/mixTop/index.js +3 -3
  6. package/lib/utils/createUuid.js +31 -11
  7. package/lib/utils/getLoginUser.js +1 -1
  8. package/lib/utils/getSize.js +11 -2
  9. package/lib/utils/index.js +35 -2
  10. package/package.json +1 -1
  11. package/lib/components/Button/index.js +0 -79
  12. package/lib/components/NHAuditPanel/config/Axios.js +0 -263
  13. package/lib/components/NHAuditPanel/config/api.js +0 -479
  14. package/lib/components/NHAuditPanel/config/data.js +0 -156
  15. package/lib/components/NHAuditPanel/config/typeMap.js +0 -1234
  16. package/lib/components/NHAuditPanel/config/uiValidate.js +0 -92
  17. package/lib/components/NHAuditPanel/index.js +0 -413
  18. package/lib/components/NHAuditPanel/node.js +0 -619
  19. package/lib/components/NHCascader/index.js +0 -355
  20. package/lib/components/NHCheckboxGroup/index.js +0 -135
  21. package/lib/components/NHDynamicFormShow/baseInfo/index.js +0 -194
  22. package/lib/components/NHDynamicFormShow/custom/index.js +0 -553
  23. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +0 -43
  24. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +0 -1113
  25. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +0 -263
  26. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +0 -880
  27. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +0 -171
  28. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +0 -865
  29. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +0 -138
  30. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +0 -571
  31. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +0 -147
  32. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +0 -474
  33. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +0 -139
  34. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +0 -506
  35. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +0 -143
  36. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +0 -1074
  37. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +0 -172
  38. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +0 -927
  39. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +0 -195
  40. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +0 -1064
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +0 -183
  42. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +0 -763
  43. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +0 -137
  44. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +0 -819
  45. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +0 -137
  46. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +0 -700
  47. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +0 -162
  48. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +0 -743
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +0 -177
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +0 -848
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +0 -138
  52. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +0 -777
  53. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +0 -161
  54. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +0 -706
  55. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +0 -130
  56. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +0 -413
  57. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +0 -135
  58. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +0 -1013
  59. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +0 -175
  60. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +0 -1345
  61. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +0 -274
  62. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +0 -669
  63. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +0 -134
  64. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +0 -378
  65. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +0 -120
  66. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +0 -638
  67. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +0 -133
  68. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +0 -965
  69. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +0 -237
  70. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +0 -823
  71. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +0 -188
  72. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +0 -401
  73. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +0 -472
  74. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +0 -304
  75. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +0 -375
  76. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +0 -118
  77. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +0 -62
  78. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +0 -55
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +0 -1238
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +0 -375
  81. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +0 -554
  82. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +0 -130
  83. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +0 -542
  84. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +0 -133
  85. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +0 -575
  86. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +0 -130
  87. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +0 -563
  88. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +0 -133
  89. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +0 -745
  90. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +0 -164
  91. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +0 -587
  92. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +0 -143
  93. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +0 -743
  94. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +0 -172
  95. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +0 -1410
  96. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +0 -274
  97. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +0 -755
  98. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +0 -130
  99. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +0 -814
  100. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +0 -188
  101. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +0 -769
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +0 -130
  103. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +0 -1004
  104. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +0 -126
  105. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +0 -503
  106. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +0 -149
  107. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +0 -379
  108. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +0 -148
  109. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +0 -748
  110. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +0 -135
  111. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +0 -762
  112. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +0 -134
  113. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +0 -682
  114. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +0 -135
  115. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +0 -152
  116. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +0 -783
  117. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +0 -764
  118. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +0 -138
  119. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +0 -677
  120. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +0 -138
  121. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +0 -1173
  122. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +0 -242
  123. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +0 -862
  124. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +0 -201
  125. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +0 -196
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +0 -167
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +0 -1096
  128. package/lib/components/NHDynamicFormShow/index.js +0 -647
  129. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +0 -279
  130. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +0 -206
  131. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +0 -419
  132. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +0 -401
  133. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +0 -271
  134. package/lib/components/NHImagePicker/index.js +0 -554
  135. package/lib/components/NHInputPicker/RadioGroup.js +0 -118
  136. package/lib/components/NHInputPicker/index.js +0 -62
  137. package/lib/components/NHInputPicker/input-const.js +0 -55
  138. package/lib/components/NHInputPicker/render.js +0 -1271
  139. package/lib/components/NHListView/index.js +0 -374
  140. package/lib/components/NHMapGeolocation/index.js +0 -537
  141. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +0 -104
  142. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +0 -138
  143. package/lib/components/NHMapGeolocation/style.js +0 -51
  144. package/lib/components/NHMultiSelect/index.js +0 -272
  145. package/lib/components/NHRadioGroup/index.js +0 -118
  146. package/lib/components/NHSelect/index.js +0 -364
  147. package/lib/components/NHTreeMenu/index.js +0 -126
  148. package/lib/components/NHTreeMenu/treeNode.js +0 -164
  149. package/lib/components/StuSelector/index.js +0 -611
  150. package/lib/layouts/KyInputPicker/edit-page.js +0 -585
  151. package/lib/layouts/KyInputPicker/index.js +0 -220
  152. package/lib/layouts/KyInputPicker/input-const.js +0 -134
  153. package/lib/layouts/KyInputPicker/render.js +0 -2477
  154. package/lib/layouts/KyInputPicker/setting-checkbox.js +0 -850
  155. package/lib/layouts/KyInputPicker/setting-datepicker.js +0 -430
  156. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +0 -443
  157. package/lib/layouts/KyInputPicker/setting-input.js +0 -555
  158. package/lib/layouts/KyInputPicker/setting-inputNumber.js +0 -612
  159. package/lib/layouts/KyInputPicker/setting-monthpicker.js +0 -434
  160. package/lib/layouts/KyInputPicker/setting-multiSelect.js +0 -532
  161. package/lib/layouts/KyInputPicker/setting-nhcascader.js +0 -584
  162. package/lib/layouts/KyInputPicker/setting-old-upload.js +0 -428
  163. package/lib/layouts/KyInputPicker/setting-radio.js +0 -468
  164. package/lib/layouts/KyInputPicker/setting-rangepicker.js +0 -466
  165. package/lib/layouts/KyInputPicker/setting-select.js +0 -534
  166. package/lib/layouts/KyInputPicker/setting-stu-selector.js +0 -507
  167. package/lib/layouts/KyInputPicker/setting-switch.js +0 -274
  168. package/lib/layouts/KyInputPicker/setting-tea-selector.js +0 -507
  169. package/lib/layouts/KyInputPicker/setting-textarea.js +0 -619
  170. package/lib/layouts/KyInputPicker/setting-timepicker.js +0 -437
  171. package/lib/layouts/KyInputPicker/setting-upload.js +0 -766
  172. package/lib/layouts/KyModal/buildTitle.js +0 -81
  173. package/lib/layouts/KyModal/dragM.js +0 -127
  174. package/lib/layouts/KyModal/index.js +0 -321
  175. package/lib/layouts/KyPreview/index.js +0 -219
  176. package/lib/layouts/KyUpload/index.js +0 -1155
  177. package/lib/utils/browserJudge.js +0 -33
  178. package/lib/utils/dynamicLoadCss.js +0 -14
  179. package/lib/utils/dynamicLoadJs.js +0 -21
  180. package/lib/utils/getStyle.js +0 -26
  181. package/lib/utils/getSuitHeight.js +0 -49
  182. package/lib/utils/hasAuth.js +0 -11
  183. package/lib/utils/loadJS.js +0 -40
  184. /package/lib/layouts/{login → Login}/index-pre.js +0 -0
  185. /package/lib/layouts/{login → Login}/index.js +0 -0
  186. /package/lib/layouts/{login → Login}/login.js +0 -0
  187. /package/lib/layouts/{login → Login}/lyPassword.js +0 -0
@@ -1,126 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _toast = require("antd-mobile/lib/toast");
8
-
9
- var _toast2 = _interopRequireDefault(_toast);
10
-
11
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
12
-
13
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
14
-
15
- require("antd-mobile/lib/toast/style/css");
16
-
17
- var _react = require("react");
18
-
19
- var _react2 = _interopRequireDefault(_react);
20
-
21
- var _EditForm = require("./EditForm");
22
-
23
- var _EditForm2 = _interopRequireDefault(_EditForm);
24
-
25
- var _NHFetch = require("../../../../utils/NHFetch");
26
-
27
- var _NHFetch2 = _interopRequireDefault(_NHFetch);
28
-
29
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
-
31
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
32
-
33
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
34
-
35
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
36
-
37
- var YlfbjIndex = function (_React$Component) {
38
- _inherits(YlfbjIndex, _React$Component);
39
-
40
- function YlfbjIndex(props) {
41
- _classCallCheck(this, YlfbjIndex);
42
-
43
- var _this = _possibleConstructorReturn(this, (YlfbjIndex.__proto__ || Object.getPrototypeOf(YlfbjIndex)).call(this, props));
44
-
45
- _this.validate = function (func) {
46
- _this.nhEditForm.validateFields(function (err, formData) {
47
- if (err) {
48
- func(false);
49
- } else {
50
- _this.setState({ formData: formData }, function () {
51
- func(true);
52
- });
53
- }
54
- });
55
- };
56
-
57
- _this.save = function (func, failCallback) {
58
- var _this$props = _this.props,
59
- processApplyId = _this$props.processApplyId,
60
- objId = _this$props.objId,
61
- pkid = _this$props.pkid;
62
- var formData = _this.state.formData;
63
-
64
- var param = formData;
65
- param.hjmdid = pkid;
66
- param.xsid = objId;
67
- param.lcslid = processApplyId;
68
- var list = [formData.fjid];
69
- (0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
70
- if (res && res.code === 200) {
71
- (0, _NHFetch2.default)('api/sm-honorary-title/openapi/saveKzxx', 'POST', param).then(function (res) {
72
- if (res && res.code === 200) {
73
- func();
74
- } else {
75
- failCallback && failCallback();
76
- _toast2.default.fail("保存失败");
77
- }
78
- });
79
- } else {
80
- failCallback && failCallback();
81
- _toast2.default.fail("附件保存失败");
82
- }
83
- });
84
- };
85
-
86
- _this.state = {
87
- formData: {}
88
- };
89
- return _this;
90
- }
91
-
92
- /**
93
- * 校验该分类表单是否全部填写完成,该方法必须存在
94
- */
95
-
96
-
97
- //保存
98
-
99
-
100
- _createClass(YlfbjIndex, [{
101
- key: "render",
102
- value: function render() {
103
- var _this2 = this;
104
-
105
- return _react2.default.createElement(_EditForm2.default, _extends({
106
- ref: function ref(form) {
107
- _this2.nhEditForm = form;
108
- }
109
- }, this.props));
110
- }
111
- }]);
112
-
113
- return YlfbjIndex;
114
- }(_react2.default.Component);
115
-
116
- YlfbjIndex.propTypes = {};
117
- YlfbjIndex.defaultProps = {
118
- isEdit: undefined, //是否是编辑状态
119
- fieldMap: {}, //字段信息,可以通过该对象获取到该字段,是否可以显示(sfxs)、是否可以编辑(sfbj)、是否必填等信息(sfbt)
120
- processId: undefined, //流程ID
121
- processApplyId: undefined, //流程申请主键ID
122
- objId: undefined, //对象ID
123
- pkid: undefined, //业务表主键ID
124
- params: {} //参数集合,主要通过该参数集合给自定义面板传参
125
- };
126
- exports.default = YlfbjIndex;
@@ -1,503 +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 _inputItem = require("antd-mobile/lib/input-item");
16
-
17
- var _inputItem2 = _interopRequireDefault(_inputItem);
18
-
19
- var _datePicker = require("antd-mobile/lib/date-picker");
20
-
21
- var _datePicker2 = _interopRequireDefault(_datePicker);
22
-
23
- var _list = require("antd-mobile/lib/list");
24
-
25
- var _list2 = _interopRequireDefault(_list);
26
-
27
- var _textareaItem = require("antd-mobile/lib/textarea-item");
28
-
29
- var _textareaItem2 = _interopRequireDefault(_textareaItem);
30
-
31
- var _toast = require("antd-mobile/lib/toast");
32
-
33
- var _toast2 = _interopRequireDefault(_toast);
34
-
35
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
36
-
37
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
38
-
39
- require("antd-mobile/lib/card/style/css");
40
-
41
- require("antd-mobile/lib/white-space/style/css");
42
-
43
- require("antd-mobile/lib/input-item/style/css");
44
-
45
- require("antd-mobile/lib/date-picker/style/css");
46
-
47
- require("antd-mobile/lib/list/style/css");
48
-
49
- require("antd-mobile/lib/textarea-item/style/css");
50
-
51
- require("antd-mobile/lib/toast/style/css");
52
-
53
- var _react = require("react");
54
-
55
- var _react2 = _interopRequireDefault(_react);
56
-
57
- var _moment = require("moment");
58
-
59
- var _moment2 = _interopRequireDefault(_moment);
60
-
61
- var _NHFetch = require("../../../../../utils/NHFetch");
62
-
63
- var _NHFetch2 = _interopRequireDefault(_NHFetch);
64
-
65
- var _rcForm = require("rc-form");
66
-
67
- var _NHCascader = require("../../../../NHCascader");
68
-
69
- var _NHCascader2 = _interopRequireDefault(_NHCascader);
70
-
71
- var _NHSelect = require("../../../../NHSelect");
72
-
73
- var _NHSelect2 = _interopRequireDefault(_NHSelect);
74
-
75
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
76
-
77
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78
-
79
- 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; }
80
-
81
- 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; }
82
-
83
- var EditInitForm = function (_React$Component) {
84
- _inherits(EditInitForm, _React$Component);
85
-
86
- function EditInitForm(props) {
87
- _classCallCheck(this, EditInitForm);
88
-
89
- var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
90
-
91
- _this.componentDidMount = function () {
92
- _this.initData();
93
- };
94
-
95
- _this.initData = function () {
96
- var pkid = _this.props.pkid;
97
-
98
- _this.getData(pkid);
99
- };
100
-
101
- _this.getRoomPeople = function (roomID) {
102
- (0, _NHFetch2.default)('api/zhxg-gyrcgl/whtl/rzsq/getRoomPeopleInfo/', 'GET', { roomID: roomID }).then(function (res) {
103
- if (res && res.code === 200) {
104
- _this.setState({
105
- roomPeople: res.data,
106
- roomFlag: true
107
- });
108
- } else {
109
- _this.setState({
110
- roomPeople: [],
111
- roomFlag: false
112
- });
113
- }
114
- });
115
- };
116
-
117
- _this.getData = function (pkid) {
118
- (0, _NHFetch2.default)('api/zhxg-gyrcgl/whtl/rzsq/getRzsqjlByPkid/' + pkid, 'GET').then(function (res) {
119
- if (res && res.code === 200) {
120
- var rzsqjl = res.data;
121
- if (rzsqjl != null) {
122
- _this.getRoomPeople(rzsqjl.FJXX);
123
- var cwmc = [];
124
- cwmc.push(rzsqjl.LCXX);
125
- cwmc.push(rzsqjl.FJXX);
126
- cwmc.push(rzsqjl.SQCWID);
127
- _this.setState({
128
- sqyy: rzsqjl.SQYY,
129
- rzsj: rzsqjl.RZSJ,
130
- lxfs: rzsqjl.LXFS,
131
- cwmc: cwmc
132
- });
133
- }
134
- } else {
135
- _toast2.default.fail("获取请假申请数据失败");
136
- }
137
- });
138
- };
139
-
140
- _this.lastSixDay = function () {
141
- var current = new Date();
142
- var year = current.getFullYear();
143
- var month = current.getMonth();
144
- var day = current.getDate() + 6;
145
- return new Date(year, month, day);
146
- };
147
-
148
- _this.minDate = function () {
149
- var current = new Date();
150
- var year = current.getFullYear();
151
- var month = current.getMonth();
152
- var day = current.getDate();
153
- return new Date(year, month, day);
154
- };
155
-
156
- _this.showRoom = function (value) {
157
- if (value.length == 3) {
158
- _this.getRoomPeople(value[1]);
159
- } else {
160
- _this.setState({
161
- roomPeople: [],
162
- roomFlag: false
163
- });
164
- }
165
- };
166
-
167
- _this.getDataList = function (fieldMap) {
168
- var _this$props$form = _this.props.form,
169
- getFieldProps = _this$props$form.getFieldProps,
170
- getFieldError = _this$props$form.getFieldError;
171
- var _this$state = _this.state,
172
- sqyy = _this$state.sqyy,
173
- lxfs = _this$state.lxfs,
174
- cwmc = _this$state.cwmc,
175
- roomFlag = _this$state.roomFlag,
176
- roomPeople = _this$state.roomPeople;
177
- var rzsj = _this.state.rzsj;
178
-
179
- var tip = "温馨提示:请于申请入住当天17:00~22:00期间办理入住;于次日9:00前办理退房";
180
- var dataList = [];
181
- rzsj = rzsj ? new Date((0, _moment2.default)(rzsj).format("YYYY-MM-DD")) : new Date();
182
- var roomInfo = '';
183
- if (roomPeople && roomPeople.length > 0) {
184
- for (var i = 0; i < roomPeople.length; i++) {
185
- var xm = roomPeople[i].XM;
186
- var xb = roomPeople[i].XB;
187
- roomInfo = "姓名:" + xm + " 性别:" + xb + " " + roomInfo;
188
- }
189
- roomInfo = "该房间的住户有:" + roomInfo;
190
- } else {
191
- roomInfo = "该房间暂无住户";
192
- }
193
- dataList.push({
194
- title: "",
195
- text: "",
196
- render: function render() {
197
- return _react2.default.createElement(_textareaItem2.default, {
198
- disabled: true, readOnly: true, value: tip, autoHeight: true, style: { color: 'red' }
199
- });
200
- }
201
- });
202
-
203
- //申请原因
204
- if (fieldMap.SQYY && fieldMap.SQYY.sfxs === '1') {
205
-
206
- // 是否必填
207
- var required = fieldMap.SQYY.sfbt === "1";
208
- // 是否可编辑
209
- var editable = fieldMap.SQYY.sfbj === "1";
210
- dataList.push({
211
- title: fieldMap.SQYY.title,
212
- text: sqyy,
213
- render: function render() {
214
- return _react2.default.createElement(
215
- _NHSelect2.default,
216
- _extends({ disabled: !editable, style: { width: '100%' }, value: sqyy, placeholder: "请选择!"
217
- }, getFieldProps('sqyy', {
218
- initialValue: sqyy,
219
- rules: [{ required: required, message: '请选择' }]
220
- }), {
221
- baseUrl: "api/zhxg-gyrcgl", sign: "DMK_JSRZSQ_SQYY" }),
222
- required ? _react2.default.createElement(
223
- "span",
224
- { style: { color: 'red' } },
225
- "*"
226
- ) : null,
227
- fieldMap.SQYY.title
228
- );
229
- }
230
- });
231
- }
232
-
233
- //入住时间
234
- if (fieldMap.RZSJ && fieldMap.RZSJ.sfxs === '1') {
235
-
236
- var _required = fieldMap.RZSJ.sfbt === "1";
237
- var _editable = fieldMap.RZSJ.sfbj === "1";
238
-
239
- dataList.push({
240
- title: fieldMap.RZSJ.title,
241
- text: (0, _moment2.default)(rzsj).format("YYYY-MM-DD"),
242
- render: function render() {
243
- return _react2.default.createElement(
244
- "div",
245
- { className: !_editable ? 'nh-inputrender-disabled' : 'nh-inputrender' },
246
- _react2.default.createElement(
247
- _datePicker2.default,
248
- _extends({
249
- disabled: !_editable,
250
- title: "\u8BF7\u9009\u62E9",
251
- mode: "date",
252
- format: 'YYYY-MM-DD',
253
- minDate: _this.minDate(),
254
- maxDate: _this.lastSixDay()
255
- }, getFieldProps('rzsj', {
256
- initialValue: rzsj,
257
- rules: [{ required: _required, message: "\u8BF7\u9009\u62E9" + fieldMap.RZSJ.title }]
258
- })),
259
- _react2.default.createElement(
260
- _list2.default.Item,
261
- { arrow: "horizontal" },
262
- _required ? _react2.default.createElement(
263
- "span",
264
- { style: { color: 'red' } },
265
- "*"
266
- ) : null,
267
- fieldMap.RZSJ.title
268
- )
269
- )
270
- );
271
- }
272
- });
273
- }
274
-
275
- //联系方式
276
- if (fieldMap.LXFS && fieldMap.LXFS.sfxs === '1') {
277
-
278
- // 是否必填
279
- var _required2 = fieldMap.LXFS.sfbt === "1";
280
- // 是否可编辑
281
- var _editable2 = fieldMap.LXFS.sfbj === "1";
282
- dataList.push({
283
- title: fieldMap.LXFS.title,
284
- text: lxfs,
285
- render: function render() {
286
- return _react2.default.createElement(
287
- _inputItem2.default,
288
- _extends({
289
- className: "nh-input-item",
290
- placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u65B9\u5F0F",
291
- editable: _editable2
292
- }, getFieldProps('lxfs', {
293
- initialValue: lxfs,
294
- rules: [{ required: _required2, message: "\u8BF7\u8F93\u5165" + fieldMap.LXFS.title }]
295
- })),
296
- _required2 ? _react2.default.createElement(
297
- "span",
298
- { style: { color: 'red' } },
299
- "*"
300
- ) : null,
301
- fieldMap.LXFS.title
302
- );
303
- }
304
- });
305
- }
306
-
307
- //入住床位
308
- if (fieldMap.CWID && fieldMap.CWID.sfxs === '1') {
309
-
310
- // 是否必填
311
- var _required3 = fieldMap.CWID.sfbt === "1";
312
- // 是否可编辑
313
- var _editable3 = fieldMap.CWID.sfbj === "1";
314
- dataList.push({
315
- title: fieldMap.CWID.title,
316
- text: cwmc,
317
- isUpload: true,
318
- render: function render() {
319
- return _react2.default.createElement(
320
- _NHCascader2.default,
321
- _extends({ disabled: !_editable3, style: { width: '100%' }, value: cwmc, placeholder: "请选择入住床位!"
322
- }, getFieldProps('sqcwid', {
323
- initialValue: cwmc,
324
- rules: [{ required: _required3, message: '请选择' }],
325
- onChange: function onChange(v) {
326
- _this.showRoom(v);
327
- }
328
- }), {
329
- baseUrl: "api/zhxg-gyrcgl", sign: "whtl_gy_ydzsxxjl" }),
330
- _required3 ? _react2.default.createElement(
331
- "span",
332
- { style: { color: 'red' } },
333
- "*"
334
- ) : null,
335
- fieldMap.CWID.title
336
- );
337
- },
338
- renderView: function renderView() {
339
- return _react2.default.createElement(_NHCascader2.default, { disabled: true, style: { width: '100%' }, value: cwmc,
340
- baseUrl: "api/zhxg-gyrcgl", sign: "whtl_gy_ydzsxxjl" });
341
- }
342
- });
343
- }
344
-
345
- roomFlag && dataList.push({
346
- title: "",
347
- text: "",
348
- render: function render() {
349
- return _react2.default.createElement(_textareaItem2.default, {
350
- disabled: true, readOnly: true, value: roomInfo, autoHeight: true, style: { color: 'black' }
351
- });
352
- }
353
- });
354
-
355
- return dataList;
356
- };
357
-
358
- _this.state = {
359
- sqyy: '', //申请原因
360
- rzsj: '', //入住时间
361
- cwid: '', //入住床位
362
- lxfs: '', //联系方式
363
- cwmc: [], //床位名称
364
- roomFlag: false, //显示房间标识
365
- roomPeople: [] //房间人员
366
- };
367
-
368
- return _this;
369
- }
370
-
371
- /**
372
- * * 通过PKID去查询是否有申请数据,有说明是审核
373
- *
374
- * @memberof EditInitForm
375
- */
376
-
377
-
378
- /**
379
- * * 自定义表单项渲染
380
- *
381
- * @memberof EditInitForm
382
- */
383
-
384
-
385
- _createClass(EditInitForm, [{
386
- key: "render",
387
- value: function render() {
388
- var _props = this.props,
389
- isEdit = _props.isEdit,
390
- fieldMap = _props.fieldMap,
391
- title = _props.title;
392
-
393
- var dataList = this.getDataList(fieldMap);
394
- return isEdit ? _react2.default.createElement(
395
- "form",
396
- null,
397
- _react2.default.createElement(
398
- "style",
399
- null,
400
- "\n .am-list-extra{\n -webkit-flex-basis: 50% !important;\n -ms-flex-preferred-size: 50% !important;\n flex-basis: 50% !important;\n white-space: normal !important;\n }\n "
401
- ),
402
- _react2.default.createElement(
403
- _list2.default,
404
- { renderHeader: function renderHeader() {
405
- return title;
406
- } },
407
- dataList.filter(function (item, index) {
408
- return index < 2;
409
- }).map(function (item) {
410
- return item.render !== undefined ? item.render() : null;
411
- })
412
- ),
413
- dataList && dataList.length >= 2 ? _react2.default.createElement(
414
- _list2.default,
415
- { renderHeader: function renderHeader() {
416
- return "";
417
- } },
418
- dataList.filter(function (item, index) {
419
- return index >= 2 && index < 5;
420
- }).map(function (item) {
421
- return item.render !== undefined ? item.render() : null;
422
- })
423
- ) : null,
424
- dataList && dataList.length >= 5 ? _react2.default.createElement(
425
- _list2.default,
426
- { renderHeader: function renderHeader() {
427
- return "";
428
- } },
429
- dataList.filter(function (item, index) {
430
- return index >= 5 && index < 7;
431
- }).map(function (item) {
432
- return item.render !== undefined ? item.render() : null;
433
- })
434
- ) : null,
435
- dataList && dataList.length >= 7 ? _react2.default.createElement(
436
- _list2.default,
437
- { renderHeader: function renderHeader() {
438
- return "";
439
- } },
440
- dataList.filter(function (item, index) {
441
- return index >= 7;
442
- }).map(function (item) {
443
- return item.render !== undefined ? item.render() : null;
444
- })
445
- ) : null,
446
- _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
447
- ) : _react2.default.createElement(
448
- "div",
449
- null,
450
- _react2.default.createElement(
451
- _card2.default,
452
- { full: true },
453
- _react2.default.createElement(_card2.default.Header, {
454
- title: _react2.default.createElement(
455
- "div",
456
- { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
457
- title
458
- )
459
- }),
460
- _react2.default.createElement(
461
- _card2.default.Body,
462
- null,
463
- dataList.map(function (item, index) {
464
- if (item.isUpload) {
465
- return _react2.default.createElement(
466
- "div",
467
- { key: index },
468
- _react2.default.createElement(
469
- "font",
470
- { color: "grey" },
471
- item.title,
472
- "\uFF1A "
473
- ),
474
- item.renderView()
475
- );
476
- }
477
- if (item.title) {
478
- return _react2.default.createElement(
479
- "div",
480
- { key: index },
481
- _react2.default.createElement(
482
- "font",
483
- { color: "grey" },
484
- item.title,
485
- "\uFF1A "
486
- ),
487
- item.text,
488
- _react2.default.createElement("br", null)
489
- );
490
- }
491
- })
492
- )
493
- ),
494
- _react2.default.createElement(_whiteSpace2.default, { size: "lg" })
495
- );
496
- }
497
- }]);
498
-
499
- return EditInitForm;
500
- }(_react2.default.Component);
501
-
502
- var EditForm = (0, _rcForm.createForm)()(EditInitForm);
503
- exports.default = EditForm;