@zgfe/modules-attribution 1.0.2-alpha.2 → 1.0.2-alpha.4
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/modules/content/index.js +3 -1
- package/es/modules/home/styles/index.less +10 -6
- package/es/modules/searchPanel/components/attributableEvents.js +34 -22
- package/es/modules/searchPanel/components/globalAttribute.js +6 -4
- package/es/modules/searchPanel/components/targetEvent.js +4 -6
- package/es/modules/searchPanel/index.d.ts +1 -1
- package/es/modules/searchPanel/index.js +45 -11
- package/es/modules/searchPanel/styles/index.less +22 -12
- package/es/modules/searchPanel/utils.js +25 -32
- package/package.json +3 -3
|
@@ -106,6 +106,8 @@ var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
106
106
|
};
|
|
107
107
|
return /*#__PURE__*/React.createElement("div", {
|
|
108
108
|
className: classPrefix
|
|
109
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
className: "".concat(classPrefix, "-top-content")
|
|
109
111
|
}, /*#__PURE__*/React.createElement("div", {
|
|
110
112
|
className: "".concat(classPrefix, "-top-content-box")
|
|
111
113
|
}, /*#__PURE__*/React.createElement(SearchPanel, {
|
|
@@ -113,7 +115,7 @@ var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
113
115
|
defaultValue: searchData,
|
|
114
116
|
onChange: onChangeSearch,
|
|
115
117
|
resetTime: resetTime
|
|
116
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
117
119
|
className: "".concat(classPrefix, "-bottom-content-box")
|
|
118
120
|
}, /*#__PURE__*/React.createElement("div", {
|
|
119
121
|
className: "".concat(classPrefix, "-bottom-content-box-times")
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
font-weight: 500;
|
|
15
15
|
font-size: 16px;
|
|
16
16
|
line-height: 48px;
|
|
17
|
-
border-bottom: 1px solid #f2f3f4;
|
|
18
17
|
}
|
|
19
18
|
&-content {
|
|
20
19
|
width: 100%;
|
|
21
20
|
height: 100%;
|
|
22
21
|
// overflow: auto;
|
|
23
22
|
overflow-x: hidden;
|
|
24
|
-
background: #
|
|
23
|
+
background: #fff;
|
|
25
24
|
border-top: 1px solid #eaeaea;
|
|
26
25
|
.attribution-content {
|
|
27
|
-
&-top-content
|
|
28
|
-
|
|
29
|
-
padding: 24px;
|
|
30
|
-
|
|
26
|
+
&-top-content {
|
|
27
|
+
background: #fafafb;
|
|
28
|
+
padding: 16px 24px;
|
|
29
|
+
&-box{
|
|
30
|
+
padding: 24px;
|
|
31
|
+
background: #fff;
|
|
32
|
+
border: 1px solid #ECEDF0;
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
&-bottom-content-box {
|
|
33
37
|
min-height: 382px;
|
|
@@ -39,17 +39,21 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
39
39
|
setCount = _useState8[1];
|
|
40
40
|
var _useState9 = useState(false),
|
|
41
41
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
var _useState11 = useState(-1),
|
|
42
|
+
countLoading = _useState10[0],
|
|
43
|
+
setCountLoading = _useState10[1];
|
|
44
|
+
var _useState11 = useState(false),
|
|
46
45
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var
|
|
46
|
+
isAdd = _useState12[0],
|
|
47
|
+
setIsAdd = _useState12[1];
|
|
48
|
+
var conditionRef = useRef(null);
|
|
49
|
+
var _useState13 = useState(-1),
|
|
50
50
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
eventId = _useState14[0],
|
|
52
|
+
setEventId = _useState14[1];
|
|
53
|
+
var _useState15 = useState(),
|
|
54
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
55
|
+
minceAttr = _useState16[0],
|
|
56
|
+
setMinceAttr = _useState16[1];
|
|
53
57
|
var bizEventSelectorDefaultValue = {};
|
|
54
58
|
if (value && value.eventId && value.eventId != -100) {
|
|
55
59
|
bizEventSelectorDefaultValue = {
|
|
@@ -59,10 +63,10 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
bizAttributeSelectorValue =
|
|
65
|
-
setBizAttributeSelectorValue =
|
|
66
|
+
var _useState17 = useState(),
|
|
67
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
68
|
+
bizAttributeSelectorValue = _useState18[0],
|
|
69
|
+
setBizAttributeSelectorValue = _useState18[1];
|
|
66
70
|
useEffect(function () {
|
|
67
71
|
if (value) {
|
|
68
72
|
var _value$filters;
|
|
@@ -92,16 +96,18 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
92
96
|
}
|
|
93
97
|
}, []);
|
|
94
98
|
useEffect(function () {
|
|
99
|
+
setCountLoading(false);
|
|
95
100
|
if (ReasonData) {
|
|
96
101
|
handleCount('add', attrSourceCount, setAttrSourceCount, count);
|
|
97
102
|
}
|
|
98
|
-
setTimeout(function () {
|
|
99
|
-
onChangeHandle(ReasonData, filters, minceAttr);
|
|
100
|
-
}, 0);
|
|
101
103
|
}, [count]);
|
|
102
104
|
var onEventDelete = function onEventDelete() {
|
|
103
105
|
if (formData && formData.sourceFilters.length <= 1) {
|
|
104
106
|
setReasonData(undefined);
|
|
107
|
+
setAttrSelectShow(false);
|
|
108
|
+
setFilters(undefined);
|
|
109
|
+
setIsAdd(false);
|
|
110
|
+
setBizAttributeSelectorValue(undefined);
|
|
105
111
|
onChangeHandle(undefined, undefined, undefined);
|
|
106
112
|
return;
|
|
107
113
|
}
|
|
@@ -135,6 +141,10 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
135
141
|
message.error('最多可添加5条属性筛选');
|
|
136
142
|
return;
|
|
137
143
|
}
|
|
144
|
+
if (countLoading) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
setCountLoading(true);
|
|
138
148
|
setIsAdd(true);
|
|
139
149
|
setTimeout(function () {
|
|
140
150
|
conditionRef.current.add();
|
|
@@ -206,10 +216,10 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
206
216
|
props.onChange(data);
|
|
207
217
|
}
|
|
208
218
|
};
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
notClickable =
|
|
212
|
-
setNotClickable =
|
|
219
|
+
var _useState19 = useState(null),
|
|
220
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
221
|
+
notClickable = _useState20[0],
|
|
222
|
+
setNotClickable = _useState20[1];
|
|
213
223
|
useEffect(function () {
|
|
214
224
|
var _ReasonData$event;
|
|
215
225
|
if (ReasonData === undefined || (ReasonData === null || ReasonData === void 0 ? void 0 : (_ReasonData$event = ReasonData.event) === null || _ReasonData$event === void 0 ? void 0 : _ReasonData$event.id) === -100 && Object.keys(bizEventSelectorDefaultValue).length <= 0) {
|
|
@@ -264,7 +274,9 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
264
274
|
onClick: function onClick() {
|
|
265
275
|
return onAdd();
|
|
266
276
|
}
|
|
267
|
-
})))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(
|
|
277
|
+
})))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement("div", {
|
|
278
|
+
className: "".concat(count > 0 ? 'attr-box-show' : '')
|
|
279
|
+
}, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
268
280
|
ref: conditionRef,
|
|
269
281
|
value: filters,
|
|
270
282
|
onlyAnd: true,
|
|
@@ -273,6 +285,6 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
273
285
|
eventIdList: [eventId],
|
|
274
286
|
onChange: onChangeFilters,
|
|
275
287
|
onConditionsCount: setCount
|
|
276
|
-
})));
|
|
288
|
+
}))));
|
|
277
289
|
};
|
|
278
290
|
export default AttributableEvents;
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import { BizAttrConditionGroup, IconFont } from '@zgfe/business-lib';
|
|
8
8
|
import React, { useEffect, useRef, useState } from 'react';
|
|
9
9
|
var GlobalAttribute = function GlobalAttribute(props) {
|
|
10
|
-
var classPrefix = '
|
|
10
|
+
var classPrefix = 'form-box';
|
|
11
11
|
var max = props.max,
|
|
12
12
|
onChange = props.onChange,
|
|
13
13
|
setAttrGlobalCount = props.setAttrGlobalCount;
|
|
@@ -33,13 +33,15 @@ var GlobalAttribute = function GlobalAttribute(props) {
|
|
|
33
33
|
}
|
|
34
34
|
}, [props.eventIdList, props.value]);
|
|
35
35
|
var onAdd = function onAdd() {
|
|
36
|
-
if (props.eventIdList[0] === -100) return;
|
|
36
|
+
if (props.eventIdList && props.eventIdList.length <= 0 || props.eventIdList[0] === -100) return;
|
|
37
37
|
conditionRef.current.add();
|
|
38
38
|
};
|
|
39
39
|
useEffect(function () {
|
|
40
40
|
setAttrGlobalCount(count);
|
|
41
41
|
}, [count]);
|
|
42
|
-
return /*#__PURE__*/React.createElement("div", null, props.eventIdList && props.eventIdList[0] === -100 ? '' : /*#__PURE__*/React.createElement(
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", null, props.eventIdList && props.eventIdList[0] === -100 ? '' : /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "".concat(count > 0 ? 'attr-box-show' : '')
|
|
44
|
+
}, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
43
45
|
ref: conditionRef,
|
|
44
46
|
value: props.value,
|
|
45
47
|
onlyAnd: true,
|
|
@@ -48,7 +50,7 @@ var GlobalAttribute = function GlobalAttribute(props) {
|
|
|
48
50
|
eventIdList: props.eventIdList,
|
|
49
51
|
onChange: onChange,
|
|
50
52
|
onConditionsCount: setCount
|
|
51
|
-
}), count < max && /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
})), count < max && /*#__PURE__*/React.createElement("div", {
|
|
52
54
|
className: "".concat(classPrefix, "-add ").concat(props.eventIdList && props.eventIdList.length <= 0 ? 'disabled' : ''),
|
|
53
55
|
onClick: onAdd
|
|
54
56
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -66,7 +66,6 @@ var TargetEvent = function TargetEvent(props) {
|
|
|
66
66
|
};
|
|
67
67
|
var onAdd = function onAdd() {
|
|
68
68
|
var _targetData$event;
|
|
69
|
-
console.log('添加筛选', targetData, bizEventSelectorDefaultValue);
|
|
70
69
|
if ((targetData === null || targetData === void 0 ? void 0 : (_targetData$event = targetData.event) === null || _targetData$event === void 0 ? void 0 : _targetData$event.id) === -100 && Object.keys(bizEventSelectorDefaultValue).length <= 0) {
|
|
71
70
|
message.error('请先选择目标事件');
|
|
72
71
|
return;
|
|
@@ -93,9 +92,6 @@ var TargetEvent = function TargetEvent(props) {
|
|
|
93
92
|
};
|
|
94
93
|
useEffect(function () {
|
|
95
94
|
setAttrTargetCount(count);
|
|
96
|
-
setTimeout(function () {
|
|
97
|
-
onChangeHandle(targetData, filters);
|
|
98
|
-
}, 0);
|
|
99
95
|
}, [count]);
|
|
100
96
|
var onChangeHandle = function onChangeHandle(reason, filterData) {
|
|
101
97
|
if (props.onChange) {
|
|
@@ -147,7 +143,9 @@ var TargetEvent = function TargetEvent(props) {
|
|
|
147
143
|
onClick: function onClick() {
|
|
148
144
|
return onAdd();
|
|
149
145
|
}
|
|
150
|
-
}))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(
|
|
146
|
+
}))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: "".concat(count > 0 ? 'attr-box-show' : '')
|
|
148
|
+
}, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
151
149
|
ref: conditionRef,
|
|
152
150
|
value: undefined,
|
|
153
151
|
onlyAnd: true,
|
|
@@ -156,6 +154,6 @@ var TargetEvent = function TargetEvent(props) {
|
|
|
156
154
|
eventIdList: [eventId],
|
|
157
155
|
onChange: onChangeFilters,
|
|
158
156
|
onConditionsCount: setCount
|
|
159
|
-
})));
|
|
157
|
+
}))));
|
|
160
158
|
};
|
|
161
159
|
export default TargetEvent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchPanelTypes } from './types';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
export declare const classPrefix = "
|
|
4
|
+
export declare const classPrefix = "form-box";
|
|
5
5
|
declare const SearchPanel: React.ForwardRefExoticComponent<SearchPanelTypes.Props & React.RefAttributes<any>>;
|
|
6
6
|
export default SearchPanel;
|
|
@@ -18,7 +18,7 @@ import _ from 'lodash';
|
|
|
18
18
|
import { targetChangeCallback, operableOrNotHandle } from './utils';
|
|
19
19
|
import { searchFields } from '../../constants/fields';
|
|
20
20
|
import { AttributableContext } from '../../types';
|
|
21
|
-
export var classPrefix = '
|
|
21
|
+
export var classPrefix = 'form-box';
|
|
22
22
|
var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
23
|
var defaultValue = props.defaultValue,
|
|
24
24
|
resetTime = props.resetTime;
|
|
@@ -175,7 +175,9 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
175
175
|
setWindowType = _useState24[1];
|
|
176
176
|
return /*#__PURE__*/React.createElement("div", {
|
|
177
177
|
className: classPrefix
|
|
178
|
-
}, /*#__PURE__*/React.createElement(
|
|
178
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
179
|
+
className: "".concat(classPrefix, "-bottom-form-title")
|
|
180
|
+
}, "\u9009\u62E9\u4E8B\u4EF6"), /*#__PURE__*/React.createElement(Skeleton, {
|
|
179
181
|
loading: loading,
|
|
180
182
|
active: true,
|
|
181
183
|
paragraph: {
|
|
@@ -189,9 +191,10 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
189
191
|
}, searchFields.map(function (item) {
|
|
190
192
|
if (item.type === 'globalFilters') {
|
|
191
193
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
192
|
-
key: item.key
|
|
194
|
+
key: item.key,
|
|
195
|
+
className: "".concat(classPrefix, "-form-item")
|
|
193
196
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
194
|
-
className: "".concat(classPrefix, "-title")
|
|
197
|
+
className: "".concat(classPrefix, "-title global-attr")
|
|
195
198
|
}, item.label), /*#__PURE__*/React.createElement(Form.Item, {
|
|
196
199
|
className: "".concat(classPrefix, "-item"),
|
|
197
200
|
name: item.name
|
|
@@ -208,6 +211,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
208
211
|
var add = _ref.add,
|
|
209
212
|
remove = _ref.remove;
|
|
210
213
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
214
|
+
className: "".concat(classPrefix, "-form-item"),
|
|
211
215
|
key: "".concat(item.key, "-item-").concat(index)
|
|
212
216
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
213
217
|
className: "".concat(classPrefix, "-title")
|
|
@@ -216,7 +220,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
216
220
|
color: 'red'
|
|
217
221
|
}
|
|
218
222
|
}, "* "), item.label, /*#__PURE__*/React.createElement(Tooltip, {
|
|
219
|
-
placement: "
|
|
223
|
+
placement: "right",
|
|
220
224
|
title: item.tips
|
|
221
225
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
222
226
|
type: "tishiicon"
|
|
@@ -276,23 +280,41 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
276
280
|
message: '请选择分析模型'
|
|
277
281
|
}]
|
|
278
282
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
279
|
-
className: "
|
|
283
|
+
className: "attribution-type",
|
|
280
284
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
281
285
|
style: {
|
|
282
286
|
width: 208
|
|
283
287
|
},
|
|
288
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
289
|
+
type: "xiangxia",
|
|
290
|
+
style: {
|
|
291
|
+
color: '#021429'
|
|
292
|
+
}
|
|
293
|
+
}),
|
|
284
294
|
options: [{
|
|
285
295
|
value: 1,
|
|
286
|
-
label:
|
|
296
|
+
label: /*#__PURE__*/React.createElement(Tooltip, {
|
|
297
|
+
placement: "right",
|
|
298
|
+
title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u7B2C\u4E00\u4E2A\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u8D21\u732E\u4E3A100%"
|
|
299
|
+
}, "\u9996\u6B21\u89E6\u70B9\u5F52\u56E0")
|
|
287
300
|
}, {
|
|
288
301
|
value: 2,
|
|
289
|
-
label:
|
|
302
|
+
label: /*#__PURE__*/React.createElement(Tooltip, {
|
|
303
|
+
placement: "right",
|
|
304
|
+
title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u6700\u540E\u4E00\u4E2A\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u8D21\u732E\u4E3A100%"
|
|
305
|
+
}, "\u672B\u6B21\u89E6\u70B9\u5F52\u56E0")
|
|
290
306
|
}, {
|
|
291
307
|
value: 3,
|
|
292
|
-
label:
|
|
308
|
+
label: /*#__PURE__*/React.createElement(Tooltip, {
|
|
309
|
+
placement: "right",
|
|
310
|
+
title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u6240\u6709\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5E73\u5747\u5206\u914D\u8D21\u732E"
|
|
311
|
+
}, "\u7EBF\u6027\u5F52\u56E0")
|
|
293
312
|
}, {
|
|
294
313
|
value: 4,
|
|
295
|
-
label:
|
|
314
|
+
label: /*#__PURE__*/React.createElement(Tooltip, {
|
|
315
|
+
placement: "right",
|
|
316
|
+
title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u9996\u4F4D\u548C\u672B\u4F4D\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5404\u83B740%\u8D21\u732E\uFF0C\u5176\u4F59\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5E73\u520620%\u8D21\u732E"
|
|
317
|
+
}, "\u4F4D\u7F6E\u5F52\u56E0")
|
|
296
318
|
}]
|
|
297
319
|
})), /*#__PURE__*/React.createElement("p", {
|
|
298
320
|
className: "p"
|
|
@@ -307,6 +329,12 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
307
329
|
style: {
|
|
308
330
|
width: 208
|
|
309
331
|
},
|
|
332
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
333
|
+
type: "xiangxia",
|
|
334
|
+
style: {
|
|
335
|
+
color: '#021429'
|
|
336
|
+
}
|
|
337
|
+
}),
|
|
310
338
|
onChange: function onChange(e) {
|
|
311
339
|
setWindowType(e);
|
|
312
340
|
e === 1 ? setWindowCnt(-1) : setWindowCnt(1);
|
|
@@ -338,6 +366,12 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
338
366
|
onChange: function onChange(e) {
|
|
339
367
|
return setwindowTypeUnit(e);
|
|
340
368
|
},
|
|
369
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
370
|
+
type: "xiangxia",
|
|
371
|
+
style: {
|
|
372
|
+
color: '#021429'
|
|
373
|
+
}
|
|
374
|
+
}),
|
|
341
375
|
options: [{
|
|
342
376
|
value: 'day',
|
|
343
377
|
label: '天'
|
|
@@ -357,6 +391,6 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
357
391
|
onClick: function onClick() {
|
|
358
392
|
return onFinish(true);
|
|
359
393
|
}
|
|
360
|
-
}, "\
|
|
394
|
+
}, "\u67E5\u8BE2")))));
|
|
361
395
|
});
|
|
362
396
|
export default SearchPanel;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
2
|
|
|
3
|
-
.
|
|
3
|
+
.form-box {
|
|
4
|
+
.xiangxia {
|
|
5
|
+
font-size: 14px !important;
|
|
6
|
+
}
|
|
7
|
+
&-form-item {
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
.attr-box-show {
|
|
10
|
+
margin: 12px 0px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
&-bottom-form-title {
|
|
5
15
|
margin-top: 34px;
|
|
6
16
|
margin-bottom: 16px;
|
|
@@ -23,7 +33,7 @@
|
|
|
23
33
|
color: #9aa1a9;
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
|
-
.
|
|
36
|
+
.attribution-type {
|
|
27
37
|
margin-right: 24px;
|
|
28
38
|
}
|
|
29
39
|
.windowCnt {
|
|
@@ -71,13 +81,12 @@
|
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
&-item.ant-form-item {
|
|
74
|
-
margin-bottom:
|
|
84
|
+
margin-bottom: 0px;
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
&-add {
|
|
78
88
|
width: fit-content;
|
|
79
89
|
height: 20px;
|
|
80
|
-
margin-top: 8px;
|
|
81
90
|
color: #165dff;
|
|
82
91
|
font-size: 14px;
|
|
83
92
|
line-height: 20px;
|
|
@@ -97,6 +106,10 @@
|
|
|
97
106
|
}
|
|
98
107
|
}
|
|
99
108
|
|
|
109
|
+
.global-attr {
|
|
110
|
+
margin-bottom: 0 !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
100
113
|
.biz-condition-item-input {
|
|
101
114
|
border-color: transparent;
|
|
102
115
|
}
|
|
@@ -128,18 +141,13 @@
|
|
|
128
141
|
right: 40px;
|
|
129
142
|
}
|
|
130
143
|
}
|
|
131
|
-
// .biz-attr-select-handle:hover{
|
|
132
|
-
// .xiangxia{
|
|
133
|
-
// display: none;
|
|
134
|
-
// }
|
|
135
|
-
// }
|
|
136
144
|
}
|
|
137
145
|
.button-box {
|
|
138
146
|
.qingchu,
|
|
139
147
|
.tianjia2,
|
|
140
148
|
.shaixuan {
|
|
141
149
|
margin-top: 2px;
|
|
142
|
-
margin-right:
|
|
150
|
+
margin-right: 16px;
|
|
143
151
|
// color: #CCD0D4;
|
|
144
152
|
color: #9aa1a9;
|
|
145
153
|
font-size: 20px !important;
|
|
@@ -162,7 +170,6 @@
|
|
|
162
170
|
.target-events-box {
|
|
163
171
|
.selector-content {
|
|
164
172
|
display: flex;
|
|
165
|
-
margin-bottom: 12px;
|
|
166
173
|
.ant-dropdown-trigger {
|
|
167
174
|
width: 208px;
|
|
168
175
|
margin-right: 16px;
|
|
@@ -175,7 +182,7 @@
|
|
|
175
182
|
}
|
|
176
183
|
}
|
|
177
184
|
.shaixuan {
|
|
178
|
-
margin: 2px 0 0
|
|
185
|
+
margin: 2px 0 0 16px;
|
|
179
186
|
color: #9aa1a9;
|
|
180
187
|
font-size: 20px !important;
|
|
181
188
|
cursor: pointer;
|
|
@@ -200,3 +207,6 @@
|
|
|
200
207
|
color: #fb5547;
|
|
201
208
|
}
|
|
202
209
|
}
|
|
210
|
+
.attribution-type-options {
|
|
211
|
+
|
|
212
|
+
}
|
|
@@ -39,50 +39,43 @@ var judgeAttrInEvents = function judgeAttrInEvents(elds, attrId, eventGroupList)
|
|
|
39
39
|
return flag;
|
|
40
40
|
};
|
|
41
41
|
export function operableOrNotHandle(data, attrSourceCount, attrTargetCount, mincePropCount, attrGlobalCount) {
|
|
42
|
-
var
|
|
43
|
-
data.attributionType === undefined
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (attrGlobalCount && data.globalFilters === undefined)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
return flag;
|
|
42
|
+
var flagList = [];
|
|
43
|
+
if (data.attributionType === undefined) return true;
|
|
44
|
+
subsetHandle(flagList, data, 'sourceFilters', attrSourceCount, mincePropCount);
|
|
45
|
+
subsetHandle(flagList, data, 'targetFilters', attrTargetCount);
|
|
46
|
+
if (attrGlobalCount && data.globalFilters === undefined) return true;
|
|
47
|
+
data.globalFilters && conditionsHandle('globalFilters', data.globalFilters, attrGlobalCount, 0, flagList);
|
|
48
|
+
return flagList.indexOf(true) !== -1;
|
|
51
49
|
}
|
|
52
|
-
var subsetHandle = function subsetHandle(data, type, count, mincePropCount) {
|
|
53
|
-
var flag = false;
|
|
50
|
+
var subsetHandle = function subsetHandle(flagList, data, type, count, mincePropCount) {
|
|
54
51
|
data[type].map(function (item) {
|
|
55
|
-
item === undefined ?
|
|
52
|
+
item === undefined ? flagList.push(true) : null;
|
|
56
53
|
if (item !== undefined) {
|
|
57
|
-
|
|
58
|
-
(item === null || item === void 0 ? void 0 : item.eventId) === -100 ? flag = true : null;
|
|
54
|
+
(item === null || item === void 0 ? void 0 : item.eventId) === -100 ? flagList.push(true) : null;
|
|
59
55
|
if (type === 'targetFilters') {
|
|
60
|
-
item.filters === undefined && count != 0 ?
|
|
56
|
+
item.filters === undefined && count != 0 ? flagList.push(true) : null;
|
|
61
57
|
} else {
|
|
62
|
-
item.filters === undefined && Object.keys(count).length > 0 && count[item.eventId] !== undefined ?
|
|
58
|
+
item.filters === undefined && Object.keys(count).length > 0 && count[item.eventId] !== undefined ? flagList.push(true) : null;
|
|
63
59
|
if (mincePropCount != undefined) {
|
|
64
|
-
item.attributionSubdivision === undefined && Object.keys(mincePropCount).length > 0 && mincePropCount[item.eventId] !== undefined ?
|
|
60
|
+
item.attributionSubdivision === undefined && Object.keys(mincePropCount).length > 0 && mincePropCount[item.eventId] !== undefined ? flagList.push(true) : null;
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
|
-
|
|
68
|
-
flag = conditionsHandle(type, item.filters, count, item.eventId);
|
|
69
|
-
}
|
|
63
|
+
(item === null || item === void 0 ? void 0 : item.filters) && conditionsHandle(type, item.filters, count, item.eventId, flagList);
|
|
70
64
|
}
|
|
71
65
|
});
|
|
72
|
-
return flag;
|
|
73
66
|
};
|
|
74
|
-
var conditionsHandle = function conditionsHandle(type, data, count, eventId) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
var conditionsHandle = function conditionsHandle(type, data, count, eventId, flagList) {
|
|
68
|
+
if (data.conditions.length > 0) {
|
|
69
|
+
data.conditions.map(function (_item) {
|
|
70
|
+
if (_item.operator !== 'is null' && _item.operator !== 'is not null') {
|
|
71
|
+
var _item$values;
|
|
72
|
+
_item.values && (((_item$values = _item.values) === null || _item$values === void 0 ? void 0 : _item$values.length) <= 0 || _item.values[0] === '') ? flagList.push(true) : null;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
82
76
|
if (type === 'targetFilters' || type === 'globalFilters') {
|
|
83
|
-
data.conditions.length != count ?
|
|
77
|
+
data.conditions.length != count ? flagList.push(true) : null;
|
|
84
78
|
} else {
|
|
85
|
-
data.conditions.length != count[eventId] ?
|
|
79
|
+
count[eventId] && data.conditions.length != count[eventId] ? flagList.push(true) : null;
|
|
86
80
|
}
|
|
87
|
-
return flag;
|
|
88
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-attribution",
|
|
3
|
-
"version": "1.0.2-alpha.
|
|
3
|
+
"version": "1.0.2-alpha.4",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/lodash": "^4.14.191",
|
|
38
38
|
"@umijs/fabric": "^2.8.1",
|
|
39
39
|
"@umijs/test": "^3.0.5",
|
|
40
|
-
"@zgfe/business-lib": "1.1.41-attribution.
|
|
40
|
+
"@zgfe/business-lib": "1.1.41-attribution.17",
|
|
41
41
|
"antd": "^4.22.6",
|
|
42
42
|
"dumi": "^1.1.0",
|
|
43
43
|
"echarts": "^5.3.2",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"react": "^16.12.0 || ^17.0.0",
|
|
51
51
|
"yorkie": "^2.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "234183e85542399536f200d3b12884c4802c8429"
|
|
54
54
|
}
|