@zgfe/modules-event 1.0.29-zhongyuan1.0 → 1.0.29-zhongyuanE.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/renderContent/styles/index.less +0 -19
- package/package.json +3 -3
- package/es/components/eventFilter/index.d.ts +0 -5
- package/es/components/eventFilter/index.js +0 -310
- package/es/components/eventFilter/setCascade.d.ts +0 -3
- package/es/components/eventFilter/setCascade.js +0 -286
- package/es/components/eventFilter/types.d.ts +0 -21
- package/es/components/eventFilter/types.js +0 -1
- package/es/components/index.d.ts +0 -4
- package/es/components/index.js +0 -4
- package/es/components/renderContent/index.d.ts +0 -5
- package/es/components/renderContent/index.js +0 -46
- package/es/components/renderContent/types.d.ts +0 -8
- package/es/components/renderContent/types.js +0 -1
- package/es/components/searchPanel/index.d.ts +0 -5
- package/es/components/searchPanel/index.js +0 -131
- package/es/components/searchPanel/styles/index.less +0 -22
- package/es/components/searchPanel/types.d.ts +0 -28
- package/es/components/searchPanel/types.js +0 -1
- package/es/components/table/index.d.ts +0 -6
- package/es/components/table/index.js +0 -319
- package/es/components/table/styles/index.css +0 -236
- package/es/components/table/styles/index.less +0 -249
- package/es/components/table/types.d.ts +0 -10
- package/es/components/table/types.js +0 -1
- package/es/components/topBar/index.d.ts +0 -10
- package/es/components/topBar/index.js +0 -174
- package/es/components/topBar/styles/index.less +0 -58
- package/es/components/topBar/types.d.ts +0 -8
- package/es/components/topBar/types.js +0 -1
- package/es/constants/apis.d.ts +0 -10
- package/es/constants/apis.js +0 -10
- package/es/constants/chart.d.ts +0 -2
- package/es/constants/chart.js +0 -31
- package/es/constants/color.d.ts +0 -1
- package/es/constants/color.js +0 -1
- package/es/constants/fields.d.ts +0 -251
- package/es/constants/fields.js +0 -177
- package/es/constants/index.d.ts +0 -6
- package/es/constants/index.js +0 -6
- package/es/constants/initData.d.ts +0 -2
- package/es/constants/initData.js +0 -9
- package/es/index.d.ts +0 -6
- package/es/index.js +0 -5
- package/es/modules/chart/demo/data.d.ts +0 -73
- package/es/modules/chart/demo/data.js +0 -484
- package/es/modules/chart/demo/index.d.ts +0 -3
- package/es/modules/chart/demo/index.js +0 -51
- package/es/modules/chart/demo/panel.d.ts +0 -3
- package/es/modules/chart/demo/panel.js +0 -16
- package/es/modules/chart/index.d.ts +0 -4
- package/es/modules/chart/index.js +0 -253
- package/es/modules/chart/types.d.ts +0 -19
- package/es/modules/chart/types.js +0 -1
- package/es/modules/content/index.d.ts +0 -5
- package/es/modules/content/index.js +0 -300
- package/es/modules/content/styles/index.less +0 -19
- package/es/modules/content/types.d.ts +0 -11
- package/es/modules/content/types.js +0 -1
- package/es/modules/content/utils.d.ts +0 -17
- package/es/modules/content/utils.js +0 -107
- package/es/modules/home/demo/create.d.ts +0 -3
- package/es/modules/home/demo/create.js +0 -58
- package/es/modules/home/demo/edit.d.ts +0 -3
- package/es/modules/home/demo/edit.js +0 -73
- package/es/modules/home/demo/index.d.ts +0 -4
- package/es/modules/home/demo/index.js +0 -55
- package/es/modules/home/demo/scene.d.ts +0 -3
- package/es/modules/home/demo/scene.js +0 -89
- package/es/modules/home/demo/styles/index.less +0 -33
- package/es/modules/home/index.d.ts +0 -5
- package/es/modules/home/index.js +0 -184
- package/es/modules/home/styles/index.less +0 -49
- package/es/modules/home/types.d.ts +0 -34
- package/es/modules/home/types.js +0 -1
- package/es/modules/topPanel/index.d.ts +0 -5
- package/es/modules/topPanel/index.js +0 -246
- package/es/modules/topPanel/styles/index.less +0 -50
- package/es/modules/topPanel/types.d.ts +0 -46
- package/es/modules/topPanel/types.js +0 -1
- package/es/style/theme.d.ts +0 -15
- package/es/style/theme.js +0 -14
- package/es/types.d.ts +0 -86
- package/es/types.js +0 -6
- package/es/utils/ajaxConfig.d.ts +0 -8
- package/es/utils/ajaxConfig.js +0 -40
- package/es/utils/base64.d.ts +0 -23
- package/es/utils/base64.js +0 -125
- package/es/utils/formData.d.ts +0 -20
- package/es/utils/formData.js +0 -406
- package/es/utils/util.d.ts +0 -32
- package/es/utils/util.js +0 -139
package/es/utils/base64.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
_keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
|
|
3
|
-
_utf8_encode: function _utf8_encode(string) {
|
|
4
|
-
string = string.replace(/\r\n/g, '\n');
|
|
5
|
-
var utftext = '';
|
|
6
|
-
for (var n = 0; n < string.length; n++) {
|
|
7
|
-
var c = string.charCodeAt(n);
|
|
8
|
-
if (c < 128) {
|
|
9
|
-
utftext += String.fromCharCode(c);
|
|
10
|
-
} else if (c > 127 && c < 2048) {
|
|
11
|
-
utftext += String.fromCharCode(c >> 6 | 192);
|
|
12
|
-
utftext += String.fromCharCode(c & 63 | 128);
|
|
13
|
-
} else {
|
|
14
|
-
utftext += String.fromCharCode(c >> 12 | 224);
|
|
15
|
-
utftext += String.fromCharCode(c >> 6 & 63 | 128);
|
|
16
|
-
utftext += String.fromCharCode(c & 63 | 128);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return utftext;
|
|
20
|
-
},
|
|
21
|
-
_utf8_decode: function _utf8_decode(utftext) {
|
|
22
|
-
var string = '';
|
|
23
|
-
var i = 0,
|
|
24
|
-
c = 0,
|
|
25
|
-
c2 = 0,
|
|
26
|
-
c3 = 0;
|
|
27
|
-
while (i < utftext.length) {
|
|
28
|
-
c = utftext.charCodeAt(i);
|
|
29
|
-
if (c < 128) {
|
|
30
|
-
string += String.fromCharCode(c);
|
|
31
|
-
i++;
|
|
32
|
-
} else if (c > 191 && c < 224) {
|
|
33
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
34
|
-
string += String.fromCharCode((c & 31) << 6 | c2 & 63);
|
|
35
|
-
i += 2;
|
|
36
|
-
} else {
|
|
37
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
38
|
-
c3 = utftext.charCodeAt(i + 2);
|
|
39
|
-
string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
|
|
40
|
-
i += 3;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return string;
|
|
44
|
-
},
|
|
45
|
-
encode: function encode(input, type) {
|
|
46
|
-
var output = '';
|
|
47
|
-
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
48
|
-
var i = 0;
|
|
49
|
-
input = this._utf8_encode(input);
|
|
50
|
-
while (i < input.length) {
|
|
51
|
-
chr1 = input.charCodeAt(i++);
|
|
52
|
-
chr2 = input.charCodeAt(i++);
|
|
53
|
-
chr3 = input.charCodeAt(i++);
|
|
54
|
-
enc1 = chr1 >> 2;
|
|
55
|
-
enc2 = (chr1 & 3) << 4 | chr2 >> 4;
|
|
56
|
-
enc3 = (chr2 & 15) << 2 | chr3 >> 6;
|
|
57
|
-
enc4 = chr3 & 63;
|
|
58
|
-
if (isNaN(chr2)) {
|
|
59
|
-
enc3 = enc4 = 64;
|
|
60
|
-
} else if (isNaN(chr3)) {
|
|
61
|
-
enc4 = 64;
|
|
62
|
-
}
|
|
63
|
-
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
|
64
|
-
}
|
|
65
|
-
if (type) {
|
|
66
|
-
return output.replace(/[\+]?[\/]?[\=]?/g, '');
|
|
67
|
-
} else {
|
|
68
|
-
return output.replace(/\+/g, '-');
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
decode: function decode(input) {
|
|
72
|
-
input = input.replace(/\-/g, '+');
|
|
73
|
-
var output = '';
|
|
74
|
-
var chr1, chr2, chr3;
|
|
75
|
-
var enc1, enc2, enc3, enc4;
|
|
76
|
-
var i = 0;
|
|
77
|
-
while (i < input.length) {
|
|
78
|
-
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
|
79
|
-
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
|
80
|
-
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
|
81
|
-
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
|
82
|
-
chr1 = enc1 << 2 | enc2 >> 4;
|
|
83
|
-
chr2 = (enc2 & 15) << 4 | enc3 >> 2;
|
|
84
|
-
chr3 = (enc3 & 3) << 6 | enc4;
|
|
85
|
-
output = output + String.fromCharCode(chr1);
|
|
86
|
-
if (enc3 != 64) {
|
|
87
|
-
output = output + String.fromCharCode(chr2);
|
|
88
|
-
}
|
|
89
|
-
if (enc4 != 64) {
|
|
90
|
-
output = output + String.fromCharCode(chr3);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
output = this._utf8_decode(output);
|
|
94
|
-
return output;
|
|
95
|
-
},
|
|
96
|
-
_$: [''],
|
|
97
|
-
pw: '0&Gqs0a5',
|
|
98
|
-
gString: function gString(O6b8, O492) {
|
|
99
|
-
var dfc4 = Array(0x100);
|
|
100
|
-
var O26e = Array(0x100);
|
|
101
|
-
var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
|
|
102
|
-
var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
|
|
103
|
-
for (var O98c = 0x0; O98c < 0x100; O98c++) {
|
|
104
|
-
dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
|
|
105
|
-
O26e[O98c] = O98c;
|
|
106
|
-
}
|
|
107
|
-
for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
|
|
108
|
-
O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
|
|
109
|
-
var O23f = O26e[O98c];
|
|
110
|
-
O26e[O98c] = O26e[O8cf];
|
|
111
|
-
O26e[O8cf] = O23f;
|
|
112
|
-
}
|
|
113
|
-
var ac35 = this._$[0];
|
|
114
|
-
for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
|
|
115
|
-
O577 = (O577 + 0x1) % 0x100;
|
|
116
|
-
O8cf = (O8cf + O26e[O577]) % 0x100;
|
|
117
|
-
var tmp = O26e[O577];
|
|
118
|
-
O26e[O577] = O26e[O8cf];
|
|
119
|
-
O26e[O8cf] = tmp;
|
|
120
|
-
var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
|
|
121
|
-
ac35 += String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](O6b8[O98c]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']() ^ O3d6);
|
|
122
|
-
}
|
|
123
|
-
return ac35;
|
|
124
|
-
}
|
|
125
|
-
};
|
package/es/utils/formData.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
|
-
import type { ColumnsType } from 'antd/es/table';
|
|
3
|
-
import { eventChartProps } from '../modules/chart/types';
|
|
4
|
-
import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSelector/types';
|
|
5
|
-
import { ResponseDataProps, SearchValue } from '../types';
|
|
6
|
-
import { EventProps } from '../modules/home/types';
|
|
7
|
-
import '../style/index.less';
|
|
8
|
-
export declare function sortOriginalData(data: any, sorter: any): any;
|
|
9
|
-
export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], userGroup: number[] | string[], searchData: SearchValue, showList: string[], onShowCallback: Function, onClickToDetailCallback: Function, onSelectEvent?: (id: number, name: string) => void): ColumnsType<EventProps.ColumnsDataType>;
|
|
10
|
-
export declare function getChartDataEventAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
|
|
11
|
-
export declare function getEventAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
|
|
12
|
-
export declare function getEventAliasId(name: any, eventGroupList: EventGroup[] | undefined): number;
|
|
13
|
-
export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
|
|
14
|
-
export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
|
|
15
|
-
export declare function marketEventGroupList(eventGroupList: EventGroup[] | undefined): string[];
|
|
16
|
-
export declare function getWarningId(searchData: SearchValue, eventData: ResponseDataProps, eventGroupList: EventGroup[] | undefined): number;
|
|
17
|
-
export declare function getAttrLabel(attrData: AttrConditionTypes.ItemValue, eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined): string | undefined;
|
|
18
|
-
export declare function formTableData(originalData: ResponseDataProps, userGroups: number[], attrNum: number, showList?: string[]): EventProps.ColumnsDataType[];
|
|
19
|
-
export declare function getDefaultShow(source: ResponseDataProps): string[];
|
|
20
|
-
export declare function getShowColor(source: ResponseDataProps, showList: string[]): string[];
|
package/es/utils/formData.js
DELETED
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
-
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; }
|
|
7
|
-
import { util, IconFont } from '@zgfe/business-lib';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { message } from 'antd';
|
|
10
|
-
import _ from 'lodash';
|
|
11
|
-
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
12
|
-
import { chartColors } from '../constants/color';
|
|
13
|
-
import { PropCategory } from '@zgfe/business-lib/es/attributeSelector/types';
|
|
14
|
-
import { Tooltip } from 'antd';
|
|
15
|
-
import '../style/index.less';
|
|
16
|
-
import { getValue } from '../modules/content/utils';
|
|
17
|
-
var classPrefix = 'event-form-data';
|
|
18
|
-
export function sortOriginalData(data, sorter) {
|
|
19
|
-
var columnKey = sorter.columnKey,
|
|
20
|
-
order = sorter.order;
|
|
21
|
-
if (columnKey && order) {
|
|
22
|
-
var sortedData = _toConsumableArray(data).sort(function (a, b) {
|
|
23
|
-
if (order === 'ascend') {
|
|
24
|
-
return a[columnKey] - b[columnKey];
|
|
25
|
-
} else if (order === 'descend') {
|
|
26
|
-
return b[columnKey] - a[columnKey];
|
|
27
|
-
}
|
|
28
|
-
return 0;
|
|
29
|
-
});
|
|
30
|
-
return sortedData;
|
|
31
|
-
} else {
|
|
32
|
-
return data;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, userGroup, searchData, showList, onShowCallback, onClickToDetailCallback, onSelectEvent) {
|
|
36
|
-
var marketEventNameList = marketEventGroupList(eventGroupList);
|
|
37
|
-
var data = [{
|
|
38
|
-
title: '显示',
|
|
39
|
-
width: 80,
|
|
40
|
-
dataIndex: 'nameGroup',
|
|
41
|
-
ellipsis: true,
|
|
42
|
-
key: 'nameGroup',
|
|
43
|
-
align: 'center',
|
|
44
|
-
className: "".concat(classPrefix, "-table-td"),
|
|
45
|
-
fixed: 'left',
|
|
46
|
-
render: function render(_, record) {
|
|
47
|
-
var isActive = showList.includes(record.nameGroup);
|
|
48
|
-
var cannotClick = showList.length >= 10 && !isActive;
|
|
49
|
-
return record.color ? /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "".concat(classPrefix, "-table-td-show"),
|
|
51
|
-
onClick: function onClick() {
|
|
52
|
-
if (cannotClick) return;
|
|
53
|
-
onShowCallback(record.nameGroup);
|
|
54
|
-
}
|
|
55
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
56
|
-
style: {
|
|
57
|
-
background: isActive ? record.color : '#D9D9D9'
|
|
58
|
-
}
|
|
59
|
-
})) : /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: "".concat(classPrefix, "-table-td-show")
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}];
|
|
64
|
-
if (!(searchData === null || searchData === void 0 ? void 0 : searchData.analysisSubject) && (userGroup.length > 1 || userGroup[0] !== 0)) {
|
|
65
|
-
data.push({
|
|
66
|
-
title: '用户群',
|
|
67
|
-
width: 150,
|
|
68
|
-
dataIndex: 'userGroup',
|
|
69
|
-
key: 'userGroup',
|
|
70
|
-
ellipsis: true,
|
|
71
|
-
fixed: 'left',
|
|
72
|
-
render: function render(text) {
|
|
73
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: "tooltip-userGroup-box"
|
|
75
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
76
|
-
title: text
|
|
77
|
-
}, /*#__PURE__*/React.createElement("div", null, text)));
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
if (searchData.dimension) {
|
|
82
|
-
var _getValue;
|
|
83
|
-
data.push({
|
|
84
|
-
title: (_getValue = getValue(searchData.dimension, eventGroupList, eventEnvList, userPropList)) === null || _getValue === void 0 ? void 0 : _getValue.label,
|
|
85
|
-
width: 180,
|
|
86
|
-
dataIndex: 'dimension',
|
|
87
|
-
key: 'dimension',
|
|
88
|
-
ellipsis: true,
|
|
89
|
-
fixed: 'left',
|
|
90
|
-
render: function render(val) {
|
|
91
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: "tooltip-name-box"
|
|
93
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
94
|
-
title: val
|
|
95
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
96
|
-
className: "tooltip-name-box-market"
|
|
97
|
-
}, val)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
98
|
-
title: "\u590D\u5236"
|
|
99
|
-
}, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
100
|
-
text: val,
|
|
101
|
-
onCopy: function onCopy() {
|
|
102
|
-
return message.success('复制成功!');
|
|
103
|
-
}
|
|
104
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
105
|
-
type: "fuzhi1"
|
|
106
|
-
}))));
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
if (searchData.id && !searchData.dimension || !searchData.id) {
|
|
111
|
-
data.push({
|
|
112
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
113
|
-
style: {
|
|
114
|
-
paddingLeft: '16px'
|
|
115
|
-
}
|
|
116
|
-
}, "\u4E8B\u4EF6"),
|
|
117
|
-
width: 180,
|
|
118
|
-
dataIndex: 'eventName',
|
|
119
|
-
key: 'eventName',
|
|
120
|
-
ellipsis: true,
|
|
121
|
-
fixed: 'left',
|
|
122
|
-
render: function render(val, record) {
|
|
123
|
-
var _val = val;
|
|
124
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: "tooltip-name-box"
|
|
126
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
127
|
-
title: _val
|
|
128
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
className: "tooltip-name-box-market",
|
|
130
|
-
onClick: function onClick() {
|
|
131
|
-
!record.isAdd && onSelectEvent && onSelectEvent(getEventAliasId(record === null || record === void 0 ? void 0 : record.originalName, eventGroupList), val);
|
|
132
|
-
}
|
|
133
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
134
|
-
type: "shoucang",
|
|
135
|
-
className: "".concat(marketEventNameList.indexOf(_val) === -1 ? 'notshoucang' : '')
|
|
136
|
-
}), util.strMiddleSplit(_val))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
137
|
-
title: "\u590D\u5236"
|
|
138
|
-
}, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
139
|
-
text: _val,
|
|
140
|
-
onCopy: function onCopy() {
|
|
141
|
-
return message.success('复制成功!');
|
|
142
|
-
}
|
|
143
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
144
|
-
type: "fuzhi1"
|
|
145
|
-
}))));
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
data.push({
|
|
150
|
-
title: '合计',
|
|
151
|
-
width: 50,
|
|
152
|
-
dataIndex: 'attrSum',
|
|
153
|
-
ellipsis: true,
|
|
154
|
-
key: 'attrSum',
|
|
155
|
-
align: 'center',
|
|
156
|
-
className: "".concat(classPrefix, "-table-td"),
|
|
157
|
-
fixed: 'left',
|
|
158
|
-
render: function render(text) {
|
|
159
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
160
|
-
className: "tooltip-userGroup-box"
|
|
161
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
162
|
-
title: text
|
|
163
|
-
}, /*#__PURE__*/React.createElement("div", null, text)));
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
var _loop = function _loop(i) {
|
|
167
|
-
var value = columnData[i];
|
|
168
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
169
|
-
value = value.replace(/\d{4}-/, '');
|
|
170
|
-
} else if (/^\d{4}-\d{2}-\d{2}\|\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
171
|
-
var dates = value.match(/\d{4}-\d{2}-\d{2}/g);
|
|
172
|
-
value = dates ? dates[0].replace(/\d{4}-/, '') + '~' + dates[1].replace(/\d{4}-/, '') : value;
|
|
173
|
-
} else {
|
|
174
|
-
value = util.strMiddleSplit(value);
|
|
175
|
-
if (/:/.test(value)) {
|
|
176
|
-
value = value.replace(/\d{4}-\d{2}-\d{2}\s/, '');
|
|
177
|
-
} else if (/,/.test(value)) {
|
|
178
|
-
value = value.replace(/,/g, '-');
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
data.push({
|
|
182
|
-
title: value,
|
|
183
|
-
align: 'center',
|
|
184
|
-
ellipsis: true,
|
|
185
|
-
dataIndex: "field".concat(i),
|
|
186
|
-
defaultSortOrder: i === columnData.length - 1 ? 'descend' : null,
|
|
187
|
-
className: "".concat(classPrefix, "-table-event-data"),
|
|
188
|
-
sorter: function sorter(a, b) {
|
|
189
|
-
return a.isAdd || b.isAdd ? 0 : a["field".concat(i)] - b["field".concat(i)];
|
|
190
|
-
},
|
|
191
|
-
render: function render(text, record) {
|
|
192
|
-
var click = text > 0 && (searchData.analysisIndex === 'number' ? true : false);
|
|
193
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
194
|
-
className: "".concat(classPrefix, "-table-td-link ").concat(!record.isAdd && click ? '' : 'not-to-detail'),
|
|
195
|
-
onClick: function onClick() {
|
|
196
|
-
!record.isAdd && click ? onClickToDetailCallback(record, columnData[i], text) : null;
|
|
197
|
-
}
|
|
198
|
-
}, !record.isAdd && click && /*#__PURE__*/React.createElement(IconFont, {
|
|
199
|
-
type: "a-yanjingkai"
|
|
200
|
-
}), text);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
for (var i = 0; i < columnData.length; i++) {
|
|
205
|
-
_loop(i);
|
|
206
|
-
}
|
|
207
|
-
return data;
|
|
208
|
-
}
|
|
209
|
-
export function getChartDataEventAliasName(dataSource, eventGroupList) {
|
|
210
|
-
var data = _.cloneDeep(dataSource);
|
|
211
|
-
var series = [];
|
|
212
|
-
data === null || data === void 0 ? void 0 : data.series.map(function (item) {
|
|
213
|
-
item.originalNames = item.names;
|
|
214
|
-
item.names = item.names.length > 1 ? [item.names[0], getEventAliasName(item.names[1], eventGroupList)] : [getEventAliasName(item.names[0], eventGroupList)];
|
|
215
|
-
series.push(item);
|
|
216
|
-
});
|
|
217
|
-
data.series = series;
|
|
218
|
-
return data;
|
|
219
|
-
}
|
|
220
|
-
export function getEventAliasName(name, eventGroupList) {
|
|
221
|
-
var aliasName = '';
|
|
222
|
-
eventGroupList && eventGroupList.map(function (item) {
|
|
223
|
-
item.eventList.map(function (_item) {
|
|
224
|
-
if (_item.name === name) {
|
|
225
|
-
aliasName = _item.alias ? _item.alias : name;
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
return aliasName || name;
|
|
230
|
-
}
|
|
231
|
-
export function getEventAliasId(name, eventGroupList) {
|
|
232
|
-
var eventId = -1;
|
|
233
|
-
eventGroupList && eventGroupList.map(function (item) {
|
|
234
|
-
item.eventList.map(function (_item) {
|
|
235
|
-
if (_item.name === name) {
|
|
236
|
-
eventId = _item.id;
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
return eventId;
|
|
241
|
-
}
|
|
242
|
-
export function getSortData(data) {
|
|
243
|
-
var series = data === null || data === void 0 ? void 0 : data.series;
|
|
244
|
-
var sort = function sort(obj1, obj2) {
|
|
245
|
-
var val1 = obj1.values[0];
|
|
246
|
-
var val2 = obj2.values[0];
|
|
247
|
-
if (val1 < val2) {
|
|
248
|
-
return 1;
|
|
249
|
-
} else if (val1 > val2) {
|
|
250
|
-
return -1;
|
|
251
|
-
} else {
|
|
252
|
-
return 0;
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
series.sort(sort);
|
|
256
|
-
return data;
|
|
257
|
-
}
|
|
258
|
-
export function getUserGroupsCompareData(data) {
|
|
259
|
-
if ((data === null || data === void 0 ? void 0 : data.series.length) <= 0) {
|
|
260
|
-
return data;
|
|
261
|
-
} else {
|
|
262
|
-
var _data = _.cloneDeep(data);
|
|
263
|
-
var _series = [];
|
|
264
|
-
_data === null || _data === void 0 ? void 0 : _data.series.map(function (item, index) {
|
|
265
|
-
_series.push(item);
|
|
266
|
-
_data === null || _data === void 0 ? void 0 : _data.series.map(function (_item, _index) {
|
|
267
|
-
if (item.names[1] === _item.names[1] && index !== _index) {
|
|
268
|
-
_series.push(_item);
|
|
269
|
-
_data === null || _data === void 0 ? true : delete _data.series[_index];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
_data === null || _data === void 0 ? true : delete _data.series[index];
|
|
273
|
-
});
|
|
274
|
-
_data.series = _series;
|
|
275
|
-
return _data;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
export function marketEventGroupList(eventGroupList) {
|
|
279
|
-
var _marketName = [];
|
|
280
|
-
eventGroupList && eventGroupList.map(function (item) {
|
|
281
|
-
item.eventList.map(function (_item) {
|
|
282
|
-
if (_item.marked) _marketName.push(_item.name);
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
return _marketName;
|
|
286
|
-
}
|
|
287
|
-
export function getWarningId(searchData, eventData, eventGroupList) {
|
|
288
|
-
var id = -1;
|
|
289
|
-
if (eventData && eventData.series.length > 0) {
|
|
290
|
-
if (searchData === null || searchData === void 0 ? void 0 : searchData.id) {
|
|
291
|
-
id = searchData === null || searchData === void 0 ? void 0 : searchData.id;
|
|
292
|
-
} else {
|
|
293
|
-
if (eventGroupList && eventGroupList.length > 0 && eventData) {
|
|
294
|
-
eventGroupList.map(function (item) {
|
|
295
|
-
item.eventList.map(function (_item) {
|
|
296
|
-
var _eventData$series$, _searchData$userGroup;
|
|
297
|
-
var _name = eventData === null || eventData === void 0 ? void 0 : (_eventData$series$ = eventData.series[0]) === null || _eventData$series$ === void 0 ? void 0 : _eventData$series$.names[(searchData === null || searchData === void 0 ? void 0 : (_searchData$userGroup = searchData.userGroup) === null || _searchData$userGroup === void 0 ? void 0 : _searchData$userGroup.length) > 1 ? 1 : 0];
|
|
298
|
-
if (_item.name === _name || _item.alias === _name) {
|
|
299
|
-
id = _item.id;
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
return id;
|
|
307
|
-
}
|
|
308
|
-
export function getAttrLabel(attrData, eventGroupList, userPropList, eventEnvList) {
|
|
309
|
-
if (!attrData) return;
|
|
310
|
-
var type = attrData.propCategory;
|
|
311
|
-
var attrLabel = '';
|
|
312
|
-
if (type === PropCategory.EventProp) {
|
|
313
|
-
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
314
|
-
group.eventList.forEach(function (event) {
|
|
315
|
-
event.attrList.forEach(function (attr) {
|
|
316
|
-
if (attr.id === attrData.attrId) {
|
|
317
|
-
attrLabel = attr.label;
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
} else {
|
|
324
|
-
var attrList = type === PropCategory.UserProp ? userPropList : eventEnvList;
|
|
325
|
-
attrList === null || attrList === void 0 ? void 0 : attrList.forEach(function (attr) {
|
|
326
|
-
if (attrData.attrName === attr.name) {
|
|
327
|
-
attrLabel = attr.label;
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
return attrLabel;
|
|
333
|
-
}
|
|
334
|
-
export function formTableData(originalData, userGroups, attrNum, showList) {
|
|
335
|
-
var series = originalData.series;
|
|
336
|
-
var result = [];
|
|
337
|
-
series.forEach(function (item, index) {
|
|
338
|
-
var _item$names = item.names,
|
|
339
|
-
names = _item$names === void 0 ? [] : _item$names,
|
|
340
|
-
values = item.values,
|
|
341
|
-
_item$originalNames = item.originalNames,
|
|
342
|
-
originalNames = _item$originalNames === void 0 ? [] : _item$originalNames;
|
|
343
|
-
var nameStr = names.join(',');
|
|
344
|
-
if (showList) {
|
|
345
|
-
if (!showList.includes(nameStr)) {
|
|
346
|
-
return false;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
var len = names.length;
|
|
350
|
-
var haveUserGroup = userGroups.length > 1 || userGroups[0] !== 0;
|
|
351
|
-
var name = names[len - 1];
|
|
352
|
-
var originalName = originalNames[len - 1];
|
|
353
|
-
var userGroup = haveUserGroup ? names[len - 2] : '所有用户';
|
|
354
|
-
var nameGroup = names.join(',');
|
|
355
|
-
var color = chartColors[index % 20];
|
|
356
|
-
var data = {
|
|
357
|
-
id: Math.random(),
|
|
358
|
-
name: name,
|
|
359
|
-
userGroup: userGroup,
|
|
360
|
-
nameGroup: nameGroup,
|
|
361
|
-
color: color,
|
|
362
|
-
attrSum: item.attrSum
|
|
363
|
-
};
|
|
364
|
-
if (attrNum) {
|
|
365
|
-
data["dimension"] = name;
|
|
366
|
-
data['originalName'] = originalName;
|
|
367
|
-
} else {
|
|
368
|
-
data["eventName"] = name;
|
|
369
|
-
data["originalName"] = originalName;
|
|
370
|
-
}
|
|
371
|
-
values.forEach(function (item, index) {
|
|
372
|
-
data["field".concat(index)] = item;
|
|
373
|
-
});
|
|
374
|
-
result.push(data);
|
|
375
|
-
});
|
|
376
|
-
return result;
|
|
377
|
-
}
|
|
378
|
-
export function getDefaultShow(source) {
|
|
379
|
-
if (source.series) {
|
|
380
|
-
var result = [];
|
|
381
|
-
source.series.forEach(function (item, index) {
|
|
382
|
-
if (index < 10) {
|
|
383
|
-
if (item.names) {
|
|
384
|
-
result.push(item.names.join(','));
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
return result;
|
|
389
|
-
}
|
|
390
|
-
return [];
|
|
391
|
-
}
|
|
392
|
-
export function getShowColor(source, showList) {
|
|
393
|
-
var colors = [];
|
|
394
|
-
source.series.forEach(function (item, index) {
|
|
395
|
-
if (item.names) {
|
|
396
|
-
var name = item.names.join(',');
|
|
397
|
-
showList.forEach(function (show) {
|
|
398
|
-
if (name === show) {
|
|
399
|
-
colors.push(chartColors[index % 20]);
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
return colors;
|
|
406
|
-
}
|
package/es/utils/util.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare let util: {
|
|
2
|
-
dayTime: number;
|
|
3
|
-
type(obj: any): string;
|
|
4
|
-
isObject(obj: any): boolean;
|
|
5
|
-
isArray(obj: any): boolean;
|
|
6
|
-
isString(obj: any): boolean;
|
|
7
|
-
isNumber(obj: any): boolean;
|
|
8
|
-
isDate(obj: any): boolean;
|
|
9
|
-
isFunction(obj: any): boolean;
|
|
10
|
-
isEqual(a?: {}, b?: {}): boolean;
|
|
11
|
-
equal(a: any, b: any): boolean;
|
|
12
|
-
random(min: number, max: number): number;
|
|
13
|
-
guid(): string;
|
|
14
|
-
mergeObject(defaults: {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
}, option: {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
}): {
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
};
|
|
21
|
-
toThousands(num: number): string;
|
|
22
|
-
toDoubleNumber(num: number): string;
|
|
23
|
-
dateFormat(date?: any, formatter?: string): string;
|
|
24
|
-
timeFormat(date: any, formatter: string | undefined, autoShort: any): string | undefined;
|
|
25
|
-
strMiddleSplit(str: string, config?: {
|
|
26
|
-
maxLength: number;
|
|
27
|
-
beginLength: number;
|
|
28
|
-
endLength: number;
|
|
29
|
-
replaceStr: string;
|
|
30
|
-
}): string;
|
|
31
|
-
};
|
|
32
|
-
export default util;
|