@bit-sun/business-component 4.2.1-alpha.18-aiwei → 4.2.1-alpha.20-aiwei

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.
package/dist/index.esm.js CHANGED
@@ -34585,11 +34585,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
34585
34585
  itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
34586
34586
  _this$props2$others = _this$props2.others,
34587
34587
  others = _this$props2$others === void 0 ? {} : _this$props2$others,
34588
- propertyCode = _this$props2.propertyCode;
34588
+ propertyCode = _this$props2.propertyCode,
34589
+ isQueryParams = _this$props2.isQueryParams;
34589
34590
  var thresholdList = _this.state.thresholdList;
34590
34591
  var styleCommon = {
34591
34592
  width: customerWidth || '180px'
34592
34593
  };
34594
+ if (isQueryParams) {
34595
+ return /*#__PURE__*/React$1.createElement(Input, {
34596
+ defaultValue: values.join(','),
34597
+ disabled: disabled,
34598
+ style: styleCommon,
34599
+ onBlur: function onBlur(e) {
34600
+ values = e.target.value.split(',');
34601
+ valueNames = e.target.value.split(',');
34602
+ callback(values, valueNames);
34603
+ }
34604
+ });
34605
+ }
34593
34606
  if (!selectOperation) return /*#__PURE__*/React$1.createElement(Input, {
34594
34607
  disabled: true,
34595
34608
  style: styleCommon
@@ -37115,7 +37128,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
37115
37128
  fieldValues: [],
37116
37129
  thresholdQuery: {},
37117
37130
  thresholdList: [],
37118
- options: []
37131
+ options: [],
37132
+ isQueryParams: false
37119
37133
  };
37120
37134
  return _this;
37121
37135
  }
@@ -37135,13 +37149,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
37135
37149
  initialThresholdQuery = _this$props3.initialThresholdQuery,
37136
37150
  queryIdentify = _this$props3.queryIdentify,
37137
37151
  propertyCode = _this$props3.propertyCode,
37138
- queryIdentifyType = _this$props3.queryIdentifyType;
37152
+ queryIdentifyType = _this$props3.queryIdentifyType,
37153
+ isQueryParams = _this$props3.isQueryParams;
37139
37154
  this.setState({
37140
37155
  selectOperation: selectOperation,
37141
37156
  thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
37142
37157
  dataTypeCode: dataTypeCode,
37143
37158
  dataChoiceBusinessType: dataChoiceBusinessType,
37144
37159
  dataInputBusinessType: dataInputBusinessType,
37160
+ isQueryParams: isQueryParams,
37145
37161
  others: others,
37146
37162
  fieldValues: _toConsumableArray(values),
37147
37163
  options: options
@@ -39195,6 +39211,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39195
39211
  }, op.name);
39196
39212
  })), /*#__PURE__*/React$1.createElement(RuleField, {
39197
39213
  customerWidth: '180px',
39214
+ isQueryParams: true,
39198
39215
  selectOperation: itemDetail.reqConditionData.operationCode,
39199
39216
  dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
39200
39217
  values: itemDetail.reqConditionData.params || [],
@@ -39654,6 +39671,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39654
39671
  itemDetail.reqConditionData = {
39655
39672
  operationType: 'relation',
39656
39673
  dataTypeCode: '21',
39674
+ entityInputType: '21',
39675
+ entityValueType: '21',
39657
39676
  operationCode: '',
39658
39677
  reqParamName: '',
39659
39678
  params: [],
@@ -39672,6 +39691,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39672
39691
  if (!itemDetail.reqConditionData) return;
39673
39692
  if (field === 'dataTypeCode') {
39674
39693
  itemDetail.reqConditionData.dataTypeCode = value;
39694
+ itemDetail.reqConditionData.entityInputType = value;
39695
+ itemDetail.reqConditionData.entityValueType = value;
39675
39696
  itemDetail.reqConditionData.operationCode = '';
39676
39697
  itemDetail.reqConditionData.params = [];
39677
39698
  itemDetail.reqConditionData.paramNames = [];
package/dist/index.js CHANGED
@@ -34608,11 +34608,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
34608
34608
  itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
34609
34609
  _this$props2$others = _this$props2.others,
34610
34610
  others = _this$props2$others === void 0 ? {} : _this$props2$others,
34611
- propertyCode = _this$props2.propertyCode;
34611
+ propertyCode = _this$props2.propertyCode,
34612
+ isQueryParams = _this$props2.isQueryParams;
34612
34613
  var thresholdList = _this.state.thresholdList;
34613
34614
  var styleCommon = {
34614
34615
  width: customerWidth || '180px'
34615
34616
  };
34617
+ if (isQueryParams) {
34618
+ return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
34619
+ defaultValue: values.join(','),
34620
+ disabled: disabled,
34621
+ style: styleCommon,
34622
+ onBlur: function onBlur(e) {
34623
+ values = e.target.value.split(',');
34624
+ valueNames = e.target.value.split(',');
34625
+ callback(values, valueNames);
34626
+ }
34627
+ });
34628
+ }
34616
34629
  if (!selectOperation) return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
34617
34630
  disabled: true,
34618
34631
  style: styleCommon
@@ -37138,7 +37151,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
37138
37151
  fieldValues: [],
37139
37152
  thresholdQuery: {},
37140
37153
  thresholdList: [],
37141
- options: []
37154
+ options: [],
37155
+ isQueryParams: false
37142
37156
  };
37143
37157
  return _this;
37144
37158
  }
@@ -37158,13 +37172,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
37158
37172
  initialThresholdQuery = _this$props3.initialThresholdQuery,
37159
37173
  queryIdentify = _this$props3.queryIdentify,
37160
37174
  propertyCode = _this$props3.propertyCode,
37161
- queryIdentifyType = _this$props3.queryIdentifyType;
37175
+ queryIdentifyType = _this$props3.queryIdentifyType,
37176
+ isQueryParams = _this$props3.isQueryParams;
37162
37177
  this.setState({
37163
37178
  selectOperation: selectOperation,
37164
37179
  thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
37165
37180
  dataTypeCode: dataTypeCode,
37166
37181
  dataChoiceBusinessType: dataChoiceBusinessType,
37167
37182
  dataInputBusinessType: dataInputBusinessType,
37183
+ isQueryParams: isQueryParams,
37168
37184
  others: others,
37169
37185
  fieldValues: _toConsumableArray(values),
37170
37186
  options: options
@@ -39218,6 +39234,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39218
39234
  }, op.name);
39219
39235
  })), /*#__PURE__*/React__default['default'].createElement(RuleField, {
39220
39236
  customerWidth: '180px',
39237
+ isQueryParams: true,
39221
39238
  selectOperation: itemDetail.reqConditionData.operationCode,
39222
39239
  dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
39223
39240
  values: itemDetail.reqConditionData.params || [],
@@ -39677,6 +39694,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39677
39694
  itemDetail.reqConditionData = {
39678
39695
  operationType: 'relation',
39679
39696
  dataTypeCode: '21',
39697
+ entityInputType: '21',
39698
+ entityValueType: '21',
39680
39699
  operationCode: '',
39681
39700
  reqParamName: '',
39682
39701
  params: [],
@@ -39695,6 +39714,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39695
39714
  if (!itemDetail.reqConditionData) return;
39696
39715
  if (field === 'dataTypeCode') {
39697
39716
  itemDetail.reqConditionData.dataTypeCode = value;
39717
+ itemDetail.reqConditionData.entityInputType = value;
39718
+ itemDetail.reqConditionData.entityValueType = value;
39698
39719
  itemDetail.reqConditionData.operationCode = '';
39699
39720
  itemDetail.reqConditionData.params = [];
39700
39721
  itemDetail.reqConditionData.paramNames = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.1-alpha.18-aiwei",
3
+ "version": "4.2.1-alpha.20-aiwei",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -87,8 +87,8 @@ export default () => {
87
87
  code: 'user',
88
88
  valueType: 'object',
89
89
  propertyList: [
90
- { id: 'age', name: '年龄', code: 'age', valueType: '22', inputType: 11, choiceType: 10, entityValueType: '20', entityInputType: 11 },
91
- { id: 'name', name: '姓名', code: 'name', valueType: '21', inputType: 11, choiceType: 10, entityValueType: '10', entityInputType: 11 },
90
+ { id: 'age', name: '年龄', code: 'age', valueType: '22', inputType: 11, choiceType: 10, },
91
+ { id: 'name', name: '姓名', code: 'name', valueType: '21', inputType: 11, choiceType: 10, },
92
92
  ]
93
93
  },
94
94
  {
@@ -97,7 +97,7 @@ export default () => {
97
97
  code: 'order',
98
98
  valueType: 'object',
99
99
  propertyList: [
100
- { id: 'amount', name: '金额', code: 'amount', valueType: '22', inputType: 11, choiceType: 10, entityValueType: '22', entityInputType: 11 },
100
+ { id: 'amount', name: '金额', code: 'amount', valueType: '22', inputType: 11, choiceType: 10, },
101
101
  ]
102
102
  }
103
103
  ];
@@ -1165,6 +1165,7 @@ class RuleObjectComponent extends Component {
1165
1165
 
1166
1166
  <RuleField
1167
1167
  customerWidth={'180px'}
1168
+ isQueryParams={true}
1168
1169
  selectOperation={itemDetail.reqConditionData.operationCode}
1169
1170
  dataTypeCode={itemDetail.reqConditionData.dataTypeCode}
1170
1171
  values={itemDetail.reqConditionData.params || []}
@@ -1770,6 +1771,8 @@ class RuleObjectComponent extends Component {
1770
1771
  itemDetail.reqConditionData = {
1771
1772
  operationType: 'relation',
1772
1773
  dataTypeCode: '21',
1774
+ entityInputType: '21',
1775
+ entityValueType: '21',
1773
1776
  operationCode: '',
1774
1777
  reqParamName: '',
1775
1778
  params: [],
@@ -1793,6 +1796,8 @@ class RuleObjectComponent extends Component {
1793
1796
 
1794
1797
  if (field === 'dataTypeCode') {
1795
1798
  itemDetail.reqConditionData.dataTypeCode = value;
1799
+ itemDetail.reqConditionData.entityInputType = value;
1800
+ itemDetail.reqConditionData.entityValueType = value;
1796
1801
  itemDetail.reqConditionData.operationCode = '';
1797
1802
  itemDetail.reqConditionData.params = [];
1798
1803
  itemDetail.reqConditionData.paramNames = [];
@@ -27,6 +27,7 @@ export default class RuleField extends Component {
27
27
  thresholdQuery: {},
28
28
  thresholdList: [],
29
29
  options: [],
30
+ isQueryParams: false
30
31
  };
31
32
  }
32
33
 
@@ -43,6 +44,7 @@ export default class RuleField extends Component {
43
44
  queryIdentify,
44
45
  propertyCode,
45
46
  queryIdentifyType,
47
+ isQueryParams
46
48
  } = this.props;
47
49
  this.setState(
48
50
  {
@@ -55,6 +57,7 @@ export default class RuleField extends Component {
55
57
  dataTypeCode,
56
58
  dataChoiceBusinessType,
57
59
  dataInputBusinessType,
60
+ isQueryParams,
58
61
  others,
59
62
  fieldValues: [...values],
60
63
  options,
@@ -281,11 +284,26 @@ export default class RuleField extends Component {
281
284
  itemDetail={},
282
285
  others={},
283
286
  propertyCode,
287
+ isQueryParams
284
288
  } = this.props;
285
289
  const { thresholdList } = this.state;
286
290
  const styleCommon = {
287
291
  width: customerWidth || '180px',
288
292
  };
293
+
294
+ if(isQueryParams) {
295
+ return <Input
296
+ defaultValue={values.join(',')}
297
+ disabled={disabled}
298
+ style={styleCommon}
299
+ onBlur={(e) => {
300
+ values = e.target.value.split(',');
301
+ valueNames = e.target.value.split(',');
302
+ callback(values, valueNames);
303
+ }}
304
+ />
305
+ }
306
+
289
307
  if (!selectOperation) return <Input disabled style={styleCommon}></Input>;
290
308
  const SET_TYPE = ['in', 'nin', 'cn', 'ncn','5']; //集合类型 (数字为 兼容用户管理子应用使用规则组件)
291
309
  const INTERVAL_TYPE = ['be', 'bed', 'nbe', 'nbed', 'ber', 'bel']; //区间类型