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,585 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _message2 = require('antd/lib/message');
8
-
9
- var _message3 = _interopRequireDefault(_message2);
10
-
11
- var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
12
-
13
- var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
14
-
15
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
16
-
17
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
18
-
19
- var _createClass2 = require('babel-runtime/helpers/createClass');
20
-
21
- var _createClass3 = _interopRequireDefault(_createClass2);
22
-
23
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
24
-
25
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
26
-
27
- var _inherits2 = require('babel-runtime/helpers/inherits');
28
-
29
- var _inherits3 = _interopRequireDefault(_inherits2);
30
-
31
- var _tabs = require('antd/lib/tabs');
32
-
33
- var _tabs2 = _interopRequireDefault(_tabs);
34
-
35
- require('antd/lib/message/style');
36
-
37
- require('antd/lib/tabs/style');
38
-
39
- var _react = require('react');
40
-
41
- var _react2 = _interopRequireDefault(_react);
42
-
43
- var _inputConst = require('./input-const');
44
-
45
- var _settingInput = require('./setting-input');
46
-
47
- var _settingInput2 = _interopRequireDefault(_settingInput);
48
-
49
- var _settingTextarea = require('./setting-textarea');
50
-
51
- var _settingTextarea2 = _interopRequireDefault(_settingTextarea);
52
-
53
- var _settingRadio = require('./setting-radio');
54
-
55
- var _settingRadio2 = _interopRequireDefault(_settingRadio);
56
-
57
- var _settingSelect = require('./setting-select');
58
-
59
- var _settingSelect2 = _interopRequireDefault(_settingSelect);
60
-
61
- var _settingSwitch = require('./setting-switch');
62
-
63
- var _settingSwitch2 = _interopRequireDefault(_settingSwitch);
64
-
65
- var _settingDatepicker = require('./setting-datepicker');
66
-
67
- var _settingDatepicker2 = _interopRequireDefault(_settingDatepicker);
68
-
69
- var _settingRangepicker = require('./setting-rangepicker');
70
-
71
- var _settingRangepicker2 = _interopRequireDefault(_settingRangepicker);
72
-
73
- var _settingUpload = require('./setting-upload');
74
-
75
- var _settingUpload2 = _interopRequireDefault(_settingUpload);
76
-
77
- var _settingTimepicker = require('./setting-timepicker');
78
-
79
- var _settingTimepicker2 = _interopRequireDefault(_settingTimepicker);
80
-
81
- var _settingMultiSelect = require('./setting-multiSelect');
82
-
83
- var _settingMultiSelect2 = _interopRequireDefault(_settingMultiSelect);
84
-
85
- var _settingNhcascader = require('./setting-nhcascader');
86
-
87
- var _settingNhcascader2 = _interopRequireDefault(_settingNhcascader);
88
-
89
- var _settingDatetimepicker = require('./setting-datetimepicker');
90
-
91
- var _settingDatetimepicker2 = _interopRequireDefault(_settingDatetimepicker);
92
-
93
- var _settingInputNumber = require('./setting-inputNumber');
94
-
95
- var _settingInputNumber2 = _interopRequireDefault(_settingInputNumber);
96
-
97
- var _settingMonthpicker = require('./setting-monthpicker');
98
-
99
- var _settingMonthpicker2 = _interopRequireDefault(_settingMonthpicker);
100
-
101
- var _settingOldUpload = require('./setting-old-upload');
102
-
103
- var _settingOldUpload2 = _interopRequireDefault(_settingOldUpload);
104
-
105
- var _settingStuSelector = require('./setting-stu-selector');
106
-
107
- var _settingStuSelector2 = _interopRequireDefault(_settingStuSelector);
108
-
109
- var _settingTeaSelector = require('./setting-tea-selector');
110
-
111
- var _settingTeaSelector2 = _interopRequireDefault(_settingTeaSelector);
112
-
113
- var _settingCheckbox = require('./setting-checkbox');
114
-
115
- var _settingCheckbox2 = _interopRequireDefault(_settingCheckbox);
116
-
117
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
118
-
119
- var TabPane = _tabs2.default.TabPane;
120
-
121
- /**
122
- * 输入控件参数设置页面
123
- * Author: zengxiangkai@ly-sky.com
124
- * Created on: 2018-02-05 14:56:33
125
- * Version: 1.0
126
- * Modify log:
127
- */
128
-
129
- var EditPage = function (_React$Component) {
130
- (0, _inherits3.default)(EditPage, _React$Component);
131
-
132
- function EditPage(props) {
133
- (0, _classCallCheck3.default)(this, EditPage);
134
-
135
- var _this = (0, _possibleConstructorReturn3.default)(this, (EditPage.__proto__ || (0, _getPrototypeOf2.default)(EditPage)).call(this, props));
136
-
137
- _this.saveSettingInputRef = function (ref) {
138
- _this.settingInputRef = ref;
139
- //这里判断是否是初始进来的页面,如果是初始页面,则防止feature被覆盖
140
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.INPUT || _this.state.feature == '')) {
141
- //当组件实例化时(这里是当前显示的组件),同步获取其feature
142
- _this.setState({ feature: ref.getFeature() });
143
- }
144
- };
145
-
146
- _this.saveSettingTextAreaRef = function (ref) {
147
- _this.settingTextAreaRef = ref;
148
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.TEXTAREA || _this.state.feature == '')) {
149
- _this.setState({ feature: ref.getFeature() });
150
- }
151
- };
152
-
153
- _this.saveSettingRadioRef = function (ref) {
154
- _this.settingRadioRef = ref;
155
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.RADIO || _this.state.feature == '')) {
156
- _this.setState({ feature: ref.getFeature() });
157
- }
158
- };
159
-
160
- _this.saveSettingSelectRef = function (ref) {
161
- _this.settingSelectRef = ref;
162
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.SELECT && _this.state.defaultActiveKey != _inputConst.InputType.SEL || _this.state.feature == '')) {
163
- _this.setState({ feature: ref.getFeature() });
164
- }
165
- };
166
-
167
- _this.saveSettingSwitchRef = function (ref) {
168
- _this.settingSwitchRef = ref;
169
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.SWITCH || _this.state.feature == '')) {
170
- _this.setState({ feature: ref.getFeature() });
171
- }
172
- };
173
-
174
- _this.saveSettingDatePickerRef = function (ref) {
175
- _this.settingDatePickerRef = ref;
176
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.DATEPICKER || _this.state.feature == '')) {
177
- _this.setState({ feature: ref.getFeature() });
178
- }
179
- };
180
-
181
- _this.saveSettingRangePickerRef = function (ref) {
182
- _this.settingRangePickerRef = ref;
183
- if (ref != null && (_this.state.defaultActiveKey != _inputConst.InputType.RANGEPICKER || _this.state.feature == '')) {
184
- _this.setState({ feature: ref.getFeature() });
185
- }
186
- };
187
-
188
- _this.saveSettingUploadRef = function (ref) {
189
- _this.settingUploadRef = ref;
190
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.UPLOAD || _this.state.feature == '')) {
191
- _this.setState({ feature: ref.getFeature() });
192
- }
193
- };
194
-
195
- _this.saveSettingOldUploadRef = function (ref) {
196
- _this.settingOldUploadRef = ref;
197
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.OLDUPLOAD || _this.state.feature == '')) {
198
- _this.setState({ feature: ref.getFeature() });
199
- }
200
- };
201
-
202
- _this.saveSettingTimePickerRef = function (ref) {
203
- _this.settingTimePickerRef = ref;
204
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.TIMEPICKER || _this.state.feature == '')) {
205
- _this.setState({ feature: ref.getFeature() });
206
- }
207
- };
208
-
209
- _this.saveSettingMultiSelectRef = function (ref) {
210
- _this.settingMultiSelectRef = ref;
211
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.MULTISELECT || _this.state.feature == '')) {
212
- _this.setState({ feature: ref.getFeature() });
213
- }
214
- };
215
-
216
- _this.saveSettingNHCascaderRef = function (ref) {
217
- _this.settingNHCascaderRef = ref;
218
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.NHCASCADER || _this.state.feature == '')) {
219
- _this.setState({ feature: ref.getFeature() });
220
- }
221
- };
222
-
223
- _this.saveSettingDateTimePickerRef = function (ref) {
224
- _this.settingDateTimePickerRef = ref;
225
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.DATETIMEPICKER || _this.state.feature == '')) {
226
- _this.setState({ feature: ref.getFeature() });
227
- }
228
- };
229
-
230
- _this.saveSettingInputNumberRef = function (ref) {
231
- _this.settingInputNumberRef = ref;
232
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.INPUTNUMBER || _this.state.feature == '')) {
233
- _this.setState({ feature: ref.getFeature() });
234
- }
235
- };
236
-
237
- _this.saveSettingStuSelectorRef = function (ref) {
238
- _this.settingStuSelectorRef = ref;
239
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.STUSELECTOR || _this.state.feature == '')) {
240
- _this.setState({ feature: ref.getFeature() });
241
- }
242
- };
243
-
244
- _this.saveSettingTeaSelectorRef = function (ref) {
245
- _this.settingTeaSelectorRef = ref;
246
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.TEASELECTOR || _this.state.feature == '')) {
247
- _this.setState({ feature: ref.getFeature() });
248
- }
249
- };
250
-
251
- _this.saveSettingCheckboxRef = function (ref) {
252
- _this.settingCheckboxRef = ref;
253
- if (ref !== null && (_this.state.defaultActiveKey !== _inputConst.InputType.CHECKBOX || _this.state.feature == '')) {
254
- _this.setState({ feature: ref.getFeature() });
255
- }
256
- };
257
-
258
- _this.saveSettingMonthPickerRef = function (ref) {
259
- _this.settingMonthPickerRef = ref;
260
- if (ref !== null && (_this.state.defaultActiveKey != _inputConst.InputType.MONTHPICKER || _this.state.feature == '')) {
261
- _this.setState({ feature: ref.getFeature() });
262
- }
263
- };
264
-
265
- _this.handleTabsChange = function (key) {
266
-
267
- //切换面板时,手动获取对应输入控件的配置参数
268
- if (key == _inputConst.InputType.INPUT) {
269
- /** 如果该页面未显示过(实例化),则这里的ref会为undefined,所以会调用ref的回调方法,在那里获取feature。
270
- 当实例化过一次了,下次就可以调用此方法*/
271
- if (_this.settingInputRef !== undefined) {
272
- _this.setState({ feature: _this.settingInputRef.getFeature() });
273
- }
274
- } else if (key == _inputConst.InputType.TEXTAREA) {
275
- if (_this.settingTextAreaRef !== undefined) {
276
- _this.setState({ feature: _this.settingTextAreaRef.getFeature() });
277
- }
278
- } else if (key == _inputConst.InputType.RADIO) {
279
- if (_this.settingRadioRef !== undefined) {
280
- _this.setState({ feature: _this.settingRadioRef.getFeature() });
281
- }
282
- } else if (key == _inputConst.InputType.SELECT || key == _inputConst.InputType.SEL) {
283
- if (_this.settingSelectRef !== undefined) {
284
- _this.setState({ feature: _this.settingSelectRef.getFeature() });
285
- }
286
- } else if (key == _inputConst.InputType.SWITCH) {
287
- if (_this.settingSwitchRef !== undefined) {
288
- _this.setState({ feature: _this.settingSwitchRef.getFeature() });
289
- }
290
- } else if (key == _inputConst.InputType.DATEPICKER) {
291
- if (_this.settingDatePickerRef !== undefined) {
292
- _this.setState({ feature: _this.settingDatePickerRef.getFeature() });
293
- }
294
- } else if (key == _inputConst.InputType.RANGEPICKER) {
295
- if (_this.settingRangePickerRef !== undefined) {
296
- _this.setState({ feature: _this.settingRangePickerRef.getFeature() });
297
- }
298
- } else if (key == _inputConst.InputType.UPLOAD) {
299
- if (_this.settingUploadRef !== undefined) {
300
- _this.setState({ feature: _this.settingUploadRef.getFeature() });
301
- }
302
- } else if (key == _inputConst.InputType.TIMEPICKER) {
303
- if (_this.settingTimePickerRef !== undefined) {
304
- _this.setState({ feature: _this.settingTimePickerRef.getFeature() });
305
- }
306
- } else if (key == _inputConst.InputType.MULTISELECT) {
307
- if (_this.settingMultiSelectRef !== undefined) {
308
- _this.setState({ feature: _this.settingMultiSelectRef.getFeature() });
309
- }
310
- } else if (key == _inputConst.InputType.NHCASCADER) {
311
- if (_this.settingNHCascaderRef !== undefined) {
312
- _this.setState({ feature: _this.settingNHCascaderRef.getFeature() });
313
- }
314
- } else if (key == _inputConst.InputType.DATETIMEPICKER) {
315
- if (_this.settingDateTimePickerRef !== undefined) {
316
- _this.setState({ feature: _this.settingDateTimePickerRef.getFeature() });
317
- }
318
- } else if (key == _inputConst.InputType.INPUTNUMBER) {
319
- if (_this.settingInputNumberRef !== undefined) {
320
- _this.setState({ feature: _this.settingInputNumberRef.getFeature() });
321
- }
322
- } else if (key == _inputConst.InputType.MONTHPICKER) {
323
- if (_this.settingMonthPickerRef !== undefined) {
324
- _this.setState({ feature: _this.settingMonthPickerRef.getFeature() });
325
- }
326
- } else if (key == _inputConst.InputType.OLDUPLOAD) {
327
- if (_this.settingOldUploadRef !== undefined) {
328
- _this.setState({ feature: _this.settingOldUploadRef.getFeature() });
329
- }
330
- } else if (key == _inputConst.InputType.STUSELECTOR) {
331
- if (_this.settingStuSelectorRef !== undefined) {
332
- _this.setState({ feature: _this.settingStuSelectorRef.getFeature() });
333
- }
334
- } else if (key == _inputConst.InputType.TEASELECTOR) {
335
- if (_this.settingTeaSelectorRef !== undefined) {
336
- _this.setState({ feature: _this.settingTeaSelectorRef.getFeature() });
337
- }
338
- } else if (key == _inputConst.InputType.CHECKBOX) {
339
- if (_this.settingCheckboxRef !== undefined) {
340
- _this.setState({ feature: _this.settingCheckboxRef.getFeature() });
341
- }
342
- }
343
- };
344
-
345
- _this.handleInputChange = function (feature) {
346
- _this.setState({
347
- feature: feature
348
- });
349
- };
350
-
351
- _this.getFeature = function () {
352
- return _this.state.feature;
353
- };
354
-
355
- _this.state = {
356
- defaultActiveKey: _inputConst.InputType.INPUT, //初始显示输入控件配置页面
357
- feature: '' //输入控件配置参数
358
- };
359
- return _this;
360
- }
361
-
362
- (0, _createClass3.default)(EditPage, [{
363
- key: 'componentWillMount',
364
-
365
-
366
- //在渲染前调用,可在此最后一次初始化组件状态
367
- value: function componentWillMount() {
368
- //将输入控件配置参数设置到状态中
369
- if (this.props.initFeature) {
370
- try {
371
- var initFeature = JSON.parse(this.props.initFeature);
372
- this.setState({
373
- defaultActiveKey: initFeature.type ? initFeature.type : _inputConst.InputType.INPUT,
374
- feature: this.props.initFeature
375
- });
376
- } catch (e) {
377
- console.log(e);
378
- _message3.default.error('解析控件配置参数出错!');
379
- }
380
- }
381
- }
382
-
383
- //React将会在组件实例化的时候调用ref回调和DOM元素,当它销毁的时候调用它和null。
384
-
385
-
386
- //切换面板的回调
387
-
388
-
389
- //子组件状态提升,同步当前设置的参数
390
-
391
-
392
- //供父组件获取feature
393
-
394
- }, {
395
- key: 'render',
396
- value: function render() {
397
-
398
- var initFeature = {};
399
- if (this.state.feature !== undefined && this.state.feature != '') {
400
- try {
401
- initFeature = JSON.parse(this.state.feature);
402
- } catch (e) {
403
- _message3.default.error('解析控件配置参数出错!');
404
- }
405
- }
406
-
407
- return _react2.default.createElement(
408
- 'div',
409
- { id: 'div-inputPicker-editPage' },
410
- _react2.default.createElement(
411
- _tabs2.default,
412
- {
413
- defaultActiveKey: this.state.defaultActiveKey,
414
- tabPosition: 'left',
415
- size: 'small',
416
- onChange: this.handleTabsChange,
417
- style: { height: 500 }
418
- },
419
- _react2.default.createElement(
420
- TabPane,
421
- { tab: '\u5355\u884C\u8F93\u5165\u6846', key: _inputConst.InputType.INPUT },
422
- _react2.default.createElement(_settingInput2.default, { ref: this.saveSettingInputRef,
423
- initFeature: initFeature.type == _inputConst.InputType.INPUT ? this.state.feature : null,
424
- onChange: this.handleInputChange
425
- })
426
- ),
427
- _react2.default.createElement(
428
- TabPane,
429
- { tab: '\u591A\u884C\u8F93\u5165\u6846', key: _inputConst.InputType.TEXTAREA },
430
- _react2.default.createElement(_settingTextarea2.default, { ref: this.saveSettingTextAreaRef,
431
- initFeature: initFeature.type == _inputConst.InputType.TEXTAREA ? this.state.feature : null,
432
- onChange: this.handleInputChange
433
- })
434
- ),
435
- _react2.default.createElement(
436
- TabPane,
437
- { tab: '\u4E0B\u62C9\u9009\u62E9\u5668', key: _inputConst.InputType.SEL },
438
- _react2.default.createElement(_settingSelect2.default, { ref: this.saveSettingSelectRef,
439
- initFeature: initFeature.type == _inputConst.InputType.SEL || initFeature.type == _inputConst.InputType.SELECT ? this.state.feature : null,
440
- onChange: this.handleInputChange,
441
- serverUrl: this.props.serverUrl,
442
- serverSign: this.props.serverSign
443
- })
444
- ),
445
- _react2.default.createElement(
446
- TabPane,
447
- { tab: '\u591A\u9009\u4E0B\u62C9\u9009\u62E9\u5668', key: _inputConst.InputType.MULTISELECT },
448
- _react2.default.createElement(_settingMultiSelect2.default, { ref: this.saveSettingMultiSelectRef,
449
- initFeature: initFeature.type == _inputConst.InputType.MULTISELECT ? this.state.feature : null,
450
- onChange: this.handleInputChange,
451
- serverUrl: this.props.serverUrl,
452
- serverSign: this.props.serverSign
453
- })
454
- ),
455
- _react2.default.createElement(
456
- TabPane,
457
- { tab: '\u7EA7\u8054\u4E0B\u62C9\u9009\u62E9\u5668', key: _inputConst.InputType.NHCASCADER },
458
- _react2.default.createElement(_settingNhcascader2.default, { ref: this.saveSettingNHCascaderRef,
459
- initFeature: initFeature.type == _inputConst.InputType.NHCASCADER ? this.state.feature : null,
460
- onChange: this.handleInputChange,
461
- serverUrl: this.props.serverUrl,
462
- serverSign: this.props.serverSign
463
- })
464
- ),
465
- _react2.default.createElement(
466
- TabPane,
467
- { tab: '\u5F00\u5173\u9009\u62E9\u5668', key: _inputConst.InputType.SWITCH },
468
- _react2.default.createElement(_settingSwitch2.default, { ref: this.saveSettingSwitchRef,
469
- initFeature: initFeature.type == _inputConst.InputType.SWITCH ? this.state.feature : null,
470
- onChange: this.handleInputChange
471
- })
472
- ),
473
- _react2.default.createElement(
474
- TabPane,
475
- { tab: '\u5355\u9009\u6846', key: _inputConst.InputType.RADIO },
476
- _react2.default.createElement(_settingRadio2.default, { ref: this.saveSettingRadioRef,
477
- initFeature: initFeature.type == _inputConst.InputType.RADIO ? this.state.feature : null,
478
- onChange: this.handleInputChange
479
- })
480
- ),
481
- _react2.default.createElement(
482
- TabPane,
483
- { tab: '\u590D\u9009\u6846', key: _inputConst.InputType.CHECKBOX },
484
- _react2.default.createElement(_settingCheckbox2.default, { ref: this.saveSettingCheckboxRef,
485
- initFeature: initFeature.type == _inputConst.InputType.CHECKBOX ? this.state.feature : null,
486
- onChange: this.handleInputChange,
487
- serverUrl: this.props.serverUrl,
488
- serverSign: this.props.serverSign
489
- })
490
- ),
491
- _react2.default.createElement(
492
- TabPane,
493
- { tab: '\u65E5\u671F\u9009\u62E9\u6846', key: _inputConst.InputType.DATEPICKER },
494
- _react2.default.createElement(_settingDatepicker2.default, { ref: this.saveSettingDatePickerRef,
495
- initFeature: initFeature.type == _inputConst.InputType.DATEPICKER ? this.state.feature : null,
496
- onChange: this.handleInputChange
497
- })
498
- ),
499
- _react2.default.createElement(
500
- TabPane,
501
- { tab: '\u6708\u4EFD\u9009\u62E9\u6846', key: _inputConst.InputType.MONTHPICKER },
502
- _react2.default.createElement(_settingMonthpicker2.default, { ref: this.saveSettingMonthPickerRef,
503
- initFeature: initFeature.type === _inputConst.InputType.MONTHPICKER ? this.state.feature : null,
504
- onChange: this.handleInputChange
505
- })
506
- ),
507
- _react2.default.createElement(
508
- TabPane,
509
- { tab: '\u65E5\u671F\u8303\u56F4\u9009\u62E9\u6846', key: _inputConst.InputType.RANGEPICKER },
510
- _react2.default.createElement(_settingRangepicker2.default, { ref: this.saveSettingRangePickerRef,
511
- initFeature: initFeature.type == _inputConst.InputType.RANGEPICKER ? this.state.feature : null,
512
- onChange: this.handleInputChange
513
- })
514
- ),
515
- _react2.default.createElement(
516
- TabPane,
517
- { tab: '\u65F6\u95F4\u9009\u62E9\u6846', key: _inputConst.InputType.TIMEPICKER },
518
- _react2.default.createElement(_settingTimepicker2.default, { ref: this.saveSettingTimePickerRef,
519
- initFeature: initFeature.type == _inputConst.InputType.TIMEPICKER ? this.state.feature : null,
520
- onChange: this.handleInputChange
521
- })
522
- ),
523
- _react2.default.createElement(
524
- TabPane,
525
- { tab: '\u65E5\u671F\u65F6\u95F4\u9009\u62E9\u6846', key: _inputConst.InputType.DATETIMEPICKER },
526
- _react2.default.createElement(_settingDatetimepicker2.default, { ref: this.saveSettingDateTimePickerRef,
527
- initFeature: initFeature.type == _inputConst.InputType.DATETIMEPICKER ? this.state.feature : null,
528
- onChange: this.handleInputChange
529
- })
530
- ),
531
- _react2.default.createElement(
532
- TabPane,
533
- { tab: '\u9644\u4EF6\u4E0A\u4F20', key: _inputConst.InputType.UPLOAD },
534
- _react2.default.createElement(_settingUpload2.default, { ref: this.saveSettingUploadRef,
535
- initFeature: initFeature.type == _inputConst.InputType.UPLOAD ? this.state.feature : null,
536
- onChange: this.handleInputChange
537
- })
538
- ),
539
- _react2.default.createElement(
540
- TabPane,
541
- { tab: '\u9644\u4EF6\u4E0A\u4F20(\u65E7\u7248\uFF0C\u6CA1\u6709\u9644\u4EF6\u4E3B\u8868)', key: _inputConst.InputType.OLDUPLOAD },
542
- _react2.default.createElement(_settingOldUpload2.default, { ref: this.saveSettingOldUploadRef,
543
- initFeature: initFeature.type == _inputConst.InputType.OLDUPLOAD ? this.state.feature : null,
544
- onChange: this.handleInputChange
545
- })
546
- ),
547
- _react2.default.createElement(
548
- TabPane,
549
- { tab: '\u6570\u5B57\u8F93\u5165\u6846', key: _inputConst.InputType.INPUTNUMBER },
550
- _react2.default.createElement(_settingInputNumber2.default, { ref: this.saveSettingInputNumberRef,
551
- initFeature: initFeature.type == _inputConst.InputType.INPUTNUMBER ? this.state.feature : null,
552
- onChange: this.handleInputChange
553
- })
554
- ),
555
- _react2.default.createElement(
556
- TabPane,
557
- { tab: '\u5B66\u751F\u9009\u62E9\u5668', key: _inputConst.InputType.STUSELECTOR },
558
- _react2.default.createElement(_settingStuSelector2.default, { ref: this.saveSettingStuSelectorRef,
559
- initFeature: initFeature.type == _inputConst.InputType.STUSELECTOR ? this.state.feature : null,
560
- onChange: this.handleInputChange,
561
- serverUrl: this.props.serverUrl,
562
- serverSign: this.props.serverSign
563
- })
564
- ),
565
- _react2.default.createElement(
566
- TabPane,
567
- { tab: '\u6559\u5E08\u9009\u62E9\u5668', key: _inputConst.InputType.TEASELECTOR },
568
- _react2.default.createElement(_settingTeaSelector2.default, { ref: this.saveSettingTeaSelectorRef,
569
- initFeature: initFeature.type == _inputConst.InputType.TEASELECTOR ? this.state.feature : null,
570
- onChange: this.handleInputChange,
571
- serverUrl: this.props.serverUrl,
572
- serverSign: this.props.serverSign
573
- })
574
- )
575
- )
576
- );
577
- }
578
- }]);
579
- return EditPage;
580
- }(_react2.default.Component);
581
-
582
- EditPage.defaultProps = {
583
- initFeature: '' //初始输入控件配置参数
584
- };
585
- exports.default = EditPage;