@bit-sun/business-component 2.2.4 → 2.2.5

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 (179) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +59 -0
  9. package/dist/index.esm.js +544 -28
  10. package/dist/index.js +544 -28
  11. package/dist/utils/enumConfig.d.ts +1 -0
  12. package/docs/index.md +21 -21
  13. package/lib/assets/drag.svg +17 -17
  14. package/lib/assets/exportFail.svg +37 -37
  15. package/lib/assets/exportProcessing.svg +28 -28
  16. package/lib/assets/exportSuccess.svg +34 -34
  17. package/lib/assets/label_icon_bottom.svg +25 -25
  18. package/lib/assets/upExport.svg +22 -22
  19. package/package.json +77 -77
  20. package/src/assets/32.svg +27 -27
  21. package/src/assets/addIcon.svg +17 -17
  22. package/src/assets/allfunc.svg +27 -27
  23. package/src/assets/arrowRight.svg +24 -24
  24. package/src/assets/btn-delete.svg +29 -29
  25. package/src/assets/btn-edit.svg +19 -19
  26. package/src/assets/btn-more.svg +17 -17
  27. package/src/assets/btn-submit.svg +19 -19
  28. package/src/assets/caidan.svg +11 -11
  29. package/src/assets/close.svg +26 -26
  30. package/src/assets/drag.svg +17 -17
  31. package/src/assets/exportFail.svg +37 -37
  32. package/src/assets/exportProcessing.svg +28 -28
  33. package/src/assets/exportSuccess.svg +34 -34
  34. package/src/assets/fixed-left-active.svg +11 -11
  35. package/src/assets/fixed-left.svg +15 -15
  36. package/src/assets/fixed-right-active.svg +11 -11
  37. package/src/assets/fixed-right.svg +15 -15
  38. package/src/assets/guanbi.svg +15 -15
  39. package/src/assets/icon-quanping.svg +15 -15
  40. package/src/assets/icon-shezhi.svg +17 -17
  41. package/src/assets/label_icon_bottom.svg +25 -25
  42. package/src/assets/list-no-img.svg +21 -21
  43. package/src/assets/morentouxiang-32.svg +23 -23
  44. package/src/assets/scanning.svg +24 -24
  45. package/src/assets/upExport.svg +22 -22
  46. package/src/components/Business/AddSelectBusiness/index.md +63 -63
  47. package/src/components/Business/AddSelectBusiness/index.tsx +344 -344
  48. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  49. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  50. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  60. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  61. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  62. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  63. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  64. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  65. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  66. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  67. package/src/components/Business/BsLayouts/index.less +79 -79
  68. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  69. package/src/components/Business/BsLayouts/service.ts +10 -10
  70. package/src/components/Business/BsLayouts/utils.tsx +230 -230
  71. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -0
  72. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  73. package/src/components/Business/BsSulaQueryTable/index.tsx +529 -480
  74. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  75. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  76. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  77. package/src/components/Business/CommodityEntry/index.md +70 -70
  78. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  79. package/src/components/Business/CommonAlert/index.tsx +23 -23
  80. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  81. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  82. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  83. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  84. package/src/components/Business/DetailPageWrapper/index.tsx +335 -335
  85. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  86. package/src/components/Business/HomePageWrapper/index.less +33 -33
  87. package/src/components/Business/HomePageWrapper/index.md +45 -45
  88. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  89. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  90. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  91. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  92. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  93. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  94. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  95. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  96. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  97. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  98. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  99. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  100. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  101. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  102. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  103. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  104. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  105. package/src/components/Business/JsonQueryTable/index.less +16 -16
  106. package/src/components/Business/JsonQueryTable/index.md +328 -328
  107. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  108. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  109. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  110. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  111. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  115. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  116. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  117. package/src/components/Business/SearchSelect/BusinessUtils.ts +1586 -1586
  118. package/src/components/Business/SearchSelect/common.ts +53 -53
  119. package/src/components/Business/SearchSelect/index.md +1254 -1254
  120. package/src/components/Business/SearchSelect/index.tsx +51 -51
  121. package/src/components/Business/SearchSelect/utils.ts +100 -100
  122. package/src/components/Business/StateFlow/index.less +130 -130
  123. package/src/components/Business/StateFlow/index.md +60 -60
  124. package/src/components/Business/StateFlow/index.tsx +29 -29
  125. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  126. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  127. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  128. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  129. package/src/components/Business/columnSettingTable/index.less +247 -247
  130. package/src/components/Business/columnSettingTable/index.md +357 -357
  131. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  132. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  133. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  134. package/src/components/Business/moreTreeTable/index.less +99 -99
  135. package/src/components/Business/moreTreeTable/index.md +508 -508
  136. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  137. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  138. package/src/components/Functional/AddSelect/index.less +367 -367
  139. package/src/components/Functional/AddSelect/index.md +155 -155
  140. package/src/components/Functional/AddSelect/index.tsx +1072 -1072
  141. package/src/components/Functional/BillEntry/index.less +371 -371
  142. package/src/components/Functional/BillEntry/index.md +39 -39
  143. package/src/components/Functional/BillEntry/index.tsx +766 -766
  144. package/src/components/Functional/DataImport/index.less +63 -63
  145. package/src/components/Functional/DataImport/index.md +44 -44
  146. package/src/components/Functional/DataImport/index.tsx +695 -695
  147. package/src/components/Functional/DataValidation/index.less +63 -63
  148. package/src/components/Functional/DataValidation/index.md +39 -39
  149. package/src/components/Functional/DataValidation/index.tsx +687 -687
  150. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  151. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  152. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  153. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  154. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  155. package/src/components/Functional/SearchSelect/index.less +115 -115
  156. package/src/components/Functional/SearchSelect/index.md +141 -141
  157. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  158. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  159. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  160. package/src/components/Functional/TreeSearchSelect/index.tsx +160 -160
  161. package/src/index.ts +34 -34
  162. package/src/plugin/TableColumnSetting/index.less +247 -247
  163. package/src/plugin/TableColumnSetting/index.md +50 -50
  164. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  165. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  166. package/src/styles/bsDefault.less +1906 -1906
  167. package/src/utils/CheckOneUser/index.md +39 -39
  168. package/src/utils/CheckOneUser/index.ts +51 -51
  169. package/src/utils/LocalstorageUtils.ts +33 -33
  170. package/src/utils/TableUtils.tsx +18 -18
  171. package/src/utils/checkUtils.ts +39 -39
  172. package/src/utils/enumConfig.ts +11 -10
  173. package/src/utils/getFormMode.js +12 -12
  174. package/src/utils/index.ts +2 -2
  175. package/src/utils/requestUtils.ts +33 -33
  176. package/src/utils/serialize.js +7 -7
  177. package/src/utils/utils.ts +183 -183
  178. package/tsconfig.json +29 -29
  179. package/typings.d.ts +4 -4
package/dist/index.esm.js CHANGED
@@ -32,7 +32,8 @@ var ENUM = {
32
32
  LIMIT_MENU_DATA: 'limitedMenuData',
33
33
  USER_INFO: 'userInfo',
34
34
  DICT_CODES: 'dicData',
35
- CHILD_APP_BACK: 'child_app_back' //标记子应用goback事件
35
+ CHILD_APP_BACK: 'child_app_back',
36
+ SEARCH_FIELDS_CONDITION: 'searchFieldsCondition' //表格搜索项信息缓存
36
37
  }
37
38
  };
38
39
 
@@ -16946,22 +16947,494 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
16946
16947
  row: this.DraggableBodyRow
16947
16948
  }
16948
16949
  }
16949
- }))))), /*#__PURE__*/React.createElement("img", {
16950
- width: 32,
16950
+ }))))), /*#__PURE__*/React.createElement("div", {
16951
16951
  onClick: this.showModal,
16952
- src: shezhi
16953
- }));
16952
+ style: {
16953
+ fontSize: 14
16954
+ }
16955
+ }, "\u5217\u8BBE\u7F6E"));
16954
16956
  }
16955
16957
  }]);
16956
16958
  return SortableTable;
16957
16959
  }(React.Component);
16958
16960
 
16959
- var _excluded$d = ["onResize", "width"];
16961
+ var _excluded$d = ["className", "style"];
16962
+ var DragHandle$3 = SortableHandle(function () {
16963
+ return /*#__PURE__*/React.createElement("img", {
16964
+ src: drag
16965
+ });
16966
+ });
16967
+ var SortableItem$3 = SortableElement(function (props) {
16968
+ return /*#__PURE__*/React.createElement("tr", _objectSpread2({}, props));
16969
+ });
16970
+ var SortableBody$3 = SortableContainer(function (props) {
16971
+ return /*#__PURE__*/React.createElement("tbody", _objectSpread2({}, props));
16972
+ });
16973
+ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
16974
+ _inherits(SearchItemTable, _React$Component);
16975
+ var _super = _createSuper(SearchItemTable);
16976
+ function SearchItemTable() {
16977
+ var _this;
16978
+ _classCallCheck(this, SearchItemTable);
16979
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16980
+ args[_key] = arguments[_key];
16981
+ }
16982
+ _this = _super.call.apply(_super, [this].concat(args));
16983
+ _this.state = {
16984
+ dataSource: [],
16985
+ columns: [],
16986
+ sortDataSource: [],
16987
+ setVisible: false,
16988
+ searchDataSource: false,
16989
+ onSearchSort: false,
16990
+ isDefaultValue: false,
16991
+ defaultValue: [],
16992
+ bsTableCode: '' //设置table 列的标识
16993
+ };
16994
+ _this.patchUserSearchFieldsConfig = function (config) {
16995
+ var that = _assertThisInitialized(_this);
16996
+ var configvalue = config ? config.map(function (item) {
16997
+ return {
16998
+ name: item.name,
16999
+ hidden: item.hidden
17000
+ };
17001
+ }) : '';
17002
+ axios({
17003
+ url: '/user/appConfig/saveQueryCriteria',
17004
+ method: 'POST',
17005
+ data: {
17006
+ code: that.state.bsTableCode,
17007
+ detail: configvalue ? JSON.stringify(configvalue) : ''
17008
+ }
17009
+ }).then(function (res) {
17010
+ var _res$data;
17011
+ if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
17012
+ _this.patchConfigToLocalstorage(configvalue);
17013
+ } else {
17014
+ message.error('保存搜索项自定义失败,请稍后尝试');
17015
+ }
17016
+ });
17017
+ };
17018
+ _this.getConfigFromlocalstorage = function () {
17019
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION) || '[]';
17020
+ var configArray = JSON.parse(config);
17021
+ var configSetting = configArray.filter(function (item) {
17022
+ return item.code === _this.state.bsTableCode;
17023
+ });
17024
+ if (configSetting.length && configSetting[0].detail) {
17025
+ return JSON.parse(configSetting[0].detail);
17026
+ }
17027
+ return [];
17028
+ };
17029
+ _this.patchConfigToLocalstorage = function (configvalue) {
17030
+ var setShowSearchFields = _this.props.setShowSearchFields;
17031
+ var _this$state = _this.state,
17032
+ sortDataSource = _this$state.sortDataSource,
17033
+ bsTableCode = _this$state.bsTableCode;
17034
+ var config = localStorage.getItem(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION) || '[]';
17035
+ var configArray = JSON.parse(config);
17036
+ var currentSetting = configArray.filter(function (item) {
17037
+ return item.code === bsTableCode;
17038
+ });
17039
+ if (currentSetting.length) {
17040
+ currentSetting[0].detail = JSON.stringify(configvalue);
17041
+ } else {
17042
+ configArray.push({
17043
+ "code": bsTableCode,
17044
+ "detail": JSON.stringify(configvalue)
17045
+ });
17046
+ }
17047
+ localStorage.setItem(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION, JSON.stringify(configArray));
17048
+ _this.setState({
17049
+ visible: false
17050
+ });
17051
+ setShowSearchFields(_toConsumableArray(sortDataSource));
17052
+ };
17053
+ _this.setInitValue = function () {
17054
+ var _this$props = _this.props,
17055
+ datasource = _this$props.datasource,
17056
+ showSearchFields = _this$props.showSearchFields;
17057
+ var config = _this.getConfigFromlocalstorage();
17058
+ _this.setState({
17059
+ isDefaultValue: true,
17060
+ dataSource: datasource.map(function (item) {
17061
+ var innerItem = config.filter(function (inneritem) {
17062
+ var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
17063
+ var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
17064
+ return innerKey && innerKey === itemKey;
17065
+ });
17066
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17067
+ hidden: config.length && !innerItem.length
17068
+ });
17069
+ }),
17070
+ defaultValue: datasource.map(function (item) {
17071
+ var innerItem = config.filter(function (inneritem) {
17072
+ var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
17073
+ var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
17074
+ return innerKey && innerKey === itemKey;
17075
+ });
17076
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17077
+ hidden: config.length && !innerItem.length
17078
+ });
17079
+ }),
17080
+ sortDataSource: _toConsumableArray(showSearchFields)
17081
+ });
17082
+ };
17083
+ _this.columns = [{
17084
+ title: '搜索字段名称',
17085
+ dataIndex: 'label',
17086
+ className: 'drag-visible',
17087
+ width: 100
17088
+ }, {
17089
+ title: '删除',
17090
+ dataIndex: 'title1',
17091
+ render: function render(text, record) {
17092
+ return /*#__PURE__*/React.createElement("span", {
17093
+ onClick: function onClick() {
17094
+ _this.setState({
17095
+ sortDataSource: _this.state.sortDataSource.filter(function (item) {
17096
+ return item.label !== record.label;
17097
+ }),
17098
+ isDefaultValue: false,
17099
+ dataSource: _toConsumableArray(_this.state.dataSource.map(function (item) {
17100
+ if (item.label === record.label) {
17101
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17102
+ hidden: true
17103
+ });
17104
+ }
17105
+ return item;
17106
+ }))
17107
+ });
17108
+ }
17109
+ }, /*#__PURE__*/React.createElement("img", {
17110
+ src: close
17111
+ }));
17112
+ }
17113
+ }, {
17114
+ title: 'Sort',
17115
+ dataIndex: 'sort',
17116
+ className: 'drag-visible',
17117
+ render: function render() {
17118
+ return /*#__PURE__*/React.createElement(DragHandle$3, null);
17119
+ }
17120
+ }];
17121
+ _this.showModal = function () {
17122
+ _this.setState({
17123
+ visible: true
17124
+ });
17125
+ _this.setInitValue();
17126
+ };
17127
+ _this.handleOk = function (e) {
17128
+ var _this$state2 = _this.state,
17129
+ sortDataSource = _this$state2.sortDataSource,
17130
+ isDefaultValue = _this$state2.isDefaultValue,
17131
+ defaultValue = _this$state2.defaultValue;
17132
+ if (!sortDataSource.length) {
17133
+ message.warning('至少选择一个搜索项!');
17134
+ return;
17135
+ }
17136
+ _this.patchUserSearchFieldsConfig(sortDataSource);
17137
+ };
17138
+ _this.handleCancel = function (e) {
17139
+ console.log(e);
17140
+ _this.setState({
17141
+ visible: false
17142
+ });
17143
+ };
17144
+ _this.handleTableHeadHidden = function (title) {
17145
+ var _this$state3 = _this.state,
17146
+ sortDataSource = _this$state3.sortDataSource,
17147
+ dataSource = _this$state3.dataSource;
17148
+ _this.setState({
17149
+ sortDataSource: sortDataSource.filter(function (item) {
17150
+ return item.title !== title;
17151
+ }),
17152
+ dataSource: _toConsumableArray(dataSource.map(function (item) {
17153
+ if (item.title === title) {
17154
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17155
+ hidden: true
17156
+ });
17157
+ }
17158
+ return item;
17159
+ }))
17160
+ }, function () {
17161
+ _this.handleOk();
17162
+ });
17163
+ };
17164
+ _this.onSortEnd = function (_ref) {
17165
+ var oldIndex = _ref.oldIndex,
17166
+ newIndex = _ref.newIndex;
17167
+ var sortDataSource = _this.state.sortDataSource;
17168
+ if (oldIndex !== newIndex) {
17169
+ var newData = arrayMoveImmutable([].concat(sortDataSource), oldIndex, newIndex).filter(function (el) {
17170
+ return !!el;
17171
+ });
17172
+ _this.setState({
17173
+ sortDataSource: _toConsumableArray(newData),
17174
+ isDefaultValue: false
17175
+ });
17176
+ }
17177
+ };
17178
+ _this.DraggableContainer = function (props) {
17179
+ return /*#__PURE__*/React.createElement(SortableBody$3, _objectSpread2({
17180
+ useDragHandle: true,
17181
+ disableAutoscroll: true,
17182
+ helperClass: "row-dragging",
17183
+ onSortEnd: _this.onSortEnd
17184
+ }, props));
17185
+ };
17186
+ _this.DraggableBodyRow = function (_ref2) {
17187
+ var className = _ref2.className,
17188
+ style = _ref2.style,
17189
+ restProps = _objectWithoutProperties(_ref2, _excluded$d);
17190
+ var sortDataSource = _this.state.sortDataSource;
17191
+ var index = sortDataSource.findIndex(function (x) {
17192
+ return x.name === restProps['data-row-key'];
17193
+ });
17194
+ return /*#__PURE__*/React.createElement(SortableItem$3, _objectSpread2({
17195
+ index: index
17196
+ }, restProps));
17197
+ };
17198
+ _this.onChange = function (e, label) {
17199
+ var _this$state4 = _this.state,
17200
+ sortDataSource = _this$state4.sortDataSource,
17201
+ dataSource = _this$state4.dataSource;
17202
+ if (!e.target.checked) {
17203
+ _this.setState({
17204
+ sortDataSource: sortDataSource.filter(function (item) {
17205
+ return item.label !== label;
17206
+ }),
17207
+ isDefaultValue: false,
17208
+ dataSource: _toConsumableArray(dataSource.map(function (item) {
17209
+ if (item.label === label) {
17210
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17211
+ hidden: true
17212
+ });
17213
+ }
17214
+ return item;
17215
+ }))
17216
+ });
17217
+ } else {
17218
+ var newSortData = [].concat(_toConsumableArray(sortDataSource), _toConsumableArray(dataSource.filter(function (item) {
17219
+ return item.label === label;
17220
+ }).map(function (source) {
17221
+ return _objectSpread2(_objectSpread2({}, source), {}, {
17222
+ hidden: false
17223
+ });
17224
+ })));
17225
+ _this.setState({
17226
+ sortDataSource: _toConsumableArray(newSortData),
17227
+ isDefaultValue: false,
17228
+ dataSource: _toConsumableArray(dataSource.map(function (item) {
17229
+ if (item.label === label) {
17230
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17231
+ hidden: false
17232
+ });
17233
+ }
17234
+ return item;
17235
+ }))
17236
+ });
17237
+ }
17238
+ };
17239
+ _this.handleReset = function () {
17240
+ _this.setInitValue(true);
17241
+ };
17242
+ _this.onSearch = function (e) {
17243
+ _this.setState({
17244
+ searchDataSource: e.target.value
17245
+ });
17246
+ };
17247
+ _this.onSearchSort = function (e) {
17248
+ _this.setState({
17249
+ onSearchSort: e.target.value
17250
+ });
17251
+ };
17252
+ return _this;
17253
+ }
17254
+ _createClass(SearchItemTable, [{
17255
+ key: "componentDidMount",
17256
+ value: function componentDidMount() {
17257
+ var _this$props2 = this.props,
17258
+ datasource = _this$props2.datasource,
17259
+ showSearchFields = _this$props2.showSearchFields,
17260
+ bsTableCode = _this$props2.bsTableCode;
17261
+ var config = this.getConfigFromlocalstorage();
17262
+ this.setState({
17263
+ dataSource: datasource.map(function (item) {
17264
+ var innerItem = config.filter(function (inneritem) {
17265
+ var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
17266
+ var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
17267
+ return innerKey && innerKey === itemKey;
17268
+ });
17269
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17270
+ hidden: config.length && !innerItem.length
17271
+ });
17272
+ }),
17273
+ defaultValue: datasource.map(function (item) {
17274
+ var innerItem = config.filter(function (inneritem) {
17275
+ var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
17276
+ var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
17277
+ return innerKey && innerKey === itemKey;
17278
+ });
17279
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17280
+ hidden: config.length && !innerItem.length
17281
+ });
17282
+ }),
17283
+ sortDataSource: datasource.filter(function (item) {
17284
+ return !item.hidden;
17285
+ }).map(function (item) {
17286
+ return _objectSpread2({}, item);
17287
+ }),
17288
+ bsTableCode: bsTableCode
17289
+ });
17290
+ }
17291
+ }, {
17292
+ key: "render",
17293
+ value: function render() {
17294
+ var _this2 = this;
17295
+ var _this$state5 = this.state,
17296
+ _this$state5$dataSour = _this$state5.dataSource,
17297
+ dataSource = _this$state5$dataSour === void 0 ? [] : _this$state5$dataSour,
17298
+ searchDataSource = _this$state5.searchDataSource,
17299
+ sortDataSource = _this$state5.sortDataSource,
17300
+ visible = _this$state5.visible,
17301
+ onSearchSort = _this$state5.onSearchSort;
17302
+ var newSearchSource = dataSource.filter(function (item) {
17303
+ var _item$label;
17304
+ return (item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.indexOf(searchDataSource || '')) > -1;
17305
+ });
17306
+ return /*#__PURE__*/React.createElement("div", {
17307
+ className: 'sort_table_wrapper'
17308
+ }, visible && /*#__PURE__*/React.createElement(Modal, {
17309
+ title: "\u8BBE\u7F6E\u641C\u7D22\u9879\u5185\u5BB9",
17310
+ wrapClassName: 'sort_table_wrapper',
17311
+ width: 820,
17312
+ visible: visible,
17313
+ onOk: this.handleOk,
17314
+ onCancel: this.handleCancel,
17315
+ footer: [/*#__PURE__*/React.createElement(Button, {
17316
+ key: "back",
17317
+ onClick: this.handleReset
17318
+ }, "\u6062\u590D\u9ED8\u8BA4"), /*#__PURE__*/React.createElement(Button, {
17319
+ key: "submit",
17320
+ onClick: this.handleCancel
17321
+ }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
17322
+ key: "submit",
17323
+ type: "primary",
17324
+ onClick: this.handleOk
17325
+ }, "\u786E\u8BA4")]
17326
+ }, /*#__PURE__*/React.createElement("div", {
17327
+ className: 'sort_table'
17328
+ }, /*#__PURE__*/React.createElement("div", {
17329
+ className: 'sort_table_column_wrapper'
17330
+ }, /*#__PURE__*/React.createElement("span", {
17331
+ className: 'sort_table_column_count'
17332
+ }, "\u53EF\u9009\u5B57\u6BB5 ", /*#__PURE__*/React.createElement("span", null, "\uFF08\u5171", dataSource.length, "\u4E2A\uFF09")), /*#__PURE__*/React.createElement("div", {
17333
+ className: 'sort_table_column'
17334
+ }, /*#__PURE__*/React.createElement(Input, {
17335
+ prefix: /*#__PURE__*/React.createElement(SearchOutlined, {
17336
+ className: "site-form-item-icon"
17337
+ }),
17338
+ placeholder: "\u641C\u7D22",
17339
+ allowClear: true,
17340
+ onChange: this.onSearch,
17341
+ style: {
17342
+ width: 540
17343
+ }
17344
+ }), /*#__PURE__*/React.createElement("div", null, !searchDataSource && /*#__PURE__*/React.createElement(Checkbox, {
17345
+ checked: !dataSource.some(function (item) {
17346
+ if (item.hidden) return true;
17347
+ return false;
17348
+ }),
17349
+ onClick: function onClick(e) {
17350
+ _this2.setState({
17351
+ isDefaultValue: false,
17352
+ dataSource: _toConsumableArray(dataSource.map(function (item) {
17353
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17354
+ hidden: !e.target.checked
17355
+ });
17356
+ })),
17357
+ sortDataSource: e.target.checked ? _toConsumableArray(dataSource.map(function (item) {
17358
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17359
+ hidden: false
17360
+ });
17361
+ })) : []
17362
+ });
17363
+ }
17364
+ }, "\u5168\u9009")), /*#__PURE__*/React.createElement("div", {
17365
+ className: 'sort_table_column_all'
17366
+ }, searchDataSource ? newSearchSource.map(function (item) {
17367
+ return /*#__PURE__*/React.createElement(Checkbox, {
17368
+ checked: !item.hidden,
17369
+ onChange: function onChange(e) {
17370
+ _this2.onChange(e, item.label);
17371
+ }
17372
+ }, item.label);
17373
+ }) : dataSource.map(function (item) {
17374
+ return /*#__PURE__*/React.createElement(Checkbox, {
17375
+ checked: !item.hidden,
17376
+ onChange: function onChange(e) {
17377
+ _this2.onChange(e, item.label);
17378
+ }
17379
+ }, item.label);
17380
+ }), !!newSearchSource.length && /*#__PURE__*/React.createElement("span", {
17381
+ style: {
17382
+ width: '144px'
17383
+ }
17384
+ }), !newSearchSource.length && /*#__PURE__*/React.createElement("div", {
17385
+ className: 'sort_table_column_all_empty'
17386
+ }, "\u672A\u67E5\u8BE2\u5230\u7ED3\u679C")))), /*#__PURE__*/React.createElement("div", {
17387
+ className: 'sort_table_content_wrapper'
17388
+ }, /*#__PURE__*/React.createElement("span", {
17389
+ className: 'sort_table_content_count'
17390
+ }, "\u5DF2\u9009\u5B57\u6BB5 ", /*#__PURE__*/React.createElement("span", null, "\uFF08\u5171", sortDataSource.length, "\u4E2A\uFF09")), /*#__PURE__*/React.createElement("div", {
17391
+ className: 'sort_table_content'
17392
+ }, /*#__PURE__*/React.createElement("span", {
17393
+ style: {
17394
+ paddingLeft: '10px'
17395
+ }
17396
+ }, /*#__PURE__*/React.createElement(Input, {
17397
+ prefix: /*#__PURE__*/React.createElement(SearchOutlined, {
17398
+ className: "site-form-item-icon"
17399
+ }),
17400
+ placeholder: "\u641C\u7D22",
17401
+ allowClear: true,
17402
+ onChange: this.onSearchSort,
17403
+ style: {
17404
+ width: 190
17405
+ }
17406
+ })), /*#__PURE__*/React.createElement(Table, {
17407
+ pagination: false,
17408
+ showHeader: false,
17409
+ dataSource: onSearchSort ? sortDataSource.filter(function (item) {
17410
+ var _item$label2;
17411
+ return (item === null || item === void 0 ? void 0 : (_item$label2 = item.label) === null || _item$label2 === void 0 ? void 0 : _item$label2.indexOf(onSearchSort)) > -1;
17412
+ }) : sortDataSource,
17413
+ columns: this.columns,
17414
+ rowKey: "name",
17415
+ components: {
17416
+ body: {
17417
+ wrapper: this.DraggableContainer,
17418
+ row: this.DraggableBodyRow
17419
+ }
17420
+ }
17421
+ }))))), /*#__PURE__*/React.createElement("div", {
17422
+ onClick: this.showModal,
17423
+ style: {
17424
+ fontSize: 14
17425
+ }
17426
+ }, "\u641C\u7D22\u9879\u8BBE\u7F6E"));
17427
+ }
17428
+ }]);
17429
+ return SearchItemTable;
17430
+ }(React.Component);
17431
+
17432
+ var _excluded$e = ["onResize", "width"];
16960
17433
  var MemoQueryTable = /*#__PURE__*/React.memo(QueryTable);
16961
17434
  var ResizeableTitle$2 = function ResizeableTitle(props) {
16962
17435
  var onResize = props.onResize,
16963
17436
  width = props.width,
16964
- restProps = _objectWithoutProperties(props, _excluded$d);
17437
+ restProps = _objectWithoutProperties(props, _excluded$e);
16965
17438
  if (!width) {
16966
17439
  return /*#__PURE__*/React.createElement("th", _objectSpread2({}, restProps));
16967
17440
  }
@@ -17006,14 +17479,18 @@ var BsSulaQueryTable = (function (props) {
17006
17479
  var _useState11 = useState([]),
17007
17480
  _useState12 = _slicedToArray(_useState11, 2),
17008
17481
  showColumn = _useState12[0],
17009
- setShowColumns = _useState12[1];
17482
+ setShowColumns = _useState12[1]; // 列字段
17483
+ var _useState13 = useState([]),
17484
+ _useState14 = _slicedToArray(_useState13, 2),
17485
+ showSearchFields = _useState14[0],
17486
+ setShowSearchFields = _useState14[1]; //搜索项字段
17010
17487
  var _props$isPage = props.isPage,
17011
17488
  pagination = props.pagination,
17012
17489
  tableCode = props.tableCode;
17013
- var _useState13 = useState('100vh'),
17014
- _useState14 = _slicedToArray(_useState13, 2),
17015
- height = _useState14[0],
17016
- setHeight = _useState14[1];
17490
+ var _useState15 = useState('100vh'),
17491
+ _useState16 = _slicedToArray(_useState15, 2),
17492
+ height = _useState16[0],
17493
+ setHeight = _useState16[1];
17017
17494
  var sortTableRef = useRef(null);
17018
17495
  var bsTableCode = tableCode || window.location.hash; //设置列字段的唯一标识
17019
17496
  // 获取table高度
@@ -17033,8 +17510,8 @@ var BsSulaQueryTable = (function (props) {
17033
17510
  if (isFull == undefined) isFull = false;
17034
17511
  return isFull;
17035
17512
  }
17036
- var getConfigFromlocalstorage = function getConfigFromlocalstorage() {
17037
- var config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
17513
+ var getConfigFromlocalstorage = function getConfigFromlocalstorage(type) {
17514
+ var config = localStorage.getItem(type) || '[]';
17038
17515
  var configArray = JSON.parse(config);
17039
17516
  var configSetting = configArray.filter(function (item) {
17040
17517
  return item.code === bsTableCode;
@@ -17090,7 +17567,7 @@ var BsSulaQueryTable = (function (props) {
17090
17567
  columns: _toConsumableArray(props.columns)
17091
17568
  }));
17092
17569
  var columns = props.columns;
17093
- var columnConfig = getConfigFromlocalstorage();
17570
+ var columnConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.COLUMN_CONDITION);
17094
17571
  var showColumns = columnConfig.length ? columnConfig.map(function (item) {
17095
17572
  var inner = columns.filter(function (inneritem) {
17096
17573
  var innerKey = Array.isArray(inneritem.key || inneritem.dataIndex) ? JSON.stringify(inneritem.key || inneritem.dataIndex) : inneritem.key || inneritem.dataIndex;
@@ -17114,10 +17591,25 @@ var BsSulaQueryTable = (function (props) {
17114
17591
  });
17115
17592
  setShowColumns(_toConsumableArray(showColumns));
17116
17593
  };
17594
+ var setInitialSearchFieldsInfo = function setInitialSearchFieldsInfo() {
17595
+ //获取搜索字段的缓存配置
17596
+ var fields = props.fields;
17597
+ var searchFieldsConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION);
17598
+ var showSearchFields = searchFieldsConfig.length ? searchFieldsConfig.map(function (item) {
17599
+ var inner = fields.filter(function (inneritem) {
17600
+ var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
17601
+ var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
17602
+ return innerKey && innerKey === itemKey;
17603
+ })[0];
17604
+ return _objectSpread2(_objectSpread2({}, inner), item);
17605
+ }) : fields;
17606
+ setShowSearchFields(_toConsumableArray(showSearchFields));
17607
+ };
17117
17608
  //组件初始挂载
17118
17609
  useEffect(function () {
17119
17610
  getTableHeight();
17120
17611
  setInitialTableInfo();
17612
+ setInitialSearchFieldsInfo();
17121
17613
  window.addEventListener('resize', function (e) {
17122
17614
  watchWinResize();
17123
17615
  });
@@ -17134,6 +17626,17 @@ var BsSulaQueryTable = (function (props) {
17134
17626
  JSON.stringify(newKeys) !== JSON.stringify(oldKeys) && setInitialTableInfo();
17135
17627
  }
17136
17628
  }, [props === null || props === void 0 ? void 0 : props.columns]);
17629
+ useEffect(function () {
17630
+ if ((props === null || props === void 0 ? void 0 : props.fields) && (value === null || value === void 0 ? void 0 : value.fields)) {
17631
+ var newKeys = props.fields.map(function (d) {
17632
+ return Array.isArray(d.name) ? JSON.stringify(d.name) : d.name;
17633
+ });
17634
+ var oldKeys = value.fields.map(function (d) {
17635
+ return Array.isArray(d.name) ? JSON.stringify(d.name) : d.name;
17636
+ });
17637
+ JSON.stringify(newKeys) !== JSON.stringify(oldKeys) && setInitialSearchFieldsInfo();
17638
+ }
17639
+ }, [props === null || props === void 0 ? void 0 : props.fields]);
17137
17640
  useEffect(function () {
17138
17641
  setInitialTableInfo();
17139
17642
  }, [props === null || props === void 0 ? void 0 : props.refreshColumns]);
@@ -17245,16 +17748,28 @@ var BsSulaQueryTable = (function (props) {
17245
17748
  actionsRender = [].concat(_toConsumableArray(actionsRender), [{
17246
17749
  type: 'text',
17247
17750
  props: {
17248
- children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
17249
- title: "\u5217\u8BBE\u7F6E"
17751
+ children: /*#__PURE__*/React.createElement("span", {
17752
+ className: "ant-dropdown-link"
17753
+ }, /*#__PURE__*/React.createElement(Dropdown, {
17754
+ overlay: /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement(SortableTable$1, {
17755
+ ref: sortTableRef,
17756
+ setShowColumns: setShowColumns,
17757
+ showColumn: showColumn,
17758
+ datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
17759
+ bsTableCode: bsTableCode
17760
+ })), /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement(SearchItemTable, {
17761
+ ref: sortTableRef,
17762
+ setShowSearchFields: setShowSearchFields,
17763
+ showSearchFields: showSearchFields,
17764
+ datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
17765
+ bsTableCode: bsTableCode
17766
+ }))),
17767
+ placement: "bottom"
17250
17768
  }, /*#__PURE__*/React.createElement("span", {
17251
17769
  className: "ant-dropdown-link"
17252
- }, /*#__PURE__*/React.createElement(SortableTable$1, {
17253
- ref: sortTableRef,
17254
- setShowColumns: setShowColumns,
17255
- showColumn: showColumn,
17256
- datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
17257
- bsTableCode: bsTableCode
17770
+ }, /*#__PURE__*/React.createElement("img", {
17771
+ width: 32,
17772
+ src: shezhi
17258
17773
  }))))
17259
17774
  }
17260
17775
  }, {
@@ -17338,6 +17853,7 @@ var BsSulaQueryTable = (function (props) {
17338
17853
  }, handleTimeValue()), {}, {
17339
17854
  tableProps: setTableProps(),
17340
17855
  columns: _toConsumableArray(showColumn),
17856
+ fields: _toConsumableArray(showSearchFields),
17341
17857
  ref: props.forwardedRef || refs,
17342
17858
  isFullScreen: isFullScreen
17343
17859
  });
@@ -17360,7 +17876,7 @@ var BsSulaQueryTable = (function (props) {
17360
17876
  summary: props.summary,
17361
17877
  statusMapping: props.statusMapping
17362
17878
  });
17363
- }, [value, checkedList, showColumn, props.statusMapping]);
17879
+ }, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
17364
17880
  return /*#__PURE__*/React.createElement(MemoQueryTable, _objectSpread2({}, memoConfig));
17365
17881
  });
17366
17882
 
@@ -19433,7 +19949,7 @@ var CustomerMenuHeader = function CustomerMenuHeader(_ref) {
19433
19949
  var css_248z$m = ".customer_menu_content {\n color: #b1bad4;\n background: #141620;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n height: 40px;\n border-bottom: 1px solid #3d4047;\n}\n.customer_menu_content .ant-btn-link {\n color: #b1bad4 !important;\n font-size: 16px;\n height: 36px;\n}\n.menu_item {\n line-height: 30px;\n height: 30px;\n color: rgba(44, 47, 46);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.link_style:hover {\n background-color: #e4e7ed;\n cursor: pointer;\n color: #1890ff;\n}\n.sub_menu_content {\n box-shadow: 2px 0px 4px 0px rgba(185, 185, 185, 0.5);\n position: fixed;\n top: 50px;\n left: 140px;\n width: 200px;\n height: 100%;\n background-color: #fff;\n padding-top: 10px;\n z-index: 9999;\n}\n.tab_left_operate {\n display: flex;\n height: 28px;\n align-items: center;\n}\n.tab_left_operate > div {\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n cursor: pointer;\n}\n.tab_left_operate > div:last-child {\n box-shadow: 2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n}\n.tab_right_operate {\n height: 28px;\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n box-shadow: -2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n cursor: pointer;\n position: relative;\n}\n";
19434
19950
  styleInject(css_248z$m);
19435
19951
 
19436
- var _excluded$e = ["route"];
19952
+ var _excluded$f = ["route"];
19437
19953
  var TabPane = Tabs.TabPane;
19438
19954
  var UN_LISTTEN_DRP;
19439
19955
  var routerArray = [];
@@ -20231,7 +20747,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
20231
20747
  }); // 添加数据大屏
20232
20748
  var _this$props3 = this.props,
20233
20749
  route = _this$props3.route,
20234
- restPrpos = _objectWithoutProperties(_this$props3, _excluded$e);
20750
+ restPrpos = _objectWithoutProperties(_this$props3, _excluded$f);
20235
20751
  var exist = route.routes.find(function (route) {
20236
20752
  return route.path === '/homePage/data-show';
20237
20753
  });
@@ -21027,10 +21543,10 @@ var index$6 = /*#__PURE__*/forwardRef(function (props, ref) {
21027
21543
  }))))));
21028
21544
  });
21029
21545
 
21030
- var _excluded$f = ["children"];
21546
+ var _excluded$g = ["children"];
21031
21547
  var Drawer = (function (props) {
21032
21548
  var children = props.children,
21033
- restProps = _objectWithoutProperties(props, _excluded$f);
21549
+ restProps = _objectWithoutProperties(props, _excluded$g);
21034
21550
  return /*#__PURE__*/React.createElement(Drawer$1, _objectSpread2({
21035
21551
  mask: true,
21036
21552
  closable: false,