@zgfe/business-lib 1.0.25-userGroupFix.0 → 1.0.25
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/cycleTime/demo/disable.d.ts +2 -0
- package/es/cycleTime/demo/disable.js +17 -0
- package/es/cycleTime/index.d.ts +1 -0
- package/es/cycleTime/index.js +12 -5
- package/es/cycleTime/month.d.ts +1 -0
- package/es/cycleTime/month.js +6 -3
- package/es/cycleTime/styles/month.less +12 -0
- package/es/select/demo/multiple.js +3 -2
- package/es/select/handle.js +4 -3
- package/es/select/styles/handle.less +36 -27
- package/es/userCondition/conditions/styles/eventCondition.less +1 -1
- package/es/userCondition/conditions/styles/tagsCondition.less +1 -1
- package/es/userCondition/conditions/tagsCondition.js +26 -13
- package/es/userCondition/conditions/textDesc.js +27 -6
- package/es/userCondition/demo/index.js +5 -228
- package/es/userCondition/demo/mockData.d.ts +85 -0
- package/es/userCondition/demo/mockData.js +546 -0
- package/es/userCondition/types.d.ts +21 -3
- package/es/userCondition/util.d.ts +23 -1
- package/es/userCondition/util.js +39 -5
- package/es/userTagsSelector/cascaderOverlay.js +132 -42
- package/es/userTagsSelector/demo/index.js +12 -5
- package/es/userTagsSelector/groups/groupOption.js +3 -2
- package/es/userTagsSelector/groups/index.js +18 -11
- package/es/userTagsSelector/groups/styles/option.less +6 -1
- package/es/userTagsSelector/index.js +17 -3
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +2 -1
- package/es/userTagsSelector/multipleCheckPanel/index.js +7 -16
- package/es/userTagsSelector/styles/cascaderOverlay.less +9 -4
- package/es/userTagsSelector/types.d.ts +1 -10
- package/es/userTagsSelector/util.d.ts +1 -1
- package/es/userTagsSelector/util.js +6 -2
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BizCycleTime } from '@zgfe/business-lib';
|
|
3
|
+
export default (function () {
|
|
4
|
+
function onChange(val) {
|
|
5
|
+
console.log(JSON.stringify(val));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizCycleTime, {
|
|
9
|
+
value: {
|
|
10
|
+
unit: 3,
|
|
11
|
+
day: [17, 18, 20]
|
|
12
|
+
},
|
|
13
|
+
onChange: onChange,
|
|
14
|
+
disable: true,
|
|
15
|
+
multiple: true
|
|
16
|
+
}));
|
|
17
|
+
});
|
package/es/cycleTime/index.d.ts
CHANGED
package/es/cycleTime/index.js
CHANGED
|
@@ -26,7 +26,8 @@ export var CycleTimeUnit;
|
|
|
26
26
|
|
|
27
27
|
var BizCycleTime = function BizCycleTime(props) {
|
|
28
28
|
var multiple = props.multiple,
|
|
29
|
-
size = props.size
|
|
29
|
+
size = props.size,
|
|
30
|
+
disable = props.disable;
|
|
30
31
|
var classPrefix = 'biz-cycle-time';
|
|
31
32
|
var unitList = [{
|
|
32
33
|
label: '每日',
|
|
@@ -157,6 +158,7 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
157
158
|
className: "".concat(classPrefix, "-unit"),
|
|
158
159
|
defaultValue: unit,
|
|
159
160
|
size: size,
|
|
161
|
+
disable: disable,
|
|
160
162
|
onChange: function onChange(v) {
|
|
161
163
|
setDay([]);
|
|
162
164
|
setTime(undefined);
|
|
@@ -169,7 +171,8 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
169
171
|
defaultValue: time ? moment(time, 'hh:mm:ss') : undefined,
|
|
170
172
|
onChange: function onChange(time) {
|
|
171
173
|
setTime(time === null || time === void 0 ? void 0 : time.format('hh:mm:ss'));
|
|
172
|
-
}
|
|
174
|
+
},
|
|
175
|
+
disabled: disable
|
|
173
176
|
}), unit.value === CycleTimeUnit.week && /*#__PURE__*/React.createElement(BizSelect, {
|
|
174
177
|
options: days,
|
|
175
178
|
labelField: "label",
|
|
@@ -181,16 +184,20 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
181
184
|
placeholder: props.placeholder,
|
|
182
185
|
onChange: function onChange(v) {
|
|
183
186
|
setDay(v);
|
|
184
|
-
}
|
|
187
|
+
},
|
|
188
|
+
disable: disable,
|
|
189
|
+
enableCreate: false
|
|
185
190
|
}), unit.value === CycleTimeUnit.month && /*#__PURE__*/React.createElement(MonthDay, {
|
|
186
191
|
placeholder: props.placeholder,
|
|
187
192
|
defaultValue: day,
|
|
188
|
-
onChange: setDayList
|
|
193
|
+
onChange: setDayList,
|
|
194
|
+
disable: disable
|
|
189
195
|
}));
|
|
190
196
|
};
|
|
191
197
|
|
|
192
198
|
BizCycleTime.defaultProps = {
|
|
193
199
|
multiple: false,
|
|
194
|
-
size: 'middle'
|
|
200
|
+
size: 'middle',
|
|
201
|
+
disable: false
|
|
195
202
|
};
|
|
196
203
|
export default BizCycleTime;
|
package/es/cycleTime/month.d.ts
CHANGED
package/es/cycleTime/month.js
CHANGED
|
@@ -18,6 +18,7 @@ import _ from 'lodash';
|
|
|
18
18
|
|
|
19
19
|
var MonthDay = function MonthDay(props) {
|
|
20
20
|
var classPrefix = 'biz-month-day';
|
|
21
|
+
var disable = props.disable;
|
|
21
22
|
|
|
22
23
|
var _useState = useState([]),
|
|
23
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -85,6 +86,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
89
|
+
disabled: disable,
|
|
88
90
|
overlay: /*#__PURE__*/React.createElement("div", {
|
|
89
91
|
className: "".concat(classPrefix, "-overlay")
|
|
90
92
|
}, dayList.map(function (item) {
|
|
@@ -104,7 +106,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
104
106
|
}, /*#__PURE__*/React.createElement("div", {
|
|
105
107
|
className: "".concat(classPrefix, "-wrapper")
|
|
106
108
|
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: "".concat(classPrefix, "-handle ").concat(props.size, " ").concat(!chosenDayList.length ? "holder" : '')
|
|
109
|
+
className: "".concat(classPrefix, "-handle ").concat(props.size, " ").concat(!chosenDayList.length ? "holder" : '', " ").concat(disable ? 'disable' : '')
|
|
108
110
|
}, /*#__PURE__*/React.createElement("div", {
|
|
109
111
|
className: "".concat(classPrefix, "-val")
|
|
110
112
|
}, chosenDayList.map(function (item) {
|
|
@@ -112,7 +114,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
112
114
|
closable: true,
|
|
113
115
|
key: item.value,
|
|
114
116
|
onClose: function onClose() {
|
|
115
|
-
onDelMonthDay(item);
|
|
117
|
+
!disable && onDelMonthDay(item);
|
|
116
118
|
}
|
|
117
119
|
}, item.label);
|
|
118
120
|
}), !chosenDayList.length && /*#__PURE__*/React.createElement("span", {
|
|
@@ -123,6 +125,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
MonthDay.defaultProps = {
|
|
126
|
-
size: 'middle'
|
|
128
|
+
size: 'middle',
|
|
129
|
+
disable: false
|
|
127
130
|
};
|
|
128
131
|
export default MonthDay;
|
|
@@ -47,6 +47,18 @@
|
|
|
47
47
|
&.ant-dropdown-open > .biz-month-day-handle {
|
|
48
48
|
.__default-focused();
|
|
49
49
|
}
|
|
50
|
+
.biz-month-day-handle {
|
|
51
|
+
&.disable {
|
|
52
|
+
cursor: not-allowed !important;
|
|
53
|
+
.ant-tag {
|
|
54
|
+
color: @disabled-color;
|
|
55
|
+
.anticon-close {
|
|
56
|
+
color: @disabled-color;
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
50
62
|
}
|
|
51
63
|
&-overlay {
|
|
52
64
|
.__select-panel();
|
|
@@ -40,7 +40,7 @@ var stringOperate = [{
|
|
|
40
40
|
name: '是空值',
|
|
41
41
|
value: 'is null'
|
|
42
42
|
}, {
|
|
43
|
-
name: '不是空值
|
|
43
|
+
name: '不是空值',
|
|
44
44
|
value: 'is not null'
|
|
45
45
|
}];
|
|
46
46
|
var disabledList = [{
|
|
@@ -80,6 +80,7 @@ export default (function () {
|
|
|
80
80
|
disableItemList: disabledList,
|
|
81
81
|
multiple: true,
|
|
82
82
|
enableCreate: true,
|
|
83
|
-
value: data
|
|
83
|
+
value: data,
|
|
84
|
+
disable: true
|
|
84
85
|
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
|
|
85
86
|
});
|
package/es/select/handle.js
CHANGED
|
@@ -22,7 +22,8 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
22
22
|
labelField = props.labelField,
|
|
23
23
|
keyField = props.keyField,
|
|
24
24
|
border = props.border,
|
|
25
|
-
showSelectIcon = props.showSelectIcon
|
|
25
|
+
showSelectIcon = props.showSelectIcon,
|
|
26
|
+
disable = props.disable;
|
|
26
27
|
var classPrefix = 'biz-select-handle';
|
|
27
28
|
|
|
28
29
|
var _useState = useState(false),
|
|
@@ -110,9 +111,9 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
111
|
color: "#fff"
|
|
111
112
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
112
113
|
closable: true,
|
|
113
|
-
|
|
114
|
+
className: "".concat(classPrefix, "-tag ").concat(disable ? 'disable' : ''),
|
|
114
115
|
onClose: function onClose() {
|
|
115
|
-
onDelete(item);
|
|
116
|
+
!disable && onDelete(item);
|
|
116
117
|
}
|
|
117
118
|
}, /*#__PURE__*/React.createElement("div", {
|
|
118
119
|
className: "".concat(classPrefix, "-tag-label")
|
|
@@ -56,6 +56,42 @@
|
|
|
56
56
|
height: auto;
|
|
57
57
|
min-height: @height-base;
|
|
58
58
|
}
|
|
59
|
+
.biz-select-handle-tag {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
margin: 2px 4px 2px 0;
|
|
63
|
+
padding: 0 4px;
|
|
64
|
+
padding-top: 1px;
|
|
65
|
+
padding-bottom: 1px;
|
|
66
|
+
background: none;
|
|
67
|
+
border-color: #cacdd4;
|
|
68
|
+
border-radius: @border-radius-small;
|
|
69
|
+
&-label {
|
|
70
|
+
min-width: 0;
|
|
71
|
+
max-width: 100px;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
}
|
|
75
|
+
&:not(.disable) {
|
|
76
|
+
&:hover {
|
|
77
|
+
.__default-hover();
|
|
78
|
+
.anticon {
|
|
79
|
+
color: @primary-color;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&.disable {
|
|
84
|
+
&:hover {
|
|
85
|
+
cursor: not-allowed;
|
|
86
|
+
.anticon-close {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.biz-select-handle-tag-label {
|
|
91
|
+
color: @disabled-color !important;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
59
95
|
}
|
|
60
96
|
|
|
61
97
|
&-search.ant-input {
|
|
@@ -90,33 +126,6 @@
|
|
|
90
126
|
width: 14px;
|
|
91
127
|
margin-left: 5px;
|
|
92
128
|
}
|
|
93
|
-
&-input {
|
|
94
|
-
display: flex;
|
|
95
|
-
#biz-select-handle-tag {
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
margin: 2px 4px 2px 0;
|
|
99
|
-
padding: 0 4px;
|
|
100
|
-
padding-top: 1px;
|
|
101
|
-
padding-bottom: 1px;
|
|
102
|
-
background: none;
|
|
103
|
-
border-color: #cacdd4;
|
|
104
|
-
border-radius: @border-radius-small;
|
|
105
|
-
&-label {
|
|
106
|
-
min-width: 0;
|
|
107
|
-
max-width: 100px;
|
|
108
|
-
overflow: hidden;
|
|
109
|
-
text-overflow: ellipsis;
|
|
110
|
-
}
|
|
111
|
-
&:hover {
|
|
112
|
-
.__default-hover();
|
|
113
|
-
|
|
114
|
-
.anticon {
|
|
115
|
-
color: @primary-color;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
129
|
|
|
121
130
|
&-tooltip {
|
|
122
131
|
.ant-tooltip-inner {
|
|
@@ -16,13 +16,14 @@ 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, useState } from 'react';
|
|
19
|
+
import React, { useContext, useMemo, 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 {
|
|
25
|
+
import { buildSelectLayer, buildTagsGroup } from '../util';
|
|
26
|
+
import _ from 'lodash';
|
|
26
27
|
var options = [{
|
|
27
28
|
value: 'equal',
|
|
28
29
|
text: '是'
|
|
@@ -45,6 +46,10 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
45
46
|
_useState2 = _slicedToArray(_useState, 1),
|
|
46
47
|
defaultValues = _useState2[0];
|
|
47
48
|
|
|
49
|
+
var tagGroupList = useMemo(function () {
|
|
50
|
+
return buildTagsGroup(userTagsData || []);
|
|
51
|
+
}, [userTagsData]);
|
|
52
|
+
|
|
48
53
|
function onOperatorChange(operator) {
|
|
49
54
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
50
55
|
operator: operator.value
|
|
@@ -53,7 +58,7 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
53
58
|
|
|
54
59
|
function onTagsChange(data) {
|
|
55
60
|
var values = data.map(function (item) {
|
|
56
|
-
return item[1].
|
|
61
|
+
return "".concat(item[1].id, ":").concat(item[2].layerLabelId);
|
|
57
62
|
});
|
|
58
63
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
59
64
|
values: values
|
|
@@ -62,12 +67,20 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
62
67
|
|
|
63
68
|
function buildDefaultValues() {
|
|
64
69
|
var values = [];
|
|
65
|
-
var findTag =
|
|
66
|
-
labels.values.forEach(function (
|
|
67
|
-
|
|
70
|
+
var findTag = buildSelectLayer(userTagsData);
|
|
71
|
+
labels.values.forEach(function (value) {
|
|
72
|
+
if (_.isNumber(value)) {
|
|
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));
|
|
68
81
|
|
|
69
|
-
if (
|
|
70
|
-
values.push(
|
|
82
|
+
if (selectValue) {
|
|
83
|
+
values.push(selectValue);
|
|
71
84
|
}
|
|
72
85
|
});
|
|
73
86
|
return values;
|
|
@@ -92,11 +105,11 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
92
105
|
className: "".concat(classPrefix, "-tags-condition-value")
|
|
93
106
|
}, /*#__PURE__*/React.createElement(BizUserTagsSelect, {
|
|
94
107
|
defaultValue: defaultValues,
|
|
95
|
-
data:
|
|
96
|
-
childFields: ['children'],
|
|
97
|
-
keyFields: ['labelGroup', '
|
|
98
|
-
labelFields: ['labelGroup', 'labelName'],
|
|
99
|
-
valueFields: ['labelGroup', '
|
|
108
|
+
data: tagGroupList,
|
|
109
|
+
childFields: ['children', 'layers'],
|
|
110
|
+
keyFields: ['labelGroup', 'id', 'layerLabelId'],
|
|
111
|
+
labelFields: ['labelGroup', 'labelName', 'layerLabelName'],
|
|
112
|
+
valueFields: ['labelGroup', 'id', 'layerLabelId'],
|
|
100
113
|
onChange: onTagsChange,
|
|
101
114
|
destroyPopupOnHide: true
|
|
102
115
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -4,10 +4,23 @@ 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';
|
|
7
20
|
import React, { useContext, useMemo } from 'react';
|
|
8
21
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
9
22
|
import BizGlobalDataContext from '../../context';
|
|
10
|
-
import { findEvent, findPropAndEnv,
|
|
23
|
+
import { findEvent, findPropAndEnv, buildSelectLayer } from '../util';
|
|
11
24
|
import { durationHandler, operatorMap } from './constants';
|
|
12
25
|
import './styles/textDesc.less';
|
|
13
26
|
|
|
@@ -173,15 +186,23 @@ var Text = function Text(props) {
|
|
|
173
186
|
className: "label"
|
|
174
187
|
}, /*#__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", {
|
|
175
188
|
className: "".concat(classPrefix, "-text-desc-value")
|
|
176
|
-
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (
|
|
177
|
-
|
|
189
|
+
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (value, index) {
|
|
190
|
+
if (_.isNumber(value)) {
|
|
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));
|
|
178
199
|
return /*#__PURE__*/React.createElement("span", {
|
|
179
|
-
key:
|
|
200
|
+
key: layerId
|
|
180
201
|
}, index >= 1 ? /*#__PURE__*/React.createElement("span", {
|
|
181
202
|
style: {
|
|
182
203
|
margin: '0 4px'
|
|
183
204
|
}
|
|
184
|
-
}, "\u6216") : null, /*#__PURE__*/React.createElement("span", null, tag && tag.labelName));
|
|
205
|
+
}, "\u6216") : null, /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName + ':' + tag[2].layerLabelName));
|
|
185
206
|
}), /*#__PURE__*/React.createElement("span", null, ")")));
|
|
186
207
|
}
|
|
187
208
|
|
|
@@ -231,7 +252,7 @@ var Text = function Text(props) {
|
|
|
231
252
|
}
|
|
232
253
|
|
|
233
254
|
var findTag = useMemo(function () {
|
|
234
|
-
return
|
|
255
|
+
return buildSelectLayer(userTagsData);
|
|
235
256
|
}, [userTagsData]);
|
|
236
257
|
return /*#__PURE__*/React.createElement("span", {
|
|
237
258
|
className: "".concat(classPrefix, "-text-desc")
|
|
@@ -15,216 +15,8 @@ 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
|
-
|
|
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
|
-
};
|
|
18
|
+
import { conditions, tagList } from './mockData';
|
|
19
|
+
var getTagList = Promise.resolve(tagList);
|
|
228
20
|
export default (function () {
|
|
229
21
|
var _useState = useState({
|
|
230
22
|
eventGroupList: [],
|
|
@@ -248,28 +40,13 @@ export default (function () {
|
|
|
248
40
|
setStore(newStore);
|
|
249
41
|
}, []);
|
|
250
42
|
useEffect(function () {
|
|
251
|
-
var tagsMap = {};
|
|
252
43
|
getTagList.then(function (list) {
|
|
253
|
-
|
|
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);
|
|
44
|
+
setUserTagsData(list);
|
|
268
45
|
});
|
|
269
46
|
}, []);
|
|
270
47
|
var defaultValue = useMemo(function () {
|
|
271
|
-
return
|
|
272
|
-
}, [
|
|
48
|
+
return conditions;
|
|
49
|
+
}, [conditions]);
|
|
273
50
|
|
|
274
51
|
function onChange(value) {
|
|
275
52
|
console.log(JSON.stringify(value));
|