@zgfe/modules-dm 1.0.2-dm.9 → 1.0.2-y.1

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,16 +15,18 @@ import { Tabs } from 'antd';
15
15
  import React, { useState, useContext, useEffect } from 'react';
16
16
  import request from '../../utils/ajax';
17
17
  import apis from '../../constants/api';
18
+ import { getAppID } from '../../utils';
18
19
  import EventList from './collectionEventList';
19
- import UserAttributeList from './collectionAttributeList';
20
+ import CollectionAttributeList from './collectionAttributeList';
20
21
 
21
22
  var DataCollection = function DataCollection(props) {
22
- var classPrefix = 'data-collection';
23
-
24
23
  var _useContext = useContext(BizGlobalDataContext),
25
24
  currentApp = _useContext.currentApp,
26
- isDemo = _useContext.isDemo; // const { updateEventMetas } = props;
25
+ isDemo = _useContext.isDemo;
26
+
27
+ var classPrefix = 'data-collection'; // const { updateEventMetas } = props;
27
28
 
29
+ console.log('①埋点方案', currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, getAppID(currentApp));
28
30
 
29
31
  var _useState = useState(1),
30
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -45,7 +47,7 @@ var DataCollection = function DataCollection(props) {
45
47
  request(apis.queryControlSwitch, {
46
48
  method: 'get',
47
49
  params: {
48
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
50
+ appId: getAppID(currentApp)
49
51
  }
50
52
  }).then(function (res) {
51
53
  setIsOpen(res.data.isOpen);
@@ -62,7 +64,7 @@ var DataCollection = function DataCollection(props) {
62
64
  request(apis.queryPlan, {
63
65
  method: 'post',
64
66
  data: {
65
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
67
+ appId: getAppID(currentApp)
66
68
  }
67
69
  }).then(function (res) {
68
70
  setqueryPlanData(res.data);
@@ -88,7 +90,7 @@ var DataCollection = function DataCollection(props) {
88
90
  })), listTab == 1 && /*#__PURE__*/React.createElement(EventList, {
89
91
  isOpen: isOpen,
90
92
  queryPlanData: queryPlanData
91
- }), listTab == 2 && /*#__PURE__*/React.createElement(UserAttributeList, {
93
+ }), listTab == 2 && /*#__PURE__*/React.createElement(CollectionAttributeList, {
92
94
  isOpen: isOpen,
93
95
  queryPlanData: queryPlanData,
94
96
  source: "user"
@@ -1,283 +1,321 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
  .data-collection {
3
3
  position: relative;
4
- width: calc(100% - 264px);
5
4
  height: 100%;
6
- margin-top: 16px;
5
+ margin-right: 24px;
7
6
  padding: 24px;
7
+ padding-top: 10px;
8
8
  background: #fff;
9
+ border-radius: 8px;
9
10
  .loading {
10
11
  position: fixed;
11
12
  top: 70%;
12
13
  left: 55%;
13
14
  }
14
- .attr-list,
15
- .event-list {
16
- position: relative;
17
- min-height: 550px;
18
- &-back {
19
- margin-bottom: 10px;
20
- cursor: pointer;
21
- user-select: none;
15
+ .ant-tabs-tab + .ant-tabs-tab {
16
+ margin: 0 0 0 24px;
17
+ }
18
+ .creact-group {
19
+ .ant-modal-body {
20
+ padding: 3px 20px 20px 20px;
22
21
  }
23
- .hidden-box {
24
- display: none;
22
+ }
23
+ }
24
+
25
+ .attr-list,
26
+ .event-list {
27
+ position: relative;
28
+ min-height: 550px;
29
+ &-back {
30
+ margin-bottom: 10px;
31
+ cursor: pointer;
32
+ user-select: none;
33
+ }
34
+ .hidden-box {
35
+ display: none;
36
+ }
37
+ .error-row {
38
+ color: #fb5547;
39
+ }
40
+ .fuzhi {
41
+ display: none;
42
+ margin-left: 10px;
43
+ color: #666;
44
+ font-size: 16px !important;
45
+ &:hover {
46
+ color: @primary-color;
47
+ }
48
+ }
49
+ }
50
+
51
+ .event-list {
52
+ &-top-box {
53
+ position: relative;
54
+ display: flex;
55
+ margin-bottom: 17px;
56
+ .top-select {
57
+ width: 264px;
58
+ margin-right: 12px;
25
59
  }
26
- .error-row {
27
- color: #fb5547;
60
+ .top-input {
61
+ width: 264px;
62
+ margin-right: 12px;
63
+ .ant-input-prefix {
64
+ margin-right: 20px;
65
+ transform: scale(1.5);
66
+ }
28
67
  }
29
- .fuzhi {
30
- display: none;
31
- margin-left: 10px;
32
- color: #666;
33
- font-size: 16px !important;
34
- &:hover {
68
+ .top-total {
69
+ line-height: 32px;
70
+ span {
71
+ margin: 0 4px;
35
72
  color: @primary-color;
73
+ font-weight: bold;
36
74
  }
37
75
  }
76
+ .top-button {
77
+ position: absolute;
78
+ top: 0;
79
+ right: 0;
80
+ line-height: 100%;
81
+ }
38
82
  }
39
- .event-list {
40
- &-top-box {
41
- position: relative;
42
- display: flex;
43
- margin-bottom: 17px;
44
- .top-select {
45
- width: 264px;
46
- margin-right: 12px;
47
- }
48
- .top-input {
49
- width: 264px;
50
- margin-right: 12px;
51
- .ant-input-prefix {
52
- margin-right: 20px;
53
- transform: scale(1.5);
83
+ .table-plus {
84
+ &-table {
85
+ .ant-table {
86
+ .ant-table-tbody {
87
+ // height: 500px;
88
+ }
89
+ table {
90
+ border-collapse: collapse;
54
91
  }
55
92
  }
56
- .top-total {
57
- line-height: 32px;
58
- span {
59
- color: @primary-color;
93
+ .ant-table-cell-row-hover {
94
+ .bsicon {
95
+ display: inline-block !important;
60
96
  }
61
97
  }
62
- .top-button {
63
- position: absolute;
64
- top: 0;
65
- right: 0;
66
- line-height: 100%;
98
+ .alias_name_popover {
99
+ width: 200px;
100
+ word-break: break-all;
101
+ background: red;
67
102
  }
68
- }
69
- .table-plus {
70
- &-table {
71
- .ant-table {
72
- .ant-table-tbody {
73
- // height: 500px;
74
- }
75
- table {
76
- border-collapse: collapse;
77
- }
103
+ .alias_name {
104
+ background: #fff !important;
105
+ border: none;
106
+ cursor: pointer;
107
+ }
108
+ .ant-input:focus,
109
+ .ant-input-focused {
110
+ background-color: #fff !important;
111
+ border-bottom: 1px solid @primary-color;
112
+ border-radius: 0 !important;
113
+ box-shadow: none !important;
114
+ }
115
+ .group-row {
116
+ border-top: 12px solid #f5f5f5;
117
+ .ant-table-cell-fix-left {
118
+ left: 0px;
119
+ display: block;
120
+ width: 500px;
121
+ background: #fff;
78
122
  }
79
- .ant-table-cell-row-hover {
80
- .bsicon {
81
- display: inline-block !important;
82
- }
123
+ .ant-table-cell-fix-left-first::after,
124
+ .ant-table-cell-fix-left-last::after {
125
+ box-shadow: none;
126
+ }
127
+ td {
128
+ padding: 6px 16px;
83
129
  }
84
- .alias_name_popover {
85
- width: 200px;
86
- word-break: break-all;
87
- background: red;
130
+ :last-child {
131
+ padding: 0;
88
132
  }
89
- .alias_name {
90
- background: #fff !important;
133
+ td:not(:first-child, :last-child) > * {
134
+ display: none;
135
+ }
136
+ }
137
+ .group-box {
138
+ display: flex;
139
+ width: 800px;
140
+ line-height: 30px;
141
+ .ant-input {
142
+ width: 150px;
91
143
  border: none;
92
144
  }
93
- .ant-input:focus,
94
- .ant-input-focused {
95
- background-color: #fff !important;
96
- border-bottom: 1px solid @primary-color;
97
- border-radius: 0 !important;
98
- box-shadow: none !important;
145
+ .bsicon {
146
+ margin-right: 4px;
147
+ font-size: 18px !important;
99
148
  }
100
- .group-row {
101
- border-top: 12px solid #f5f5f5;
102
- .ant-table-cell-fix-left {
103
- left: 0px;
104
- display: block;
105
- width: 500px;
106
- background: #fff;
107
- }
108
- .ant-table-cell-fix-left-first::after,
109
- .ant-table-cell-fix-left-last::after {
110
- box-shadow: none;
111
- }
112
- td {
113
- padding: 6px 16px;
114
- }
115
- :last-child {
116
- padding: 0;
117
- }
118
- td:not(:first-child, :last-child) > * {
119
- display: none;
120
- }
149
+ // .group-text {
150
+ // display: -webkit-box;
151
+ // width: 120px;
152
+ // overflow: hidden;
153
+ // -webkit-box-orient: vertical;
154
+ // -webkit-line-clamp: 1;
155
+ // }
156
+ .group-handle {
157
+ margin-left: 30px;
158
+ cursor: pointer;
159
+ user-select: none;
121
160
  }
122
- .group-box {
123
- display: flex;
124
- width: 800px;
125
- line-height: 30px;
126
- .ant-input {
127
- width: 150px;
128
- border: none;
129
- }
130
- .bsicon {
131
- margin-right: 4px;
132
- font-size: 18px !important;
133
- }
134
- // .group-text {
135
- // display: -webkit-box;
136
- // width: 120px;
137
- // overflow: hidden;
138
- // -webkit-box-orient: vertical;
139
- // -webkit-line-clamp: 1;
140
- // }
141
- .group-handle {
142
- margin-left: 30px;
143
- cursor: pointer;
144
- user-select: none;
145
- }
161
+ }
162
+ .edit-del {
163
+ .bsicon {
164
+ margin-left: 15px;
165
+ font-size: 16px !important;
166
+ cursor: pointer;
146
167
  }
147
- .edit-del {
148
- .bsicon {
149
- margin-left: 15px;
150
- font-size: 16px !important;
151
- cursor: pointer;
152
- }
153
- :first-child:hover {
154
- color: @primary-color;
155
- }
156
- :last-child:hover {
157
- color: red;
158
- }
168
+ :first-child:hover {
169
+ color: @primary-color;
159
170
  }
160
- .event_attrs {
161
- .bsicon {
162
- margin-left: 12px;
163
- font-size: 16px !important;
164
- &:hover {
165
- color: @primary-color;
166
- }
167
- }
171
+ :last-child:hover {
172
+ color: red;
168
173
  }
169
- .event_name {
170
- display: flex;
171
- .event_name-text {
172
- display: -webkit-box;
173
- width: 120px;
174
- overflow: hidden;
175
- -webkit-box-orient: vertical;
176
- -webkit-line-clamp: 1;
177
- }
178
- .copy-text {
179
- display: none;
180
- margin-left: 10px;
181
- font-size: 16px !important;
182
- cursor: pointer;
183
- }
184
- .copy-text:hover {
174
+ }
175
+ .select-style {
176
+ width: 126px;
177
+ .ant-select-selection-item {
178
+ color: #021429;
179
+ font-weight: 500;
180
+ }
181
+ }
182
+ .event_attrs {
183
+ .bsicon {
184
+ margin-left: 12px;
185
+ font-size: 16px !important;
186
+ &:hover {
185
187
  color: @primary-color;
186
188
  }
187
- .collect-icon,
188
- .collect-icon-active {
189
- margin: 0 4px;
190
- font-size: 16px !important;
191
- cursor: pointer;
192
- }
193
- .collect-icon {
194
- color: #999;
195
- opacity: 0;
196
- }
197
- .collect-icon:hover {
198
- color: #f2d074;
199
- }
200
- .collect-icon-active {
201
- color: #fd9f41;
202
- }
203
- .ant-checkbox-wrapper {
204
- align-items: center;
205
- margin-top: -6px;
206
- }
207
189
  }
208
- .ant-table-row:hover {
209
- .collect-icon {
210
- opacity: 1;
211
- }
212
- .copy-text {
213
- display: block;
214
- }
190
+ }
191
+ .event_name {
192
+ display: flex;
193
+ cursor: pointer;
194
+ .event_name-text {
195
+ display: -webkit-box;
196
+ width: 120px;
197
+ overflow: hidden;
198
+ -webkit-box-orient: vertical;
199
+ -webkit-line-clamp: 1;
215
200
  }
216
- .set {
201
+ .copy-text {
202
+ display: none;
203
+ margin-left: 10px;
204
+ font-size: 16px !important;
205
+ }
206
+ .copy-text:hover {
217
207
  color: @primary-color;
218
- text-align: center;
219
- cursor: pointer;
220
- user-select: none;
221
208
  }
222
- .set-error {
223
- color: #86909c;
209
+ .collect-icon,
210
+ .collect-icon-active {
211
+ margin: 0 4px;
212
+ font-size: 16px !important;
213
+ }
214
+ .collect-icon {
215
+ color: #999;
216
+ opacity: 0;
217
+ }
218
+ .collect-icon:hover {
219
+ color: #f2d074;
220
+ }
221
+ .collect-icon-active {
222
+ color: #fd9f41;
223
+ }
224
+ .ant-checkbox-wrapper {
225
+ align-items: center;
226
+ margin-top: -6px;
224
227
  }
225
228
  }
226
- }
227
- }
228
- .attr-list {
229
- .attr-name {
230
- display: flex;
231
- .attr-name-text {
232
- display: -webkit-box;
233
- width: 120px;
234
- overflow: hidden;
235
- -webkit-box-orient: vertical;
236
- -webkit-line-clamp: 1;
229
+ .ant-table-row:hover {
230
+ .collect-icon {
231
+ opacity: 1;
232
+ }
233
+ .copy-text {
234
+ display: block;
235
+ }
237
236
  }
238
- .tishiicon {
239
- margin-right: 6px;
237
+ .set {
238
+ color: @primary-color;
239
+ text-align: center;
240
+ cursor: pointer;
241
+ user-select: none;
240
242
  }
241
- &:hover {
242
- .fuzhi {
243
- display: inline-block;
244
- cursor: pointer;
245
- }
243
+ .set-error {
244
+ color: #86909c;
246
245
  }
247
246
  }
248
- .alias_name {
249
- background: #fff !important;
250
- border: none;
251
- cursor: pointer;
247
+ }
248
+ }
249
+
250
+ .attr-list {
251
+ .attr-name {
252
+ display: flex;
253
+ .attr-name-text {
254
+ display: -webkit-box;
255
+ width: 120px;
256
+ overflow: hidden;
257
+ -webkit-box-orient: vertical;
258
+ -webkit-line-clamp: 1;
252
259
  }
253
- .ant-input:focus,
254
- .ant-input-focused {
255
- background-color: #fff !important;
256
- border-bottom: 1px solid @primary-color;
257
- border-radius: 0 !important;
258
- box-shadow: none !important;
260
+ .tishiicon {
261
+ margin-right: 6px;
259
262
  }
260
- .attr_alias_name {
261
- cursor: pointer;
262
- user-select: none;
263
- &:hover {
264
- color: @primary-color;
263
+ &:hover {
264
+ .fuzhi {
265
+ display: inline-block;
266
+ cursor: pointer;
265
267
  }
266
268
  }
267
- .button-box {
268
- display: flex;
269
- margin-bottom: 10px;
270
- .ant-btn {
271
- margin-right: 20px;
272
- }
273
- .bsicon {
274
- margin-right: 6px;
275
- }
269
+ }
270
+ .alias_name {
271
+ background: #fff !important;
272
+ border: none;
273
+ cursor: pointer;
274
+ }
275
+ .ant-input:focus,
276
+ .ant-input-focused {
277
+ background-color: #fff !important;
278
+ border-bottom: 1px solid @primary-color;
279
+ border-radius: 0 !important;
280
+ box-shadow: none !important;
281
+ }
282
+ .attr_alias_name {
283
+ cursor: pointer;
284
+ user-select: none;
285
+ &:hover {
286
+ color: @primary-color;
287
+ }
288
+ }
289
+ .button-box {
290
+ display: flex;
291
+ margin-top: -24px;
292
+ margin-bottom: 14px;
293
+ .ant-btn {
294
+ margin-right: 20px;
276
295
  }
277
- .clearData {
278
- text-align: right;
279
- cursor: pointer;
280
- user-select: none;
296
+ .bsicon {
297
+ margin-right: 6px;
281
298
  }
282
299
  }
300
+ .clearData {
301
+ position: absolute;
302
+ top: 75px;
303
+ right: 26px;
304
+ text-align: right;
305
+ cursor: pointer;
306
+ user-select: none;
307
+ }
308
+ }
309
+
310
+ .event-list-drawer {
311
+ .ant-drawer-header-title {
312
+ height: 20px;
313
+ .ant-drawer-close {
314
+ position: absolute;
315
+ right: 6px;
316
+ }
317
+ }
318
+ .ant-drawer-mask {
319
+ background: rgba(0, 0, 0, 0.8);
320
+ }
283
321
  }
@@ -29,6 +29,9 @@ interface TablePlusType {
29
29
  queryPlanData: queryPlanType;
30
30
  eventAttrDataHandle: Function;
31
31
  loading: boolean;
32
+ pageSizeChange?: Function;
33
+ total: number;
34
+ groupData: DataType[];
32
35
  }
33
36
  declare const TablePlus: React.FC<TablePlusType>;
34
37
  export default TablePlus;