cloud-b2b 1.1.59 → 1.1.61

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 (314) hide show
  1. package/es/Area/Area.js +141 -0
  2. package/es/Card/Card.js +19 -0
  3. package/es/CodeInput/CodeInput.js +123 -0
  4. package/es/Control/Control.js +444 -0
  5. package/es/Control/event.js +43 -0
  6. package/es/Enhance/Dialogs.js +52 -0
  7. package/es/Enhance/Loading.js +131 -0
  8. package/{src → es}/Enhance/index.js +6 -8
  9. package/es/Header/Header.js +162 -0
  10. package/es/Header/Vertical.js +106 -0
  11. package/es/ImageView/ImageView.js +100 -0
  12. package/es/Indent/Indent.js +19 -0
  13. package/es/InpurCascader/InputCascader.js +117 -0
  14. package/es/InputEditor/InputEditor.js +173 -0
  15. package/es/InputSearch/InputSearch.js +266 -0
  16. package/es/InputSelect/InputSelect.js +160 -0
  17. package/es/InputTreeSelect/InputTreeSelect.js +121 -0
  18. package/es/InputWriting/InputWriting.js +85 -0
  19. package/es/Layout/Layout.js +201 -0
  20. package/es/LayoutLink/LayoutLink.js +73 -0
  21. package/es/Link/Link.js +85 -0
  22. package/es/Loading/Loading.js +13 -0
  23. package/es/Loading2/Loading2.js +9 -0
  24. package/es/ModalWithDrag/ModalWithDrag.js +29 -0
  25. package/{src → es}/ModalWithDrag/drag.js +116 -128
  26. package/es/NumberInput/NumberInput.js +200 -0
  27. package/es/Search/Search.js +497 -0
  28. package/es/Search2/Search.js +597 -0
  29. package/{src → es}/Search2/Search.less +0 -1
  30. package/es/Sidebar/Sidebar.js +144 -0
  31. package/es/Sidebar2/Sidebar.js +165 -0
  32. package/es/SuperForm/SuperForm.js +598 -0
  33. package/es/SuperForm2/SuperForm.js +687 -0
  34. package/es/SuperIcon/SuperIcon.js +27 -0
  35. package/es/SuperPagination/SuperPagination.js +109 -0
  36. package/es/SuperTab/SuperTab.js +107 -0
  37. package/es/SuperTab2/SuperTab2.js +145 -0
  38. package/es/SuperTable/DragSortRow.js +97 -0
  39. package/es/SuperTable/FilterDropDown.js +164 -0
  40. package/es/SuperTable/SuperTable.js +808 -0
  41. package/es/SuperTable/fixed.js +34 -0
  42. package/es/SuperTable2/SuperTable2.js +926 -0
  43. package/{src → es}/SuperTable2/SuperTable2.less +2 -1
  44. package/es/SuperTable2/SuperTableCell.js +234 -0
  45. package/es/SuperTable3/FilterDropDown.js +164 -0
  46. package/es/SuperTable3/SuperTable.js +665 -0
  47. package/es/SuperTable3/fixed.js +34 -0
  48. package/es/SuperToolbar/SuperToolbar.js +195 -0
  49. package/es/SuperUpload/SuperUpload.js +356 -0
  50. package/es/Title/Title.js +33 -0
  51. package/es/Viewer/ImageViews.js +258 -0
  52. package/es/Viewer/Viewer.js +122 -0
  53. package/es/WingBlank/WingBlank.js +16 -0
  54. package/es/helper.js +240 -0
  55. package/{src → es}/history.js +6 -6
  56. package/es/index.js +38 -0
  57. package/{src → es}/style.less +2 -1
  58. package/es/variables.js +6 -0
  59. package/lib/Area/Area.js +149 -0
  60. package/lib/Area/package.json +6 -0
  61. package/lib/Card/Card.js +27 -0
  62. package/lib/Card/package.json +6 -0
  63. package/lib/CodeInput/CodeInput.js +131 -0
  64. package/lib/CodeInput/package.json +6 -0
  65. package/lib/Control/Control.js +450 -0
  66. package/lib/Control/event.js +51 -0
  67. package/lib/Control/package.json +6 -0
  68. package/lib/Enhance/Dialogs.js +60 -0
  69. package/lib/Enhance/Loading.js +138 -0
  70. package/lib/Enhance/index.js +25 -0
  71. package/lib/Enhance/package.json +6 -0
  72. package/lib/Header/Header.js +169 -0
  73. package/lib/Header/Header.less +95 -0
  74. package/lib/Header/Vertical.js +114 -0
  75. package/lib/Header/Vertical.less +60 -0
  76. package/lib/Header/package.json +6 -0
  77. package/lib/ImageView/ImageView.js +108 -0
  78. package/lib/ImageView/ImageView.less +14 -0
  79. package/lib/ImageView/package.json +6 -0
  80. package/lib/Indent/Indent.js +27 -0
  81. package/lib/Indent/package.json +6 -0
  82. package/lib/InpurCascader/InputCascader.js +124 -0
  83. package/lib/InpurCascader/package.json +6 -0
  84. package/lib/InputEditor/InputEditor.js +181 -0
  85. package/lib/InputEditor/inputEditor.less +8 -0
  86. package/lib/InputEditor/package.json +6 -0
  87. package/lib/InputSearch/InputSearch.js +274 -0
  88. package/lib/InputSearch/package.json +6 -0
  89. package/lib/InputSelect/InputSelect.js +168 -0
  90. package/lib/InputSelect/package.json +6 -0
  91. package/lib/InputTreeSelect/InputTreeSelect.js +128 -0
  92. package/lib/InputTreeSelect/package.json +6 -0
  93. package/lib/InputWriting/InputWriting.js +93 -0
  94. package/lib/InputWriting/package.json +6 -0
  95. package/lib/Layout/Layout.js +209 -0
  96. package/lib/Layout/Layout.less +28 -0
  97. package/lib/Layout/package.json +6 -0
  98. package/lib/LayoutLink/LayoutLink.js +86 -0
  99. package/lib/LayoutLink/LayoutLink.less +53 -0
  100. package/lib/LayoutLink/package.json +6 -0
  101. package/lib/Link/Link.js +93 -0
  102. package/lib/Link/package.json +6 -0
  103. package/lib/Loading/Loading.js +21 -0
  104. package/lib/Loading/Loading.less +13 -0
  105. package/lib/Loading/package.json +6 -0
  106. package/lib/Loading2/Loading2.js +17 -0
  107. package/lib/Loading2/Loading2.less +19 -0
  108. package/lib/Loading2/package.json +6 -0
  109. package/lib/ModalWithDrag/ModalWithDrag.js +37 -0
  110. package/lib/ModalWithDrag/ModalWithDrag.less +6 -0
  111. package/lib/ModalWithDrag/drag.js +124 -0
  112. package/lib/ModalWithDrag/package.json +6 -0
  113. package/lib/NumberInput/NumberInput.js +208 -0
  114. package/lib/NumberInput/package.json +6 -0
  115. package/lib/Search/Search.js +510 -0
  116. package/lib/Search/Search.less +63 -0
  117. package/lib/Search/package.json +6 -0
  118. package/lib/Search2/Search.js +609 -0
  119. package/lib/Search2/Search.less +64 -0
  120. package/lib/Search2/package.json +6 -0
  121. package/lib/Sidebar/Sidebar.js +152 -0
  122. package/lib/Sidebar/Sidebar.less +78 -0
  123. package/lib/Sidebar/package.json +6 -0
  124. package/lib/Sidebar2/Sidebar.js +173 -0
  125. package/lib/Sidebar2/Sidebar.less +153 -0
  126. package/lib/Sidebar2/package.json +6 -0
  127. package/lib/SuperForm/SuperForm.js +610 -0
  128. package/lib/SuperForm/SuperForm.less +52 -0
  129. package/lib/SuperForm/package.json +6 -0
  130. package/lib/SuperForm2/SuperForm.js +699 -0
  131. package/lib/SuperForm2/SuperForm.less +52 -0
  132. package/lib/SuperForm2/package.json +6 -0
  133. package/lib/SuperIcon/SuperIcon.js +35 -0
  134. package/lib/SuperIcon/package.json +6 -0
  135. package/lib/SuperPagination/SuperPagination.js +117 -0
  136. package/lib/SuperPagination/package.json +6 -0
  137. package/lib/SuperTab/SuperTab.js +115 -0
  138. package/lib/SuperTab/SuperTab.less +43 -0
  139. package/lib/SuperTab/package.json +6 -0
  140. package/lib/SuperTab2/SuperTab2.js +153 -0
  141. package/lib/SuperTab2/SuperTab2.less +18 -0
  142. package/lib/SuperTab2/package.json +6 -0
  143. package/lib/SuperTable/DragSortRow.js +105 -0
  144. package/lib/SuperTable/DragSortRow.less +17 -0
  145. package/lib/SuperTable/FilterDropDown.js +172 -0
  146. package/lib/SuperTable/FilterDropDown.less +30 -0
  147. package/lib/SuperTable/SuperTable.js +816 -0
  148. package/lib/SuperTable/SuperTable.less +132 -0
  149. package/lib/SuperTable/fixed.js +42 -0
  150. package/lib/SuperTable/package.json +6 -0
  151. package/lib/SuperTable2/SuperTable2.js +939 -0
  152. package/lib/SuperTable2/SuperTable2.less +119 -0
  153. package/lib/SuperTable2/SuperTableCell.js +239 -0
  154. package/lib/SuperTable2/package.json +6 -0
  155. package/lib/SuperTable3/FilterDropDown.js +172 -0
  156. package/lib/SuperTable3/FilterDropDown.less +29 -0
  157. package/lib/SuperTable3/SuperTable.js +673 -0
  158. package/lib/SuperTable3/SuperTable.less +99 -0
  159. package/lib/SuperTable3/fixed.js +42 -0
  160. package/lib/SuperTable3/package.json +6 -0
  161. package/lib/SuperToolbar/SuperToolbar.js +203 -0
  162. package/lib/SuperToolbar/SuperToolbar.less +17 -0
  163. package/lib/SuperToolbar/package.json +6 -0
  164. package/lib/SuperUpload/SuperUpload.js +368 -0
  165. package/lib/SuperUpload/SuperUpload.less +28 -0
  166. package/lib/SuperUpload/package.json +6 -0
  167. package/lib/Title/Title.js +41 -0
  168. package/lib/Title/Title.less +35 -0
  169. package/lib/Title/package.json +6 -0
  170. package/lib/Viewer/ImageViews.js +266 -0
  171. package/lib/Viewer/Viewer.js +130 -0
  172. package/lib/Viewer/Viewer.less +67 -0
  173. package/lib/Viewer/imgView.less +59 -0
  174. package/lib/Viewer/package.json +7 -0
  175. package/lib/WingBlank/WingBlank.js +24 -0
  176. package/lib/WingBlank/WingBlank.less +12 -0
  177. package/lib/WingBlank/package.json +6 -0
  178. package/lib/adjust.less +89 -0
  179. package/lib/helper.js +246 -0
  180. package/lib/history.js +12 -0
  181. package/lib/index.js +278 -0
  182. package/lib/index.less +32 -0
  183. package/lib/style.less +31 -0
  184. package/lib/variables.js +14 -0
  185. package/lib/variables.less +73 -0
  186. package/package.json +22 -44
  187. package/src/Area/Area.js +0 -94
  188. package/src/Card/Card.js +0 -16
  189. package/src/CodeInput/CodeInput.js +0 -76
  190. package/src/Control/Control.js +0 -338
  191. package/src/Control/event.js +0 -45
  192. package/src/Enhance/Dialogs.js +0 -24
  193. package/src/Enhance/Loading.js +0 -83
  194. package/src/Header/Header.js +0 -149
  195. package/src/Header/Vertical.js +0 -74
  196. package/src/ImageView/ImageView.js +0 -62
  197. package/src/Indent/Indent.js +0 -12
  198. package/src/InpurCascader/InputCascader.js +0 -83
  199. package/src/InputEditor/InputEditor.js +0 -93
  200. package/src/InputSearch/InputSearch.js +0 -186
  201. package/src/InputSelect/InputSelect.js +0 -103
  202. package/src/InputTreeSelect/InputTreeSelect.js +0 -87
  203. package/src/InputWriting/InputWriting.js +0 -65
  204. package/src/Layout/Layout.js +0 -121
  205. package/src/LayoutLink/LayoutLink.js +0 -59
  206. package/src/Link/Link.js +0 -57
  207. package/src/Loading/Loading.js +0 -15
  208. package/src/Loading2/Loading2.js +0 -15
  209. package/src/ModalWithDrag/ModalWithDrag.js +0 -17
  210. package/src/NumberInput/NumberInput.js +0 -137
  211. package/src/Search/Search.js +0 -368
  212. package/src/Search2/Search.js +0 -436
  213. package/src/Sidebar/Sidebar.js +0 -111
  214. package/src/Sidebar2/Sidebar.js +0 -143
  215. package/src/SuperForm/SuperForm.js +0 -519
  216. package/src/SuperForm2/SuperForm.js +0 -588
  217. package/src/SuperIcon/SuperIcon.js +0 -14
  218. package/src/SuperPagination/SuperPagination.js +0 -65
  219. package/src/SuperTab/SuperTab.js +0 -84
  220. package/src/SuperTab2/SuperTab2.js +0 -94
  221. package/src/SuperTable/DragSortRow.js +0 -62
  222. package/src/SuperTable/FilterDropDown.js +0 -111
  223. package/src/SuperTable/SuperTable.js +0 -590
  224. package/src/SuperTable/fixed.js +0 -34
  225. package/src/SuperTable2/SuperTable2.js +0 -624
  226. package/src/SuperTable2/SuperTableCell.js +0 -175
  227. package/src/SuperTable3/FilterDropDown.js +0 -111
  228. package/src/SuperTable3/SuperTable.js +0 -498
  229. package/src/SuperTable3/fixed.js +0 -34
  230. package/src/SuperToolbar/SuperToolbar.js +0 -128
  231. package/src/SuperUpload/SuperUpload.js +0 -137
  232. package/src/Title/Title.js +0 -18
  233. package/src/Viewer/ImageViews.js +0 -220
  234. package/src/Viewer/Viewer.js +0 -97
  235. package/src/WingBlank/WingBlank.js +0 -14
  236. package/src/helper.js +0 -185
  237. package/src/index.js +0 -39
  238. package/src/variables.js +0 -5
  239. package/test/index.html +0 -10
  240. package/test/test.js +0 -16
  241. package/test/test.less +0 -12
  242. package/test/webpack.config.js +0 -71
  243. package/tools/babel.config.js +0 -14
  244. package/tools/build.js +0 -70
  245. package/tools/publish.js +0 -9
  246. package/tools/util.js +0 -53
  247. /package/{src → es}/Area/package.json +0 -0
  248. /package/{src → es}/Card/package.json +0 -0
  249. /package/{src → es}/CodeInput/package.json +0 -0
  250. /package/{src → es}/Control/package.json +0 -0
  251. /package/{src → es}/Enhance/package.json +0 -0
  252. /package/{src → es}/Header/Header.less +0 -0
  253. /package/{src → es}/Header/Vertical.less +0 -0
  254. /package/{src → es}/Header/package.json +0 -0
  255. /package/{src → es}/ImageView/ImageView.less +0 -0
  256. /package/{src → es}/ImageView/package.json +0 -0
  257. /package/{src → es}/Indent/package.json +0 -0
  258. /package/{src → es}/InpurCascader/package.json +0 -0
  259. /package/{src → es}/InputEditor/inputEditor.less +0 -0
  260. /package/{src → es}/InputEditor/package.json +0 -0
  261. /package/{src → es}/InputSearch/package.json +0 -0
  262. /package/{src → es}/InputSelect/package.json +0 -0
  263. /package/{src → es}/InputTreeSelect/package.json +0 -0
  264. /package/{src → es}/InputWriting/package.json +0 -0
  265. /package/{src → es}/Layout/Layout.less +0 -0
  266. /package/{src → es}/Layout/package.json +0 -0
  267. /package/{src → es}/LayoutLink/LayoutLink.less +0 -0
  268. /package/{src → es}/LayoutLink/package.json +0 -0
  269. /package/{src → es}/Link/package.json +0 -0
  270. /package/{src → es}/Loading/Loading.less +0 -0
  271. /package/{src → es}/Loading/package.json +0 -0
  272. /package/{src → es}/Loading2/Loading2.less +0 -0
  273. /package/{src → es}/Loading2/package.json +0 -0
  274. /package/{src → es}/ModalWithDrag/ModalWithDrag.less +0 -0
  275. /package/{src → es}/ModalWithDrag/package.json +0 -0
  276. /package/{src → es}/NumberInput/package.json +0 -0
  277. /package/{src → es}/Search/Search.less +0 -0
  278. /package/{src → es}/Search/package.json +0 -0
  279. /package/{src → es}/Search2/package.json +0 -0
  280. /package/{src → es}/Sidebar/Sidebar.less +0 -0
  281. /package/{src → es}/Sidebar/package.json +0 -0
  282. /package/{src → es}/Sidebar2/Sidebar.less +0 -0
  283. /package/{src → es}/Sidebar2/package.json +0 -0
  284. /package/{src → es}/SuperForm/SuperForm.less +0 -0
  285. /package/{src → es}/SuperForm/package.json +0 -0
  286. /package/{src → es}/SuperForm2/SuperForm.less +0 -0
  287. /package/{src → es}/SuperForm2/package.json +0 -0
  288. /package/{src → es}/SuperIcon/package.json +0 -0
  289. /package/{src → es}/SuperPagination/package.json +0 -0
  290. /package/{src → es}/SuperTab/SuperTab.less +0 -0
  291. /package/{src → es}/SuperTab/package.json +0 -0
  292. /package/{src → es}/SuperTab2/SuperTab2.less +0 -0
  293. /package/{src → es}/SuperTab2/package.json +0 -0
  294. /package/{src → es}/SuperTable/DragSortRow.less +0 -0
  295. /package/{src → es}/SuperTable/FilterDropDown.less +0 -0
  296. /package/{src → es}/SuperTable/SuperTable.less +0 -0
  297. /package/{src → es}/SuperTable/package.json +0 -0
  298. /package/{src → es}/SuperTable2/package.json +0 -0
  299. /package/{src → es}/SuperTable3/FilterDropDown.less +0 -0
  300. /package/{src → es}/SuperTable3/SuperTable.less +0 -0
  301. /package/{src → es}/SuperTable3/package.json +0 -0
  302. /package/{src → es}/SuperToolbar/SuperToolbar.less +0 -0
  303. /package/{src → es}/SuperToolbar/package.json +0 -0
  304. /package/{src → es}/SuperUpload/SuperUpload.less +0 -0
  305. /package/{src → es}/SuperUpload/package.json +0 -0
  306. /package/{src → es}/Title/Title.less +0 -0
  307. /package/{src → es}/Title/package.json +0 -0
  308. /package/{src → es}/Viewer/Viewer.less +0 -0
  309. /package/{src → es}/Viewer/imgView.less +0 -0
  310. /package/{src → es}/Viewer/package.json +0 -0
  311. /package/{src → es}/WingBlank/WingBlank.less +0 -0
  312. /package/{src → es}/WingBlank/package.json +0 -0
  313. /package/{src → es}/adjust.less +0 -0
  314. /package/{src → es}/variables.less +0 -0
@@ -0,0 +1,609 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
+ var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
5
+ var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
6
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
7
+ var _filterInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
8
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
9
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
10
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
11
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
12
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
13
+ var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
14
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
15
+ _Object$defineProperty(exports, "__esModule", {
16
+ value: true
17
+ });
18
+ exports["default"] = void 0;
19
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
20
+ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
21
+ var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
22
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
23
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
24
+ var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
25
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
26
+ var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
27
+ var _sort = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/sort"));
28
+ var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
29
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
30
+ var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
31
+ var _row = _interopRequireDefault(require("antd/lib/row"));
32
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
33
+ var _col = _interopRequireDefault(require("antd/lib/col"));
34
+ var _icon = _interopRequireDefault(require("antd/lib/icon"));
35
+ var _button = _interopRequireDefault(require("antd/lib/button"));
36
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
37
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
38
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
39
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
40
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
41
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
42
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
43
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
44
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
45
+ var _form = _interopRequireDefault(require("antd/lib/form"));
46
+ var _react = _interopRequireDefault(require("react"));
47
+ var _propTypes = _interopRequireDefault(require("prop-types"));
48
+ var _reactDom = _interopRequireDefault(require("react-dom"));
49
+ var _withStyles = _interopRequireDefault(require("isomorphic-style-loader/withStyles"));
50
+ var _Control = _interopRequireWildcard(require("../Control"));
51
+ var _helper = require("../helper");
52
+ var _variables = _interopRequireDefault(require("../variables"));
53
+ function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
54
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
55
+ function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
56
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context22 = ownKeys(Object(t))).call(_context22, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
57
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
58
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // import helper from '../../common/common';
59
+ // import s from './Search.less';
60
+ // import showAddDialog from './AddDialog';
61
+ // import showDeleteDialog from './DeleteDialog';
62
+ var FormItem = _form["default"].Item;
63
+ var defaultSize = 'small';
64
+ var defaultColNum = 6;
65
+ var insertTimeKeyMap = {
66
+ from: ["insertTimeTo", "insertTimeFrom"],
67
+ start: ["insertTimeStart", "insertTimeEnd"]
68
+ };
69
+ var TYPE = ['text', 'search', 'searchText', 'select', 'number', 'date', 'readonly', 'selectSearch', 'cascader' //级联选择下拉
70
+ ];
71
+
72
+ /**
73
+ * search: 搜索按钮的标题
74
+ * more:更多按钮的标题
75
+ * reset:重置按钮的标题
76
+ * sort:排序按钮的标题
77
+ */
78
+ var ConfigType = {
79
+ search: _propTypes["default"].string.isRequired,
80
+ reset: _propTypes["default"].string,
81
+ sort: _propTypes["default"].string,
82
+ more: _propTypes["default"].string
83
+ };
84
+
85
+ /**
86
+ * key: 唯一标识一个表单元素
87
+ * title:表单元素旁边的标题
88
+ * type:表单元素的类型
89
+ * props:传递给表单元素的额外属性
90
+ */
91
+ var FilterType = {
92
+ key: _propTypes["default"].string.isRequired,
93
+ title: _propTypes["default"].string.isRequired,
94
+ type: _propTypes["default"].oneOf(TYPE).isRequired,
95
+ options: _propTypes["default"].array,
96
+ props: _propTypes["default"].object
97
+ };
98
+
99
+ /**
100
+ * data:传递给filters的默认值,为key:value的形式,此处的key为FilterType中的key
101
+ * isSort:是否需要排序按钮,默认false,当设置为true时,onClick函数需要实现key为sort的响应函数
102
+ * options: 作用同FilterType.options类似,但优先级高于它
103
+ * onClick:按钮点击事件,原型为func(key)
104
+ * onChange:表单控件内容改变时触发,原型为func(key, value)
105
+ * onSearch:search控件发出的事件,原型为func(key, value)
106
+ * displayRow:折叠时需要展示的行数,整数,默认为2
107
+ */
108
+ var Search2 = /*#__PURE__*/function (_React$Component) {
109
+ (0, _inherits2["default"])(Search2, _React$Component);
110
+ var _super = _createSuper(Search2);
111
+ function Search2() {
112
+ var _context;
113
+ var _this;
114
+ (0, _classCallCheck2["default"])(this, Search2);
115
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
116
+ args[_key] = arguments[_key];
117
+ }
118
+ _this = _super.call.apply(_super, (0, _concat["default"])(_context = [this]).call(_context, args));
119
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
120
+ more: false
121
+ });
122
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPathFun", /*#__PURE__*/function () {
123
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(key) {
124
+ var _context2, _context8;
125
+ var pathArr, _global$store$getStat, sidebars, navigation, title, body, url;
126
+ return _regenerator["default"].wrap(function _callee$(_context9) {
127
+ while (1) switch (_context9.prev = _context9.next) {
128
+ case 0:
129
+ pathArr = global.location.pathname.split('/');
130
+ _global$store$getStat = global.store.getState().layout, sidebars = _global$store$getStat.sidebars, navigation = _global$store$getStat.navigation;
131
+ title = (0, _reduce["default"])(_context2 = (0, _keys["default"])(sidebars)).call(_context2, function (t, i) {
132
+ var _context3;
133
+ (0, _map["default"])(_context3 = sidebars[i]).call(_context3, function (item) {
134
+ if (item.children) {
135
+ var _context4;
136
+ var filterArr = (0, _filter["default"])(_context4 = item.children).call(_context4, function (c) {
137
+ return c.href === global.location.pathname;
138
+ });
139
+ if (filterArr.length !== 0) {
140
+ var _context5, _context6;
141
+ t = (0, _concat["default"])(_context5 = (0, _filter["default"])(navigation).call(navigation, function (n) {
142
+ return n.key === i;
143
+ })[0].title).call(_context5, (0, _concat["default"])(_context6 = "-".concat(item.title, "-")).call(_context6, filterArr[0].title));
144
+ }
145
+ } else {
146
+ if (item.href === global.location.pathname) {
147
+ var _context7;
148
+ t = (0, _concat["default"])(_context7 = (0, _filter["default"])(navigation).call(navigation, function (n) {
149
+ return n.key === i;
150
+ })[0].title).call(_context7, "-".concat(item.title));
151
+ }
152
+ }
153
+ return item;
154
+ });
155
+ return t;
156
+ }, '');
157
+ body = {
158
+ action: (0, _concat["default"])(_context8 = "".concat(pathArr[pathArr.length - 1], "_")).call(_context8, key),
159
+ actionName: "".concat(title, "-\u641C\u7D22"),
160
+ menuName: title
161
+ };
162
+ url = '/api/standard/log'; // await helper.fetchJson(url, helper.postOption(body))
163
+ case 5:
164
+ case "end":
165
+ return _context9.stop();
166
+ }
167
+ }, _callee);
168
+ }));
169
+ return function (_x) {
170
+ return _ref.apply(this, arguments);
171
+ };
172
+ }());
173
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onClick", function (key) {
174
+ var onClick = _this.props.onClick;
175
+ if (key === 'search') {
176
+ // this.getPathFun(key);
177
+ }
178
+ onClick && onClick(key);
179
+ });
180
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMore", function () {
181
+ var onHeightChange = _this.props.onHeightChange;
182
+ _this.setState({
183
+ more: !_this.state.more
184
+ });
185
+ onHeightChange && onHeightChange(_this.calHeight(!_this.state.more));
186
+ });
187
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (dictionary, key, value) {
188
+ var _context10, _context11;
189
+ var onChange = _this.props.onChange;
190
+ if (value && key === 'queryGroup' && dictionary && global.dictionary && global.dictionary[dictionary] && !(0, _includes["default"])(_context10 = (0, _map["default"])(_context11 = global.dictionary[dictionary]).call(_context11, function (item) {
191
+ return item.value;
192
+ })).call(_context10, value)) {
193
+ var _context12;
194
+ var realValue = JSON.parse(value);
195
+ _this.onClick('reset');
196
+ (0, _map["default"])(_context12 = (0, _keys["default"])(realValue)).call(_context12, function (objectKey) {
197
+ onChange && objectKey !== 'queryId' && onChange(objectKey, realValue[objectKey]);
198
+ });
199
+ }
200
+ onChange && onChange(key, value);
201
+ });
202
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPressEnter", function () {
203
+ _reactDom["default"].findDOMNode(_this.refs.search).click();
204
+ });
205
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toButton", function (key) {
206
+ var _context13;
207
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
208
+ var config = _this.props.config;
209
+ var onClick = (0, _bind["default"])(_context13 = _this.onClick).call(_context13, (0, _assertThisInitialized2["default"])(_this), key);
210
+ return /*#__PURE__*/_react["default"].createElement(_button["default"], (0, _extends2["default"])({
211
+ size: defaultSize,
212
+ onClick: onClick
213
+ }, props), config[key]);
214
+ });
215
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toMore", function () {
216
+ return /*#__PURE__*/_react["default"].createElement("a", {
217
+ role: "more",
218
+ onClick: _this.onMore
219
+ }, _this.props.config.more, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
220
+ type: "down",
221
+ "data-status": !_this.state.more ? 'down' : 'up'
222
+ }));
223
+ });
224
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toButtons", function () {
225
+ var config = _this.props.config;
226
+ return /*#__PURE__*/_react["default"].createElement("div", {
227
+ role: "buttons"
228
+ }, _this.toButton('search', {
229
+ ref: 'search',
230
+ type: 'primary'
231
+ }), config.reset ? _this.toButton('reset') : null, _this.isSort() ? _this.toButton('sort') : null, _this.isMore() ? _this.toMore() : null);
232
+ });
233
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isSort", function () {
234
+ var _this$props = _this.props,
235
+ config = _this$props.config,
236
+ _this$props$colNum = _this$props.colNum,
237
+ colNum = _this$props$colNum === void 0 ? defaultColNum : _this$props$colNum,
238
+ filters = _this$props.filters,
239
+ _this$props$isSort = _this$props.isSort,
240
+ isSort = _this$props$isSort === void 0 ? false : _this$props$isSort;
241
+ return isSort && (0, _sort["default"])(config) && filters.length > colNum;
242
+ });
243
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isMore", function () {
244
+ var _this$props2 = _this.props,
245
+ config = _this$props2.config,
246
+ _this$props2$colNum = _this$props2.colNum,
247
+ colNum = _this$props2$colNum === void 0 ? defaultColNum : _this$props2$colNum,
248
+ filters = _this$props2.filters,
249
+ _this$props2$displayR = _this$props2.displayRow,
250
+ displayRow = _this$props2$displayR === void 0 ? filters.length > 4 ? 2 : 1 : _this$props2$displayR;
251
+ return config.more && (0, _filter["default"])(filters).call(filters, function (item) {
252
+ return !item.hide;
253
+ }).length > colNum * displayRow;
254
+ });
255
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getOptions", function (filter) {
256
+ var options = _this.props.options;
257
+ if (options && (0, _isArray["default"])(options[filter.key])) {
258
+ return options[filter.key];
259
+ } else {
260
+ return filter.options || filter.typeRelated || [];
261
+ }
262
+ });
263
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getContainer", function () {
264
+ return _this.props.getContainer;
265
+ });
266
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getControlProps", function (control) {
267
+ var _context14;
268
+ var _this$props$data = _this.props.data,
269
+ data = _this$props$data === void 0 ? {} : _this$props$data;
270
+ return _objectSpread(_objectSpread({}, control.props || {}), {}, {
271
+ size: defaultSize,
272
+ type: control.type,
273
+ value: (0, _Control.makeString)(data[control.key]),
274
+ onChange: (0, _bind["default"])(_context14 = _this.onChange).call(_context14, (0, _assertThisInitialized2["default"])(_this), control.dictionary, control.key)
275
+ });
276
+ });
277
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "validDate", function (_ref2) {
278
+ var key = _ref2.key,
279
+ type = _ref2.type;
280
+ return function (date) {
281
+ var _this$props$data2 = _this.props.data,
282
+ data = _this$props$data2 === void 0 ? {} : _this$props$data2;
283
+ if (!date || !data[key]) {
284
+ return false;
285
+ } else {
286
+ if (type === '>') {
287
+ return date.format('YYYY-MM-DD HH:mm:ss') <= data[key].valueOf();
288
+ } else if (type === '<') {
289
+ return date.format('YYYY-MM-DD HH:mm:ss') >= data[key].valueOf();
290
+ } else {
291
+ return false;
292
+ }
293
+ }
294
+ };
295
+ });
296
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toText", function (props) {
297
+ props.onPressEnter = _this.onPressEnter;
298
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
299
+ });
300
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toNumber", function (props) {
301
+ props.defaultValue = props.value;
302
+ delete props.value;
303
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
304
+ });
305
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getQueryGroupOptions", function (_ref3) {
306
+ var dictionary = _ref3.dictionary,
307
+ _ref3$configCode = _ref3.configCode,
308
+ configCode = _ref3$configCode === void 0 ? 'unknown' : _ref3$configCode;
309
+ var realOptions = [];
310
+ if (dictionary && global.dictionary) {
311
+ var dicOptions = global.dictionary[dictionary] || [];
312
+ realOptions = (0, _concat["default"])(realOptions).call(realOptions, dicOptions);
313
+ }
314
+ var state = global.store.getState();
315
+ var path = ['layout', 'tableColsSetting', configCode];
316
+ var _ref4 = (0, _helper.getPathValue)(state, path) || {},
317
+ _ref4$queryList = _ref4.queryList,
318
+ queryList = _ref4$queryList === void 0 ? [] : _ref4$queryList;
319
+ return (0, _concat["default"])(realOptions).call(realOptions, (0, _map["default"])(queryList).call(queryList, function (item) {
320
+ return {
321
+ title: item.name,
322
+ value: (0, _stringify["default"])(item.query)
323
+ };
324
+ }));
325
+ });
326
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toSelect", function (props, filter) {
327
+ var container = _this.getContainer();
328
+ container && (props.getPopupContainer = container);
329
+ props.options = filter.key === 'queryGroup' ? _this.getQueryGroupOptions(filter) : _this.getOptions(filter);
330
+ props.dropdownMatchSelectWidth = false;
331
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
332
+ });
333
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "createSearchEvent", function (filter) {
334
+ if (_this.props.onSearch) {
335
+ return function (value) {
336
+ return _this.props.onSearch(filter.key, value, filter);
337
+ };
338
+ } else {
339
+ return null;
340
+ }
341
+ });
342
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toSearch", function (props, filter) {
343
+ var container = _this.getContainer();
344
+ container && (props.getPopupContainer = container);
345
+ props.options = _this.getOptions(filter);
346
+ props.onSearch = _this.createSearchEvent(filter);
347
+ props.dropdownMatchSelectWidth = false;
348
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
349
+ });
350
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "selectSearch", function (props, filter) {
351
+ var container = _this.getContainer();
352
+ container && (props.getPopupContainer = container);
353
+ props.options = _this.getOptions(filter);
354
+ props.onSearch = _this.createSearchEvent(filter);
355
+ props.dropdownMatchSelectWidth = false;
356
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
357
+ });
358
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toDate", function (props, _ref5) {
359
+ var rule = _ref5.rule;
360
+ var container = _this.getContainer();
361
+ container && (props.getCalendarContainer = container);
362
+ rule && (props.disabledDate = _this.validDate(rule));
363
+ props.style = {
364
+ width: '100%'
365
+ };
366
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
367
+ });
368
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toReadonly", function (props, filter) {
369
+ props.value = (0, _Control.getTitle)(props.value, _this.getOptions(filter));
370
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
371
+ });
372
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCascader", function (props, filter) {
373
+ var container = _this.getContainer();
374
+ container && (props.getPopupContainer = container);
375
+ props.options = _this.getOptions(filter);
376
+ props.onSearch = _this.createSearchEvent(filter);
377
+ props.placeholder = filter.placeholder || '';
378
+ return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
379
+ });
380
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toControl", function (control) {
381
+ var props = _this.getControlProps(control);
382
+ switch (control.type) {
383
+ case 'text':
384
+ return _this.toText(props, control);
385
+ case 'number':
386
+ return _this.toNumber(props, control);
387
+ case 'select':
388
+ return _this.toSelect(props, control);
389
+ case 'selectSearch':
390
+ return _this.selectSearch(props, control);
391
+ case 'search':
392
+ case 'searchText':
393
+ return _this.toSearch(props, control);
394
+ case 'date':
395
+ return _this.toDate(props, control);
396
+ case 'readonly':
397
+ return _this.toReadonly(props, control);
398
+ case 'cascader':
399
+ return _this.toCascader(props, control);
400
+ default:
401
+ return 'type error';
402
+ }
403
+ });
404
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toLabel", function (_ref6) {
405
+ var title = _ref6.title,
406
+ key = _ref6.key,
407
+ dictionary = _ref6.dictionary,
408
+ _ref6$configCode = _ref6.configCode,
409
+ configCode = _ref6$configCode === void 0 ? 'unknown' : _ref6$configCode;
410
+ if (key === 'queryGroup') {
411
+ var _context15, _context16;
412
+ //查询组合
413
+ return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
414
+ role: "icon",
415
+ type: "plus-circle-o",
416
+ onClick: (0, _bind["default"])(_context15 = _this.onAddQueryGroup).call(_context15, (0, _assertThisInitialized2["default"])(_this), configCode, _this.props.data, dictionary)
417
+ }), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
418
+ role: "icon",
419
+ type: "minus-circle-o",
420
+ onClick: (0, _bind["default"])(_context16 = _this.onDelQueryGroup).call(_context16, (0, _assertThisInitialized2["default"])(_this), configCode, _this.props.data, dictionary)
421
+ }));
422
+ } else {
423
+ return title;
424
+ }
425
+ });
426
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCol", function (span, control, more) {
427
+ var factor = control.span || 1;
428
+ return /*#__PURE__*/_react["default"].createElement(_col["default"], {
429
+ span: span * factor,
430
+ key: control.key,
431
+ onFocus: more ? function () {
432
+ _this.setState({
433
+ more: true
434
+ });
435
+ } : undefined
436
+ }, /*#__PURE__*/_react["default"].createElement(FormItem, {
437
+ label: _this.toLabel(control),
438
+ required: control.required
439
+ }, _this.toControl(control)));
440
+ });
441
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toCols", function () {
442
+ var _this$props3 = _this.props,
443
+ _this$props3$insertTi = _this$props3.insertTimeKey,
444
+ insertTimeKey = _this$props3$insertTi === void 0 ? 'from' : _this$props3$insertTi,
445
+ _this$props3$colNum = _this$props3.colNum,
446
+ colNum = _this$props3$colNum === void 0 ? defaultColNum : _this$props3$colNum,
447
+ filters = _this$props3.filters,
448
+ _this$props3$displayR = _this$props3.displayRow,
449
+ displayRow = _this$props3$displayR === void 0 ? filters.length > defaultColNum ? 2 : 1 : _this$props3$displayR;
450
+ var span = 24 / Math.min(colNum, (0, _filter["default"])(filters).call(filters, function (item) {
451
+ return !item.hide;
452
+ }).length);
453
+ var newFilters = (0, _filter["default"])(filters).call(filters, function (item) {
454
+ return !item.hide;
455
+ });
456
+ var insertKeys = insertTimeKeyMap[insertTimeKey];
457
+ var insertTimeCols = (0, _filter["default"])(newFilters).call(newFilters, function (x) {
458
+ return (0, _includes["default"])(insertKeys).call(insertKeys, x.key);
459
+ });
460
+ var otherCols = (0, _filter["default"])(newFilters).call(newFilters, function (x) {
461
+ return !(0, _includes["default"])(insertKeys).call(insertKeys, x.key);
462
+ });
463
+ if (insertTimeCols.length > 0) {
464
+ if (otherCols.length >= defaultColNum) {
465
+ var _context17;
466
+ (0, _splice["default"])(otherCols).apply(otherCols, (0, _concat["default"])(_context17 = [6, 0]).call(_context17, (0, _toConsumableArray2["default"])(insertTimeCols)));
467
+ newFilters = otherCols;
468
+ } else {
469
+ newFilters = (0, _concat["default"])(otherCols).call(otherCols, insertTimeCols);
470
+ }
471
+ }
472
+ if (span == 4.8) {
473
+ //特殊处理filters为5的时候,span不能为小数
474
+ return (0, _map["default"])(newFilters).call(newFilters, function (control, index) {
475
+ return _this.toCol(index == 0 ? 4 : 5, control, index >= colNum * displayRow);
476
+ });
477
+ } else {
478
+ return (0, _map["default"])(newFilters).call(newFilters, function (control, index) {
479
+ return _this.toCol(span, control, index >= colNum * displayRow);
480
+ });
481
+ }
482
+ });
483
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "calWidth", function () {
484
+ var _this$props4 = _this.props,
485
+ _this$props4$colNum = _this$props4.colNum,
486
+ colNum = _this$props4$colNum === void 0 ? defaultColNum : _this$props4$colNum,
487
+ filters = _this$props4.filters;
488
+ var length = (0, _filter["default"])(filters).call(filters, function (item) {
489
+ return !item.hide;
490
+ }).length;
491
+ if (length < colNum) {
492
+ return "".concat(length * 13.6, "%");
493
+ } else {
494
+ return "".concat(defaultColNum * 13.6, "%");
495
+ }
496
+ });
497
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "calHeight", function (more) {
498
+ var _this$props5 = _this.props,
499
+ _this$props5$colNum = _this$props5.colNum,
500
+ colNum = _this$props5$colNum === void 0 ? defaultColNum : _this$props5$colNum,
501
+ filters = _this$props5.filters,
502
+ _this$props5$displayR = _this$props5.displayRow,
503
+ displayRow = _this$props5$displayR === void 0 ? filters.length > defaultColNum ? 2 : 1 : _this$props5$displayR;
504
+ if (more) {
505
+ var row = Math.ceil((0, _filter["default"])(filters).call(filters, function (item) {
506
+ return !item.hide;
507
+ }).length / colNum);
508
+ return row * 36 + (row - 1) * 10;
509
+ } else {
510
+ return displayRow * 36 + (displayRow - 1) * 10;
511
+ }
512
+ });
513
+ return _this;
514
+ }
515
+ (0, _createClass2["default"])(Search2, [{
516
+ key: "onAddQueryGroup",
517
+ value: function () {
518
+ var _onAddQueryGroup = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(configCode, searchData, dictionary) {
519
+ var _context18;
520
+ var filter, dicOptionNameArr, dicOptions;
521
+ return _regenerator["default"].wrap(function _callee2$(_context19) {
522
+ while (1) switch (_context19.prev = _context19.next) {
523
+ case 0:
524
+ filter = (0, _reduce["default"])(_context18 = (0, _keys["default"])(searchData)).call(_context18, function (state, key) {
525
+ if (searchData[key] && key !== 'queryGroup') {
526
+ state[key] = searchData[key];
527
+ }
528
+ return state;
529
+ }, {}); // if (Object.keys(filter).length < 1) return helper.showError(`查询条件不能为空`);
530
+ dicOptionNameArr = [];
531
+ if (dictionary && global.dictionary) {
532
+ dicOptions = global.dictionary[dictionary] || [];
533
+ dicOptionNameArr = (0, _map["default"])(dicOptions).call(dicOptions, function (item) {
534
+ return item.title;
535
+ });
536
+ }
537
+ // if (true === await showAddDialog(configCode, filter, dicOptionNameArr)) {
538
+ // this.onChange(undefined, 'queryGroup', '');
539
+ // }
540
+ case 3:
541
+ case "end":
542
+ return _context19.stop();
543
+ }
544
+ }, _callee2);
545
+ }));
546
+ function onAddQueryGroup(_x2, _x3, _x4) {
547
+ return _onAddQueryGroup.apply(this, arguments);
548
+ }
549
+ return onAddQueryGroup;
550
+ }()
551
+ }, {
552
+ key: "onDelQueryGroup",
553
+ value: function () {
554
+ var _onDelQueryGroup = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(configCode, searchData, dictionary) {
555
+ var queryGroup, dicOptions, _JSON$parse, queryId;
556
+ return _regenerator["default"].wrap(function _callee3$(_context20) {
557
+ while (1) switch (_context20.prev = _context20.next) {
558
+ case 0:
559
+ queryGroup = searchData.queryGroup; // if (!queryGroup) return helper.showError(`请先选择要删除的查询组合`);
560
+ if (dictionary && global.dictionary) {
561
+ dicOptions = global.dictionary[dictionary] || []; // if (dicOptions.map(item => item.value).includes(queryGroup)) return helper.showError(`系统固定查询组合不允许删除`);
562
+ }
563
+ _JSON$parse = JSON.parse(queryGroup), queryId = _JSON$parse.queryId; // if(true === await showDeleteDialog(configCode, queryId)) {
564
+ // this.onClick('reset');
565
+ // }
566
+ case 3:
567
+ case "end":
568
+ return _context20.stop();
569
+ }
570
+ }, _callee3);
571
+ }));
572
+ function onDelQueryGroup(_x5, _x6, _x7) {
573
+ return _onDelQueryGroup.apply(this, arguments);
574
+ }
575
+ return onDelQueryGroup;
576
+ }()
577
+ }, {
578
+ key: "render",
579
+ value: function render() {
580
+ return /*#__PURE__*/_react["default"].createElement("div", {
581
+ className: (0, _variables["default"])('Search2'),
582
+ style: {
583
+ height: this.calHeight(this.state.more)
584
+ }
585
+ }, /*#__PURE__*/_react["default"].createElement(_form["default"], {
586
+ layout: "vertical",
587
+ style: {
588
+ width: this.calWidth()
589
+ }
590
+ }, /*#__PURE__*/_react["default"].createElement(_row["default"], {
591
+ gutter: 20
592
+ }, this.toCols())), this.toButtons());
593
+ }
594
+ }]);
595
+ return Search2;
596
+ }(_react["default"].Component);
597
+ (0, _defineProperty2["default"])(Search2, "propTypes", {
598
+ config: _propTypes["default"].shape(ConfigType).isRequired,
599
+ filters: _propTypes["default"].arrayOf(_propTypes["default"].shape(FilterType)).isRequired,
600
+ data: _propTypes["default"].object,
601
+ options: _propTypes["default"].object,
602
+ getContainer: _propTypes["default"].func,
603
+ onClick: _propTypes["default"].func,
604
+ onChange: _propTypes["default"].func,
605
+ onSearch: _propTypes["default"].func,
606
+ onHeightChange: _propTypes["default"].func,
607
+ displayRow: _propTypes["default"].number
608
+ });
609
+ var _default = exports["default"] = Search2;