@bit-sun/business-component 2.3.26 → 2.3.28

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 (49) hide show
  1. package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -3
  2. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +2 -1
  3. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  4. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +2 -1
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -1
  7. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +2 -1
  8. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -1
  9. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  10. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  11. package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -1
  12. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -5
  13. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -13
  14. package/dist/components/Business/CommodityEntry/index.d.ts +2 -1
  15. package/dist/components/Business/CommonAlert/index.d.ts +2 -1
  16. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  17. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -5
  18. package/dist/components/Business/HomePageWrapper/index.d.ts +2 -1
  19. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +2 -1
  20. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +2 -1
  21. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +2 -1
  22. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +2 -1
  23. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +2 -1
  24. package/dist/components/Business/JsonQueryTable/static.d.ts +1 -0
  25. package/dist/components/Business/StateFlow/index.d.ts +2 -1
  26. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  27. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +5 -5
  28. package/dist/components/Business/columnSettingTable/index.d.ts +2 -2
  29. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +2 -2
  30. package/dist/components/Business/columnSettingTable/utils.d.ts +2 -1
  31. package/dist/components/Functional/AddSelect/index.d.ts +2 -1
  32. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  33. package/dist/components/Functional/DataValidation/index.d.ts +3 -3
  34. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +2 -1
  35. package/dist/components/Functional/QueryMutipleInput/index.d.ts +2 -1
  36. package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -1
  37. package/dist/components/Solution/RuleComponent/Formula.d.ts +2 -1
  38. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +2 -1
  39. package/dist/index.esm.js +245 -12
  40. package/dist/index.js +245 -12
  41. package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
  42. package/package.json +1 -1
  43. package/src/components/Business/JsonQueryTable/static.ts +19 -0
  44. package/src/components/Business/SearchSelect/BusinessUtils.ts +74 -0
  45. package/src/components/Business/SearchSelect/index.md +57 -0
  46. package/src/components/Business/SearchSelect/utils.ts +1 -1
  47. package/src/components/Solution/RuleComponent/index.js +36 -4
  48. package/src/components/Solution/RuleComponent/ruleFiled.js +111 -6
  49. package/src/components/Solution/RuleComponent/util.js +4 -0
package/dist/index.esm.js CHANGED
@@ -6680,6 +6680,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
6680
6680
  case 'purchaseOrg':
6681
6681
  case 'salesOrg':
6682
6682
  case 'employee2':
6683
+ case 'role':
6683
6684
  result = '/user';
6684
6685
  break;
6685
6686
  case 'deliveryMode':
@@ -8635,6 +8636,84 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8635
8636
  }]
8636
8637
  }, modalTableBusProps);
8637
8638
  }
8639
+ // 角色选择器
8640
+ if (type === 'role') {
8641
+ requestConfig = _objectSpread2({
8642
+ url: "".concat(prefixUrl.selectPrefix, "/role"),
8643
+ filter: 'qp-name,code-orGroup,like',
8644
+ mappingTextField: 'name',
8645
+ mappingTextShowKeyField: 'code',
8646
+ mappingValueField: 'code',
8647
+ otherParams: {
8648
+ 'qp-status-eq': 10,
8649
+ sorter: 'desc-id'
8650
+ },
8651
+ sourceName: 'roleCode'
8652
+ }, requestConfigProp);
8653
+ tableSearchForm = [{
8654
+ name: 'qp-name-like',
8655
+ label: '角色名称'
8656
+ }, {
8657
+ name: 'qp-code-like',
8658
+ label: '角色编码'
8659
+ }, {
8660
+ name: 'qp-categoryCode-eq',
8661
+ type: 'select',
8662
+ label: '角色分类',
8663
+ field: {
8664
+ type: 'select',
8665
+ props: {
8666
+ notFoundContent: '暂无数据',
8667
+ allowClear: true,
8668
+ showSearch: true,
8669
+ showArrow: true,
8670
+ maxTagCount: 1,
8671
+ optionFilterProp: 'children',
8672
+ filterOption: function filterOption(input, option) {
8673
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
8674
+ }
8675
+ }
8676
+ }
8677
+ }];
8678
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/permissionCategory"), {
8679
+ pageSize: 5000,
8680
+ currentPage: 1
8681
+ })]).then(function (x) {
8682
+ formatSource(x, 0, 2, tableSearchForm);
8683
+ });
8684
+ modalTableProps = _objectSpread2({
8685
+ modalTableTitle: '选择角色',
8686
+ tableSearchForm: tableSearchForm,
8687
+ tableColumns: [{
8688
+ title: '角色编码',
8689
+ dataIndex: 'code'
8690
+ }, {
8691
+ title: '角色名称',
8692
+ dataIndex: 'name',
8693
+ render: function render(text) {
8694
+ return handleTextOverflow(text);
8695
+ }
8696
+ }, {
8697
+ title: '角色分类',
8698
+ dataIndex: 'categoryName',
8699
+ render: function render(text) {
8700
+ return handleTextOverflow(text);
8701
+ }
8702
+ }, {
8703
+ dataIndex: 'remark',
8704
+ title: '角色描述',
8705
+ render: function render(text) {
8706
+ return handleTextOverflow(text);
8707
+ }
8708
+ }, {
8709
+ dataIndex: 'applicationName',
8710
+ title: '应用',
8711
+ render: function render(text) {
8712
+ return handleTextOverflow(text);
8713
+ }
8714
+ }]
8715
+ }, modalTableBusProps);
8716
+ }
8638
8717
  return {
8639
8718
  modalTableProps: modalTableProps,
8640
8719
  requestConfig: requestConfig,
@@ -24382,6 +24461,14 @@ var inputTypes = {
24382
24461
  props: _objectSpread2({
24383
24462
  treeCheckable: false
24384
24463
  }, normalSingleSelectProps)
24464
+ },
24465
+ 360: {
24466
+ type: 'bs-roleSelect',
24467
+ props: _objectSpread2(_objectSpread2({}, normalSingleSelectProps), {}, {
24468
+ requestConfig: {
24469
+ filter: 'qp-name,code-orGroup-in'
24470
+ }
24471
+ })
24385
24472
  }
24386
24473
  },
24387
24474
  30: {
@@ -24539,6 +24626,14 @@ var inputTypes = {
24539
24626
  props: _objectSpread2({
24540
24627
  treeCheckable: false
24541
24628
  }, normalSingleSelectProps)
24629
+ },
24630
+ 360: {
24631
+ type: 'bs-roleSelect',
24632
+ props: _objectSpread2(_objectSpread2({}, normalMultipleSelectProps), {}, {
24633
+ requestConfig: {
24634
+ filter: 'qp-name,code-orGroup-in'
24635
+ }
24636
+ })
24542
24637
  }
24543
24638
  }
24544
24639
  };
@@ -24570,7 +24665,8 @@ var choiceType = Object.freeze({
24570
24665
  310: '配送方式选择器',
24571
24666
  330: '变量',
24572
24667
  340: '规则模板选择器',
24573
- 350: '营销区域选择器'
24668
+ 350: '营销区域选择器',
24669
+ 360: '角色选择器'
24574
24670
  });
24575
24671
  var inputType = {
24576
24672
  10: '输入',
@@ -26600,6 +26696,8 @@ var findChangedThresholdQuery = function findChangedThresholdQuery(oldVal, newVa
26600
26696
  var isObj = function isObj(object) {
26601
26697
  return object && _typeof(object) == 'object' && Object.prototype.toString.call(object).toLowerCase() == '[object object]';
26602
26698
  };
26699
+ var dateFormat = 'YYYY-MM-DD';
26700
+ var fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
26603
26701
 
26604
26702
  var RangePicker = DatePicker.RangePicker;
26605
26703
  var RuleField = /*#__PURE__*/function (_Component) {
@@ -26770,8 +26868,6 @@ var RuleField = /*#__PURE__*/function (_Component) {
26770
26868
  disabled = _this$props2.disabled,
26771
26869
  customerWidth = _this$props2.customerWidth;
26772
26870
  var thresholdList = _this.state.thresholdList;
26773
- var dateFormat = 'YYYY-MM-DD';
26774
- var fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
26775
26871
  var styleCommon = {
26776
26872
  width: customerWidth || '150px'
26777
26873
  };
@@ -28681,6 +28777,120 @@ var RuleField = /*#__PURE__*/function (_Component) {
28681
28777
  });
28682
28778
  }
28683
28779
  }
28780
+ // 角色选择器
28781
+ if (dataChoiceBusinessType == 360) {
28782
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
28783
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BusinessSearchSelect$1, {
28784
+ selectBusinessType: "role",
28785
+ selectProps: _objectSpread2({
28786
+ style: styleCommon,
28787
+ placeholder: '请选择角色'
28788
+ }, dataInputBusinessType === 12 ? {
28789
+ mode: 'multiple',
28790
+ maxTagCount: 1
28791
+ } : {}),
28792
+ disabled: disabled,
28793
+ labelInValue: true,
28794
+ value: values[0],
28795
+ requestConfig: {
28796
+ filterInit: 'qp-code-in'
28797
+ },
28798
+ onChange: function onChange(value) {
28799
+ if (dataInputBusinessType === 12) {
28800
+ values[0] = value.map(function (i) {
28801
+ return i.key;
28802
+ });
28803
+ valueNames[0] = value.map(function (i) {
28804
+ return i.label || '';
28805
+ });
28806
+ } else {
28807
+ values[0] = [value.key];
28808
+ valueNames[0] = [value.label || ''];
28809
+ }
28810
+ callback(values, valueNames);
28811
+ },
28812
+ getPopupContainer: function getPopupContainer() {
28813
+ return document.body;
28814
+ }
28815
+ }), /*#__PURE__*/React.createElement("span", null, "~"), /*#__PURE__*/React.createElement(BusinessSearchSelect$1, {
28816
+ selectBusinessType: "role",
28817
+ selectProps: _objectSpread2({
28818
+ style: styleCommon,
28819
+ placeholder: '请选择角色'
28820
+ }, dataInputBusinessType === 12 ? {
28821
+ mode: 'multiple',
28822
+ maxTagCount: 1
28823
+ } : {}),
28824
+ disabled: disabled,
28825
+ labelInValue: true,
28826
+ value: values[1],
28827
+ requestConfig: {
28828
+ filterInit: 'qp-code-in'
28829
+ },
28830
+ onChange: function onChange(value) {
28831
+ if (dataInputBusinessType === 12) {
28832
+ values[1] = value.map(function (i) {
28833
+ return i.key;
28834
+ });
28835
+ valueNames[1] = value.map(function (i) {
28836
+ return i.label || '';
28837
+ });
28838
+ } else {
28839
+ values[1] = [value.key];
28840
+ valueNames[1] = [value.label || ''];
28841
+ }
28842
+ callback(values, valueNames);
28843
+ },
28844
+ getPopupContainer: function getPopupContainer() {
28845
+ return document.body;
28846
+ }
28847
+ }));
28848
+ } else {
28849
+ var _values12;
28850
+ var _currentValue11 = dataInputBusinessType === 12 ? ((_values12 = values) === null || _values12 === void 0 ? void 0 : _values12.map(function (s, vIndex) {
28851
+ return {
28852
+ key: s,
28853
+ label: valueNames[vIndex]
28854
+ };
28855
+ })) || [] : values[0] && {
28856
+ key: values[0],
28857
+ label: valueNames[0]
28858
+ } || {};
28859
+ return /*#__PURE__*/React.createElement(BusinessSearchSelect$1, {
28860
+ selectBusinessType: "role",
28861
+ selectProps: _objectSpread2({
28862
+ style: styleCommon,
28863
+ placeholder: '请选择角色'
28864
+ }, dataInputBusinessType === 12 ? {
28865
+ mode: 'multiple',
28866
+ maxTagCount: 1
28867
+ } : {}),
28868
+ disabled: disabled,
28869
+ labelInValue: true,
28870
+ value: _currentValue11,
28871
+ requestConfig: {
28872
+ filterInit: 'qp-code-in'
28873
+ },
28874
+ onChange: function onChange(value) {
28875
+ if (dataInputBusinessType === 12) {
28876
+ values = value.map(function (i) {
28877
+ return i.key;
28878
+ }) || [];
28879
+ valueNames = value.map(function (i) {
28880
+ return i.label || '';
28881
+ }) || [];
28882
+ } else {
28883
+ values = (value === null || value === void 0 ? void 0 : value.key) ? [value.key] : [];
28884
+ valueNames = (value === null || value === void 0 ? void 0 : value.label) ? [value.label] : [];
28885
+ }
28886
+ callback(values, valueNames);
28887
+ },
28888
+ getPopupContainer: function getPopupContainer() {
28889
+ return document.body;
28890
+ }
28891
+ });
28892
+ }
28893
+ }
28684
28894
  } else {
28685
28895
  if (dataTypeCode == 22 || dataTypeCode == 21 || dataTypeCode == 24 || dataTypeCode == 23) {
28686
28896
  //数值22, 字符串21, 布尔类型24, long23
@@ -28716,12 +28926,11 @@ var RuleField = /*#__PURE__*/function (_Component) {
28716
28926
  }
28717
28927
  });
28718
28928
  }
28719
- } else if (dataTypeCode == 41) {
28720
- // 日期41
28929
+ } else if (dataTypeCode == 41 || dataTypeCode == 32) {
28930
+ // 日期41 日期时间32
28721
28931
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
28722
- return /*#__PURE__*/React.createElement(RangePicker
28723
- // showTime
28724
- , {
28932
+ return /*#__PURE__*/React.createElement(RangePicker, {
28933
+ showTime: dataTypeCode == 32,
28725
28934
  disabled: disabled,
28726
28935
  style: {
28727
28936
  width: customerWidth || '300px'
@@ -28745,6 +28954,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
28745
28954
  });
28746
28955
  } else {
28747
28956
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DatePicker, {
28957
+ showTime: dataTypeCode == 32,
28748
28958
  format: dataTypeCode == 41 ? dateFormat : fullDateFormat,
28749
28959
  disabled: disabled,
28750
28960
  style: {
@@ -29829,18 +30039,18 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29829
30039
  onClick: function onClick() {
29830
30040
  _this.handleLogicalTypeChange(itemDetail, 'or');
29831
30041
  }
29832
- }, "OR"), /*#__PURE__*/React.createElement("p", {
30042
+ }, "\u6216\u8005"), /*#__PURE__*/React.createElement("p", {
29833
30043
  className: 'choose_logical_type',
29834
30044
  onClick: function onClick() {
29835
30045
  _this.handleLogicalTypeChange(itemDetail, 'and');
29836
30046
  }
29837
- }, "AND")),
30047
+ }, "\u5E76\u4E14")),
29838
30048
  trigger: "focus"
29839
30049
  }, /*#__PURE__*/React.createElement(Button, {
29840
30050
  disabled: disabled,
29841
30051
  type: "link",
29842
30052
  className: 'logical_item_btn'
29843
- }, (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.operationCode) == 'or' ? 'OR' : 'AND', /*#__PURE__*/React.createElement(DownOutlined, {
30053
+ }, (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.operationCode) == 'or' ? '或者' : '并且', /*#__PURE__*/React.createElement(DownOutlined, {
29844
30054
  style: {
29845
30055
  marginLeft: '6px'
29846
30056
  }
@@ -30123,7 +30333,9 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30123
30333
  onChange: function onChange(value) {
30124
30334
  handleEdit(ites.code, value);
30125
30335
  }
30126
- }) || null, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 10 && (ites === null || ites === void 0 ? void 0 : ites.valueType) === 41 && /*#__PURE__*/React.createElement(DatePicker, {
30336
+ }) || null, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 10 && ((ites === null || ites === void 0 ? void 0 : ites.valueType) === 41 || (ites === null || ites === void 0 ? void 0 : ites.valueType) === 32) && /*#__PURE__*/React.createElement(DatePicker, {
30337
+ showTime: dataTypeCode == 32,
30338
+ format: dataTypeCode == 41 ? dateFormat : fullDateFormat,
30127
30339
  disabled: disabled,
30128
30340
  defaultValue: ites.defaultValue,
30129
30341
  style: style2,
@@ -30517,6 +30729,27 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30517
30729
  getPopupContainer: function getPopupContainer() {
30518
30730
  return document.body;
30519
30731
  }
30732
+ }) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 360 && /*#__PURE__*/React.createElement(BusinessSearchSelect$1, {
30733
+ selectBusinessType: "role",
30734
+ selectProps: _objectSpread2({
30735
+ style: styleCommon,
30736
+ placeholder: '请选择角色'
30737
+ }, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30 ? {
30738
+ mode: 'multiple',
30739
+ maxTagCount: 1
30740
+ } : {}),
30741
+ disabled: disabled,
30742
+ labelInValue: true,
30743
+ value: showValue(ites.code),
30744
+ requestConfig: {
30745
+ filterInit: 'qp-code-in'
30746
+ },
30747
+ onChange: function onChange(value) {
30748
+ handleEdit(ites.code, value);
30749
+ },
30750
+ getPopupContainer: function getPopupContainer() {
30751
+ return document.body;
30752
+ }
30520
30753
  }) || null, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 40 && /*#__PURE__*/React.createElement("div", {
30521
30754
  style: {
30522
30755
  display: 'flex'