@zgfe/modules-dm 1.0.34-qirui.1 → 1.0.35
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/demo.js +2 -1
- package/es/constants/api.d.ts +10 -0
- package/es/constants/api.js +25 -12
- package/es/modules/dataCollection/collectionAttributeList.js +32 -20
- package/es/modules/dataCollection/collectionEventList.js +62 -87
- package/es/modules/dataCollection/components/createVirtualDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/createVirtualDrawer.js +279 -0
- package/es/modules/dataCollection/components/eventFilter/index.d.ts +5 -0
- package/es/modules/dataCollection/components/eventFilter/index.js +154 -0
- package/es/modules/dataCollection/components/eventFilter/styles/index.less +72 -0
- package/es/modules/dataCollection/components/eventFilter/types.d.ts +52 -0
- package/es/modules/dataCollection/components/eventFilter/types.js +1 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.js +452 -0
- package/es/modules/dataCollection/components/eventItem.d.ts +3 -0
- package/es/modules/dataCollection/components/eventItem.js +53 -0
- package/es/modules/dataCollection/components/selectAttributes.d.ts +3 -0
- package/es/modules/dataCollection/components/selectAttributes.js +219 -0
- package/es/modules/dataCollection/{tablePlus.d.ts → components/tablePlus.d.ts} +2 -1
- package/es/modules/dataCollection/{tablePlus.js → components/tablePlus.js} +162 -143
- package/es/modules/dataCollection/components/virtualTablePlus.d.ts +5 -0
- package/es/modules/dataCollection/components/virtualTablePlus.js +400 -0
- package/es/modules/dataCollection/index.js +7 -6
- package/es/modules/dataCollection/styles/index.less +535 -20
- package/es/modules/dataCollection/types.d.ts +78 -0
- package/es/modules/dataCollection/types.js +1 -0
- package/es/modules/dataCollection/virtualEventList.d.ts +4 -0
- package/es/modules/dataCollection/virtualEventList.js +343 -0
- package/es/modules/dataManage/demo/index.js +16 -12
- package/es/modules/dataPlan/addEventOrUser.js +1 -2
- package/es/modules/dataPlan/addPlan.js +3 -12
- package/es/modules/dataPlan/eventList.js +0 -1
- package/es/modules/dataPlan/index.js +8 -9
- package/es/modules/dataPlan/tablePlus.js +0 -1
- package/es/modules/dataPlan/userAttributeList.js +0 -1
- package/es/utils/index.d.ts +49 -0
- package/es/utils/index.js +314 -0
- package/package.json +6 -4
- package/es/modules/dataCollection/demo/index.d.ts +0 -2
- package/es/modules/dataCollection/demo/index.js +0 -7
- package/es/modules/dataPlan/demo/index.d.ts +0 -2
- package/es/modules/dataPlan/demo/index.js +0 -6
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
8
|
+
import { Input, Table, message, Modal, Popover } from 'antd';
|
|
9
|
+
import request from '../../../utils/ajax';
|
|
10
|
+
import apis from '../../../constants/api';
|
|
11
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
12
|
+
import '../styles/index.less';
|
|
13
|
+
import { getAppID, getTableScroll } from '../../../utils';
|
|
14
|
+
import moment from 'moment';
|
|
15
|
+
import { DmContext } from '../../../store';
|
|
16
|
+
var VirtualTablePlus = function VirtualTablePlus(props) {
|
|
17
|
+
var classPrefix = 'table-plus';
|
|
18
|
+
var tableRenderData = props.tableRenderData,
|
|
19
|
+
editOrSeeVirtualEvent = props.editOrSeeVirtualEvent,
|
|
20
|
+
refresh = props.refresh;
|
|
21
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
22
|
+
currentApp = _useContext.currentApp,
|
|
23
|
+
authority = _useContext.authority;
|
|
24
|
+
var _useContext2 = useContext(DmContext),
|
|
25
|
+
state = _useContext2.state;
|
|
26
|
+
// 是否筛选收藏
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
markActive = _useState2[0],
|
|
30
|
+
setMarkActive = _useState2[1];
|
|
31
|
+
// 修改分组名数据
|
|
32
|
+
var _useState3 = useState(false),
|
|
33
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
|
+
eventNameShow = _useState4[0],
|
|
35
|
+
setEventNameShow = _useState4[1];
|
|
36
|
+
var _useState5 = useState(''),
|
|
37
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
38
|
+
eventNameInput = _useState6[0],
|
|
39
|
+
setEventNameInput = _useState6[1];
|
|
40
|
+
var _useState7 = useState({}),
|
|
41
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
42
|
+
eventNameData = _useState8[0],
|
|
43
|
+
setEventNameData = _useState8[1];
|
|
44
|
+
var eventNameEdit = function eventNameEdit() {
|
|
45
|
+
request(apis.upsertEventGroup, {
|
|
46
|
+
method: 'post',
|
|
47
|
+
data: {
|
|
48
|
+
eventGroupName: eventNameInput,
|
|
49
|
+
eventGroupId: eventNameData.groupId,
|
|
50
|
+
appId: getAppID(currentApp),
|
|
51
|
+
platform: 0
|
|
52
|
+
}
|
|
53
|
+
}).then(function (res) {
|
|
54
|
+
if (res.code == '00') {
|
|
55
|
+
message.success('修改成功');
|
|
56
|
+
refresh();
|
|
57
|
+
setEventNameShow(false);
|
|
58
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
// 删除分组
|
|
63
|
+
var eventNameDel = function eventNameDel(eventGroupId) {
|
|
64
|
+
Modal.confirm({
|
|
65
|
+
wrapClassName: 'dm-modal-confirm',
|
|
66
|
+
centered: true,
|
|
67
|
+
title: '是否确认删除?',
|
|
68
|
+
okText: '确认',
|
|
69
|
+
cancelText: '取消',
|
|
70
|
+
maskClosable: false,
|
|
71
|
+
onOk: function onOk() {
|
|
72
|
+
request(apis.deleteEventGroup, {
|
|
73
|
+
method: 'post',
|
|
74
|
+
data: {
|
|
75
|
+
appId: getAppID(currentApp),
|
|
76
|
+
eventGroupId: eventGroupId
|
|
77
|
+
}
|
|
78
|
+
}).then(function (res) {
|
|
79
|
+
if (res) {
|
|
80
|
+
message.success('删除成功');
|
|
81
|
+
refresh();
|
|
82
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
// 删除事件
|
|
89
|
+
var eventItemDel = function eventItemDel(name) {
|
|
90
|
+
Modal.confirm({
|
|
91
|
+
wrapClassName: 'dm-modal-confirm',
|
|
92
|
+
centered: true,
|
|
93
|
+
title: '是否确认删除?',
|
|
94
|
+
content: '删除后,将停止采集该事件数据,也将不在分析平台中显示!',
|
|
95
|
+
okText: '确认',
|
|
96
|
+
cancelText: '取消',
|
|
97
|
+
maskClosable: false,
|
|
98
|
+
onOk: function onOk() {
|
|
99
|
+
request(apis.delVirtualEvent, {
|
|
100
|
+
method: 'get',
|
|
101
|
+
params: {
|
|
102
|
+
appId: getAppID(currentApp),
|
|
103
|
+
name: name
|
|
104
|
+
}
|
|
105
|
+
}).then(function (res) {
|
|
106
|
+
if (res) {
|
|
107
|
+
message.success('删除成功');
|
|
108
|
+
refresh();
|
|
109
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
// 收藏 & 取消收藏
|
|
116
|
+
var eventHiddenChange = function eventHiddenChange(e, record) {
|
|
117
|
+
request(apis.updateVirtualEventStatus, {
|
|
118
|
+
method: 'post',
|
|
119
|
+
data: {
|
|
120
|
+
appId: getAppID(currentApp),
|
|
121
|
+
eventName: record.eventName,
|
|
122
|
+
markType: e == null ? 1 : 0
|
|
123
|
+
}
|
|
124
|
+
}).then(function (res) {
|
|
125
|
+
message.success('修改成功');
|
|
126
|
+
refresh();
|
|
127
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
// 复制事件名称
|
|
131
|
+
var copyEventName = function copyEventName(event_name) {
|
|
132
|
+
if (navigator.clipboard) {
|
|
133
|
+
navigator.clipboard.writeText(event_name);
|
|
134
|
+
message.success('复制成功');
|
|
135
|
+
} else {
|
|
136
|
+
var eventCopyer = function eventCopyer(event) {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
event.clipboardData.setData('text/plain', event_name);
|
|
139
|
+
};
|
|
140
|
+
document.addEventListener('copy', eventCopyer);
|
|
141
|
+
document.execCommand('copy');
|
|
142
|
+
document.removeEventListener('copy', eventCopyer);
|
|
143
|
+
message.success('复制成功');
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var columns = [{
|
|
147
|
+
title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconFont, {
|
|
148
|
+
style: {
|
|
149
|
+
color: markActive ? '#fd9f41' : '#999',
|
|
150
|
+
marginRight: '4px'
|
|
151
|
+
},
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
props.markTypeFilter(!markActive);
|
|
154
|
+
setMarkActive(!markActive);
|
|
155
|
+
},
|
|
156
|
+
type: markActive ? 'shoucang' : 'shoucang-kong'
|
|
157
|
+
}), "\u540D\u79F0"),
|
|
158
|
+
dataIndex: 'eventName',
|
|
159
|
+
key: 'eventName',
|
|
160
|
+
fixed: 'left',
|
|
161
|
+
width: 250,
|
|
162
|
+
render: function render(text, record) {
|
|
163
|
+
if (record.groupId) {
|
|
164
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: "group-box"
|
|
166
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
167
|
+
type: "left"
|
|
168
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
169
|
+
className: "group-text"
|
|
170
|
+
}, record.groupId == -1 ? '未分组' : record.groupName));
|
|
171
|
+
} else {
|
|
172
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: "event_name"
|
|
174
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
175
|
+
className: record.markType == 1 ? 'collect-icon-active' : 'collect-icon',
|
|
176
|
+
onClick: function onClick() {
|
|
177
|
+
return eventHiddenChange(record.markType, record);
|
|
178
|
+
},
|
|
179
|
+
type: record.markType == 1 ? 'shoucang' : 'shoucang-kong'
|
|
180
|
+
}), /*#__PURE__*/React.createElement(Popover, {
|
|
181
|
+
content: text
|
|
182
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
183
|
+
className: "event_name-text",
|
|
184
|
+
onClick: function onClick() {
|
|
185
|
+
return editOrSeeVirtualEvent(record.eventName, 'see');
|
|
186
|
+
}
|
|
187
|
+
}, text)), record.isStop === 1 && /*#__PURE__*/React.createElement("div", {
|
|
188
|
+
className: "expired"
|
|
189
|
+
}, "\u5DF2\u5931\u6548"), /*#__PURE__*/React.createElement(IconFont, {
|
|
190
|
+
className: "copy-text",
|
|
191
|
+
onClick: function onClick() {
|
|
192
|
+
return copyEventName(record.eventName);
|
|
193
|
+
},
|
|
194
|
+
type: "fuzhi"
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
title: '别名',
|
|
200
|
+
dataIndex: 'aliasName',
|
|
201
|
+
key: 'aliasName',
|
|
202
|
+
width: 167,
|
|
203
|
+
render: function render(_, record) {
|
|
204
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
205
|
+
className: "alias_name"
|
|
206
|
+
}, /*#__PURE__*/React.createElement(Popover, {
|
|
207
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
208
|
+
style: {
|
|
209
|
+
width: '200px',
|
|
210
|
+
wordBreak: 'break-all'
|
|
211
|
+
}
|
|
212
|
+
}, record.aliasName),
|
|
213
|
+
trigger: "hover",
|
|
214
|
+
placement: "top"
|
|
215
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: 'alias_name_text'
|
|
217
|
+
}, record.aliasName)));
|
|
218
|
+
}
|
|
219
|
+
}, {
|
|
220
|
+
title: '首次上报时间',
|
|
221
|
+
dataIndex: 'insertTime',
|
|
222
|
+
key: 'insertTime',
|
|
223
|
+
width: 187,
|
|
224
|
+
render: function render(text) {
|
|
225
|
+
return /*#__PURE__*/React.createElement("div", null, text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '');
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
title: '末次上报时间',
|
|
229
|
+
dataIndex: 'lastInsertTime',
|
|
230
|
+
key: 'lastInsertTime',
|
|
231
|
+
width: 187,
|
|
232
|
+
render: function render(text) {
|
|
233
|
+
return /*#__PURE__*/React.createElement("div", null, text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '');
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
title: '显示状态',
|
|
237
|
+
dataIndex: 'hidden',
|
|
238
|
+
key: 'hidden',
|
|
239
|
+
width: 187,
|
|
240
|
+
render: function render(text) {
|
|
241
|
+
return /*#__PURE__*/React.createElement("div", null, text === 0 ? '显示' : '隐藏');
|
|
242
|
+
}
|
|
243
|
+
}, {
|
|
244
|
+
title: '描述',
|
|
245
|
+
dataIndex: 'description',
|
|
246
|
+
key: 'description',
|
|
247
|
+
width: 187,
|
|
248
|
+
render: function render(text) {
|
|
249
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
250
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
style: {
|
|
252
|
+
width: '200px',
|
|
253
|
+
wordBreak: 'break-all'
|
|
254
|
+
}
|
|
255
|
+
}, text),
|
|
256
|
+
trigger: "hover",
|
|
257
|
+
placement: "top"
|
|
258
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
259
|
+
className: 'description'
|
|
260
|
+
}, text)));
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
title: '包含元事件',
|
|
264
|
+
dataIndex: 'bindEvent',
|
|
265
|
+
key: 'bindEvent',
|
|
266
|
+
width: 187,
|
|
267
|
+
render: function render(text) {
|
|
268
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
|
|
269
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
270
|
+
style: {
|
|
271
|
+
width: '200px',
|
|
272
|
+
wordBreak: 'break-all'
|
|
273
|
+
}
|
|
274
|
+
}, text),
|
|
275
|
+
trigger: "hover",
|
|
276
|
+
placement: "top"
|
|
277
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
278
|
+
className: 'bind-event'
|
|
279
|
+
}, text)));
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
title: '创建人',
|
|
283
|
+
dataIndex: 'createUser',
|
|
284
|
+
key: 'createUser',
|
|
285
|
+
width: 187
|
|
286
|
+
}, {
|
|
287
|
+
title: '更新时间',
|
|
288
|
+
dataIndex: 'updateTime',
|
|
289
|
+
key: 'updateTime',
|
|
290
|
+
width: 187,
|
|
291
|
+
render: function render(text) {
|
|
292
|
+
return /*#__PURE__*/React.createElement("div", null, moment(text).format('YYYY-MM-DD HH:mm:ss'));
|
|
293
|
+
}
|
|
294
|
+
}, {
|
|
295
|
+
title: '操作',
|
|
296
|
+
dataIndex: 'set',
|
|
297
|
+
key: 'set',
|
|
298
|
+
width: 110,
|
|
299
|
+
fixed: 'right',
|
|
300
|
+
render: function render(_, record) {
|
|
301
|
+
if (record.groupId) {
|
|
302
|
+
if (record.groupId == -1) return '';
|
|
303
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
304
|
+
className: "edit-del"
|
|
305
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
306
|
+
onClick: function onClick() {
|
|
307
|
+
if (!authority[1700636172]) {
|
|
308
|
+
message.error('无修改权限');
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
setEventNameData({
|
|
312
|
+
groupName: record.groupName,
|
|
313
|
+
groupId: record.groupId
|
|
314
|
+
});
|
|
315
|
+
setEventNameInput(record.groupName);
|
|
316
|
+
setEventNameShow(true);
|
|
317
|
+
},
|
|
318
|
+
type: "bianji"
|
|
319
|
+
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
320
|
+
onClick: function onClick() {
|
|
321
|
+
if (!authority[1700636179]) {
|
|
322
|
+
message.error('无修改权限');
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
eventNameDel(record.groupId);
|
|
326
|
+
},
|
|
327
|
+
type: "shanchu"
|
|
328
|
+
}));
|
|
329
|
+
} else {
|
|
330
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
331
|
+
className: "set-box"
|
|
332
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
333
|
+
onClick: function onClick() {
|
|
334
|
+
if (!authority[1700560669]) {
|
|
335
|
+
message.error('无修改权限');
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
editOrSeeVirtualEvent(record.eventName, 'edit');
|
|
339
|
+
}
|
|
340
|
+
}, "\u7F16\u8F91"), /*#__PURE__*/React.createElement("div", {
|
|
341
|
+
onClick: function onClick() {
|
|
342
|
+
if (!authority[1700560634]) {
|
|
343
|
+
message.error('无修改权限');
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
eventItemDel(record.eventName);
|
|
347
|
+
}
|
|
348
|
+
}, "\u5220\u9664"));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}];
|
|
352
|
+
var _useState9 = useState(''),
|
|
353
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
354
|
+
scrollY = _useState10[0],
|
|
355
|
+
setScrollY = _useState10[1];
|
|
356
|
+
//页面加载完成后才能获取到对应的元素及其位置
|
|
357
|
+
useEffect(function () {
|
|
358
|
+
var _Y = getTableScroll(102);
|
|
359
|
+
setScrollY(_Y);
|
|
360
|
+
}, []);
|
|
361
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
362
|
+
className: classPrefix
|
|
363
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
364
|
+
className: "".concat(classPrefix, "-table"),
|
|
365
|
+
id: "tablePlus",
|
|
366
|
+
columns: columns,
|
|
367
|
+
rowKey: "key",
|
|
368
|
+
loading: props.loading,
|
|
369
|
+
dataSource: tableRenderData,
|
|
370
|
+
rowClassName: function rowClassName(record) {
|
|
371
|
+
return record.groupId != undefined ? 'group-row' : '';
|
|
372
|
+
},
|
|
373
|
+
scroll: {
|
|
374
|
+
x: 1300,
|
|
375
|
+
y: scrollY
|
|
376
|
+
},
|
|
377
|
+
pagination: false,
|
|
378
|
+
sticky: true
|
|
379
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
380
|
+
title: "\u4FEE\u6539\u5206\u7EC4\u540D",
|
|
381
|
+
bodyStyle: {
|
|
382
|
+
padding: '0 24px 24px 24px'
|
|
383
|
+
},
|
|
384
|
+
destroyOnClose: true,
|
|
385
|
+
open: eventNameShow,
|
|
386
|
+
getContainer: false,
|
|
387
|
+
onOk: eventNameEdit,
|
|
388
|
+
onCancel: function onCancel() {
|
|
389
|
+
return setEventNameShow(false);
|
|
390
|
+
}
|
|
391
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
392
|
+
placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
|
|
393
|
+
value: eventNameInput,
|
|
394
|
+
maxLength: 20,
|
|
395
|
+
onChange: function onChange(e) {
|
|
396
|
+
return setEventNameInput(e.currentTarget.value);
|
|
397
|
+
}
|
|
398
|
+
})));
|
|
399
|
+
};
|
|
400
|
+
export default VirtualTablePlus;
|
|
@@ -12,14 +12,13 @@ import apis from '../../constants/api';
|
|
|
12
12
|
import { getAppID } from '../../utils';
|
|
13
13
|
import EventList from './collectionEventList';
|
|
14
14
|
import CollectionAttributeList from './collectionAttributeList';
|
|
15
|
+
import VirtualEventList from './virtualEventList';
|
|
15
16
|
var DataCollection = function DataCollection(props) {
|
|
16
17
|
var _props$extraTabs, _props$extraTabs2;
|
|
18
|
+
var classPrefix = 'data-collection';
|
|
17
19
|
var _useContext = useContext(BizGlobalDataContext),
|
|
18
20
|
currentApp = _useContext.currentApp,
|
|
19
21
|
authority = _useContext.authority;
|
|
20
|
-
var classPrefix = 'data-collection';
|
|
21
|
-
// const { updateEventMetas } = props;
|
|
22
|
-
// console.log('①埋点方案', currentApp?.appId, getAppID(currentApp));
|
|
23
22
|
var _useState = useState(1),
|
|
24
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
24
|
listTab = _useState2[0],
|
|
@@ -73,9 +72,11 @@ var DataCollection = function DataCollection(props) {
|
|
|
73
72
|
}
|
|
74
73
|
}, authority[100020] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
75
74
|
value: 1
|
|
76
|
-
}, "\u4E8B\u4EF6
|
|
75
|
+
}, "\u5143\u4E8B\u4EF6"), authority[1700559695] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
76
|
+
value: 3
|
|
77
|
+
}, "\u865A\u62DF\u4E8B\u4EF6"), authority[100021] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
77
78
|
value: 2
|
|
78
|
-
}, "\u7528\u6237\u5C5E\u6027\
|
|
79
|
+
}, "\u7528\u6237\u5C5E\u6027\u7BA1\u7406"), (_props$extraTabs = props.extraTabs) === null || _props$extraTabs === void 0 ? void 0 : _props$extraTabs.map(function (item) {
|
|
79
80
|
return /*#__PURE__*/React.createElement(Radio.Button, {
|
|
80
81
|
key: item.key,
|
|
81
82
|
value: item.key,
|
|
@@ -84,7 +85,7 @@ var DataCollection = function DataCollection(props) {
|
|
|
84
85
|
})), listTab == 1 && authority[100020] && /*#__PURE__*/React.createElement(EventList, {
|
|
85
86
|
isOpen: isOpen,
|
|
86
87
|
queryPlanData: queryPlanData
|
|
87
|
-
}), listTab == 2 && authority[100021] && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
88
|
+
}), listTab == 3 && authority[1700559695] && /*#__PURE__*/React.createElement(VirtualEventList, null), listTab == 2 && authority[100021] && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
88
89
|
isOpen: isOpen,
|
|
89
90
|
queryPlanData: queryPlanData,
|
|
90
91
|
source: "user"
|