@zgfe/modules-dm 1.0.2-dm.28 → 1.0.2-dm.29
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 +58 -26
- package/es/modules/dataPlan/addEventOrUser.js +14 -4
- package/es/modules/dataPlan/addPlan.js +2 -2
- 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 +2 -2
|
@@ -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"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
2
|
.data-collection {
|
|
3
3
|
position: relative;
|
|
4
|
-
width: calc(100% -
|
|
5
|
-
height: 100%;
|
|
4
|
+
// width: calc(100% - 288px);
|
|
5
|
+
// height: 100%;
|
|
6
6
|
margin-top: 16px;
|
|
7
7
|
margin-right: 24px;
|
|
8
8
|
margin-bottom: 24px;
|
|
@@ -23,282 +23,302 @@
|
|
|
23
23
|
padding: 3px 20px 20px 20px;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.attr-list,
|
|
29
|
+
.event-list {
|
|
30
|
+
position: relative;
|
|
31
|
+
min-height: 550px;
|
|
32
|
+
&-back {
|
|
33
|
+
margin-bottom: 10px;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
user-select: none;
|
|
36
|
+
}
|
|
37
|
+
.hidden-box {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
.error-row {
|
|
41
|
+
color: #fb5547;
|
|
42
|
+
}
|
|
43
|
+
.fuzhi {
|
|
44
|
+
display: none;
|
|
45
|
+
margin-left: 10px;
|
|
46
|
+
color: #666;
|
|
47
|
+
font-size: 16px !important;
|
|
48
|
+
&:hover {
|
|
49
|
+
color: @primary-color;
|
|
34
50
|
}
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.event-list {
|
|
55
|
+
&-top-box {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
margin-bottom: 17px;
|
|
59
|
+
.top-select {
|
|
60
|
+
width: 264px;
|
|
61
|
+
margin-right: 12px;
|
|
37
62
|
}
|
|
38
|
-
.
|
|
39
|
-
|
|
63
|
+
.top-input {
|
|
64
|
+
width: 264px;
|
|
65
|
+
margin-right: 12px;
|
|
66
|
+
.ant-input-prefix {
|
|
67
|
+
margin-right: 20px;
|
|
68
|
+
transform: scale(1.5);
|
|
69
|
+
}
|
|
40
70
|
}
|
|
41
|
-
.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
font-size: 16px !important;
|
|
46
|
-
&:hover {
|
|
71
|
+
.top-total {
|
|
72
|
+
line-height: 32px;
|
|
73
|
+
span {
|
|
74
|
+
margin: 0 4px;
|
|
47
75
|
color: @primary-color;
|
|
76
|
+
font-weight: bold;
|
|
48
77
|
}
|
|
49
78
|
}
|
|
79
|
+
.top-button {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 0;
|
|
82
|
+
right: 0;
|
|
83
|
+
line-height: 100%;
|
|
84
|
+
}
|
|
50
85
|
}
|
|
51
|
-
.
|
|
52
|
-
&-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
.top-input {
|
|
61
|
-
width: 264px;
|
|
62
|
-
margin-right: 12px;
|
|
63
|
-
.ant-input-prefix {
|
|
64
|
-
margin-right: 20px;
|
|
65
|
-
transform: scale(1.5);
|
|
86
|
+
.table-plus {
|
|
87
|
+
&-table {
|
|
88
|
+
.ant-table {
|
|
89
|
+
.ant-table-tbody {
|
|
90
|
+
// height: 500px;
|
|
91
|
+
}
|
|
92
|
+
table {
|
|
93
|
+
border-collapse: collapse;
|
|
66
94
|
}
|
|
67
95
|
}
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
margin: 0 4px;
|
|
72
|
-
color: @primary-color;
|
|
73
|
-
font-weight: bold;
|
|
96
|
+
.ant-table-cell-row-hover {
|
|
97
|
+
.bsicon {
|
|
98
|
+
display: inline-block !important;
|
|
74
99
|
}
|
|
75
100
|
}
|
|
76
|
-
.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
line-height: 100%;
|
|
101
|
+
.alias_name_popover {
|
|
102
|
+
width: 200px;
|
|
103
|
+
word-break: break-all;
|
|
104
|
+
background: red;
|
|
81
105
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
.alias_name {
|
|
107
|
+
background: #fff !important;
|
|
108
|
+
border: none;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
.ant-input:focus,
|
|
112
|
+
.ant-input-focused {
|
|
113
|
+
background-color: #fff !important;
|
|
114
|
+
border-bottom: 1px solid @primary-color;
|
|
115
|
+
border-radius: 0 !important;
|
|
116
|
+
box-shadow: none !important;
|
|
117
|
+
}
|
|
118
|
+
.group-row {
|
|
119
|
+
border-top: 12px solid #f5f5f5;
|
|
120
|
+
.ant-table-cell-fix-left {
|
|
121
|
+
left: 0px;
|
|
122
|
+
display: block;
|
|
123
|
+
width: 500px;
|
|
124
|
+
background: #fff;
|
|
92
125
|
}
|
|
93
|
-
.ant-table-cell-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
126
|
+
.ant-table-cell-fix-left-first::after,
|
|
127
|
+
.ant-table-cell-fix-left-last::after {
|
|
128
|
+
box-shadow: none;
|
|
129
|
+
}
|
|
130
|
+
td {
|
|
131
|
+
padding: 6px 16px;
|
|
97
132
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
word-break: break-all;
|
|
101
|
-
background: red;
|
|
133
|
+
:last-child {
|
|
134
|
+
padding: 0;
|
|
102
135
|
}
|
|
103
|
-
|
|
104
|
-
|
|
136
|
+
td:not(:first-child, :last-child) > * {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
.group-box {
|
|
141
|
+
display: flex;
|
|
142
|
+
width: 800px;
|
|
143
|
+
line-height: 30px;
|
|
144
|
+
.ant-input {
|
|
145
|
+
width: 150px;
|
|
105
146
|
border: none;
|
|
106
|
-
cursor: pointer;
|
|
107
147
|
}
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
border-bottom: 1px solid @primary-color;
|
|
112
|
-
border-radius: 0 !important;
|
|
113
|
-
box-shadow: none !important;
|
|
148
|
+
.bsicon {
|
|
149
|
+
margin-right: 4px;
|
|
150
|
+
font-size: 18px !important;
|
|
114
151
|
}
|
|
115
|
-
.group-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
td {
|
|
128
|
-
padding: 6px 16px;
|
|
129
|
-
}
|
|
130
|
-
:last-child {
|
|
131
|
-
padding: 0;
|
|
132
|
-
}
|
|
133
|
-
td:not(:first-child, :last-child) > * {
|
|
134
|
-
display: none;
|
|
135
|
-
}
|
|
152
|
+
// .group-text {
|
|
153
|
+
// display: -webkit-box;
|
|
154
|
+
// width: 120px;
|
|
155
|
+
// overflow: hidden;
|
|
156
|
+
// -webkit-box-orient: vertical;
|
|
157
|
+
// -webkit-line-clamp: 1;
|
|
158
|
+
// }
|
|
159
|
+
.group-handle {
|
|
160
|
+
margin-left: 30px;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
user-select: none;
|
|
136
163
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
border: none;
|
|
144
|
-
}
|
|
145
|
-
.bsicon {
|
|
146
|
-
margin-right: 4px;
|
|
147
|
-
font-size: 18px !important;
|
|
148
|
-
}
|
|
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;
|
|
160
|
-
}
|
|
164
|
+
}
|
|
165
|
+
.edit-del {
|
|
166
|
+
.bsicon {
|
|
167
|
+
margin-left: 15px;
|
|
168
|
+
font-size: 16px !important;
|
|
169
|
+
cursor: pointer;
|
|
161
170
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
margin-left: 15px;
|
|
165
|
-
font-size: 16px !important;
|
|
166
|
-
cursor: pointer;
|
|
167
|
-
}
|
|
168
|
-
:first-child:hover {
|
|
169
|
-
color: @primary-color;
|
|
170
|
-
}
|
|
171
|
-
:last-child:hover {
|
|
172
|
-
color: red;
|
|
173
|
-
}
|
|
171
|
+
:first-child:hover {
|
|
172
|
+
color: @primary-color;
|
|
174
173
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.ant-select-selection-item {
|
|
178
|
-
color: #021429;
|
|
179
|
-
font-weight: 500;
|
|
180
|
-
}
|
|
174
|
+
:last-child:hover {
|
|
175
|
+
color: red;
|
|
181
176
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
}
|
|
177
|
+
}
|
|
178
|
+
.select-style {
|
|
179
|
+
width: 126px;
|
|
180
|
+
.ant-select-selection-item {
|
|
181
|
+
color: #021429;
|
|
182
|
+
font-weight: 500;
|
|
190
183
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
overflow: hidden;
|
|
198
|
-
-webkit-box-orient: vertical;
|
|
199
|
-
-webkit-line-clamp: 1;
|
|
200
|
-
}
|
|
201
|
-
.copy-text {
|
|
202
|
-
display: none;
|
|
203
|
-
margin-left: 10px;
|
|
204
|
-
font-size: 16px !important;
|
|
205
|
-
}
|
|
206
|
-
.copy-text:hover {
|
|
184
|
+
}
|
|
185
|
+
.event_attrs {
|
|
186
|
+
.bsicon {
|
|
187
|
+
margin-left: 12px;
|
|
188
|
+
font-size: 16px !important;
|
|
189
|
+
&:hover {
|
|
207
190
|
color: @primary-color;
|
|
208
191
|
}
|
|
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;
|
|
227
|
-
}
|
|
228
192
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
193
|
+
}
|
|
194
|
+
.event_name {
|
|
195
|
+
display: flex;
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
.event_name-text {
|
|
198
|
+
display: -webkit-box;
|
|
199
|
+
width: 120px;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
-webkit-box-orient: vertical;
|
|
202
|
+
-webkit-line-clamp: 1;
|
|
203
|
+
}
|
|
204
|
+
.copy-text {
|
|
205
|
+
display: none;
|
|
206
|
+
margin-left: 10px;
|
|
207
|
+
font-size: 16px !important;
|
|
236
208
|
}
|
|
237
|
-
.
|
|
209
|
+
.copy-text:hover {
|
|
238
210
|
color: @primary-color;
|
|
239
|
-
text-align: center;
|
|
240
|
-
cursor: pointer;
|
|
241
|
-
user-select: none;
|
|
242
211
|
}
|
|
243
|
-
.
|
|
244
|
-
|
|
212
|
+
.collect-icon,
|
|
213
|
+
.collect-icon-active {
|
|
214
|
+
margin: 0 4px;
|
|
215
|
+
font-size: 16px !important;
|
|
216
|
+
}
|
|
217
|
+
.collect-icon {
|
|
218
|
+
color: #999;
|
|
219
|
+
opacity: 0;
|
|
220
|
+
}
|
|
221
|
+
.collect-icon:hover {
|
|
222
|
+
color: #f2d074;
|
|
223
|
+
}
|
|
224
|
+
.collect-icon-active {
|
|
225
|
+
color: #fd9f41;
|
|
226
|
+
}
|
|
227
|
+
.ant-checkbox-wrapper {
|
|
228
|
+
align-items: center;
|
|
229
|
+
margin-top: -6px;
|
|
245
230
|
}
|
|
246
231
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
width: 120px;
|
|
255
|
-
overflow: hidden;
|
|
256
|
-
-webkit-box-orient: vertical;
|
|
257
|
-
-webkit-line-clamp: 1;
|
|
232
|
+
.ant-table-row:hover {
|
|
233
|
+
.collect-icon {
|
|
234
|
+
opacity: 1;
|
|
235
|
+
}
|
|
236
|
+
.copy-text {
|
|
237
|
+
display: block;
|
|
238
|
+
}
|
|
258
239
|
}
|
|
259
|
-
.
|
|
260
|
-
|
|
240
|
+
.set {
|
|
241
|
+
color: @primary-color;
|
|
242
|
+
text-align: center;
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
user-select: none;
|
|
261
245
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
display: inline-block;
|
|
265
|
-
cursor: pointer;
|
|
266
|
-
}
|
|
246
|
+
.set-error {
|
|
247
|
+
color: #86909c;
|
|
267
248
|
}
|
|
268
249
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.attr-list {
|
|
254
|
+
.attr-name {
|
|
255
|
+
display: flex;
|
|
256
|
+
.attr-name-text {
|
|
257
|
+
display: -webkit-box;
|
|
258
|
+
width: 120px;
|
|
259
|
+
overflow: hidden;
|
|
260
|
+
-webkit-box-orient: vertical;
|
|
261
|
+
-webkit-line-clamp: 1;
|
|
273
262
|
}
|
|
274
|
-
.
|
|
275
|
-
|
|
276
|
-
background-color: #fff !important;
|
|
277
|
-
border-bottom: 1px solid @primary-color;
|
|
278
|
-
border-radius: 0 !important;
|
|
279
|
-
box-shadow: none !important;
|
|
263
|
+
.tishiicon {
|
|
264
|
+
margin-right: 6px;
|
|
280
265
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
color: @primary-color;
|
|
266
|
+
&:hover {
|
|
267
|
+
.fuzhi {
|
|
268
|
+
display: inline-block;
|
|
269
|
+
cursor: pointer;
|
|
286
270
|
}
|
|
287
271
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
272
|
+
}
|
|
273
|
+
.alias_name {
|
|
274
|
+
background: #fff !important;
|
|
275
|
+
border: none;
|
|
276
|
+
cursor: pointer;
|
|
277
|
+
}
|
|
278
|
+
.ant-input:focus,
|
|
279
|
+
.ant-input-focused {
|
|
280
|
+
background-color: #fff !important;
|
|
281
|
+
border-bottom: 1px solid @primary-color;
|
|
282
|
+
border-radius: 0 !important;
|
|
283
|
+
box-shadow: none !important;
|
|
284
|
+
}
|
|
285
|
+
.attr_alias_name {
|
|
286
|
+
cursor: pointer;
|
|
287
|
+
user-select: none;
|
|
288
|
+
&:hover {
|
|
289
|
+
color: @primary-color;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.button-box {
|
|
293
|
+
display: flex;
|
|
294
|
+
margin-top: -24px;
|
|
295
|
+
margin-bottom: 14px;
|
|
296
|
+
.ant-btn {
|
|
297
|
+
margin-right: 20px;
|
|
297
298
|
}
|
|
298
|
-
.
|
|
299
|
-
|
|
300
|
-
cursor: pointer;
|
|
301
|
-
user-select: none;
|
|
299
|
+
.bsicon {
|
|
300
|
+
margin-right: 6px;
|
|
302
301
|
}
|
|
303
302
|
}
|
|
303
|
+
.clearData {
|
|
304
|
+
position: absolute;
|
|
305
|
+
top: 75px;
|
|
306
|
+
right: 26px;
|
|
307
|
+
text-align: right;
|
|
308
|
+
cursor: pointer;
|
|
309
|
+
user-select: none;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.event-list-drawer {
|
|
314
|
+
.ant-drawer-header-title {
|
|
315
|
+
height: 20px;
|
|
316
|
+
.ant-drawer-close {
|
|
317
|
+
position: absolute;
|
|
318
|
+
right: 24px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
.ant-drawer-mask {
|
|
322
|
+
background: rgba(0, 0, 0, 0.8);
|
|
323
|
+
}
|
|
304
324
|
}
|
|
@@ -24,6 +24,7 @@ var Option = Select.Option;
|
|
|
24
24
|
import React, { useState, useContext } from 'react';
|
|
25
25
|
import './styles/index.less';
|
|
26
26
|
import _ from 'lodash';
|
|
27
|
+
import { getAppID } from '../../utils';
|
|
27
28
|
import { DmContext } from '../../store';
|
|
28
29
|
|
|
29
30
|
var TablePlus = function TablePlus(props) {
|
|
@@ -57,7 +58,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
57
58
|
request(apis.updateEventInfo, {
|
|
58
59
|
method: 'post',
|
|
59
60
|
params: {
|
|
60
|
-
app_id: currentApp
|
|
61
|
+
app_id: getAppID(currentApp),
|
|
61
62
|
alias_name: value,
|
|
62
63
|
event_id: record.event_id
|
|
63
64
|
}
|
|
@@ -109,7 +110,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
109
110
|
data: {
|
|
110
111
|
eventGroupName: eventNameInput,
|
|
111
112
|
eventGroupId: eventNameData.groupId,
|
|
112
|
-
appId: currentApp
|
|
113
|
+
appId: getAppID(currentApp),
|
|
113
114
|
platform: 0
|
|
114
115
|
}
|
|
115
116
|
}).then(function (res) {
|
|
@@ -140,7 +141,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
140
141
|
request(apis.deleteEventGroup, {
|
|
141
142
|
method: 'post',
|
|
142
143
|
data: {
|
|
143
|
-
appId: currentApp
|
|
144
|
+
appId: getAppID(currentApp),
|
|
144
145
|
eventGroupId: eventGroupId
|
|
145
146
|
}
|
|
146
147
|
}).then(function (res) {
|
|
@@ -168,7 +169,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
168
169
|
request(apis.deleteEventMeta, {
|
|
169
170
|
method: 'post',
|
|
170
171
|
params: {
|
|
171
|
-
app_id: currentApp
|
|
172
|
+
app_id: getAppID(currentApp),
|
|
172
173
|
event_id: event_id
|
|
173
174
|
}
|
|
174
175
|
}).then(function (res) {
|
|
@@ -210,7 +211,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
210
211
|
request(apis.updateEventInfo, {
|
|
211
212
|
method: 'post',
|
|
212
213
|
params: _objectSpread({
|
|
213
|
-
app_id: currentApp
|
|
214
|
+
app_id: getAppID(currentApp),
|
|
214
215
|
event_id: record.event_id
|
|
215
216
|
}, _temp)
|
|
216
217
|
}).then(function (res) {
|
|
@@ -283,7 +284,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
283
284
|
request(apis.operateGroupRelations, {
|
|
284
285
|
method: 'post',
|
|
285
286
|
data: _objectSpread({
|
|
286
|
-
appId: currentApp
|
|
287
|
+
appId: getAppID(currentApp),
|
|
287
288
|
platform: 0,
|
|
288
289
|
hasPublicAttrView: true,
|
|
289
290
|
eventIds: groupCheckedData[data.groupId].join(',')
|
|
@@ -637,8 +638,12 @@ var TablePlus = function TablePlus(props) {
|
|
|
637
638
|
pagination: false
|
|
638
639
|
}), /*#__PURE__*/React.createElement(Modal, {
|
|
639
640
|
title: "\u4FEE\u6539\u5206\u7EC4\u540D",
|
|
641
|
+
bodyStyle: {
|
|
642
|
+
padding: '0 24px 24px 24px'
|
|
643
|
+
},
|
|
640
644
|
destroyOnClose: true,
|
|
641
645
|
visible: eventNameShow,
|
|
646
|
+
getContainer: false,
|
|
642
647
|
onOk: eventNameEdit,
|
|
643
648
|
onCancel: function onCancel() {
|
|
644
649
|
return setEventNameShow(false);
|
|
@@ -11,7 +11,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
13
|
import { IconFont } from '@zgfe/business-lib';
|
|
14
|
-
import { Tabs } from 'antd';
|
|
14
|
+
import { Tabs, Popover } from 'antd';
|
|
15
15
|
import React, { useState, useEffect } from 'react';
|
|
16
16
|
import './styles/index.less';
|
|
17
17
|
import { DmContext, upDatedDmFun } from '../../store';
|
|
@@ -21,7 +21,7 @@ import DataCollection from '../dataCollection';
|
|
|
21
21
|
|
|
22
22
|
var DataManage = function DataManage(props) {
|
|
23
23
|
var classPrefix = 'data-manage';
|
|
24
|
-
var updateEventMetas = props.updateEventMetas;
|
|
24
|
+
var updateEventMetas = props.updateEventMetas;
|
|
25
25
|
|
|
26
26
|
var _upDatedDmFun = upDatedDmFun(),
|
|
27
27
|
_upDatedDmFun2 = _slicedToArray(_upDatedDmFun, 2),
|
|
@@ -37,36 +37,18 @@ var DataManage = function DataManage(props) {
|
|
|
37
37
|
|
|
38
38
|
var _useState = useState('0'),
|
|
39
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var onSelect = function onSelect(e) {
|
|
44
|
-
setMenuTab(e.key);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
var items = [{
|
|
48
|
-
label: '埋点管理',
|
|
49
|
-
key: '0',
|
|
50
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
51
|
-
type: "maidianguanli"
|
|
52
|
-
})
|
|
53
|
-
}, {
|
|
54
|
-
label: '埋点方案管理',
|
|
55
|
-
key: '1',
|
|
56
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
57
|
-
type: "maidianfanganguanli"
|
|
58
|
-
})
|
|
59
|
-
}];
|
|
60
|
-
|
|
61
|
-
var _useState3 = useState('0'),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
listTab = _useState4[0],
|
|
64
|
-
setListTab = _useState4[1];
|
|
40
|
+
listTab = _useState2[0],
|
|
41
|
+
setListTab = _useState2[1];
|
|
65
42
|
|
|
66
43
|
var tabsChange = function tabsChange(activeKey) {
|
|
67
44
|
setListTab(activeKey);
|
|
68
45
|
};
|
|
69
46
|
|
|
47
|
+
var _useState3 = useState(false),
|
|
48
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
+
collapsed = _useState4[0],
|
|
50
|
+
setCollapsed = _useState4[1];
|
|
51
|
+
|
|
70
52
|
return /*#__PURE__*/React.createElement(DmContext.Provider, {
|
|
71
53
|
value: {
|
|
72
54
|
state: state,
|
|
@@ -75,7 +57,7 @@ var DataManage = function DataManage(props) {
|
|
|
75
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
76
58
|
className: classPrefix
|
|
77
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "tabs-box"
|
|
60
|
+
className: "tabs-box ".concat(collapsed && 'tabs-collapsed')
|
|
79
61
|
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
80
62
|
className: "tabs",
|
|
81
63
|
defaultActiveKey: "0",
|
|
@@ -84,18 +66,42 @@ var DataManage = function DataManage(props) {
|
|
|
84
66
|
}, /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
85
67
|
tab: /*#__PURE__*/React.createElement("div", {
|
|
86
68
|
className: "tab"
|
|
69
|
+
}, collapsed && /*#__PURE__*/React.createElement(Popover, {
|
|
70
|
+
content: "\u57CB\u70B9\u7BA1\u7406",
|
|
71
|
+
placement: "right"
|
|
87
72
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
88
73
|
type: "maidianguanli"
|
|
89
|
-
}),
|
|
74
|
+
})), !collapsed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
|
|
75
|
+
type: "maidianguanli"
|
|
76
|
+
}), "\u57CB\u70B9\u7BA1\u7406")),
|
|
90
77
|
key: "0"
|
|
91
78
|
}), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
92
79
|
tab: /*#__PURE__*/React.createElement("div", {
|
|
93
80
|
className: "tab"
|
|
81
|
+
}, collapsed && /*#__PURE__*/React.createElement(Popover, {
|
|
82
|
+
content: "\u57CB\u70B9\u65B9\u6848\u7BA1\u7406",
|
|
83
|
+
placement: "right"
|
|
94
84
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
95
85
|
type: "maidianfanganguanli"
|
|
96
|
-
}),
|
|
86
|
+
})), !collapsed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
|
|
87
|
+
type: "maidianfanganguanli"
|
|
88
|
+
}), "\u57CB\u70B9\u65B9\u6848\u7BA1\u7406")),
|
|
97
89
|
key: "1"
|
|
98
|
-
}))
|
|
90
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: "zhidie-botton"
|
|
92
|
+
}, !collapsed && /*#__PURE__*/React.createElement(IconFont, {
|
|
93
|
+
type: "zhedie",
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
setCollapsed(!collapsed);
|
|
96
|
+
}
|
|
97
|
+
}), collapsed && /*#__PURE__*/React.createElement(IconFont, {
|
|
98
|
+
type: "zhankai",
|
|
99
|
+
onClick: function onClick() {
|
|
100
|
+
setCollapsed(!collapsed);
|
|
101
|
+
}
|
|
102
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "dmcontent ".concat(collapsed && 'dmcontent-collapsed')
|
|
104
|
+
}, listTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), listTab == '1' && /*#__PURE__*/React.createElement(PlanList, null))));
|
|
99
105
|
};
|
|
100
106
|
|
|
101
107
|
export default DataManage;
|
|
@@ -17,43 +17,75 @@
|
|
|
17
17
|
.data-manage {
|
|
18
18
|
position: relative;
|
|
19
19
|
display: flex;
|
|
20
|
-
height: 100%;
|
|
21
20
|
background: #f5f5f5;
|
|
22
21
|
.tabs-box {
|
|
23
22
|
position: relative;
|
|
24
23
|
min-width: 240px;
|
|
25
24
|
margin-right: 24px;
|
|
26
25
|
background: #fff;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
.tabs {
|
|
27
|
+
position: fixed;
|
|
28
|
+
top: 48px;
|
|
29
|
+
left: 0;
|
|
30
|
+
min-width: 240px;
|
|
31
|
+
margin-right: 24px;
|
|
32
|
+
padding-top: 16px;
|
|
33
|
+
background: #fff;
|
|
34
|
+
.ant-tabs-nav {
|
|
35
|
+
width: 100%;
|
|
36
|
+
.ant-tabs-tab {
|
|
37
|
+
padding: 7px 0;
|
|
38
|
+
}
|
|
39
|
+
.ant-tabs-tab + .ant-tabs-tab {
|
|
40
|
+
margin: 0;
|
|
41
|
+
}
|
|
42
|
+
.ant-tabs-tab-active {
|
|
43
|
+
background: #e8efff;
|
|
44
|
+
}
|
|
45
|
+
.ant-tabs-tab-btn {
|
|
46
|
+
width: 100%;
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
text-align: left;
|
|
49
|
+
.bsicon {
|
|
50
|
+
margin-right: 12px;
|
|
51
|
+
margin-left: 19px;
|
|
52
|
+
font-size: 20px !important;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
40
55
|
}
|
|
41
|
-
.ant-tabs-
|
|
42
|
-
|
|
56
|
+
.ant-tabs-content-holder {
|
|
57
|
+
display: none;
|
|
43
58
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
59
|
+
}
|
|
60
|
+
.zhidie-botton {
|
|
61
|
+
position: absolute;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 40px;
|
|
66
|
+
font-size: 24px !important;
|
|
67
|
+
border-top: 1px solid #e8efff;
|
|
68
|
+
.bsicon {
|
|
69
|
+
margin-left: 19px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.tabs-collapsed {
|
|
74
|
+
min-width: 80px;
|
|
75
|
+
.tabs {
|
|
76
|
+
min-width: 80px;
|
|
77
|
+
.tab {
|
|
78
|
+
text-align: center;
|
|
48
79
|
.bsicon {
|
|
49
|
-
margin
|
|
50
|
-
margin-left: 19px;
|
|
51
|
-
font-size: 20px !important;
|
|
80
|
+
margin: 0 !important;
|
|
52
81
|
}
|
|
53
82
|
}
|
|
54
83
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
84
|
+
}
|
|
85
|
+
.dmcontent {
|
|
86
|
+
width: calc(100% - 264px);
|
|
87
|
+
}
|
|
88
|
+
.dmcontent-collapsed {
|
|
89
|
+
width: calc(100% - 104px);
|
|
58
90
|
}
|
|
59
91
|
}
|
|
@@ -21,7 +21,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
23
23
|
import { IconFont } from '@zgfe/business-lib';
|
|
24
|
-
import { Input, Button, Select, Table, Modal, Form, message } from 'antd';
|
|
24
|
+
import { Input, Button, Select, Table, Modal, Form, message, Popover } from 'antd';
|
|
25
25
|
var Option = Select.Option;
|
|
26
26
|
import React, { useEffect, useState } from 'react';
|
|
27
27
|
import './styles/index.less';
|
|
@@ -152,14 +152,24 @@ var addEventOrUser = function addEventOrUser(props) {
|
|
|
152
152
|
|
|
153
153
|
var tableColumnsPropsRender = function tableColumnsPropsRender(item) {
|
|
154
154
|
var render = function render(text, record, index) {
|
|
155
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(IconFont, {
|
|
156
|
-
className: "set-del
|
|
155
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(React.Fragment, null, tableRowData.length <= 1 ? /*#__PURE__*/React.createElement(IconFont, {
|
|
156
|
+
className: "set-del set-del-err",
|
|
157
157
|
disabled: true,
|
|
158
158
|
type: "shanchu1",
|
|
159
159
|
onClick: function onClick() {
|
|
160
160
|
handleRow('del', record);
|
|
161
161
|
}
|
|
162
|
-
}) : /*#__PURE__*/React.createElement(
|
|
162
|
+
}) : /*#__PURE__*/React.createElement(Popover, {
|
|
163
|
+
content: "\u5220\u9664",
|
|
164
|
+
placement: "right"
|
|
165
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
166
|
+
className: "set-del",
|
|
167
|
+
disabled: true,
|
|
168
|
+
type: "shanchu1",
|
|
169
|
+
onClick: function onClick() {
|
|
170
|
+
handleRow('del', record);
|
|
171
|
+
}
|
|
172
|
+
}))) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
163
173
|
name: "".concat(item.dataIndex, "-").concat(record.key),
|
|
164
174
|
rules: rulesData(item)
|
|
165
175
|
}, /*#__PURE__*/React.createElement(Input, null)));
|
|
@@ -162,8 +162,8 @@ var AddPlan = function AddPlan(props) {
|
|
|
162
162
|
setSpinning(true);
|
|
163
163
|
var fileType = file.name.split('.');
|
|
164
164
|
|
|
165
|
-
if (fileType[fileType.length - 1] != 'xlsx' && fileType[fileType.length - 1] != '
|
|
166
|
-
message.error('仅支持excel(
|
|
165
|
+
if (fileType[fileType.length - 1] != 'xlsx' && fileType[fileType.length - 1] != 'xls') {
|
|
166
|
+
message.error('仅支持excel(xls、xlsx)格式文件,请检查后重新上传');
|
|
167
167
|
setSpinning(false);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
@@ -17,6 +17,7 @@ import React, { useEffect, useState, useContext } from 'react';
|
|
|
17
17
|
import './styles/index.less';
|
|
18
18
|
import request from '../../utils/ajax';
|
|
19
19
|
import apis from '../../constants/api';
|
|
20
|
+
import { getAppID } from '../../utils';
|
|
20
21
|
import AddPlan from './addPlan';
|
|
21
22
|
|
|
22
23
|
var PlanList = function PlanList(props) {
|
|
@@ -26,7 +27,7 @@ var PlanList = function PlanList(props) {
|
|
|
26
27
|
currentApp = _useContext.currentApp,
|
|
27
28
|
isDemo = _useContext.isDemo;
|
|
28
29
|
|
|
29
|
-
console.log('②埋点方案管理', currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId); // 查看方案
|
|
30
|
+
console.log('②埋点方案管理', currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId, getAppID(currentApp)); // 查看方案
|
|
30
31
|
|
|
31
32
|
var tableSee = function tableSee(data) {
|
|
32
33
|
setDetailId(data.id);
|
|
@@ -51,7 +52,7 @@ var PlanList = function PlanList(props) {
|
|
|
51
52
|
request(apis.deletePlan, {
|
|
52
53
|
method: 'post',
|
|
53
54
|
data: {
|
|
54
|
-
appId: currentApp
|
|
55
|
+
appId: getAppID(currentApp),
|
|
55
56
|
planName: data
|
|
56
57
|
}
|
|
57
58
|
}).then(function (res) {
|
|
@@ -123,7 +124,7 @@ var PlanList = function PlanList(props) {
|
|
|
123
124
|
request(apis.getAllPlan, {
|
|
124
125
|
method: 'get',
|
|
125
126
|
params: {
|
|
126
|
-
appId: currentApp
|
|
127
|
+
appId: getAppID(currentApp)
|
|
127
128
|
}
|
|
128
129
|
}).then(function (res) {
|
|
129
130
|
res.data && res.data.planList && setListData(res.data.planList);
|
|
@@ -163,7 +164,7 @@ var PlanList = function PlanList(props) {
|
|
|
163
164
|
request(apis.queryControlSwitch, {
|
|
164
165
|
method: 'get',
|
|
165
166
|
params: {
|
|
166
|
-
appId: currentApp
|
|
167
|
+
appId: getAppID(currentApp)
|
|
167
168
|
}
|
|
168
169
|
}).then(function (res) {
|
|
169
170
|
var _res$data;
|
|
@@ -181,7 +182,7 @@ var PlanList = function PlanList(props) {
|
|
|
181
182
|
request(apis.updateControlSwitch, {
|
|
182
183
|
method: 'post',
|
|
183
184
|
data: {
|
|
184
|
-
appId: currentApp
|
|
185
|
+
appId: getAppID(currentApp),
|
|
185
186
|
isOpen: !isOpen ? '1' : '0'
|
|
186
187
|
}
|
|
187
188
|
}).then(function (res) {
|
|
@@ -203,7 +204,11 @@ var PlanList = function PlanList(props) {
|
|
|
203
204
|
className: "".concat(classPrefix, "-switchbox clearfix")
|
|
204
205
|
}, /*#__PURE__*/React.createElement("div", {
|
|
205
206
|
className: "switch-div"
|
|
206
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
207
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
208
|
+
style: {
|
|
209
|
+
lineHeight: '32px'
|
|
210
|
+
}
|
|
211
|
+
}, "\u57CB\u70B9\u65B9\u6848\u63A7\u5236"), /*#__PURE__*/React.createElement(Switch, {
|
|
207
212
|
onChange: isOpenChang,
|
|
208
213
|
checkedChildren: "\u5F00",
|
|
209
214
|
unCheckedChildren: "\u5173",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
2
|
.plan-list {
|
|
3
3
|
position: relative;
|
|
4
|
-
width: calc(100% - 264px);
|
|
4
|
+
// width: calc(100% - 264px);
|
|
5
5
|
height: 100%;
|
|
6
6
|
margin-top: 16px;
|
|
7
7
|
margin-right: 24px;
|
|
8
8
|
margin-bottom: 24px;
|
|
9
|
-
padding: 24px;
|
|
9
|
+
padding: 20px 24px 24px 24px;
|
|
10
10
|
background: #fff;
|
|
11
11
|
border-radius: 8px;
|
|
12
12
|
.clearfix:after {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
float: left;
|
|
48
48
|
.ant-switch {
|
|
49
49
|
width: 24px;
|
|
50
|
+
margin-top: -2px;
|
|
50
51
|
}
|
|
51
52
|
span {
|
|
52
53
|
margin-right: 20px;
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
&-tabs {
|
|
158
159
|
position: relative;
|
|
159
160
|
// display: flex;
|
|
160
|
-
margin-bottom: 15px;
|
|
161
|
+
// margin-bottom: 15px;
|
|
161
162
|
> :nth-child(1) {
|
|
162
163
|
border-radius: 4px 0 0 4px !important;
|
|
163
164
|
}
|
|
@@ -167,7 +168,7 @@
|
|
|
167
168
|
.handle-box {
|
|
168
169
|
position: absolute;
|
|
169
170
|
top: 5px;
|
|
170
|
-
right:
|
|
171
|
+
right: 0;
|
|
171
172
|
.bsicon {
|
|
172
173
|
margin-right: 10px;
|
|
173
174
|
}
|
|
@@ -189,21 +190,17 @@
|
|
|
189
190
|
.ant-table {
|
|
190
191
|
border-radius: 8px 8px 0 0 !important;
|
|
191
192
|
}
|
|
192
|
-
// display: flex;
|
|
193
|
-
// margin: 0;
|
|
194
|
-
// padding: 0;
|
|
195
|
-
// list-style-type: none;
|
|
196
|
-
// background: #fff;
|
|
197
|
-
// li {
|
|
198
|
-
// width: 25%;
|
|
199
|
-
// padding: 16px;
|
|
200
|
-
// border: 1px solid #e8efff;
|
|
201
|
-
// }
|
|
202
193
|
}
|
|
203
194
|
&-table-header.empty {
|
|
195
|
+
.ant-table {
|
|
196
|
+
border-radius: 8px !important;
|
|
197
|
+
}
|
|
204
198
|
.ant-table-tbody {
|
|
205
199
|
display: contents;
|
|
206
200
|
}
|
|
201
|
+
.ant-table-tbody > tr > td {
|
|
202
|
+
border-bottom: 0px solid #e8efff;
|
|
203
|
+
}
|
|
207
204
|
}
|
|
208
205
|
.user-list,
|
|
209
206
|
.event-list {
|
|
@@ -281,6 +278,7 @@
|
|
|
281
278
|
}
|
|
282
279
|
.set-del-err {
|
|
283
280
|
color: #cacdd4;
|
|
281
|
+
cursor: not-allowed;
|
|
284
282
|
}
|
|
285
283
|
.ant-modal-body {
|
|
286
284
|
padding: 5px 24px 24px 24px;
|
|
@@ -314,7 +312,8 @@
|
|
|
314
312
|
}
|
|
315
313
|
&-add-button {
|
|
316
314
|
position: absolute;
|
|
317
|
-
right:
|
|
315
|
+
right: 0;
|
|
316
|
+
line-height: 20px;
|
|
318
317
|
}
|
|
319
318
|
}
|
|
320
319
|
}
|
package/es/store/index.js
CHANGED
|
@@ -10,17 +10,24 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
10
10
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
|
|
17
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
|
|
13
19
|
import { useReducer, createContext } from 'react';
|
|
14
20
|
import { initState } from './state';
|
|
15
21
|
import { ActionType } from './action';
|
|
16
22
|
|
|
17
23
|
var DmReducer = function DmReducer(prevState, action) {
|
|
18
|
-
|
|
24
|
+
console.log('DmReducer', prevState, action);
|
|
25
|
+
|
|
19
26
|
switch (action.type) {
|
|
20
27
|
case ActionType.SET_GLOBAL:
|
|
21
|
-
return {
|
|
28
|
+
return _objectSpread(_objectSpread({}, prevState), {}, {
|
|
22
29
|
updateEventMetas: action.payload
|
|
23
|
-
};
|
|
30
|
+
});
|
|
24
31
|
|
|
25
32
|
default:
|
|
26
33
|
return initState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getAppID: (currentApp: any) => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var getAppID = function getAppID(currentApp) {
|
|
2
|
+
var href = window.location.href;
|
|
3
|
+
|
|
4
|
+
if (href.indexOf('/app/') != -1 && href.indexOf('localhost') == -1) {
|
|
5
|
+
return href.split('/app/')[1].split('/')[0];
|
|
6
|
+
} else {
|
|
7
|
+
return currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId;
|
|
8
|
+
}
|
|
9
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.2-dm.
|
|
3
|
+
"version": "1.0.2-dm.29",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"license": "ISC",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"umi-request": "^1.4.0",
|
|
54
54
|
"yorkie": "^2.0.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "cc080cf3bbabd5ba7eb4c88bb49695de615f63a7",
|
|
57
57
|
"gitHooks": {
|
|
58
58
|
"pre-commit": "lint-staged"
|
|
59
59
|
}
|