@zgfe/modules-attribution 1.0.1-alpha.0
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/README.md +35 -0
- package/es/components/common/index.d.ts +6 -0
- package/es/components/common/index.js +17 -0
- package/es/components/common/styles/index.less +27 -0
- package/es/components/index.d.ts +5 -0
- package/es/components/index.js +5 -0
- package/es/components/option/index.d.ts +5 -0
- package/es/components/option/index.js +134 -0
- package/es/components/option/styles/index.less +17 -0
- package/es/components/option/types.d.ts +8 -0
- package/es/components/option/types.js +1 -0
- package/es/components/searchTime/index.d.ts +5 -0
- package/es/components/searchTime/index.js +41 -0
- package/es/components/searchTime/styles/index.less +19 -0
- package/es/components/searchTime/types.d.ts +8 -0
- package/es/components/searchTime/types.js +1 -0
- package/es/components/tableList/index.d.ts +8 -0
- package/es/components/tableList/index.js +23 -0
- package/es/components/tableList/styles/index.less +7 -0
- package/es/components/title/index.d.ts +5 -0
- package/es/components/title/index.js +187 -0
- package/es/components/title/searchTitle.d.ts +7 -0
- package/es/components/title/searchTitle.js +47 -0
- package/es/components/title/styles/index.less +83 -0
- package/es/components/title/styles/search.less +27 -0
- package/es/components/title/types.d.ts +7 -0
- package/es/components/title/types.js +1 -0
- package/es/constants/apis.d.ts +10 -0
- package/es/constants/apis.js +10 -0
- package/es/constants/chart.d.ts +2 -0
- package/es/constants/chart.js +24 -0
- package/es/constants/color.d.ts +1 -0
- package/es/constants/color.js +1 -0
- package/es/constants/fields.d.ts +146 -0
- package/es/constants/fields.js +179 -0
- package/es/constants/index.d.ts +6 -0
- package/es/constants/index.js +6 -0
- package/es/constants/initData.d.ts +17 -0
- package/es/constants/initData.js +24 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +2 -0
- package/es/modules/content/index.d.ts +5 -0
- package/es/modules/content/index.js +125 -0
- package/es/modules/content/styles/index.less +7 -0
- package/es/modules/content/types.d.ts +8 -0
- package/es/modules/content/types.js +1 -0
- package/es/modules/content/utils.d.ts +8 -0
- package/es/modules/content/utils.js +192 -0
- package/es/modules/home/demo/create.d.ts +2 -0
- package/es/modules/home/demo/create.js +53 -0
- package/es/modules/home/demo/edit.d.ts +2 -0
- package/es/modules/home/demo/edit.js +190 -0
- package/es/modules/home/demo/index.d.ts +3 -0
- package/es/modules/home/demo/index.js +51 -0
- package/es/modules/home/demo/scene.d.ts +2 -0
- package/es/modules/home/demo/scene.js +74 -0
- package/es/modules/home/demo/styles/index.less +33 -0
- package/es/modules/home/index.d.ts +5 -0
- package/es/modules/home/index.js +150 -0
- package/es/modules/home/styles/index.less +63 -0
- package/es/modules/home/types.d.ts +20 -0
- package/es/modules/home/types.js +1 -0
- package/es/modules/searchPanel/components/attributableEvents.d.ts +4 -0
- package/es/modules/searchPanel/components/attributableEvents.js +172 -0
- package/es/modules/searchPanel/components/globalAttribute.d.ts +8 -0
- package/es/modules/searchPanel/components/globalAttribute.js +58 -0
- package/es/modules/searchPanel/components/index.d.ts +4 -0
- package/es/modules/searchPanel/components/index.js +21 -0
- package/es/modules/searchPanel/components/targetEvent.d.ts +4 -0
- package/es/modules/searchPanel/components/targetEvent.js +149 -0
- package/es/modules/searchPanel/demo/index.d.ts +2 -0
- package/es/modules/searchPanel/demo/index.js +28 -0
- package/es/modules/searchPanel/index.d.ts +6 -0
- package/es/modules/searchPanel/index.js +316 -0
- package/es/modules/searchPanel/styles/index.less +202 -0
- package/es/modules/searchPanel/types.d.ts +31 -0
- package/es/modules/searchPanel/types.js +1 -0
- package/es/modules/searchPanel/utils.d.ts +5 -0
- package/es/modules/searchPanel/utils.js +139 -0
- package/es/style/image/noData.png +0 -0
- package/es/style/image/ring.svg +9 -0
- package/es/style/index.less +47 -0
- package/es/style/theme.d.ts +15 -0
- package/es/style/theme.js +14 -0
- package/es/types.d.ts +62 -0
- package/es/types.js +2 -0
- package/es/utils/ajaxConfig.d.ts +8 -0
- package/es/utils/ajaxConfig.js +40 -0
- package/es/utils/request.d.ts +3 -0
- package/es/utils/request.js +5 -0
- package/es/utils/transfer.d.ts +65 -0
- package/es/utils/transfer.js +173 -0
- package/es/utils/util.d.ts +32 -0
- package/es/utils/util.js +139 -0
- package/package.json +54 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.mi-left-form {
|
|
4
|
+
&-bottom-form-title {
|
|
5
|
+
margin-top: 34px;
|
|
6
|
+
margin-bottom: 16px;
|
|
7
|
+
color: #021429;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
}
|
|
10
|
+
&-bottom-form {
|
|
11
|
+
display: flex;
|
|
12
|
+
min-width: 860px;
|
|
13
|
+
height: 32px;
|
|
14
|
+
margin-bottom: 14px;
|
|
15
|
+
.p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
margin-right: 12px;
|
|
18
|
+
padding: 0;
|
|
19
|
+
color: #5f6085;
|
|
20
|
+
line-height: 32px;
|
|
21
|
+
.tishiicon {
|
|
22
|
+
margin-left: 8px;
|
|
23
|
+
color: #9aa1a9;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.attributionType {
|
|
27
|
+
margin-right: 24px;
|
|
28
|
+
}
|
|
29
|
+
.windowCnt {
|
|
30
|
+
margin: 0 16px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
&-otherEvent {
|
|
34
|
+
color: #021429;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
.tishiicon {
|
|
37
|
+
margin-left: 1px;
|
|
38
|
+
color: #9aa1a9;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
&-search-button-box {
|
|
42
|
+
text-align: right;
|
|
43
|
+
.ant-btn {
|
|
44
|
+
border: none;
|
|
45
|
+
}
|
|
46
|
+
> :nth-child(1) {
|
|
47
|
+
margin-right: 16px;
|
|
48
|
+
background: #29bd52;
|
|
49
|
+
}
|
|
50
|
+
.disable,
|
|
51
|
+
.disable:hover {
|
|
52
|
+
color: #ffffff;
|
|
53
|
+
background: #d0dfff;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
&-title.ant-form-item {
|
|
57
|
+
margin-bottom: 12px;
|
|
58
|
+
color: #5f6085;
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
.bsicon {
|
|
62
|
+
margin-left: 9px;
|
|
63
|
+
color: #9aa1a9;
|
|
64
|
+
}
|
|
65
|
+
.ant-form-item-control-input {
|
|
66
|
+
min-height: 20px;
|
|
67
|
+
.ant-form-item-control-input-content {
|
|
68
|
+
height: 20px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-item.ant-form-item {
|
|
74
|
+
margin-bottom: 12px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&-add {
|
|
78
|
+
width: fit-content;
|
|
79
|
+
height: 20px;
|
|
80
|
+
margin-top: 8px;
|
|
81
|
+
color: #165dff;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
line-height: 20px;
|
|
84
|
+
border-radius: @border-radius-small;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
span {
|
|
87
|
+
margin-right: 4px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// &:not(.disabled):hover {
|
|
91
|
+
// .__default-hover();
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
&.disabled {
|
|
95
|
+
color: @disabled-color;
|
|
96
|
+
cursor: not-allowed;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.biz-condition-item-input {
|
|
101
|
+
border-color: transparent;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ant-input-affix-wrapper > input.ant-input {
|
|
105
|
+
height: 100%;
|
|
106
|
+
}
|
|
107
|
+
.attributable-events-box {
|
|
108
|
+
.select-and-attr {
|
|
109
|
+
display: flex;
|
|
110
|
+
margin-bottom: 12px;
|
|
111
|
+
.ant-dropdown-trigger {
|
|
112
|
+
width: 208px;
|
|
113
|
+
margin-right: 16px;
|
|
114
|
+
}
|
|
115
|
+
.biz-select-handle-input {
|
|
116
|
+
background: #fafafb;
|
|
117
|
+
}
|
|
118
|
+
.biz-attr-select {
|
|
119
|
+
width: 208px;
|
|
120
|
+
margin-right: 16px;
|
|
121
|
+
.biz-attr-select-handle {
|
|
122
|
+
position: relative;
|
|
123
|
+
padding: 0;
|
|
124
|
+
border: none;
|
|
125
|
+
.qingchu {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: 5px;
|
|
128
|
+
right: 40px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// .biz-attr-select-handle:hover{
|
|
132
|
+
// .xiangxia{
|
|
133
|
+
// display: none;
|
|
134
|
+
// }
|
|
135
|
+
// }
|
|
136
|
+
}
|
|
137
|
+
.button-box {
|
|
138
|
+
.qingchu,
|
|
139
|
+
.tianjia2,
|
|
140
|
+
.shaixuan {
|
|
141
|
+
margin-top: 2px;
|
|
142
|
+
margin-right: 20px;
|
|
143
|
+
// color: #CCD0D4;
|
|
144
|
+
color: #9aa1a9;
|
|
145
|
+
font-size: 20px !important;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
.tianjia2:hover,
|
|
149
|
+
.shaixuan:hover {
|
|
150
|
+
color: #165dff;
|
|
151
|
+
}
|
|
152
|
+
.qingchu:hover {
|
|
153
|
+
color: #e96150;
|
|
154
|
+
}
|
|
155
|
+
.disable {
|
|
156
|
+
color: #ccd0d4 !important;
|
|
157
|
+
cursor: not-allowed !important;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
.target-events-box {
|
|
163
|
+
.selector-content {
|
|
164
|
+
display: flex;
|
|
165
|
+
margin-bottom: 12px;
|
|
166
|
+
.ant-dropdown-trigger {
|
|
167
|
+
width: 208px;
|
|
168
|
+
margin-right: 16px;
|
|
169
|
+
}
|
|
170
|
+
.biz-select-handle-input {
|
|
171
|
+
background: #fafafb;
|
|
172
|
+
}
|
|
173
|
+
.ant-select-selection-placeholder::after {
|
|
174
|
+
content: '\e76d' !important;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.shaixuan {
|
|
178
|
+
margin: 2px 0 0 20px;
|
|
179
|
+
color: #9aa1a9;
|
|
180
|
+
font-size: 20px !important;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
}
|
|
183
|
+
.shaixuan:hover {
|
|
184
|
+
color: #165dff;
|
|
185
|
+
}
|
|
186
|
+
.shaixuan.disable {
|
|
187
|
+
color: #ccd0d4;
|
|
188
|
+
cursor: not-allowed;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.verify-error {
|
|
193
|
+
.biz-select-handle-input {
|
|
194
|
+
background-color: #fff;
|
|
195
|
+
border: 1px solid #fb5547 !important;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.error-tips {
|
|
199
|
+
margin-top: -14px;
|
|
200
|
+
color: #fb5547;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare namespace SearchPanelTypes {
|
|
2
|
+
interface Props {
|
|
3
|
+
defaultValue?: any;
|
|
4
|
+
onChange: (values: any) => void;
|
|
5
|
+
}
|
|
6
|
+
interface FieldProp {
|
|
7
|
+
key: string;
|
|
8
|
+
type: string;
|
|
9
|
+
name: string;
|
|
10
|
+
label: string;
|
|
11
|
+
max: number;
|
|
12
|
+
addLabel: string;
|
|
13
|
+
options?: any[];
|
|
14
|
+
tips?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface PanelProp {
|
|
18
|
+
type: string;
|
|
19
|
+
value?: any;
|
|
20
|
+
allValues?: any;
|
|
21
|
+
enableDelete: boolean;
|
|
22
|
+
eventIdList?: number[];
|
|
23
|
+
showOverview?: boolean;
|
|
24
|
+
onChange?: (data: any) => void;
|
|
25
|
+
onDelete?: () => void;
|
|
26
|
+
attrChange?: (data: any) => void;
|
|
27
|
+
verify: boolean;
|
|
28
|
+
setAttrTargetCount: Function;
|
|
29
|
+
setAttrSourceCount: Function;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SearchData } from '../../types';
|
|
2
|
+
export declare function removeEmptyValue(source: SearchData): any;
|
|
3
|
+
export declare function verifyHandle(data: SearchData): boolean;
|
|
4
|
+
export declare function targetChangeCallback(data: SearchData, eList: number[], eventGroupList: any): SearchData;
|
|
5
|
+
export declare function submitButtonDisableHandle(data: SearchData, attrSourceCount: number, attrTargetCount: number): boolean;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
export function removeEmptyValue(source) {
|
|
3
|
+
var data = _.cloneDeep(source);
|
|
4
|
+
var getValue = function getValue(formData) {
|
|
5
|
+
if (!formData) return formData;
|
|
6
|
+
var newData = [];
|
|
7
|
+
formData.forEach(function (item) {
|
|
8
|
+
if (item) {
|
|
9
|
+
if (item.filters) {
|
|
10
|
+
var conditions = getConditionList(item.filters.conditions);
|
|
11
|
+
if (conditions) {
|
|
12
|
+
item.filters.conditions = conditions;
|
|
13
|
+
} else {
|
|
14
|
+
item.filters = undefined;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
newData.push(item);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
if (newData.length) return newData.length ? newData : undefined;
|
|
21
|
+
};
|
|
22
|
+
data.targetFilters = getValue(data.targetFilters)[0];
|
|
23
|
+
data.sourceFilters = getValue(data.sourceFilters);
|
|
24
|
+
if (data.globalFilters) {
|
|
25
|
+
var conditions = getConditionList(data.globalFilters.conditions);
|
|
26
|
+
if (conditions) {
|
|
27
|
+
data.globalFilters.conditions = conditions;
|
|
28
|
+
} else {
|
|
29
|
+
data.globalFilters = undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
export function verifyHandle(data) {
|
|
35
|
+
console.log('判断表单校验是否通过', data);
|
|
36
|
+
var targetFilters = data.targetFilters,
|
|
37
|
+
sourceFilters = data.sourceFilters;
|
|
38
|
+
var _verify = true;
|
|
39
|
+
targetFilters.map(function (item) {
|
|
40
|
+
if (item.eventId === -100 || item === undefined) _verify = false;
|
|
41
|
+
});
|
|
42
|
+
sourceFilters.map(function (item) {
|
|
43
|
+
if (item.eventId === -100 || item === undefined) _verify = false;
|
|
44
|
+
});
|
|
45
|
+
return _verify;
|
|
46
|
+
}
|
|
47
|
+
var OperateTypes;
|
|
48
|
+
(function (OperateTypes) {
|
|
49
|
+
OperateTypes["IsNull"] = "is null";
|
|
50
|
+
OperateTypes["IsNotNull"] = "is not null";
|
|
51
|
+
})(OperateTypes || (OperateTypes = {}));
|
|
52
|
+
function getConditionList(condition) {
|
|
53
|
+
if (!condition) return;
|
|
54
|
+
var conditionList = [];
|
|
55
|
+
condition.forEach(function (item) {
|
|
56
|
+
if (!item.attrId && !item.attrName) return;
|
|
57
|
+
if (!item.values || !item.values.length) {
|
|
58
|
+
if (item.operator === OperateTypes.IsNotNull || item.operator === OperateTypes.IsNull) {
|
|
59
|
+
conditionList.push(item);
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
conditionList.push(item);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return conditionList.length ? conditionList : undefined;
|
|
66
|
+
}
|
|
67
|
+
export function targetChangeCallback(data, eList, eventGroupList) {
|
|
68
|
+
if (eList[0] === -100) {
|
|
69
|
+
data.globalFilters = undefined;
|
|
70
|
+
} else {
|
|
71
|
+
if (data.globalFilters && data.globalFilters.conditions) {
|
|
72
|
+
var newFilters = [],
|
|
73
|
+
flag = true;
|
|
74
|
+
data.globalFilters.conditions.forEach(function (condition) {
|
|
75
|
+
if (condition) {
|
|
76
|
+
if (condition.propCategory === 'eventProp' && condition.attrId) {
|
|
77
|
+
var hasExit = judgeAttrInEvents(eList, condition.attrId, eventGroupList);
|
|
78
|
+
if (hasExit) {
|
|
79
|
+
newFilters.push(condition);
|
|
80
|
+
} else {
|
|
81
|
+
flag = false;
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
newFilters.push(condition);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
if (!flag) {
|
|
89
|
+
data.globalFilters = undefined;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
95
|
+
var buttonDisable = function buttonDisable(data, type, count) {
|
|
96
|
+
var flag = false;
|
|
97
|
+
data[type].map(function (item) {
|
|
98
|
+
item === undefined ? flag = true : null;
|
|
99
|
+
if (item !== undefined) {
|
|
100
|
+
var _item$filters;
|
|
101
|
+
(item === null || item === void 0 ? void 0 : item.eventId) === -100 ? flag = true : null;
|
|
102
|
+
item.filters === undefined && count != 0 ? flag = true : null;
|
|
103
|
+
if ((item === null || item === void 0 ? void 0 : item.filters) && ((_item$filters = item.filters) === null || _item$filters === void 0 ? void 0 : _item$filters.conditions.length) > 0) {
|
|
104
|
+
var _item$filters2, _item$filters3;
|
|
105
|
+
(_item$filters2 = item.filters) === null || _item$filters2 === void 0 ? void 0 : _item$filters2.conditions.map(function (_item) {
|
|
106
|
+
var _item$values;
|
|
107
|
+
_item.values && ((_item$values = _item.values) === null || _item$values === void 0 ? void 0 : _item$values.length) <= 0 ? flag = true : null;
|
|
108
|
+
});
|
|
109
|
+
((_item$filters3 = item.filters) === null || _item$filters3 === void 0 ? void 0 : _item$filters3.conditions.length) != count ? flag = true : null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return flag;
|
|
114
|
+
};
|
|
115
|
+
export function submitButtonDisableHandle(data, attrSourceCount, attrTargetCount) {
|
|
116
|
+
var flag = false;
|
|
117
|
+
data.attributionType === undefined ? flag = true : null;
|
|
118
|
+
buttonDisable(data, 'sourceFilters', attrSourceCount) ? flag = true : null;
|
|
119
|
+
buttonDisable(data, 'targetFilters', attrTargetCount) ? flag = true : null;
|
|
120
|
+
console.log('判断提交按钮是否可点击', attrSourceCount, flag, data);
|
|
121
|
+
return flag;
|
|
122
|
+
}
|
|
123
|
+
var judgeAttrInEvents = function judgeAttrInEvents(elds, attrId, eventGroupList) {
|
|
124
|
+
var flag = false;
|
|
125
|
+
if (!eventGroupList) return false;
|
|
126
|
+
eventGroupList.forEach(function (group) {
|
|
127
|
+
group.eventList.forEach(function (event) {
|
|
128
|
+
if (elds.includes(event.id)) {
|
|
129
|
+
event.attrList.forEach(function (attr) {
|
|
130
|
+
if (attr.id === attrId) {
|
|
131
|
+
flag = true;
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
return flag;
|
|
139
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
+
<circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
|
|
4
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
|
|
5
|
+
</circle>
|
|
6
|
+
<circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
|
|
7
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
|
|
8
|
+
</circle>
|
|
9
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/variable.less';
|
|
2
|
+
.attribution {
|
|
3
|
+
&-table-td {
|
|
4
|
+
padding: 0 !important;
|
|
5
|
+
|
|
6
|
+
&-show {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
min-width: 60px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
span {
|
|
14
|
+
width: 10px;
|
|
15
|
+
height: 10px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-name {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
.bsicon {
|
|
25
|
+
margin-right: 4px;
|
|
26
|
+
color: #fd9f41;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-content {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
max-width: 300px;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-link {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
&:hover {
|
|
42
|
+
// color: @primary-color;
|
|
43
|
+
text-decoration: underline;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'primary-color': string;
|
|
3
|
+
'border-color-base': string;
|
|
4
|
+
'background-color-base': string;
|
|
5
|
+
'text-color': string;
|
|
6
|
+
'text-color-secondary': string;
|
|
7
|
+
'tooltip-bg': string;
|
|
8
|
+
'error-color': string;
|
|
9
|
+
'shadow-color': string;
|
|
10
|
+
'box-shadow-base': string;
|
|
11
|
+
'btn-text-hover-bg': string;
|
|
12
|
+
'warning-color': string;
|
|
13
|
+
'border-color-split': string;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'primary-color': '#165dff',
|
|
3
|
+
'border-color-base': '#ECEDF0',
|
|
4
|
+
'background-color-base': '#fafafb',
|
|
5
|
+
'text-color': '#021429',
|
|
6
|
+
'text-color-secondary': '#5f6085',
|
|
7
|
+
'tooltip-bg': '#242541',
|
|
8
|
+
'error-color': '#fb5547',
|
|
9
|
+
'shadow-color': 'rgba(0, 0, 0, 0.1)',
|
|
10
|
+
'box-shadow-base': '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
11
|
+
'btn-text-hover-bg': '#cacdd4',
|
|
12
|
+
'warning-color': '#FD9F41',
|
|
13
|
+
'border-color-split': '#E8EFFF'
|
|
14
|
+
};
|
package/es/types.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TargetConditionTypes, AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
|
+
import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
export interface SearchValue {
|
|
5
|
+
targetFilters?: Array<TargetConditionTypes.Value>;
|
|
6
|
+
sourceFilters?: Array<TargetConditionTypes.Value>;
|
|
7
|
+
globalFilters?: AttrConditionTypes.GroupValue;
|
|
8
|
+
globalDimensions?: Array<AttrConditionTypes.ItemValue>;
|
|
9
|
+
time?: DatePickerTypes.Value;
|
|
10
|
+
otherEvent?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SearchData {
|
|
13
|
+
targetFilters: Array<TargetConditionTypes.Value>;
|
|
14
|
+
sourceFilters: Array<TargetConditionTypes.Value>;
|
|
15
|
+
globalFilters?: AttrConditionTypes.GroupValue;
|
|
16
|
+
time?: DatePickerTypes.Value;
|
|
17
|
+
attributionType?: number;
|
|
18
|
+
otherEvent?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ChartItemProp {
|
|
21
|
+
label?: string;
|
|
22
|
+
value: 'line' | 'bar' | 'map';
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ResponseDataProps {
|
|
27
|
+
x_axis?: string[];
|
|
28
|
+
series: SeriesProps[];
|
|
29
|
+
tongbi?: number[];
|
|
30
|
+
huanbi?: number[];
|
|
31
|
+
total?: number[];
|
|
32
|
+
yesterDay?: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface SeriesProps {
|
|
35
|
+
names?: string[];
|
|
36
|
+
values: number[];
|
|
37
|
+
index?: string;
|
|
38
|
+
duration?: TableChildrenProps[];
|
|
39
|
+
}
|
|
40
|
+
export interface TableChildrenProps {
|
|
41
|
+
name: string;
|
|
42
|
+
values: number[];
|
|
43
|
+
}
|
|
44
|
+
export interface TableDataHandleProps {
|
|
45
|
+
xAxis: string[];
|
|
46
|
+
series: {
|
|
47
|
+
values: string[];
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
export interface DataSourceProps {
|
|
51
|
+
[x: string]: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ColumnsProps {
|
|
54
|
+
key: string;
|
|
55
|
+
title: string;
|
|
56
|
+
dataIndex: string;
|
|
57
|
+
}
|
|
58
|
+
export interface TableDataProps {
|
|
59
|
+
columns?: ColumnsProps[];
|
|
60
|
+
dataSource?: DataSourceProps[];
|
|
61
|
+
}
|
|
62
|
+
export declare const AttributableContext: import("react").Context<any>;
|
package/es/types.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
function setOptionWapper(url, options) {
|
|
3
|
+
var reqOption = _.cloneDeep(options);
|
|
4
|
+
if (/^\/v1|\.jsp$/.test(url)) {
|
|
5
|
+
if (reqOption.headers && reqOption.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
|
|
6
|
+
return reqOption;
|
|
7
|
+
}
|
|
8
|
+
reqOption.headers = {
|
|
9
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
10
|
+
};
|
|
11
|
+
var transformRequest = function transformRequest(param) {
|
|
12
|
+
var arr = [];
|
|
13
|
+
for (var key in param) {
|
|
14
|
+
arr.push("".concat(key, "=").concat(encodeURIComponent(param[key])));
|
|
15
|
+
}
|
|
16
|
+
return arr.join('&');
|
|
17
|
+
};
|
|
18
|
+
reqOption.data = transformRequest(options.data);
|
|
19
|
+
}
|
|
20
|
+
return reqOption;
|
|
21
|
+
}
|
|
22
|
+
export var requestConfig = {
|
|
23
|
+
request: {
|
|
24
|
+
optionsWrapper: function optionsWrapper(url, options) {
|
|
25
|
+
var newUrl = url;
|
|
26
|
+
var reqOption = options;
|
|
27
|
+
var ajaxUrlReg = '/analysis/api/common/proxy';
|
|
28
|
+
if (/^\/v1|\.jsp$/.test(url)) {
|
|
29
|
+
if (ajaxUrlReg && !url.includes(ajaxUrlReg)) {
|
|
30
|
+
newUrl = ajaxUrlReg + url;
|
|
31
|
+
reqOption = setOptionWapper(url, options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
url: newUrl,
|
|
36
|
+
options: reqOption
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EnvProp, EventGroup, UserProp } from '@zgfe/business-lib/es/attributeSelector/types';
|
|
2
|
+
interface OldSearchData {
|
|
3
|
+
app_id: number;
|
|
4
|
+
platform: number;
|
|
5
|
+
analysis_index: string;
|
|
6
|
+
module: 'event';
|
|
7
|
+
chartType: 'string';
|
|
8
|
+
event_attr?: string;
|
|
9
|
+
user_attr?: string;
|
|
10
|
+
event?: number;
|
|
11
|
+
time: {
|
|
12
|
+
dimension_date: string;
|
|
13
|
+
begin_date: string | number;
|
|
14
|
+
end_date: string | number;
|
|
15
|
+
} | string;
|
|
16
|
+
event_group_id?: number;
|
|
17
|
+
user_group: string;
|
|
18
|
+
analysis_attr?: string;
|
|
19
|
+
dimension_sub?: string;
|
|
20
|
+
filter_condition?: {
|
|
21
|
+
eventCondition?: {
|
|
22
|
+
eventSingleConditions?: [
|
|
23
|
+
{
|
|
24
|
+
attrConditions: OldEventCondition[];
|
|
25
|
+
environmentConditions: OldCondition[];
|
|
26
|
+
eventId: number;
|
|
27
|
+
eventName: string;
|
|
28
|
+
extra?: string;
|
|
29
|
+
happenTime?: {
|
|
30
|
+
name: string;
|
|
31
|
+
operator: string;
|
|
32
|
+
params: any[];
|
|
33
|
+
type: number;
|
|
34
|
+
};
|
|
35
|
+
isNew?: boolean;
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
operator: 'and';
|
|
39
|
+
};
|
|
40
|
+
userCondition: {
|
|
41
|
+
userSingleConditions: OldUserCondition[];
|
|
42
|
+
operator: 'and';
|
|
43
|
+
};
|
|
44
|
+
} | string;
|
|
45
|
+
}
|
|
46
|
+
interface OldCondition {
|
|
47
|
+
attrId: number;
|
|
48
|
+
name: string;
|
|
49
|
+
type: number;
|
|
50
|
+
category: 'fixed' | 'custom';
|
|
51
|
+
operator: string;
|
|
52
|
+
text: string;
|
|
53
|
+
params: any[];
|
|
54
|
+
}
|
|
55
|
+
interface OldUserCondition extends OldCondition {
|
|
56
|
+
isUserProp: boolean;
|
|
57
|
+
subtype?: number;
|
|
58
|
+
}
|
|
59
|
+
interface OldEventCondition extends OldCondition {
|
|
60
|
+
isEventProp: boolean;
|
|
61
|
+
eventId: number;
|
|
62
|
+
eventName: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function transferEventSearchData(params: OldSearchData, userPropList?: UserProp[], eventGroupList?: EventGroup[], eventEnvList?: EnvProp[]): any;
|
|
65
|
+
export {};
|