@zgfe/modules-event 0.0.2-event.17 → 0.0.2-event.19
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.
|
@@ -15,8 +15,9 @@ import './styles/index.less';
|
|
|
15
15
|
import _ from 'lodash';
|
|
16
16
|
var classPrefix = 'eventfilter-box';
|
|
17
17
|
var EventFilter = function EventFilter(props) {
|
|
18
|
+
console.log('EventFilter', props);
|
|
18
19
|
var setSearchDisabled = props.setSearchDisabled;
|
|
19
|
-
var _useState = useState(0),
|
|
20
|
+
var _useState = useState(props.value && props.value.filters && props.value.filters.conditions ? props.value.filters.conditions.length : 0),
|
|
20
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
22
|
count = _useState2[0],
|
|
22
23
|
setCount = _useState2[1];
|
|
@@ -25,7 +26,10 @@ var EventFilter = function EventFilter(props) {
|
|
|
25
26
|
isAdd = _useState4[0],
|
|
26
27
|
setIsAdd = _useState4[1];
|
|
27
28
|
var conditionRef = useRef(null);
|
|
28
|
-
var _useState5 = useState({
|
|
29
|
+
var _useState5 = useState(props.value && props.value.id ? {
|
|
30
|
+
id: props.value.id,
|
|
31
|
+
name: props.value.name
|
|
32
|
+
} : {
|
|
29
33
|
id: -100,
|
|
30
34
|
name: '事件概览'
|
|
31
35
|
}),
|
|
@@ -51,18 +55,16 @@ var EventFilter = function EventFilter(props) {
|
|
|
51
55
|
if (props.value) {
|
|
52
56
|
var _data = props.value;
|
|
53
57
|
if (_data && _data.id) {
|
|
54
|
-
setEvent({
|
|
55
|
-
id: _data.id,
|
|
56
|
-
name: _data.name
|
|
57
|
-
});
|
|
58
58
|
setEventOverview(true);
|
|
59
59
|
}
|
|
60
60
|
if (_data.filters) {
|
|
61
61
|
setFilter(_data.filters);
|
|
62
|
+
setCount(_data.filters.conditions.length);
|
|
62
63
|
}
|
|
63
64
|
if (_data.dimension) {
|
|
65
|
+
var _attr = _data.dimension;
|
|
64
66
|
setBizAttributeSelectorValue(_objectSpread(_objectSpread({}, _data.dimension), {}, {
|
|
65
|
-
key:
|
|
67
|
+
key: _attr.propCategory === 'eventProp' ? _attr.propCategory + '-' + _attr.value : "".concat(_attr.propCategory, "-").concat(_attr.value, "-").concat(_attr.id)
|
|
66
68
|
}));
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -117,7 +119,8 @@ var EventFilter = function EventFilter(props) {
|
|
|
117
119
|
propCategory: attr.propCategory,
|
|
118
120
|
category: attr.category,
|
|
119
121
|
value: _value,
|
|
120
|
-
|
|
122
|
+
id: attr.id,
|
|
123
|
+
key: attr.propCategory === 'eventProp' ? attr.propCategory + '-' + _value : "".concat(attr.propCategory, "-").concat(_value, "-").concat(attr.id)
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
126
|
};
|
|
@@ -37,14 +37,34 @@ var defaultValue = {
|
|
|
37
37
|
filters: {
|
|
38
38
|
relation: 'and',
|
|
39
39
|
conditions: [{
|
|
40
|
-
attrId:
|
|
40
|
+
attrId: 151044,
|
|
41
41
|
propCategory: 'eventProp',
|
|
42
42
|
type: 1,
|
|
43
43
|
operator: 'equal',
|
|
44
44
|
values: ['55'],
|
|
45
45
|
dimensionSub: 'event_attr',
|
|
46
|
-
label: '
|
|
47
|
-
attrName: '
|
|
46
|
+
label: '33333',
|
|
47
|
+
attrName: '33333'
|
|
48
|
+
}, {
|
|
49
|
+
attrId: 0,
|
|
50
|
+
propCategory: 'userProp',
|
|
51
|
+
type: 1,
|
|
52
|
+
operator: 'equal',
|
|
53
|
+
values: ['匿名'],
|
|
54
|
+
dimensionSub: 'is_anonymous',
|
|
55
|
+
label: '实名/匿名',
|
|
56
|
+
attrName: 'is_anonymous',
|
|
57
|
+
category: 'fixed'
|
|
58
|
+
}, {
|
|
59
|
+
attrId: 0,
|
|
60
|
+
propCategory: 'envProp',
|
|
61
|
+
type: 1,
|
|
62
|
+
operator: 'equal',
|
|
63
|
+
values: ['js'],
|
|
64
|
+
dimensionSub: 'platform',
|
|
65
|
+
label: '平台',
|
|
66
|
+
attrName: 'platform',
|
|
67
|
+
category: 'fixed'
|
|
48
68
|
}]
|
|
49
69
|
}
|
|
50
70
|
}
|
package/es/modules/home/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { EventContext } from '../../types';
|
|
|
15
15
|
import { getInitDate } from '../../constants/initData';
|
|
16
16
|
import EventContent from '../content';
|
|
17
17
|
import { chartTypes } from '../../constants';
|
|
18
|
-
var classPrefix = 'event-container';
|
|
18
|
+
var classPrefix = 'event-module-container';
|
|
19
19
|
var ModuleEvent = function ModuleEvent(props) {
|
|
20
20
|
console.log('ModuleEvent-props', props);
|
|
21
21
|
var _useContext = useContext(BizGlobalDataContext),
|
package/es/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "0.0.2-event.
|
|
3
|
+
"version": "0.0.2-event.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/lodash": "^4.14.191",
|
|
37
37
|
"@umijs/fabric": "^2.8.1",
|
|
38
38
|
"@umijs/test": "^3.0.5",
|
|
39
|
-
"@zgfe/business-lib": "1.1.
|
|
39
|
+
"@zgfe/business-lib": "1.1.82-panel.3",
|
|
40
40
|
"antd": "^4.22.6",
|
|
41
41
|
"dumi": "^1.1.0",
|
|
42
42
|
"echarts": "^5.3.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react": "^16.12.0 || ^17.0.0",
|
|
50
50
|
"yorkie": "^2.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "eb3b57010acd8fd4fc138260f2efdde28e257acb",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|