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,584 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _input = require('antd/lib/input');
8
-
9
- var _input2 = _interopRequireDefault(_input);
10
-
11
- var _NHSelect2 = require('xgui-for-react/lib/components/NHSelect');
12
-
13
- var _NHSelect3 = _interopRequireDefault(_NHSelect2);
14
-
15
- var _tooltip = require('antd/lib/tooltip');
16
-
17
- var _tooltip2 = _interopRequireDefault(_tooltip);
18
-
19
- var _icon = require('antd/lib/icon');
20
-
21
- var _icon2 = _interopRequireDefault(_icon);
22
-
23
- var _checkbox = require('antd/lib/checkbox');
24
-
25
- var _checkbox2 = _interopRequireDefault(_checkbox);
26
-
27
- var _inputNumber = require('antd/lib/input-number');
28
-
29
- var _inputNumber2 = _interopRequireDefault(_inputNumber);
30
-
31
- var _row = require('antd/lib/row');
32
-
33
- var _row2 = _interopRequireDefault(_row);
34
-
35
- var _col = require('antd/lib/col');
36
-
37
- var _col2 = _interopRequireDefault(_col);
38
-
39
- var _message2 = require('antd/lib/message');
40
-
41
- var _message3 = _interopRequireDefault(_message2);
42
-
43
- var _stringify = require('babel-runtime/core-js/json/stringify');
44
-
45
- var _stringify2 = _interopRequireDefault(_stringify);
46
-
47
- var _extends2 = require('babel-runtime/helpers/extends');
48
-
49
- var _extends3 = _interopRequireDefault(_extends2);
50
-
51
- var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
52
-
53
- var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
54
-
55
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
56
-
57
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
58
-
59
- var _createClass2 = require('babel-runtime/helpers/createClass');
60
-
61
- var _createClass3 = _interopRequireDefault(_createClass2);
62
-
63
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
64
-
65
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
66
-
67
- var _inherits2 = require('babel-runtime/helpers/inherits');
68
-
69
- var _inherits3 = _interopRequireDefault(_inherits2);
70
-
71
- var _radio = require('antd/lib/radio');
72
-
73
- var _radio2 = _interopRequireDefault(_radio);
74
-
75
- require('antd/lib/input/style');
76
-
77
- require('antd/lib/tooltip/style');
78
-
79
- require('antd/lib/icon/style');
80
-
81
- require('antd/lib/checkbox/style');
82
-
83
- require('antd/lib/input-number/style');
84
-
85
- require('antd/lib/row/style');
86
-
87
- require('antd/lib/col/style');
88
-
89
- require('antd/lib/message/style');
90
-
91
- require('antd/lib/radio/style');
92
-
93
- var _react = require('react');
94
-
95
- var _react2 = _interopRequireDefault(_react);
96
-
97
- var _inputConst = require('./input-const');
98
-
99
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
100
-
101
- var RadioGroup = _radio2.default.Group;
102
-
103
- //最小宽度
104
- var minWidth = 1;
105
-
106
- /*
107
- * @Description:
108
- * @Author: zengweijin
109
- * @LastEditors: zengweijin
110
- * @Date: 2019-04-22 13:52:24
111
- * @LastEditTime: 2019-04-22 13:53:48
112
- */
113
-
114
- var SettingNHCascader = function (_React$Component) {
115
- (0, _inherits3.default)(SettingNHCascader, _React$Component);
116
-
117
- function SettingNHCascader(props) {
118
- (0, _classCallCheck3.default)(this, SettingNHCascader);
119
-
120
- var _this = (0, _possibleConstructorReturn3.default)(this, (SettingNHCascader.__proto__ || (0, _getPrototypeOf2.default)(SettingNHCascader)).call(this, props));
121
-
122
- _this.getFeature = function () {
123
- return _this.state.feature;
124
- };
125
-
126
- _this.handleWidthRadioChange = function (e) {
127
- var widthType = e.target.value;
128
-
129
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
130
- fp.widthType = widthType;
131
- fp.widthStr = '';
132
-
133
- _this.setState({ width: '', featureParams: fp });
134
- _this.createFeature(fp);
135
- };
136
-
137
- _this.handleWidthChange = function (value) {
138
- var widthStr = void 0;
139
- var widthType = _this.state.featureParams.widthType;
140
-
141
- if (widthType == _inputConst.WidthType.RELATIVE) {
142
- widthStr = value + '%';
143
- } else if (widthType == _inputConst.WidthType.FIXED) {
144
- widthStr = value + 'px';
145
- } else {
146
- widthStr = '';
147
- }
148
-
149
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
150
- fp.widthStr = widthStr;
151
-
152
- _this.setState({ width: value, featureParams: fp });
153
- _this.createFeature(fp);
154
- };
155
-
156
- _this.handleDataTagChange = function (e) {
157
- var dataTag = e.target.value;
158
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
159
- if (dataTag.length > 0) {
160
- //只能输入英文
161
- var en_characters_pattern = new RegExp(_inputConst.RegularExpression.EN_NUMBER_UNDERLINE.pattern);
162
- if (!en_characters_pattern.test(dataTag)) {
163
- dataTag = '';
164
- } else {
165
- //dataTag = dataTag.toLowerCase(); //将英文字母统一转换为小写
166
- }
167
- }
168
- fp.dataTag = dataTag;
169
- _this.setState({ featureParams: fp });
170
- _this.createFeature(fp);
171
- };
172
-
173
- _this.handleRequiredRadioChange = function (e) {
174
- var required = e.target.value;
175
-
176
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
177
- fp.required = required;
178
-
179
- _this.setState({ featureParams: fp });
180
- _this.createFeature(fp);
181
- };
182
-
183
- _this.handleDefaultValueChange = function (e) {
184
- var defaultValue = e.target.value;
185
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
186
- fp.defaultValue = defaultValue.split(',');
187
- _this.setState({ featureParams: fp });
188
- _this.createFeature(fp);
189
- };
190
-
191
- _this.createFeature = function (featureParams) {
192
- try {
193
- var feature = (0, _stringify2.default)(featureParams);
194
- _this.setState({
195
- feature: feature
196
- });
197
- _this.props.onChange(feature);
198
- } catch (e) {
199
- console.log(e);
200
- _message3.default.error('生成控件配置参数出错!');
201
- }
202
- };
203
-
204
- _this.radioChange = function (e) {
205
- var value = e.target.checked;
206
- _this.setState({ showSelect: value });
207
- };
208
-
209
- _this.cascadeV5Change = function (e) {
210
- var value = e.target.checked;
211
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
212
- fp.threeOrMoreCascade = value;
213
- _this.setState({ featureParams: fp });
214
- _this.createFeature(fp);
215
- };
216
-
217
- _this.selectChange = function (v) {
218
- var fp = (0, _extends3.default)({}, _this.state.featureParams);
219
- fp.baseUrl = v;
220
- _this.setState({ featureParams: fp });
221
- _this.createFeature(fp);
222
- };
223
-
224
- _this.state = {
225
- feature: '', //原参数json字符串
226
- width: minWidth, //设置的宽度值,初始为最小宽度值
227
- featureParams: {
228
- name: '级联下拉选择器组件',
229
- type: _inputConst.InputType.NHCASCADER, //控件类型,必须有此属性,用于渲染时期判断控件类型
230
- widthType: _inputConst.WidthType.DEFAULT, //宽度类型:自适应'default'、百分比'relative'、固定值'fixed'
231
- widthStr: '', //input宽度值
232
- dataTag: '', //下拉数据标识
233
- required: false, //是否必须
234
- defaultValue: [], //默认值
235
- validationValueType: 'array', //用于校验的值的类型
236
- baseUrl: null, // 服务api前缀
237
- changeOnSelect: false, // 是否点击每级选项都会发生变化
238
- threeOrMoreCascade: false // 是否支持三级以上级联(即antd-mobile V5版本Cascader)
239
- },
240
- showSelect: false
241
- };
242
- return _this;
243
- }
244
-
245
- (0, _createClass3.default)(SettingNHCascader, [{
246
- key: 'componentWillMount',
247
-
248
-
249
- //在渲染前调用,可在此最后一次初始化组件状态
250
- value: function componentWillMount() {
251
- //将输入控件配置参数设置到状态中
252
- if (this.props.initFeature) {
253
- try {
254
- var initFeature = JSON.parse(this.props.initFeature);
255
- if (initFeature.type == _inputConst.InputType.NHCASCADER) {
256
- var widthType = initFeature.widthType,
257
- _initFeature$widthStr = initFeature.widthStr,
258
- widthStr = _initFeature$widthStr === undefined ? '' : _initFeature$widthStr,
259
- _initFeature$dataTag = initFeature.dataTag,
260
- dataTag = _initFeature$dataTag === undefined ? '' : _initFeature$dataTag,
261
- _initFeature$required = initFeature.required,
262
- required = _initFeature$required === undefined ? false : _initFeature$required,
263
- _initFeature$defaultV = initFeature.defaultValue,
264
- defaultValue = _initFeature$defaultV === undefined ? [] : _initFeature$defaultV,
265
- baseUrl = initFeature.baseUrl,
266
- _initFeature$threeOrM = initFeature.threeOrMoreCascade,
267
- threeOrMoreCascade = _initFeature$threeOrM === undefined ? false : _initFeature$threeOrM;
268
-
269
- var width = '';
270
-
271
- if (widthType == _inputConst.WidthType.RELATIVE) {
272
- width = widthStr.replace('%', '');
273
- } else if (widthType == _inputConst.WidthType.FIXED) {
274
- width = widthStr.replace('px', '');
275
- }
276
-
277
- var fp = (0, _extends3.default)({}, this.state.featureParams);
278
- fp.widthType = widthType;
279
- fp.widthStr = widthStr;
280
- fp.dataTag = dataTag;
281
- fp.required = required;
282
- fp.defaultValue = defaultValue;
283
- fp.baseUrl = baseUrl;
284
- fp.threeOrMoreCascade = threeOrMoreCascade;
285
-
286
- this.setState({
287
- feature: this.props.initFeature,
288
- width: width,
289
- featureParams: fp
290
- });
291
- }
292
- } catch (e) {
293
- console.log(e);
294
- _message3.default.error('解析控件配置参数出错!');
295
- }
296
- } else {
297
- try {
298
- var feature = (0, _stringify2.default)(this.state.featureParams);
299
- this.setState({
300
- feature: feature
301
- });
302
- } catch (e) {
303
- console.log(e);
304
- _message3.default.error('生成控件配置参数出错!');
305
- }
306
- }
307
- }
308
-
309
- //供父组件获取feature
310
-
311
-
312
- //切换宽度类型radio时回调,清空之前的值
313
-
314
-
315
- //宽度值改变的时候,同步更新状态参数
316
-
317
-
318
- //当下拉数据标识改变时
319
-
320
-
321
- //当是否必填改变时
322
-
323
-
324
- //当输入默认值改变时
325
-
326
-
327
- //生成feature参数json字符串
328
-
329
- }, {
330
- key: 'render',
331
-
332
-
333
- // handleChangeOnSelectRadioChange = (e)=>{
334
- // let changeOnSelect = e.target.value;
335
-
336
- // const fp = { ...this.state.featureParams };
337
- // fp.changeOnSelect = changeOnSelect;
338
-
339
- // this.setState({ featureParams: fp });
340
- // this.createFeature(fp);
341
- // }
342
- value: function render() {
343
- var width = this.state.width;
344
- var _state$featureParams = this.state.featureParams,
345
- widthType = _state$featureParams.widthType,
346
- dataTag = _state$featureParams.dataTag,
347
- required = _state$featureParams.required,
348
- defaultValue = _state$featureParams.defaultValue,
349
- changeOnSelect = _state$featureParams.changeOnSelect,
350
- baseUrl = _state$featureParams.baseUrl,
351
- threeOrMoreCascade = _state$featureParams.threeOrMoreCascade;
352
-
353
- var showSelectFlag = this.state.showSelect === true || baseUrl !== undefined && baseUrl !== null && baseUrl !== '';
354
- return _react2.default.createElement(
355
- 'div',
356
- { id: 'input-setting-div' },
357
- _react2.default.createElement(
358
- _row2.default,
359
- { type: 'flex' },
360
- _react2.default.createElement(
361
- _col2.default,
362
- null,
363
- _react2.default.createElement(
364
- 'div',
365
- { style: { margin: '16px 0' } },
366
- '\u5BBD\u5EA6'
367
- )
368
- )
369
- ),
370
- _react2.default.createElement(
371
- _row2.default,
372
- { type: 'flex' },
373
- _react2.default.createElement(
374
- _col2.default,
375
- null,
376
- _react2.default.createElement(
377
- RadioGroup,
378
- {
379
- onChange: this.handleWidthRadioChange,
380
- name: 'widthradiogroup',
381
- value: widthType
382
- },
383
- _react2.default.createElement(
384
- _radio2.default,
385
- { value: _inputConst.WidthType.DEFAULT },
386
- '\u81EA\u9002\u5E94'
387
- ),
388
- _react2.default.createElement(
389
- _radio2.default,
390
- { value: _inputConst.WidthType.RELATIVE },
391
- '\u767E\u5206\u6BD4'
392
- ),
393
- _react2.default.createElement(
394
- _radio2.default,
395
- { value: _inputConst.WidthType.FIXED },
396
- '\u56FA\u5B9A\u5BBD\u5EA6'
397
- )
398
- )
399
- ),
400
- _react2.default.createElement(
401
- _col2.default,
402
- null,
403
- widthType == _inputConst.WidthType.RELATIVE ? _react2.default.createElement(_inputNumber2.default, {
404
- size: 'small',
405
- min: minWidth,
406
- formatter: function formatter(value) {
407
- return value + '%';
408
- },
409
- parser: function parser(value) {
410
- return value.replace('%', '');
411
- },
412
- onChange: this.handleWidthChange,
413
- value: width
414
- }) : widthType == _inputConst.WidthType.FIXED ? _react2.default.createElement(_inputNumber2.default, {
415
- size: 'small',
416
- min: minWidth,
417
- formatter: function formatter(value) {
418
- return value + 'px';
419
- },
420
- parser: function parser(value) {
421
- return value.replace('px', '');
422
- },
423
- onChange: this.handleWidthChange,
424
- value: width
425
- }) : null
426
- )
427
- ),
428
- _react2.default.createElement(
429
- _row2.default,
430
- { type: 'flex' },
431
- _react2.default.createElement(
432
- _col2.default,
433
- null,
434
- _react2.default.createElement(
435
- 'div',
436
- { style: { margin: '16px 0' } },
437
- '\u4E0B\u62C9\u6570\u636E\u6807\u8BC6'
438
- )
439
- )
440
- ),
441
- _react2.default.createElement(
442
- _row2.default,
443
- { gutter: 8 },
444
- _react2.default.createElement(
445
- _col2.default,
446
- { span: 6 },
447
- _react2.default.createElement(
448
- _checkbox2.default,
449
- { onChange: this.radioChange, checked: showSelectFlag },
450
- '\u6307\u5B9A\u670D\u52A1'
451
- ),
452
- _react2.default.createElement(
453
- _tooltip2.default,
454
- { title: '不指定服务的情况下默认使用当前服务', placement: 'top' },
455
- _react2.default.createElement(_icon2.default, { type: 'question-circle' })
456
- )
457
- ),
458
- _react2.default.createElement(
459
- _col2.default,
460
- { span: 18 },
461
- showSelectFlag && _react2.default.createElement(_NHSelect3.default, {
462
- style: { marginLeft: 6, width: '200px' },
463
- onChange: this.selectChange,
464
- value: baseUrl,
465
- baseUrl: this.props.serverUrl || 'api/zhxg-xtgl',
466
- sign: this.props.serverSign || 'zhxg_server_select'
467
- })
468
- )
469
- ),
470
- _react2.default.createElement(
471
- _row2.default,
472
- { type: 'flex', style: { marginTop: 10 } },
473
- _react2.default.createElement(
474
- _col2.default,
475
- { span: 12 },
476
- _react2.default.createElement(_input2.default, {
477
- placeholder: '\u8BF7\u8F93\u5165\u4E0B\u62C9\u6570\u636E\u82F1\u6587\u5B57\u6BCD\u6807\u8BC6',
478
- value: dataTag,
479
- onChange: this.handleDataTagChange
480
- })
481
- )
482
- ),
483
- _react2.default.createElement(
484
- _row2.default,
485
- { type: 'flex' },
486
- _react2.default.createElement(
487
- _col2.default,
488
- null,
489
- _react2.default.createElement(
490
- 'div',
491
- { style: { margin: '16px 0' } },
492
- '\u662F\u5426\u5FC5\u586B'
493
- )
494
- )
495
- ),
496
- _react2.default.createElement(
497
- _row2.default,
498
- { type: 'flex' },
499
- _react2.default.createElement(
500
- _col2.default,
501
- null,
502
- _react2.default.createElement(
503
- RadioGroup,
504
- {
505
- onChange: this.handleRequiredRadioChange,
506
- name: 'requiredradiogroup',
507
- value: required
508
- },
509
- _react2.default.createElement(
510
- _radio2.default,
511
- { value: false },
512
- '\u975E\u5FC5\u586B'
513
- ),
514
- _react2.default.createElement(
515
- _radio2.default,
516
- { value: true },
517
- '\u5FC5\u586B'
518
- )
519
- )
520
- )
521
- ),
522
- _react2.default.createElement(
523
- _row2.default,
524
- { type: 'flex' },
525
- _react2.default.createElement(
526
- _col2.default,
527
- null,
528
- _react2.default.createElement(
529
- 'div',
530
- { style: { margin: '16px 0' } },
531
- '\u79FB\u52A8\u7AEF\u7279\u6027'
532
- )
533
- )
534
- ),
535
- _react2.default.createElement(
536
- _row2.default,
537
- { gutter: 8 },
538
- _react2.default.createElement(
539
- _col2.default,
540
- { span: 6 },
541
- _react2.default.createElement(
542
- _checkbox2.default,
543
- { onChange: this.cascadeV5Change, checked: threeOrMoreCascade },
544
- '\u652F\u6301\u4E09\u7EA7\u4EE5\u4E0A\u7EA7\u8054'
545
- )
546
- )
547
- ),
548
- _react2.default.createElement(
549
- _row2.default,
550
- { type: 'flex' },
551
- _react2.default.createElement(
552
- _col2.default,
553
- { span: 24 },
554
- _react2.default.createElement(
555
- 'div',
556
- { style: { margin: '16px 0' } },
557
- '\u9ED8\u8BA4\u503C'
558
- )
559
- )
560
- ),
561
- _react2.default.createElement(
562
- _row2.default,
563
- { type: 'flex' },
564
- _react2.default.createElement(
565
- _col2.default,
566
- { span: 12 },
567
- _react2.default.createElement(_input2.default.TextArea, {
568
- rows: 4,
569
- placeholder: '\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C,\u591A\u4E2A\u4F7F\u7528\u201C\uFF0C\u201D\u5206\u9694',
570
- onChange: this.handleDefaultValueChange,
571
- value: defaultValue.join(',')
572
- })
573
- )
574
- )
575
- );
576
- }
577
- }]);
578
- return SettingNHCascader;
579
- }(_react2.default.Component);
580
-
581
- SettingNHCascader.defaultProps = {
582
- initFeature: ''
583
- };
584
- exports.default = SettingNHCascader;