@zgfe/modules-event 0.0.2-alpha.3 → 0.0.2-alpha.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.
- package/es/components/eventFilter/index.js +1 -2
- package/es/components/table/index.js +0 -1
- package/es/components/topBar/index.js +3 -3
- package/es/modules/content/index.js +1 -6
- package/es/modules/home/demo/create.js +1 -1
- package/es/modules/home/demo/scene.js +16 -19
- package/es/modules/home/index.js +2 -1
- package/es/modules/home/styles/index.less +1 -1
- package/es/modules/home/types.d.ts +0 -1
- package/package.json +2 -2
|
@@ -39,7 +39,7 @@ var EventFilter = function EventFilter(props) {
|
|
|
39
39
|
bizAttributeSelectorValue = _useState12[0],
|
|
40
40
|
setBizAttributeSelectorValue = _useState12[1];
|
|
41
41
|
useEffect(function () {
|
|
42
|
-
if (props.value
|
|
42
|
+
if (props.value) {
|
|
43
43
|
var _data = props.value[0];
|
|
44
44
|
setEvent({
|
|
45
45
|
id: _data.id,
|
|
@@ -85,7 +85,6 @@ var EventFilter = function EventFilter(props) {
|
|
|
85
85
|
setCount(0);
|
|
86
86
|
};
|
|
87
87
|
var onChangeAttr = function onChangeAttr(attr) {
|
|
88
|
-
console.log('细分属性', attr);
|
|
89
88
|
if (attr === undefined) {
|
|
90
89
|
setBizAttributeSelectorValue(undefined);
|
|
91
90
|
} else {
|
|
@@ -67,7 +67,6 @@ var EventTable = function EventTable(props) {
|
|
|
67
67
|
};
|
|
68
68
|
var onClickToDetail = function onClickToDetail(item, time, count) {
|
|
69
69
|
var _searchData$time;
|
|
70
|
-
console.log('666', searchData);
|
|
71
70
|
var group_value = '';
|
|
72
71
|
if (searchData.filterConditions && searchData.filterConditions[0].eventAttr) {
|
|
73
72
|
group_value = item.eventAttr;
|
|
@@ -17,7 +17,8 @@ var classPrefix = 'modules-event-topbar';
|
|
|
17
17
|
var TopBar = function TopBar(props) {
|
|
18
18
|
var _useContext = useContext(EventContext),
|
|
19
19
|
panelId = _useContext.panelId,
|
|
20
|
-
afterEditTarget = _useContext.afterEditTarget
|
|
20
|
+
afterEditTarget = _useContext.afterEditTarget,
|
|
21
|
+
enableAddScene = _useContext.enableAddScene;
|
|
21
22
|
var _useState = useState(false),
|
|
22
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
24
|
showPanel = _useState2[0],
|
|
@@ -30,7 +31,6 @@ var TopBar = function TopBar(props) {
|
|
|
30
31
|
currentApp = _useContext2.currentApp;
|
|
31
32
|
var searchData = props.searchData,
|
|
32
33
|
platformChange = props.platformChange;
|
|
33
|
-
console.log(123123, searchData);
|
|
34
34
|
var _useState5 = useState(),
|
|
35
35
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
36
|
panelType = _useState6[0],
|
|
@@ -68,7 +68,7 @@ var TopBar = function TopBar(props) {
|
|
|
68
68
|
onOk: function onOk(data) {
|
|
69
69
|
return _onOk('panel', data);
|
|
70
70
|
}
|
|
71
|
-
})),
|
|
71
|
+
})), enableAddScene && /*#__PURE__*/React.createElement("div", {
|
|
72
72
|
className: "".concat(classPrefix, "-scene")
|
|
73
73
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
74
74
|
onClick: function onClick() {
|
|
@@ -55,7 +55,6 @@ var EventContent = function EventContent(props) {
|
|
|
55
55
|
var _useContext = useContext(BizGlobalDataContext),
|
|
56
56
|
currentApp = _useContext.currentApp;
|
|
57
57
|
var _useContext2 = useContext(EventContext),
|
|
58
|
-
panelId = _useContext2.panelId,
|
|
59
58
|
searchData = _useContext2.searchData,
|
|
60
59
|
setSearchData = _useContext2.setSearchData;
|
|
61
60
|
var _useContext3 = useContext(BizTargetFromPanelContext),
|
|
@@ -130,9 +129,6 @@ var EventContent = function EventContent(props) {
|
|
|
130
129
|
var onChangeShow = function onChangeShow(data) {
|
|
131
130
|
setShowList(data);
|
|
132
131
|
};
|
|
133
|
-
var onFinish = function onFinish(values) {
|
|
134
|
-
console.log('onFinish', values);
|
|
135
|
-
};
|
|
136
132
|
var _useState13 = useState(-1),
|
|
137
133
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
138
134
|
eventId = _useState14[0],
|
|
@@ -186,7 +182,6 @@ var EventContent = function EventContent(props) {
|
|
|
186
182
|
component: "div",
|
|
187
183
|
colon: false,
|
|
188
184
|
layout: "vertical",
|
|
189
|
-
onFinish: onFinish,
|
|
190
185
|
scrollToFirstError: true,
|
|
191
186
|
initialValues: {
|
|
192
187
|
userGroup: searchData && searchData.userGroup ? searchData.userGroup.map(function (item) {
|
|
@@ -196,7 +191,7 @@ var EventContent = function EventContent(props) {
|
|
|
196
191
|
}) : [{
|
|
197
192
|
id: 0
|
|
198
193
|
}],
|
|
199
|
-
filterConditions:
|
|
194
|
+
filterConditions: searchData === null || searchData === void 0 ? void 0 : searchData.filterConditions
|
|
200
195
|
},
|
|
201
196
|
onValuesChange: onValuesChange
|
|
202
197
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -9,7 +9,7 @@ import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
|
9
9
|
import { ModuleEvent } from '../../../index';
|
|
10
10
|
import { requestConfig } from '../../../utils/ajaxConfig';
|
|
11
11
|
import { Button } from 'antd';
|
|
12
|
-
var defaultValue =
|
|
12
|
+
var defaultValue = null;
|
|
13
13
|
export default (function () {
|
|
14
14
|
var _useState = useState(false),
|
|
15
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -10,29 +10,26 @@ import { ModuleEvent } from '../../../index';
|
|
|
10
10
|
import { requestConfig } from '../../../utils/ajaxConfig';
|
|
11
11
|
import { Button } from 'antd';
|
|
12
12
|
var defaultValue = {
|
|
13
|
-
source: 'SCENE',
|
|
14
13
|
data: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
alias: '事件概览',
|
|
19
|
-
eventId: -100,
|
|
20
|
-
eventName: '事件概览',
|
|
21
|
-
eventGroupId: 0,
|
|
22
|
-
analysisDimension: {
|
|
23
|
-
analysisIndex: 'number'
|
|
24
|
-
}
|
|
14
|
+
filterConditions: [{
|
|
15
|
+
name: '123123',
|
|
16
|
+
id: 7567
|
|
25
17
|
}],
|
|
26
|
-
|
|
18
|
+
module: 'event',
|
|
19
|
+
analysisIndex: 'number',
|
|
20
|
+
chartType: 'line',
|
|
27
21
|
time: {
|
|
28
|
-
unit: '
|
|
29
|
-
|
|
30
|
-
begin: '
|
|
31
|
-
|
|
22
|
+
unit: 'day',
|
|
23
|
+
end: '2023-08-17',
|
|
24
|
+
begin: '2023-08-03',
|
|
25
|
+
relative: [14, 0]
|
|
32
26
|
},
|
|
33
|
-
|
|
27
|
+
appId: 266,
|
|
28
|
+
userGroup: [0, 1039]
|
|
34
29
|
},
|
|
35
|
-
chosen_data: []
|
|
30
|
+
chosen_data: [],
|
|
31
|
+
source: 'EVENT',
|
|
32
|
+
enableAddScene: false
|
|
36
33
|
};
|
|
37
34
|
export default (function () {
|
|
38
35
|
var _useState = useState(false),
|
|
@@ -61,7 +58,7 @@ export default (function () {
|
|
|
61
58
|
};
|
|
62
59
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
63
60
|
needMeta: true,
|
|
64
|
-
defaultApp:
|
|
61
|
+
defaultApp: 266
|
|
65
62
|
}, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
|
|
66
63
|
onClick: function onClick() {
|
|
67
64
|
return setIsDetail(false);
|
package/es/modules/home/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import EventContent from '../content';
|
|
|
17
17
|
import { chartTypes } from '../../constants';
|
|
18
18
|
var classPrefix = 'event-container';
|
|
19
19
|
var ModuleEvent = function ModuleEvent(props) {
|
|
20
|
+
console.log('ModuleEvent-props', props);
|
|
20
21
|
var _useContext = useContext(BizGlobalDataContext),
|
|
21
22
|
userGroupList = _useContext.userGroupList,
|
|
22
23
|
currentApp = _useContext.currentApp;
|
|
@@ -104,7 +105,7 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
104
105
|
setSearchData: setSearchData,
|
|
105
106
|
panelName: title,
|
|
106
107
|
includeToday: props.includeToday,
|
|
107
|
-
enableAddScene: props.
|
|
108
|
+
enableAddScene: props.defaultValue && props.defaultValue.enableAddScene || !props.defaultValue,
|
|
108
109
|
changeLoading: changeLoading,
|
|
109
110
|
afterEditTarget: props.afterEditTarget,
|
|
110
111
|
onUserDrill: props.onUserDrill
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -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": "b1979977e10ced3e784c2ab74c182ffb1116db19",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|