@zgfe/business-lib 1.1.67-beta.8 → 1.1.67-beta.9
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.
|
@@ -54,12 +54,18 @@ export default (function () {
|
|
|
54
54
|
envPropList: envData
|
|
55
55
|
});
|
|
56
56
|
var onValuesChange = function onValuesChange() {
|
|
57
|
-
|
|
57
|
+
for (var _len = arguments.length, res = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
58
|
+
res[_key] = arguments[_key];
|
|
59
|
+
}
|
|
60
|
+
setTarget({
|
|
61
|
+
targets: res[1].targets.filter(function (item) {
|
|
62
|
+
return !!item;
|
|
63
|
+
})
|
|
64
|
+
});
|
|
58
65
|
};
|
|
59
66
|
useEffect(function () {
|
|
60
67
|
var flag = true,
|
|
61
68
|
show = true;
|
|
62
|
-
console.log(target.targets, target.targets.length > 1);
|
|
63
69
|
if ((target === null || target === void 0 ? void 0 : target.targets) && target.targets.length > 0) {
|
|
64
70
|
if (target.targets[0] && target.targets[0].eventId === -100) {
|
|
65
71
|
flag = false;
|
|
@@ -21,7 +21,7 @@ import { BuiltinIndicators } from '../constants/common';
|
|
|
21
21
|
import { BizAttrConditionGroup, IconFont } from '..';
|
|
22
22
|
export var classPrefix = 'biz-target';
|
|
23
23
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
24
|
-
var _targetData$
|
|
24
|
+
var _targetData$value3, _targetData$value3$gr, _targetData$value4, _targetData$value4$ev, _targetData$value5, _targetData$value5$ev, _targetData$value6, _targetData$value6$ev, _targetData$value7, _targetData$value8, _targetData$value8$ev, _targetData$value9, _targetData$value9$ev;
|
|
25
25
|
var max = props.max;
|
|
26
26
|
var _useState = useState(),
|
|
27
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -221,7 +221,9 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
221
221
|
}, 0);
|
|
222
222
|
};
|
|
223
223
|
var onDelete = function onDelete() {
|
|
224
|
-
|
|
224
|
+
var _targetData$value2;
|
|
225
|
+
var canDelete = props.enableDelete !== undefined ? props.enableDelete || !(targetData === null || targetData === void 0 ? void 0 : (_targetData$value2 = targetData.value) === null || _targetData$value2 === void 0 ? void 0 : _targetData$value2.event) : enableDelete;
|
|
226
|
+
if (!canDelete) return;
|
|
225
227
|
if (props.onDelete) props.onDelete();
|
|
226
228
|
};
|
|
227
229
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -237,8 +239,8 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
237
239
|
}, /*#__PURE__*/React.createElement(BizTargetSelector, {
|
|
238
240
|
value: targetData,
|
|
239
241
|
onChange: onChangeTarget
|
|
240
|
-
}, props.children), (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
241
|
-
eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
242
|
+
}, props.children), (targetData === null || targetData === void 0 ? void 0 : (_targetData$value3 = targetData.value) === null || _targetData$value3 === void 0 ? void 0 : (_targetData$value3$gr = _targetData$value3.group) === null || _targetData$value3$gr === void 0 ? void 0 : _targetData$value3$gr.id) === -2 || (targetData === null || targetData === void 0 ? void 0 : (_targetData$value4 = targetData.value) === null || _targetData$value4 === void 0 ? void 0 : (_targetData$value4$ev = _targetData$value4.event) === null || _targetData$value4$ev === void 0 ? void 0 : _targetData$value4$ev.isBuiltIn) ? null : /*#__PURE__*/React.createElement(BizTargetDimension, {
|
|
243
|
+
eventId: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value5 = targetData.value) === null || _targetData$value5 === void 0 ? void 0 : (_targetData$value5$ev = _targetData$value5.event) === null || _targetData$value5$ev === void 0 ? void 0 : _targetData$value5$ev.id) ? targetData === null || targetData === void 0 ? void 0 : (_targetData$value6 = targetData.value) === null || _targetData$value6 === void 0 ? void 0 : (_targetData$value6$ev = _targetData$value6.event) === null || _targetData$value6$ev === void 0 ? void 0 : _targetData$value6$ev.id : undefined,
|
|
242
244
|
value: dimension,
|
|
243
245
|
onChange: onChangeDimension
|
|
244
246
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -248,7 +250,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
248
250
|
type: "shaixuan",
|
|
249
251
|
onClick: onAdd
|
|
250
252
|
})), /*#__PURE__*/React.createElement(IconFont, {
|
|
251
|
-
className: "".concat(classPrefix, "-icon delete ").concat(!(props.enableDelete !== undefined ? props.enableDelete : enableDelete) ? 'disabled' : ''),
|
|
253
|
+
className: "".concat(classPrefix, "-icon delete ").concat(!(props.enableDelete !== undefined ? props.enableDelete || !(targetData === null || targetData === void 0 ? void 0 : (_targetData$value7 = targetData.value) === null || _targetData$value7 === void 0 ? void 0 : _targetData$value7.event) : enableDelete) ? 'disabled' : ''),
|
|
252
254
|
type: "qingchu",
|
|
253
255
|
onClick: onDelete
|
|
254
256
|
})), (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
@@ -257,7 +259,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
257
259
|
onlyAnd: props.onlyAnd,
|
|
258
260
|
enableEventProp: true,
|
|
259
261
|
enableDelete: true,
|
|
260
|
-
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$
|
|
262
|
+
eventIdList: (targetData === null || targetData === void 0 ? void 0 : (_targetData$value8 = targetData.value) === null || _targetData$value8 === void 0 ? void 0 : (_targetData$value8$ev = _targetData$value8.event) === null || _targetData$value8$ev === void 0 ? void 0 : _targetData$value8$ev.id) ? [targetData === null || targetData === void 0 ? void 0 : (_targetData$value9 = targetData.value) === null || _targetData$value9 === void 0 ? void 0 : (_targetData$value9$ev = _targetData$value9.event) === null || _targetData$value9$ev === void 0 ? void 0 : _targetData$value9$ev.id] : undefined,
|
|
261
263
|
onChange: onChangeFilters,
|
|
262
264
|
onConditionsCount: setCount
|
|
263
265
|
})));
|