@zgfe/modules-dm 1.0.2-dm.28 → 1.0.2-dm.30
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/modules/dataCollection/collectionAttributeList.d.ts +1 -1
- package/es/modules/dataCollection/collectionAttributeList.js +12 -15
- package/es/modules/dataCollection/collectionEventList.js +16 -8
- package/es/modules/dataCollection/index.js +8 -8
- package/es/modules/dataCollection/styles/index.less +258 -238
- package/es/modules/dataCollection/tablePlus.js +11 -6
- package/es/modules/dataManage/index.js +37 -31
- package/es/modules/dataManage/styles/index.less +59 -25
- package/es/modules/dataPlan/addEventOrUser.js +14 -4
- package/es/modules/dataPlan/addPlan.js +8 -7
- package/es/modules/dataPlan/index.js +11 -6
- package/es/modules/dataPlan/search.js +1 -1
- package/es/modules/dataPlan/styles/index.less +14 -15
- package/es/modules/dataPlan/userAttributeList.js +0 -1
- package/es/store/index.js +10 -3
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +9 -0
- package/package.json +1 -1
|
@@ -11,10 +11,10 @@ interface PropsType {
|
|
|
11
11
|
event_attrs: [];
|
|
12
12
|
event_id: number;
|
|
13
13
|
event_name: string;
|
|
14
|
+
owner?: string;
|
|
14
15
|
};
|
|
15
16
|
isOpen: number;
|
|
16
17
|
queryPlanData: queryPlanType;
|
|
17
|
-
setEventAttrListShow?: Function;
|
|
18
18
|
Refresh?: Function;
|
|
19
19
|
}
|
|
20
20
|
declare const CollectionAttributeList: React.FC<PropsType>;
|
|
@@ -23,6 +23,7 @@ import './styles/index.less';
|
|
|
23
23
|
import request from '../../utils/ajax';
|
|
24
24
|
import apis from '../../constants/api';
|
|
25
25
|
import { DmContext } from '../../store';
|
|
26
|
+
import { getAppID } from '../../utils';
|
|
26
27
|
|
|
27
28
|
var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
28
29
|
var classPrefix = 'attr-list';
|
|
@@ -46,6 +47,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
var rowRenderHandle = function rowRenderHandle(name) {
|
|
50
|
+
if (source == 'event' && eventAttrsData.owner == 'zg_abp') {
|
|
51
|
+
// 内置事件属性
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
if (source == 'user') {
|
|
50
56
|
var _queryPlanData$unexpe;
|
|
51
57
|
|
|
@@ -75,7 +81,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
75
81
|
request(apis.getUserPropMeta, {
|
|
76
82
|
method: 'post',
|
|
77
83
|
params: {
|
|
78
|
-
app_id: currentApp
|
|
84
|
+
app_id: getAppID(currentApp),
|
|
79
85
|
platform: 0
|
|
80
86
|
}
|
|
81
87
|
}).then(function (res) {
|
|
@@ -132,7 +138,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
132
138
|
request(source == 'event' ? apis.updateEventAttr : apis.updateUserAttr, {
|
|
133
139
|
method: 'post',
|
|
134
140
|
params: (_params = {
|
|
135
|
-
app_id: currentApp
|
|
141
|
+
app_id: getAppID(currentApp),
|
|
136
142
|
attr_id: source == 'event' ? record.attr_id : record.id
|
|
137
143
|
}, _defineProperty(_params, type, value), _defineProperty(_params, "event_id", source == 'event' ? eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id : null), _params)
|
|
138
144
|
}).then(function (res) {
|
|
@@ -357,7 +363,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
357
363
|
var data = new FormData();
|
|
358
364
|
data.append('upload', file);
|
|
359
365
|
data.append('attr_id', attrId);
|
|
360
|
-
data.append('app_id', currentApp
|
|
366
|
+
data.append('app_id', getAppID(currentApp));
|
|
361
367
|
source == 'event' ? data.append('event_id', eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id) : null;
|
|
362
368
|
request(apis.propUpload, {
|
|
363
369
|
method: 'post',
|
|
@@ -390,7 +396,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
390
396
|
request(apis.addPropDict, {
|
|
391
397
|
method: 'post',
|
|
392
398
|
params: {
|
|
393
|
-
app_id: currentApp
|
|
399
|
+
app_id: getAppID(currentApp),
|
|
394
400
|
attr_id: attrId,
|
|
395
401
|
batch_id: batchId,
|
|
396
402
|
event_id: source == 'event' ? eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id : null,
|
|
@@ -412,7 +418,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
412
418
|
request(apis.queryPropDict, {
|
|
413
419
|
method: 'post',
|
|
414
420
|
params: {
|
|
415
|
-
app_id: currentApp
|
|
421
|
+
app_id: getAppID(currentApp),
|
|
416
422
|
attr_id: attrId,
|
|
417
423
|
event_id: source == 'event' ? eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id : null
|
|
418
424
|
}
|
|
@@ -430,14 +436,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
430
436
|
}, [attrId]);
|
|
431
437
|
return /*#__PURE__*/React.createElement("div", {
|
|
432
438
|
className: classPrefix
|
|
433
|
-
},
|
|
434
|
-
className: "".concat(classPrefix, "-back"),
|
|
435
|
-
onClick: function onClick() {
|
|
436
|
-
return props.setEventAttrListShow(false);
|
|
437
|
-
}
|
|
438
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
439
|
-
type: "fanhuiicon"
|
|
440
|
-
}), "\u8FD4\u56DE"), /*#__PURE__*/React.createElement(Table, {
|
|
439
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
441
440
|
className: "".concat(classPrefix, "-table"),
|
|
442
441
|
columns: columns,
|
|
443
442
|
rowKey: "name",
|
|
@@ -461,7 +460,6 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
461
460
|
}, /*#__PURE__*/React.createElement("div", {
|
|
462
461
|
className: "button-box"
|
|
463
462
|
}, /*#__PURE__*/React.createElement(Upload, _objectSpread({}, uploadProps), /*#__PURE__*/React.createElement(Button, {
|
|
464
|
-
type: "primary",
|
|
465
463
|
size: "small",
|
|
466
464
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
467
465
|
type: "daochu1"
|
|
@@ -470,7 +468,6 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
470
468
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
471
469
|
type: "xiazai1"
|
|
472
470
|
}),
|
|
473
|
-
type: "primary",
|
|
474
471
|
size: "small",
|
|
475
472
|
onClick: function onClick() {
|
|
476
473
|
return window.location.href = "/analysis/api/utm/template?fileName=".concat(source == 'user' ? '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F.xlsx");
|
|
@@ -19,13 +19,14 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
|
|
21
21
|
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
22
|
-
import { Input, Button, Select, Modal, message } from 'antd';
|
|
22
|
+
import { Input, Button, Select, Modal, message, Drawer } from 'antd';
|
|
23
23
|
import request from '../../utils/ajax';
|
|
24
24
|
import apis from '../../constants/api';
|
|
25
25
|
import React, { useEffect, useState, useContext } from 'react';
|
|
26
26
|
import './styles/index.less';
|
|
27
27
|
import TablePlus from './tablePlus';
|
|
28
28
|
import _ from 'lodash';
|
|
29
|
+
import { getAppID } from '../../utils';
|
|
29
30
|
import CollectionAttributeList from './collectionAttributeList';
|
|
30
31
|
|
|
31
32
|
var CollectionEventList = function CollectionEventList(props) {
|
|
@@ -136,7 +137,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
136
137
|
request(apis.queryCollectionEventList, {
|
|
137
138
|
method: 'post',
|
|
138
139
|
params: {
|
|
139
|
-
app_id: currentApp
|
|
140
|
+
app_id: getAppID(currentApp),
|
|
140
141
|
platform: 0,
|
|
141
142
|
is_all: true
|
|
142
143
|
}
|
|
@@ -179,7 +180,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
179
180
|
method: 'post',
|
|
180
181
|
data: {
|
|
181
182
|
eventGroupName: eventNameInput,
|
|
182
|
-
appId: currentApp
|
|
183
|
+
appId: getAppID(currentApp),
|
|
183
184
|
platform: 0
|
|
184
185
|
}
|
|
185
186
|
}).then(function (res) {
|
|
@@ -387,14 +388,21 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
387
388
|
isOpen: props.isOpen,
|
|
388
389
|
queryPlanData: props.queryPlanData,
|
|
389
390
|
eventAttrDataHandle: eventAttrDataHandle
|
|
390
|
-
})),
|
|
391
|
+
})), /*#__PURE__*/React.createElement(Drawer, {
|
|
392
|
+
className: "".concat(classPrefix, "-drawer"),
|
|
393
|
+
width: '70%',
|
|
394
|
+
placement: "right",
|
|
395
|
+
destroyOnClose: true,
|
|
396
|
+
onClose: function onClose() {
|
|
397
|
+
return setEventAttrListShow(false);
|
|
398
|
+
},
|
|
399
|
+
visible: eventAttrListShow
|
|
400
|
+
}, /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
391
401
|
isOpen: props.isOpen,
|
|
392
402
|
queryPlanData: props.queryPlanData,
|
|
393
403
|
eventAttrsData: eventAttrsData,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
setEventAttrListShow: setEventAttrListShow
|
|
397
|
-
}), /*#__PURE__*/React.createElement(Modal, {
|
|
404
|
+
source: "event"
|
|
405
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
398
406
|
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
399
407
|
className: "creact-group",
|
|
400
408
|
destroyOnClose: true,
|
|
@@ -15,18 +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
|
|
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;
|
|
25
|
+
isDemo = _useContext.isDemo;
|
|
27
26
|
|
|
27
|
+
var classPrefix = 'data-collection'; // const { updateEventMetas } = props;
|
|
28
28
|
|
|
29
|
-
console.log('①埋点方案', currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
|
|
29
|
+
console.log('①埋点方案', currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, getAppID(currentApp));
|
|
30
30
|
|
|
31
31
|
var _useState = useState(1),
|
|
32
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47,7 +47,7 @@ var DataCollection = function DataCollection(props) {
|
|
|
47
47
|
request(apis.queryControlSwitch, {
|
|
48
48
|
method: 'get',
|
|
49
49
|
params: {
|
|
50
|
-
appId: currentApp
|
|
50
|
+
appId: getAppID(currentApp)
|
|
51
51
|
}
|
|
52
52
|
}).then(function (res) {
|
|
53
53
|
setIsOpen(res.data.isOpen);
|
|
@@ -64,7 +64,7 @@ var DataCollection = function DataCollection(props) {
|
|
|
64
64
|
request(apis.queryPlan, {
|
|
65
65
|
method: 'post',
|
|
66
66
|
data: {
|
|
67
|
-
appId: currentApp
|
|
67
|
+
appId: getAppID(currentApp)
|
|
68
68
|
}
|
|
69
69
|
}).then(function (res) {
|
|
70
70
|
setqueryPlanData(res.data);
|
|
@@ -90,7 +90,7 @@ var DataCollection = function DataCollection(props) {
|
|
|
90
90
|
})), listTab == 1 && /*#__PURE__*/React.createElement(EventList, {
|
|
91
91
|
isOpen: isOpen,
|
|
92
92
|
queryPlanData: queryPlanData
|
|
93
|
-
}), listTab == 2 && /*#__PURE__*/React.createElement(
|
|
93
|
+
}), listTab == 2 && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
94
94
|
isOpen: isOpen,
|
|
95
95
|
queryPlanData: queryPlanData,
|
|
96
96
|
source: "user"
|