@bit-sun/business-component 4.2.1-alpha.16-aiwei → 4.2.1-alpha.18-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 +185 -23
- package/dist/index.js +185 -23
- package/package.json +1 -1
- package/src/components/Business/BsSulaQueryTable/index.tsx +10 -10
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +10 -11
- package/src/components/Solution/RuleComponent/README.md +171 -0
- package/src/components/Solution/RuleComponent/RuleField.md +63 -0
- package/src/components/Solution/RuleComponent/index.js +176 -6
- package/src/components/Solution/RuleComponent/ruleFiled.js +3 -5
- package/src/components/Solution/RuleSetter/README.md +97 -0
package/dist/index.esm.js
CHANGED
|
@@ -12403,7 +12403,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12403
12403
|
}
|
|
12404
12404
|
}
|
|
12405
12405
|
}, {
|
|
12406
|
-
name: 'qp-manageSupervisor-
|
|
12406
|
+
name: 'qp-manageSupervisor-like',
|
|
12407
12407
|
type: 'select',
|
|
12408
12408
|
label: '管理督导',
|
|
12409
12409
|
field: {
|
|
@@ -12411,9 +12411,9 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12411
12411
|
props: {
|
|
12412
12412
|
notFoundContent: '暂无数据',
|
|
12413
12413
|
allowClear: true,
|
|
12414
|
-
mode: 'multiple',
|
|
12415
12414
|
showSearch: true,
|
|
12416
12415
|
showArrow: true,
|
|
12416
|
+
maxTagCount: 1,
|
|
12417
12417
|
optionFilterProp: 'children',
|
|
12418
12418
|
filterOption: function filterOption(input, option) {
|
|
12419
12419
|
var _option$value;
|
|
@@ -12423,17 +12423,17 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12423
12423
|
}
|
|
12424
12424
|
}
|
|
12425
12425
|
}, {
|
|
12426
|
-
name: 'qp-directSupervisor-
|
|
12426
|
+
name: 'qp-directSupervisor-like',
|
|
12427
12427
|
type: 'select',
|
|
12428
12428
|
label: '直接督导',
|
|
12429
12429
|
field: {
|
|
12430
12430
|
type: 'select',
|
|
12431
12431
|
props: {
|
|
12432
12432
|
notFoundContent: '暂无数据',
|
|
12433
|
-
mode: 'multiple',
|
|
12434
12433
|
allowClear: true,
|
|
12435
12434
|
showSearch: true,
|
|
12436
12435
|
showArrow: true,
|
|
12436
|
+
maxTagCount: 1,
|
|
12437
12437
|
optionFilterProp: 'children',
|
|
12438
12438
|
filterOption: function filterOption(input, option) {
|
|
12439
12439
|
var _option$value2;
|
|
@@ -12442,17 +12442,17 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12442
12442
|
}
|
|
12443
12443
|
}
|
|
12444
12444
|
}, {
|
|
12445
|
-
name: 'qp-distributionItem-
|
|
12445
|
+
name: 'qp-distributionItem-like',
|
|
12446
12446
|
type: 'select',
|
|
12447
12447
|
label: '分销商品',
|
|
12448
12448
|
field: {
|
|
12449
12449
|
type: 'select',
|
|
12450
12450
|
props: {
|
|
12451
12451
|
notFoundContent: '暂无数据',
|
|
12452
|
-
mode: 'multiple',
|
|
12453
12452
|
allowClear: true,
|
|
12454
12453
|
showSearch: true,
|
|
12455
12454
|
showArrow: true,
|
|
12455
|
+
maxTagCount: 1,
|
|
12456
12456
|
optionFilterProp: 'children',
|
|
12457
12457
|
filterOption: function filterOption(input, option) {
|
|
12458
12458
|
var _option$value3;
|
|
@@ -12461,14 +12461,13 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12461
12461
|
}
|
|
12462
12462
|
}
|
|
12463
12463
|
}, {
|
|
12464
|
-
name: 'qp-headItem-
|
|
12464
|
+
name: 'qp-headItem-like',
|
|
12465
12465
|
type: 'select',
|
|
12466
12466
|
label: '总部商品',
|
|
12467
12467
|
field: {
|
|
12468
12468
|
type: 'select',
|
|
12469
12469
|
props: {
|
|
12470
12470
|
notFoundContent: '暂无数据',
|
|
12471
|
-
mode: 'multiple',
|
|
12472
12471
|
allowClear: true,
|
|
12473
12472
|
showSearch: true,
|
|
12474
12473
|
showArrow: true,
|
|
@@ -12481,17 +12480,17 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12481
12480
|
}
|
|
12482
12481
|
}
|
|
12483
12482
|
}, {
|
|
12484
|
-
name: 'qp-storeChannelName-
|
|
12483
|
+
name: 'qp-storeChannelName-like',
|
|
12485
12484
|
type: 'select',
|
|
12486
12485
|
label: '管理模式',
|
|
12487
12486
|
field: {
|
|
12488
12487
|
type: 'select',
|
|
12489
12488
|
props: {
|
|
12490
12489
|
notFoundContent: '暂无数据',
|
|
12491
|
-
mode: 'multiple',
|
|
12492
12490
|
allowClear: true,
|
|
12493
12491
|
showSearch: true,
|
|
12494
12492
|
showArrow: true,
|
|
12493
|
+
maxTagCount: 1,
|
|
12495
12494
|
optionFilterProp: 'children',
|
|
12496
12495
|
filterOption: function filterOption(input, option) {
|
|
12497
12496
|
var _option$value5;
|
|
@@ -19674,7 +19673,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19674
19673
|
setPagePath = _useState0[1];
|
|
19675
19674
|
var _useLocation = useLocation(),
|
|
19676
19675
|
pathname = _useLocation.pathname,
|
|
19677
|
-
_useLocation$state = _useLocation.state
|
|
19676
|
+
_useLocation$state = _useLocation.state,
|
|
19677
|
+
state = _useLocation$state === void 0 ? {} : _useLocation$state;
|
|
19678
19678
|
var _useState1 = useState(false),
|
|
19679
19679
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
19680
19680
|
isFullScreen = _useState10[0],
|
|
@@ -20150,16 +20150,17 @@ var BsSulaQueryTable = (function (props) {
|
|
|
20150
20150
|
isFullScreen: isFullScreen
|
|
20151
20151
|
});
|
|
20152
20152
|
useEffect(function () {
|
|
20153
|
-
|
|
20154
|
-
|
|
20155
|
-
|
|
20156
|
-
|
|
20157
|
-
|
|
20158
|
-
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
|
|
20162
|
-
|
|
20153
|
+
if (!localStorage.getItem('isTabChange') || (state === null || state === void 0 ? void 0 : state.updateCurrentPage)) {
|
|
20154
|
+
if (pagePath === pathname) {
|
|
20155
|
+
var _config$ref, _config$ref$current, _config$ref$current$t, _config$ref$current$t2;
|
|
20156
|
+
// @ts-ignore
|
|
20157
|
+
(_config$ref = config.ref) === null || _config$ref === void 0 ? void 0 : (_config$ref$current = _config$ref.current) === null || _config$ref$current === void 0 ? void 0 : (_config$ref$current$t = _config$ref$current.tableRef) === null || _config$ref$current$t === void 0 ? void 0 : (_config$ref$current$t2 = _config$ref$current$t.current) === null || _config$ref$current$t2 === void 0 ? void 0 : _config$ref$current$t2.refreshTable();
|
|
20158
|
+
}
|
|
20159
|
+
}
|
|
20160
|
+
setTimeout(function () {
|
|
20161
|
+
// 处理页面刷新两面
|
|
20162
|
+
localStorage.removeItem('isTabChange');
|
|
20163
|
+
}, 0);
|
|
20163
20164
|
}, [pathname]);
|
|
20164
20165
|
var expandedRowKeys = props === null || props === void 0 ? void 0 : (_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.expandedRowKeys;
|
|
20165
20166
|
//todo summary属性已经被使用,为了兼容之前的,现在使用 summaryList
|
|
@@ -38347,6 +38348,18 @@ function RenderCompItem(props) {
|
|
|
38347
38348
|
}
|
|
38348
38349
|
|
|
38349
38350
|
var RangePicker$2 = DatePicker.RangePicker;
|
|
38351
|
+
var FIXED_DATA_TYPES = {
|
|
38352
|
+
10: '字符串',
|
|
38353
|
+
20: '短整数',
|
|
38354
|
+
21: '长整数',
|
|
38355
|
+
22: '小数',
|
|
38356
|
+
40: '数组',
|
|
38357
|
+
41: '布尔值',
|
|
38358
|
+
12: '富文本',
|
|
38359
|
+
30: '日期',
|
|
38360
|
+
31: '时间',
|
|
38361
|
+
32: '日期时间'
|
|
38362
|
+
};
|
|
38350
38363
|
var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
38351
38364
|
function RuleObjectComponent(props) {
|
|
38352
38365
|
var _this;
|
|
@@ -38390,6 +38403,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38390
38403
|
value: element.id,
|
|
38391
38404
|
id: element.id,
|
|
38392
38405
|
dataTypeCode: element.valueType,
|
|
38406
|
+
entityValueType: element.entityValueType,
|
|
38407
|
+
entityInputType: element.entityInputType,
|
|
38393
38408
|
dataChoiceBusinessType: element.choiceType,
|
|
38394
38409
|
dataInputBusinessType: element.inputType,
|
|
38395
38410
|
info: element.info,
|
|
@@ -38411,6 +38426,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38411
38426
|
metaObjectCode: _this.props.metaObjectCode || item.code
|
|
38412
38427
|
}, item), {}, {
|
|
38413
38428
|
dataTypeCode: item.valueType,
|
|
38429
|
+
entityValueType: item.entityValueType,
|
|
38430
|
+
entityInputType: item.entityInputType,
|
|
38414
38431
|
dataChoiceBusinessType: item.choiceType,
|
|
38415
38432
|
dataInputBusinessType: item.inputType
|
|
38416
38433
|
}));
|
|
@@ -38444,6 +38461,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38444
38461
|
value: element.id,
|
|
38445
38462
|
id: element.id,
|
|
38446
38463
|
dataTypeCode: element.valueType,
|
|
38464
|
+
entityValueType: element.entityValueType,
|
|
38465
|
+
entityInputType: element.entityInputType,
|
|
38447
38466
|
dataChoiceBusinessType: element.choiceType,
|
|
38448
38467
|
dataInputBusinessType: element.inputType,
|
|
38449
38468
|
info: element.info,
|
|
@@ -38813,7 +38832,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38813
38832
|
initialThresholdQuery = _this$props3$initialT === void 0 ? {} : _this$props3$initialT,
|
|
38814
38833
|
disabled = _this$props3.disabled,
|
|
38815
38834
|
systemVariableList = _this$props3.systemVariableList,
|
|
38816
|
-
needShowInsertSQL = _this$props3.needShowInsertSQL
|
|
38835
|
+
needShowInsertSQL = _this$props3.needShowInsertSQL,
|
|
38836
|
+
needShowReqCondition = _this$props3.needShowReqCondition;
|
|
38817
38837
|
var thresholdQuery = _objectSpread2(_objectSpread2({}, initialThresholdQuery), relateDatas);
|
|
38818
38838
|
var finalIndex = floorIndex + 1;
|
|
38819
38839
|
var queryIdentify = '';
|
|
@@ -38904,6 +38924,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38904
38924
|
itemDetail.elementId = nodeInfo.triggerNode.props.id;
|
|
38905
38925
|
itemDetail.elementName = nodeInfo.triggerNode.props.title;
|
|
38906
38926
|
itemDetail.dataTypeCode = nodeInfo.triggerNode.props.dataTypeCode;
|
|
38927
|
+
itemDetail.entityValueType = nodeInfo.triggerNode.props.entityValueType;
|
|
38928
|
+
itemDetail.entityInputType = nodeInfo.triggerNode.props.entityInputType;
|
|
38907
38929
|
itemDetail.metaObjectCode = nodeInfo.triggerNode.props.metaObjectCode;
|
|
38908
38930
|
itemDetail.isInsertParam = false;
|
|
38909
38931
|
if (needShowInsertSQL) {
|
|
@@ -39090,7 +39112,98 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39090
39112
|
fontSize: '14px',
|
|
39091
39113
|
marginRight: '5px'
|
|
39092
39114
|
}
|
|
39093
|
-
}), "\u6DFB\u52A0\u6761\u4EF6")
|
|
39115
|
+
}), "\u6DFB\u52A0\u6761\u4EF6"), needShowReqCondition && /*#__PURE__*/React$1.createElement("span", {
|
|
39116
|
+
style: {
|
|
39117
|
+
marginLeft: 10
|
|
39118
|
+
}
|
|
39119
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
39120
|
+
type: "link",
|
|
39121
|
+
style: {
|
|
39122
|
+
padding: 0,
|
|
39123
|
+
height: 'auto'
|
|
39124
|
+
},
|
|
39125
|
+
onClick: function onClick() {
|
|
39126
|
+
return _this.handleReqConditionToggle(itemDetail);
|
|
39127
|
+
}
|
|
39128
|
+
}, itemDetail.isReqCondition ? '取消参数条件控制' : '参数条件控制')), itemDetail.isReqCondition && itemDetail.reqConditionData && /*#__PURE__*/React$1.createElement("div", {
|
|
39129
|
+
style: {
|
|
39130
|
+
marginTop: 10,
|
|
39131
|
+
display: 'flex',
|
|
39132
|
+
alignItems: 'center',
|
|
39133
|
+
background: '#f5f5f5',
|
|
39134
|
+
padding: '10px',
|
|
39135
|
+
borderRadius: '4px'
|
|
39136
|
+
}
|
|
39137
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
39138
|
+
style: {
|
|
39139
|
+
marginRight: 8,
|
|
39140
|
+
flexShrink: 0
|
|
39141
|
+
}
|
|
39142
|
+
}, "\u8BF7\u6C42\u53C2\u6570\u540D\u79F0:"), /*#__PURE__*/React$1.createElement(Input, {
|
|
39143
|
+
style: {
|
|
39144
|
+
width: 150,
|
|
39145
|
+
marginRight: 10
|
|
39146
|
+
},
|
|
39147
|
+
value: itemDetail.reqConditionData.reqParamName,
|
|
39148
|
+
onChange: function onChange(e) {
|
|
39149
|
+
return _this.handleReqDataChange(itemDetail, 'reqParamName', e.target.value);
|
|
39150
|
+
}
|
|
39151
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
39152
|
+
style: {
|
|
39153
|
+
marginRight: 8,
|
|
39154
|
+
flexShrink: 0
|
|
39155
|
+
}
|
|
39156
|
+
}, "\u7C7B\u578B:"), /*#__PURE__*/React$1.createElement(Select, {
|
|
39157
|
+
style: {
|
|
39158
|
+
width: 120,
|
|
39159
|
+
marginRight: 10
|
|
39160
|
+
},
|
|
39161
|
+
value: itemDetail.reqConditionData.dataTypeCode,
|
|
39162
|
+
onChange: function onChange(val) {
|
|
39163
|
+
return _this.handleReqDataChange(itemDetail, 'dataTypeCode', val);
|
|
39164
|
+
}
|
|
39165
|
+
}, Object.keys(FIXED_DATA_TYPES).map(function (code) {
|
|
39166
|
+
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39167
|
+
key: code,
|
|
39168
|
+
value: code
|
|
39169
|
+
}, FIXED_DATA_TYPES[code]);
|
|
39170
|
+
})), /*#__PURE__*/React$1.createElement(Select, {
|
|
39171
|
+
style: {
|
|
39172
|
+
width: 120,
|
|
39173
|
+
marginRight: 10
|
|
39174
|
+
},
|
|
39175
|
+
value: itemDetail.reqConditionData.operationCode,
|
|
39176
|
+
onChange: function onChange(val) {
|
|
39177
|
+
return _this.handleReqDataChange(itemDetail, 'operationCode', val);
|
|
39178
|
+
}
|
|
39179
|
+
}, [{
|
|
39180
|
+
'code': 'eq',
|
|
39181
|
+
'name': '等于'
|
|
39182
|
+
}, {
|
|
39183
|
+
'code': 'cn',
|
|
39184
|
+
'name': '包含'
|
|
39185
|
+
}, {
|
|
39186
|
+
code: 'gt',
|
|
39187
|
+
name: '大于'
|
|
39188
|
+
}, {
|
|
39189
|
+
code: 'lt',
|
|
39190
|
+
name: '小于'
|
|
39191
|
+
}].map(function (op) {
|
|
39192
|
+
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39193
|
+
key: op.code,
|
|
39194
|
+
value: op.code
|
|
39195
|
+
}, op.name);
|
|
39196
|
+
})), /*#__PURE__*/React$1.createElement(RuleField, {
|
|
39197
|
+
customerWidth: '180px',
|
|
39198
|
+
selectOperation: itemDetail.reqConditionData.operationCode,
|
|
39199
|
+
dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
|
|
39200
|
+
values: itemDetail.reqConditionData.params || [],
|
|
39201
|
+
valueNames: itemDetail.reqConditionData.paramNames || [],
|
|
39202
|
+
callback: function callback(newValues, newValueNames) {
|
|
39203
|
+
return _this.handleReqDataChange(itemDetail, 'params', newValues, newValueNames);
|
|
39204
|
+
},
|
|
39205
|
+
disabled: disabled
|
|
39206
|
+
})))));
|
|
39094
39207
|
};
|
|
39095
39208
|
_this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex, key) {
|
|
39096
39209
|
var ruleClassData = _this.state.ruleClassData;
|
|
@@ -39406,6 +39519,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39406
39519
|
delete itemDetail.params;
|
|
39407
39520
|
delete itemDetail.paramNames;
|
|
39408
39521
|
delete itemDetail.dataTypeCode;
|
|
39522
|
+
delete itemDetail.entityValueType;
|
|
39523
|
+
delete itemDetail.entityInputType;
|
|
39409
39524
|
delete itemDetail.elementId;
|
|
39410
39525
|
delete itemDetail.elementName;
|
|
39411
39526
|
delete itemDetail.metaObjectCode;
|
|
@@ -39456,6 +39571,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39456
39571
|
parentDetail.elementId = parentDetail.subExpression[0].elementId;
|
|
39457
39572
|
parentDetail.elementName = parentDetail.subExpression[0].elementName;
|
|
39458
39573
|
parentDetail.dataTypeCode = parentDetail.subExpression[0].dataTypeCode;
|
|
39574
|
+
parentDetail.entityValueType = parentDetail.subExpression[0].entityValueType;
|
|
39575
|
+
parentDetail.entityInputType = parentDetail.subExpression[0].entityInputType;
|
|
39459
39576
|
delete parentDetail.subExpression;
|
|
39460
39577
|
}
|
|
39461
39578
|
}
|
|
@@ -39529,6 +39646,51 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39529
39646
|
callBack(ruleClassData);
|
|
39530
39647
|
});
|
|
39531
39648
|
};
|
|
39649
|
+
_this.handleReqConditionToggle = function (itemDetail) {
|
|
39650
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
39651
|
+
var callBack = _this.props.callBack;
|
|
39652
|
+
itemDetail.isReqCondition = !itemDetail.isReqCondition;
|
|
39653
|
+
if (itemDetail.isReqCondition && !itemDetail.reqConditionData) {
|
|
39654
|
+
itemDetail.reqConditionData = {
|
|
39655
|
+
operationType: 'relation',
|
|
39656
|
+
dataTypeCode: '21',
|
|
39657
|
+
operationCode: '',
|
|
39658
|
+
reqParamName: '',
|
|
39659
|
+
params: [],
|
|
39660
|
+
paramNames: []
|
|
39661
|
+
};
|
|
39662
|
+
}
|
|
39663
|
+
_this.setState({
|
|
39664
|
+
ruleClassData: ruleClassData
|
|
39665
|
+
}, function () {
|
|
39666
|
+
callBack(ruleClassData);
|
|
39667
|
+
});
|
|
39668
|
+
};
|
|
39669
|
+
_this.handleReqDataChange = function (itemDetail, field, value, valueNames) {
|
|
39670
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
39671
|
+
var callBack = _this.props.callBack;
|
|
39672
|
+
if (!itemDetail.reqConditionData) return;
|
|
39673
|
+
if (field === 'dataTypeCode') {
|
|
39674
|
+
itemDetail.reqConditionData.dataTypeCode = value;
|
|
39675
|
+
itemDetail.reqConditionData.operationCode = '';
|
|
39676
|
+
itemDetail.reqConditionData.params = [];
|
|
39677
|
+
itemDetail.reqConditionData.paramNames = [];
|
|
39678
|
+
} else if (field === 'operationCode') {
|
|
39679
|
+
itemDetail.reqConditionData.operationCode = value;
|
|
39680
|
+
} else if (field === 'reqParamName') {
|
|
39681
|
+
itemDetail.reqConditionData.reqParamName = value;
|
|
39682
|
+
} else if (field === 'params') {
|
|
39683
|
+
itemDetail.reqConditionData.params = value;
|
|
39684
|
+
if (valueNames) {
|
|
39685
|
+
itemDetail.reqConditionData.paramNames = valueNames;
|
|
39686
|
+
}
|
|
39687
|
+
}
|
|
39688
|
+
_this.setState({
|
|
39689
|
+
ruleClassData: ruleClassData
|
|
39690
|
+
}, function () {
|
|
39691
|
+
callBack(ruleClassData);
|
|
39692
|
+
});
|
|
39693
|
+
};
|
|
39532
39694
|
_this.state = {
|
|
39533
39695
|
editNameIndex: 0,
|
|
39534
39696
|
isEdit: false,
|