@zgfe/modules-event 1.0.7 → 1.0.29-zhongyuan.2

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.
Files changed (43) hide show
  1. package/README.md +35 -35
  2. package/es/components/eventFilter/index.js +68 -20
  3. package/es/components/eventFilter/setCascade.d.ts +3 -0
  4. package/es/components/eventFilter/setCascade.js +286 -0
  5. package/es/components/eventFilter/styles/index.less +148 -36
  6. package/es/components/renderContent/index.js +14 -25
  7. package/es/components/renderContent/styles/index.less +19 -19
  8. package/es/components/renderContent/types.d.ts +0 -1
  9. package/es/components/searchPanel/index.js +19 -6
  10. package/es/components/searchPanel/styles/index.less +22 -18
  11. package/es/components/searchPanel/types.d.ts +2 -2
  12. package/es/components/table/index.js +60 -9
  13. package/es/components/table/styles/index.less +241 -193
  14. package/es/components/table/types.d.ts +0 -1
  15. package/es/components/topBar/index.d.ts +6 -1
  16. package/es/components/topBar/index.js +39 -22
  17. package/es/components/topBar/styles/index.less +58 -63
  18. package/es/components/topBar/types.d.ts +0 -1
  19. package/es/constants/apis.d.ts +3 -1
  20. package/es/constants/apis.js +4 -2
  21. package/es/constants/fields.d.ts +0 -14
  22. package/es/constants/fields.js +1 -45
  23. package/es/modules/chart/demo/panel.js +7 -2
  24. package/es/modules/chart/index.js +105 -36
  25. package/es/modules/chart/types.d.ts +3 -0
  26. package/es/modules/content/index.d.ts +1 -1
  27. package/es/modules/content/index.js +94 -55
  28. package/es/modules/content/styles/index.less +19 -7
  29. package/es/modules/content/utils.d.ts +1 -1
  30. package/es/modules/content/utils.js +19 -18
  31. package/es/modules/home/demo/edit.js +6 -7
  32. package/es/modules/home/demo/index.js +1 -1
  33. package/es/modules/home/demo/styles/index.less +33 -33
  34. package/es/modules/home/index.js +53 -35
  35. package/es/modules/home/styles/index.less +49 -49
  36. package/es/modules/topPanel/index.js +36 -8
  37. package/es/modules/topPanel/styles/index.less +50 -49
  38. package/es/style/image/ring.svg +8 -8
  39. package/es/style/index.less +62 -62
  40. package/es/types.d.ts +6 -0
  41. package/es/utils/formData.d.ts +2 -1
  42. package/es/utils/formData.js +39 -9
  43. package/package.json +24 -20
@@ -1,193 +1,241 @@
1
- .event-mi-table {
2
- margin-top: 16px;
3
- &-loading {
4
- min-height: 300px;
5
- }
6
- &-table-header {
7
- display: flex;
8
- align-items: center;
9
- justify-content: space-between;
10
- height: 50px;
11
- margin-bottom: -1px;
12
- padding: 0 12px;
13
- line-height: 50px;
14
- background: #fafafb;
15
- border: 1px solid #e6e7ea;
16
- border-radius: 8px 8px 0 0;
17
- > :nth-child(2) {
18
- display: flex;
19
- > :nth-child(1) {
20
- margin-right: 16px;
21
- }
22
- div {
23
- height: 32px;
24
- padding: 0 16px;
25
- line-height: 32px;
26
- background: #fff;
27
- border: 1px solid #f2f3f4;
28
- border-radius: 4px;
29
- cursor: pointer;
30
- .xiazai1 {
31
- margin-right: 4px;
32
- font-size: 18px !important;
33
- vertical-align: -2px;
34
- }
35
- }
36
- div:hover {
37
- color: #165dff;
38
- background: #e8efff;
39
- border: 1px solid #165dff;
40
- }
41
- div:active {
42
- color: #1454e5;
43
- background: #e8efff;
44
- border: 1px solid #1454e5;
45
- }
46
- }
47
- }
48
- .ant-table {
49
- border-radius: 0 0 8px 8px;
50
- }
51
- .sourcepanel-table-header {
52
- overflow: hidden;
53
- border-radius: 8px 8px 0 0;
54
- .ant-table {
55
- max-height: none;
56
- }
57
- }
58
- .ant-pagination {
59
- margin-top: 24px !important;
60
- }
61
- .ant-table
62
- .ant-table-thead
63
- .ant-table-cell.ant-table-column-has-sorters
64
- .ant-table-column-sorters {
65
- justify-content: flex-end !important;
66
- }
67
- .ant-table-cell-with-append {
68
- padding-left: 20px;
69
- .ant-table-row-expand-icon {
70
- position: absolute;
71
- left: 0;
72
- margin-top: 0;
73
- }
74
- }
75
- .tooltip-name-box {
76
- display: flex;
77
- &-market {
78
- // max-width: calc(100% - 20px);
79
- margin-right: 8px;
80
- overflow: hidden;
81
- white-space: nowrap;
82
- text-overflow: ellipsis;
83
- cursor: pointer;
84
- -webkit-line-clamp: 1;
85
- -webkit-box-orient: vertical;
86
- .shoucang {
87
- color: #fd9f41;
88
- font-size: 16px !important;
89
- }
90
- .notshoucang {
91
- opacity: 0;
92
- }
93
- }
94
-
95
- .fuzhi1 {
96
- display: none;
97
- font-size: 16px !important;
98
- }
99
- .fuzhi1:hover {
100
- color: #165dff;
101
- }
102
- }
103
- .tooltip-name-box:hover {
104
- .fuzhi1 {
105
- display: block;
106
- }
107
- }
108
-
109
- &-table-empty {
110
- img {
111
- width: 50px !important;
112
- height: auto;
113
- margin-top: 30px;
114
- margin-bottom: 10px;
115
- }
116
- p {
117
- color: rgba(0, 0, 0, 0.25);
118
- }
119
- }
120
-
121
- &-chart-box {
122
- display: flex;
123
- flex-direction: column;
124
- width: 100%;
125
- &-tooltip {
126
- width: 200px;
127
- margin-bottom: 24px;
128
- color: #67727f;
129
- font-size: 12px;
130
- }
131
- }
132
- }
133
- .event-table-sql-modal {
134
- .ant-modal {
135
- width: 720px !important;
136
- }
137
- .ant-modal-header {
138
- position: relative;
139
- z-index: 1;
140
- height: 82px;
141
- background: transparent;
142
- }
143
- .ant-modal-body {
144
- padding: 0 24px 24px 24px;
145
- }
146
- .ant-modal-close-x {
147
- margin-top: 13px;
148
- margin-right: 8px;
149
- }
150
- img {
151
- width: 100%;
152
- }
153
- .qingchu {
154
- font-weight: 500;
155
- font-size: 22px !important;
156
- }
157
- .modal-bg {
158
- position: absolute;
159
- top: 0;
160
- left: 0;
161
- width: 100%;
162
- height: auto;
163
- }
164
- pre {
165
- margin-bottom: 0;
166
- }
167
- .hljs {
168
- height: 400px;
169
- padding: 16px;
170
- padding-bottom: 0;
171
- background: #fafafb;
172
- border-radius: 8px;
173
- }
174
- .copy-box {
175
- position: absolute;
176
- top: 98px;
177
- right: 40px;
178
- padding: 0 8px;
179
- background: #f2f3f4;
180
- border-radius: 4px;
181
- .fuzhi1 {
182
- margin-right: 8px;
183
- }
184
- }
185
- .copy-box:hover {
186
- color: #165dff;
187
- background: #e8efff;
188
- }
189
- .copy-box:active {
190
- color: #1454e5;
191
- background: #e8efff;
192
- }
193
- }
1
+ .event-mi-table {
2
+ margin-top: 16px;
3
+ &-loading {
4
+ min-height: 300px;
5
+ }
6
+ &-table-header {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+ height: 50px;
11
+ margin-bottom: -1px;
12
+ padding: 0 12px;
13
+ line-height: 50px;
14
+ background: #fafafb;
15
+ border: 1px solid #e6e7ea;
16
+ border-radius: 8px 8px 0 0;
17
+ > :nth-child(2) {
18
+ display: flex;
19
+ > :nth-child(1) {
20
+ margin-right: 16px;
21
+ }
22
+ div {
23
+ height: 32px;
24
+ padding: 0 16px;
25
+ line-height: 32px;
26
+ background: #fff;
27
+ border: 1px solid #f2f3f4;
28
+ border-radius: 4px;
29
+ cursor: pointer;
30
+ .xiazai1 {
31
+ margin-right: 4px;
32
+ font-size: 18px !important;
33
+ vertical-align: -2px;
34
+ }
35
+ }
36
+ div:hover {
37
+ color: #165dff;
38
+ background: #e8efff;
39
+ border: 1px solid #165dff;
40
+ }
41
+ div:active {
42
+ color: #1454e5;
43
+ background: #e8efff;
44
+ border: 1px solid #1454e5;
45
+ }
46
+ }
47
+ &-left {
48
+ display: flex;
49
+ flex: 1;
50
+ flex-direction: row;
51
+ overflow: hidden;
52
+ &-box {
53
+ display: flex;
54
+ flex: 1;
55
+ flex-direction: row;
56
+ overflow: hidden;
57
+ color: #67727f;
58
+ }
59
+ &-content {
60
+ display: flex;
61
+ flex: 1;
62
+ flex-direction: row;
63
+ overflow: hidden;
64
+ color: #67727f;
65
+ > span {
66
+ display: flex;
67
+ flex-direction: row;
68
+ max-width: 33.33%;
69
+ overflow: hidden;
70
+ :first-child {
71
+ overflow: hidden;
72
+ white-space: nowrap;
73
+ text-overflow: ellipsis;
74
+ }
75
+ :nth-child(2) {
76
+ flex: 1;
77
+ white-space: nowrap;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ .ant-table {
84
+ border-radius: 0 0 8px 8px;
85
+ }
86
+ .sourcepanel-table-header {
87
+ overflow: hidden;
88
+ border-radius: 8px 8px 0 0;
89
+ .ant-table {
90
+ max-height: none;
91
+ }
92
+ }
93
+ .ant-pagination {
94
+ margin-top: 24px !important;
95
+ }
96
+ .ant-table
97
+ .ant-table-thead
98
+ .ant-table-cell.ant-table-column-has-sorters
99
+ .ant-table-column-sorters {
100
+ justify-content: flex-end !important;
101
+ }
102
+ .ant-table-cell-with-append {
103
+ padding-left: 20px;
104
+ .ant-table-row-expand-icon {
105
+ position: absolute;
106
+ left: 0;
107
+ margin-top: 0;
108
+ }
109
+ }
110
+ .tooltip-userGroup-box {
111
+ display: flex;
112
+ max-width: 330px;
113
+ overflow: hidden;
114
+ white-space: nowrap;
115
+ text-overflow: ellipsis;
116
+ div {
117
+ max-width: 330px;
118
+ overflow: hidden;
119
+ white-space: nowrap;
120
+ text-overflow: ellipsis;
121
+ }
122
+ }
123
+ .tooltip-name-box {
124
+ display: flex;
125
+ &-market {
126
+ // max-width: calc(100% - 20px);
127
+ margin-right: 8px;
128
+ overflow: hidden;
129
+ white-space: nowrap;
130
+ text-overflow: ellipsis;
131
+ cursor: pointer;
132
+ -webkit-line-clamp: 1;
133
+ -webkit-box-orient: vertical;
134
+ .shoucang {
135
+ color: #fd9f41;
136
+ font-size: 16px !important;
137
+ }
138
+ .notshoucang {
139
+ opacity: 0;
140
+ }
141
+ }
142
+
143
+ .fuzhi1 {
144
+ display: none;
145
+ font-size: 16px !important;
146
+ }
147
+ .fuzhi1:hover {
148
+ color: #165dff;
149
+ }
150
+ }
151
+ .tooltip-name-box:hover {
152
+ .fuzhi1 {
153
+ display: block;
154
+ }
155
+ }
156
+
157
+ &-table-empty {
158
+ img {
159
+ width: 50px !important;
160
+ height: auto;
161
+ margin-top: 30px;
162
+ margin-bottom: 10px;
163
+ }
164
+ p {
165
+ color: rgba(0, 0, 0, 0.25);
166
+ }
167
+ }
168
+
169
+ &-chart-box {
170
+ display: flex;
171
+ flex-direction: column;
172
+ width: 100%;
173
+ &-tooltip {
174
+ width: 200px;
175
+ margin-bottom: 24px;
176
+ color: #67727f;
177
+ font-size: 12px;
178
+ }
179
+ }
180
+ }
181
+ .event-table-sql-modal {
182
+ .ant-modal {
183
+ width: 720px !important;
184
+ }
185
+ .ant-modal-header {
186
+ position: relative;
187
+ z-index: 1;
188
+ height: 82px;
189
+ background: transparent;
190
+ }
191
+ .ant-modal-body {
192
+ padding: 0 24px 24px 24px;
193
+ }
194
+ .ant-modal-close-x {
195
+ margin-top: 13px;
196
+ margin-right: 8px;
197
+ }
198
+ img {
199
+ width: 100%;
200
+ }
201
+ .qingchu {
202
+ font-weight: 500;
203
+ font-size: 22px !important;
204
+ }
205
+ .modal-bg {
206
+ position: absolute;
207
+ top: 0;
208
+ left: 0;
209
+ width: 100%;
210
+ height: auto;
211
+ }
212
+ pre {
213
+ margin-bottom: 0;
214
+ }
215
+ .hljs {
216
+ height: 400px;
217
+ padding: 16px;
218
+ padding-bottom: 0;
219
+ background: #fafafb;
220
+ border-radius: 8px;
221
+ }
222
+ .copy-box {
223
+ position: absolute;
224
+ top: 98px;
225
+ right: 40px;
226
+ padding: 0 8px;
227
+ background: #f2f3f4;
228
+ border-radius: 4px;
229
+ .fuzhi1 {
230
+ margin-right: 8px;
231
+ }
232
+ }
233
+ .copy-box:hover {
234
+ color: #165dff;
235
+ background: #e8efff;
236
+ }
237
+ .copy-box:active {
238
+ color: #1454e5;
239
+ background: #e8efff;
240
+ }
241
+ }
@@ -6,6 +6,5 @@ export interface EventTableProps {
6
6
  showList: string[];
7
7
  isOverview?: boolean;
8
8
  changeShowByName: (name: string) => void;
9
- changeShow: (names: string[]) => void;
10
9
  onSelectEvent?: (id: number, name: string) => void;
11
10
  }
@@ -1,5 +1,10 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import './styles/index.less';
3
3
  import { TopBarProps } from './types';
4
+ export interface platItemProp {
5
+ key: number;
6
+ value: string;
7
+ icon?: ReactNode;
8
+ }
4
9
  declare const TopBar: React.FC<TopBarProps>;
5
10
  export default TopBar;
@@ -12,14 +12,16 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { Button } from 'antd';
14
14
  import React, { useContext, useState, useEffect } from 'react';
15
- import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/business-lib';
15
+ import { BizAddToPanel, BizAddToScene, BizGlobalDataContext, BizPlatformSelector, IconFont } from '@zgfe/business-lib';
16
16
  import './styles/index.less';
17
17
  import { EventContext } from '../../types';
18
- import { chartTypes, platformOption } from '../../constants/fields';
18
+ import { chartTypes } from '../../constants/fields';
19
19
  import { getWarningId } from '../../utils/formData';
20
20
  var classPrefix = 'modules-event-topbar';
21
21
  var TopBar = function TopBar(props) {
22
22
  var _useContext = useContext(EventContext),
23
+ currentApp = _useContext.currentApp,
24
+ showListHome = _useContext.showListHome,
23
25
  panelId = _useContext.panelId,
24
26
  afterEditTarget = _useContext.afterEditTarget,
25
27
  loading = _useContext.loading,
@@ -35,11 +37,11 @@ var TopBar = function TopBar(props) {
35
37
  showScene = _useState4[0],
36
38
  setShowScene = _useState4[1];
37
39
  var _useContext2 = useContext(BizGlobalDataContext),
38
- currentApp = _useContext2.currentApp,
39
40
  eventGroupList = _useContext2.eventGroupList,
40
- authority = _useContext2.authority;
41
+ authority = _useContext2.authority,
42
+ router = _useContext2.router,
43
+ routes = _useContext2.routes;
41
44
  var searchData = props.searchData,
42
- showList = props.showList,
43
45
  platformChange = props.platformChange,
44
46
  eventData = props.eventData,
45
47
  onClickGenerateReport = props.onClickGenerateReport,
@@ -48,14 +50,14 @@ var TopBar = function TopBar(props) {
48
50
  _useState6 = _slicedToArray(_useState5, 2),
49
51
  options = _useState6[0],
50
52
  setOptions = _useState6[1];
51
- var _useState7 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
53
+ var _useState7 = useState(-1),
52
54
  _useState8 = _slicedToArray(_useState7, 2),
53
- selectPlatform = _useState8[0],
54
- setselectPlatform = _useState8[1];
55
- var _useState9 = useState(-1),
55
+ warningId = _useState8[0],
56
+ setWarningId = _useState8[1];
57
+ var _useState9 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
56
58
  _useState10 = _slicedToArray(_useState9, 2),
57
- warningId = _useState10[0],
58
- setWarningId = _useState10[1];
59
+ selectPlatform = _useState10[0],
60
+ setselectPlatform = _useState10[1];
59
61
  useEffect(function () {
60
62
  setWarningId(getWarningId(searchData, eventData, eventGroupList));
61
63
  }, [searchData, eventData, eventGroupList]);
@@ -89,6 +91,24 @@ var TopBar = function TopBar(props) {
89
91
  };
90
92
  return /*#__PURE__*/React.createElement("div", {
91
93
  className: classPrefix
94
+ }, /*#__PURE__*/React.createElement("div", {
95
+ className: "".concat(classPrefix, "-title")
96
+ }, !panelId && enableGenerateReport && /*#__PURE__*/React.createElement(IconFont, {
97
+ type: "fanhuiicon",
98
+ onClick: function onClick() {
99
+ if (!router) return;
100
+ var params = new URLSearchParams(window.location.search);
101
+ var _reportId = params.get('reportId');
102
+ router.push({
103
+ name: routes.report,
104
+ query: {
105
+ reportId: _reportId,
106
+ isEdit: 1
107
+ }
108
+ });
109
+ }
110
+ }, "\u8FD4\u56DE"), /*#__PURE__*/React.createElement("span", null, "\u4E8B\u4EF6\u5206\u6790")), /*#__PURE__*/React.createElement("div", {
111
+ className: "".concat(classPrefix, "-right")
92
112
  }, !panelId && /*#__PURE__*/React.createElement("div", {
93
113
  className: "".concat(classPrefix, "-panel")
94
114
  }, /*#__PURE__*/React.createElement(Button, {
@@ -104,7 +124,7 @@ var TopBar = function TopBar(props) {
104
124
  module: 'event'
105
125
  }, searchData),
106
126
  styleOptions: options,
107
- showList: (searchData === null || searchData === void 0 ? void 0 : searchData.chartType) !== 'map' ? showList : [],
127
+ showList: (searchData === null || searchData === void 0 ? void 0 : searchData.chartType) !== 'map' ? showListHome : [],
108
128
  onCancel: function onCancel() {
109
129
  return closeHandle('panel');
110
130
  },
@@ -143,15 +163,12 @@ var TopBar = function TopBar(props) {
143
163
  }
144
164
  }, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"), /*#__PURE__*/React.createElement("div", {
145
165
  className: "".concat(classPrefix, "-platform")
146
- }, platformOption.map(function (item) {
147
- return /*#__PURE__*/React.createElement("div", {
148
- className: "".concat(selectPlatform === item.key ? 'active' : ''),
149
- key: item.key,
150
- onClick: function onClick() {
151
- setselectPlatform(item.key);
152
- platformChange(item.key);
153
- }
154
- }, item.value);
155
- })));
166
+ }, /*#__PURE__*/React.createElement(BizPlatformSelector, {
167
+ value: selectPlatform,
168
+ onChange: function onChange(val) {
169
+ setselectPlatform(val.key);
170
+ platformChange(val.key);
171
+ }
172
+ }))));
156
173
  };
157
174
  export default TopBar;