@zgfe/modules-dm 1.0.40 → 1.0.42-alpha.10
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 +1 -1
- package/es/index.d.ts +2 -3
- package/es/index.js +2 -3
- package/es/modules/{dataCollection → dataManage}/collectionEventList.js +15 -6
- package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.js +1 -1
- package/es/modules/{dataCollection → dataManage}/components/eventFilter/styles/index.less +1 -1
- package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.js +3 -3
- package/es/modules/{dataCollection → dataManage}/components/tablePlus.js +1 -1
- package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.js +3 -3
- package/es/modules/dataManage/demo/index.js +1 -2
- package/es/modules/dataManage/index.d.ts +1 -16
- package/es/modules/dataManage/index.js +70 -22
- package/es/modules/dataManage/styles/index.less +833 -25
- package/package.json +2 -2
- package/README.md +0 -37
- package/es/modules/dataCollection/index.d.ts +0 -19
- package/es/modules/dataCollection/index.js +0 -99
- package/es/modules/dataCollection/styles/index.less +0 -832
- /package/es/modules/{dataCollection → dataManage}/collectionAttributeList.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/collectionAttributeList.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/collectionEventList.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/types.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/types.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventItem.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventItem.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/selectAttributes.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/selectAttributes.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/tablePlus.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/types.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/types.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/virtualEventList.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/virtualEventList.js +0 -0
package/es/components/demo.js
CHANGED
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference path="../typings.d.ts" />
|
|
2
|
-
import DataCollection from './modules/dataCollection';
|
|
3
|
-
import PlanList from './modules/dataPlan';
|
|
4
2
|
import DataManage from './modules/dataManage';
|
|
5
|
-
|
|
3
|
+
import PlanList from './modules/dataPlan';
|
|
4
|
+
export { PlanList, DataManage };
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference path="../typings.d.ts" />
|
|
2
|
-
import DataCollection from './modules/dataCollection';
|
|
3
|
-
import PlanList from './modules/dataPlan';
|
|
4
2
|
import DataManage from './modules/dataManage';
|
|
5
|
-
|
|
3
|
+
import PlanList from './modules/dataPlan';
|
|
4
|
+
export { PlanList, DataManage };
|
|
@@ -337,16 +337,25 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
337
337
|
count = 0;
|
|
338
338
|
arr = [];
|
|
339
339
|
}
|
|
340
|
+
// 当前页需要展示的数据
|
|
340
341
|
var _renderData = paginationData[pageNumber - 1];
|
|
341
|
-
//
|
|
342
|
+
// 临时数组,搜索时使用,存储已添加的分组id
|
|
343
|
+
var _tempGroupIdList = [];
|
|
344
|
+
// 临时渲染数据,搜索时使用,存放处理后的数据(含分组信息)
|
|
345
|
+
var _tempRenderData = [];
|
|
346
|
+
// console.log('_renderData', tableHandleData, _renderData, groupData);
|
|
342
347
|
if (_renderData && _renderData.length > 0 && _renderData[0].groupId == undefined) {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
_renderData.map(function (item) {
|
|
349
|
+
groupData.map(function (_item) {
|
|
350
|
+
if (_item.groupId === item._groupId && _tempGroupIdList.indexOf(item._groupId) === -1) {
|
|
351
|
+
_tempGroupIdList.push(item._groupId);
|
|
352
|
+
_tempRenderData.push(_item);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
_tempRenderData.push(item);
|
|
347
356
|
});
|
|
348
357
|
}
|
|
349
|
-
setTableRenderData(_renderData);
|
|
358
|
+
setTableRenderData(_tempRenderData.length > 0 ? _tempRenderData : _renderData);
|
|
350
359
|
}, [pageNumber, pageSize, tableHandleData]);
|
|
351
360
|
// 分页处理
|
|
352
361
|
var onPaginationChange = function onPaginationChange(pageNumber, pageSize) {
|
|
@@ -120,7 +120,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
var onClose = function onClose() {
|
|
123
|
-
if (virtualDrawerType ===
|
|
123
|
+
if (virtualDrawerType === 'edit') {
|
|
124
124
|
if (formSubmit && getVirtualContentChange(_.cloneDeep(editVirtualEventData), _.cloneDeep(formSubmitData))) {
|
|
125
125
|
Modal.confirm({
|
|
126
126
|
centered: true,
|
|
@@ -328,17 +328,17 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}, "\u79FB\u52A8")), /*#__PURE__*/React.createElement("span", {
|
|
331
|
-
className:
|
|
331
|
+
className: "handle",
|
|
332
332
|
onClick: function onClick() {
|
|
333
333
|
return eventShowOrHidden(0, item.groupId);
|
|
334
334
|
}
|
|
335
335
|
}, "\u663E\u793A"), /*#__PURE__*/React.createElement("span", {
|
|
336
|
-
className:
|
|
336
|
+
className: "handle",
|
|
337
337
|
onClick: function onClick() {
|
|
338
338
|
return eventShowOrHidden(1, item.groupId);
|
|
339
339
|
}
|
|
340
340
|
}, "\u9690\u85CF")), item.groupName && /*#__PURE__*/React.createElement("span", {
|
|
341
|
-
className:
|
|
341
|
+
className: "handle-delete",
|
|
342
342
|
onClick: function onClick() {
|
|
343
343
|
return groupDelete(item.groupId);
|
|
344
344
|
}
|
|
@@ -417,7 +417,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
417
417
|
trigger: "hover",
|
|
418
418
|
placement: "top"
|
|
419
419
|
}, /*#__PURE__*/React.createElement("div", {
|
|
420
|
-
className:
|
|
420
|
+
className: "alias_name_text"
|
|
421
421
|
}, record.alias_name)), /*#__PURE__*/React.createElement(IconFont, {
|
|
422
422
|
className: "edit-alias-name",
|
|
423
423
|
onClick: function onClick() {
|
|
@@ -213,7 +213,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
|
|
|
213
213
|
trigger: "hover",
|
|
214
214
|
placement: "top"
|
|
215
215
|
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
-
className:
|
|
216
|
+
className: "alias_name_text"
|
|
217
217
|
}, record.aliasName)));
|
|
218
218
|
}
|
|
219
219
|
}, {
|
|
@@ -256,7 +256,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
|
|
|
256
256
|
trigger: "hover",
|
|
257
257
|
placement: "top"
|
|
258
258
|
}, /*#__PURE__*/React.createElement("div", {
|
|
259
|
-
className:
|
|
259
|
+
className: "description"
|
|
260
260
|
}, text)));
|
|
261
261
|
}
|
|
262
262
|
}, {
|
|
@@ -275,7 +275,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
|
|
|
275
275
|
trigger: "hover",
|
|
276
276
|
placement: "top"
|
|
277
277
|
}, /*#__PURE__*/React.createElement("div", {
|
|
278
|
-
className:
|
|
278
|
+
className: "bind-event"
|
|
279
279
|
}, text)));
|
|
280
280
|
}
|
|
281
281
|
}, {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './styles/index.less';
|
|
3
2
|
interface DataManageProps {
|
|
4
3
|
updateEventMetas: Function;
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示埋点方案
|
|
7
|
-
* default: true
|
|
8
|
-
*/
|
|
9
|
-
showPlan?: boolean;
|
|
10
4
|
/**
|
|
11
5
|
* 拓展的一级菜单
|
|
12
6
|
*/
|
|
@@ -16,19 +10,10 @@ interface DataManageProps {
|
|
|
16
10
|
children: React.ReactNode;
|
|
17
11
|
[other: string]: any;
|
|
18
12
|
}[];
|
|
19
|
-
/**
|
|
20
|
-
* 拓展的二级菜单
|
|
21
|
-
*/
|
|
22
|
-
extraSubTabs?: {
|
|
23
|
-
key: string;
|
|
24
|
-
label: string;
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
[other: string]: any;
|
|
27
|
-
}[];
|
|
28
13
|
/**
|
|
29
14
|
* 默认选中菜单
|
|
30
15
|
*/
|
|
31
|
-
|
|
16
|
+
activeTab?: number | string;
|
|
32
17
|
}
|
|
33
18
|
declare const DataManage: React.FC<DataManageProps>;
|
|
34
19
|
export default DataManage;
|
|
@@ -10,18 +10,18 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
12
12
|
import { Tabs } from 'antd';
|
|
13
|
-
import React, { useContext, useEffect } from 'react';
|
|
14
|
-
import './styles/index.less';
|
|
15
13
|
import { DmContext, upDatedDmFun } from '../../store';
|
|
16
14
|
import { ActionType } from '../../store/action';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
15
|
+
import React, { useState, useContext, useEffect } from 'react';
|
|
16
|
+
import request from '../../utils/ajax';
|
|
17
|
+
import apis from '../../constants/api';
|
|
18
|
+
import { getAppID } from '../../utils';
|
|
19
|
+
import EventList from './collectionEventList';
|
|
20
|
+
import CollectionAttributeList from './collectionAttributeList';
|
|
21
|
+
import VirtualEventList from './virtualEventList';
|
|
19
22
|
var DataManage = function DataManage(props) {
|
|
20
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
21
|
-
authority = _useContext.authority;
|
|
22
23
|
var classPrefix = 'data-manage';
|
|
23
|
-
var updateEventMetas = props.updateEventMetas
|
|
24
|
-
showPlan = props.showPlan;
|
|
24
|
+
var updateEventMetas = props.updateEventMetas;
|
|
25
25
|
var _upDatedDmFun = upDatedDmFun(),
|
|
26
26
|
_upDatedDmFun2 = _slicedToArray(_upDatedDmFun, 2),
|
|
27
27
|
state = _upDatedDmFun2[0],
|
|
@@ -32,6 +32,49 @@ var DataManage = function DataManage(props) {
|
|
|
32
32
|
payload: updateEventMetas
|
|
33
33
|
});
|
|
34
34
|
}, []);
|
|
35
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
36
|
+
currentApp = _useContext.currentApp,
|
|
37
|
+
authority = _useContext.authority;
|
|
38
|
+
// const [listTab, setListTab] = useState<string | number>(props.activeTab || 1);
|
|
39
|
+
// const tabsChange = (e: RadioChangeEvent) => {
|
|
40
|
+
// setListTab(e.target.value);
|
|
41
|
+
// };
|
|
42
|
+
// 判断埋点方案开关是否打开
|
|
43
|
+
var _useState = useState(0),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
isOpen = _useState2[0],
|
|
46
|
+
setIsOpen = _useState2[1];
|
|
47
|
+
var queryControlSwitch = function queryControlSwitch() {
|
|
48
|
+
request(apis.queryControlSwitch, {
|
|
49
|
+
method: 'get',
|
|
50
|
+
params: {
|
|
51
|
+
appId: getAppID(currentApp)
|
|
52
|
+
}
|
|
53
|
+
}).then(function (res) {
|
|
54
|
+
if (!res) return;
|
|
55
|
+
setIsOpen(res.data.isOpen);
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
// 不在方案中的数据
|
|
59
|
+
var _useState3 = useState({}),
|
|
60
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
|
+
queryPlanData = _useState4[0],
|
|
62
|
+
setqueryPlanData = _useState4[1];
|
|
63
|
+
var queryPlan = function queryPlan() {
|
|
64
|
+
request(apis.queryPlan, {
|
|
65
|
+
method: 'post',
|
|
66
|
+
data: {
|
|
67
|
+
appId: getAppID(currentApp)
|
|
68
|
+
}
|
|
69
|
+
}).then(function (res) {
|
|
70
|
+
setqueryPlanData(res.data);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
// 初始化数据
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
queryControlSwitch();
|
|
76
|
+
queryPlan();
|
|
77
|
+
}, []);
|
|
35
78
|
return /*#__PURE__*/React.createElement(DmContext.Provider, {
|
|
36
79
|
value: {
|
|
37
80
|
state: state,
|
|
@@ -42,22 +85,27 @@ var DataManage = function DataManage(props) {
|
|
|
42
85
|
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
43
86
|
className: "tabs",
|
|
44
87
|
defaultActiveKey: "0",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
label: '埋点管理',
|
|
48
|
-
children: /*#__PURE__*/React.createElement(DataCollection, {
|
|
49
|
-
activeTab: props.activeSubTab,
|
|
50
|
-
extraTabs: props.extraSubTabs
|
|
51
|
-
})
|
|
52
|
-
}, authority[10019] && {
|
|
88
|
+
destroyInactiveTabPane: true,
|
|
89
|
+
items: [authority[100020] && {
|
|
53
90
|
key: '1',
|
|
54
|
-
label: '
|
|
55
|
-
|
|
56
|
-
|
|
91
|
+
label: '元事件',
|
|
92
|
+
children: /*#__PURE__*/React.createElement(EventList, {
|
|
93
|
+
isOpen: isOpen,
|
|
94
|
+
queryPlanData: queryPlanData
|
|
95
|
+
})
|
|
96
|
+
}, authority[1700559695] && {
|
|
97
|
+
key: '3',
|
|
98
|
+
label: '虚拟事件',
|
|
99
|
+
children: /*#__PURE__*/React.createElement(VirtualEventList, null)
|
|
100
|
+
}, authority[100021] && {
|
|
101
|
+
key: '2',
|
|
102
|
+
label: '用户属性管理',
|
|
103
|
+
children: /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
104
|
+
isOpen: isOpen,
|
|
105
|
+
queryPlanData: queryPlanData,
|
|
106
|
+
source: "user"
|
|
107
|
+
})
|
|
57
108
|
}].concat(_toConsumableArray(props.extraTabs || []))
|
|
58
109
|
})));
|
|
59
110
|
};
|
|
60
|
-
DataManage.defaultProps = {
|
|
61
|
-
showPlan: true
|
|
62
|
-
};
|
|
63
111
|
export default DataManage;
|