@zgfe/modules-attribution 1.0.1-alpha.14 → 1.0.1-alpha.17
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/option/index.js +1 -5
- package/es/components/option/types.d.ts +2 -6
- package/es/components/searchTime/index.js +0 -2
- package/es/components/tableList/index.d.ts +2 -2
- package/es/components/title/index.js +1 -1
- package/es/constants/apis.d.ts +0 -4
- package/es/constants/apis.js +0 -4
- package/es/constants/fields.d.ts +0 -139
- package/es/constants/fields.js +1 -148
- package/es/constants/index.d.ts +2 -4
- package/es/constants/index.js +2 -4
- package/es/modules/content/index.d.ts +2 -2
- package/es/modules/content/index.js +5 -15
- package/es/modules/content/types.d.ts +3 -3
- package/es/modules/home/demo/create.js +4 -34
- package/es/modules/home/demo/edit.js +6 -36
- package/es/modules/home/demo/index.js +3 -35
- package/es/modules/home/demo/scene.js +4 -34
- package/es/modules/home/index.d.ts +2 -2
- package/es/modules/home/index.js +3 -9
- package/es/modules/home/types.d.ts +1 -5
- package/es/modules/searchPanel/components/attributableEvents.js +17 -27
- package/es/modules/searchPanel/components/globalAttribute.d.ts +2 -1
- package/es/modules/searchPanel/components/globalAttribute.js +0 -1
- package/es/modules/searchPanel/components/targetEvent.js +5 -12
- package/es/modules/searchPanel/index.js +6 -24
- package/es/modules/searchPanel/types.d.ts +13 -10
- package/es/modules/searchPanel/utils.d.ts +4 -5
- package/es/modules/searchPanel/utils.js +26 -99
- package/es/types.d.ts +25 -39
- package/package.json +2 -2
- package/es/constants/chart.d.ts +0 -2
- package/es/constants/chart.js +0 -24
- package/es/constants/color.d.ts +0 -1
- package/es/constants/color.js +0 -1
- package/es/modules/searchPanel/demo/index.d.ts +0 -2
- package/es/modules/searchPanel/demo/index.js +0 -28
- package/es/utils/transfer.d.ts +0 -65
- package/es/utils/transfer.js +0 -173
|
@@ -52,7 +52,6 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
52
52
|
},
|
|
53
53
|
name: panelName ? panelName + '(1)' : '归因分析'
|
|
54
54
|
};
|
|
55
|
-
console.log('另存为', item);
|
|
56
55
|
setPanelValue(item);
|
|
57
56
|
setShowPanelDialog(true);
|
|
58
57
|
},
|
|
@@ -63,7 +62,6 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
63
62
|
},
|
|
64
63
|
name: panelName
|
|
65
64
|
};
|
|
66
|
-
console.log('保存', item);
|
|
67
65
|
setPanelValue(item);
|
|
68
66
|
setShowPanelDialog(true);
|
|
69
67
|
setPanelType('edit');
|
|
@@ -74,7 +72,6 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
74
72
|
};
|
|
75
73
|
});
|
|
76
74
|
var _onOk = function onOk(type, val) {
|
|
77
|
-
console.log('保存', val);
|
|
78
75
|
if (type === 'panel') {
|
|
79
76
|
setPanelType(undefined);
|
|
80
77
|
setShowPanelDialog(false);
|
|
@@ -136,8 +133,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
136
133
|
return _onCancel('panel');
|
|
137
134
|
},
|
|
138
135
|
onOk: function onOk(data) {
|
|
139
|
-
|
|
140
|
-
_onOk('panel', data);
|
|
136
|
+
return _onOk('panel', data);
|
|
141
137
|
}
|
|
142
138
|
}));
|
|
143
139
|
});
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { SearchValueProps } from '../../types';
|
|
1
2
|
export interface OptionGroupProps {
|
|
2
|
-
|
|
3
|
-
title?: string;
|
|
4
|
-
searchData: any;
|
|
5
|
-
result?: any;
|
|
6
|
-
enableSelectChart?: boolean;
|
|
7
|
-
onClickGenerateReport?: (value: any) => void;
|
|
3
|
+
searchData: SearchValueProps;
|
|
8
4
|
onGetSearchData?: Function;
|
|
9
5
|
}
|
|
@@ -13,7 +13,6 @@ var classPrefix = 'search-panel';
|
|
|
13
13
|
var SearchTime = function SearchTime(props) {
|
|
14
14
|
var _useContext = useContext(AttributableContext),
|
|
15
15
|
includeToday = _useContext.includeToday;
|
|
16
|
-
console.log('当前时间段', getInitDate(includeToday), props.time);
|
|
17
16
|
var _useState = useState(props.time || getInitDate(includeToday)),
|
|
18
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
18
|
time = _useState2[0],
|
|
@@ -23,7 +22,6 @@ var SearchTime = function SearchTime(props) {
|
|
|
23
22
|
timer = _useState4[0],
|
|
24
23
|
setTimer = _useState4[1];
|
|
25
24
|
var onChangeTime = function onChangeTime(val) {
|
|
26
|
-
console.log(333, val);
|
|
27
25
|
if (timer) clearTimeout(timer);
|
|
28
26
|
setTimer(setTimeout(function () {
|
|
29
27
|
setTime(val);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/index.less';
|
|
3
|
-
import {
|
|
3
|
+
import { TableDataProps } from '../../types';
|
|
4
4
|
declare const TableList: React.FC<{
|
|
5
5
|
total: number;
|
|
6
|
-
tableDataList:
|
|
6
|
+
tableDataList: TableDataProps;
|
|
7
7
|
}>;
|
|
8
8
|
export default TableList;
|
|
@@ -66,7 +66,7 @@ var EditTitle = function EditTitle(props) {
|
|
|
66
66
|
}
|
|
67
67
|
}).then(function (res) {
|
|
68
68
|
changeLoading(false);
|
|
69
|
-
if (res.flag === 101) {
|
|
69
|
+
if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
|
|
70
70
|
message.success('删除成功');
|
|
71
71
|
callback('delete');
|
|
72
72
|
} else {
|
package/es/constants/apis.d.ts
CHANGED
package/es/constants/apis.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
var Apis = {
|
|
2
2
|
delPanelElement: '/apppanel/delPanelElement.jsp',
|
|
3
3
|
updateElementName: '/apppanel/updateElementName.jsp',
|
|
4
|
-
eventAnalytics: '/zg/web/v2/insight/analysis',
|
|
5
|
-
download: '/zg/web/v2/insight/download',
|
|
6
|
-
queryScenesOfGroup: '/scene/queryScenesOfGroup.jsp',
|
|
7
|
-
updateElemet: '/apppanel/updateElemet.jsp',
|
|
8
4
|
getAnalyseData: '/zg/web/v2/attribution/getAnalyseData'
|
|
9
5
|
};
|
|
10
6
|
export default Apis;
|
package/es/constants/fields.d.ts
CHANGED
|
@@ -4,143 +4,4 @@ export declare const chartTypes: {
|
|
|
4
4
|
icon: string;
|
|
5
5
|
value: string;
|
|
6
6
|
}[];
|
|
7
|
-
export declare const addPanelFields: ({
|
|
8
|
-
label: string;
|
|
9
|
-
name: string;
|
|
10
|
-
extendName: string;
|
|
11
|
-
type: string;
|
|
12
|
-
options: never[];
|
|
13
|
-
children: string[];
|
|
14
|
-
fieldNames: {
|
|
15
|
-
label: string;
|
|
16
|
-
value: string;
|
|
17
|
-
};
|
|
18
|
-
rules: {
|
|
19
|
-
required: boolean;
|
|
20
|
-
message: string;
|
|
21
|
-
}[];
|
|
22
|
-
direction?: undefined;
|
|
23
|
-
dependenceFields?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
label: string;
|
|
26
|
-
name: string;
|
|
27
|
-
type: string;
|
|
28
|
-
rules: {
|
|
29
|
-
required: boolean;
|
|
30
|
-
message: string;
|
|
31
|
-
}[];
|
|
32
|
-
extendName?: undefined;
|
|
33
|
-
options?: undefined;
|
|
34
|
-
children?: undefined;
|
|
35
|
-
fieldNames?: undefined;
|
|
36
|
-
direction?: undefined;
|
|
37
|
-
dependenceFields?: undefined;
|
|
38
|
-
} | {
|
|
39
|
-
label: string;
|
|
40
|
-
name: string;
|
|
41
|
-
type: string;
|
|
42
|
-
options: {
|
|
43
|
-
label: string;
|
|
44
|
-
icon: string;
|
|
45
|
-
value: string;
|
|
46
|
-
}[];
|
|
47
|
-
rules: {
|
|
48
|
-
required: boolean;
|
|
49
|
-
message: string;
|
|
50
|
-
}[];
|
|
51
|
-
extendName?: undefined;
|
|
52
|
-
children?: undefined;
|
|
53
|
-
fieldNames?: undefined;
|
|
54
|
-
direction?: undefined;
|
|
55
|
-
dependenceFields?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
label: string;
|
|
58
|
-
name: string;
|
|
59
|
-
type: string;
|
|
60
|
-
direction: string;
|
|
61
|
-
dependenceFields: {
|
|
62
|
-
chart: string;
|
|
63
|
-
};
|
|
64
|
-
options: {
|
|
65
|
-
label: string;
|
|
66
|
-
value: string;
|
|
67
|
-
}[];
|
|
68
|
-
rules: {
|
|
69
|
-
required: boolean;
|
|
70
|
-
message: string;
|
|
71
|
-
}[];
|
|
72
|
-
extendName?: undefined;
|
|
73
|
-
children?: undefined;
|
|
74
|
-
fieldNames?: undefined;
|
|
75
|
-
})[];
|
|
76
|
-
export declare const editPanelFields: ({
|
|
77
|
-
label: string;
|
|
78
|
-
name: string;
|
|
79
|
-
type: string;
|
|
80
|
-
options: {
|
|
81
|
-
label: string;
|
|
82
|
-
icon: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[];
|
|
85
|
-
rules: {
|
|
86
|
-
required: boolean;
|
|
87
|
-
message: string;
|
|
88
|
-
}[];
|
|
89
|
-
direction?: undefined;
|
|
90
|
-
dependenceFields?: undefined;
|
|
91
|
-
} | {
|
|
92
|
-
label: string;
|
|
93
|
-
name: string;
|
|
94
|
-
type: string;
|
|
95
|
-
direction: string;
|
|
96
|
-
dependenceFields: {
|
|
97
|
-
chart: string;
|
|
98
|
-
};
|
|
99
|
-
options: {
|
|
100
|
-
label: string;
|
|
101
|
-
value: string;
|
|
102
|
-
}[];
|
|
103
|
-
rules: {
|
|
104
|
-
required: boolean;
|
|
105
|
-
message: string;
|
|
106
|
-
}[];
|
|
107
|
-
})[];
|
|
108
|
-
export declare const addSceneFields: ({
|
|
109
|
-
label: string;
|
|
110
|
-
name: string;
|
|
111
|
-
type: string;
|
|
112
|
-
options: never[];
|
|
113
|
-
fieldNames: {
|
|
114
|
-
label: string;
|
|
115
|
-
value: string;
|
|
116
|
-
};
|
|
117
|
-
rules: {
|
|
118
|
-
required: boolean;
|
|
119
|
-
message: string;
|
|
120
|
-
}[];
|
|
121
|
-
} | {
|
|
122
|
-
label: string;
|
|
123
|
-
name: string;
|
|
124
|
-
type: string;
|
|
125
|
-
rules: {
|
|
126
|
-
required: boolean;
|
|
127
|
-
message: string;
|
|
128
|
-
}[];
|
|
129
|
-
options?: undefined;
|
|
130
|
-
fieldNames?: undefined;
|
|
131
|
-
})[];
|
|
132
7
|
export declare const searchFields: SearchPanelTypes.FieldProp[];
|
|
133
|
-
export declare const indexObject: {
|
|
134
|
-
[key: string]: string;
|
|
135
|
-
};
|
|
136
|
-
export declare const BuiltinIndicators: {
|
|
137
|
-
id: number;
|
|
138
|
-
name: string;
|
|
139
|
-
eventList: {
|
|
140
|
-
name: string;
|
|
141
|
-
id: number;
|
|
142
|
-
type: string;
|
|
143
|
-
isBuiltIn: boolean;
|
|
144
|
-
attrList: never[];
|
|
145
|
-
}[];
|
|
146
|
-
};
|
package/es/constants/fields.js
CHANGED
|
@@ -3,109 +3,6 @@ export var chartTypes = [{
|
|
|
3
3
|
icon: 'biaoge',
|
|
4
4
|
value: 'grid'
|
|
5
5
|
}];
|
|
6
|
-
export var addPanelFields = [{
|
|
7
|
-
label: '看板',
|
|
8
|
-
name: 'panel',
|
|
9
|
-
extendName: 'range',
|
|
10
|
-
type: 'selectToInput',
|
|
11
|
-
options: [],
|
|
12
|
-
children: ['range'],
|
|
13
|
-
fieldNames: {
|
|
14
|
-
label: 'name',
|
|
15
|
-
value: 'id'
|
|
16
|
-
},
|
|
17
|
-
rules: [{
|
|
18
|
-
required: true,
|
|
19
|
-
message: '请选择看板'
|
|
20
|
-
}]
|
|
21
|
-
}, {
|
|
22
|
-
label: '名称',
|
|
23
|
-
name: 'name',
|
|
24
|
-
type: 'input',
|
|
25
|
-
rules: [{
|
|
26
|
-
required: true,
|
|
27
|
-
message: '请输入名称'
|
|
28
|
-
}]
|
|
29
|
-
}, {
|
|
30
|
-
label: '样式',
|
|
31
|
-
name: 'chart',
|
|
32
|
-
type: 'tab',
|
|
33
|
-
options: chartTypes,
|
|
34
|
-
rules: [{
|
|
35
|
-
required: true,
|
|
36
|
-
message: '请选择图表'
|
|
37
|
-
}]
|
|
38
|
-
}, {
|
|
39
|
-
label: '显示',
|
|
40
|
-
name: 'show',
|
|
41
|
-
type: 'radio',
|
|
42
|
-
direction: 'vertical',
|
|
43
|
-
dependenceFields: {
|
|
44
|
-
chart: 'line'
|
|
45
|
-
},
|
|
46
|
-
options: [{
|
|
47
|
-
label: '动态显示数据最多的10个分组',
|
|
48
|
-
value: 'dynamic'
|
|
49
|
-
}, {
|
|
50
|
-
label: '固定显示当前选择的分组',
|
|
51
|
-
value: 'fix'
|
|
52
|
-
}],
|
|
53
|
-
rules: [{
|
|
54
|
-
required: true,
|
|
55
|
-
message: '请选择'
|
|
56
|
-
}]
|
|
57
|
-
}];
|
|
58
|
-
export var editPanelFields = [{
|
|
59
|
-
label: '样式',
|
|
60
|
-
name: 'chart',
|
|
61
|
-
type: 'tab',
|
|
62
|
-
options: chartTypes,
|
|
63
|
-
rules: [{
|
|
64
|
-
required: true,
|
|
65
|
-
message: '请选择图表'
|
|
66
|
-
}]
|
|
67
|
-
}, {
|
|
68
|
-
label: '显示',
|
|
69
|
-
name: 'show',
|
|
70
|
-
type: 'radio',
|
|
71
|
-
direction: 'vertical',
|
|
72
|
-
dependenceFields: {
|
|
73
|
-
chart: 'line'
|
|
74
|
-
},
|
|
75
|
-
options: [{
|
|
76
|
-
label: '动态显示数据最多的10个分组',
|
|
77
|
-
value: 'dynamic'
|
|
78
|
-
}, {
|
|
79
|
-
label: '固定显示当前选择的分组',
|
|
80
|
-
value: 'fix'
|
|
81
|
-
}],
|
|
82
|
-
rules: [{
|
|
83
|
-
required: true,
|
|
84
|
-
message: '请选择'
|
|
85
|
-
}]
|
|
86
|
-
}];
|
|
87
|
-
export var addSceneFields = [{
|
|
88
|
-
label: '场景分类',
|
|
89
|
-
name: 'class',
|
|
90
|
-
type: 'selectToInput',
|
|
91
|
-
options: [],
|
|
92
|
-
fieldNames: {
|
|
93
|
-
label: 'groupName',
|
|
94
|
-
value: 'groupId'
|
|
95
|
-
},
|
|
96
|
-
rules: [{
|
|
97
|
-
required: true,
|
|
98
|
-
message: '请选择场景分类'
|
|
99
|
-
}]
|
|
100
|
-
}, {
|
|
101
|
-
label: '场景名称',
|
|
102
|
-
name: 'name',
|
|
103
|
-
type: 'input',
|
|
104
|
-
rules: [{
|
|
105
|
-
required: true,
|
|
106
|
-
message: '请输入场景名称'
|
|
107
|
-
}]
|
|
108
|
-
}];
|
|
109
6
|
export var searchFields = [{
|
|
110
7
|
key: 'mi-targetFilters',
|
|
111
8
|
type: 'targetFilters',
|
|
@@ -132,48 +29,4 @@ export var searchFields = [{
|
|
|
132
29
|
max: 5,
|
|
133
30
|
addLabel: '添加属性',
|
|
134
31
|
required: false
|
|
135
|
-
}];
|
|
136
|
-
export var indexObject = {
|
|
137
|
-
number: '人数',
|
|
138
|
-
times: '次数',
|
|
139
|
-
per: '人均次数',
|
|
140
|
-
sum: '总和',
|
|
141
|
-
avg: '均值',
|
|
142
|
-
duration_times: '分布',
|
|
143
|
-
median: '中位数'
|
|
144
|
-
};
|
|
145
|
-
export var BuiltinIndicators = {
|
|
146
|
-
id: -2,
|
|
147
|
-
name: '整体',
|
|
148
|
-
eventList: [{
|
|
149
|
-
name: '新增用户',
|
|
150
|
-
id: -201,
|
|
151
|
-
type: 'add',
|
|
152
|
-
isBuiltIn: true,
|
|
153
|
-
attrList: []
|
|
154
|
-
}, {
|
|
155
|
-
name: '活跃用户',
|
|
156
|
-
id: -202,
|
|
157
|
-
type: 'active',
|
|
158
|
-
isBuiltIn: true,
|
|
159
|
-
attrList: []
|
|
160
|
-
}, {
|
|
161
|
-
name: '访问次数',
|
|
162
|
-
id: -203,
|
|
163
|
-
type: 'times',
|
|
164
|
-
isBuiltIn: true,
|
|
165
|
-
attrList: []
|
|
166
|
-
}, {
|
|
167
|
-
name: '平均使用时长',
|
|
168
|
-
id: -204,
|
|
169
|
-
type: 'duration_avg',
|
|
170
|
-
isBuiltIn: true,
|
|
171
|
-
attrList: []
|
|
172
|
-
}, {
|
|
173
|
-
name: '使用时长分布',
|
|
174
|
-
id: -205,
|
|
175
|
-
type: 'duration',
|
|
176
|
-
isBuiltIn: true,
|
|
177
|
-
attrList: []
|
|
178
|
-
}]
|
|
179
|
-
};
|
|
32
|
+
}];
|
package/es/constants/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import Apis from './apis';
|
|
2
|
-
import {
|
|
3
|
-
import { chartColors } from './color';
|
|
4
|
-
import { chartTypes, addPanelFields, editPanelFields, addSceneFields, searchFields } from './fields';
|
|
2
|
+
import { chartTypes, searchFields } from './fields';
|
|
5
3
|
import { initTarget, initEvent, getInitDate } from './initData';
|
|
6
|
-
export { Apis,
|
|
4
|
+
export { Apis, chartTypes, searchFields, initTarget, initEvent, getInitDate, };
|
package/es/constants/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import Apis from './apis';
|
|
2
|
-
import {
|
|
3
|
-
import { chartColors } from './color';
|
|
4
|
-
import { chartTypes, addPanelFields, editPanelFields, addSceneFields, searchFields } from './fields';
|
|
2
|
+
import { chartTypes, searchFields } from './fields';
|
|
5
3
|
import { initTarget, initEvent, getInitDate } from './initData';
|
|
6
|
-
export { Apis,
|
|
4
|
+
export { Apis, chartTypes, searchFields, initTarget, initEvent, getInitDate };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { attributionContentProps } from './types';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
declare const InsightContent: React.ForwardRefExoticComponent<
|
|
4
|
+
declare const InsightContent: React.ForwardRefExoticComponent<attributionContentProps.Props & React.RefAttributes<any>>;
|
|
5
5
|
export default InsightContent;
|
|
@@ -16,7 +16,6 @@ import './styles/index.less';
|
|
|
16
16
|
import { Apis } from '../../constants';
|
|
17
17
|
import { handleTableData } from './utils';
|
|
18
18
|
import { TableList, OptionGroup, SearchTime } from '../../components';
|
|
19
|
-
import util from '../../utils/util';
|
|
20
19
|
var CancelToken = Request.CancelToken;
|
|
21
20
|
var cancel;
|
|
22
21
|
var classPrefix = 'attribution-content';
|
|
@@ -44,7 +43,6 @@ var InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
44
43
|
time = _useState10[0],
|
|
45
44
|
setTime = _useState10[1];
|
|
46
45
|
useEffect(function () {
|
|
47
|
-
console.log('fetchRequest', searchData);
|
|
48
46
|
if (searchData.sourceFilters && searchData.sourceFilters[0].eventId === -100) return;
|
|
49
47
|
if (timer) clearTimeout(timer);
|
|
50
48
|
var flag = true;
|
|
@@ -73,15 +71,9 @@ var InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
71
|
if (typeof cancel === 'function') {
|
|
74
72
|
cancel();
|
|
75
73
|
}
|
|
76
|
-
var _searchData
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
targetFilters: searchData.targetFilters[0]
|
|
80
|
-
});
|
|
81
|
-
} else {
|
|
82
|
-
_searchData = searchData;
|
|
83
|
-
}
|
|
84
|
-
console.log('请求表格数据:', _searchData);
|
|
74
|
+
var _searchData = _objectSpread(_objectSpread({}, searchData), {}, {
|
|
75
|
+
targetFilters: searchData.targetFilters[0]
|
|
76
|
+
});
|
|
85
77
|
request(Apis.getAnalyseData, {
|
|
86
78
|
method: 'post',
|
|
87
79
|
data: _objectSpread(_objectSpread(_objectSpread({}, currentApp), _searchData), time),
|
|
@@ -89,9 +81,8 @@ var InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
89
81
|
cancel = c;
|
|
90
82
|
})
|
|
91
83
|
}).then(function (res) {
|
|
92
|
-
if (res.data) {
|
|
93
|
-
var _data = handleTableData(res.data);
|
|
94
|
-
console.log('表格数据', _data);
|
|
84
|
+
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
85
|
+
var _data = handleTableData(res === null || res === void 0 ? void 0 : res.data);
|
|
95
86
|
setTableDataList(_data);
|
|
96
87
|
setTotal(res.data.total);
|
|
97
88
|
}
|
|
@@ -111,7 +102,6 @@ var InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
111
102
|
});
|
|
112
103
|
};
|
|
113
104
|
var onChangeContent = function onChangeContent(data) {
|
|
114
|
-
console.log('改变时间和图表类型', data);
|
|
115
105
|
setTime(data);
|
|
116
106
|
setSearchData(function (value) {
|
|
117
107
|
return _objectSpread(_objectSpread({}, value), data);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare namespace
|
|
1
|
+
import { SearchValueProps } from '../../types';
|
|
2
|
+
export declare namespace attributionContentProps {
|
|
3
3
|
interface Props {
|
|
4
|
-
value:
|
|
4
|
+
value: SearchValueProps;
|
|
5
5
|
show?: string[];
|
|
6
6
|
onSearching?: (flag: boolean) => void;
|
|
7
7
|
}
|
|
@@ -1,53 +1,23 @@
|
|
|
1
|
-
|
|
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 = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
8
2
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
9
3
|
import { AttributionHome } from '@zgfe/modules-attribution';
|
|
10
4
|
import { requestConfig } from '../../../utils/ajaxConfig';
|
|
11
|
-
import { Button } from 'antd';
|
|
12
5
|
var defaultValue = {
|
|
13
6
|
panelId: 438,
|
|
14
7
|
panelType: 'add'
|
|
15
8
|
};
|
|
16
9
|
export default (function () {
|
|
17
|
-
var _useState = useState(false),
|
|
18
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
-
isDetail = _useState2[0],
|
|
20
|
-
setIsDetail = _useState2[1];
|
|
21
|
-
var _useState3 = useState(),
|
|
22
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
23
|
-
detailParams = _useState4[0],
|
|
24
|
-
setDetailParams = _useState4[1];
|
|
25
|
-
var _useState5 = useState(defaultValue),
|
|
26
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
27
|
-
searchParams = _useState6[0],
|
|
28
|
-
setSearchParams = _useState6[1];
|
|
29
10
|
useEffect(function () {
|
|
30
11
|
setGlobalConfig(requestConfig);
|
|
31
12
|
}, []);
|
|
32
13
|
var afterEditTarget = function afterEditTarget(type, data) {
|
|
33
14
|
console.log("".concat(type, "\u56DE\u8C03"), data);
|
|
34
15
|
};
|
|
35
|
-
var onUserDrill = function onUserDrill(data, searchData) {
|
|
36
|
-
console.log('onUserDrill:', data, searchData);
|
|
37
|
-
setIsDetail(true);
|
|
38
|
-
setSearchParams(searchData);
|
|
39
|
-
setDetailParams(data);
|
|
40
|
-
};
|
|
41
16
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
42
17
|
needMeta: true,
|
|
43
18
|
defaultApp: 21
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(AttributionHome, {
|
|
49
|
-
defaultValue: searchParams,
|
|
50
|
-
afterEditTarget: afterEditTarget,
|
|
51
|
-
onUserDrill: onUserDrill
|
|
19
|
+
}, /*#__PURE__*/React.createElement(AttributionHome, {
|
|
20
|
+
defaultValue: defaultValue,
|
|
21
|
+
afterEditTarget: afterEditTarget
|
|
52
22
|
}));
|
|
53
23
|
});
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
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 = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
8
2
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
9
3
|
import { AttributionHome } from '@zgfe/modules-attribution';
|
|
10
4
|
import { requestConfig } from '../../../utils/ajaxConfig';
|
|
11
|
-
import { Button } from 'antd';
|
|
12
5
|
var defaultValue = {
|
|
13
6
|
id: 1426,
|
|
14
7
|
name: '999',
|
|
@@ -19,7 +12,7 @@ var defaultValue = {
|
|
|
19
12
|
data: {
|
|
20
13
|
"app_id": 21,
|
|
21
14
|
"module": "attribution",
|
|
22
|
-
"targetFilters": {
|
|
15
|
+
"targetFilters": [{
|
|
23
16
|
"eventId": 6078,
|
|
24
17
|
"eventName": "埋点事件-11",
|
|
25
18
|
"filters": {
|
|
@@ -44,7 +37,7 @@ var defaultValue = {
|
|
|
44
37
|
"attrName": "机身宽度"
|
|
45
38
|
}]
|
|
46
39
|
}
|
|
47
|
-
},
|
|
40
|
+
}],
|
|
48
41
|
"sourceFilters": [{
|
|
49
42
|
"eventId": 6090,
|
|
50
43
|
"eventName": "间隔事件-01",
|
|
@@ -134,40 +127,17 @@ var defaultValue = {
|
|
|
134
127
|
chosen_data: []
|
|
135
128
|
};
|
|
136
129
|
export default (function () {
|
|
137
|
-
var _useState = useState(false),
|
|
138
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
139
|
-
isDetail = _useState2[0],
|
|
140
|
-
setIsDetail = _useState2[1];
|
|
141
|
-
var _useState3 = useState(),
|
|
142
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
143
|
-
detailParams = _useState4[0],
|
|
144
|
-
setDetailParams = _useState4[1];
|
|
145
|
-
var _useState5 = useState(defaultValue),
|
|
146
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
147
|
-
searchParams = _useState6[0],
|
|
148
|
-
setSearchParams = _useState6[1];
|
|
149
130
|
useEffect(function () {
|
|
150
131
|
setGlobalConfig(requestConfig);
|
|
151
132
|
}, []);
|
|
152
133
|
var afterEditTarget = function afterEditTarget(type, data) {
|
|
153
134
|
console.log("".concat(type, "\u56DE\u8C03"), data);
|
|
154
135
|
};
|
|
155
|
-
var onUserDrill = function onUserDrill(data, searchData) {
|
|
156
|
-
console.log('onUserDrill:', data, searchData);
|
|
157
|
-
setIsDetail(true);
|
|
158
|
-
setSearchParams(searchData);
|
|
159
|
-
setDetailParams(data);
|
|
160
|
-
};
|
|
161
136
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
162
137
|
needMeta: true,
|
|
163
138
|
defaultApp: 21
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(AttributionHome, {
|
|
169
|
-
defaultValue: searchParams,
|
|
170
|
-
afterEditTarget: afterEditTarget,
|
|
171
|
-
onUserDrill: onUserDrill
|
|
139
|
+
}, /*#__PURE__*/React.createElement(AttributionHome, {
|
|
140
|
+
defaultValue: defaultValue,
|
|
141
|
+
afterEditTarget: afterEditTarget
|
|
172
142
|
}));
|
|
173
143
|
});
|