@bit-sun/business-component 2.4.29 → 2.4.30

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.
@@ -15,4 +15,9 @@ export declare function getAccountID(): any;
15
15
  export declare function getUserName(): any;
16
16
  export declare function handleUserPhone(): any;
17
17
  export declare function getCurrentTargetBgId(): string | null;
18
+ /******* 公用localstorage存取 开始 *****/
19
+ export declare const getLastKey: (prefix: any, key: string) => string;
20
+ export declare const getLocalStorageSaveKey: (key: string, channel?: string) => string;
18
21
  export declare const getMenuAuthDataKey: (channel?: string) => string;
22
+ export declare const getLimitMenuDataKey: (channel?: string) => string;
23
+ /******* 公用localstorage结束 *****/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.4.29",
3
+ "version": "2.4.30",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -16,8 +16,7 @@ import deleteIcon from '../../../assets/btn-delete.svg';
16
16
  import moreIcon from '../../../assets/btn-more.svg';
17
17
  import { useLocation, formatMessage } from 'umi';
18
18
  import CommonAlert from '../CommonAlert';
19
- import ENUM from '@/utils/enumConfig';
20
- import { getMenuAuthDataKey } from '@/utils/LocalstorageUtils';
19
+ import { getMenuAuthDataKey, getLimitMenuDataKey } from '@/utils/LocalstorageUtils';
21
20
 
22
21
  interface actionItem {
23
22
  type?: string;
@@ -74,7 +73,7 @@ const DetailWrapper = React.memo(
74
73
  const menuRoutes =
75
74
  window.top == window
76
75
  ? routes.find((item) => item.path === '/')?.routes || []
77
- : JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]');
76
+ : JSON.parse(localStorage.getItem(getLimitMenuDataKey()) || '[]');
78
77
 
79
78
  const breadcrumbNameMap = getMainCrumbNameMap(
80
79
  memoizeOneFormatter(menuRoutes, ''),
@@ -6,7 +6,7 @@ import { Breadcrumb, Space } from 'antd';
6
6
  import './index.less';
7
7
  import { useLocation, formatMessage } from 'umi';
8
8
  import CommonAlert from '../CommonAlert';
9
- import ENUM from '@/utils/enumConfig';
9
+ import { getLimitMenuDataKey } from '@/utils/LocalstorageUtils'
10
10
 
11
11
  export default (props: any) => {
12
12
  const { pathname } = useLocation();
@@ -15,11 +15,11 @@ export default (props: any) => {
15
15
 
16
16
  return (
17
17
  <div id={id} className={'home_page_wrapper'}>
18
- <HeaderWrapper
18
+ <HeaderWrapper
19
19
  pathname={pathname}
20
20
  {
21
21
  ...restProps
22
- }
22
+ }
23
23
  />
24
24
  {props.children}
25
25
  </div>
@@ -27,9 +27,9 @@ export default (props: any) => {
27
27
  };
28
28
 
29
29
  const HeaderWrapper = React.memo(
30
- ({
31
- pathname,
32
- routes=[],
30
+ ({
31
+ pathname,
32
+ routes=[],
33
33
  itemPath,
34
34
  alertProps,
35
35
  extra,
@@ -41,7 +41,7 @@ const HeaderWrapper = React.memo(
41
41
  const menuRoutes =
42
42
  window.top == window
43
43
  ? routes.find((item) => item.path === '/')?.routes || []
44
- : JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]');
44
+ : JSON.parse(localStorage.getItem(getLimitMenuDataKey()) || '[]');
45
45
 
46
46
  const breadcrumbNameMap = getMainCrumbNameMap(
47
47
  memoizeOneFormatter(menuRoutes, ''),
@@ -133,7 +133,7 @@ const HeaderWrapper = React.memo(
133
133
  </Breadcrumb>
134
134
  </div>
135
135
  {
136
- extra ?
136
+ extra ?
137
137
  <Space>
138
138
  {
139
139
  extra
@@ -113,7 +113,9 @@ class RuleObjectComponent extends Component {
113
113
  return {
114
114
  title: item.name,
115
115
  key: item.id,
116
- value: item.code,
116
+ pValue: item.code, // 后端存path key, children同理
117
+ value: item.id, // 前端选中唯一key, children同理
118
+ id: item.id, // 前端选中回显示唯一key, children同理
117
119
  ...(item?.propertyList?.length
118
120
  ? {
119
121
  children: item.propertyList.map((element) => {
@@ -145,7 +147,8 @@ class RuleObjectComponent extends Component {
145
147
  let child = {
146
148
  title: `${item.name}-${element.name}`,
147
149
  key: element.id,
148
- value: `${element.code}`,
150
+ pValue: this.props.isRouteProperty ? `${item.code}.${element.code}` : element.code,
151
+ value: element.id,
149
152
  id: element.id,
150
153
  dataTypeCode: element.valueType,
151
154
  dataChoiceBusinessType: element.choiceType,
@@ -167,7 +170,14 @@ class RuleObjectComponent extends Component {
167
170
  return child;
168
171
  }),
169
172
  }
170
- : {}),
173
+ : {
174
+ isLeaf: this.props.metaObjectCode ? true : false,
175
+ metaObjectCode: this.props.metaObjectCode || item.code,
176
+ ...item,
177
+ dataTypeCode: item.valueType,
178
+ dataChoiceBusinessType: item.choiceType,
179
+ dataInputBusinessType: item.inputType,
180
+ }),
171
181
  };
172
182
  });
173
183
  this.setState({
@@ -207,7 +217,8 @@ class RuleObjectComponent extends Component {
207
217
  let child = {
208
218
  title: `${parentTitle}-${element.name}`,
209
219
  key: `${parentKey}.${element.id}`,
210
- value: `${parentKey}.${element.code}`,
220
+ pValue: `${parentKey}.${element.code}`,
221
+ value: element.id,
211
222
  id: element.id,
212
223
  dataTypeCode: element.valueType,
213
224
  dataChoiceBusinessType: element.choiceType,
@@ -242,7 +253,7 @@ class RuleObjectComponent extends Component {
242
253
  // })
243
254
  const list =
244
255
  operationList.find((item) => item.code == id)?.operationList || [];
245
- return list;
256
+ return this.props.isShowAllOperationList ? operationList : list;
246
257
  };
247
258
 
248
259
  handleValuesChange = (itemDetail, newValues, newValueNames) => {
@@ -303,6 +314,7 @@ class RuleObjectComponent extends Component {
303
314
  onlyAction,
304
315
  handleOperatingAction,
305
316
  ruleGroupInfo,
317
+ needShowAction = true,
306
318
  } = this.props;
307
319
  const isRuleInstance = ruleGroupInfo?.type?.indexOf('instance') > -1;
308
320
  const ruleGroupName = ruleGroupInfo?.ruleGroupList?.[0]?.name || '规则分组';
@@ -440,6 +452,7 @@ class RuleObjectComponent extends Component {
440
452
  }}
441
453
  >
442
454
  <Input
455
+ disabled={disabled}
443
456
  value={currentRuleName}
444
457
  style={{ width: '200px' }}
445
458
  onChange={(e) => {
@@ -449,6 +462,7 @@ class RuleObjectComponent extends Component {
449
462
  }}
450
463
  />
451
464
  <Button
465
+ disabled={disabled}
452
466
  type="link"
453
467
  onClick={() => {
454
468
  const { ruleClassData, currentRuleName } = this.state;
@@ -462,6 +476,7 @@ class RuleObjectComponent extends Component {
462
476
  保存
463
477
  </Button>
464
478
  <Button
479
+ disabled={disabled}
465
480
  type="link"
466
481
  onClick={() => {
467
482
  this.setState({
@@ -486,21 +501,23 @@ class RuleObjectComponent extends Component {
486
501
  relateDatas,
487
502
  )}
488
503
  </div>
489
- <div className={'base_rule_item3'}>
490
- {(extraInfo &&
491
- isRuleActionConfig &&
492
- (!onlyCondition || !onlyAction) &&
493
- this.renderRuleTypeItem(
494
- extraInfo,
495
- item,
496
- 1,
497
- classDataIndex,
498
- ruleTypeData,
499
- ruleReturnConfig,
500
- isRuleInstance
501
- )) ||
504
+ {needShowAction && (
505
+ <div className={'base_rule_item3'}>
506
+ {(extraInfo &&
507
+ isRuleActionConfig &&
508
+ (!onlyCondition || !onlyAction) &&
509
+ this.renderRuleTypeItem(
510
+ extraInfo,
511
+ item,
512
+ 1,
513
+ classDataIndex,
514
+ ruleTypeData,
515
+ ruleReturnConfig,
516
+ isRuleInstance
517
+ )) ||
502
518
  null}
503
- </div>
519
+ </div>
520
+ ) || null}
504
521
  </div>
505
522
  )}
506
523
  </div>
@@ -513,7 +530,7 @@ class RuleObjectComponent extends Component {
513
530
 
514
531
  handleAddRule = () => {
515
532
  const { ruleClassData } = this.state;
516
- const { callBack, ruleTypeData, ruleGroupInfo } = this.props;
533
+ const { callBack, ruleTypeData=[], ruleGroupInfo } = this.props;
517
534
  const isRuleInstance = ruleGroupInfo?.type?.indexOf('instance') > -1;
518
535
  const initKongData = {
519
536
  ruleName: `规则${ruleClassData?.length + 1}`,
@@ -529,7 +546,7 @@ class RuleObjectComponent extends Component {
529
546
  enable: false,
530
547
  value: '',
531
548
  },
532
- execute: ruleTypeData.map((s) => {
549
+ execute: ruleTypeData?.map((s) => {
533
550
  return {
534
551
  priority: 1,
535
552
  code: s.code,
@@ -537,7 +554,7 @@ class RuleObjectComponent extends Component {
537
554
  configPropertyCode: 'configPropertyValue',
538
555
  },
539
556
  };
540
- }),
557
+ })||[],
541
558
  },
542
559
  }
543
560
  const initTemplateData = ruleGroupInfo?.templateData && Object.keys(ruleGroupInfo?.templateData)?.length ? {
@@ -699,12 +716,12 @@ class RuleObjectComponent extends Component {
699
716
  ) : (
700
717
  <div style={{ display: 'flex', alignItems: 'center' }}>
701
718
  <TreeSelect
702
- value={itemDetail.propertyPath}
719
+ value={itemDetail.elementId}
703
720
  disabled={disabled}
704
721
  onChange={(value, name, nodeInfo) => {
705
722
  if (!nodeInfo.triggerNode.props.isLeaf) return; //只有最末端叶子节点可选中
706
723
  const { ruleClassData } = this.state;
707
- itemDetail.propertyPath = value;
724
+ itemDetail.propertyPath = nodeInfo.triggerNode.props.pValue;
708
725
  itemDetail.params = [];
709
726
  itemDetail.paramNames = [];
710
727
  itemDetail.operationCode = '';
@@ -754,6 +771,7 @@ class RuleObjectComponent extends Component {
754
771
  </Select>
755
772
  {!itemDetail?.isInsertParam ? (
756
773
  <RuleField
774
+ customerWidth={this.props.customerWidth}
757
775
  selectOperation={itemDetail?.operationCode || ''}
758
776
  disabled={disabled}
759
777
  initialThresholdQuery={thresholdQuery}
@@ -780,11 +798,11 @@ class RuleObjectComponent extends Component {
780
798
  <Select
781
799
  disabled={disabled}
782
800
  value={
783
- itemDetail?.params?.[0]?.replace('{', '').replace('}', '') ||
801
+ itemDetail?.systemCode || itemDetail?.params?.[0]?.replace('{', '').replace('}', '') ||
784
802
  ''
785
- }
803
+ } // systemCode兼容用户结算组织那边使用规则
786
804
  style={{
787
- width: '150px',
805
+ width: '250px',
788
806
  marginLeft: '10px',
789
807
  display: itemDetail?.isInsertParam ? '' : 'none',
790
808
  }}
@@ -796,6 +814,7 @@ class RuleObjectComponent extends Component {
796
814
  (i) => i.code == value,
797
815
  )?.name;
798
816
  itemDetail.paramNames = [name || ''];
817
+ itemDetail.systemCode = value;
799
818
  this.setState(
800
819
  {
801
820
  ruleClassData,
@@ -806,7 +825,7 @@ class RuleObjectComponent extends Component {
806
825
  );
807
826
  }}
808
827
  >
809
- {systemVariableList
828
+ {systemVariableList?.length
810
829
  ? systemVariableList.map((item) => (
811
830
  <Select.Option value={item.code} key={item.code}>
812
831
  {item.name}
@@ -842,16 +861,22 @@ class RuleObjectComponent extends Component {
842
861
  <Button
843
862
  type="link"
844
863
  disabled={
845
- disabled || itemDetail.operationCode === '' || !itemDetail.operationCode
864
+ disabled || (itemDetail.operationCode === '' || !itemDetail.operationCode
846
865
  ? true
847
- : false
866
+ : false)
848
867
  }
849
868
  onClick={() => {
850
869
  const { ruleClassData } = this.state;
851
- if (systemVariableList?.length) {
870
+ if (systemVariableList && Array.isArray(systemVariableList) && systemVariableList.length && systemVariableList[0].code!== '-1' ) {
852
871
  itemDetail.isInsertParam = !itemDetail.isInsertParam;
853
- delete itemDetail.params;
854
- delete itemDetail.paramNames;
872
+ if (itemDetail.isInsertParam) {
873
+ itemDetail.type = 10;
874
+ itemDetail.paramNames = [];
875
+ itemDetail.params = [];
876
+ } else {
877
+ itemDetail.systemCode = null;
878
+ }
879
+
855
880
  this.setState(
856
881
  {
857
882
  ruleClassData,
@@ -1775,8 +1800,9 @@ class RuleObjectComponent extends Component {
1775
1800
  };
1776
1801
  return (
1777
1802
  <div>
1778
- <div style={{ textAlign: 'right', display: isRuleInstance ? 'none' : 'flex' }}>
1803
+ <div style={{ textAlign: 'right', display: 'flex' }}>
1779
1804
  <Button
1805
+ disabled={disabled}
1780
1806
  type="link"
1781
1807
  onClick={() => {
1782
1808
  if (isHaveRuleTypeData) {
@@ -1796,6 +1822,7 @@ class RuleObjectComponent extends Component {
1796
1822
  新增动作
1797
1823
  </Button>
1798
1824
  <Button
1825
+ disabled={disabled}
1799
1826
  type="link"
1800
1827
  onClick={() => {
1801
1828
  if (isHaveRuleReturnConfig) {
@@ -1876,6 +1903,7 @@ class RuleObjectComponent extends Component {
1876
1903
  {
1877
1904
  // "expressionType": "relation",
1878
1905
  operationType: 'relation',
1906
+ type: 20,
1879
1907
  operationCode: '',
1880
1908
  propertyPath: '',
1881
1909
  params: [],
@@ -1894,7 +1922,7 @@ class RuleObjectComponent extends Component {
1894
1922
 
1895
1923
  handleDeleteRule = (itemDetail, parentDetail, classDataIndex) => {
1896
1924
  const { ruleClassData } = this.state;
1897
- const { callBack } = this.props;
1925
+ const { callBack, metaObjectCode } = this.props;
1898
1926
  if (parentDetail.ruleName) {
1899
1927
  //删除根规则层级最后一条时整个规则项删除
1900
1928
  ruleClassData.splice(classDataIndex, 1);
@@ -1924,8 +1952,7 @@ class RuleObjectComponent extends Component {
1924
1952
  parentDetail.paramNames = parentDetail.subExpression[0].paramNames
1925
1953
  ? [...parentDetail.subExpression[0].paramNames]
1926
1954
  : [];
1927
- parentDetail.metaObjectCode =
1928
- parentDetail.subExpression[0].metaObjectCode;
1955
+ parentDetail.metaObjectCode = metaObjectCode || parentDetail.subExpression[0].metaObjectCode;
1929
1956
  parentDetail.elementId = parentDetail.subExpression[0].elementId;
1930
1957
  parentDetail.elementName = parentDetail.subExpression[0].elementName;
1931
1958
  parentDetail.dataTypeCode =
@@ -2005,25 +2032,28 @@ class RuleObjectComponent extends Component {
2005
2032
  };
2006
2033
 
2007
2034
  render() {
2008
- const { onlyOneRule, callBack } = this.props;
2035
+ const { onlyOneRule, callBack, disabled, headerButtonComponentFun } = this.props;
2009
2036
  const { ruleClassData, modalParams } = this.state;
2010
2037
  return (
2011
2038
  <div className={'base_rule'}>
2012
2039
  <div className={'base_rule_content'}>
2013
- <div
2014
- style={{
2015
- display: onlyOneRule ? 'none' : 'block',
2016
- }}
2017
- className={'base_rule_line_title'}
2018
- >
2019
- <Button
2020
- onClick={this.handleAddRule}
2021
- className={'base_rule_btn_style'}
2022
- type="link"
2040
+ {headerButtonComponentFun?headerButtonComponentFun(this.handleAddRule): (
2041
+ <div
2042
+ disabled={disabled}
2043
+ style={{
2044
+ display: onlyOneRule ? 'none' : 'block',
2045
+ }}
2046
+ className={'base_rule_line_title'}
2023
2047
  >
2024
- 新增规则
2025
- </Button>
2026
- </div>
2048
+ <Button
2049
+ onClick={this.handleAddRule}
2050
+ className={'base_rule_btn_style'}
2051
+ type="link"
2052
+ >
2053
+ 新增规则
2054
+ </Button>
2055
+ </div>
2056
+ )}
2027
2057
  <div>{this.renderRuleContent()}</div>
2028
2058
  </div>
2029
2059
  {(modalParams.visible && (
@@ -47,7 +47,6 @@
47
47
 
48
48
  .base_rule_line_content {
49
49
  display: flex;
50
- // border-bottom: 1px solid #d9d9d9;
51
50
  padding: 15px;
52
51
  overflow-x: auto;
53
52
  .base_rule_icon_btn {
@@ -277,7 +277,7 @@ export default class RuleField extends Component {
277
277
  width: customerWidth || '150px',
278
278
  };
279
279
  if (!selectOperation) return <Input disabled style={styleCommon}></Input>;
280
- const SET_TYPE = ['in', 'nin', 'cn', 'ncn']; //集合类型
280
+ const SET_TYPE = ['in', 'nin', 'cn', 'ncn','5']; //集合类型 (数字为 兼容用户管理子应用使用规则组件)
281
281
  const INTERVAL_TYPE = ['be', 'bed', 'nbe', 'nbed', 'ber', 'bel']; //区间类型
282
282
  const IS_KONG = ['en']; // 为空
283
283
  if (IS_KONG.indexOf(selectOperation) > -1) {
@@ -1143,8 +1143,9 @@ export default class RuleField extends Component {
1143
1143
  treeCheckable={dataInputBusinessType === 12}
1144
1144
  businessType="department"
1145
1145
  labelInValue={true}
1146
- value={values[0]}
1146
+ value={dataInputBusinessType === 12 ? values[0] : values[0][0]}
1147
1147
  style={styleCommon}
1148
+ treeCheckStrictly={true}
1148
1149
  onChange={(value) => {
1149
1150
  if (dataInputBusinessType === 12) {
1150
1151
  values[0] = value.map((i) => i.key);
@@ -1163,8 +1164,9 @@ export default class RuleField extends Component {
1163
1164
  treeCheckable={dataInputBusinessType === 12}
1164
1165
  businessType="department"
1165
1166
  labelInValue={true}
1166
- value={values[0]}
1167
+ value={dataInputBusinessType === 12 ? values[1] : values[1][0]}
1167
1168
  style={styleCommon}
1169
+ treeCheckStrictly={true}
1168
1170
  onChange={(value) => {
1169
1171
  if (dataInputBusinessType === 12) {
1170
1172
  values[1] = value.map((i) => i.key);
@@ -1186,8 +1188,9 @@ export default class RuleField extends Component {
1186
1188
  treeCheckable={dataInputBusinessType === 12}
1187
1189
  businessType="department"
1188
1190
  labelInValue={true}
1189
- value={values[0]}
1191
+ value={dataInputBusinessType === 12 ? values : values[0]}
1190
1192
  style={styleCommon}
1193
+ treeCheckStrictly={true}
1191
1194
  onChange={(value) => {
1192
1195
  if (dataInputBusinessType === 12) {
1193
1196
  values = value.map((i) => i.key)||[];
@@ -1213,8 +1216,9 @@ export default class RuleField extends Component {
1213
1216
  treeCheckable={dataInputBusinessType === 12}
1214
1217
  businessType="purchase-organization"
1215
1218
  labelInValue={true}
1216
- value={values[0]}
1219
+ value={dataInputBusinessType === 12 ? values[0] : values[0][0]}
1217
1220
  style={styleCommon}
1221
+ treeCheckStrictly={true}
1218
1222
  onChange={(value) => {
1219
1223
  if (dataInputBusinessType === 12) {
1220
1224
  values[0] = value.map((i) => i.key);
@@ -1233,8 +1237,9 @@ export default class RuleField extends Component {
1233
1237
  treeCheckable={dataInputBusinessType === 12}
1234
1238
  businessType="purchase-organization"
1235
1239
  labelInValue={true}
1236
- value={values[0]}
1240
+ value={dataInputBusinessType === 12 ? values[1] : values[1][0]}
1237
1241
  style={styleCommon}
1242
+ treeCheckStrictly={true}
1238
1243
  onChange={(value) => {
1239
1244
  if (dataInputBusinessType === 12) {
1240
1245
  values[1] = value.map((i) => i.key);
@@ -1256,8 +1261,9 @@ export default class RuleField extends Component {
1256
1261
  treeCheckable={dataInputBusinessType === 12}
1257
1262
  businessType="purchase-organization"
1258
1263
  labelInValue={true}
1259
- value={values[0]}
1264
+ value={dataInputBusinessType === 12 ? values : values[0]}
1260
1265
  style={styleCommon}
1266
+ treeCheckStrictly={true}
1261
1267
  onChange={(value) => {
1262
1268
  if (dataInputBusinessType === 12) {
1263
1269
  values = value.map((i) => i.key)||[];
@@ -1283,8 +1289,9 @@ export default class RuleField extends Component {
1283
1289
  treeCheckable={dataInputBusinessType === 12}
1284
1290
  businessType="sales-organization"
1285
1291
  labelInValue={true}
1286
- value={values[0]}
1292
+ value={dataInputBusinessType === 12 ? values[0] : values[0][0]}
1287
1293
  style={styleCommon}
1294
+ treeCheckStrictly={true}
1288
1295
  onChange={(value) => {
1289
1296
  if (dataInputBusinessType === 12) {
1290
1297
  values[0] = value.map((i) => i.key);
@@ -1303,8 +1310,9 @@ export default class RuleField extends Component {
1303
1310
  treeCheckable={dataInputBusinessType === 12}
1304
1311
  businessType="sales-organization"
1305
1312
  labelInValue={true}
1306
- value={values[0]}
1313
+ value={dataInputBusinessType === 12 ? values[1] : values[1][0]}
1307
1314
  style={styleCommon}
1315
+ treeCheckStrictly={true}
1308
1316
  onChange={(value) => {
1309
1317
  if (dataInputBusinessType === 12) {
1310
1318
  values[1] = value.map((i) => i.key);
@@ -1326,8 +1334,9 @@ export default class RuleField extends Component {
1326
1334
  treeCheckable={dataInputBusinessType === 12}
1327
1335
  businessType="sales-organization"
1328
1336
  labelInValue={true}
1329
- value={values[0]}
1337
+ value={dataInputBusinessType === 12 ? values : values[0]}
1330
1338
  style={styleCommon}
1339
+ treeCheckStrictly={true}
1331
1340
  onChange={(value) => {
1332
1341
  if (dataInputBusinessType === 12) {
1333
1342
  values = value.map((i) => i.key)||[];
@@ -1777,8 +1786,9 @@ export default class RuleField extends Component {
1777
1786
  treeCheckable={dataInputBusinessType === 12}
1778
1787
  businessType="stock-organization"
1779
1788
  labelInValue={true}
1780
- value={values[0]}
1789
+ value={dataInputBusinessType === 12 ? values : values[0]}
1781
1790
  style={styleCommon}
1791
+ treeCheckStrictly={true}
1782
1792
  onChange={(value) => {
1783
1793
  if (dataInputBusinessType === 12) {
1784
1794
  values[0] = value.map((i) => i.key);
@@ -1797,8 +1807,9 @@ export default class RuleField extends Component {
1797
1807
  treeCheckable={dataInputBusinessType === 12}
1798
1808
  businessType="stock-organization"
1799
1809
  labelInValue={true}
1800
- value={values[0]}
1810
+ value={dataInputBusinessType === 12 ? values : values[0]}
1801
1811
  style={styleCommon}
1812
+ treeCheckStrictly={true}
1802
1813
  onChange={(value) => {
1803
1814
  if (dataInputBusinessType === 12) {
1804
1815
  values[1] = value.map((i) => i.key);
@@ -1820,8 +1831,9 @@ export default class RuleField extends Component {
1820
1831
  treeCheckable={dataInputBusinessType === 12}
1821
1832
  businessType="stock-organization"
1822
1833
  labelInValue={true}
1823
- value={values[0]}
1834
+ value={dataInputBusinessType === 12 ? values : values[0]}
1824
1835
  style={styleCommon}
1836
+ treeCheckStrictly={true}
1825
1837
  onChange={(value) => {
1826
1838
  if (dataInputBusinessType === 12) {
1827
1839
  values = value.map((i) => i.key)||[];
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import RuleSetter from './index';
3
+
4
+ export default (props: any) => {
5
+ return <RuleSetter {...props} type={'instance'} />;
6
+ };