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,375 +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 _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; }; }();
12
-
13
- require("antd-mobile/lib/toast/style/css");
14
-
15
- var _react = require("react");
16
-
17
- var _react2 = _interopRequireDefault(_react);
18
-
19
- var _NHFetch = require("../../../../../utils/NHFetch");
20
-
21
- var _NHFetch2 = _interopRequireDefault(_NHFetch);
22
-
23
- var _EditForm = require("./EditForm");
24
-
25
- var _EditForm2 = _interopRequireDefault(_EditForm);
26
-
27
- var _propTypes = require("prop-types");
28
-
29
- var _propTypes2 = _interopRequireDefault(_propTypes);
30
-
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
-
33
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
34
-
35
- 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; }
36
-
37
- 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; }
38
-
39
- var TssqEditForm = function (_React$Component) {
40
- _inherits(TssqEditForm, _React$Component);
41
-
42
- function TssqEditForm(props) {
43
- _classCallCheck(this, TssqEditForm);
44
-
45
- var _this = _possibleConstructorReturn(this, (TssqEditForm.__proto__ || Object.getPrototypeOf(TssqEditForm)).call(this, props));
46
-
47
- _this.InitialOneOnOneInfo = function () {
48
- var params = {
49
- id: _this.props.objId,
50
- bdid: _this.props.formId,
51
- type: '2', //this.props.model === "view" ? "1" : "2", 如果查看模式需要根据控件类型占不同的列,此处只能为'2'
52
- zdflid: _this.props.flid,
53
- clientType: "mobile"
54
- };
55
- if (_this.props.processId !== undefined) {
56
- params.lcId = _this.props.processId;
57
- }
58
- if (_this.props.processApplyId !== undefined) {
59
- params.lcsqid = _this.props.processApplyId;
60
- }
61
- if (_this.props.pkid !== undefined) {
62
- params.pkid = _this.props.pkid;
63
- }
64
- if (_this.props.rwid) {
65
- params.rwid = _this.props.rwid; // 任务id
66
- }
67
- (0, _NHFetch2.default)("api/sm-dynamic-form/dynamicShow/queryBdzdInfo", "GET", params).then(function (res) {
68
- if (res) {
69
- //把通过接口方式获取的功能实现
70
- var listInfo = [];
71
- if (res.data != null && res.data != "" && res.data != undefined) {
72
- listInfo = res.data;
73
- }
74
- _this.setState({
75
- list: listInfo,
76
- loading: false
77
- }, function () {
78
- _this.state.list.map(function (item) {
79
- if (item.jkUrl !== "" && item.jkUrl !== undefined && item.jkUrl !== null) {
80
- var url = item.jkUrl;
81
- (0, _NHFetch2.default)(url, "GET", params).then(function (res) {
82
- if (res) {
83
- var maps = {};
84
- maps = res.data;
85
- var zzd = item.zzd; //要获取的值字段名称
86
- var wbzd = item.wbzd; //要获取的文本字段名称
87
- item.text = maps[wbzd];
88
- item.inittext = maps[wbzd];
89
- item.value = maps[zzd];
90
- item.initValue = maps[zzd];
91
- }
92
-
93
- _this.setState({
94
- list: _this.state.list
95
- });
96
- });
97
- }
98
- return item;
99
- });
100
-
101
- _this.getTsgl(_this.props.pkid);
102
- });
103
- }
104
- });
105
- _this.getGender(_this.props.processApplyId);
106
- };
107
-
108
- _this.save = function (func, failCallback) {
109
- var _this$props = _this.props,
110
- processApplyId = _this$props.processApplyId,
111
- objId = _this$props.objId,
112
- pkid = _this$props.pkid,
113
- fieldMap = _this$props.fieldMap;
114
- var formData = _this.state.formData;
115
- // console.log("props:", this.props)
116
- // console.log("state", this.state)
117
-
118
- var param = formData;
119
- param.pkid = pkid;
120
- // param.gzfbid = params.pcid,
121
- param.xsid = objId;
122
- param.lcslid = processApplyId;
123
- param.xn = fieldMap['XN'].value;
124
- param.xq = fieldMap['XQ'].value;
125
- param.sjly = 2;
126
- for (var i = 0; i < _this.state.list.length; i++) {
127
- var item = _this.state.list[i];
128
- if (item.title === "调宿原因") {
129
- param.tsyy = item.value;
130
- }
131
- if (item.title === "调宿原因说明") {
132
- param.tsyysm = item.text;
133
- }
134
- if (item.title === "调整床位") {
135
- param.xcwid = item.value;
136
- }
137
- }
138
- console.log("提交参数", param);
139
- var list = [param.fjid];
140
- (0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
141
- if (res && res.code === 200) {
142
- (0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/saveTssq', 'POST', param).then(function (res) {
143
- if (res && res.code === 200) {
144
- func();
145
- } else {
146
- failCallback && failCallback();
147
- _toast2.default.fail("表单保存失败,请联系管理员!");
148
- }
149
- });
150
- } else {
151
- _toast2.default.fail("保存失败");
152
- }
153
- });
154
- };
155
-
156
- _this.onChange = function (seq, value, text, isChange) {
157
- var list = _this.state.list;
158
- if (list[seq - 1] !== undefined) {
159
- list[seq - 1].text = text;
160
- list[seq - 1].value = value;
161
- //判断值是否有改变
162
- if (isChange !== "" && isChange !== undefined) {
163
- list[seq - 1].isChange = isChange;
164
- } else {
165
- if (list[seq - 1].value === list[seq - 1].initValue || !value && list[seq - 1].initValue === '') {
166
- list[seq - 1].isChange = false;
167
- } else {
168
- list[seq - 1].isChange = true;
169
- }
170
- }
171
- _this.setState({
172
- list: list
173
- });
174
- var oneONOneInfo = {
175
- id: _this.props.objId,
176
- sjkyh: _this.props.sjkyh,
177
- dto: _this.state.list,
178
- flid: _this.props.flid,
179
- baseUrl: _this.props.baseUrl,
180
- flstdm: _this.props.flstdm,
181
- pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
182
- lcslid: _this.props.processApplyId
183
- };
184
- _this.props.handlOneOnDetail(oneONOneInfo);
185
- }
186
- };
187
-
188
- _this.validate = function (func) {
189
- if (_this.nhEditForm) {
190
- _this.nhEditForm.validateFields(function (err, formData) {
191
- if (err) {
192
- func(false);
193
- } else {
194
- _this.setState({ formData: formData }, function () {
195
- func(true);
196
- });
197
- }
198
- });
199
- } else {
200
- func(true);
201
- }
202
- };
203
-
204
- _this.getGender = function (lcsqid) {
205
- var params = {
206
- lcsqid: lcsqid
207
- };
208
- (0, _NHFetch2.default)('api/zhxg-gyrcgl/tsgl/selectXbm', 'GET', params).then(function (res) {
209
- if (res && res.data) {
210
- _this.setState({ gender: res.data });
211
- }
212
- });
213
- };
214
-
215
- _this.getTsgl = function (pkid) {
216
- // console.log("之前:",this.state.list);
217
- var list = _this.state.list;
218
- for (var i = 0; i < list.length; i++) {
219
- var item = list[i];
220
- if (item.title === "调宿原因") {
221
- list[i].bdkjcs = '{"name":"下拉选择器组件","type":"select","widthType":"default","widthStr":"","dataTag":"DMK_GYFW_TSSQYY","required":false,"defaultValue":"","validationValueType":"string","baseUrl":""}';
222
- list[i].bdkjlx = "select";
223
- list[i].blm = "TSYY";
224
- list[i].bm = "ZHXG_GY_RCGL_TSGL";
225
- list[i].sjcjfsdm = "01";
226
- }
227
- if (item.title === "调宿原因说明") {
228
- list[i].bdkjcs = '{"name":"多行文本输入组件","type":"textarea","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":false,"defaultValue":"","validationValueType":"string"}';
229
- list[i].bdkjlx = "textarea";
230
- list[i].blm = "TSYYSM";
231
- list[i].bm = "ZHXG_GY_RCGL_TSGL";
232
- list[i].sjcjfsdm = "01";
233
- }
234
- if (item.title === "调整床位") {
235
- list[i].bdkjcs = '{"name":"级联下拉选择器组件","type":"nhcascader","widthType":"default","widthStr":"","dataTag":"zhxg_gy_ydzsxxjl","required":false,"defaultValue":[],"validationValueType":"array","baseUrl":"api/zhxg-gyrcgl","changeOnSelect":false}';
236
- list[i].bdkjlx = "nhcascader";
237
- list[i].blm = "XCWID";
238
- list[i].bm = "ZHXG_GY_RCGL_TSGL";
239
- list[i].sjcjfsdm = "01";
240
- }
241
- }
242
- _this.setState({ list: list });
243
- (0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/getTssq/' + pkid, 'GET').then(function (res) {
244
- if (res && res.data) {
245
- for (var _i = 0; _i < list.length; _i++) {
246
- var _item = list[_i];
247
- // if (item.title === "调宿原因"){
248
- // list[i].text = res.data.tsyy;
249
- // list[i].initText = res.data.tsyy;
250
- // }
251
- if (_item.title === "调宿原因说明") {
252
- list[_i].text = res.data.tsyysm;
253
- list[_i].initText = res.data.tsyysm;
254
- }
255
- if (_item.title === "调整床位" && res.data.xcwid) {
256
- var tzcw = res.data.xxqmc + '/' + res.data.xldmc + '/' + res.data.xfj + '/' + res.data.xcwh;
257
- list[_i].text = tzcw;
258
- list[_i].initText = tzcw;
259
- list[_i].value = res.data.xcwid;
260
- list[_i].initValue = res.data.xcwid;
261
- }
262
- }
263
- _this.getTssqTssy(list, res.data);
264
- }
265
- });
266
- };
267
-
268
- _this.getTssqTssy = function (list, tssq) {
269
- var _loop = function _loop(i) {
270
- if (list[i].title === "调宿原因" && tssq && tssq.tsyy) {
271
- var params = { sign: 'DMK_GYFW_TSSQYY' };
272
- (0, _NHFetch2.default)(_this.props.baseUrl + '/proData/selectDataList', 'GET', params).then(function (res) {
273
- if (res && res.data) {
274
- for (var j = 0; j < res.data.length; j++) {
275
- var yy = res.data[j];
276
- if (yy['VALUE'] === tssq.tsyy) {
277
- list[i].text = list[i].initText = yy['LABEL'];
278
- list[i].value = list[i].initValue = yy['VALUE'];
279
- }
280
- }
281
- }
282
- _this.setState({ list: list }, function () {
283
- return console.log("插入数据后的list", _this.state.list);
284
- });
285
- });
286
- }
287
- };
288
-
289
- for (var i = 0; i < list.length; i++) {
290
- _loop(i);
291
- }
292
- };
293
-
294
- _this.state = {
295
- isEdit: props.model === "edit" ? true : false, //当时编辑模式模式时,直接自动进入编辑模式
296
- list: [
297
- //该分类的所有的数据
298
- // 标题 显示的文本 控件的值 控件初始化的值 数据采集方式 表单控件参数
299
- // {seq:1,id:'1',title:'姓名',text:'百里屠苏',value:'百里屠苏',initValue:'百里屠苏',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
300
- // //接口url 值字段 文本字段 是否显示 是否编辑 是否必填 字段最小值 字段最大值
301
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
302
- // {seq:2,id:'2',title:'性别',text:'是',value:'1',initValue:'1',sjcjfsdm:'01',bdkjcs:'{"type":"switch","checkedText":"是","uncheckedText":"否","defaultChecked":false}'
303
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'0',zszxz:'',zszdz:'',isChange:false,bdkjlx:'switch'},
304
- // {seq:3,id:'3',title:'年龄',text:'23',value:'23',initValue:'23',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
305
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
306
- // {seq:4,id:'4',title:'籍贯',text:'湖南',value:'湖南',initValue:'湖南',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
307
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
308
- ],
309
- cacheList: [], //缓存数据
310
- formData: {}
311
- };
312
- return _this;
313
- }
314
-
315
- _createClass(TssqEditForm, [{
316
- key: "UNSAFE_componentWillMount",
317
- value: function UNSAFE_componentWillMount() {
318
- this.InitialOneOnOneInfo();
319
- }
320
-
321
- /**
322
- * 保存方法,该方法必须存在
323
- * 改分类的信息保存成功后,调用func方法进行后续信息的保存
324
- */
325
-
326
-
327
- /**
328
- * 值改变事件
329
- */
330
-
331
-
332
- /**
333
- * 校验该分类表单是否全部填写完成
334
- */
335
-
336
- }, {
337
- key: "render",
338
- value: function render() {
339
- var _this2 = this;
340
-
341
- var _props = this.props,
342
- data = _props.data,
343
- showTitle = _props.showTitle,
344
- showHeader = _props.showHeader; //data 是这一条分类的信息
345
-
346
- var isEdit = this.state.isEdit;
347
-
348
- var title = showHeader && showTitle ? data.flmc : "";
349
- return _react2.default.createElement(_EditForm2.default, {
350
- ref: function ref(form) {
351
- _this2.nhEditForm = form;
352
- },
353
- gender: this.state.gender,
354
- isEdit: isEdit,
355
- list: this.state.list,
356
- onChange: this.onChange,
357
- title: title
358
- });
359
- }
360
- }]);
361
-
362
- return TssqEditForm;
363
- }(_react2.default.Component);
364
-
365
- TssqEditForm.propTypes = {
366
- title: _propTypes2.default.string,
367
- showTitle: _propTypes2.default.bool,
368
- showHeader: _propTypes2.default.bool
369
- };
370
- TssqEditForm.defaultProps = {
371
- title: "Title", // 标题
372
- showTitle: true,
373
- showHeader: true
374
- };
375
- exports.default = TssqEditForm;