dlt-for-react 1.0.23 → 1.1.0

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 (213) hide show
  1. package/README.md +12 -2
  2. package/lib/components/Button/index.js +79 -0
  3. package/lib/components/HqSelector/HqLsrySelector/index.js +3 -5
  4. package/lib/components/HqSelector/HqRySelector/index.js +3 -5
  5. package/lib/components/HqSelector/HqWzSelector/index.js +3 -5
  6. package/lib/components/KyEditableTable/component.js +3 -5
  7. package/lib/components/KyEditableTable/index.js +7 -13
  8. package/lib/components/KyExcel/index.js +3 -5
  9. package/lib/components/KyInputPicker/render.js +13 -43
  10. package/lib/components/KyInputPicker/setting-checkbox.js +3 -5
  11. package/lib/components/KyInputPicker/setting-multiSelect.js +3 -5
  12. package/lib/components/KyInputPicker/setting-nhcascader.js +3 -5
  13. package/lib/components/KyInputPicker/setting-select.js +3 -5
  14. package/lib/components/KyInputPicker/setting-stu-selector.js +3 -5
  15. package/lib/components/KyInputPicker/setting-tea-selector.js +3 -5
  16. package/lib/components/KyTable/checkButtons.js +4 -7
  17. package/lib/components/KyTree/index.js +6 -16
  18. package/lib/components/KyUpload/index.js +13 -21
  19. package/lib/components/NHAuditPanel/config/Axios.js +263 -0
  20. package/lib/components/NHAuditPanel/config/api.js +479 -0
  21. package/lib/components/NHAuditPanel/config/data.js +156 -0
  22. package/lib/components/NHAuditPanel/config/typeMap.js +1234 -0
  23. package/lib/components/NHAuditPanel/config/uiValidate.js +92 -0
  24. package/lib/components/NHAuditPanel/index.js +413 -0
  25. package/lib/components/NHAuditPanel/node.js +619 -0
  26. package/lib/components/NHCascader/index.js +355 -0
  27. package/lib/components/NHCheckboxGroup/index.js +135 -0
  28. package/lib/components/NHDynamicFormShow/baseInfo/index.js +194 -0
  29. package/lib/components/NHDynamicFormShow/custom/index.js +553 -0
  30. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +43 -0
  31. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +1113 -0
  32. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +263 -0
  33. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +880 -0
  34. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +171 -0
  35. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +865 -0
  36. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +138 -0
  37. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +571 -0
  38. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +147 -0
  39. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +474 -0
  40. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +139 -0
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +506 -0
  42. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +143 -0
  43. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +1074 -0
  44. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +172 -0
  45. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +927 -0
  46. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +195 -0
  47. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +1064 -0
  48. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +183 -0
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +763 -0
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +137 -0
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +819 -0
  52. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +137 -0
  53. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +700 -0
  54. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +162 -0
  55. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +743 -0
  56. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +177 -0
  57. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +848 -0
  58. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +138 -0
  59. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +777 -0
  60. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +161 -0
  61. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +706 -0
  62. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +130 -0
  63. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +413 -0
  64. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +135 -0
  65. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +1013 -0
  66. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +175 -0
  67. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +1345 -0
  68. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +274 -0
  69. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +669 -0
  70. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +134 -0
  71. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +378 -0
  72. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +120 -0
  73. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +638 -0
  74. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +133 -0
  75. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +965 -0
  76. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +237 -0
  77. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +823 -0
  78. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +188 -0
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +401 -0
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +472 -0
  81. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +304 -0
  82. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +375 -0
  83. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +118 -0
  84. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +62 -0
  85. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +55 -0
  86. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +1238 -0
  87. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +375 -0
  88. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +554 -0
  89. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +130 -0
  90. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +542 -0
  91. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +133 -0
  92. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +575 -0
  93. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +130 -0
  94. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +563 -0
  95. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +133 -0
  96. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +745 -0
  97. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +164 -0
  98. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +587 -0
  99. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +143 -0
  100. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +743 -0
  101. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +172 -0
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +1410 -0
  103. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +274 -0
  104. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +755 -0
  105. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +130 -0
  106. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +814 -0
  107. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +188 -0
  108. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +769 -0
  109. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +130 -0
  110. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +1004 -0
  111. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +126 -0
  112. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +503 -0
  113. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +149 -0
  114. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +379 -0
  115. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +148 -0
  116. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +748 -0
  117. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +135 -0
  118. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +762 -0
  119. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +134 -0
  120. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +682 -0
  121. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +135 -0
  122. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +152 -0
  123. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +783 -0
  124. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +764 -0
  125. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +138 -0
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +677 -0
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +138 -0
  128. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +1173 -0
  129. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +242 -0
  130. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +862 -0
  131. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +201 -0
  132. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +196 -0
  133. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +167 -0
  134. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +1096 -0
  135. package/lib/components/NHDynamicFormShow/index.js +647 -0
  136. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +279 -0
  137. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +206 -0
  138. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +419 -0
  139. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +401 -0
  140. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +271 -0
  141. package/lib/components/NHImagePicker/index.js +554 -0
  142. package/lib/components/NHInputPicker/RadioGroup.js +118 -0
  143. package/lib/components/NHInputPicker/index.js +62 -0
  144. package/lib/components/NHInputPicker/input-const.js +55 -0
  145. package/lib/components/NHInputPicker/render.js +1271 -0
  146. package/lib/components/NHListView/index.js +374 -0
  147. package/lib/components/NHMapGeolocation/index.js +537 -0
  148. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +104 -0
  149. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +138 -0
  150. package/lib/components/NHMapGeolocation/style.js +51 -0
  151. package/lib/components/NHMultiSelect/index.js +272 -0
  152. package/lib/components/NHRadioGroup/index.js +118 -0
  153. package/lib/components/NHSelect/index.js +364 -0
  154. package/lib/components/NHTreeMenu/index.js +126 -0
  155. package/lib/components/NHTreeMenu/treeNode.js +164 -0
  156. package/lib/components/StuSelector/index.js +611 -0
  157. package/lib/index.js +161 -116
  158. package/lib/layouts/KyInputPicker/edit-page.js +585 -0
  159. package/lib/layouts/KyInputPicker/index.js +220 -0
  160. package/lib/layouts/KyInputPicker/input-const.js +134 -0
  161. package/lib/layouts/KyInputPicker/render.js +2477 -0
  162. package/lib/layouts/KyInputPicker/setting-checkbox.js +850 -0
  163. package/lib/layouts/KyInputPicker/setting-datepicker.js +430 -0
  164. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +443 -0
  165. package/lib/layouts/KyInputPicker/setting-input.js +555 -0
  166. package/lib/layouts/KyInputPicker/setting-inputNumber.js +612 -0
  167. package/lib/layouts/KyInputPicker/setting-monthpicker.js +434 -0
  168. package/lib/layouts/KyInputPicker/setting-multiSelect.js +532 -0
  169. package/lib/layouts/KyInputPicker/setting-nhcascader.js +584 -0
  170. package/lib/layouts/KyInputPicker/setting-old-upload.js +428 -0
  171. package/lib/layouts/KyInputPicker/setting-radio.js +468 -0
  172. package/lib/layouts/KyInputPicker/setting-rangepicker.js +466 -0
  173. package/lib/layouts/KyInputPicker/setting-select.js +534 -0
  174. package/lib/layouts/KyInputPicker/setting-stu-selector.js +507 -0
  175. package/lib/layouts/KyInputPicker/setting-switch.js +274 -0
  176. package/lib/layouts/KyInputPicker/setting-tea-selector.js +507 -0
  177. package/lib/layouts/KyInputPicker/setting-textarea.js +619 -0
  178. package/lib/layouts/KyInputPicker/setting-timepicker.js +437 -0
  179. package/lib/layouts/KyInputPicker/setting-upload.js +766 -0
  180. package/lib/layouts/KyModal/buildTitle.js +81 -0
  181. package/lib/layouts/KyModal/dragM.js +127 -0
  182. package/lib/layouts/KyModal/index.js +321 -0
  183. package/lib/layouts/KyPreview/index.js +219 -0
  184. package/lib/layouts/KyUpload/index.js +1155 -0
  185. package/lib/layouts/LeftMenu/index.js +5 -11
  186. package/lib/layouts/NavigationBar/index.js +4 -10
  187. package/lib/layouts/Top/editPassWord.js +5 -7
  188. package/lib/layouts/Top/index.js +6 -20
  189. package/lib/layouts/TopMenu/index.js +11 -14
  190. package/lib/layouts/layout/index.js +7 -13
  191. package/lib/layouts/{Login → login}/index-pre.js +3 -5
  192. package/lib/layouts/{Login → login}/index.js +6 -8
  193. package/lib/layouts/{Login → login}/login.js +8 -17
  194. package/lib/layouts/mixTop/index.js +13 -28
  195. package/lib/layouts/settingDrawer/index.js +3 -5
  196. package/lib/routes/AuthorizedRoute.js +7 -13
  197. package/lib/utils/NHCore.js +46 -2
  198. package/lib/utils/base64.js +238 -0
  199. package/lib/utils/browserJudge.js +33 -0
  200. package/lib/utils/common.js +18 -20
  201. package/lib/utils/createUuid.js +11 -31
  202. package/lib/utils/device.js +44 -0
  203. package/lib/utils/dynamicLoadCss.js +14 -0
  204. package/lib/utils/dynamicLoadJs.js +21 -0
  205. package/lib/utils/getLoginUser.js +1 -1
  206. package/lib/utils/getSize.js +2 -11
  207. package/lib/utils/getStyle.js +26 -0
  208. package/lib/utils/getSuitHeight.js +49 -0
  209. package/lib/utils/hasAuth.js +11 -0
  210. package/lib/utils/index.js +1 -34
  211. package/lib/utils/loadJS.js +40 -0
  212. package/package.json +1 -1
  213. /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
@@ -0,0 +1,766 @@
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 _tooltip = require('antd/lib/tooltip');
12
+
13
+ var _tooltip2 = _interopRequireDefault(_tooltip);
14
+
15
+ var _icon = require('antd/lib/icon');
16
+
17
+ var _icon2 = _interopRequireDefault(_icon);
18
+
19
+ var _select = require('antd/lib/select');
20
+
21
+ var _select2 = _interopRequireDefault(_select);
22
+
23
+ var _inputNumber = require('antd/lib/input-number');
24
+
25
+ var _inputNumber2 = _interopRequireDefault(_inputNumber);
26
+
27
+ var _row = require('antd/lib/row');
28
+
29
+ var _row2 = _interopRequireDefault(_row);
30
+
31
+ var _col = require('antd/lib/col');
32
+
33
+ var _col2 = _interopRequireDefault(_col);
34
+
35
+ var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
36
+
37
+ var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
38
+
39
+ var _extends2 = require('babel-runtime/helpers/extends');
40
+
41
+ var _extends3 = _interopRequireDefault(_extends2);
42
+
43
+ var _message2 = require('antd/lib/message');
44
+
45
+ var _message3 = _interopRequireDefault(_message2);
46
+
47
+ var _stringify = require('babel-runtime/core-js/json/stringify');
48
+
49
+ var _stringify2 = _interopRequireDefault(_stringify);
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/select/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
+ var _reactCustomScrollbars = require('react-custom-scrollbars');
100
+
101
+ var _KyUpload = require('../KyUpload');
102
+
103
+ var _KyUpload2 = _interopRequireDefault(_KyUpload);
104
+
105
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
106
+
107
+ var RadioGroup = _radio2.default.Group;
108
+
109
+ //文件上传默认最大值10M
110
+ var defaultFileSize = 10;
111
+
112
+ /**
113
+ * @author weishihuai
114
+ * @date 2018/8/2
115
+ * @time 14:26
116
+ * @Description: 文件上传控件配置组件
117
+ */
118
+
119
+ var SettingUpload = function (_React$Component) {
120
+ (0, _inherits3.default)(SettingUpload, _React$Component);
121
+
122
+ function SettingUpload(props) {
123
+ (0, _classCallCheck3.default)(this, SettingUpload);
124
+
125
+ var _this = (0, _possibleConstructorReturn3.default)(this, (SettingUpload.__proto__ || (0, _getPrototypeOf2.default)(SettingUpload)).call(this, props));
126
+
127
+ _this.getFeature = function () {
128
+ return _this.state.feature;
129
+ };
130
+
131
+ _this.createFeature = function (featureParams) {
132
+ try {
133
+ var feature = (0, _stringify2.default)(featureParams);
134
+ _this.setState({
135
+ feature: feature
136
+ });
137
+ _this.props.onChange(feature);
138
+ } catch (e) {
139
+ _message3.default.error('生成控件配置参数出错!');
140
+ }
141
+ };
142
+
143
+ _this.handleSizeChange = function (value) {
144
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
145
+ fp.size = value;
146
+ _this.setState({ fileSize: value, featureParams: fp });
147
+ _this.createFeature(fp);
148
+ };
149
+
150
+ _this.handleRequiredRadioChange = function (e) {
151
+ var required = e.target.value;
152
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
153
+ fp.required = required;
154
+ _this.setState({
155
+ featureParams: fp
156
+ });
157
+ _this.createFeature(fp);
158
+ };
159
+
160
+ _this.handleFileTypeRadioChange = function (e) {
161
+ var fileType = e.target.value;
162
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
163
+ fp.fileType = fileType;
164
+ fp.mode = 'file';
165
+ if (fileType === 'image') {
166
+ fp.validationValueType = 'array';
167
+ } else {
168
+ fp.validationValueType = 'string';
169
+ }
170
+ _this.setState({
171
+ featureParams: fp
172
+ });
173
+ _this.createFeature(fp);
174
+ };
175
+
176
+ _this.handeModeChange = function (value) {
177
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
178
+ fp.mode = value;
179
+ _this.setState({ featureParams: fp });
180
+ _this.createFeature(fp);
181
+ };
182
+
183
+ _this.handleNumberLimitChange = function (value) {
184
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
185
+ fp.numberLimit = value;
186
+ _this.setState({ featureParams: fp });
187
+ _this.createFeature(fp);
188
+ };
189
+
190
+ _this.handleServiceMark = function (e) {
191
+ var serviceMark = e.target.value;
192
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
193
+ fp.serviceMark = serviceMark;
194
+ _this.setState({ featureParams: fp });
195
+ _this.createFeature(fp);
196
+ };
197
+
198
+ _this.handleModuleName = function (e) {
199
+ var moduleName = e.target.value;
200
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
201
+ fp.moduleName = moduleName;
202
+ _this.setState({ featureParams: fp });
203
+ _this.createFeature(fp);
204
+ };
205
+
206
+ _this.handleFjzbid = function (e) {
207
+ var value = e.target.value;
208
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
209
+ fp.value = value;
210
+ _this.setState({ featureParams: fp });
211
+ _this.createFeature(fp);
212
+ };
213
+
214
+ _this.handleMs = function (e) {
215
+ var describe = e.target.value;
216
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
217
+ fp.describe = describe;
218
+ _this.setState({ featureParams: fp });
219
+ _this.createFeature(fp);
220
+ };
221
+
222
+ _this.handleFjzbm = function (e) {
223
+ var fileMainName = e.target.value;
224
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
225
+ fp.fileMainName = fileMainName;
226
+ _this.setState({ featureParams: fp });
227
+ _this.createFeature(fp);
228
+ };
229
+
230
+ _this.handleTemplateChange = function (value, list, listMap) {
231
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
232
+ fp.templateList = [].concat((0, _toConsumableArray3.default)(listMap));
233
+ fp.templateId = value; // 附件模板的附件主表id
234
+ _this.setState({ featureParams: fp });
235
+ _this.createFeature(fp);
236
+ // console.log(value,list,listMap)
237
+ };
238
+
239
+ _this.handleAcceptChange = function (e) {
240
+ var fp = (0, _extends3.default)({}, _this.state.featureParams);
241
+ fp.accept = e.target.value;
242
+ _this.setState({ featureParams: fp });
243
+ _this.createFeature(fp);
244
+ };
245
+
246
+ _this.state = {
247
+ feature: '', //原参数json字符串
248
+ fileSize: defaultFileSize,
249
+ featureParams: {
250
+ name: '上传控件',
251
+ size: defaultFileSize, //上传文件默认限制最大为10M
252
+ fileType: 'image', //文件类型
253
+ mode: 'file',
254
+ numberLimit: 1,
255
+ type: _inputConst.InputType.UPLOAD, //控件类型,必须有此属性,用于渲染时期判断控件类型
256
+ required: false, //是否必须(默认非必填)
257
+ validationValueType: 'array', //指定async-validator校验时值的类型(默认type是string,文件上传不能使用string,不然会报错form value is not string)
258
+ serviceMark: '', //服务标志,说明是属于哪个服务
259
+ moduleName: '', //模块名称,说明是属于哪个服务的哪个模块
260
+ value: '', //附件主表id
261
+ describe: '', //描述,对上传的附件的一个描述信息
262
+ featureParams: '' //附件主表名,存储该附件对应的主表的名称,主要是为了以后进行追溯
263
+ }
264
+ };
265
+ return _this;
266
+ }
267
+
268
+ (0, _createClass3.default)(SettingUpload, [{
269
+ key: 'componentWillMount',
270
+
271
+
272
+ //在渲染前调用,可在此最后一次初始化组件状态
273
+ value: function componentWillMount() {
274
+ //将输入控件配置参数设置到状态中
275
+ if (this.props.initFeature) {
276
+ try {
277
+ var initFeature = JSON.parse(this.props.initFeature);
278
+ if (initFeature.type == _inputConst.InputType.UPLOAD) {
279
+ //定义文件上传的参数默认值
280
+ var _initFeature$required = initFeature.required,
281
+ required = _initFeature$required === undefined ? false : _initFeature$required,
282
+ _initFeature$fileType = initFeature.fileType,
283
+ fileType = _initFeature$fileType === undefined ? 'image' : _initFeature$fileType,
284
+ _initFeature$size = initFeature.size,
285
+ size = _initFeature$size === undefined ? defaultFileSize : _initFeature$size,
286
+ _initFeature$numberLi = initFeature.numberLimit,
287
+ numberLimit = _initFeature$numberLi === undefined ? 1 : _initFeature$numberLi;
288
+
289
+ var fp = (0, _extends3.default)({}, this.state.featureParams);
290
+ fp.required = required;
291
+ fp.fileType = fileType;
292
+ fp.size = size;
293
+ fp.serviceMark = initFeature.serviceMark;
294
+ fp.moduleName = initFeature.moduleName;
295
+ fp.value = initFeature.value;
296
+ fp.describe = initFeature.describe;
297
+ fp.featureParams = initFeature.featureParams;
298
+ fp.templateId = initFeature.templateId;
299
+ fp.templateList = initFeature.templateList;
300
+ fp.accept = initFeature.accept;
301
+ fp.numberLimit = numberLimit;
302
+ this.setState({
303
+ feature: this.props.initFeature,
304
+ featureParams: fp
305
+ });
306
+ }
307
+ } catch (e) {
308
+ console.log(e);
309
+ _message3.default.error('解析控件配置参数出错!');
310
+ }
311
+ } else {
312
+ try {
313
+ var feature = (0, _stringify2.default)(this.state.featureParams);
314
+ this.setState({
315
+ feature: feature
316
+ });
317
+ } catch (e) {
318
+ console.log(e);
319
+ _message3.default.error('生成控件配置参数出错!');
320
+ }
321
+ }
322
+ }
323
+
324
+ //供父组件获取feature
325
+
326
+
327
+ //生成feature参数json字符串
328
+
329
+
330
+ //修改文件上传大小,同步更新控件参数
331
+
332
+
333
+ //切换是否必填,同步更新控件参数
334
+
335
+
336
+ //切换文件类型,同步更新控件参数
337
+
338
+ }, {
339
+ key: 'render',
340
+ value: function render() {
341
+ var fileSize = this.state.fileSize;
342
+ var _state$featureParams = this.state.featureParams,
343
+ required = _state$featureParams.required,
344
+ fileType = _state$featureParams.fileType,
345
+ mode = _state$featureParams.mode,
346
+ numberLimit = _state$featureParams.numberLimit,
347
+ serviceMark = _state$featureParams.serviceMark,
348
+ moduleName = _state$featureParams.moduleName,
349
+ value = _state$featureParams.value,
350
+ describe = _state$featureParams.describe,
351
+ fileMainName = _state$featureParams.fileMainName,
352
+ templateId = _state$featureParams.templateId,
353
+ accept = _state$featureParams.accept;
354
+
355
+ return _react2.default.createElement(
356
+ _reactCustomScrollbars.Scrollbars,
357
+ { style: { height: 500 } },
358
+ _react2.default.createElement(
359
+ 'div',
360
+ { id: 'input-setting-div' },
361
+ _react2.default.createElement(
362
+ _row2.default,
363
+ { type: 'flex' },
364
+ _react2.default.createElement(
365
+ _col2.default,
366
+ null,
367
+ _react2.default.createElement(
368
+ 'div',
369
+ { style: { margin: '16px 0' } },
370
+ '\u6587\u4EF6\u4E0A\u4F20\u914D\u7F6E\u4FE1\u606F'
371
+ )
372
+ )
373
+ ),
374
+ _react2.default.createElement(
375
+ _row2.default,
376
+ { type: 'flex' },
377
+ _react2.default.createElement(
378
+ _col2.default,
379
+ null,
380
+ _react2.default.createElement(
381
+ 'div',
382
+ { style: { margin: '16px 0' } },
383
+ '\u6587\u4EF6\u7C7B\u578B'
384
+ )
385
+ )
386
+ ),
387
+ _react2.default.createElement(
388
+ _row2.default,
389
+ { type: 'flex' },
390
+ _react2.default.createElement(
391
+ _col2.default,
392
+ null,
393
+ _react2.default.createElement(
394
+ RadioGroup,
395
+ { onChange: this.handleFileTypeRadioChange, value: fileType },
396
+ _react2.default.createElement(
397
+ _radio2.default,
398
+ { value: 'image' },
399
+ '\u56FE\u7247'
400
+ ),
401
+ _react2.default.createElement(
402
+ _radio2.default,
403
+ { value: 'file' },
404
+ '\u6587\u4EF6'
405
+ )
406
+ )
407
+ )
408
+ ),
409
+ _react2.default.createElement(
410
+ _row2.default,
411
+ { type: 'flex' },
412
+ _react2.default.createElement(
413
+ _col2.default,
414
+ null,
415
+ _react2.default.createElement(
416
+ 'div',
417
+ { style: { margin: '16px 0' } },
418
+ '\u6587\u4EF6\u4E0A\u4F20\u6700\u5927\u503C'
419
+ )
420
+ )
421
+ ),
422
+ _react2.default.createElement(
423
+ _row2.default,
424
+ { type: 'flex' },
425
+ _react2.default.createElement(
426
+ _col2.default,
427
+ null,
428
+ _react2.default.createElement(_inputNumber2.default, {
429
+ size: 'small',
430
+ min: 0,
431
+ formatter: function formatter(value) {
432
+ return value + 'M';
433
+ },
434
+ parser: function parser(value) {
435
+ return value.replace('M', '');
436
+ },
437
+ value: fileSize,
438
+ onChange: this.handleSizeChange
439
+ })
440
+ )
441
+ ),
442
+ _react2.default.createElement(
443
+ _row2.default,
444
+ { type: 'flex' },
445
+ _react2.default.createElement(
446
+ _col2.default,
447
+ null,
448
+ _react2.default.createElement(
449
+ 'div',
450
+ { style: { margin: '16px 0' } },
451
+ '\u4E0A\u4F20\u6A21\u5F0F'
452
+ )
453
+ )
454
+ ),
455
+ _react2.default.createElement(
456
+ _row2.default,
457
+ { type: 'flex' },
458
+ _react2.default.createElement(
459
+ _col2.default,
460
+ null,
461
+ _react2.default.createElement(
462
+ _select2.default,
463
+ { style: { width: 120 }, onChange: this.handeModeChange, value: mode },
464
+ _react2.default.createElement(
465
+ _select2.default.Option,
466
+ { value: 'file' },
467
+ 'file'
468
+ ),
469
+ _react2.default.createElement(
470
+ _select2.default.Option,
471
+ { value: 'redis' },
472
+ 'redis'
473
+ ),
474
+ fileType === 'image' ? _react2.default.createElement(
475
+ _select2.default.Option,
476
+ { value: 'base64' },
477
+ 'base64'
478
+ ) : null
479
+ )
480
+ )
481
+ ),
482
+ _react2.default.createElement(
483
+ _row2.default,
484
+ { align: 'middle', type: 'flex', style: { margin: '16px 0px 0px 0px' } },
485
+ _react2.default.createElement(
486
+ _col2.default,
487
+ { span: 8 },
488
+ '\u6587\u4EF6\u4E0A\u4F20\u4E2A\u6570\u9650\u5236\uFF1A'
489
+ ),
490
+ _react2.default.createElement(
491
+ _col2.default,
492
+ { span: 16 },
493
+ _react2.default.createElement(_inputNumber2.default, { value: numberLimit, min: 1, onChange: this.handleNumberLimitChange })
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
+ 'div',
504
+ { style: { margin: '16px 0' } },
505
+ '\u662F\u5426\u5FC5\u586B'
506
+ )
507
+ )
508
+ ),
509
+ _react2.default.createElement(
510
+ _row2.default,
511
+ { type: 'flex' },
512
+ _react2.default.createElement(
513
+ _col2.default,
514
+ null,
515
+ _react2.default.createElement(
516
+ RadioGroup,
517
+ { onChange: this.handleRequiredRadioChange, value: required },
518
+ _react2.default.createElement(
519
+ _radio2.default,
520
+ { value: false },
521
+ '\u975E\u5FC5\u586B'
522
+ ),
523
+ _react2.default.createElement(
524
+ _radio2.default,
525
+ { value: true },
526
+ '\u5FC5\u586B'
527
+ )
528
+ )
529
+ )
530
+ ),
531
+ _react2.default.createElement(
532
+ _row2.default,
533
+ { type: 'flex' },
534
+ _react2.default.createElement(
535
+ _col2.default,
536
+ null,
537
+ _react2.default.createElement(
538
+ 'div',
539
+ { style: { margin: '16px 0' } },
540
+ '\u9644\u4EF6\u6A21\u677F',
541
+ ' ',
542
+ _react2.default.createElement(
543
+ _tooltip2.default,
544
+ { title: '提供给学生上传附件的模板', placement: 'top' },
545
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
546
+ )
547
+ )
548
+ )
549
+ ),
550
+ _react2.default.createElement(
551
+ _row2.default,
552
+ { type: 'flex' },
553
+ _react2.default.createElement(
554
+ _col2.default,
555
+ { span: 16 },
556
+ _react2.default.createElement(NHUpload, {
557
+ serviceMark: 'sm-dynamic-form',
558
+ moduleName: '\u52A8\u6001\u8868\u5355\u9644\u4EF6\u6A21\u677F',
559
+ defaultEffective: true,
560
+ onChange: this.handleTemplateChange,
561
+ value: templateId
562
+ })
563
+ )
564
+ ),
565
+ _react2.default.createElement(
566
+ _row2.default,
567
+ { type: 'flex' },
568
+ _react2.default.createElement(
569
+ _col2.default,
570
+ null,
571
+ _react2.default.createElement(
572
+ 'div',
573
+ { style: { margin: '16px 0' } },
574
+ _react2.default.createElement(
575
+ 'a',
576
+ { href: 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept' },
577
+ '\u6587\u4EF6\u7C7B\u578B'
578
+ )
579
+ )
580
+ )
581
+ ),
582
+ _react2.default.createElement(
583
+ _row2.default,
584
+ { type: 'flex' },
585
+ _react2.default.createElement(
586
+ _col2.default,
587
+ { span: 16 },
588
+ _react2.default.createElement(_input2.default, { onChange: this.handleAcceptChange, value: accept })
589
+ )
590
+ ),
591
+ _react2.default.createElement(
592
+ _row2.default,
593
+ { type: 'flex' },
594
+ _react2.default.createElement(
595
+ _col2.default,
596
+ null,
597
+ _react2.default.createElement(
598
+ 'div',
599
+ { style: { margin: '16px 0' } },
600
+ _react2.default.createElement(
601
+ 'font',
602
+ { color: 'red' },
603
+ '*'
604
+ ),
605
+ '\u670D\u52A1\u6807\u5FD7',
606
+ ' ',
607
+ _react2.default.createElement(
608
+ _tooltip2.default,
609
+ { title: '说明是属于哪个服务', placement: 'top' },
610
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
611
+ )
612
+ )
613
+ )
614
+ ),
615
+ _react2.default.createElement(
616
+ _row2.default,
617
+ { align: 'middle', type: 'flex' },
618
+ _react2.default.createElement(
619
+ _col2.default,
620
+ { span: 16 },
621
+ _react2.default.createElement(_input2.default, {
622
+ placeholder: '\u8BF7\u8F93\u5165\u670D\u52A1\u6807\u5FD7',
623
+ onChange: this.handleServiceMark,
624
+ value: serviceMark
625
+ })
626
+ )
627
+ ),
628
+ _react2.default.createElement(
629
+ _row2.default,
630
+ { type: 'flex' },
631
+ _react2.default.createElement(
632
+ _col2.default,
633
+ null,
634
+ _react2.default.createElement(
635
+ 'div',
636
+ { style: { margin: '16px 0' } },
637
+ _react2.default.createElement(
638
+ 'font',
639
+ { color: 'red' },
640
+ '*'
641
+ ),
642
+ '\u6A21\u5757\u540D\u79F0',
643
+ ' ',
644
+ _react2.default.createElement(
645
+ _tooltip2.default,
646
+ { title: '说明是属于哪个服务的哪个模块', placement: 'top' },
647
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
648
+ )
649
+ )
650
+ )
651
+ ),
652
+ _react2.default.createElement(
653
+ _row2.default,
654
+ { type: 'flex' },
655
+ _react2.default.createElement(
656
+ _col2.default,
657
+ { span: 16 },
658
+ _react2.default.createElement(_input2.default, {
659
+ placeholder: '\u8BF7\u8F93\u5165\u6A21\u5757\u540D\u79F0',
660
+ onChange: this.handleModuleName,
661
+ value: moduleName
662
+ })
663
+ )
664
+ ),
665
+ _react2.default.createElement(
666
+ _row2.default,
667
+ { type: 'flex' },
668
+ _react2.default.createElement(
669
+ _col2.default,
670
+ null,
671
+ _react2.default.createElement(
672
+ 'div',
673
+ { style: { margin: '16px 0' } },
674
+ '\u9644\u4EF6\u4E3B\u8868id',
675
+ ' ',
676
+ _react2.default.createElement(
677
+ _tooltip2.default,
678
+ { title: '根据id显示已经有的附件内容', placement: 'top' },
679
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
680
+ )
681
+ )
682
+ )
683
+ ),
684
+ _react2.default.createElement(
685
+ _row2.default,
686
+ { type: 'flex' },
687
+ _react2.default.createElement(
688
+ _col2.default,
689
+ { span: 16 },
690
+ _react2.default.createElement(_input2.default, { placeholder: '\u8BF7\u8F93\u5165\u9644\u4EF6\u4E3B\u8868id', onChange: this.handleFjzbid, value: value })
691
+ )
692
+ ),
693
+ _react2.default.createElement(
694
+ _row2.default,
695
+ { type: 'flex' },
696
+ _react2.default.createElement(
697
+ _col2.default,
698
+ null,
699
+ _react2.default.createElement(
700
+ 'div',
701
+ { style: { margin: '16px 0' } },
702
+ '\u9644\u4EF6\u63CF\u8FF0',
703
+ ' ',
704
+ _react2.default.createElement(
705
+ _tooltip2.default,
706
+ { title: '对上传的附件的一个描述信息', placement: 'top' },
707
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
708
+ )
709
+ )
710
+ )
711
+ ),
712
+ _react2.default.createElement(
713
+ _row2.default,
714
+ { type: 'flex' },
715
+ _react2.default.createElement(
716
+ _col2.default,
717
+ { span: 16 },
718
+ _react2.default.createElement(_input2.default, { placeholder: '\u8BF7\u8F93\u5165\u9644\u4EF6\u63CF\u8FF0', onChange: this.handleMs, value: describe })
719
+ )
720
+ ),
721
+ _react2.default.createElement(
722
+ _row2.default,
723
+ { type: 'flex' },
724
+ _react2.default.createElement(
725
+ _col2.default,
726
+ null,
727
+ _react2.default.createElement(
728
+ 'div',
729
+ { style: { margin: '16px 0' } },
730
+ '\u9644\u4EF6\u4E3B\u8868\u540D',
731
+ ' ',
732
+ _react2.default.createElement(
733
+ _tooltip2.default,
734
+ {
735
+ title: '存储该附件对应的主表的名称,主要是为了以后进行追溯',
736
+ placement: 'top'
737
+ },
738
+ _react2.default.createElement(_icon2.default, { type: 'question-circle' })
739
+ )
740
+ )
741
+ )
742
+ ),
743
+ _react2.default.createElement(
744
+ _row2.default,
745
+ { type: 'flex' },
746
+ _react2.default.createElement(
747
+ _col2.default,
748
+ { span: 16 },
749
+ _react2.default.createElement(_input2.default, {
750
+ placeholder: '\u8BF7\u8F93\u5165\u9644\u4EF6\u4E3B\u8868\u540D',
751
+ onChange: this.handleFjzbm,
752
+ value: fileMainName
753
+ })
754
+ )
755
+ )
756
+ )
757
+ );
758
+ }
759
+ }]);
760
+ return SettingUpload;
761
+ }(_react2.default.Component);
762
+
763
+ SettingUpload.defaultProps = {
764
+ initFeature: ''
765
+ };
766
+ exports.default = SettingUpload;