@zgfe/business-lib 1.1.29-alpha.2 → 1.1.29-alpha.3
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/es/targetConditionGroup/index.js +46 -18
- package/package.json +2 -2
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
|
|
3
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -18,6 +24,7 @@ import BizConditionGroup from '../attrConditions/group';
|
|
|
18
24
|
import { Skeleton } from 'antd';
|
|
19
25
|
import _ from 'lodash';
|
|
20
26
|
import BizGlobalDataContext from '../context';
|
|
27
|
+
import { BuiltinIndicators } from '../constants/common';
|
|
21
28
|
export var classPrefix = 'biz-target';
|
|
22
29
|
|
|
23
30
|
var BizTargetCondition = function BizTargetCondition(props) {
|
|
@@ -142,31 +149,52 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
142
149
|
};
|
|
143
150
|
}
|
|
144
151
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
var hasEvent = false;
|
|
153
|
+
|
|
154
|
+
if (data.isBuiltIn || data.eventId < 0) {
|
|
155
|
+
if (data.eventGroupId) {
|
|
156
|
+
target.value.group = {
|
|
157
|
+
id: data.eventGroupId,
|
|
158
|
+
name: data.eventGroupId === -2 ? '整体' : '所有分组',
|
|
159
|
+
eventList: []
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
BuiltinIndicators.eventList.forEach(function (item) {
|
|
164
|
+
if (item.id === data.eventId) {
|
|
165
|
+
target.value.event = _objectSpread({}, item);
|
|
166
|
+
hasEvent = true;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
151
169
|
}
|
|
152
170
|
|
|
153
|
-
|
|
154
|
-
|
|
171
|
+
if (!hasEvent) {
|
|
172
|
+
if (data.eventId === -100) {
|
|
173
|
+
target.value.event = {
|
|
174
|
+
id: -100,
|
|
175
|
+
name: '事件概览',
|
|
176
|
+
attrList: []
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
for (var i = 0; i < eventGroupList.length; i++) {
|
|
181
|
+
var group = eventGroupList[i];
|
|
155
182
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
183
|
+
if (data.eventId !== -100) {
|
|
184
|
+
for (var j = 0; j < group.eventList.length; j++) {
|
|
185
|
+
var event = group.eventList[j];
|
|
159
186
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
187
|
+
if (event.id === data.eventId) {
|
|
188
|
+
target.value.event = event;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
163
191
|
}
|
|
164
192
|
}
|
|
165
|
-
}
|
|
166
193
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
194
|
+
if (data.eventGroupId && data.eventGroupId === group.id) {
|
|
195
|
+
target.value.group = group;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
170
198
|
}
|
|
171
199
|
}
|
|
172
200
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.29-alpha.
|
|
3
|
+
"version": "1.1.29-alpha.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react": "^16.12.0 || ^17.0.0",
|
|
60
60
|
"yorkie": "^2.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "940068acefe01cd22f273ef59d3a51637919d5ff"
|
|
63
63
|
}
|