@zgfe/modules-dm 1.0.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.
- package/README.md +37 -0
- package/es/components/demo.d.ts +8 -0
- package/es/components/demo.js +23 -0
- package/es/constants/api.d.ts +27 -0
- package/es/constants/api.js +58 -0
- package/es/index.d.ts +5 -0
- package/es/index.js +5 -0
- package/es/modules/dataCollection/collectionAttributeList.d.ts +20 -0
- package/es/modules/dataCollection/collectionAttributeList.js +458 -0
- package/es/modules/dataCollection/collectionEventList.d.ts +13 -0
- package/es/modules/dataCollection/collectionEventList.js +317 -0
- package/es/modules/dataCollection/demo/index.d.ts +2 -0
- package/es/modules/dataCollection/demo/index.js +6 -0
- package/es/modules/dataCollection/index.d.ts +3 -0
- package/es/modules/dataCollection/index.js +97 -0
- package/es/modules/dataCollection/styles/index.less +249 -0
- package/es/modules/dataCollection/tablePlus.d.ts +34 -0
- package/es/modules/dataCollection/tablePlus.js +598 -0
- package/es/modules/dataManage/demo/index.d.ts +2 -0
- package/es/modules/dataManage/demo/index.js +6 -0
- package/es/modules/dataManage/index.d.ts +4 -0
- package/es/modules/dataManage/index.js +58 -0
- package/es/modules/dataManage/styles/index.less +26 -0
- package/es/modules/dataPlan/addEventOrUser.d.ts +34 -0
- package/es/modules/dataPlan/addEventOrUser.js +280 -0
- package/es/modules/dataPlan/addPlan.d.ts +10 -0
- package/es/modules/dataPlan/addPlan.js +644 -0
- package/es/modules/dataPlan/demo/index.d.ts +2 -0
- package/es/modules/dataPlan/demo/index.js +6 -0
- package/es/modules/dataPlan/eventList.d.ts +23 -0
- package/es/modules/dataPlan/eventList.js +21 -0
- package/es/modules/dataPlan/index.d.ts +4 -0
- package/es/modules/dataPlan/index.js +233 -0
- package/es/modules/dataPlan/search.d.ts +11 -0
- package/es/modules/dataPlan/search.js +42 -0
- package/es/modules/dataPlan/styles/index.less +269 -0
- package/es/modules/dataPlan/tablePlus.d.ts +22 -0
- package/es/modules/dataPlan/tablePlus.js +106 -0
- package/es/modules/dataPlan/userAttributeList.d.ts +19 -0
- package/es/modules/dataPlan/userAttributeList.js +77 -0
- package/es/types/flow.d.ts +395 -0
- package/es/types/flow.js +77 -0
- package/es/types.d.ts +412 -0
- package/es/types.js +106 -0
- package/es/utils/ajax.d.ts +3 -0
- package/es/utils/ajax.js +7 -0
- package/package.json +60 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
14
|
+
import { Input, Button, Select, Modal, message } from 'antd';
|
|
15
|
+
import request from '../../utils/ajax';
|
|
16
|
+
import apis from '../../constants/api';
|
|
17
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
18
|
+
import './styles/index.less';
|
|
19
|
+
import TablePlus from './tablePlus';
|
|
20
|
+
import CollectionAttributeList from './collectionAttributeList';
|
|
21
|
+
|
|
22
|
+
var CollectionEventList = function CollectionEventList(props) {
|
|
23
|
+
var classPrefix = 'event-list';
|
|
24
|
+
|
|
25
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
26
|
+
currentApp = _useContext.currentApp,
|
|
27
|
+
isDemo = _useContext.isDemo;
|
|
28
|
+
|
|
29
|
+
var _useState = useState(0),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
total = _useState2[0],
|
|
32
|
+
setTotal = _useState2[1];
|
|
33
|
+
|
|
34
|
+
var _useState3 = useState(0),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
totalBasics = _useState4[0],
|
|
37
|
+
setTotalBasics = _useState4[1]; // 加载中
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _useState5 = useState(true),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
loading = _useState6[0],
|
|
43
|
+
setLoading = _useState6[1]; // 渲染数据
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
var _useState7 = useState([]),
|
|
47
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
|
+
tableHandleData = _useState8[0],
|
|
49
|
+
setTableHandleData = _useState8[1]; // 原数据
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
var _useState9 = useState([]),
|
|
53
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
54
|
+
tableHandleDataBasics = _useState10[0],
|
|
55
|
+
setTableHandleDataBasics = _useState10[1]; // 分组select数据
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _useState11 = useState([]),
|
|
59
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
60
|
+
groupOptions = _useState12[0],
|
|
61
|
+
setgroupOptions = _useState12[1]; // 分组元素有任意一个收藏,筛选收藏时保留分组标题
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var markTypeHandle = function markTypeHandle(item) {
|
|
65
|
+
var _markTypeFlag = 0;
|
|
66
|
+
item.eventList.map(function (_item) {
|
|
67
|
+
_item.mark_type == 1 ? _markTypeFlag = 1 : null;
|
|
68
|
+
});
|
|
69
|
+
return _markTypeFlag;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var dataFinish = function dataFinish(data) {
|
|
73
|
+
var _tempArr = [];
|
|
74
|
+
var _tempGroupOptions = [{
|
|
75
|
+
value: -999,
|
|
76
|
+
label: '所有分组'
|
|
77
|
+
}];
|
|
78
|
+
var _tempTotal = 0;
|
|
79
|
+
data.map(function (item, index) {
|
|
80
|
+
_tempArr.push({
|
|
81
|
+
key: index,
|
|
82
|
+
groupId: item.groupId,
|
|
83
|
+
groupName: item.groupName,
|
|
84
|
+
event_name: '',
|
|
85
|
+
alias_name: '',
|
|
86
|
+
insert_time: '',
|
|
87
|
+
last_insert_time: '',
|
|
88
|
+
event_hidden: 0,
|
|
89
|
+
is_stop: 0,
|
|
90
|
+
event_attrs: [],
|
|
91
|
+
event_id: index,
|
|
92
|
+
is_delete: 0,
|
|
93
|
+
mark_type: markTypeHandle(item)
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
_tempGroupOptions.push({
|
|
97
|
+
value: item.groupId,
|
|
98
|
+
label: item.groupName == null ? '未分组' : item.groupName
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
item.eventList.map(function (_item, _index) {
|
|
102
|
+
_item._groupId = item.groupId;
|
|
103
|
+
_item.key = index + '-' + _index;
|
|
104
|
+
|
|
105
|
+
if (_item.is_delete == 0) {
|
|
106
|
+
_tempArr.push(_item);
|
|
107
|
+
|
|
108
|
+
_tempTotal++;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
setTotal(_tempTotal);
|
|
113
|
+
setTotalBasics(_tempTotal);
|
|
114
|
+
setgroupOptions(_tempGroupOptions);
|
|
115
|
+
setTableHandleData(_tempArr);
|
|
116
|
+
setTableHandleDataBasics(_tempArr);
|
|
117
|
+
setLoading(false);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
var queryList = function queryList() {
|
|
121
|
+
request(apis.queryCollectionEventList, {
|
|
122
|
+
method: 'post',
|
|
123
|
+
params: {
|
|
124
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
125
|
+
platform: 0,
|
|
126
|
+
is_all: true
|
|
127
|
+
}
|
|
128
|
+
}).then(function (res) {
|
|
129
|
+
if (!res) throw new Error();
|
|
130
|
+
dataFinish(res.data);
|
|
131
|
+
}).catch(function (err) {
|
|
132
|
+
console.error('查询列表失败', err);
|
|
133
|
+
}).finally(function () {});
|
|
134
|
+
}; // 初始化列表
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
useEffect(function () {
|
|
138
|
+
queryList();
|
|
139
|
+
}, []); // 控制修改分组名弹框 显示隐藏
|
|
140
|
+
|
|
141
|
+
var _useState13 = useState(false),
|
|
142
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
143
|
+
eventNameShow = _useState14[0],
|
|
144
|
+
setEventNameShow = _useState14[1];
|
|
145
|
+
|
|
146
|
+
var _useState15 = useState(''),
|
|
147
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
148
|
+
eventNameInput = _useState16[0],
|
|
149
|
+
setEventNameInput = _useState16[1]; // 创建事件分组
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
var createEventGroup = function createEventGroup() {
|
|
153
|
+
request(apis.upsertEventGroup, {
|
|
154
|
+
method: 'post',
|
|
155
|
+
data: {
|
|
156
|
+
eventGroupName: eventNameInput,
|
|
157
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
158
|
+
platform: 0
|
|
159
|
+
}
|
|
160
|
+
}).then(function (res) {
|
|
161
|
+
if (res) {
|
|
162
|
+
message.success('创建成功');
|
|
163
|
+
setEventNameShow(false);
|
|
164
|
+
queryList();
|
|
165
|
+
}
|
|
166
|
+
}).catch(function (err) {
|
|
167
|
+
message.success('创建失败');
|
|
168
|
+
}).finally(function () {});
|
|
169
|
+
}; // 筛选:显示状态 | 采集状态
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
var eventActiveFilter = function eventActiveFilter(e, type) {
|
|
173
|
+
filterHandlePublic(e == -1, type, e);
|
|
174
|
+
}; // 筛选分组
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
var handleSelectChange = function handleSelectChange(e) {
|
|
178
|
+
filterHandlePublic(e == -999, 'groupId', e);
|
|
179
|
+
}; // 筛选事件
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
var eventNameChange = function eventNameChange(e) {
|
|
183
|
+
var _value = e.currentTarget.value;
|
|
184
|
+
filterHandlePublic(_value == '', 'event_name', _value);
|
|
185
|
+
}; // 筛选收藏
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
var markTypeFilter = function markTypeFilter(markActive) {
|
|
189
|
+
filterHandlePublic(!markActive, 'mark_type');
|
|
190
|
+
}; // 处理各种筛选数据
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
var filterHandlePublic = function filterHandlePublic(filterFlag, type, value) {
|
|
194
|
+
if (filterFlag) {
|
|
195
|
+
// 取消筛选
|
|
196
|
+
setTotal(totalBasics);
|
|
197
|
+
setTableHandleData(tableHandleDataBasics);
|
|
198
|
+
} else {
|
|
199
|
+
// 执行筛选
|
|
200
|
+
var _tableHandleData = [];
|
|
201
|
+
var _total = 0,
|
|
202
|
+
totalFlag = false; // 判断不同type的筛选条件
|
|
203
|
+
|
|
204
|
+
var _judgeFun = function _judgeFun(item) {
|
|
205
|
+
switch (type) {
|
|
206
|
+
case 'mark_type':
|
|
207
|
+
return item.mark_type == 1;
|
|
208
|
+
|
|
209
|
+
case 'event_name':
|
|
210
|
+
return item.event_name.indexOf(value) != -1;
|
|
211
|
+
|
|
212
|
+
case 'groupId':
|
|
213
|
+
return item._groupId == value || item.groupId == value;
|
|
214
|
+
|
|
215
|
+
case 'event_hidden':
|
|
216
|
+
return item.event_hidden == value || item.groupId != undefined;
|
|
217
|
+
|
|
218
|
+
case 'is_stop':
|
|
219
|
+
return item.is_stop == value || item.groupId != undefined;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
tableHandleDataBasics.map(function (item) {
|
|
224
|
+
if (_judgeFun(item)) {
|
|
225
|
+
_tableHandleData.push(item);
|
|
226
|
+
|
|
227
|
+
if (type == 'mark_type' || type == 'event_hidden' || type == 'is_stop') {
|
|
228
|
+
totalFlag = true;
|
|
229
|
+
item.groupId == undefined ? _total++ : null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}); // 不同type的total设置
|
|
233
|
+
|
|
234
|
+
setTotal(totalFlag ? _total : type == 'groupId' ? _tableHandleData.length - 1 : _tableHandleData.length);
|
|
235
|
+
setTableHandleData(_tableHandleData);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
var _useState17 = useState(false),
|
|
240
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
241
|
+
eventAttrListShow = _useState18[0],
|
|
242
|
+
setEventAttrListShow = _useState18[1];
|
|
243
|
+
|
|
244
|
+
var _useState19 = useState(),
|
|
245
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
246
|
+
eventAttrsData = _useState20[0],
|
|
247
|
+
setEventAttrsData = _useState20[1];
|
|
248
|
+
|
|
249
|
+
var eventAttrDataHandle = function eventAttrDataHandle(data) {
|
|
250
|
+
setEventAttrsData(data);
|
|
251
|
+
setEventAttrListShow(true);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
255
|
+
className: classPrefix
|
|
256
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
257
|
+
className: eventAttrListShow ? 'hidden-box' : ''
|
|
258
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
259
|
+
className: "".concat(classPrefix, "-top-box")
|
|
260
|
+
}, groupOptions.length > 0 && /*#__PURE__*/React.createElement(Select, {
|
|
261
|
+
defaultValue: -999,
|
|
262
|
+
className: "top-select",
|
|
263
|
+
onChange: handleSelectChange,
|
|
264
|
+
options: groupOptions
|
|
265
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
266
|
+
className: "top-input",
|
|
267
|
+
onChange: eventNameChange,
|
|
268
|
+
placeholder: "\u641C\u7D22\u4E8B\u4EF6\u540D\u79F0",
|
|
269
|
+
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
270
|
+
type: "sousuo"
|
|
271
|
+
})
|
|
272
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
273
|
+
className: "top-total"
|
|
274
|
+
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement(Button, {
|
|
275
|
+
className: "top-button",
|
|
276
|
+
type: "primary",
|
|
277
|
+
shape: "round",
|
|
278
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
279
|
+
style: {
|
|
280
|
+
marginRight: '5px'
|
|
281
|
+
},
|
|
282
|
+
type: "tianjia"
|
|
283
|
+
}),
|
|
284
|
+
onClick: function onClick() {
|
|
285
|
+
return setEventNameShow(true);
|
|
286
|
+
}
|
|
287
|
+
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4")), /*#__PURE__*/React.createElement(TablePlus, {
|
|
288
|
+
loading: loading,
|
|
289
|
+
tableHandleData: tableHandleData,
|
|
290
|
+
Refresh: queryList,
|
|
291
|
+
eventActiveFilter: eventActiveFilter,
|
|
292
|
+
markTypeFilter: markTypeFilter,
|
|
293
|
+
isOpen: props.isOpen,
|
|
294
|
+
queryPlanData: props.queryPlanData,
|
|
295
|
+
eventAttrDataHandle: eventAttrDataHandle
|
|
296
|
+
})), eventAttrListShow && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
297
|
+
isOpen: props.isOpen,
|
|
298
|
+
queryPlanData: props.queryPlanData,
|
|
299
|
+
eventAttrsData: eventAttrsData,
|
|
300
|
+
source: "event",
|
|
301
|
+
setEventAttrListShow: setEventAttrListShow
|
|
302
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
303
|
+
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
304
|
+
visible: eventNameShow,
|
|
305
|
+
onOk: createEventGroup,
|
|
306
|
+
onCancel: function onCancel() {
|
|
307
|
+
return setEventNameShow(false);
|
|
308
|
+
}
|
|
309
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
310
|
+
placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
|
|
311
|
+
onChange: function onChange(e) {
|
|
312
|
+
return setEventNameInput(e.currentTarget.value);
|
|
313
|
+
}
|
|
314
|
+
})));
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
export default CollectionEventList;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataCollection } from '@zgfe/modules-dm';
|
|
3
|
+
import DemoWrapper from '../../../components/demo';
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataCollection, null));
|
|
6
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
14
|
+
import { Tabs } from 'antd';
|
|
15
|
+
import React, { useState, useContext, useEffect } from 'react';
|
|
16
|
+
import request from '../../utils/ajax';
|
|
17
|
+
import apis from '../../constants/api';
|
|
18
|
+
import EventList from './collectionEventList';
|
|
19
|
+
import UserAttributeList from './collectionAttributeList';
|
|
20
|
+
|
|
21
|
+
var DataCollection = function DataCollection(props) {
|
|
22
|
+
var classPrefix = 'data-collection';
|
|
23
|
+
|
|
24
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
25
|
+
currentApp = _useContext.currentApp,
|
|
26
|
+
isDemo = _useContext.isDemo;
|
|
27
|
+
|
|
28
|
+
var _useState = useState(1),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
listTab = _useState2[0],
|
|
31
|
+
setListTab = _useState2[1];
|
|
32
|
+
|
|
33
|
+
var tabsChange = function tabsChange(activeKey) {
|
|
34
|
+
setListTab(Number(activeKey));
|
|
35
|
+
}; // 判断埋点方案开关是否打开
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var _useState3 = useState(0),
|
|
39
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
40
|
+
isOpen = _useState4[0],
|
|
41
|
+
setIsOpen = _useState4[1];
|
|
42
|
+
|
|
43
|
+
var queryControlSwitch = function queryControlSwitch() {
|
|
44
|
+
request(apis.queryControlSwitch, {
|
|
45
|
+
method: 'get',
|
|
46
|
+
params: {
|
|
47
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
48
|
+
}
|
|
49
|
+
}).then(function (res) {
|
|
50
|
+
setIsOpen(res.data.isOpen);
|
|
51
|
+
});
|
|
52
|
+
}; // 不在方案中的数据
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
var _useState5 = useState({}),
|
|
56
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
57
|
+
queryPlanData = _useState6[0],
|
|
58
|
+
setqueryPlanData = _useState6[1];
|
|
59
|
+
|
|
60
|
+
var queryPlan = function queryPlan() {
|
|
61
|
+
request(apis.queryPlan, {
|
|
62
|
+
method: 'post',
|
|
63
|
+
data: {
|
|
64
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
65
|
+
}
|
|
66
|
+
}).then(function (res) {
|
|
67
|
+
setqueryPlanData(res.data);
|
|
68
|
+
});
|
|
69
|
+
}; // 初始化数据
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
queryControlSwitch();
|
|
74
|
+
queryPlan();
|
|
75
|
+
}, []);
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: classPrefix
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
79
|
+
defaultActiveKey: "1",
|
|
80
|
+
onChange: tabsChange
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
82
|
+
tab: "\u4E8B\u4EF6\u5217\u8868",
|
|
83
|
+
key: "1"
|
|
84
|
+
}), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
85
|
+
tab: "\u7528\u6237\u5C5E\u6027\u5217\u8868",
|
|
86
|
+
key: "2"
|
|
87
|
+
})), listTab == 1 && /*#__PURE__*/React.createElement(EventList, {
|
|
88
|
+
isOpen: isOpen,
|
|
89
|
+
queryPlanData: queryPlanData
|
|
90
|
+
}), listTab == 2 && /*#__PURE__*/React.createElement(UserAttributeList, {
|
|
91
|
+
isOpen: isOpen,
|
|
92
|
+
queryPlanData: queryPlanData,
|
|
93
|
+
source: "user"
|
|
94
|
+
}));
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default DataCollection;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
.data-collection {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: calc(100% - 264px);
|
|
5
|
+
height: 100%;
|
|
6
|
+
margin-top: 16px;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
background: #fff;
|
|
9
|
+
.loading {
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: 70%;
|
|
12
|
+
left: 55%;
|
|
13
|
+
}
|
|
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;
|
|
22
|
+
}
|
|
23
|
+
.hidden-box {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
.error-row {
|
|
27
|
+
color: #fb5547;
|
|
28
|
+
}
|
|
29
|
+
.fuzhi {
|
|
30
|
+
display: none;
|
|
31
|
+
margin-left: 10px;
|
|
32
|
+
color: #666;
|
|
33
|
+
font-size: 16px !important;
|
|
34
|
+
&:hover {
|
|
35
|
+
color: @primary-color;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
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);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.top-total {
|
|
57
|
+
line-height: 32px;
|
|
58
|
+
span {
|
|
59
|
+
color: @primary-color;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.top-button {
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 0;
|
|
65
|
+
right: 0;
|
|
66
|
+
line-height: 100%;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.table-plus {
|
|
70
|
+
&-table {
|
|
71
|
+
.ant-table {
|
|
72
|
+
.ant-table-tbody {
|
|
73
|
+
// height: 500px;
|
|
74
|
+
}
|
|
75
|
+
table {
|
|
76
|
+
border-collapse: collapse;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.ant-table-cell-row-hover {
|
|
80
|
+
.bsicon {
|
|
81
|
+
display: inline-block !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.alias_name {
|
|
85
|
+
border: none;
|
|
86
|
+
}
|
|
87
|
+
.ant-input:focus,
|
|
88
|
+
.ant-input-focused {
|
|
89
|
+
background-color: #fff !important;
|
|
90
|
+
border-bottom: 1px solid @primary-color;
|
|
91
|
+
border-radius: 0 !important;
|
|
92
|
+
box-shadow: none !important;
|
|
93
|
+
}
|
|
94
|
+
.group-row {
|
|
95
|
+
border-top: 12px solid #f5f5f5;
|
|
96
|
+
td {
|
|
97
|
+
padding: 6px 16px;
|
|
98
|
+
}
|
|
99
|
+
:last-child {
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
td:not(:first-child, :last-child) > * {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
.group-box {
|
|
107
|
+
display: flex;
|
|
108
|
+
width: 500px;
|
|
109
|
+
line-height: 30px;
|
|
110
|
+
.ant-input {
|
|
111
|
+
width: 150px;
|
|
112
|
+
border: none;
|
|
113
|
+
}
|
|
114
|
+
.bsicon {
|
|
115
|
+
margin-right: 4px;
|
|
116
|
+
font-size: 18px !important;
|
|
117
|
+
}
|
|
118
|
+
.group-text {
|
|
119
|
+
display: -webkit-box;
|
|
120
|
+
width: 120px;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
-webkit-box-orient: vertical;
|
|
123
|
+
-webkit-line-clamp: 1;
|
|
124
|
+
}
|
|
125
|
+
.group-handle {
|
|
126
|
+
margin-left: 30px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
user-select: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.edit-del {
|
|
132
|
+
.bsicon {
|
|
133
|
+
margin-left: 15px;
|
|
134
|
+
font-size: 16px !important;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
:first-child:hover {
|
|
138
|
+
color: @primary-color;
|
|
139
|
+
}
|
|
140
|
+
:last-child:hover {
|
|
141
|
+
color: red;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.event_attrs {
|
|
145
|
+
.bsicon {
|
|
146
|
+
margin-left: 12px;
|
|
147
|
+
font-size: 16px !important;
|
|
148
|
+
&:hover {
|
|
149
|
+
color: @primary-color;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
.event_name {
|
|
154
|
+
display: flex;
|
|
155
|
+
.event_name-text {
|
|
156
|
+
display: -webkit-box;
|
|
157
|
+
width: 120px;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
-webkit-box-orient: vertical;
|
|
160
|
+
-webkit-line-clamp: 1;
|
|
161
|
+
}
|
|
162
|
+
.copy-text {
|
|
163
|
+
display: none;
|
|
164
|
+
margin-left: 10px;
|
|
165
|
+
font-size: 16px !important;
|
|
166
|
+
}
|
|
167
|
+
.copy-text:hover {
|
|
168
|
+
color: @primary-color;
|
|
169
|
+
}
|
|
170
|
+
.collect-icon,
|
|
171
|
+
.collect-icon-active {
|
|
172
|
+
margin: 0 4px;
|
|
173
|
+
font-size: 16px !important;
|
|
174
|
+
}
|
|
175
|
+
.collect-icon {
|
|
176
|
+
color: #999;
|
|
177
|
+
opacity: 0;
|
|
178
|
+
}
|
|
179
|
+
.collect-icon:hover {
|
|
180
|
+
color: #f2d074;
|
|
181
|
+
}
|
|
182
|
+
.collect-icon-active {
|
|
183
|
+
color: #fd9f41;
|
|
184
|
+
}
|
|
185
|
+
.ant-checkbox-wrapper {
|
|
186
|
+
align-items: center;
|
|
187
|
+
margin-top: -6px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
.ant-table-row:hover {
|
|
191
|
+
.collect-icon {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
}
|
|
194
|
+
.copy-text {
|
|
195
|
+
display: block;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.set {
|
|
199
|
+
color: @primary-color;
|
|
200
|
+
text-align: center;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
user-select: none;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
.attr-list {
|
|
208
|
+
.attr-name {
|
|
209
|
+
display: flex;
|
|
210
|
+
.attr-name-text {
|
|
211
|
+
display: -webkit-box;
|
|
212
|
+
width: 120px;
|
|
213
|
+
overflow: hidden;
|
|
214
|
+
-webkit-box-orient: vertical;
|
|
215
|
+
-webkit-line-clamp: 1;
|
|
216
|
+
}
|
|
217
|
+
.tishiicon {
|
|
218
|
+
margin-right: 6px;
|
|
219
|
+
}
|
|
220
|
+
&:hover {
|
|
221
|
+
.fuzhi {
|
|
222
|
+
display: inline-block;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
.attr_alias_name {
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
user-select: none;
|
|
229
|
+
&:hover {
|
|
230
|
+
color: @primary-color;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
.button-box {
|
|
234
|
+
display: flex;
|
|
235
|
+
margin-bottom: 10px;
|
|
236
|
+
.ant-btn {
|
|
237
|
+
margin-right: 20px;
|
|
238
|
+
}
|
|
239
|
+
.bsicon {
|
|
240
|
+
margin-right: 6px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
.clearData {
|
|
244
|
+
text-align: right;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
user-select: none;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|