@zgfe/business-lib 1.0.25-layers.3 → 1.0.25-userGroupFix.0
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/addToPanel/index.js +33 -16
- package/es/assets/styles/resetAntd.less +7 -2
- package/es/attrConditions/components/stringList.js +1 -1
- package/es/attrConditions/components/valuesList.js +7 -5
- package/es/attrConditions/group.js +4 -4
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attributeSelector/styles/index.less +31 -2
- package/es/attributeSelector/util.js +9 -1
- package/es/chart/demo/bar.js +3 -4
- package/es/chart/demo/data/data.d.ts +7 -0
- package/es/chart/demo/data/data.js +10 -0
- package/es/chart/demo/data/data3.d.ts +0 -2
- package/es/chart/demo/data/data3.js +15 -574
- package/es/chart/demo/map.js +1 -2
- package/es/chart/index.js +2 -2
- package/es/chart/util/chartOptionConfig.d.ts +1 -54
- package/es/chart/util/chartOptionConfig.js +13 -7
- package/es/chart/util/formatData.js +2 -1
- package/es/chart/util/formatOption.js +7 -23
- package/es/chart/util/mapUtil.d.ts +2 -2
- package/es/chart/util/mapUtil.js +59 -75
- package/es/eventSelector/index.js +2 -2
- package/es/eventSelector/listPanel.js +20 -5
- package/es/eventSelector/types.d.ts +1 -1
- package/es/layout/analysisLayout/demo/index.js +5 -1
- package/es/layout/analysisLayout/index.js +5 -5
- package/es/layout/analysisLayout/index.less +0 -6
- package/es/select/handle.js +47 -10
- package/es/select/index.js +44 -9
- package/es/select/overlay.d.ts +1 -1
- package/es/select/overlay.js +4 -5
- package/es/select/styles/handle.less +14 -1
- package/es/select/types.d.ts +6 -0
- package/es/targetConditionGroup/index.js +3 -1
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/index.js +13 -0
- package/es/targetSelector/styles/index.less +1 -0
- package/es/userCondition/conditions/styles/eventCondition.less +1 -1
- package/es/userCondition/conditions/styles/tagsCondition.less +1 -1
- package/es/userCondition/conditions/tagsCondition.js +13 -26
- package/es/userCondition/conditions/textDesc.js +8 -29
- package/es/userCondition/demo/index.js +228 -5
- package/es/userCondition/types.d.ts +3 -21
- package/es/userCondition/util.d.ts +1 -23
- package/es/userCondition/util.js +5 -39
- package/es/userTagsSelector/cascaderOverlay.js +42 -132
- package/es/userTagsSelector/demo/index.js +5 -12
- package/es/userTagsSelector/groups/groupOption.js +1 -1
- package/es/userTagsSelector/groups/index.js +11 -18
- package/es/userTagsSelector/groups/styles/option.less +1 -6
- package/es/userTagsSelector/index.js +3 -17
- package/es/userTagsSelector/multipleCheckPanel/index.js +16 -7
- package/es/userTagsSelector/styles/cascaderOverlay.less +4 -9
- package/es/userTagsSelector/types.d.ts +10 -1
- package/es/userTagsSelector/util.d.ts +1 -1
- package/es/userTagsSelector/util.js +2 -6
- package/es/utils/ajax.js +5 -1
- package/package.json +3 -3
- package/es/userCondition/demo/mockData.d.ts +0 -82
- package/es/userCondition/demo/mockData.js +0 -543
package/es/select/overlay.js
CHANGED
|
@@ -18,8 +18,7 @@ import BizSearchInput from '../searchInput';
|
|
|
18
18
|
import { classPrefix } from './index';
|
|
19
19
|
import SelectOption from './option';
|
|
20
20
|
import _ from 'lodash';
|
|
21
|
-
|
|
22
|
-
var SelectOverlay = function SelectOverlay(props) {
|
|
21
|
+
var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
22
|
var labelField = props.labelField,
|
|
24
23
|
keyField = props.keyField,
|
|
25
24
|
options = props.options,
|
|
@@ -199,13 +198,13 @@ var SelectOverlay = function SelectOverlay(props) {
|
|
|
199
198
|
}
|
|
200
199
|
|
|
201
200
|
return /*#__PURE__*/React.createElement("div", {
|
|
202
|
-
className: "".concat(classPrefix, "-overlay ").concat(overlayClassName)
|
|
201
|
+
className: "".concat(classPrefix, "-overlay ").concat(overlayClassName),
|
|
202
|
+
ref: ref
|
|
203
203
|
}, props.enableSearch && !props.multiple && /*#__PURE__*/React.createElement(BizSearchInput, {
|
|
204
204
|
className: "".concat(classPrefix, "-search"),
|
|
205
205
|
onChange: onSearch
|
|
206
206
|
}), dropdownExtra, /*#__PURE__*/React.createElement("div", {
|
|
207
207
|
className: "".concat(classPrefix, "-list-panel")
|
|
208
208
|
}, render()));
|
|
209
|
-
};
|
|
210
|
-
|
|
209
|
+
});
|
|
211
210
|
export default SelectOverlay;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
&:focus,
|
|
69
69
|
&.active {
|
|
70
|
-
box-shadow: none;
|
|
70
|
+
box-shadow: none !important;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
&-temp {
|
|
@@ -81,7 +81,9 @@
|
|
|
81
81
|
color: @input-placeholder-color;
|
|
82
82
|
}
|
|
83
83
|
&-content {
|
|
84
|
+
display: flex;
|
|
84
85
|
flex: 1;
|
|
86
|
+
align-items: center;
|
|
85
87
|
.__default-overflow();
|
|
86
88
|
}
|
|
87
89
|
&-expand-icon {
|
|
@@ -122,4 +124,15 @@
|
|
|
122
124
|
background-color: @white;
|
|
123
125
|
}
|
|
124
126
|
}
|
|
127
|
+
|
|
128
|
+
&-icon {
|
|
129
|
+
margin-right: @margin-xss;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&-status-error {
|
|
133
|
+
border-color: @error-color;
|
|
134
|
+
&.biz-select-handle-input:hover {
|
|
135
|
+
border-color: @error-color;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
125
138
|
}
|
package/es/select/types.d.ts
CHANGED
|
@@ -34,7 +34,9 @@ export declare namespace BizSelectTypes {
|
|
|
34
34
|
disableItemList?: Option[];
|
|
35
35
|
searchValue?: string;
|
|
36
36
|
notFound?: string | ReactNode;
|
|
37
|
+
showSelectIcon?: boolean;
|
|
37
38
|
loading?: boolean;
|
|
39
|
+
status?: string;
|
|
38
40
|
onChange?: (val: Option) => void;
|
|
39
41
|
onVisibleChange?: (visible: boolean) => void;
|
|
40
42
|
destroyPopupOnHide?: boolean;
|
|
@@ -69,6 +71,10 @@ export interface HandlerTypes {
|
|
|
69
71
|
theme?: string;
|
|
70
72
|
size?: SizeType;
|
|
71
73
|
border?: boolean;
|
|
74
|
+
showSelectIcon?: boolean;
|
|
75
|
+
status?: string;
|
|
72
76
|
onDelete?: (data: BizSelectTypes.Option) => void;
|
|
73
77
|
onSearch?: (val: string) => void;
|
|
78
|
+
onCreate?: (val: string) => void;
|
|
79
|
+
onVisible?: () => void;
|
|
74
80
|
}
|
|
@@ -211,7 +211,8 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
211
211
|
eventName: ((_target$value$event5 = target.value.event) === null || _target$value$event5 === void 0 ? void 0 : _target$value$event5.alias) || ((_target$value$event6 = target.value.event) === null || _target$value$event6 === void 0 ? void 0 : _target$value$event6.name),
|
|
212
212
|
eventGroupId: (_target$value$group = target.value.group) === null || _target$value$group === void 0 ? void 0 : _target$value$group.id,
|
|
213
213
|
analysisDimension: analysisDimension,
|
|
214
|
-
filters: filterDatas
|
|
214
|
+
filters: filterDatas,
|
|
215
|
+
marked: target.value.event.marked
|
|
215
216
|
};
|
|
216
217
|
props.onChange(data);
|
|
217
218
|
}
|
|
@@ -252,6 +253,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
|
|
|
252
253
|
})), (filters || isAdd) && /*#__PURE__*/React.createElement(BizConditionGroup, {
|
|
253
254
|
ref: conditionRef,
|
|
254
255
|
value: filters,
|
|
256
|
+
onlyAnd: props.onlyAnd,
|
|
255
257
|
enableEventProp: true,
|
|
256
258
|
enableDelete: true,
|
|
257
259
|
eventIdList: (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.id) ? [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] : undefined,
|
|
@@ -39,6 +39,11 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
39
39
|
showEditModal = _useState6[0],
|
|
40
40
|
setShowEditModal = _useState6[1];
|
|
41
41
|
|
|
42
|
+
var _useState7 = useState(false),
|
|
43
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
|
+
visible = _useState8[0],
|
|
45
|
+
setVisible = _useState8[1];
|
|
46
|
+
|
|
42
47
|
useEffect(function () {
|
|
43
48
|
if (!props.defaultValue) return;
|
|
44
49
|
setAlias(props.defaultValue.alias || '');
|
|
@@ -51,6 +56,8 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
51
56
|
}, [props.value]);
|
|
52
57
|
|
|
53
58
|
var onClickIcon = function onClickIcon(name) {
|
|
59
|
+
setVisible(false);
|
|
60
|
+
|
|
54
61
|
if (name === 'edit') {
|
|
55
62
|
setShowEditModal(true);
|
|
56
63
|
} else if (name === 'add') {
|
|
@@ -91,6 +98,10 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
91
98
|
});
|
|
92
99
|
};
|
|
93
100
|
|
|
101
|
+
var onVisibleChange = function onVisibleChange(flag) {
|
|
102
|
+
setVisible(flag);
|
|
103
|
+
};
|
|
104
|
+
|
|
94
105
|
return /*#__PURE__*/React.createElement("div", {
|
|
95
106
|
className: classPrefix
|
|
96
107
|
}, /*#__PURE__*/React.cloneElement(props.children, {
|
|
@@ -112,6 +123,8 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
112
123
|
enabled: enableDelete,
|
|
113
124
|
onClick: onClickIcon
|
|
114
125
|
}), targetData && /*#__PURE__*/React.createElement(Dropdown, {
|
|
126
|
+
visible: visible,
|
|
127
|
+
onVisibleChange: onVisibleChange,
|
|
115
128
|
overlay: /*#__PURE__*/React.createElement(BizTargetOptionMenu, {
|
|
116
129
|
onClick: onClickIcon,
|
|
117
130
|
enableAdd: enableAdd,
|
|
@@ -16,14 +16,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
16
16
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
|
|
19
|
-
import React, { useContext,
|
|
19
|
+
import React, { useContext, useState } from 'react';
|
|
20
20
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
21
21
|
import BizSelect from '../../select';
|
|
22
22
|
import { operatorMap } from './constants';
|
|
23
23
|
import BizUserTagsSelect from '../../userTagsSelector';
|
|
24
24
|
import './styles/tagsCondition.less';
|
|
25
|
-
import {
|
|
26
|
-
import _ from 'lodash';
|
|
25
|
+
import { findTagFactory } from '../util';
|
|
27
26
|
var options = [{
|
|
28
27
|
value: 'equal',
|
|
29
28
|
text: '是'
|
|
@@ -46,10 +45,6 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
46
45
|
_useState2 = _slicedToArray(_useState, 1),
|
|
47
46
|
defaultValues = _useState2[0];
|
|
48
47
|
|
|
49
|
-
var tagGroupList = useMemo(function () {
|
|
50
|
-
return buildTagsGroup(userTagsData || []);
|
|
51
|
-
}, [userTagsData]);
|
|
52
|
-
|
|
53
48
|
function onOperatorChange(operator) {
|
|
54
49
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
55
50
|
operator: operator.value
|
|
@@ -58,7 +53,7 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
58
53
|
|
|
59
54
|
function onTagsChange(data) {
|
|
60
55
|
var values = data.map(function (item) {
|
|
61
|
-
return
|
|
56
|
+
return item[1].labelId;
|
|
62
57
|
});
|
|
63
58
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
64
59
|
values: values
|
|
@@ -67,20 +62,12 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
67
62
|
|
|
68
63
|
function buildDefaultValues() {
|
|
69
64
|
var values = [];
|
|
70
|
-
var findTag =
|
|
71
|
-
labels.values.forEach(function (
|
|
72
|
-
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var _value$split = value.split(':'),
|
|
77
|
-
_value$split2 = _slicedToArray(_value$split, 2),
|
|
78
|
-
layerId = _value$split2[1];
|
|
79
|
-
|
|
80
|
-
var selectValue = findTag(Number(layerId));
|
|
65
|
+
var findTag = findTagFactory(userTagsData);
|
|
66
|
+
labels.values.forEach(function (id) {
|
|
67
|
+
var tag = findTag(id);
|
|
81
68
|
|
|
82
|
-
if (
|
|
83
|
-
values.push(
|
|
69
|
+
if (tag) {
|
|
70
|
+
values.push([tag.labelGroup, tag]);
|
|
84
71
|
}
|
|
85
72
|
});
|
|
86
73
|
return values;
|
|
@@ -105,11 +92,11 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
105
92
|
className: "".concat(classPrefix, "-tags-condition-value")
|
|
106
93
|
}, /*#__PURE__*/React.createElement(BizUserTagsSelect, {
|
|
107
94
|
defaultValue: defaultValues,
|
|
108
|
-
data:
|
|
109
|
-
childFields: ['children'
|
|
110
|
-
keyFields: ['labelGroup', '
|
|
111
|
-
labelFields: ['labelGroup', 'labelName'
|
|
112
|
-
valueFields: ['labelGroup', '
|
|
95
|
+
data: userTagsData,
|
|
96
|
+
childFields: ['children'],
|
|
97
|
+
keyFields: ['labelGroup', 'labelId'],
|
|
98
|
+
labelFields: ['labelGroup', 'labelName'],
|
|
99
|
+
valueFields: ['labelGroup', 'labelId'],
|
|
113
100
|
onChange: onTagsChange,
|
|
114
101
|
destroyPopupOnHide: true
|
|
115
102
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -4,23 +4,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
|
|
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."); }
|
|
10
|
-
|
|
11
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
-
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
-
|
|
17
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
|
|
19
|
-
import _ from 'lodash';
|
|
20
7
|
import React, { useContext, useMemo } from 'react';
|
|
21
8
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
22
9
|
import BizGlobalDataContext from '../../context';
|
|
23
|
-
import { findEvent, findPropAndEnv,
|
|
10
|
+
import { findEvent, findPropAndEnv, findTagFactory } from '../util';
|
|
24
11
|
import { durationHandler, operatorMap } from './constants';
|
|
25
12
|
import './styles/textDesc.less';
|
|
26
13
|
|
|
@@ -70,12 +57,12 @@ var Text = function Text(props) {
|
|
|
70
57
|
function renderPeriod(label, period, isEvent) {
|
|
71
58
|
var _label$after;
|
|
72
59
|
|
|
73
|
-
var valuesDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, period.values[0]), /*#__PURE__*/React.createElement("span", null, (_label$after = label.after) !== null && _label$after !== void 0 ? _label$after : '天'));
|
|
74
|
-
|
|
75
60
|
if (period.operator === 'unlimited_time') {
|
|
76
61
|
return /*#__PURE__*/React.createElement("span", null, "\u5728\u4EFB\u610F\u65F6\u95F4\u5185");
|
|
77
62
|
}
|
|
78
63
|
|
|
64
|
+
var valuesDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, period.values[0]), /*#__PURE__*/React.createElement("span", null, (_label$after = label.after) !== null && _label$after !== void 0 ? _label$after : '天'));
|
|
65
|
+
|
|
79
66
|
if (period.operator === 'absolute') {
|
|
80
67
|
valuesDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
81
68
|
className: "".concat(classPrefix, "-text-desc-value")
|
|
@@ -186,23 +173,15 @@ var Text = function Text(props) {
|
|
|
186
173
|
className: "label"
|
|
187
174
|
}, /*#__PURE__*/React.createElement("b", null, "\u7528\u6237\u6807\u7B7E")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", null, operatorMap[labels.operator])), /*#__PURE__*/React.createElement("span", {
|
|
188
175
|
className: "".concat(classPrefix, "-text-desc-value")
|
|
189
|
-
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (
|
|
190
|
-
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
var _value$split = value.split(':'),
|
|
195
|
-
_value$split2 = _slicedToArray(_value$split, 2),
|
|
196
|
-
layerId = _value$split2[1];
|
|
197
|
-
|
|
198
|
-
var tag = findTag(Number(layerId));
|
|
176
|
+
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (id, index) {
|
|
177
|
+
var tag = findTag(id);
|
|
199
178
|
return /*#__PURE__*/React.createElement("span", {
|
|
200
|
-
key:
|
|
179
|
+
key: id
|
|
201
180
|
}, index >= 1 ? /*#__PURE__*/React.createElement("span", {
|
|
202
181
|
style: {
|
|
203
182
|
margin: '0 4px'
|
|
204
183
|
}
|
|
205
|
-
}, "\u6216") : null, /*#__PURE__*/React.createElement("span", null, tag && tag
|
|
184
|
+
}, "\u6216") : null, /*#__PURE__*/React.createElement("span", null, tag && tag.labelName));
|
|
206
185
|
}), /*#__PURE__*/React.createElement("span", null, ")")));
|
|
207
186
|
}
|
|
208
187
|
|
|
@@ -252,7 +231,7 @@ var Text = function Text(props) {
|
|
|
252
231
|
}
|
|
253
232
|
|
|
254
233
|
var findTag = useMemo(function () {
|
|
255
|
-
return
|
|
234
|
+
return findTagFactory(userTagsData);
|
|
256
235
|
}, [userTagsData]);
|
|
257
236
|
return /*#__PURE__*/React.createElement("span", {
|
|
258
237
|
className: "".concat(classPrefix, "-text-desc")
|
|
@@ -15,8 +15,216 @@ import eventData from '../../mock/event';
|
|
|
15
15
|
import envData from '../../mock/env';
|
|
16
16
|
import userData from '../../mock/user';
|
|
17
17
|
import { BizUserCondition, BizGlobalDataContext, convertAttributeData } from '@zgfe/business-lib';
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var getTagList = Promise.resolve([{
|
|
19
|
+
appId: 51,
|
|
20
|
+
createTime: '2022-07-05T13:48:51',
|
|
21
|
+
del: 0,
|
|
22
|
+
id: 286,
|
|
23
|
+
isInner: 0,
|
|
24
|
+
isStartup: 0,
|
|
25
|
+
labelGroup: '行为标签',
|
|
26
|
+
labelId: 66284406603776,
|
|
27
|
+
labelName: 'test8(新增)',
|
|
28
|
+
labelStatus: 1,
|
|
29
|
+
updateTime: '2022-07-05T13:48:51'
|
|
30
|
+
}, {
|
|
31
|
+
appId: 51,
|
|
32
|
+
createTime: '2022-07-05T13:47:38',
|
|
33
|
+
del: 0,
|
|
34
|
+
id: 285,
|
|
35
|
+
isInner: 0,
|
|
36
|
+
isStartup: 0,
|
|
37
|
+
labelGroup: '预测标签',
|
|
38
|
+
labelId: 66283215683584,
|
|
39
|
+
labelName: 'test7(新增)',
|
|
40
|
+
labelStatus: 1,
|
|
41
|
+
updateTime: '2022-07-05T13:47:38'
|
|
42
|
+
}, {
|
|
43
|
+
appId: 51,
|
|
44
|
+
createTime: '2022-07-05T13:47:10',
|
|
45
|
+
del: 0,
|
|
46
|
+
id: 284,
|
|
47
|
+
isInner: 0,
|
|
48
|
+
isStartup: 0,
|
|
49
|
+
labelGroup: '其他标签',
|
|
50
|
+
labelId: 66282747314176,
|
|
51
|
+
labelName: 'test6(新增)',
|
|
52
|
+
labelStatus: 1,
|
|
53
|
+
updateTime: '2022-07-05T13:47:10'
|
|
54
|
+
}, {
|
|
55
|
+
appId: 51,
|
|
56
|
+
createTime: '2022-07-05T13:44:20',
|
|
57
|
+
del: 0,
|
|
58
|
+
id: 283,
|
|
59
|
+
isInner: 0,
|
|
60
|
+
isStartup: 0,
|
|
61
|
+
labelGroup: '其他标签',
|
|
62
|
+
labelId: 66279963361280,
|
|
63
|
+
labelName: 'test5(新增)',
|
|
64
|
+
labelStatus: 1,
|
|
65
|
+
updateTime: '2022-07-05T13:44:20'
|
|
66
|
+
}, {
|
|
67
|
+
appId: 51,
|
|
68
|
+
createTime: '2022-07-05T13:43:08',
|
|
69
|
+
del: 0,
|
|
70
|
+
id: 282,
|
|
71
|
+
isInner: 0,
|
|
72
|
+
isStartup: 0,
|
|
73
|
+
labelGroup: '活跃标签',
|
|
74
|
+
labelId: 66278784057344,
|
|
75
|
+
labelName: 'test3(新增)',
|
|
76
|
+
labelStatus: 1,
|
|
77
|
+
updateTime: '2022-07-05T13:43:08'
|
|
78
|
+
}, {
|
|
79
|
+
appId: 51,
|
|
80
|
+
createTime: '2022-07-05T13:42:44',
|
|
81
|
+
del: 0,
|
|
82
|
+
id: 281,
|
|
83
|
+
isInner: 0,
|
|
84
|
+
isStartup: 0,
|
|
85
|
+
labelGroup: '其他标签',
|
|
86
|
+
labelId: 66278393724928,
|
|
87
|
+
labelName: 'test2(新增)',
|
|
88
|
+
labelStatus: 1,
|
|
89
|
+
updateTime: '2022-07-05T13:42:44'
|
|
90
|
+
}, {
|
|
91
|
+
appId: 51,
|
|
92
|
+
createTime: '2022-07-05T13:42:30',
|
|
93
|
+
del: 0,
|
|
94
|
+
id: 280,
|
|
95
|
+
isInner: 0,
|
|
96
|
+
isStartup: 0,
|
|
97
|
+
labelGroup: '预测标签',
|
|
98
|
+
labelId: 66278158696448,
|
|
99
|
+
labelName: 'test1(新增)',
|
|
100
|
+
labelStatus: 1,
|
|
101
|
+
updateTime: '2022-07-05T13:42:30'
|
|
102
|
+
}, {
|
|
103
|
+
appId: 51,
|
|
104
|
+
createTime: '2022-06-21T15:04:24',
|
|
105
|
+
del: 0,
|
|
106
|
+
id: 277,
|
|
107
|
+
isInner: 0,
|
|
108
|
+
isStartup: 0,
|
|
109
|
+
labelGroup: '活跃标签',
|
|
110
|
+
labelId: 46540583010304,
|
|
111
|
+
labelName: '匿名用户',
|
|
112
|
+
labelStatus: 0,
|
|
113
|
+
updateTime: '2022-06-21T15:04:24'
|
|
114
|
+
}, {
|
|
115
|
+
appId: 51,
|
|
116
|
+
createTime: '2022-06-10T11:10:52',
|
|
117
|
+
del: 0,
|
|
118
|
+
id: 197,
|
|
119
|
+
isInner: 0,
|
|
120
|
+
isStartup: 0,
|
|
121
|
+
labelGroup: '活跃标签',
|
|
122
|
+
labelId: 77384417755136,
|
|
123
|
+
labelName: '手动更新1',
|
|
124
|
+
labelStatus: 0,
|
|
125
|
+
updateTime: '2022-06-10T11:32:31'
|
|
126
|
+
}, {
|
|
127
|
+
appId: 51,
|
|
128
|
+
createTime: '2022-06-10T11:10:36',
|
|
129
|
+
del: 0,
|
|
130
|
+
id: 196,
|
|
131
|
+
isInner: 0,
|
|
132
|
+
isStartup: 0,
|
|
133
|
+
labelGroup: '活跃标签',
|
|
134
|
+
labelId: 77383474429952,
|
|
135
|
+
labelName: '自动更新修改',
|
|
136
|
+
labelStatus: 0,
|
|
137
|
+
updateTime: '2022-06-10T11:11:13'
|
|
138
|
+
}, {
|
|
139
|
+
appId: 51,
|
|
140
|
+
createTime: '2022-06-10T10:49:57',
|
|
141
|
+
del: 0,
|
|
142
|
+
id: 191,
|
|
143
|
+
isInner: 0,
|
|
144
|
+
isStartup: 0,
|
|
145
|
+
labelGroup: '基本标签',
|
|
146
|
+
labelId: 77388914425856,
|
|
147
|
+
labelName: '一般价值',
|
|
148
|
+
labelStatus: 0,
|
|
149
|
+
updateTime: '2022-06-10T10:49:57'
|
|
150
|
+
}]);
|
|
151
|
+
var data = {
|
|
152
|
+
json: [[{
|
|
153
|
+
eventId: -4,
|
|
154
|
+
attrs: [],
|
|
155
|
+
runPeriod: {
|
|
156
|
+
operator: 'relative',
|
|
157
|
+
values: ['30', '1']
|
|
158
|
+
},
|
|
159
|
+
runTimes: {
|
|
160
|
+
operator: '>=',
|
|
161
|
+
values: ['1']
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
eventId: -3,
|
|
165
|
+
attrs: [],
|
|
166
|
+
runPeriod: {
|
|
167
|
+
operator: 'absolute',
|
|
168
|
+
values: ['2022-07-13', '2022-07-19']
|
|
169
|
+
},
|
|
170
|
+
runTimes: {
|
|
171
|
+
operator: '>=',
|
|
172
|
+
values: ['1']
|
|
173
|
+
}
|
|
174
|
+
}], [{
|
|
175
|
+
attrs: [{
|
|
176
|
+
attrId: 0,
|
|
177
|
+
attrName: 'zg_id',
|
|
178
|
+
operator: '>',
|
|
179
|
+
params: ['20'],
|
|
180
|
+
attrType: 'cont-num',
|
|
181
|
+
category: 'fixed'
|
|
182
|
+
}]
|
|
183
|
+
}, {
|
|
184
|
+
attrs: [{
|
|
185
|
+
attrId: 0,
|
|
186
|
+
attrName: 'app_user_id',
|
|
187
|
+
operator: 'equal',
|
|
188
|
+
params: ['20'],
|
|
189
|
+
attrType: 'cont-string',
|
|
190
|
+
category: 'fixed'
|
|
191
|
+
}]
|
|
192
|
+
}], [{
|
|
193
|
+
attrs: [{
|
|
194
|
+
attrId: 0,
|
|
195
|
+
attrName: 'duration',
|
|
196
|
+
operator: 'not equal',
|
|
197
|
+
params: [1198800, '1'],
|
|
198
|
+
attrType: 'cont-num',
|
|
199
|
+
category: 'fixed'
|
|
200
|
+
}]
|
|
201
|
+
}, {
|
|
202
|
+
eventId: 24143017,
|
|
203
|
+
runTimes: {
|
|
204
|
+
operator: '>=',
|
|
205
|
+
values: ['1']
|
|
206
|
+
},
|
|
207
|
+
attrs: [{
|
|
208
|
+
attrId: 0,
|
|
209
|
+
attrName: 'resolution_l',
|
|
210
|
+
category: 'fixed',
|
|
211
|
+
operator: '>',
|
|
212
|
+
params: ['10'],
|
|
213
|
+
attrType: 'cont-num'
|
|
214
|
+
}, {
|
|
215
|
+
attrId: 30183430,
|
|
216
|
+
attrName: '扫码场景描述',
|
|
217
|
+
category: 'custom',
|
|
218
|
+
operator: 'equal',
|
|
219
|
+
params: ['Microsoft Edge', 'Safari', 'Apple WebKit'],
|
|
220
|
+
attrType: 'cont-string'
|
|
221
|
+
}],
|
|
222
|
+
runPeriod: {
|
|
223
|
+
operator: 'relative',
|
|
224
|
+
values: ['30', '0']
|
|
225
|
+
}
|
|
226
|
+
}]]
|
|
227
|
+
};
|
|
20
228
|
export default (function () {
|
|
21
229
|
var _useState = useState({
|
|
22
230
|
eventGroupList: [],
|
|
@@ -40,13 +248,28 @@ export default (function () {
|
|
|
40
248
|
setStore(newStore);
|
|
41
249
|
}, []);
|
|
42
250
|
useEffect(function () {
|
|
251
|
+
var tagsMap = {};
|
|
43
252
|
getTagList.then(function (list) {
|
|
44
|
-
|
|
253
|
+
var data = [];
|
|
254
|
+
list.forEach(function (item) {
|
|
255
|
+
var labelGroup = item.labelGroup;
|
|
256
|
+
|
|
257
|
+
if (tagsMap[labelGroup]) {
|
|
258
|
+
tagsMap[labelGroup].push(item);
|
|
259
|
+
} else {
|
|
260
|
+
tagsMap[labelGroup] = [item];
|
|
261
|
+
data.push({
|
|
262
|
+
labelGroup: labelGroup,
|
|
263
|
+
children: tagsMap[labelGroup]
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
setUserTagsData(data);
|
|
45
268
|
});
|
|
46
269
|
}, []);
|
|
47
270
|
var defaultValue = useMemo(function () {
|
|
48
|
-
return
|
|
49
|
-
}, [
|
|
271
|
+
return data.json;
|
|
272
|
+
}, [data]);
|
|
50
273
|
|
|
51
274
|
function onChange(value) {
|
|
52
275
|
console.log(JSON.stringify(value));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UserProp } from '../attributeSelector/types';
|
|
3
|
+
import { TagI } from './../userTagsSelector/types';
|
|
3
4
|
export declare type Unpacked<T, U extends keyof T> = Required<T> extends {
|
|
4
5
|
[key in U]: infer R;
|
|
5
6
|
} ? R : never;
|
|
@@ -29,27 +30,8 @@ export declare namespace BizUserConditionT {
|
|
|
29
30
|
isRealTime?: boolean;
|
|
30
31
|
}
|
|
31
32
|
interface UserTagsDataI {
|
|
32
|
-
appId: number;
|
|
33
|
-
createTime: string;
|
|
34
|
-
updateTime: string;
|
|
35
|
-
del: number;
|
|
36
33
|
labelGroup: string;
|
|
37
|
-
|
|
38
|
-
labelName: string;
|
|
39
|
-
labelStatus: number;
|
|
40
|
-
labelType: number;
|
|
41
|
-
remark: string;
|
|
42
|
-
creator: string;
|
|
43
|
-
userAmount: number;
|
|
44
|
-
layerNum: number;
|
|
45
|
-
endProcessTime: string;
|
|
46
|
-
layers: {
|
|
47
|
-
layerLabelId: number;
|
|
48
|
-
layerLabelName: string;
|
|
49
|
-
layerRemark: string;
|
|
50
|
-
layerCondition: any[][];
|
|
51
|
-
sequence: number;
|
|
52
|
-
}[];
|
|
34
|
+
children: TagI[];
|
|
53
35
|
}
|
|
54
36
|
interface AttrCondition {
|
|
55
37
|
attrId: number;
|
|
@@ -80,7 +62,7 @@ export declare namespace BizUserConditionT {
|
|
|
80
62
|
}
|
|
81
63
|
interface Labels {
|
|
82
64
|
operator: 'not equal' | 'equal';
|
|
83
|
-
values:
|
|
65
|
+
values: number[];
|
|
84
66
|
}
|
|
85
67
|
interface TagsCondition {
|
|
86
68
|
attrs: [];
|
|
@@ -4,26 +4,4 @@ export declare function buildCondition(type: BizUserConditionT.ConditionType): B
|
|
|
4
4
|
export declare function transformNumberOperate(key: string, output?: boolean): string;
|
|
5
5
|
export declare function findEvent(eventId: number, eventGroupList: Unpacked<GlobalContextProps, 'eventGroupList'>): import("../attributeSelector/types").AnalysisEvent | null;
|
|
6
6
|
export declare function findPropAndEnv(name: string, list: Unpacked<GlobalContextProps, 'userPropList' | 'eventEnvList'>): import("../attributeSelector/types").UserProp | import("../attributeSelector/types").EnvProp | null;
|
|
7
|
-
export declare function
|
|
8
|
-
labelGroup: string;
|
|
9
|
-
id?: undefined;
|
|
10
|
-
labelName?: undefined;
|
|
11
|
-
layerLabelId?: undefined;
|
|
12
|
-
layerLabelName?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
id: number;
|
|
15
|
-
labelName: string;
|
|
16
|
-
labelGroup?: undefined;
|
|
17
|
-
layerLabelId?: undefined;
|
|
18
|
-
layerLabelName?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
layerLabelId: number;
|
|
21
|
-
layerLabelName: string;
|
|
22
|
-
labelGroup?: undefined;
|
|
23
|
-
id?: undefined;
|
|
24
|
-
labelName?: undefined;
|
|
25
|
-
})[] | null;
|
|
26
|
-
export declare function buildTagsGroup(list: BizUserConditionT.UserTagsDataI[]): {
|
|
27
|
-
labelGroup: string;
|
|
28
|
-
children: BizUserConditionT.UserTagsDataI[];
|
|
29
|
-
}[];
|
|
7
|
+
export declare function findTagFactory(data: BizUserConditionT.UserTagsDataI[]): (id: number) => import("../userTagsSelector/types").TagI | null;
|