@zgfe/modules-event 1.0.5-heyh.4 → 1.0.5-heyh.6
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.
|
@@ -33,7 +33,6 @@ var SearchPanel = function SearchPanel(props) {
|
|
|
33
33
|
chart = _useState4[0],
|
|
34
34
|
setChart = _useState4[1];
|
|
35
35
|
var currentNormalOptions = analysisSubjectType === 'user' ? normalOptions : normalEventOptions;
|
|
36
|
-
console.log('analysisSubjectType: ', analysisSubjectType);
|
|
37
36
|
useEffect(function () {
|
|
38
37
|
if (searchData.chartType && searchData.chartType !== chart.value) {
|
|
39
38
|
if (searchData.chartType.indexOf(',') !== -1) {
|
|
@@ -95,7 +94,7 @@ var SearchPanel = function SearchPanel(props) {
|
|
|
95
94
|
onChange: onChangeTime,
|
|
96
95
|
selectRange: 365
|
|
97
96
|
}), /*#__PURE__*/React.createElement(BizTargetDimension, {
|
|
98
|
-
normalOptions:
|
|
97
|
+
normalOptions: currentNormalOptions,
|
|
99
98
|
value: dimension,
|
|
100
99
|
eventId: props.eventId,
|
|
101
100
|
isExtend: true,
|
|
@@ -13,9 +13,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
14
14
|
import { Tooltip, Empty } from 'antd';
|
|
15
15
|
import { BizChart, BizGlobalDataContext, ajax, BizLoading } from '@zgfe/business-lib';
|
|
16
|
+
import { EventTable } from '../../components';
|
|
16
17
|
import { judgeIsCity } from '../content/utils';
|
|
17
18
|
import { getValue, getMapChartData } from '../../modules/content/utils';
|
|
18
19
|
import { getDefaultShow, getShowColor, getUserGroupsCompareData, getSortData, getChartDataEventAliasName } from '../../utils/formData';
|
|
20
|
+
import _ from 'lodash';
|
|
19
21
|
import moment from 'moment';
|
|
20
22
|
import { Apis, chartColors } from '../../constants';
|
|
21
23
|
var classPrefix = 'event-mi-table';
|
|
@@ -107,6 +109,19 @@ var EventChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
107
109
|
setLoading(false);
|
|
108
110
|
});
|
|
109
111
|
};
|
|
112
|
+
var onChangeShowByName = function onChangeShowByName(nameGroup) {
|
|
113
|
+
var list = _.cloneDeep(showList);
|
|
114
|
+
var index = list === null || list === void 0 ? void 0 : list.indexOf(nameGroup);
|
|
115
|
+
if (index < 0) {
|
|
116
|
+
list.push(nameGroup);
|
|
117
|
+
} else {
|
|
118
|
+
list.splice(index, 1);
|
|
119
|
+
}
|
|
120
|
+
if (props.onChangeShow) props.onChangeShow(list);
|
|
121
|
+
};
|
|
122
|
+
var onChangeShow = function onChangeShow(names) {
|
|
123
|
+
if (props.onChangeShow) props.onChangeShow(names);
|
|
124
|
+
};
|
|
110
125
|
if (loading) {
|
|
111
126
|
return /*#__PURE__*/React.createElement(BizLoading, {
|
|
112
127
|
className: "".concat(classPrefix, "-loading")
|
|
@@ -153,6 +168,16 @@ var EventChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
153
168
|
case 'pie':
|
|
154
169
|
case 'map':
|
|
155
170
|
return chartBox();
|
|
171
|
+
case 'grid':
|
|
172
|
+
return /*#__PURE__*/React.createElement(EventTable, {
|
|
173
|
+
dataSource: dataSource,
|
|
174
|
+
sourcePanel: !props.dataSource,
|
|
175
|
+
searchData: params,
|
|
176
|
+
showList: showList,
|
|
177
|
+
changeShow: onChangeShow,
|
|
178
|
+
changeShowByName: onChangeShowByName,
|
|
179
|
+
onSelectEvent: props === null || props === void 0 ? void 0 : props.onSelectEvent
|
|
180
|
+
});
|
|
156
181
|
default:
|
|
157
182
|
return /*#__PURE__*/React.createElement("div", null, "\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u8868\u7C7B\u578B");
|
|
158
183
|
}
|
package/es/modules/home/index.js
CHANGED
|
@@ -19,8 +19,8 @@ import { getInitDate } from '../../constants/initData';
|
|
|
19
19
|
import EventContent from '../content';
|
|
20
20
|
import { chartTypes } from '../../constants';
|
|
21
21
|
var classPrefix = 'event-module-container';
|
|
22
|
-
var onChangeTimer = -1;
|
|
23
22
|
var ModuleEvent = function ModuleEvent(props) {
|
|
23
|
+
console.log('ModuleEvent-props', props);
|
|
24
24
|
var _useContext = useContext(BizGlobalDataContext),
|
|
25
25
|
currentApp = _useContext.currentApp,
|
|
26
26
|
eventGroupList = _useContext.eventGroupList,
|
|
@@ -31,17 +31,17 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
32
|
searchData = _useState2[0],
|
|
33
33
|
setSearchData = _useState2[1];
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
console.log('searchData变更: ', searchData);
|
|
36
|
+
}, [searchData]);
|
|
34
37
|
var _useState3 = useState(),
|
|
35
38
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
39
|
finalSearchData = _useState4[0],
|
|
37
40
|
setFinalSearchData = _useState4[1];
|
|
38
41
|
var onChangeUrlParam = function onChangeUrlParam(data) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
data: data
|
|
43
|
-
});
|
|
44
|
-
}, 500);
|
|
42
|
+
props.onChange({
|
|
43
|
+
data: data
|
|
44
|
+
});
|
|
45
45
|
};
|
|
46
46
|
var _useState5 = useState(),
|
|
47
47
|
_useState6 = _slicedToArray(_useState5, 2),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "1.0.5-heyh.
|
|
3
|
+
"version": "1.0.5-heyh.6",
|
|
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.2.17-heyh.
|
|
39
|
+
"@zgfe/business-lib": "1.2.17-heyh.2",
|
|
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": "9c05a0fceb5d74c5e99bc2d9bb6a89df341795bd",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|