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,401 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _whiteSpace = require('antd-mobile/lib/white-space');
8
-
9
- var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
10
-
11
- var _button = require('antd-mobile/lib/button');
12
-
13
- var _button2 = _interopRequireDefault(_button);
14
-
15
- var _card = require('antd-mobile/lib/card');
16
-
17
- var _card2 = _interopRequireDefault(_card);
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 _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; };
28
-
29
- 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; }; }();
30
-
31
- require('antd-mobile/lib/white-space/style/css');
32
-
33
- require('antd-mobile/lib/button/style/css');
34
-
35
- require('antd-mobile/lib/card/style/css');
36
-
37
- require('antd-mobile/lib/list/style/css');
38
-
39
- require('antd-mobile/lib/toast/style/css');
40
-
41
- var _react = require('react');
42
-
43
- var _react2 = _interopRequireDefault(_react);
44
-
45
- var _moment = require('moment');
46
-
47
- var _moment2 = _interopRequireDefault(_moment);
48
-
49
- var _render = require('../../NHInputPicker/render.js');
50
-
51
- var _render2 = _interopRequireDefault(_render);
52
-
53
- var _rcForm = require('rc-form');
54
-
55
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
56
-
57
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
58
-
59
- 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; }
60
-
61
- 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; }
62
-
63
- var EditInitForm = function (_React$Component) {
64
- _inherits(EditInitForm, _React$Component);
65
-
66
- function EditInitForm(props) {
67
- _classCallCheck(this, EditInitForm);
68
-
69
- var _this = _possibleConstructorReturn(this, (EditInitForm.__proto__ || Object.getPrototypeOf(EditInitForm)).call(this, props));
70
-
71
- _this.onChange = function (seq, v, t, item) {
72
- var value = v;
73
- var text = t;
74
- //如果是级联,则只需要取最后的一个值
75
- if (item.bdkjlx === 'nhcascader' && v != undefined) {
76
- value = "";
77
- text = "";
78
- if (Array.isArray(t)) {
79
- t.map(function (map) {
80
- text += map.label;
81
- value = map.value;
82
- return map;
83
- });
84
- }
85
- }
86
- _this.props.onChange && _this.props.onChange(seq, value, text);
87
- };
88
-
89
- _this.getDataList = function (list) {
90
- var dataList = [];
91
- if (list == null) {
92
- list = [];
93
- }
94
- list.map(function (item, index) {
95
- //此处只展示sfxs为1(显示)的字段
96
- if (item.sfxs === '1') {
97
- var required = item.sfbt === '1' ? true : false;
98
- var render = undefined;
99
- var isUpload = false;
100
- var deV = undefined;
101
- var defaultValueText = void 0;
102
- if (item.bdkjcs && item.bdkjcs !== "" && item.bdkjcs !== undefined) {
103
- var parameter = JSON.parse(item.bdkjcs);
104
- if (Array.isArray(parameter.defaultValue) === true) {
105
- deV = "";
106
- } else {
107
- deV = parameter.defaultValue ? parameter.defaultValue : "";
108
- }
109
- if (item.bdkjlx === 'radio') {
110
- var _ref = parameter || {},
111
- _ref$options = _ref.options,
112
- options = _ref$options === undefined ? [] : _ref$options;
113
-
114
- defaultValueText = (options.find(function (item) {
115
- return item.value === deV;
116
- }) || {}).label;
117
- }
118
- }
119
- var value = "";
120
- var text = item.text;
121
- if (item.value !== "" && item.value !== undefined && item.value) {
122
- value = item.value;
123
- } else {
124
- value = deV;
125
- text = defaultValueText;
126
- if (value !== "" && value !== undefined && value) {
127
- if (!item.text && item.text === "" && item.text === undefined) {
128
- item.text = "";
129
- }
130
- _this.props.onChange && _this.props.onChange(item.seq, value, text, true);
131
- }
132
- }
133
- if (item.bdkjlx === 'upload') {
134
- isUpload = true;
135
- }
136
- //如果是日期(datepicker),初始化的值需要做处理
137
- if (item.bdkjlx === 'datepicker') {
138
- value = item.value ? new Date((0, _moment2.default)(item.value, 'YYYY-MM-DD').toDate()) : undefined;
139
- }
140
- //如果是日期时间(datetimepicker),初始化的值需要做处理
141
- if (item.bdkjlx === 'datetimepicker') {
142
- value = item.value ? new Date((0, _moment2.default)(item.value, 'YYYY-MM-DD HH:mm:ss').toDate()) : undefined;
143
- }
144
- if (item.bdkjlx === 'timepicker') {
145
- value = item.value ? new Date((0, _moment2.default)(item.value, 'HH:mm:ss').toDate()) : undefined;
146
- }
147
- //如果是日期范围(rangepicker),暂时不支持
148
- if (item.bdkjlx === 'rangepicker') {
149
- _toast2.default.fail('表单不支持日期范围控件', 1);
150
- }
151
- var otherParams = {};
152
- if (item.parentfieldid) {
153
- var row = list.find(function (row) {
154
- return row.id === item.parentfieldid;
155
- });
156
- if (row) {
157
- otherParams.parentValue = row.value;
158
- }
159
- }
160
-
161
- var formItemLayout = { wrapperCol: { span: 24 } };
162
- // let disabled = this.props.isEdit&&item.sfbj==='1'?true:false;
163
- //let disabled = false;
164
- //是采集方式为表单控件,且是可编辑的状态
165
- var isEdit = _this.props.isEdit && item.sfbj === '1' ? true : false;
166
- // 纠错编辑模式下 需要开放纠错编辑才显示可编辑
167
- if (_this.props.model == 'editCheck') {
168
- isEdit = item.sfkfjc === '1' ? true : false;
169
- };
170
- if (item.sjcjfsdm === '01') {
171
- //disabled = !(item.sfbj === '1');
172
- if (item.sfbj === '1' && isEdit) {
173
- render = function render() {
174
- if (_this.props.model === 'editCheck' && !item.sfkfjc) {
175
- // 如果是纠错编辑模式未开纠错字段 不显示编辑
176
- return _react2.default.createElement(
177
- _list2.default.Item,
178
- { extra: item.text, key: item.id, wrap: true, multipleLine: true },
179
- item.title
180
- );
181
- }
182
- return _react2.default.createElement(_render2.default, _extends({
183
- id: item.id,
184
- key: item.id,
185
- label: item.title,
186
- value: value,
187
- form: _this.props.form,
188
- feature: item.bdkjcs,
189
- required: required,
190
- hideLabel: true,
191
- isEdit: isEdit,
192
- formItemLayout: formItemLayout
193
- //disabled={disabled}
194
- }, otherParams, {
195
- onChange: function onChange(value, text) {
196
- _this.onChange(item.seq, value, text, item);
197
- }
198
- }));
199
- };
200
- } else {
201
- render = function render() {
202
- if (isUpload) {
203
- return _react2.default.createElement(_render2.default, {
204
- label: item.title,
205
- value: value,
206
- feature: item.bdkjcs,
207
- isEdit: isEdit
208
- //disabled={disabled}
209
- });
210
- }
211
- return _react2.default.createElement(
212
- _list2.default.Item,
213
- { extra: item.text, key: item.id, wrap: true, multipleLine: true },
214
- item.title
215
- );
216
- };
217
- }
218
- }
219
-
220
- var map = {
221
- isUpload: isUpload,
222
- title: _react2.default.createElement(
223
- 'font',
224
- { className: 'dynamic-label-' + item.blm },
225
- item.title
226
- ),
227
- text: item.text,
228
- required: required,
229
- render: render,
230
- id: item.id,
231
- sfkfjc: item.sfkfjc,
232
- sfxs: item.sfxs,
233
- sfbj: item.sfbj
234
- };
235
- dataList.push(map);
236
- }
237
- });
238
- return dataList;
239
- };
240
-
241
- _this.onEdit = function () {
242
- _this.props.onEdit();
243
- };
244
-
245
- _this.onCacheSave = function () {
246
- _this.props.form.validateFields(function (err, value) {
247
- if (err) {
248
- _toast2.default.info('请检查必填项是否填写!');
249
- return;
250
- }
251
- _this.props.onClose();
252
- });
253
- };
254
-
255
- _this.onCanCel = function () {
256
- _this.props.onCacheBack();
257
- };
258
-
259
- _this.state = {
260
- onpenEdit: false
261
- };
262
- return _this;
263
- }
264
- // editCheck模式下 开启编辑
265
-
266
- // editCheck模式下 保存
267
-
268
- // editCheck模式下 保存
269
-
270
-
271
- _createClass(EditInitForm, [{
272
- key: 'render',
273
- value: function render() {
274
- var _props = this.props,
275
- form = _props.form,
276
- isEdit = _props.isEdit,
277
- list = _props.list,
278
- title = _props.title,
279
- model = _props.model;
280
-
281
- var dataList = this.getDataList(list);
282
- // 该分类是否存在可编辑的纠错字段
283
- var hasJczd = dataList.filter(function (item) {
284
- return item.sfkfjc === '1' && item.sfbj === '1' && item.sfxs === '1';
285
- }).length > 0;
286
- var cardExtra = model === 'editCheck' && hasJczd ? _react2.default.createElement('img', { src: require('../../../../assets/NHDynamicFormShow/edit.svg'), style: { width: "0.4rem", height: "0.4rem", margin: "0px 5px" },
287
- onClick: this.onEdit }) : null;
288
-
289
- return _react2.default.createElement(
290
- _react.Fragment,
291
- null,
292
- isEdit ?
293
- // <List renderHeader={() => title}>
294
- // {
295
- // dataList.map((item, index) => {
296
- // return item.render !== undefined ? item.render() : <List.Item key={item.id} wrap extra={item.text}>{item.title}</List.Item>;
297
- // })
298
- // }
299
- // </List>
300
- _react2.default.createElement(
301
- 'div',
302
- null,
303
- _react2.default.createElement(
304
- _card2.default,
305
- { full: true, className: 'editTypeCard' },
306
- _react2.default.createElement(_card2.default.Header, {
307
- title: _react2.default.createElement(
308
- 'div',
309
- { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
310
- title
311
- )
312
- }),
313
- _react2.default.createElement(
314
- _card2.default.Body,
315
- null,
316
- dataList.map(function (item, index) {
317
- return item.render !== undefined ? item.render() : _react2.default.createElement(
318
- _list2.default.Item,
319
- { key: item.id, wrap: true, extra: item.text },
320
- item.title
321
- );
322
- }),
323
- model === 'editCheck' && _react2.default.createElement(
324
- 'div',
325
- { style: { display: 'flex', justifyContent: 'space-around', margin: '10px 0px 5px 0' } },
326
- _react2.default.createElement(
327
- _button2.default,
328
- { type: 'primary', inline: true, size: 'small', onClick: this.onCacheSave },
329
- '\u4FDD\u5B58'
330
- ),
331
- _react2.default.createElement(
332
- _button2.default,
333
- { type: 'ghost', inline: true, size: 'small', onClick: this.onCanCel },
334
- '\u53D6\u6D88'
335
- )
336
- )
337
- )
338
- )
339
- ) : _react2.default.createElement(
340
- 'div',
341
- null,
342
- _react2.default.createElement(
343
- _card2.default,
344
- { full: true },
345
- _react2.default.createElement(_card2.default.Header, {
346
- title: _react2.default.createElement(
347
- 'div',
348
- { style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
349
- title
350
- ),
351
- extra: cardExtra
352
- }),
353
- _react2.default.createElement(
354
- _card2.default.Body,
355
- null,
356
- dataList.map(function (item) {
357
- if (item.isUpload) {
358
- return _react2.default.createElement(
359
- 'div',
360
- null,
361
- _react2.default.createElement(
362
- 'font',
363
- { color: 'grey' },
364
- item.title,
365
- '\uFF1A '
366
- ),
367
- item.render(),
368
- _react2.default.createElement('br', null)
369
- );
370
- }
371
- return _react2.default.createElement(
372
- 'div',
373
- null,
374
- _react2.default.createElement(
375
- 'font',
376
- { color: 'grey' },
377
- item.title,
378
- '\uFF1A '
379
- ),
380
- item.text,
381
- _react2.default.createElement('br', null)
382
- );
383
- })
384
- )
385
- ),
386
- _react2.default.createElement(_whiteSpace2.default, { size: 'lg' })
387
- ),
388
- _react2.default.createElement(
389
- 'style',
390
- { global: 'true', jsx: 'true' },
391
- '\n .editTypeCard .am-card-body{\n padding: 0 !important;\n }\n .editTypeCard .am-card-body .nh-inputrender .am-list-item.am-list-item-middle .am-list-line{\n border-bottom: 1px solid #ddd;\n }\n '
392
- )
393
- );
394
- }
395
- }]);
396
-
397
- return EditInitForm;
398
- }(_react2.default.Component);
399
-
400
- var EditForm = (0, _rcForm.createForm)()(EditInitForm);
401
- exports.default = EditForm;
@@ -1,271 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- 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; }; }();
8
-
9
- var _react = require('react');
10
-
11
- var _react2 = _interopRequireDefault(_react);
12
-
13
- var _NHFetch = require('../../../utils/NHFetch');
14
-
15
- var _NHFetch2 = _interopRequireDefault(_NHFetch);
16
-
17
- var _EditForm = require('./EditForm');
18
-
19
- var _EditForm2 = _interopRequireDefault(_EditForm);
20
-
21
- var _propTypes = require('prop-types');
22
-
23
- var _propTypes2 = _interopRequireDefault(_propTypes);
24
-
25
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
-
27
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
28
-
29
- 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; }
30
-
31
- 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; }
32
-
33
- var _ = require('lodash');
34
-
35
- var InfoItem = function (_React$Component) {
36
- _inherits(InfoItem, _React$Component);
37
-
38
- function InfoItem(props) {
39
- _classCallCheck(this, InfoItem);
40
-
41
- var _this = _possibleConstructorReturn(this, (InfoItem.__proto__ || Object.getPrototypeOf(InfoItem)).call(this, props));
42
-
43
- _this.InitialOneOnOneInfo = function () {
44
- var params = {
45
- id: _this.props.objId,
46
- bdid: _this.props.formId,
47
- type: '2', //this.props.model === "view" ? "1" : "2", 如果查看模式需要根据控件类型占不同的列,此处只能为'2'
48
- zdflid: _this.props.flid,
49
- clientType: "mobile"
50
- };
51
- if (_this.props.processId !== undefined) {
52
- params.lcId = _this.props.processId;
53
- }
54
- if (_this.props.processApplyId !== undefined) {
55
- params.lcsqid = _this.props.processApplyId;
56
- }
57
- if (_this.props.pkid !== undefined) {
58
- params.pkid = _this.props.pkid;
59
- }
60
- if (_this.props.rwid) {
61
- params.rwid = _this.props.rwid; // 任务id
62
- }
63
- (0, _NHFetch2.default)("api/sm-dynamic-form/dynamicShow/queryBdzdInfo", "GET", params).then(function (res) {
64
- if (res) {
65
- //把通过接口方式获取的功能实现
66
- var listInfo = [];
67
- if (res.data != null && res.data != "" && res.data != undefined) {
68
- listInfo = res.data;
69
- }
70
- _this.setState({
71
- list: listInfo,
72
- cacheList: _.cloneDeep(listInfo),
73
- loading: false
74
- }, function () {
75
- _this.state.list.map(function (item) {
76
- if (item.jkUrl !== "" && item.jkUrl !== undefined && item.jkUrl !== null) {
77
- var url = item.jkUrl;
78
- (0, _NHFetch2.default)(url, "GET", params).then(function (res) {
79
- if (res) {
80
- var maps = {};
81
- maps = res.data;
82
- var zzd = item.zzd; //要获取的值字段名称
83
- var wbzd = item.wbzd; //要获取的文本字段名称
84
- item.text = maps[wbzd];
85
- item.inittext = maps[wbzd];
86
- item.value = maps[zzd];
87
- item.initValue = maps[zzd];
88
- }
89
-
90
- _this.setState({
91
- list: _this.state.list,
92
- cacheList: _.cloneDeep(_this.state.list)
93
- });
94
- });
95
- }
96
- return item;
97
- });
98
- });
99
- }
100
- });
101
- };
102
-
103
- _this.onChange = function (seq, value, text, isChange) {
104
- var list = _this.state.list;
105
- if (list[seq - 1] !== undefined) {
106
- list[seq - 1].text = text;
107
- list[seq - 1].value = value;
108
- //判断值是否有改变
109
- if (isChange !== "" && isChange !== undefined) {
110
- list[seq - 1].isChange = isChange;
111
- } else {
112
- if (list[seq - 1].value === list[seq - 1].initValue || !value && list[seq - 1].initValue === '') {
113
- list[seq - 1].isChange = false;
114
- } else {
115
- list[seq - 1].isChange = true;
116
- }
117
- }
118
- _this.setState({
119
- list: list
120
- });
121
- var oneONOneInfo = {
122
- id: _this.props.objId,
123
- sjkyh: _this.props.sjkyh,
124
- dto: _this.state.list,
125
- flid: _this.props.flid,
126
- baseUrl: _this.props.baseUrl,
127
- flstdm: _this.props.flstdm,
128
- pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
129
- lcslid: _this.props.processApplyId
130
- };
131
- _this.props.handlOneOnDetail(oneONOneInfo, _.cloneDeep(_this.state.cacheList));
132
- }
133
- };
134
-
135
- _this.validate = function (func) {
136
- if (_this.nhEditForm) {
137
- _this.nhEditForm.validateFields(function (err) {
138
- var flag = true;
139
- if (err) {
140
- flag = false;
141
- }
142
- func(flag);
143
- });
144
- } else {
145
- func(true);
146
- }
147
- };
148
-
149
- _this.onEditClose = function () {
150
- _this.setState({
151
- isEdit: false
152
- // cacheList: _.cloneDeep(this.state.list)
153
- });
154
- };
155
-
156
- _this.onEdit = function () {
157
- _this.setState({
158
- isEdit: true,
159
- preEditCacheList: _.cloneDeep(_this.state.list)
160
- }, function () {
161
- _this.props.editCheckShow && _this.props.editCheckShow();
162
- });
163
- };
164
-
165
- _this.onCacheBack = function () {
166
- _this.setState({
167
- list: _.cloneDeep(_this.state.preEditCacheList),
168
- isEdit: false
169
- });
170
- var oneONOneInfo = {
171
- id: _this.props.objId,
172
- sjkyh: _this.props.sjkyh,
173
- dto: _.cloneDeep(_this.state.preEditCacheList),
174
- flid: _this.props.flid,
175
- baseUrl: _this.props.baseUrl,
176
- flstdm: _this.props.flstdm,
177
- pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
178
- lcslid: _this.props.processApplyId
179
- };
180
- _this.props.handlOneOnDetail(oneONOneInfo, _.cloneDeep(_this.state.cacheList));
181
- };
182
-
183
- _this.state = {
184
- isEdit: props.model === "edit" ? true : false, //当时编辑模式模式时,直接自动进入编辑模式
185
- list: [
186
- //该分类的所有的数据
187
- // 标题 显示的文本 控件的值 控件初始化的值 数据采集方式 表单控件参数
188
- // {seq:1,id:'1',title:'姓名',text:'百里屠苏',value:'百里屠苏',initValue:'百里屠苏',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
189
- // //接口url 值字段 文本字段 是否显示 是否编辑 是否必填 字段最小值 字段最大值
190
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
191
- // {seq:2,id:'2',title:'性别',text:'是',value:'1',initValue:'1',sjcjfsdm:'01',bdkjcs:'{"type":"switch","checkedText":"是","uncheckedText":"否","defaultChecked":false}'
192
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'0',zszxz:'',zszdz:'',isChange:false,bdkjlx:'switch'},
193
- // {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":""}'
194
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
195
- // {seq:4,id:'4',title:'籍贯',text:'湖南',value:'湖南',initValue:'湖南',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
196
- // ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
197
- ],
198
- cacheList: [], //缓存数据 备份初始数据 用于比较字段是否有修改过
199
- preEditCacheList: [] //editCheck模式下 上次点击保存的数据,取消后回退到当前数据,而不是初始缓存的cacheList的数据
200
- };
201
- return _this;
202
- }
203
-
204
- _createClass(InfoItem, [{
205
- key: 'UNSAFE_componentWillMount',
206
- value: function UNSAFE_componentWillMount() {
207
- this.InitialOneOnOneInfo();
208
- }
209
-
210
- /**
211
- * 值改变事件
212
- */
213
-
214
-
215
- /**
216
- * 校验该分类表单是否全部填写完成
217
- */
218
-
219
-
220
- /** editCheck模式下 关闭编辑 */
221
-
222
-
223
- /** editCheck模式下 开启编辑 */
224
-
225
-
226
- /** editCheck模式下 取消编辑 将上次编辑保存备份数据preEditCacheList赋值给list */
227
-
228
- }, {
229
- key: 'render',
230
- value: function render() {
231
- var _this2 = this;
232
-
233
- var _props = this.props,
234
- data = _props.data,
235
- showTitle = _props.showTitle,
236
- showHeader = _props.showHeader,
237
- model = _props.model; //data 是这一条分类的信息
238
-
239
- var isEdit = this.state.isEdit;
240
-
241
- var title = showHeader && showTitle ? data.flmc : "";
242
- return _react2.default.createElement(_EditForm2.default, {
243
- ref: function ref(form) {
244
- _this2.nhEditForm = form;
245
- },
246
- isEdit: isEdit,
247
- list: this.state.list,
248
- onChange: this.onChange,
249
- onEdit: this.onEdit,
250
- onClose: this.onEditClose,
251
- onCacheBack: this.onCacheBack,
252
- title: title,
253
- model: model
254
- });
255
- }
256
- }]);
257
-
258
- return InfoItem;
259
- }(_react2.default.Component);
260
-
261
- InfoItem.propTypes = {
262
- title: _propTypes2.default.string,
263
- showTitle: _propTypes2.default.bool,
264
- showHeader: _propTypes2.default.bool
265
- };
266
- InfoItem.defaultProps = {
267
- title: "Title", // 标题
268
- showTitle: true,
269
- showHeader: true
270
- };
271
- exports.default = InfoItem;