@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
@@ -4,7 +4,7 @@ import styles from './index.less';
4
4
  import { getRegularThresholdRange } from './services';
5
5
  import moment from 'moment';
6
6
  import { handleError, judgeIsEmpty } from '../../../utils/utils';
7
- import { queryIdentityInfo, findChangedThresholdQuery, setParams } from './util';
7
+ import { queryIdentityInfo, findChangedThresholdQuery, setParams, dateFormat, fullDateFormat } from './util';
8
8
  import { request as SulaRequest } from 'bssula';
9
9
  import { stringify } from 'querystring';
10
10
  import {
@@ -272,8 +272,6 @@ export default class RuleField extends Component {
272
272
  customerWidth,
273
273
  } = this.props;
274
274
  const { thresholdList } = this.state;
275
- const dateFormat = 'YYYY-MM-DD';
276
- const fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
277
275
  const styleCommon = {
278
276
  width: customerWidth || '150px',
279
277
  };
@@ -2014,6 +2012,112 @@ export default class RuleField extends Component {
2014
2012
  );
2015
2013
  }
2016
2014
  }
2015
+ // 角色选择器
2016
+ if (dataChoiceBusinessType == 360) {
2017
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
2018
+ return (
2019
+ <>
2020
+ <BusinessSearchSelect
2021
+ selectBusinessType="role"
2022
+ selectProps={{
2023
+ style: styleCommon,
2024
+ placeholder: '请选择角色',
2025
+ ...(dataInputBusinessType === 12
2026
+ ? {
2027
+ mode: 'multiple',
2028
+ maxTagCount: 1,
2029
+ }
2030
+ : {}),
2031
+ }}
2032
+ disabled={disabled}
2033
+ labelInValue={true}
2034
+ value={values[0]}
2035
+ requestConfig={{
2036
+ filterInit: 'qp-code-in',
2037
+ }}
2038
+ onChange={(value) => {
2039
+ if (dataInputBusinessType === 12) {
2040
+ values[0] = value.map((i) => i.key);
2041
+ valueNames[0] = value.map((i) => i.label || '');
2042
+ } else {
2043
+ values[0] = [value.key];
2044
+ valueNames[0] = [value.label || ''];
2045
+ }
2046
+ callback(values, valueNames);
2047
+ }}
2048
+ getPopupContainer={() => document.body}
2049
+ />
2050
+ <span>~</span>
2051
+ <BusinessSearchSelect
2052
+ selectBusinessType="role"
2053
+ selectProps={{
2054
+ style: styleCommon,
2055
+ placeholder: '请选择角色',
2056
+ ...(dataInputBusinessType === 12
2057
+ ? {
2058
+ mode: 'multiple',
2059
+ maxTagCount: 1,
2060
+ }
2061
+ : {}),
2062
+ }}
2063
+ disabled={disabled}
2064
+ labelInValue={true}
2065
+ value={values[1]}
2066
+ requestConfig={{
2067
+ filterInit: 'qp-code-in',
2068
+ }}
2069
+ onChange={(value) => {
2070
+ if (dataInputBusinessType === 12) {
2071
+ values[1] = value.map((i) => i.key);
2072
+ valueNames[1] = value.map((i) => i.label || '');
2073
+ } else {
2074
+ values[1] = [value.key];
2075
+ valueNames[1] = [value.label || ''];
2076
+ }
2077
+ callback(values, valueNames);
2078
+ }}
2079
+ getPopupContainer={() => document.body}
2080
+ />
2081
+ </>
2082
+ );
2083
+ } else {
2084
+ const currentValue = dataInputBusinessType === 12 ?
2085
+ values?.map((s,vIndex)=> ({key: s, label: valueNames[vIndex]}))||[]
2086
+ : values[0]&&{key:values[0],label:valueNames[0]}||{}
2087
+ return (
2088
+ <BusinessSearchSelect
2089
+ selectBusinessType="role"
2090
+ selectProps={{
2091
+ style: styleCommon,
2092
+ placeholder: '请选择角色',
2093
+ ...(dataInputBusinessType === 12
2094
+ ? {
2095
+ mode: 'multiple',
2096
+ maxTagCount: 1,
2097
+ }
2098
+ : {}),
2099
+ }}
2100
+ disabled={disabled}
2101
+ labelInValue={true}
2102
+ value={currentValue}
2103
+ requestConfig={{
2104
+ filterInit: 'qp-code-in',
2105
+ }}
2106
+ onChange={(value) => {
2107
+ if (dataInputBusinessType === 12) {
2108
+ values = value.map((i) => i.key)||[];
2109
+ valueNames = value.map((i) => i.label || '')||[];
2110
+ } else {
2111
+ values = value?.key?[value.key]:[];
2112
+ valueNames = value?.label?[value.label]:[];
2113
+ }
2114
+ callback(values, valueNames);
2115
+ }}
2116
+ getPopupContainer={() => document.body}
2117
+ />
2118
+ );
2119
+ }
2120
+ }
2017
2121
  } else {
2018
2122
  if (
2019
2123
  dataTypeCode == 22 ||
@@ -2062,12 +2166,12 @@ export default class RuleField extends Component {
2062
2166
  />
2063
2167
  );
2064
2168
  }
2065
- } else if (dataTypeCode == 41) {
2066
- // 日期41
2169
+ } else if (dataTypeCode == 41 || dataTypeCode == 32) {
2170
+ // 日期41 日期时间32
2067
2171
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
2068
2172
  return (
2069
2173
  <RangePicker
2070
- // showTime
2174
+ showTime={dataTypeCode == 32}
2071
2175
  disabled={disabled}
2072
2176
  style={{ width: customerWidth || '300px' }}
2073
2177
  format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
@@ -2103,6 +2207,7 @@ export default class RuleField extends Component {
2103
2207
  return (
2104
2208
  <>
2105
2209
  <DatePicker
2210
+ showTime={dataTypeCode == 32}
2106
2211
  format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
2107
2212
  disabled={disabled}
2108
2213
  style={{ width: customerWidth || '300px' }}
@@ -137,3 +137,7 @@ export const isObj = (object) => {
137
137
  Object.prototype.toString.call(object).toLowerCase() == '[object object]'
138
138
  );
139
139
  };
140
+
141
+
142
+ export const dateFormat = 'YYYY-MM-DD';
143
+ export const fullDateFormat = 'YYYY-MM-DD HH:mm:ss';