@bit-sun/business-component 2.3.8 → 2.3.10-alpha.1

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 (202) 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/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  10. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +2 -2
  11. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  12. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  13. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  14. package/dist/index.esm.js +1075 -957
  15. package/dist/index.js +1081 -963
  16. package/dist/utils/utils.d.ts +1 -1
  17. package/docs/index.md +21 -21
  18. package/lib/assets/drag.svg +17 -17
  19. package/lib/assets/exportFail.svg +37 -37
  20. package/lib/assets/exportProcessing.svg +28 -28
  21. package/lib/assets/exportSuccess.svg +34 -34
  22. package/lib/assets/label_icon_bottom.svg +25 -25
  23. package/lib/assets/upExport.svg +22 -22
  24. package/package.json +78 -78
  25. package/src/assets/32.svg +27 -27
  26. package/src/assets/addIcon.svg +17 -17
  27. package/src/assets/allfunc.svg +27 -27
  28. package/src/assets/arrowRight.svg +24 -24
  29. package/src/assets/btn-delete.svg +29 -29
  30. package/src/assets/btn-edit.svg +19 -19
  31. package/src/assets/btn-more.svg +17 -17
  32. package/src/assets/btn-submit.svg +19 -19
  33. package/src/assets/caidan.svg +11 -11
  34. package/src/assets/close.svg +26 -26
  35. package/src/assets/drag.svg +17 -17
  36. package/src/assets/exportFail.svg +37 -37
  37. package/src/assets/exportProcessing.svg +28 -28
  38. package/src/assets/exportSuccess.svg +34 -34
  39. package/src/assets/fixed-left-active.svg +11 -11
  40. package/src/assets/fixed-left.svg +15 -15
  41. package/src/assets/fixed-right-active.svg +11 -11
  42. package/src/assets/fixed-right.svg +15 -15
  43. package/src/assets/guanbi.svg +15 -15
  44. package/src/assets/icon-quanping.svg +15 -15
  45. package/src/assets/icon-shezhi.svg +17 -17
  46. package/src/assets/label_icon_bottom.svg +25 -25
  47. package/src/assets/list-no-img.svg +21 -21
  48. package/src/assets/morentouxiang-32.svg +23 -23
  49. package/src/assets/scanning.svg +24 -24
  50. package/src/assets/upExport.svg +22 -22
  51. package/src/common/ENUM.ts +41 -41
  52. package/src/components/Business/AddSelectBusiness/index.md +161 -161
  53. package/src/components/Business/AddSelectBusiness/index.tsx +861 -861
  54. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  55. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  56. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  64. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  65. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  66. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  67. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  68. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  69. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  70. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  71. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  72. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  73. package/src/components/Business/BsLayouts/index.less +79 -79
  74. package/src/components/Business/BsLayouts/index.tsx +1535 -1484
  75. package/src/components/Business/BsLayouts/service.ts +10 -10
  76. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  77. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +564 -564
  78. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  79. package/src/components/Business/BsSulaQueryTable/index.tsx +532 -527
  80. package/src/components/Business/BsSulaQueryTable/setting.tsx +852 -832
  81. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  82. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  83. package/src/components/Business/CommodityEntry/index.md +70 -70
  84. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  85. package/src/components/Business/CommonAlert/index.tsx +23 -23
  86. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  87. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  88. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  89. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  90. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  91. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  92. package/src/components/Business/HomePageWrapper/index.less +33 -33
  93. package/src/components/Business/HomePageWrapper/index.md +45 -45
  94. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  95. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  96. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +205 -205
  97. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  98. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  99. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  100. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  101. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  102. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  103. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  104. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  105. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  106. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  107. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  108. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  109. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  110. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  111. package/src/components/Business/JsonQueryTable/index.less +16 -16
  112. package/src/components/Business/JsonQueryTable/index.md +328 -328
  113. package/src/components/Business/JsonQueryTable/index.tsx +535 -535
  114. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  115. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  116. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  117. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  118. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  119. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  120. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  121. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  122. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  123. package/src/components/Business/SearchSelect/BusinessUtils.ts +1732 -1732
  124. package/src/components/Business/SearchSelect/common.ts +53 -53
  125. package/src/components/Business/SearchSelect/index.md +1319 -1319
  126. package/src/components/Business/SearchSelect/index.tsx +51 -51
  127. package/src/components/Business/SearchSelect/utils.ts +100 -100
  128. package/src/components/Business/StateFlow/index.less +130 -130
  129. package/src/components/Business/StateFlow/index.md +60 -60
  130. package/src/components/Business/StateFlow/index.tsx +29 -29
  131. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  132. package/src/components/Business/TreeSearchSelect/index.tsx +33 -33
  133. package/src/components/Business/TreeSearchSelect/utils.ts +75 -75
  134. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  135. package/src/components/Business/columnSettingTable/index.less +247 -247
  136. package/src/components/Business/columnSettingTable/index.md +357 -357
  137. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  138. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  139. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  140. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +86 -86
  141. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  142. package/src/components/Business/moreTreeTable/index.less +99 -99
  143. package/src/components/Business/moreTreeTable/index.md +448 -448
  144. package/src/components/Business/moreTreeTable/index.tsx +387 -387
  145. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  146. package/src/components/Functional/AddSelect/helps.ts +14 -14
  147. package/src/components/Functional/AddSelect/index.less +367 -367
  148. package/src/components/Functional/AddSelect/index.md +155 -155
  149. package/src/components/Functional/AddSelect/index.tsx +1279 -1279
  150. package/src/components/Functional/BillEntry/index.less +371 -371
  151. package/src/components/Functional/BillEntry/index.md +39 -39
  152. package/src/components/Functional/BillEntry/index.tsx +772 -772
  153. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -62
  154. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -178
  155. package/src/components/Functional/BsAntdSula/index.ts +2 -2
  156. package/src/components/Functional/DataImport/index.less +63 -63
  157. package/src/components/Functional/DataImport/index.md +44 -44
  158. package/src/components/Functional/DataImport/index.tsx +695 -695
  159. package/src/components/Functional/DataValidation/index.less +63 -63
  160. package/src/components/Functional/DataValidation/index.md +39 -39
  161. package/src/components/Functional/DataValidation/index.tsx +687 -687
  162. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -5
  163. package/src/components/Functional/EllipsisTooltip/index.js +36 -36
  164. package/src/components/Functional/EllipsisTooltip/index.md +30 -30
  165. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  166. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  167. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  168. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  169. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  170. package/src/components/Functional/SearchSelect/index.less +115 -115
  171. package/src/components/Functional/SearchSelect/index.md +141 -141
  172. package/src/components/Functional/SearchSelect/index.tsx +858 -858
  173. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  174. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  175. package/src/components/Functional/TreeSearchSelect/index.tsx +163 -163
  176. package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
  177. package/src/components/Solution/RuleComponent/index.d.ts +29 -29
  178. package/src/components/Solution/RuleComponent/index.js +2028 -2028
  179. package/src/components/Solution/RuleComponent/index.less +230 -230
  180. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
  181. package/src/components/Solution/RuleComponent/ruleFiled.js +2107 -2107
  182. package/src/components/Solution/RuleComponent/services.ts +13 -13
  183. package/src/components/Solution/RuleComponent/util.js +139 -139
  184. package/src/index.ts +38 -38
  185. package/src/plugin/TableColumnSetting/index.less +247 -247
  186. package/src/plugin/TableColumnSetting/index.md +50 -50
  187. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  188. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  189. package/src/styles/bsDefault.less +1912 -1912
  190. package/src/utils/CheckOneUser/index.md +39 -39
  191. package/src/utils/CheckOneUser/index.ts +51 -51
  192. package/src/utils/LocalstorageUtils.ts +90 -90
  193. package/src/utils/TableUtils.tsx +18 -18
  194. package/src/utils/checkUtils.ts +39 -39
  195. package/src/utils/enumConfig.ts +11 -11
  196. package/src/utils/getFormMode.js +12 -12
  197. package/src/utils/index.ts +4 -4
  198. package/src/utils/requestUtils.ts +34 -34
  199. package/src/utils/serialize.js +7 -7
  200. package/src/utils/utils.ts +212 -212
  201. package/tsconfig.json +29 -29
  202. package/typings.d.ts +4 -4
package/dist/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import axios from 'axios';
2
2
  import { message as message$1, Popover, Card, Avatar, Tooltip, Image, Menu, Space, Dropdown, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix, Cascader, DatePicker, TimePicker, Switch } from 'antd';
3
3
  import _, { omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
4
4
  import { history, formatMessage, useLocation, Link, useModel, useIntl } from 'umi';
5
- import isEqual from 'lodash/isEqual';
5
+ import isEqual$1 from 'lodash/isEqual';
6
6
  import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
7
7
  import moment$1 from 'moment';
8
8
  import { UnorderedListOutlined, ProfileTwoTone, ExclamationCircleOutlined, DownOutlined, CopyOutlined, SearchOutlined, CaretLeftOutlined, CloseCircleOutlined, ArrowLeftOutlined, FolderOutlined, EllipsisOutlined, CaretDownOutlined, HomeOutlined, DoubleLeftOutlined, DoubleRightOutlined, MenuUnfoldOutlined, DashOutlined, SettingOutlined, BulbOutlined, PlayCircleOutlined, SaveOutlined, FullscreenExitOutlined, EditOutlined, MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons';
@@ -762,41 +762,52 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
762
762
  return '';
763
763
  };
764
764
 
765
- var simpleIsEqual = function simpleIsEqual(a, b) {
766
- return a === b;
767
- };
768
-
769
- function index$1 (resultFn, isEqual) {
770
- if (isEqual === void 0) {
771
- isEqual = simpleIsEqual;
772
- }
773
-
774
- var lastThis;
775
- var lastArgs = [];
776
- var lastResult;
777
- var calledOnce = false;
778
-
779
- var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
780
- return isEqual(newArg, lastArgs[index], index);
781
- };
782
-
783
- var result = function result() {
784
- for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
785
- newArgs[_key] = arguments[_key];
765
+ var safeIsNaN = Number.isNaN ||
766
+ function ponyfill(value) {
767
+ return typeof value === 'number' && value !== value;
768
+ };
769
+ function isEqual(first, second) {
770
+ if (first === second) {
771
+ return true;
786
772
  }
787
-
788
- if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
789
- return lastResult;
773
+ if (safeIsNaN(first) && safeIsNaN(second)) {
774
+ return true;
790
775
  }
776
+ return false;
777
+ }
778
+ function areInputsEqual(newInputs, lastInputs) {
779
+ if (newInputs.length !== lastInputs.length) {
780
+ return false;
781
+ }
782
+ for (var i = 0; i < newInputs.length; i++) {
783
+ if (!isEqual(newInputs[i], lastInputs[i])) {
784
+ return false;
785
+ }
786
+ }
787
+ return true;
788
+ }
791
789
 
792
- lastResult = resultFn.apply(this, newArgs);
793
- calledOnce = true;
794
- lastThis = this;
795
- lastArgs = newArgs;
796
- return lastResult;
797
- };
798
-
799
- return result;
790
+ function memoizeOne(resultFn, isEqual) {
791
+ if (isEqual === void 0) { isEqual = areInputsEqual; }
792
+ var lastThis;
793
+ var lastArgs = [];
794
+ var lastResult;
795
+ var calledOnce = false;
796
+ function memoized() {
797
+ var newArgs = [];
798
+ for (var _i = 0; _i < arguments.length; _i++) {
799
+ newArgs[_i] = arguments[_i];
800
+ }
801
+ if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
802
+ return lastResult;
803
+ }
804
+ lastResult = resultFn.apply(this, newArgs);
805
+ calledOnce = true;
806
+ lastThis = this;
807
+ lastArgs = newArgs;
808
+ return lastResult;
809
+ }
810
+ return memoized;
800
811
  }
801
812
 
802
813
  function styleInject(css, ref) {
@@ -1010,59 +1021,58 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
1010
1021
  * @returns 返回处理后的查询参数
1011
1022
  */
1012
1023
  function queryParams(params, flag) {
1013
- var _loop = function _loop() {
1024
+ for (var key in params) {
1014
1025
  if (Object.prototype.hasOwnProperty.call(params, key)) {
1015
- var element = params[key];
1016
- if (element && key.indexOf('*number*') >= 0) {
1017
- var dataParams = key.split('*number*');
1018
- dataParams.forEach(function (value, index) {
1019
- params[value] = element[index];
1020
- });
1021
- delete params[key];
1022
- } else if (element && key.indexOf('*address*') >= 0) {
1023
- var _dataParams = key.split('*address*');
1024
- _dataParams.forEach(function (value, index) {
1025
- params[value] = element.PCDCode[index];
1026
- });
1027
- delete params[key];
1028
- } else if (element && key.indexOf('*costType*') >= 0) {
1029
- var _dataParams2 = key.split('*costType*');
1030
- // eslint-disable-next-line prefer-destructuring
1031
- params[_dataParams2[0]] = element[1];
1032
- delete params[key];
1033
- } else if (element && key.indexOf('*fullDate*') >= 0) {
1034
- var _dataParams3 = key.split('*fullDate*');
1035
- _dataParams3.forEach(function (value, index) {
1036
- if (index === 0) {
1037
- params[value] = moment$1(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
1026
+ (function () {
1027
+ var element = params[key];
1028
+ if (element && key.indexOf('*number*') >= 0) {
1029
+ var dataParams = key.split('*number*');
1030
+ dataParams.forEach(function (value, index) {
1031
+ params[value] = element[index];
1032
+ });
1033
+ delete params[key];
1034
+ } else if (element && key.indexOf('*address*') >= 0) {
1035
+ var _dataParams = key.split('*address*');
1036
+ _dataParams.forEach(function (value, index) {
1037
+ params[value] = element.PCDCode[index];
1038
+ });
1039
+ delete params[key];
1040
+ } else if (element && key.indexOf('*costType*') >= 0) {
1041
+ var _dataParams2 = key.split('*costType*');
1042
+ // eslint-disable-next-line prefer-destructuring
1043
+ params[_dataParams2[0]] = element[1];
1044
+ delete params[key];
1045
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
1046
+ var _dataParams3 = key.split('*fullDate*');
1047
+ _dataParams3.forEach(function (value, index) {
1048
+ if (index === 0) {
1049
+ params[value] = moment$1(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
1050
+ } else {
1051
+ params[value] = moment$1(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
1052
+ }
1053
+ });
1054
+ delete params[key];
1055
+ } else if (element && key.indexOf('*') >= 0) {
1056
+ var _dataParams4 = key.split('*');
1057
+ _dataParams4.forEach(function (value, index) {
1058
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
1059
+ });
1060
+ delete params[key];
1061
+ } else if (element && key.indexOf('_likeIn_') >= 0) {
1062
+ var _dataParams5 = key.split('_likeIn_');
1063
+ if (element.indexOf(',') >= 0) {
1064
+ params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
1065
+ params["qp-".concat(_dataParams5[0], "-like")] = null;
1038
1066
  } else {
1039
- params[value] = moment$1(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
1067
+ params["qp-".concat(_dataParams5[0], "-like")] = element;
1068
+ params["qp-".concat(_dataParams5[0], "-in")] = null;
1040
1069
  }
1041
- });
1042
- delete params[key];
1043
- } else if (element && key.indexOf('*') >= 0) {
1044
- var _dataParams4 = key.split('*');
1045
- _dataParams4.forEach(function (value, index) {
1046
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
1047
- });
1048
- delete params[key];
1049
- } else if (element && key.indexOf('_likeIn_') >= 0) {
1050
- var _dataParams5 = key.split('_likeIn_');
1051
- if (element.indexOf(',') >= 0) {
1052
- params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
1053
- params["qp-".concat(_dataParams5[0], "-like")] = null;
1054
- } else {
1055
- params["qp-".concat(_dataParams5[0], "-like")] = element;
1056
- params["qp-".concat(_dataParams5[0], "-in")] = null;
1070
+ delete params[key];
1071
+ } else if (Array.isArray(element)) {
1072
+ params[key] = element.join(',');
1057
1073
  }
1058
- delete params[key];
1059
- } else if (Array.isArray(element)) {
1060
- params[key] = element.join(',');
1061
- }
1074
+ })();
1062
1075
  }
1063
- };
1064
- for (var key in params) {
1065
- _loop();
1066
1076
  }
1067
1077
  return flag ? params : qs.stringify(params);
1068
1078
  }
@@ -1108,7 +1118,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
1108
1118
  return item;
1109
1119
  });
1110
1120
  };
1111
- var memoizeOneFormatter = index$1(formatter, isEqual);
1121
+ var memoizeOneFormatter = memoizeOne(formatter, isEqual$1);
1112
1122
  var go2BackAndClose = function go2BackAndClose() {
1113
1123
  localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
1114
1124
  history.goBack();
@@ -2787,85 +2797,84 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
2787
2797
  });
2788
2798
  }
2789
2799
  // 数组对象处理,对带有特殊标记的name进行处理
2790
- var _loop = function _loop() {
2800
+ for (var key in params) {
2791
2801
  if (Object.prototype.hasOwnProperty.call(params, key)) {
2792
- var element = params[key];
2793
- if (element && key.indexOf('*number*') >= 0) {
2794
- var dataParams = key.split('*number*');
2795
- dataParams.forEach(function (value, index) {
2796
- params[value] = element[index];
2797
- });
2798
- delete params[key];
2799
- } else if (element && key.indexOf('*address*') >= 0) {
2800
- var _dataParams = key.split('*address*');
2801
- _dataParams.forEach(function (value, index) {
2802
- params[value] = element.PCDCode[index];
2803
- });
2804
- delete params[key];
2805
- } else if (element && key.indexOf('*costType*') >= 0) {
2806
- var _dataParams2 = key.split('*costType*');
2807
- // eslint-disable-next-line prefer-destructuring
2808
- params[_dataParams2[0]] = element[1];
2809
- delete params[key];
2810
- } else if (element && key.indexOf('*fullDate*') >= 0) {
2811
- var _dataParams3 = key.split('*fullDate*');
2812
- _dataParams3.forEach(function (value, index) {
2813
- if (index === 0) {
2814
- params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2815
- } else {
2816
- params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2802
+ (function () {
2803
+ var element = params[key];
2804
+ if (element && key.indexOf('*number*') >= 0) {
2805
+ var dataParams = key.split('*number*');
2806
+ dataParams.forEach(function (value, index) {
2807
+ params[value] = element[index];
2808
+ });
2809
+ delete params[key];
2810
+ } else if (element && key.indexOf('*address*') >= 0) {
2811
+ var _dataParams = key.split('*address*');
2812
+ _dataParams.forEach(function (value, index) {
2813
+ params[value] = element.PCDCode[index];
2814
+ });
2815
+ delete params[key];
2816
+ } else if (element && key.indexOf('*costType*') >= 0) {
2817
+ var _dataParams2 = key.split('*costType*');
2818
+ // eslint-disable-next-line prefer-destructuring
2819
+ params[_dataParams2[0]] = element[1];
2820
+ delete params[key];
2821
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
2822
+ var _dataParams3 = key.split('*fullDate*');
2823
+ _dataParams3.forEach(function (value, index) {
2824
+ if (index === 0) {
2825
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2826
+ } else {
2827
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2828
+ }
2829
+ });
2830
+ delete params[key];
2831
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2832
+ var _dataParams4 = key.split('*checkBox*');
2833
+ if (element) {
2834
+ params[_dataParams4[0]] = 0;
2817
2835
  }
2818
- });
2819
- delete params[key];
2820
- } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2821
- var _dataParams4 = key.split('*checkBox*');
2822
- if (element) {
2823
- params[_dataParams4[0]] = 0;
2824
- }
2825
- delete params[key];
2826
- } else if (element && key.indexOf('*cascader*') >= 0) {
2827
- var _dataParams5 = key.split('*cascader*');
2828
- params[_dataParams5[0]] = element[element.length - 1];
2829
- delete params[key];
2830
- } else if (element && key.indexOf('*date*') >= 0) {
2831
- var _dataParams6 = key.split('*date*');
2832
- _dataParams6.forEach(function (value, index) {
2833
- if (index === 0) {
2834
- params[value] = moment(element[index]).format('YYYY-MM-DD');
2836
+ delete params[key];
2837
+ } else if (element && key.indexOf('*cascader*') >= 0) {
2838
+ var _dataParams5 = key.split('*cascader*');
2839
+ params[_dataParams5[0]] = element[element.length - 1];
2840
+ delete params[key];
2841
+ } else if (element && key.indexOf('*date*') >= 0) {
2842
+ var _dataParams6 = key.split('*date*');
2843
+ _dataParams6.forEach(function (value, index) {
2844
+ if (index === 0) {
2845
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2846
+ } else {
2847
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2848
+ }
2849
+ });
2850
+ delete params[key];
2851
+ } else if (element && key.indexOf('*') >= 0) {
2852
+ var _dataParams7 = key.split('*');
2853
+ _dataParams7.forEach(function (value, index) {
2854
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
2855
+ });
2856
+ delete params[key];
2857
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
2858
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
2859
+ var _dataParams8 = key.split('_selectNumberRange')[0];
2860
+ if (params[key][0] === 'range') {
2861
+ if (params[key][1][0]) {
2862
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
2863
+ }
2864
+ if (params[key][1][1]) {
2865
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
2866
+ }
2835
2867
  } else {
2836
- params[value] = moment(element[index]).format('YYYY-MM-DD');
2868
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2837
2869
  }
2838
- });
2839
- delete params[key];
2840
- } else if (element && key.indexOf('*') >= 0) {
2841
- var _dataParams7 = key.split('*');
2842
- _dataParams7.forEach(function (value, index) {
2843
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
2844
- });
2845
- delete params[key];
2846
- } else if (element && key.indexOf('_selectNumberRange') >= 0) {
2847
- // key = xxxxx_selectNumberRange qp-xxxxx-gt
2848
- var _dataParams8 = key.split('_selectNumberRange')[0];
2849
- if (params[key][0] === 'range') {
2850
- if (params[key][1][0]) {
2851
- params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
2852
- }
2853
- if (params[key][1][1]) {
2854
- params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
2855
- }
2856
- } else {
2857
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2870
+ delete params[key];
2871
+ } else if (Array.isArray(element)) {
2872
+ params[key] = element.join(',');
2873
+ } else if (element == null || element === undefined || String(element).trim() === '') {
2874
+ delete params[key];
2858
2875
  }
2859
- delete params[key];
2860
- } else if (Array.isArray(element)) {
2861
- params[key] = element.join(',');
2862
- } else if (element == null || element === undefined || String(element).trim() === '') {
2863
- delete params[key];
2864
- }
2876
+ })();
2865
2877
  }
2866
- };
2867
- for (var key in params) {
2868
- _loop();
2869
2878
  }
2870
2879
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
2871
2880
  pageSize: pageSize,
@@ -4524,74 +4533,76 @@ var AddSelect = function AddSelect(props) {
4524
4533
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
4525
4534
  var result;
4526
4535
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4527
- while (1) switch (_context.prev = _context.next) {
4528
- case 0:
4529
- if (!(bType == 'skc' && tList.some(function (i) {
4530
- return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
4531
- }))) {
4532
- _context.next = 3;
4533
- break;
4534
- }
4535
- message$1.warning('相同skc配码不可设置相同哦');
4536
- return _context.abrupt("return", false);
4537
- case 3:
4538
- if (!(bType == 'spu')) {
4539
- _context.next = 26;
4540
- break;
4541
- }
4542
- if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
4543
- return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
4544
- }))) {
4545
- _context.next = 7;
4546
- break;
4547
- }
4548
- message$1.warning('相同商品相同配码颜色不可设置相同哦');
4549
- return _context.abrupt("return", false);
4550
- case 7:
4551
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
4552
- _context.next = 10;
4553
- break;
4554
- }
4555
- message$1.warning('请先选择颜色!');
4556
- return _context.abrupt("return", false);
4557
- case 10:
4558
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
4559
- return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
4560
- }))) {
4561
- _context.next = 13;
4562
- break;
4563
- }
4564
- message$1.warning('相同商品相同颜色配码不可设置相同哦');
4565
- return _context.abrupt("return", false);
4566
- case 13:
4567
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
4568
- _context.next = 26;
4536
+ while (1) {
4537
+ switch (_context.prev = _context.next) {
4538
+ case 0:
4539
+ if (!(bType == 'skc' && tList.some(function (i) {
4540
+ return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
4541
+ }))) {
4542
+ _context.next = 3;
4543
+ break;
4544
+ }
4545
+ message$1.warning('相同skc配码不可设置相同哦');
4546
+ return _context.abrupt("return", false);
4547
+ case 3:
4548
+ if (!(bType == 'spu')) {
4549
+ _context.next = 26;
4550
+ break;
4551
+ }
4552
+ if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
4553
+ return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
4554
+ }))) {
4555
+ _context.next = 7;
4556
+ break;
4557
+ }
4558
+ message$1.warning('相同商品相同配码颜色不可设置相同哦');
4559
+ return _context.abrupt("return", false);
4560
+ case 7:
4561
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
4562
+ _context.next = 10;
4563
+ break;
4564
+ }
4565
+ message$1.warning('请先选择颜色!');
4566
+ return _context.abrupt("return", false);
4567
+ case 10:
4568
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
4569
+ return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
4570
+ }))) {
4571
+ _context.next = 13;
4572
+ break;
4573
+ }
4574
+ message$1.warning('相同商品相同颜色配码不可设置相同哦');
4575
+ return _context.abrupt("return", false);
4576
+ case 13:
4577
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
4578
+ _context.next = 26;
4579
+ break;
4580
+ }
4581
+ result = true;
4582
+ _context.prev = 15;
4583
+ _context.next = 18;
4584
+ return checkSpuMatchCode({
4585
+ skcCode: recordItem[recordKey],
4586
+ matchingCode: changeValue,
4587
+ ext1: recordItem.colorName
4588
+ });
4589
+ case 18:
4590
+ result = _context.sent;
4591
+ result = true;
4592
+ _context.next = 25;
4569
4593
  break;
4570
- }
4571
- result = true;
4572
- _context.prev = 15;
4573
- _context.next = 18;
4574
- return checkSpuMatchCode({
4575
- skcCode: recordItem[recordKey],
4576
- matchingCode: changeValue,
4577
- ext1: recordItem.colorName
4578
- });
4579
- case 18:
4580
- result = _context.sent;
4581
- result = true;
4582
- _context.next = 25;
4583
- break;
4584
- case 22:
4585
- _context.prev = 22;
4586
- _context.t0 = _context["catch"](15);
4587
- result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
4588
- case 25:
4589
- return _context.abrupt("return", result);
4590
- case 26:
4591
- return _context.abrupt("return", true);
4592
- case 27:
4593
- case "end":
4594
- return _context.stop();
4594
+ case 22:
4595
+ _context.prev = 22;
4596
+ _context.t0 = _context["catch"](15);
4597
+ result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
4598
+ case 25:
4599
+ return _context.abrupt("return", result);
4600
+ case 26:
4601
+ return _context.abrupt("return", true);
4602
+ case 27:
4603
+ case "end":
4604
+ return _context.stop();
4605
+ }
4595
4606
  }
4596
4607
  }, _callee, null, [[15, 22]]);
4597
4608
  }));
@@ -4783,27 +4794,29 @@ var AddSelect = function AddSelect(props) {
4783
4794
  var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
4784
4795
  var isConformToTheRules, newPopValue;
4785
4796
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4786
- while (1) switch (_context2.prev = _context2.next) {
4787
- case 0:
4788
- _context2.next = 2;
4789
- return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
4790
- case 2:
4791
- isConformToTheRules = _context2.sent;
4792
- if (isConformToTheRules) {
4793
- record[item.dataIndex] = value;
4794
- } else {
4795
- record[item.dataIndex] = null;
4796
- }
4797
- newPopValue = popvalue.map(function (i, innerIndex) {
4798
- if (innerIndex == index) {
4799
- i[item.dataIndex] = record[item.dataIndex];
4797
+ while (1) {
4798
+ switch (_context2.prev = _context2.next) {
4799
+ case 0:
4800
+ _context2.next = 2;
4801
+ return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
4802
+ case 2:
4803
+ isConformToTheRules = _context2.sent;
4804
+ if (isConformToTheRules) {
4805
+ record[item.dataIndex] = value;
4806
+ } else {
4807
+ record[item.dataIndex] = null;
4800
4808
  }
4801
- return i;
4802
- });
4803
- setPopValue(newPopValue);
4804
- case 6:
4805
- case "end":
4806
- return _context2.stop();
4809
+ newPopValue = popvalue.map(function (i, innerIndex) {
4810
+ if (innerIndex == index) {
4811
+ i[item.dataIndex] = record[item.dataIndex];
4812
+ }
4813
+ return i;
4814
+ });
4815
+ setPopValue(newPopValue);
4816
+ case 6:
4817
+ case "end":
4818
+ return _context2.stop();
4819
+ }
4807
4820
  }
4808
4821
  }, _callee2);
4809
4822
  }));
@@ -4863,85 +4876,84 @@ var AddSelect = function AddSelect(props) {
4863
4876
  });
4864
4877
  }
4865
4878
  // 数组对象处理,对带有特殊标记的name进行处理
4866
- var _loop = function _loop() {
4879
+ for (var key in params) {
4867
4880
  if (Object.prototype.hasOwnProperty.call(params, key)) {
4868
- var element = params[key];
4869
- if (element && key.indexOf('*number*') >= 0) {
4870
- var dataParams = key.split('*number*');
4871
- dataParams.forEach(function (value, index) {
4872
- params[value] = element[index];
4873
- });
4874
- delete params[key];
4875
- } else if (element && key.indexOf('*address*') >= 0) {
4876
- var _dataParams = key.split('*address*');
4877
- _dataParams.forEach(function (value, index) {
4878
- params[value] = element.PCDCode[index];
4879
- });
4880
- delete params[key];
4881
- } else if (element && key.indexOf('*costType*') >= 0) {
4882
- var _dataParams2 = key.split('*costType*');
4883
- // eslint-disable-next-line prefer-destructuring
4884
- params[_dataParams2[0]] = element[1];
4885
- delete params[key];
4886
- } else if (element && key.indexOf('*fullDate*') >= 0) {
4887
- var _dataParams3 = key.split('*fullDate*');
4888
- _dataParams3.forEach(function (value, index) {
4889
- if (index === 0) {
4890
- params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
4891
- } else {
4892
- params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
4881
+ (function () {
4882
+ var element = params[key];
4883
+ if (element && key.indexOf('*number*') >= 0) {
4884
+ var dataParams = key.split('*number*');
4885
+ dataParams.forEach(function (value, index) {
4886
+ params[value] = element[index];
4887
+ });
4888
+ delete params[key];
4889
+ } else if (element && key.indexOf('*address*') >= 0) {
4890
+ var _dataParams = key.split('*address*');
4891
+ _dataParams.forEach(function (value, index) {
4892
+ params[value] = element.PCDCode[index];
4893
+ });
4894
+ delete params[key];
4895
+ } else if (element && key.indexOf('*costType*') >= 0) {
4896
+ var _dataParams2 = key.split('*costType*');
4897
+ // eslint-disable-next-line prefer-destructuring
4898
+ params[_dataParams2[0]] = element[1];
4899
+ delete params[key];
4900
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
4901
+ var _dataParams3 = key.split('*fullDate*');
4902
+ _dataParams3.forEach(function (value, index) {
4903
+ if (index === 0) {
4904
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
4905
+ } else {
4906
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
4907
+ }
4908
+ });
4909
+ delete params[key];
4910
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
4911
+ var _dataParams4 = key.split('*checkBox*');
4912
+ if (element) {
4913
+ params[_dataParams4[0]] = 0;
4893
4914
  }
4894
- });
4895
- delete params[key];
4896
- } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
4897
- var _dataParams4 = key.split('*checkBox*');
4898
- if (element) {
4899
- params[_dataParams4[0]] = 0;
4900
- }
4901
- delete params[key];
4902
- } else if (element && key.indexOf('*cascader*') >= 0) {
4903
- var _dataParams5 = key.split('*cascader*');
4904
- params[_dataParams5[0]] = element[element.length - 1];
4905
- delete params[key];
4906
- } else if (element && key.indexOf('*date*') >= 0) {
4907
- var _dataParams6 = key.split('*date*');
4908
- _dataParams6.forEach(function (value, index) {
4909
- if (index === 0) {
4910
- params[value] = moment(element[index]).format('YYYY-MM-DD');
4915
+ delete params[key];
4916
+ } else if (element && key.indexOf('*cascader*') >= 0) {
4917
+ var _dataParams5 = key.split('*cascader*');
4918
+ params[_dataParams5[0]] = element[element.length - 1];
4919
+ delete params[key];
4920
+ } else if (element && key.indexOf('*date*') >= 0) {
4921
+ var _dataParams6 = key.split('*date*');
4922
+ _dataParams6.forEach(function (value, index) {
4923
+ if (index === 0) {
4924
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
4925
+ } else {
4926
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
4927
+ }
4928
+ });
4929
+ delete params[key];
4930
+ } else if (element && key.indexOf('*') >= 0) {
4931
+ var _dataParams7 = key.split('*');
4932
+ _dataParams7.forEach(function (value, index) {
4933
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
4934
+ });
4935
+ delete params[key];
4936
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
4937
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
4938
+ var _dataParams8 = key.split('_selectNumberRange')[0];
4939
+ if (params[key][0] === 'range') {
4940
+ if (params[key][1][0]) {
4941
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
4942
+ }
4943
+ if (params[key][1][1]) {
4944
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
4945
+ }
4911
4946
  } else {
4912
- params[value] = moment(element[index]).format('YYYY-MM-DD');
4913
- }
4914
- });
4915
- delete params[key];
4916
- } else if (element && key.indexOf('*') >= 0) {
4917
- var _dataParams7 = key.split('*');
4918
- _dataParams7.forEach(function (value, index) {
4919
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
4920
- });
4921
- delete params[key];
4922
- } else if (element && key.indexOf('_selectNumberRange') >= 0) {
4923
- // key = xxxxx_selectNumberRange qp-xxxxx-gt
4924
- var _dataParams8 = key.split('_selectNumberRange')[0];
4925
- if (params[key][0] === 'range') {
4926
- if (params[key][1][0]) {
4927
- params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
4928
- }
4929
- if (params[key][1][1]) {
4930
- params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
4947
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
4931
4948
  }
4932
- } else {
4933
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
4949
+ delete params[key];
4950
+ } else if (Array.isArray(element)) {
4951
+ params[key] = element.join(',');
4952
+ } else if (element == null || element === undefined || String(element).trim() === '') {
4953
+ delete params[key];
4934
4954
  }
4935
- delete params[key];
4936
- } else if (Array.isArray(element)) {
4937
- params[key] = element.join(',');
4938
- } else if (element == null || element === undefined || String(element).trim() === '') {
4939
- delete params[key];
4940
- }
4955
+ })();
4941
4956
  }
4942
- };
4943
- for (var key in params) {
4944
- _loop();
4945
4957
  }
4946
4958
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
4947
4959
  pageSize: pageSize,
@@ -6396,70 +6408,72 @@ var BillEntry = function BillEntry(_ref3) {
6396
6408
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6397
6409
  var canEntryObject, _canEntryObject$error, messageInfo;
6398
6410
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6399
- while (1) switch (_context.prev = _context.next) {
6400
- case 0:
6401
- if (data === null || data === void 0 ? void 0 : data.length) {
6402
- _context.next = 3;
6403
- break;
6404
- }
6405
- message$1.warning('至少录入一条数据');
6406
- return _context.abrupt("return");
6407
- case 3:
6408
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6409
- return d.skuCode && d.name;
6410
- })) {
6411
- _context.next = 6;
6412
- break;
6413
- }
6414
- message$1.warning('请选择商品!');
6415
- return _context.abrupt("return");
6416
- case 6:
6417
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6418
- return d.count;
6419
- })) {
6420
- _context.next = 9;
6421
- break;
6422
- }
6423
- message$1.warning('请填写商品数量!');
6424
- return _context.abrupt("return");
6425
- case 9:
6426
- _context.next = 11;
6427
- return isSkuCanEntry(data);
6428
- case 11:
6429
- canEntryObject = _context.sent;
6430
- if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
6431
- _context.next = 16;
6432
- break;
6433
- }
6434
- messageInfo = (canEntryObject === null || canEntryObject === void 0 ? void 0 : (_canEntryObject$error = canEntryObject.errorList) === null || _canEntryObject$error === void 0 ? void 0 : _canEntryObject$error.length) && (canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.errorList.map(function (i) {
6435
- return /*#__PURE__*/React.createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
6436
- }));
6437
- messageInfo && message$1.warning({
6438
- content: messageInfo,
6439
- duration: 6
6440
- });
6441
- return _context.abrupt("return");
6442
- case 16:
6443
- setLoading(true);
6444
- onSaveCallback(data).then(function (res) {
6445
- {
6446
- var _Object$keys;
6447
- var initSuccessMessage = '保存成功';
6448
- var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
6449
- if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
6450
- (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? message$1.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
6451
- } else {
6452
- message$1.success(initSuccessMessage);
6453
- }
6411
+ while (1) {
6412
+ switch (_context.prev = _context.next) {
6413
+ case 0:
6414
+ if (data === null || data === void 0 ? void 0 : data.length) {
6415
+ _context.next = 3;
6416
+ break;
6454
6417
  }
6455
- setLoading(false);
6456
- }).catch(function (Error) {
6457
- message$1.error(Error);
6458
- setLoading(false);
6459
- });
6460
- case 18:
6461
- case "end":
6462
- return _context.stop();
6418
+ message$1.warning('至少录入一条数据');
6419
+ return _context.abrupt("return");
6420
+ case 3:
6421
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6422
+ return d.skuCode && d.name;
6423
+ })) {
6424
+ _context.next = 6;
6425
+ break;
6426
+ }
6427
+ message$1.warning('请选择商品!');
6428
+ return _context.abrupt("return");
6429
+ case 6:
6430
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6431
+ return d.count;
6432
+ })) {
6433
+ _context.next = 9;
6434
+ break;
6435
+ }
6436
+ message$1.warning('请填写商品数量!');
6437
+ return _context.abrupt("return");
6438
+ case 9:
6439
+ _context.next = 11;
6440
+ return isSkuCanEntry(data);
6441
+ case 11:
6442
+ canEntryObject = _context.sent;
6443
+ if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
6444
+ _context.next = 16;
6445
+ break;
6446
+ }
6447
+ messageInfo = (canEntryObject === null || canEntryObject === void 0 ? void 0 : (_canEntryObject$error = canEntryObject.errorList) === null || _canEntryObject$error === void 0 ? void 0 : _canEntryObject$error.length) && (canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.errorList.map(function (i) {
6448
+ return /*#__PURE__*/React.createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
6449
+ }));
6450
+ messageInfo && message$1.warning({
6451
+ content: messageInfo,
6452
+ duration: 6
6453
+ });
6454
+ return _context.abrupt("return");
6455
+ case 16:
6456
+ setLoading(true);
6457
+ onSaveCallback(data).then(function (res) {
6458
+ {
6459
+ var _Object$keys;
6460
+ var initSuccessMessage = '保存成功';
6461
+ var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
6462
+ if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
6463
+ (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? message$1.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
6464
+ } else {
6465
+ message$1.success(initSuccessMessage);
6466
+ }
6467
+ }
6468
+ setLoading(false);
6469
+ }).catch(function (Error) {
6470
+ message$1.error(Error);
6471
+ setLoading(false);
6472
+ });
6473
+ case 18:
6474
+ case "end":
6475
+ return _context.stop();
6476
+ }
6463
6477
  }
6464
6478
  }, _callee);
6465
6479
  }));
@@ -9594,7 +9608,7 @@ var CommodityEntry = function CommodityEntry(props) {
9594
9608
  * @LastEditTime: 2022-01-14 17:17:26
9595
9609
  * @LastEditors: rodchen
9596
9610
  */
9597
- var index$2 = (function (storageKeyString) {
9611
+ var index$1 = (function (storageKeyString) {
9598
9612
  var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
9599
9613
  var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
9600
9614
  if (typeof seconds !== 'number') throw new Error('seconds should be number');
@@ -9715,42 +9729,44 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9715
9729
  var _ctx$form;
9716
9730
  var resData, coverData, data, dataList;
9717
9731
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9718
- while (1) switch (_context.prev = _context.next) {
9719
- case 0:
9720
- resData = (res === null || res === void 0 ? void 0 : res.data) || [];
9721
- if (!(resData.status === '0' || resData.code === '000000')) {
9722
- _context.next = 13;
9732
+ while (1) {
9733
+ switch (_context.prev = _context.next) {
9734
+ case 0:
9735
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
9736
+ if (!(resData.status === '0' || resData.code === '000000')) {
9737
+ _context.next = 13;
9738
+ break;
9739
+ }
9740
+ data = resData.data;
9741
+ if (!remoteSource.converter) {
9742
+ _context.next = 9;
9743
+ break;
9744
+ }
9745
+ _context.next = 6;
9746
+ return remoteSource.converter({
9747
+ data: [data]
9748
+ });
9749
+ case 6:
9750
+ coverData = _context.sent;
9751
+ _context.next = 11;
9723
9752
  break;
9724
- }
9725
- data = resData.data;
9726
- if (!remoteSource.converter) {
9727
- _context.next = 9;
9753
+ case 9:
9754
+ dataList = data && Array.isArray(data) ? data : data && [data] || [];
9755
+ coverData = dataList.length && dataList.map(function (ites) {
9756
+ return mapSearchTree(ites);
9757
+ }) || [];
9758
+ case 11:
9759
+ _context.next = 14;
9728
9760
  break;
9729
- }
9730
- _context.next = 6;
9731
- return remoteSource.converter({
9732
- data: [data]
9733
- });
9734
- case 6:
9735
- coverData = _context.sent;
9736
- _context.next = 11;
9737
- break;
9738
- case 9:
9739
- dataList = data && Array.isArray(data) ? data : data && [data] || [];
9740
- coverData = dataList.length && dataList.map(function (ites) {
9741
- return mapSearchTree(ites);
9742
- }) || [];
9743
- case 11:
9744
- _context.next = 14;
9745
- break;
9746
- case 13:
9747
- coverData = [];
9748
- case 14:
9749
- setTreeData(coverData);
9750
- ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
9751
- case 16:
9752
- case "end":
9753
- return _context.stop();
9761
+ case 13:
9762
+ coverData = [];
9763
+ case 14:
9764
+ setTreeData(coverData);
9765
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
9766
+ case 16:
9767
+ case "end":
9768
+ return _context.stop();
9769
+ }
9754
9770
  }
9755
9771
  }, _callee);
9756
9772
  }));
@@ -9957,7 +9973,7 @@ var BusinessTreeSearchSelect$1 = /*#__PURE__*/React.memo(BusinessTreeSearchSelec
9957
9973
  var css_248z$8 = ".form-status-label {\n height: 48px;\n margin-right: 12px;\n display: inline-block;\n position: relative;\n background-color: #B0B4B7;\n align-items: center;\n}\n.choosed-status-label.form-status-label {\n background-color: #005CFF;\n}\n.form-status-label:last-child {\n margin-right: 0px;\n}\n.form-status-label:first-child::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.choosed-status-label.form-status-label::after {\n border-left: 12px solid #005CFF;\n}\n.choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {\n border-left: 12px solid #005CFF;\n}\n.form-status-label:last-child::after {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::before {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.status-label-index {\n display: inline-block;\n width: 24px;\n height: 24px;\n border: 1px solid #FFFFFF;\n color: #FFFFFF;\n border-radius: 50%;\n font-family: Montserrat;\n font-size: 14px;\n line-height: 24px;\n text-align: center;\n margin: 0 6px 0 20px;\n}\n.status-label-key {\n width: 50px;\n height: 100%;\n display: inline-flex;\n float: left;\n align-items: center;\n justify-content: center;\n}\n.status-label-operate {\n float: left;\n width: calc(100% - 50px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 100%;\n margin: 4px 0;\n}\n.status-label-operate > div {\n font-size: 12px;\n height: 20px;\n line-height: 20px;\n color: #FFFFFF;\n font-family: PingFangSC;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.status-label-operate > div:first-child {\n font-size: 14px;\n font-weight: 600;\n}\n.only-one-child.form-status-label::after,\n.only-one-child.form-status-label::before {\n border-left: 0px;\n}\n";
9958
9974
  styleInject(css_248z$8);
9959
9975
 
9960
- var index$3 = (function (props) {
9976
+ var index$2 = (function (props) {
9961
9977
  var _props$formStatusMapp = props.formStatusMapping,
9962
9978
  formStatusMapping = _props$formStatusMapp === void 0 ? [] : _props$formStatusMapp;
9963
9979
  return /*#__PURE__*/React.createElement("div", {
@@ -11381,7 +11397,7 @@ var iconMap = {
11381
11397
  src: moreIcon
11382
11398
  })
11383
11399
  };
11384
- var index$4 = (function (props) {
11400
+ var index$3 = (function (props) {
11385
11401
  var _useLocation = useLocation(),
11386
11402
  pathname = _useLocation.pathname;
11387
11403
  var _useState = useState(pathname + 'id'),
@@ -11598,7 +11614,7 @@ var css_248z$d = ".home_page_head {\n height: 54px;\n display: flex;\n justif
11598
11614
  styleInject(css_248z$d);
11599
11615
 
11600
11616
  var _excluded$c = ["children"];
11601
- var index$5 = (function (props) {
11617
+ var index$4 = (function (props) {
11602
11618
  var _useLocation = useLocation(),
11603
11619
  pathname = _useLocation.pathname;
11604
11620
  var _useState = useState(pathname + 'id'),
@@ -11753,20 +11769,26 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
11753
11769
  fixed: item.fixed
11754
11770
  };
11755
11771
  }) : '';
11756
- axios({
11757
- url: '/user/appConfig/saveUserOrder',
11758
- method: 'POST',
11759
- data: {
11760
- code: that.state.bsTableCode,
11761
- detail: configvalue ? JSON.stringify(configvalue) : ''
11762
- }
11763
- }).then(function (res) {
11764
- var _res$data;
11765
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
11766
- _this.patchConfigToLocalstorage(configvalue);
11767
- } else {
11768
- message$1.error('保存表头列自定义失败,请稍后尝试');
11769
- }
11772
+ return new Promise(function (resolve, reject) {
11773
+ axios({
11774
+ url: '/user/appConfig/saveUserOrder',
11775
+ method: 'POST',
11776
+ data: {
11777
+ code: that.state.bsTableCode,
11778
+ detail: configvalue ? JSON.stringify(configvalue) : ''
11779
+ }
11780
+ }).then(function (res) {
11781
+ var _res$data;
11782
+ if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
11783
+ _this.patchConfigToLocalstorage(configvalue);
11784
+ resolve({
11785
+ status: '0'
11786
+ });
11787
+ } else {
11788
+ message$1.error('保存表头列自定义失败,请稍后尝试');
11789
+ reject('');
11790
+ }
11791
+ });
11770
11792
  });
11771
11793
  };
11772
11794
  _this.getConfigFromlocalstorage = function () {
@@ -12070,7 +12092,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12070
12092
  // this.patchUserColumnConfig('');
12071
12093
  // return;
12072
12094
  // }
12073
- _this.patchUserColumnConfig(sortDataSource);
12095
+ return _this.patchUserColumnConfig(sortDataSource);
12074
12096
  };
12075
12097
  _this.handleCancel = function (e) {
12076
12098
  console.log(e);
@@ -12095,7 +12117,14 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12095
12117
  return item;
12096
12118
  }))
12097
12119
  }, function () {
12098
- _this.handleOk();
12120
+ _this.handleOk().then(function (res) {
12121
+ if (res.status === '0') {
12122
+ message$1.success( /*#__PURE__*/React.createElement("span", null, "\u5B57\u6BB5\u5DF2\u9690\u85CF\uFF0C\u5982\u9700\u91CD\u65B0\u663E\u793A\u8BF7\u524D\u5F80", /*#__PURE__*/React.createElement(Typography.Link, {
12123
+ underline: true,
12124
+ onClick: _this.showModal
12125
+ }, "\u5217\u8BBE\u7F6E")));
12126
+ }
12127
+ });
12099
12128
  });
12100
12129
  };
12101
12130
  _this.onSortEnd = function (_ref) {
@@ -12265,6 +12294,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12265
12294
  key: "render",
12266
12295
  value: function render() {
12267
12296
  var _this2 = this;
12297
+ var onlyModal = this.props.onlyModal;
12268
12298
  var _this$state5 = this.state,
12269
12299
  dataSource = _this$state5.dataSource,
12270
12300
  searchDataSource = _this$state5.searchDataSource,
@@ -12435,12 +12465,12 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12435
12465
  row: this.DraggableBodyRow
12436
12466
  }
12437
12467
  }
12438
- }))))), /*#__PURE__*/React.createElement("div", {
12468
+ }))))), !onlyModal ? /*#__PURE__*/React.createElement("div", {
12439
12469
  onClick: this.showModal,
12440
12470
  style: {
12441
12471
  fontSize: 14
12442
12472
  }
12443
- }, "\u5217\u8BBE\u7F6E"));
12473
+ }, "\u5217\u8BBE\u7F6E") : '');
12444
12474
  }
12445
12475
  }]);
12446
12476
  return SortableTable;
@@ -13016,6 +13046,7 @@ var BsSulaQueryTable = (function (props) {
13016
13046
  height = _useState16[0],
13017
13047
  setHeight = _useState16[1];
13018
13048
  var sortTableRef = useRef(null);
13049
+ var searchTableRef = useRef(null);
13019
13050
  var bsTableCode = tableCode || window.location.hash; //设置列字段的唯一标识
13020
13051
  // 获取table高度
13021
13052
  var getTableHeight = function getTableHeight() {
@@ -13265,7 +13296,7 @@ var BsSulaQueryTable = (function (props) {
13265
13296
  }
13266
13297
  };
13267
13298
  var handleTimeValue = function handleTimeValue() {
13268
- var _value$exportConfig, _value$exportConfig2, _value$exportConfig3;
13299
+ var _sortTableRef$current, _value$exportConfig, _value$exportConfig2, _value$exportConfig3;
13269
13300
  var actionsRender = value.actionsRender || [];
13270
13301
  actionsRender = [].concat(_toConsumableArray(actionsRender), [{
13271
13302
  type: 'text',
@@ -13273,20 +13304,19 @@ var BsSulaQueryTable = (function (props) {
13273
13304
  children: /*#__PURE__*/React.createElement("span", {
13274
13305
  className: "ant-dropdown-link"
13275
13306
  }, /*#__PURE__*/React.createElement(Dropdown, {
13276
- overlay: /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement(SortableTable$1, {
13277
- ref: sortTableRef,
13278
- setShowColumns: setShowColumns,
13279
- showColumn: showColumn,
13280
- datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
13281
- bsTableCode: bsTableCode
13282
- })), /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement(SearchItemTable, {
13283
- ref: sortTableRef,
13307
+ overlay: /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement("div", {
13308
+ onClick: sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current = sortTableRef.current) === null || _sortTableRef$current === void 0 ? void 0 : _sortTableRef$current.showModal,
13309
+ style: {
13310
+ fontSize: 14
13311
+ }
13312
+ }, "\u5217\u8BBE\u7F6E")), /*#__PURE__*/React.createElement(Menu.Item, null, /*#__PURE__*/React.createElement(SearchItemTable, {
13313
+ ref: searchTableRef,
13284
13314
  setShowSearchFields: setShowSearchFields,
13285
13315
  showSearchFields: showSearchFields,
13286
13316
  datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
13287
13317
  bsTableCode: bsTableCode
13288
13318
  }))),
13289
- placement: "bottom"
13319
+ placement: "bottomRight"
13290
13320
  }, /*#__PURE__*/React.createElement("span", {
13291
13321
  className: "ant-dropdown-link"
13292
13322
  }, /*#__PURE__*/React.createElement("img", {
@@ -13350,8 +13380,8 @@ var BsSulaQueryTable = (function (props) {
13350
13380
  };
13351
13381
  };
13352
13382
  var setVisibleColumn = function setVisibleColumn(columnTitle) {
13353
- var _sortTableRef$current, _sortTableRef$current2;
13354
- sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current = sortTableRef.current) === null || _sortTableRef$current === void 0 ? void 0 : (_sortTableRef$current2 = _sortTableRef$current.handleTableHeadHidden) === null || _sortTableRef$current2 === void 0 ? void 0 : _sortTableRef$current2.call(_sortTableRef$current, columnTitle);
13383
+ var _sortTableRef$current2, _sortTableRef$current3;
13384
+ sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current2 = sortTableRef.current) === null || _sortTableRef$current2 === void 0 ? void 0 : (_sortTableRef$current3 = _sortTableRef$current2.handleTableHeadHidden) === null || _sortTableRef$current3 === void 0 ? void 0 : _sortTableRef$current3.call(_sortTableRef$current2, columnTitle);
13355
13385
  };
13356
13386
  var config = _objectSpread2(_objectSpread2({
13357
13387
  visibleFieldsCount: 3,
@@ -13399,7 +13429,14 @@ var BsSulaQueryTable = (function (props) {
13399
13429
  statusMapping: props.statusMapping
13400
13430
  });
13401
13431
  }, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
13402
- return /*#__PURE__*/React.createElement(MemoQueryTable, _objectSpread2({}, memoConfig));
13432
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MemoQueryTable, _objectSpread2({}, memoConfig)), /*#__PURE__*/React.createElement(SortableTable$1, {
13433
+ ref: sortTableRef,
13434
+ setShowColumns: setShowColumns,
13435
+ showColumn: showColumn,
13436
+ datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
13437
+ bsTableCode: bsTableCode,
13438
+ onlyModal: true
13439
+ }));
13403
13440
  });
13404
13441
 
13405
13442
  var css_248z$f = ".menu .anticon {\n margin-right: 8px;\n}\n.menu .ant-dropdown-menu-item {\n min-width: 160px;\n}\n.right {\n display: flex;\n float: right;\n height: 48px;\n margin-left: auto;\n overflow: hidden;\n}\n.right .action {\n display: flex;\n align-items: center;\n height: 48px;\n padding: 0 12px;\n cursor: pointer;\n transition: all 0.3s;\n}\n.right .action > span {\n vertical-align: middle;\n}\n.right .action:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.right .action .opened {\n background: rgba(0, 0, 0, 0.025);\n}\n.right .search {\n padding: 0 12px;\n}\n.right .search:hover {\n background: transparent;\n}\n.right .account .avatar {\n margin-right: 8px;\n color: #005cff;\n vertical-align: top;\n background: rgba(255, 255, 255, 0.85);\n}\n.dark .action:hover {\n background: #252a3d;\n}\n.dark .action .opened {\n background: #252a3d;\n}\n.allFunsList {\n margin-bottom: 10px;\n}\n.isClons {\n position: relative;\n left: -8px;\n width: 30px;\n height: 36px;\n}\n.drawerWarp {\n -moz-column-count: 3;\n column-count: 3;\n}\n.allFunsListWarp {\n width: 200px;\n margin-right: 10px;\n border-radius: 4px;\n -moz-column-break-inside: avoid;\n break-inside: avoid;\n}\n.drawerWarp_p {\n color: #8c8c8c;\n font-weight: 400;\n font-size: 14px;\n font-family: PingFangSC, PingFangSC-Regular;\n line-height: 20px;\n text-align: left;\n}\n.searchTop {\n display: flex;\n align-items: center;\n}\n.searchTopInp {\n width: 528px;\n height: 40px;\n background: #f8f9fa;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n.searchTopInp .ant-input {\n background: #f8f9fa;\n}\n.searchTopBtn {\n position: relative;\n left: -1px;\n width: 92px;\n height: 40px;\n background: #005cff;\n border-radius: 0px 4px 4px 0px;\n}\n.contentWarp {\n margin-top: 54px;\n font-size: 14px;\n font-weight: 400;\n text-align: left;\n color: #8c8c8c;\n}\n.themeColor {\n color: #005CFF;\n}\n.serachView {\n margin-top: 36px;\n margin-bottom: 32px;\n}\n.content {\n display: flex;\n flex-wrap: wrap;\n}\n.content div {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 8px 20px;\n font-size: 14px;\n font-weight: 400;\n color: #000000;\n background: #f8f9fa;\n border-radius: 100px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n.content div:hover {\n cursor: pointer;\n}\n";
@@ -13874,19 +13911,21 @@ function _outLogin() {
13874
13911
  _outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
13875
13912
  var res;
13876
13913
  return _regeneratorRuntime().wrap(function _callee$(_context) {
13877
- while (1) switch (_context.prev = _context.next) {
13878
- case 0:
13879
- _context.next = 2;
13880
- return axios({
13881
- url: '/user/web/loginOut',
13882
- method: 'GET'
13883
- });
13884
- case 2:
13885
- res = _context.sent;
13886
- return _context.abrupt("return", res);
13887
- case 4:
13888
- case "end":
13889
- return _context.stop();
13914
+ while (1) {
13915
+ switch (_context.prev = _context.next) {
13916
+ case 0:
13917
+ _context.next = 2;
13918
+ return axios({
13919
+ url: '/user/web/loginOut',
13920
+ method: 'GET'
13921
+ });
13922
+ case 2:
13923
+ res = _context.sent;
13924
+ return _context.abrupt("return", res);
13925
+ case 4:
13926
+ case "end":
13927
+ return _context.stop();
13928
+ }
13890
13929
  }
13891
13930
  }, _callee);
13892
13931
  }));
@@ -14015,29 +14054,31 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
14015
14054
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14016
14055
  var sessionId;
14017
14056
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14018
- while (1) switch (_context.prev = _context.next) {
14019
- case 0:
14020
- _context.next = 2;
14021
- return getSessionId();
14022
- case 2:
14023
- sessionId = _context.sent;
14024
- _context.next = 5;
14025
- return outLogin({
14026
- sessionId: sessionId
14027
- });
14028
- case 5:
14029
- // @ts-ignore
14030
- if (BUILD_TYPE) {
14031
- message$1.success('退出登录成功');
14032
- history.replace({
14033
- pathname: '/user/login'
14057
+ while (1) {
14058
+ switch (_context.prev = _context.next) {
14059
+ case 0:
14060
+ _context.next = 2;
14061
+ return getSessionId();
14062
+ case 2:
14063
+ sessionId = _context.sent;
14064
+ _context.next = 5;
14065
+ return outLogin({
14066
+ sessionId: sessionId
14034
14067
  });
14035
- } else {
14036
- setLoginOutPath();
14037
- }
14038
- case 6:
14039
- case "end":
14040
- return _context.stop();
14068
+ case 5:
14069
+ // @ts-ignore
14070
+ if (BUILD_TYPE) {
14071
+ message$1.success('退出登录成功');
14072
+ history.replace({
14073
+ pathname: '/user/login'
14074
+ });
14075
+ } else {
14076
+ setLoginOutPath();
14077
+ }
14078
+ case 6:
14079
+ case "end":
14080
+ return _context.stop();
14081
+ }
14041
14082
  }
14042
14083
  }, _callee);
14043
14084
  }));
@@ -15651,6 +15692,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
15651
15692
  _this.allFunc = /*#__PURE__*/createRef('');
15652
15693
  _this.customerMenuRef = /*#__PURE__*/createRef('');
15653
15694
  _this.actionRef = /*#__PURE__*/createRef();
15695
+ _this.handleBeforeUnload = function () {
15696
+ // 储存当前router信息
15697
+ sessionStorage.setItem('@listenRouterState', JSON.stringify(_this.state.listenRouterState));
15698
+ };
15654
15699
  _this.parseQueryString = function (queryString) {
15655
15700
  if (!queryString) {
15656
15701
  return '';
@@ -15865,7 +15910,6 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
15865
15910
  showSubMenu: isShow
15866
15911
  });
15867
15912
  }, 500);
15868
- //设置tabs标签左右滚动
15869
15913
  _this.setTabNavTransLate = function (num) {
15870
15914
  var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
15871
15915
  var globalTabsNav = (_document$getElementB = document.getElementById('globalTabs')) === null || _document$getElementB === void 0 ? void 0 : (_document$getElementB2 = _document$getElementB.getElementsByClassName('ant-tabs-nav-list')) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2[0];
@@ -16055,15 +16099,49 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16055
16099
  },
16056
16100
  currentSubMenuData: [],
16057
16101
  showSubMenu: false,
16058
- isSlider: false
16102
+ isSlider: false,
16103
+ _routerArray: routerArray
16059
16104
  };
16060
16105
  return _this;
16061
16106
  }
16062
16107
  _createClass(BasicLayout, [{
16108
+ key: "componentWillMount",
16109
+ value: function componentWillMount() {
16110
+ var _this2 = this;
16111
+ // 检查页面是否为刷新之后的
16112
+ if (sessionStorage.getItem('@listenRouterState')) {
16113
+ var lastListenRouterState = JSON.parse(sessionStorage.getItem('@listenRouterState')),
16114
+ showListenRouterState = [],
16115
+ nowItem = {};
16116
+ if (lastListenRouterState.length === 1) {
16117
+ sessionStorage.removeItem('@listenRouterState');
16118
+ return;
16119
+ }
16120
+ lastListenRouterState.forEach(function (item) {
16121
+ var _this2$state;
16122
+ nowItem = _this2 === null || _this2 === void 0 ? void 0 : (_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state._routerArray.find(function (i) {
16123
+ var _item$match;
16124
+ return item.key === i.key || (item === null || item === void 0 ? void 0 : item.match) && (item === null || item === void 0 ? void 0 : (_item$match = item.match) === null || _item$match === void 0 ? void 0 : _item$match.path) === i.key;
16125
+ });
16126
+ // 详情页保留问题尚未解决
16127
+ if (nowItem) {
16128
+ showListenRouterState.push(_objectSpread2(_objectSpread2({}, item), {}, {
16129
+ content: nowItem.content,
16130
+ tab: item.tab || _this2.getPageTitle(nowItem.key)
16131
+ }));
16132
+ }
16133
+ });
16134
+ this.setState({
16135
+ listenRouterState: [].concat(showListenRouterState)
16136
+ });
16137
+ sessionStorage.removeItem('@listenRouterState');
16138
+ }
16139
+ }
16140
+ }, {
16063
16141
  key: "componentDidMount",
16064
16142
  value: function componentDidMount() {
16065
16143
  var _window$$wujie,
16066
- _this2 = this,
16144
+ _this3 = this,
16067
16145
  _localStorage$getItem,
16068
16146
  _localStorage$getItem2;
16069
16147
  var _this$props = this.props,
@@ -16113,11 +16191,11 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16113
16191
  // if (window.location.href.indexOf(`/${itemPath}`) === -1) return;
16114
16192
  // }
16115
16193
  if (route.pathname.startsWith("/".concat(itemPath, "/"))) return;
16116
- var _this2$state = _this2.state,
16117
- listenRouterState = _this2$state.listenRouterState,
16118
- listenRouterKey = _this2$state.listenRouterKey,
16119
- customerMatchs = _this2$state.customerMatchs,
16120
- hideMenuArray = _this2$state.hideMenuArray;
16194
+ var _this3$state = _this3.state,
16195
+ listenRouterState = _this3$state.listenRouterState,
16196
+ listenRouterKey = _this3$state.listenRouterKey,
16197
+ customerMatchs = _this3$state.customerMatchs,
16198
+ hideMenuArray = _this3$state.hideMenuArray;
16121
16199
  var newListenRouterState = _toConsumableArray(listenRouterState);
16122
16200
  var newListenRouterKey = _toConsumableArray(listenRouterKey);
16123
16201
  var replaceRouter = routerArray.filter(function (itemRoute) {
@@ -16128,7 +16206,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16128
16206
  // 处理中英文和特殊字符
16129
16207
  currentKey = decodeURIComponent(route.pathname);
16130
16208
  } else {
16131
- currentKey = decodeURIComponent(route.pathname + _this2.parseQueryString(route.search));
16209
+ currentKey = decodeURIComponent(route.pathname + _this3.parseQueryString(route.search));
16132
16210
  }
16133
16211
  if (!istParent) {
16134
16212
  var _window$$wujie2;
@@ -16148,7 +16226,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16148
16226
  replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
16149
16227
  return itemroute.key === '/404';
16150
16228
  })) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
16151
- _this2.setState({
16229
+ _this3.setState({
16152
16230
  listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
16153
16231
  key: currentKey,
16154
16232
  tab: '404'
@@ -16156,7 +16234,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16156
16234
  activeKey: currentKey,
16157
16235
  listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
16158
16236
  }, function () {
16159
- _this2.checkisNavSlide();
16237
+ _this3.checkisNavSlide();
16160
16238
  });
16161
16239
  } else {
16162
16240
  var match = matchPath(route.pathname, {
@@ -16166,7 +16244,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16166
16244
  query: route.query,
16167
16245
  match: match,
16168
16246
  key: currentKey,
16169
- tab: _this2.getPageTitle(route.pathname) + ''
16247
+ tab: _this3.getPageTitle(route.pathname) + ''
16170
16248
  })]);
16171
16249
  newListenRouterKey = [].concat(_toConsumableArray(listenRouterKey), [currentKey]);
16172
16250
  }
@@ -16204,13 +16282,13 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16204
16282
  localStorage.removeItem('isMenuClick');
16205
16283
  }, 0);
16206
16284
  }
16207
- _this2.setState({
16285
+ _this3.setState({
16208
16286
  //路由监听函数最后执行setState,避免处理hideMenu类型页面自动关闭的逻辑块内获取不到最新state的listenRouterState和listenRouterKey
16209
16287
  activeKey: currentKey,
16210
16288
  listenRouterState: newListenRouterState,
16211
16289
  listenRouterKey: newListenRouterKey
16212
16290
  }, function () {
16213
- _this2.checkisNavSlide();
16291
+ _this3.checkisNavSlide();
16214
16292
  });
16215
16293
  istParent = 0;
16216
16294
  });
@@ -16225,17 +16303,35 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16225
16303
  } else {
16226
16304
  history.push(location);
16227
16305
  }
16306
+ try {
16307
+ window.addEventListener('beforeunload', this.handleBeforeUnload);
16308
+ } catch (error) {
16309
+ console.log("\uD83D\uDE80 => componentDidMount => error:", error);
16310
+ }
16228
16311
  }
16229
16312
  }, {
16230
16313
  key: "componentWillUnmount",
16231
16314
  value: function componentWillUnmount() {
16315
+ window.removeEventListener('beforeunload', this.handleBeforeUnload);
16232
16316
  // eslint-disable-next-line no-unused-expressions
16233
16317
  UN_LISTTEN_DRP && UN_LISTTEN_DRP();
16234
16318
  }
16319
+ }, {
16320
+ key: "getWelcomePage",
16321
+ value: function getWelcomePage() {
16322
+ var homeRouter = routerArray.filter(function (itemroute) {
16323
+ return itemroute.key === '/';
16324
+ })[0];
16325
+ return _objectSpread2(_objectSpread2({}, homeRouter), {}, {
16326
+ key: '/',
16327
+ tab: '欢迎',
16328
+ closable: false
16329
+ });
16330
+ }
16235
16331
  }, {
16236
16332
  key: "render",
16237
16333
  value: function render() {
16238
- var _this3 = this;
16334
+ var _this4 = this;
16239
16335
  var _this$state4 = this.state,
16240
16336
  listenRouterState = _this$state4.listenRouterState,
16241
16337
  activeKey = _this$state4.activeKey,
@@ -16259,7 +16355,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16259
16355
  className: "tab_title_content"
16260
16356
  }, item.tab, item.key !== '/' && /*#__PURE__*/React.createElement(ItemMenu, {
16261
16357
  info: item,
16262
- operateFun: _this3.operateFun,
16358
+ operateFun: _this4.operateFun,
16263
16359
  listenRouterState: listenRouterState
16264
16360
  }));
16265
16361
  };
@@ -16293,7 +16389,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16293
16389
  }, /*#__PURE__*/React.createElement("a", {
16294
16390
  onClick: function onClick() {
16295
16391
  // 关闭全部
16296
- _this3.updateState([_objectSpread2(_objectSpread2({}, _this3.state.homeRouter), {}, {
16392
+ _this4.updateState([_objectSpread2(_objectSpread2({}, _this4.state.homeRouter), {}, {
16297
16393
  key: '/',
16298
16394
  tab: '欢迎',
16299
16395
  closable: false
@@ -16319,7 +16415,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16319
16415
  } else {
16320
16416
  newActiveKey = listenRouterState[1].key;
16321
16417
  }
16322
- _this3.updateState(listenRouterState.filter(function (d) {
16418
+ _this4.updateState(listenRouterState.filter(function (d) {
16323
16419
  return d.key !== activeKey;
16324
16420
  }), listenRouterKey.filter(function (d) {
16325
16421
  return d !== activeKey;
@@ -16346,7 +16442,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16346
16442
  // message.warning('首页不可关闭。');
16347
16443
  // return;
16348
16444
  // }
16349
- _this3.updateState(listenRouterState.filter(function (d, i) {
16445
+ _this4.updateState(listenRouterState.filter(function (d, i) {
16350
16446
  return i >= index || d.key === '/';
16351
16447
  }), listenRouterKey.filter(function (d, i) {
16352
16448
  return i >= index || d === '/';
@@ -16363,7 +16459,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16363
16459
  var index = listenRouterState.findIndex(function (item) {
16364
16460
  return item.key === activeKey;
16365
16461
  });
16366
- _this3.updateState(listenRouterState.filter(function (d, i) {
16462
+ _this4.updateState(listenRouterState.filter(function (d, i) {
16367
16463
  return i <= index || d.key === '/';
16368
16464
  }), listenRouterKey.filter(function (d, i) {
16369
16465
  return i <= index || d === '/';
@@ -16406,7 +16502,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16406
16502
  opacity: this.state.isSlider ? 1 : 0.5
16407
16503
  },
16408
16504
  onClick: function onClick() {
16409
- _this3.setTabNavTransLate(-100);
16505
+ _this4.setTabNavTransLate(-100);
16410
16506
  }
16411
16507
  }, /*#__PURE__*/React.createElement(DoubleLeftOutlined, null))),
16412
16508
  right: /*#__PURE__*/React.createElement("div", {
@@ -16415,7 +16511,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16415
16511
  },
16416
16512
  className: 'tab_right_operate',
16417
16513
  onClick: function onClick() {
16418
- _this3.setTabNavTransLate(100);
16514
+ _this4.setTabNavTransLate(100);
16419
16515
  }
16420
16516
  }, /*#__PURE__*/React.createElement(DoubleRightOutlined, null))
16421
16517
  };
@@ -16429,7 +16525,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16429
16525
  return /*#__PURE__*/React.createElement(CustomerMenuHeader, {
16430
16526
  originRoutes: originRoutes,
16431
16527
  itemPath: itemPath,
16432
- handleClose: _this3.handleClose,
16528
+ handleClose: _this4.handleClose,
16433
16529
  collapsed: collapse
16434
16530
  });
16435
16531
  },
@@ -16438,10 +16534,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16438
16534
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CustomerMenu, {
16439
16535
  originRoutes: originRoutes,
16440
16536
  itemPath: itemPath,
16441
- ref: _this3.customerMenuRef,
16442
- actionRef: _this3.actionRef,
16443
- handleClose: _this3.handleClose,
16444
- isCollapse: _this3.state.collapse
16537
+ ref: _this4.customerMenuRef,
16538
+ actionRef: _this4.actionRef,
16539
+ handleClose: _this4.handleClose,
16540
+ isCollapse: _this4.state.collapse
16445
16541
  }));
16446
16542
  }
16447
16543
  return /*#__PURE__*/React.createElement("div", {
@@ -16449,7 +16545,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16449
16545
  }, /*#__PURE__*/React.createElement("span", {
16450
16546
  className: "collapse_icon",
16451
16547
  onClick: function onClick() {
16452
- _this3.setState({
16548
+ _this4.setState({
16453
16549
  collapse: !collapse
16454
16550
  });
16455
16551
  }
@@ -16462,7 +16558,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16462
16558
  },
16463
16559
  collapsed: collapse,
16464
16560
  onCollapse: function onCollapse(boo) {
16465
- _this3.setState({
16561
+ _this4.setState({
16466
16562
  collapse: boo
16467
16563
  });
16468
16564
  },
@@ -16498,14 +16594,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16498
16594
  },
16499
16595
  onMouseEnter: function onMouseEnter() {
16500
16596
  if (menuItemProps.pro_layout_parentKeys && menuItemProps.pro_layout_parentKeys.length) return;
16501
- _this3.setState({
16597
+ _this4.setState({
16502
16598
  currentSubMenuData: menuItemProps.children,
16503
16599
  currentSubPath: menuItemProps.path
16504
16600
  });
16505
- _this3.setShowMenu(true);
16601
+ _this4.setShowMenu(true);
16506
16602
  },
16507
16603
  onMouseLeave: function onMouseLeave() {
16508
- _this3.setShowMenu(false);
16604
+ _this4.setShowMenu(false);
16509
16605
  }
16510
16606
  }, defaultDom, showSubMenu && currentSubPath === menuItemProps.path && !collapse && /*#__PURE__*/React.createElement(CaretLeftOutlined, {
16511
16607
  style: {
@@ -16524,7 +16620,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16524
16620
  }, '');
16525
16621
  },
16526
16622
  postMenuData: function postMenuData(menus) {
16527
- return _toConsumableArray(filterByMenuDate(menus || [], _this3.state.keyWord));
16623
+ return _toConsumableArray(filterByMenuDate(menus || [], _this4.state.keyWord));
16528
16624
  },
16529
16625
  links: [!this.state.collapse ? /*#__PURE__*/React.createElement(AllFunc$1, {
16530
16626
  ref: this.allFunc,
@@ -16546,12 +16642,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16546
16642
  request: function () {
16547
16643
  var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
16548
16644
  return _regeneratorRuntime().wrap(function _callee$(_context) {
16549
- while (1) switch (_context.prev = _context.next) {
16550
- case 0:
16551
- return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
16552
- case 1:
16553
- case "end":
16554
- return _context.stop();
16645
+ while (1) {
16646
+ switch (_context.prev = _context.next) {
16647
+ case 0:
16648
+ return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
16649
+ case 1:
16650
+ case "end":
16651
+ return _context.stop();
16652
+ }
16555
16653
  }
16556
16654
  }, _callee);
16557
16655
  }));
@@ -16596,7 +16694,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16596
16694
  tab: /*#__PURE__*/React.createElement(TabTitle, {
16597
16695
  item: item,
16598
16696
  index: index,
16599
- updateState: _this3.updateState
16697
+ updateState: _this4.updateState
16600
16698
  }),
16601
16699
  style: {
16602
16700
  marginTop: isWeiqianduan ? 0 : 30
@@ -16608,10 +16706,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16608
16706
  })
16609
16707
  }, /*#__PURE__*/React.createElement(WrapperComponent, {
16610
16708
  item: item,
16611
- routerProps: _this3.props,
16612
- getDictionarySource: _this3.getDictionarySource,
16613
- getDictionaryTextByValue: _this3.getDictionaryTextByValue,
16614
- timeFormat: _this3.timeFormat,
16709
+ routerProps: _this4.props,
16710
+ getDictionarySource: _this4.getDictionarySource,
16711
+ getDictionaryTextByValue: _this4.getDictionaryTextByValue,
16712
+ timeFormat: _this4.timeFormat,
16615
16713
  transparentProps: transparentProps
16616
16714
  }));
16617
16715
  })), /*#__PURE__*/React.createElement("div", {
@@ -16636,10 +16734,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16636
16734
  itemPath: itemPath
16637
16735
  }, drawerLeftParams)), /*#__PURE__*/React.createElement("div", {
16638
16736
  onMouseEnter: function onMouseEnter() {
16639
- _this3.setShowMenu(true);
16737
+ _this4.setShowMenu(true);
16640
16738
  },
16641
16739
  onMouseLeave: function onMouseLeave() {
16642
- _this3.setShowMenu(false);
16740
+ _this4.setShowMenu(false);
16643
16741
  },
16644
16742
  className: 'sub_menu_content',
16645
16743
  style: {
@@ -16689,7 +16787,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
16689
16787
  }]);
16690
16788
  return WrapperComponent;
16691
16789
  }(React.Component);
16692
- var index$6 = (function (props) {
16790
+ var index$5 = (function (props) {
16693
16791
  var _useModel = useModel('@@initialState'),
16694
16792
  _useModel$initialStat = _useModel.initialState,
16695
16793
  initialState = _useModel$initialStat === void 0 ? {} : _useModel$initialStat;
@@ -16930,7 +17028,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
16930
17028
  };
16931
17029
  var FixedScrollBar$1 = /*#__PURE__*/React.forwardRef(FixedScrollBar);
16932
17030
 
16933
- var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
17031
+ var index$6 = /*#__PURE__*/forwardRef(function (props, ref) {
16934
17032
  var _useState = useState(false),
16935
17033
  _useState2 = _slicedToArray(_useState, 2),
16936
17034
  show = _useState2[0],
@@ -24231,26 +24329,28 @@ var valueType = {
24231
24329
  var getDynamicDict = /*#__PURE__*/function () {
24232
24330
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
24233
24331
  return _regeneratorRuntime().wrap(function _callee$(_context) {
24234
- while (1) switch (_context.prev = _context.next) {
24235
- case 0:
24236
- _context.next = 2;
24237
- return request$1({
24238
- url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
24239
- converter: function converter(_ref2) {
24240
- var data = _ref2.data;
24241
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
24242
- return {
24243
- text: d.name,
24244
- value: d.code || d.brandCode
24245
- };
24246
- });
24247
- }
24248
- });
24249
- case 2:
24250
- return _context.abrupt("return", _context.sent);
24251
- case 3:
24252
- case "end":
24253
- return _context.stop();
24332
+ while (1) {
24333
+ switch (_context.prev = _context.next) {
24334
+ case 0:
24335
+ _context.next = 2;
24336
+ return request$1({
24337
+ url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
24338
+ converter: function converter(_ref2) {
24339
+ var data = _ref2.data;
24340
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
24341
+ return {
24342
+ text: d.name,
24343
+ value: d.code || d.brandCode
24344
+ };
24345
+ });
24346
+ }
24347
+ });
24348
+ case 2:
24349
+ return _context.abrupt("return", _context.sent);
24350
+ case 3:
24351
+ case "end":
24352
+ return _context.stop();
24353
+ }
24254
24354
  }
24255
24355
  }, _callee);
24256
24356
  }));
@@ -24300,53 +24400,55 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24300
24400
  useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
24301
24401
  var _ref$current, source;
24302
24402
  return _regeneratorRuntime().wrap(function _callee$(_context) {
24303
- while (1) switch (_context.prev = _context.next) {
24304
- case 0:
24305
- _context.next = 2;
24306
- return setIsShowAndType(function (prev) {
24307
- if (record.inputType === 20 || record.inputType === 30) {
24308
- return {
24309
- isShow: true,
24310
- singleOrMultiple: record.inputType,
24311
- type: record.choiceType
24312
- };
24403
+ while (1) {
24404
+ switch (_context.prev = _context.next) {
24405
+ case 0:
24406
+ _context.next = 2;
24407
+ return setIsShowAndType(function (prev) {
24408
+ if (record.inputType === 20 || record.inputType === 30) {
24409
+ return {
24410
+ isShow: true,
24411
+ singleOrMultiple: record.inputType,
24412
+ type: record.choiceType
24413
+ };
24414
+ }
24415
+ return prev;
24416
+ });
24417
+ case 2:
24418
+ if (!record.dictionaryCode) {
24419
+ _context.next = 17;
24420
+ break;
24313
24421
  }
24314
- return prev;
24315
- });
24316
- case 2:
24317
- if (!record.dictionaryCode) {
24318
- _context.next = 17;
24319
- break;
24320
- }
24321
- if (!(record.choiceType == 20)) {
24322
- _context.next = 7;
24422
+ if (!(record.choiceType == 20)) {
24423
+ _context.next = 7;
24424
+ break;
24425
+ }
24426
+ _context.t0 = getDictionarySource(record.dictionaryCode);
24427
+ _context.next = 15;
24323
24428
  break;
24324
- }
24325
- _context.t0 = getDictionarySource(record.dictionaryCode);
24326
- _context.next = 15;
24327
- break;
24328
- case 7:
24329
- if (!(record.choiceType == 30)) {
24330
- _context.next = 13;
24429
+ case 7:
24430
+ if (!(record.choiceType == 30)) {
24431
+ _context.next = 13;
24432
+ break;
24433
+ }
24434
+ _context.next = 10;
24435
+ return getDynamicDict(record.dictionaryCode);
24436
+ case 10:
24437
+ _context.t1 = _context.sent;
24438
+ _context.next = 14;
24331
24439
  break;
24332
- }
24333
- _context.next = 10;
24334
- return getDynamicDict(record.dictionaryCode);
24335
- case 10:
24336
- _context.t1 = _context.sent;
24337
- _context.next = 14;
24338
- break;
24339
- case 13:
24340
- _context.t1 = [];
24341
- case 14:
24342
- _context.t0 = _context.t1;
24343
- case 15:
24344
- source = _context.t0;
24345
- // @ts-ignore
24346
- ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
24347
- case 17:
24348
- case "end":
24349
- return _context.stop();
24440
+ case 13:
24441
+ _context.t1 = [];
24442
+ case 14:
24443
+ _context.t0 = _context.t1;
24444
+ case 15:
24445
+ source = _context.t0;
24446
+ // @ts-ignore
24447
+ ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
24448
+ case 17:
24449
+ case "end":
24450
+ return _context.stop();
24451
+ }
24350
24452
  }
24351
24453
  }, _callee);
24352
24454
  })));
@@ -24414,28 +24516,30 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24414
24516
  var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
24415
24517
  var form, values, name, relates, source;
24416
24518
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
24417
- while (1) switch (_context2.prev = _context2.next) {
24418
- case 0:
24419
- form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
24420
- if (values[0]) {
24519
+ while (1) {
24520
+ switch (_context2.prev = _context2.next) {
24521
+ case 0:
24522
+ form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
24523
+ if (values[0]) {
24524
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24525
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24526
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
24527
+ }
24528
+ if (!values[1]) {
24529
+ _context2.next = 9;
24530
+ break;
24531
+ }
24532
+ _context2.next = 5;
24533
+ return getDynamicDict(record.dictionaryCode || values[1]);
24534
+ case 5:
24535
+ source = _context2.sent;
24421
24536
  form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24422
24537
  form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24423
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
24424
- }
24425
- if (!values[1]) {
24426
- _context2.next = 9;
24427
- break;
24428
- }
24429
- _context2.next = 5;
24430
- return getDynamicDict(record.dictionaryCode || values[1]);
24431
- case 5:
24432
- source = _context2.sent;
24433
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24434
- form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24435
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
24436
- case 9:
24437
- case "end":
24438
- return _context2.stop();
24538
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
24539
+ case 9:
24540
+ case "end":
24541
+ return _context2.stop();
24542
+ }
24439
24543
  }
24440
24544
  }, _callee2);
24441
24545
  }));
@@ -24895,41 +24999,43 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24895
24999
  var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
24896
25000
  var values, name, form, source;
24897
25001
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
24898
- while (1) switch (_context3.prev = _context3.next) {
24899
- case 0:
24900
- values = _ref10.values, name = _ref10.name, form = _ref10.form;
24901
- if (values[1] === 40) {
24902
- form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
24903
- form.setFieldVisible(name, false);
24904
- }
24905
- if (!(values[0] === 30)) {
24906
- _context3.next = 10;
24907
- break;
24908
- }
24909
- _context3.next = 5;
24910
- return request$1({
24911
- url: '/basic/dictDynamicItem/queryList',
24912
- converter: function converter(_ref11) {
24913
- var data = _ref11.data;
24914
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
24915
- return {
24916
- text: d.dictCode,
24917
- value: d.dictCode
24918
- };
24919
- });
25002
+ while (1) {
25003
+ switch (_context3.prev = _context3.next) {
25004
+ case 0:
25005
+ values = _ref10.values, name = _ref10.name, form = _ref10.form;
25006
+ if (values[1] === 40) {
25007
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
25008
+ form.setFieldVisible(name, false);
24920
25009
  }
24921
- });
24922
- case 5:
24923
- source = _context3.sent;
24924
- form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
24925
- form.setFieldVisible(name, true);
24926
- _context3.next = 11;
24927
- break;
24928
- case 10:
24929
- form.setFieldVisible(name, false);
24930
- case 11:
24931
- case "end":
24932
- return _context3.stop();
25010
+ if (!(values[0] === 30)) {
25011
+ _context3.next = 10;
25012
+ break;
25013
+ }
25014
+ _context3.next = 5;
25015
+ return request$1({
25016
+ url: '/basic/dictDynamicItem/queryList',
25017
+ converter: function converter(_ref11) {
25018
+ var data = _ref11.data;
25019
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
25020
+ return {
25021
+ text: d.dictCode,
25022
+ value: d.dictCode
25023
+ };
25024
+ });
25025
+ }
25026
+ });
25027
+ case 5:
25028
+ source = _context3.sent;
25029
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
25030
+ form.setFieldVisible(name, true);
25031
+ _context3.next = 11;
25032
+ break;
25033
+ case 10:
25034
+ form.setFieldVisible(name, false);
25035
+ case 11:
25036
+ case "end":
25037
+ return _context3.stop();
25038
+ }
24933
25039
  }
24934
25040
  }, _callee3);
24935
25041
  }));
@@ -25118,64 +25224,66 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
25118
25224
  var _ref$current4, _res$editableStatus;
25119
25225
  var res, _res$defaultValue;
25120
25226
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
25121
- while (1) switch (_context4.prev = _context4.next) {
25122
- case 0:
25123
- _context4.next = 2;
25124
- return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
25125
- case 2:
25126
- res = _context4.sent;
25127
- res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
25128
- res.fieldGroup = record.fieldGroup;
25129
- res.businessType = record.businessType;
25130
- res.info = {
25131
- enumeration: res.enumeration,
25132
- dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
25133
- formula: res.formula,
25134
- scale: res.scale,
25135
- variable: res.variable
25136
- };
25137
- res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
25138
- res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
25139
- res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
25140
- if (res.inputType === 40) {
25141
- res.valueType = 22;
25142
- }
25143
- // 把数组处理成文本
25144
- if (res.inputType === 30) {
25145
- if (res.defaultValue) {
25146
- res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
25227
+ while (1) {
25228
+ switch (_context4.prev = _context4.next) {
25229
+ case 0:
25230
+ _context4.next = 2;
25231
+ return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
25232
+ case 2:
25233
+ res = _context4.sent;
25234
+ res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
25235
+ res.fieldGroup = record.fieldGroup;
25236
+ res.businessType = record.businessType;
25237
+ res.info = {
25238
+ enumeration: res.enumeration,
25239
+ dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
25240
+ formula: res.formula,
25241
+ scale: res.scale,
25242
+ variable: res.variable
25243
+ };
25244
+ res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
25245
+ res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
25246
+ res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
25247
+ if (res.inputType === 40) {
25248
+ res.valueType = 22;
25147
25249
  }
25148
- }
25149
- res.fieldMapping = res.fieldMapping || '';
25150
- delete res.formula;
25151
- delete res.showValue;
25152
- if (!(mode === 'create')) {
25153
- _context4.next = 18;
25154
- break;
25155
- }
25156
- request$1({
25157
- url: "/basic/flow/businessField",
25158
- method: 'POST',
25159
- params: res,
25160
- successMessage: '创建成功!',
25161
- converter: function converter() {
25162
- onParentOk();
25250
+ // 把数组处理成文本
25251
+ if (res.inputType === 30) {
25252
+ if (res.defaultValue) {
25253
+ res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
25254
+ }
25163
25255
  }
25164
- });
25165
- return _context4.abrupt("return");
25166
- case 18:
25167
- request$1({
25168
- url: "/basic/flow/businessField/".concat(record.id),
25169
- method: 'PATCH',
25170
- params: res,
25171
- successMessage: '修改成功!',
25172
- converter: function converter() {
25173
- onParentOk();
25256
+ res.fieldMapping = res.fieldMapping || '';
25257
+ delete res.formula;
25258
+ delete res.showValue;
25259
+ if (!(mode === 'create')) {
25260
+ _context4.next = 18;
25261
+ break;
25174
25262
  }
25175
- });
25176
- case 19:
25177
- case "end":
25178
- return _context4.stop();
25263
+ request$1({
25264
+ url: "/basic/flow/businessField",
25265
+ method: 'POST',
25266
+ params: res,
25267
+ successMessage: '创建成功!',
25268
+ converter: function converter() {
25269
+ onParentOk();
25270
+ }
25271
+ });
25272
+ return _context4.abrupt("return");
25273
+ case 18:
25274
+ request$1({
25275
+ url: "/basic/flow/businessField/".concat(record.id),
25276
+ method: 'PATCH',
25277
+ params: res,
25278
+ successMessage: '修改成功!',
25279
+ converter: function converter() {
25280
+ onParentOk();
25281
+ }
25282
+ });
25283
+ case 19:
25284
+ case "end":
25285
+ return _context4.stop();
25286
+ }
25179
25287
  }
25180
25288
  }, _callee4);
25181
25289
  }));
@@ -25960,26 +26068,28 @@ var BsCascader = function BsCascader(_ref) {
25960
26068
  useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
25961
26069
  var resData, data;
25962
26070
  return _regeneratorRuntime().wrap(function _callee$(_context) {
25963
- while (1) switch (_context.prev = _context.next) {
25964
- case 0:
25965
- if (!(!source && initRequestSource)) {
25966
- _context.next = 6;
25967
- break;
25968
- }
25969
- _context.next = 3;
25970
- return initRequestSource();
25971
- case 3:
25972
- resData = _context.sent;
25973
- data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
25974
- return _objectSpread2(_objectSpread2({}, item), {}, {
25975
- label: item.text,
25976
- isLeaf: false
25977
- });
25978
- })) || [];
25979
- setHandSource(data);
25980
- case 6:
25981
- case "end":
25982
- return _context.stop();
26071
+ while (1) {
26072
+ switch (_context.prev = _context.next) {
26073
+ case 0:
26074
+ if (!(!source && initRequestSource)) {
26075
+ _context.next = 6;
26076
+ break;
26077
+ }
26078
+ _context.next = 3;
26079
+ return initRequestSource();
26080
+ case 3:
26081
+ resData = _context.sent;
26082
+ data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
26083
+ return _objectSpread2(_objectSpread2({}, item), {}, {
26084
+ label: item.text,
26085
+ isLeaf: false
26086
+ });
26087
+ })) || [];
26088
+ setHandSource(data);
26089
+ case 6:
26090
+ case "end":
26091
+ return _context.stop();
26092
+ }
25983
26093
  }
25984
26094
  }, _callee);
25985
26095
  })), []);
@@ -26111,18 +26221,20 @@ function getRegularThresholdRange(_x) {
26111
26221
  function _getRegularThresholdRange() {
26112
26222
  _getRegularThresholdRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
26113
26223
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26114
- while (1) switch (_context.prev = _context.next) {
26115
- case 0:
26116
- return _context.abrupt("return", axios({
26117
- url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
26118
- method: 'POST',
26119
- data: _objectSpread2(_objectSpread2({}, params), {}, {
26120
- queryIdentify: undefined
26121
- })
26122
- }));
26123
- case 1:
26124
- case "end":
26125
- return _context.stop();
26224
+ while (1) {
26225
+ switch (_context.prev = _context.next) {
26226
+ case 0:
26227
+ return _context.abrupt("return", axios({
26228
+ url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
26229
+ method: 'POST',
26230
+ data: _objectSpread2(_objectSpread2({}, params), {}, {
26231
+ queryIdentify: undefined
26232
+ })
26233
+ }));
26234
+ case 1:
26235
+ case "end":
26236
+ return _context.stop();
26237
+ }
26126
26238
  }
26127
26239
  }, _callee);
26128
26240
  }));
@@ -26261,136 +26373,137 @@ var RuleField = /*#__PURE__*/function (_Component) {
26261
26373
  _this.getRegularThresholdRange(queryIdentify, propertyCode, queryIdentifyType);
26262
26374
  });
26263
26375
  };
26264
- //规则对象属性枚举值查询处理 queryIdentify有值是表示该属性有枚举选择
26265
26376
  _this.getRegularThresholdRange = /*#__PURE__*/function () {
26266
26377
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queryIdentify, propertyCode, queryIdentifyType) {
26267
26378
  var thresholdQuery, extraRequestUrl, querParams, needQueryList, res;
26268
26379
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26269
- while (1) switch (_context.prev = _context.next) {
26270
- case 0:
26271
- if (queryIdentify) {
26272
- _context.next = 2;
26273
- break;
26274
- }
26275
- return _context.abrupt("return");
26276
- case 2:
26277
- thresholdQuery = _this.state.thresholdQuery;
26278
- extraRequestUrl = '';
26279
- querParams = setParams(propertyCode, thresholdQuery);
26280
- if (!queryIdentityInfo.find(function (item) {
26281
- return item.identity == propertyCode;
26282
- })) {
26283
- _context.next = 10;
26284
- break;
26285
- }
26286
- //判断查询属性枚举时有没有必传参数,如果必传参数没有值则不调用查询接口
26287
- needQueryList = queryIdentityInfo.find(function (item) {
26288
- return item.identity == propertyCode;
26289
- }).queryParam.filter(function (item) {
26290
- return item.isRequired;
26291
- }).map(function (item) {
26292
- return item.queryKey;
26293
- });
26294
- if (!needQueryList.some(function (item) {
26295
- return !querParams[item] || !querParams[item].length;
26296
- })) {
26297
- _context.next = 9;
26298
- break;
26299
- }
26300
- return _context.abrupt("return");
26301
- case 9:
26302
- extraRequestUrl = queryIdentityInfo.find(function (item) {
26303
- return item.identity == propertyCode;
26304
- }).requestUrl || '';
26305
- case 10:
26306
- if (queryIdentifyType === 'dictCodeIdentify') {
26307
- extraRequestUrl = "bscDictItem/selectDictItemsByDictCode"; // 字典接口
26308
- querParams = {
26309
- dictCode: queryIdentify
26310
- };
26311
- } else if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26312
- extraRequestUrl = "dictDynamicItem/getDynamicData/".concat(queryIdentify); // 字典接口
26313
- // querParams = { dictCode: queryIdentify }
26314
- }
26315
- if (!extraRequestUrl) {
26316
- _context.next = 16;
26317
- break;
26318
- }
26319
- if (queryIdentify == 'maintain_area_code') {
26320
- extraRequestUrl = "/basic/".concat(extraRequestUrl).concat(querParams.memberCardCode, "?").concat(stringify(querParams));
26321
- } else if (queryIdentifyType == 'dictCodeIdentify') {
26322
- extraRequestUrl = "/basic/".concat(extraRequestUrl, "?").concat(stringify(querParams));
26323
- } else if (queryIdentifyType == 'dynamicDictCodeIdentify') {
26324
- extraRequestUrl = "/basic/".concat(extraRequestUrl);
26325
- }
26326
- request$1({
26327
- url: extraRequestUrl,
26328
- method: 'get',
26329
- converter: function converter(res) {
26330
- if (handleError(res)) {
26331
- var _handleData = (res === null || res === void 0 ? void 0 : res.data) || [];
26332
- if (queryIdentifyType === 'dictCodeIdentify') {
26333
- var _handleData2;
26334
- _handleData = ((_handleData2 = _handleData) === null || _handleData2 === void 0 ? void 0 : _handleData2.length) ? _handleData.map(function (i) {
26335
- return {
26336
- code: i.dictItemCode,
26337
- name: i.dictItemName
26338
- };
26339
- }) : [];
26340
- }
26341
- if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26342
- var _handleData3;
26343
- _handleData = ((_handleData3 = _handleData) === null || _handleData3 === void 0 ? void 0 : _handleData3.length) ? _handleData.map(function (i) {
26344
- return {
26345
- code: i.code.toString(),
26346
- name: i.name
26347
- };
26348
- }) : [];
26380
+ while (1) {
26381
+ switch (_context.prev = _context.next) {
26382
+ case 0:
26383
+ if (queryIdentify) {
26384
+ _context.next = 2;
26385
+ break;
26386
+ }
26387
+ return _context.abrupt("return");
26388
+ case 2:
26389
+ thresholdQuery = _this.state.thresholdQuery;
26390
+ extraRequestUrl = '';
26391
+ querParams = setParams(propertyCode, thresholdQuery);
26392
+ if (!queryIdentityInfo.find(function (item) {
26393
+ return item.identity == propertyCode;
26394
+ })) {
26395
+ _context.next = 10;
26396
+ break;
26397
+ }
26398
+ //判断查询属性枚举时有没有必传参数,如果必传参数没有值则不调用查询接口
26399
+ needQueryList = queryIdentityInfo.find(function (item) {
26400
+ return item.identity == propertyCode;
26401
+ }).queryParam.filter(function (item) {
26402
+ return item.isRequired;
26403
+ }).map(function (item) {
26404
+ return item.queryKey;
26405
+ });
26406
+ if (!needQueryList.some(function (item) {
26407
+ return !querParams[item] || !querParams[item].length;
26408
+ })) {
26409
+ _context.next = 9;
26410
+ break;
26411
+ }
26412
+ return _context.abrupt("return");
26413
+ case 9:
26414
+ extraRequestUrl = queryIdentityInfo.find(function (item) {
26415
+ return item.identity == propertyCode;
26416
+ }).requestUrl || '';
26417
+ case 10:
26418
+ if (queryIdentifyType === 'dictCodeIdentify') {
26419
+ extraRequestUrl = "bscDictItem/selectDictItemsByDictCode"; // 字典接口
26420
+ querParams = {
26421
+ dictCode: queryIdentify
26422
+ };
26423
+ } else if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26424
+ extraRequestUrl = "dictDynamicItem/getDynamicData/".concat(queryIdentify); // 字典接口
26425
+ // querParams = { dictCode: queryIdentify }
26426
+ }
26427
+ if (!extraRequestUrl) {
26428
+ _context.next = 16;
26429
+ break;
26430
+ }
26431
+ if (queryIdentify == 'maintain_area_code') {
26432
+ extraRequestUrl = "/basic/".concat(extraRequestUrl).concat(querParams.memberCardCode, "?").concat(stringify(querParams));
26433
+ } else if (queryIdentifyType == 'dictCodeIdentify') {
26434
+ extraRequestUrl = "/basic/".concat(extraRequestUrl, "?").concat(stringify(querParams));
26435
+ } else if (queryIdentifyType == 'dynamicDictCodeIdentify') {
26436
+ extraRequestUrl = "/basic/".concat(extraRequestUrl);
26437
+ }
26438
+ request$1({
26439
+ url: extraRequestUrl,
26440
+ method: 'get',
26441
+ converter: function converter(res) {
26442
+ if (handleError(res)) {
26443
+ var _handleData = (res === null || res === void 0 ? void 0 : res.data) || [];
26444
+ if (queryIdentifyType === 'dictCodeIdentify') {
26445
+ var _handleData2;
26446
+ _handleData = ((_handleData2 = _handleData) === null || _handleData2 === void 0 ? void 0 : _handleData2.length) ? _handleData.map(function (i) {
26447
+ return {
26448
+ code: i.dictItemCode,
26449
+ name: i.dictItemName
26450
+ };
26451
+ }) : [];
26452
+ }
26453
+ if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26454
+ var _handleData3;
26455
+ _handleData = ((_handleData3 = _handleData) === null || _handleData3 === void 0 ? void 0 : _handleData3.length) ? _handleData.map(function (i) {
26456
+ return {
26457
+ code: i.code.toString(),
26458
+ name: i.name
26459
+ };
26460
+ }) : [];
26461
+ }
26462
+ _this.setState({
26463
+ thresholdList: _handleData
26464
+ });
26349
26465
  }
26350
- _this.setState({
26351
- thresholdList: _handleData
26352
- });
26466
+ return handleData;
26353
26467
  }
26354
- return handleData;
26355
- }
26356
- });
26357
- _context.next = 29;
26358
- break;
26359
- case 16:
26360
- if (!(queryIdentifyType == 'objectPropertyListIdentify')) {
26361
- _context.next = 20;
26468
+ });
26469
+ _context.next = 29;
26362
26470
  break;
26363
- }
26364
- _this.setState({
26365
- thresholdList: queryIdentify
26366
- });
26367
- _context.next = 29;
26368
- break;
26369
- case 20:
26370
- if (!(queryIdentifyType == 'objectPropertyCodeIdentify')) {
26371
- _context.next = 24;
26471
+ case 16:
26472
+ if (!(queryIdentifyType == 'objectPropertyListIdentify')) {
26473
+ _context.next = 20;
26474
+ break;
26475
+ }
26476
+ _this.setState({
26477
+ thresholdList: queryIdentify
26478
+ });
26479
+ _context.next = 29;
26372
26480
  break;
26373
- }
26374
- // TODO待处理
26375
- _this.setState({
26376
- thresholdList: []
26377
- });
26378
- _context.next = 29;
26379
- break;
26380
- case 24:
26381
- querParams.queryIdentify = queryIdentify;
26382
- _context.next = 27;
26383
- return getRegularThresholdRange(querParams);
26384
- case 27:
26385
- res = _context.sent;
26386
- if (handleError(res)) {
26481
+ case 20:
26482
+ if (!(queryIdentifyType == 'objectPropertyCodeIdentify')) {
26483
+ _context.next = 24;
26484
+ break;
26485
+ }
26486
+ // TODO待处理
26387
26487
  _this.setState({
26388
- thresholdList: (res === null || res === void 0 ? void 0 : res.data) || []
26488
+ thresholdList: []
26389
26489
  });
26390
- }
26391
- case 29:
26392
- case "end":
26393
- return _context.stop();
26490
+ _context.next = 29;
26491
+ break;
26492
+ case 24:
26493
+ querParams.queryIdentify = queryIdentify;
26494
+ _context.next = 27;
26495
+ return getRegularThresholdRange(querParams);
26496
+ case 27:
26497
+ res = _context.sent;
26498
+ if (handleError(res)) {
26499
+ _this.setState({
26500
+ thresholdList: (res === null || res === void 0 ? void 0 : res.data) || []
26501
+ });
26502
+ }
26503
+ case 29:
26504
+ case "end":
26505
+ return _context.stop();
26506
+ }
26394
26507
  }
26395
26508
  }, _callee);
26396
26509
  }));
@@ -27209,30 +27322,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27209
27322
  notChangeOnSelect: true,
27210
27323
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
27211
27324
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
27212
- while (1) switch (_context2.prev = _context2.next) {
27213
- case 0:
27214
- _context2.next = 2;
27215
- return request$1({
27216
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27217
- method: 'get',
27218
- converter: function converter(_ref3) {
27219
- var data = _ref3.data;
27220
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27221
- return {
27222
- text: item.name,
27223
- value: item.id,
27224
- level: item.level,
27225
- id: item.id
27226
- };
27227
- }) : [];
27228
- return handleData;
27229
- }
27230
- });
27231
- case 2:
27232
- return _context2.abrupt("return", _context2.sent);
27233
- case 3:
27234
- case "end":
27235
- return _context2.stop();
27325
+ while (1) {
27326
+ switch (_context2.prev = _context2.next) {
27327
+ case 0:
27328
+ _context2.next = 2;
27329
+ return request$1({
27330
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27331
+ method: 'get',
27332
+ converter: function converter(_ref3) {
27333
+ var data = _ref3.data;
27334
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27335
+ return {
27336
+ text: item.name,
27337
+ value: item.id,
27338
+ level: item.level,
27339
+ id: item.id
27340
+ };
27341
+ }) : [];
27342
+ return handleData;
27343
+ }
27344
+ });
27345
+ case 2:
27346
+ return _context2.abrupt("return", _context2.sent);
27347
+ case 3:
27348
+ case "end":
27349
+ return _context2.stop();
27350
+ }
27236
27351
  }
27237
27352
  }, _callee2);
27238
27353
  })),
@@ -27258,30 +27373,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27258
27373
  notChangeOnSelect: true,
27259
27374
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
27260
27375
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
27261
- while (1) switch (_context3.prev = _context3.next) {
27262
- case 0:
27263
- _context3.next = 2;
27264
- return request$1({
27265
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27266
- method: 'get',
27267
- converter: function converter(_ref5) {
27268
- var data = _ref5.data;
27269
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27270
- return {
27271
- text: item.name,
27272
- value: item.id,
27273
- level: item.level,
27274
- id: item.id
27275
- };
27276
- }) : [];
27277
- return handleData;
27278
- }
27279
- });
27280
- case 2:
27281
- return _context3.abrupt("return", _context3.sent);
27282
- case 3:
27283
- case "end":
27284
- return _context3.stop();
27376
+ while (1) {
27377
+ switch (_context3.prev = _context3.next) {
27378
+ case 0:
27379
+ _context3.next = 2;
27380
+ return request$1({
27381
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27382
+ method: 'get',
27383
+ converter: function converter(_ref5) {
27384
+ var data = _ref5.data;
27385
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27386
+ return {
27387
+ text: item.name,
27388
+ value: item.id,
27389
+ level: item.level,
27390
+ id: item.id
27391
+ };
27392
+ }) : [];
27393
+ return handleData;
27394
+ }
27395
+ });
27396
+ case 2:
27397
+ return _context3.abrupt("return", _context3.sent);
27398
+ case 3:
27399
+ case "end":
27400
+ return _context3.stop();
27401
+ }
27285
27402
  }
27286
27403
  }, _callee3);
27287
27404
  })),
@@ -27309,30 +27426,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27309
27426
  notChangeOnSelect: true,
27310
27427
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
27311
27428
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
27312
- while (1) switch (_context4.prev = _context4.next) {
27313
- case 0:
27314
- _context4.next = 2;
27315
- return request$1({
27316
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27317
- method: 'get',
27318
- converter: function converter(_ref7) {
27319
- var data = _ref7.data;
27320
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27321
- return {
27322
- text: item.name,
27323
- value: item.id,
27324
- level: item.level,
27325
- id: item.id
27326
- };
27327
- }) : [];
27328
- return handleData;
27329
- }
27330
- });
27331
- case 2:
27332
- return _context4.abrupt("return", _context4.sent);
27333
- case 3:
27334
- case "end":
27335
- return _context4.stop();
27429
+ while (1) {
27430
+ switch (_context4.prev = _context4.next) {
27431
+ case 0:
27432
+ _context4.next = 2;
27433
+ return request$1({
27434
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27435
+ method: 'get',
27436
+ converter: function converter(_ref7) {
27437
+ var data = _ref7.data;
27438
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27439
+ return {
27440
+ text: item.name,
27441
+ value: item.id,
27442
+ level: item.level,
27443
+ id: item.id
27444
+ };
27445
+ }) : [];
27446
+ return handleData;
27447
+ }
27448
+ });
27449
+ case 2:
27450
+ return _context4.abrupt("return", _context4.sent);
27451
+ case 3:
27452
+ case "end":
27453
+ return _context4.stop();
27454
+ }
27336
27455
  }
27337
27456
  }, _callee4);
27338
27457
  })),
@@ -28449,6 +28568,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
28449
28568
  });
28450
28569
  }
28451
28570
  }
28571
+
28572
+ //规则对象属性枚举值查询处理 queryIdentify有值是表示该属性有枚举选择
28452
28573
  }, {
28453
28574
  key: "render",
28454
28575
  value: function render() {
@@ -29279,7 +29400,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29279
29400
  callBack(ruleClassData);
29280
29401
  });
29281
29402
  };
29282
- // 树结构 转化成 平行树 (递归函数)
29283
29403
  _this.coverToParallel = function (treeData, result) {
29284
29404
  treeData.forEach(function (el) {
29285
29405
  result.push(el);
@@ -29533,7 +29653,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29533
29653
  callBack(ruleClassData);
29534
29654
  });
29535
29655
  };
29536
- // 场景需要返回值2022.11.15
29537
29656
  _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, disabled, boxStyle) {
29538
29657
  var _ruleReturnConfig$rig;
29539
29658
  var isShowResponse = itemDetail.response['enable'];
@@ -29831,30 +29950,32 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29831
29950
  notChangeOnSelect: true,
29832
29951
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
29833
29952
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29834
- while (1) switch (_context.prev = _context.next) {
29835
- case 0:
29836
- _context.next = 2;
29837
- return request$1({
29838
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
29839
- method: 'get',
29840
- converter: function converter(_ref2) {
29841
- var data = _ref2.data;
29842
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
29843
- return {
29844
- text: item.name,
29845
- value: item.id,
29846
- level: item.level,
29847
- id: item.id
29848
- };
29849
- }) : [];
29850
- return handleData;
29851
- }
29852
- });
29853
- case 2:
29854
- return _context.abrupt("return", _context.sent);
29855
- case 3:
29856
- case "end":
29857
- return _context.stop();
29953
+ while (1) {
29954
+ switch (_context.prev = _context.next) {
29955
+ case 0:
29956
+ _context.next = 2;
29957
+ return request$1({
29958
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
29959
+ method: 'get',
29960
+ converter: function converter(_ref2) {
29961
+ var data = _ref2.data;
29962
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
29963
+ return {
29964
+ text: item.name,
29965
+ value: item.id,
29966
+ level: item.level,
29967
+ id: item.id
29968
+ };
29969
+ }) : [];
29970
+ return handleData;
29971
+ }
29972
+ });
29973
+ case 2:
29974
+ return _context.abrupt("return", _context.sent);
29975
+ case 3:
29976
+ case "end":
29977
+ return _context.stop();
29978
+ }
29858
29979
  }
29859
29980
  }, _callee);
29860
29981
  })),
@@ -30188,7 +30309,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30188
30309
  }
30189
30310
  }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30190
30311
  };
30191
- //添加同一层级条件
30192
30312
  _this.addPeerRule = function (itemDetail) {
30193
30313
  var ruleClassData = _this.state.ruleClassData;
30194
30314
  var _this$props4 = _this.props,
@@ -30209,7 +30329,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30209
30329
  callBack(ruleClassData);
30210
30330
  });
30211
30331
  };
30212
- //添加子层级条件
30213
30332
  _this.addChildRules = function (itemDetail) {
30214
30333
  var ruleClassData = _this.state.ruleClassData;
30215
30334
  var callBack = _this.props.callBack;
@@ -30285,7 +30404,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30285
30404
  callBack(ruleClassData);
30286
30405
  });
30287
30406
  };
30288
- // 新增执行顺序
30289
30407
  _this.handleSelectRuleAction = function (keys, classDataIndex, callback) {
30290
30408
  callback();
30291
30409
  var callBack = _this.props.callBack;
@@ -30436,4 +30554,4 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30436
30554
  return RuleObjectComponent;
30437
30555
  }(Component);
30438
30556
 
30439
- export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, BsCascader, index$6 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$2 as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$4 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, index$5 as HomePageWrapper, JsonQueryTable, index$7 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, SearchSelect, index$3 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
30557
+ export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };