@zgfe/modules-interval 1.0.0-interval.4 → 1.0.0-interval.6
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/dist/esm/components/eventFilter/index.js +1 -1
- package/dist/esm/components/eventFilter/styles/index.less +1 -1
- package/dist/esm/components/renderContent/index.js +6 -7
- package/dist/esm/components/renderContent/styles/index.less +11 -0
- package/dist/esm/components/searchPanel/index.js +1 -0
- package/dist/esm/components/table/index.js +4 -62
- package/dist/esm/components/table/styles/index.less +1 -1
- package/dist/esm/components/topBar/index.js +1 -1
- package/dist/esm/components/topBar/styles/index.less +1 -1
- package/dist/esm/modules/chart/index.js +2 -3
- package/dist/esm/modules/content/index.js +4 -3
- package/dist/esm/modules/content/styles/index.less +1 -1
- package/dist/esm/modules/home/index.js +1 -1
- package/dist/esm/modules/home/styles/index.less +1 -1
- package/dist/esm/style/index.less +8 -1
- package/dist/esm/utils/formData.d.ts +24 -3
- package/dist/esm/utils/formData.js +49 -16
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
15
15
|
import { BizEventSelector, IconFont, BizAttrConditionGroup } from '@zgfe/business-lib';
|
|
16
16
|
import "./styles/index.less";
|
|
17
17
|
import _ from 'lodash';
|
|
18
|
-
var classPrefix = '
|
|
18
|
+
var classPrefix = 'interval-box';
|
|
19
19
|
var EventFilter = function EventFilter(props) {
|
|
20
20
|
// 筛选条件个数
|
|
21
21
|
var _useState = useState(0),
|
|
@@ -41,16 +41,15 @@ var ContentPanel = function ContentPanel(props) {
|
|
|
41
41
|
className: classPrefix
|
|
42
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
className: "".concat(classPrefix, "-chart-container")
|
|
44
|
-
}, eventData ? /*#__PURE__*/React.createElement(EventChart, {
|
|
45
|
-
dataSource: eventData,
|
|
46
|
-
params: searchData
|
|
47
|
-
}) : /*#__PURE__*/React.createElement(MiNone, {
|
|
48
|
-
label: "\u6682\u65E0\u6570\u636E"
|
|
49
|
-
})), eventData && (_eventData$app_data = eventData.app_data) !== null && _eventData$app_data !== void 0 && (_eventData$app_data$s = _eventData$app_data.series) !== null && _eventData$app_data$s !== void 0 && _eventData$app_data$s.length ? /*#__PURE__*/React.createElement(EventChart, {
|
|
44
|
+
}, eventData && (_eventData$app_data = eventData.app_data) !== null && _eventData$app_data !== void 0 && (_eventData$app_data$s = _eventData$app_data.series) !== null && _eventData$app_data$s !== void 0 && _eventData$app_data$s.length ? /*#__PURE__*/React.createElement(EventChart, {
|
|
50
45
|
type: "grid",
|
|
51
46
|
dataSource: eventData,
|
|
52
47
|
params: searchData,
|
|
53
48
|
onChangeShow: onChangeShow
|
|
54
|
-
}) :
|
|
49
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "".concat(classPrefix, "-MiNone")
|
|
51
|
+
}, /*#__PURE__*/React.createElement(MiNone, {
|
|
52
|
+
label: "\u6682\u65E0\u6570\u636E"
|
|
53
|
+
}))));
|
|
55
54
|
};
|
|
56
55
|
export default ContentPanel;
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
&-MiNone {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 368px;
|
|
22
|
+
padding: 24px 16px;
|
|
23
|
+
border: 1px solid #ecedf0;
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
&-spin-container {
|
|
17
28
|
display: flex;
|
|
18
29
|
align-items: center;
|
|
@@ -110,6 +110,7 @@ var SearchPanel = function SearchPanel(props) {
|
|
|
110
110
|
onChange: onChangeTime
|
|
111
111
|
}), /*#__PURE__*/React.createElement(BizSelect, {
|
|
112
112
|
multiple: true,
|
|
113
|
+
disable: displaySetupList.length === 0,
|
|
113
114
|
onChange: onDimensionChange,
|
|
114
115
|
className: "".concat(classPrefix, "-select"),
|
|
115
116
|
placeholder: "\u8BF7\u9009\u62E9\u663E\u793A\u8BBE\u7F6E",
|
|
@@ -12,7 +12,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { ajax, BizGlobalDataContext, BizTable, IconFont } from '@zgfe/business-lib';
|
|
14
14
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
15
|
-
// import 'highlight.js/styles/vs.css';
|
|
16
15
|
import base64 from "../../utils/base64";
|
|
17
16
|
import { Apis } from "../../constants";
|
|
18
17
|
import { message } from 'antd';
|
|
@@ -20,7 +19,7 @@ import { formTableData, getColumns } from "../../utils/formData";
|
|
|
20
19
|
import "./styles/index.less";
|
|
21
20
|
import { getValue, searchDataParams } from "../../modules/content/utils";
|
|
22
21
|
import { EventContext } from "../../types";
|
|
23
|
-
var classPrefix = 'mi-table';
|
|
22
|
+
var classPrefix = 'mi-interval-table';
|
|
24
23
|
var EventTable = function EventTable(props) {
|
|
25
24
|
var _dataSource$app_data2;
|
|
26
25
|
var dataSource = props.dataSource,
|
|
@@ -63,7 +62,7 @@ var EventTable = function EventTable(props) {
|
|
|
63
62
|
var sortData = formTableData(dataSource);
|
|
64
63
|
setSearchTable(sortData);
|
|
65
64
|
setSortTable(sortData);
|
|
66
|
-
setTableData(sortData
|
|
65
|
+
setTableData(sortData);
|
|
67
66
|
}, [dataSource]);
|
|
68
67
|
|
|
69
68
|
// 表格column
|
|
@@ -71,73 +70,16 @@ var EventTable = function EventTable(props) {
|
|
|
71
70
|
var _dataSource$app_data;
|
|
72
71
|
var _searchData$userGroup = searchData.userGroup,
|
|
73
72
|
userGroup = _searchData$userGroup === void 0 ? [0] : _searchData$userGroup;
|
|
74
|
-
|
|
75
|
-
// // 用户钻取
|
|
76
|
-
// const onClickToDetail = (item: EventProps.ColumnsDataType, time: string, count: number) => {
|
|
77
|
-
// let _time = time.split('|');
|
|
78
|
-
// let groupValue = '';
|
|
79
|
-
// // 有细分属性
|
|
80
|
-
// if (searchData.dimension && item.dimension) {
|
|
81
|
-
// groupValue = item.dimension;
|
|
82
|
-
// } else {
|
|
83
|
-
// // 有事件,无细分属性 || 事件概览
|
|
84
|
-
// eventGroupList?.forEach((group) => {
|
|
85
|
-
// group.eventList?.forEach((event) => {
|
|
86
|
-
// if (event.name === item.name) {
|
|
87
|
-
// groupValue = event.id.toString();
|
|
88
|
-
// }
|
|
89
|
-
// });
|
|
90
|
-
// });
|
|
91
|
-
// }
|
|
92
|
-
|
|
93
|
-
// onUserDrill &&
|
|
94
|
-
// onUserDrill(
|
|
95
|
-
// {
|
|
96
|
-
// appId: currentApp?.appId,
|
|
97
|
-
// platform: currentApp?.platform || 0,
|
|
98
|
-
// count,
|
|
99
|
-
// module: 'event',
|
|
100
|
-
// params: {
|
|
101
|
-
// groupValue,
|
|
102
|
-
// id: searchData.id,
|
|
103
|
-
// userGroup: searchData.userGroup,
|
|
104
|
-
// chartType: searchData.chartType,
|
|
105
|
-
// conditions: searchData.filters?.conditions,
|
|
106
|
-
// dimension: searchData.dimension,
|
|
107
|
-
// dataType: searchData.id ? 'event' : 'overview',
|
|
108
|
-
// time: {
|
|
109
|
-
// ...searchData.time,
|
|
110
|
-
// begin: _time[0],
|
|
111
|
-
// end: _time.length > 1 ? _time[1] : _time[0],
|
|
112
|
-
// },
|
|
113
|
-
// },
|
|
114
|
-
// source: 'EVENT',
|
|
115
|
-
// url: '/zg/web/v2/data/appEventBatch',
|
|
116
|
-
// },
|
|
117
|
-
// {
|
|
118
|
-
// source: 'EVENT',
|
|
119
|
-
// ...defaultSearch,
|
|
120
|
-
// name: panelName,
|
|
121
|
-
// data: searchData,
|
|
122
|
-
// },
|
|
123
|
-
// );
|
|
124
|
-
// };
|
|
125
|
-
var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$app_data = dataSource.app_data) === null || _dataSource$app_data === void 0 ? void 0 : _dataSource$app_data.x_axis) || [], userGroup, searchData, showList
|
|
126
|
-
// onClickToDetail,
|
|
127
|
-
);
|
|
128
|
-
|
|
73
|
+
var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$app_data = dataSource.app_data) === null || _dataSource$app_data === void 0 ? void 0 : _dataSource$app_data.x_axis) || [], dataSource, userGroup, searchData, showList);
|
|
129
74
|
return _getColumns;
|
|
130
75
|
}, [dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$app_data2 = dataSource.app_data) === null || _dataSource$app_data2 === void 0 ? void 0 : _dataSource$app_data2.x_axis, showList, sortTable, panelName]);
|
|
131
76
|
|
|
132
77
|
// 监听分页变化,如果页码发生变化则调用合并行方法
|
|
133
78
|
var onChangeTable = function onChangeTable(pagination) {
|
|
134
|
-
var startNum = (pagination.current - 1) * pagination.pageSize;
|
|
135
|
-
var endNum = pagination.current * pagination.pageSize;
|
|
136
79
|
setPageData({
|
|
137
80
|
pageSize: pagination.pageSize,
|
|
138
81
|
current: pagination.current
|
|
139
82
|
});
|
|
140
|
-
setTableData(searchTable === null || searchTable === void 0 ? void 0 : searchTable.slice(startNum, endNum));
|
|
141
83
|
};
|
|
142
84
|
|
|
143
85
|
// 下载数据
|
|
@@ -191,7 +133,7 @@ var EventTable = function EventTable(props) {
|
|
|
191
133
|
rowKey: "key",
|
|
192
134
|
scroll: {
|
|
193
135
|
x: 800,
|
|
194
|
-
y:
|
|
136
|
+
y: 550
|
|
195
137
|
},
|
|
196
138
|
onChange: onChangeTable
|
|
197
139
|
}));
|
|
@@ -16,7 +16,7 @@ import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/busine
|
|
|
16
16
|
import "./styles/index.less";
|
|
17
17
|
import { EventContext } from "../../types";
|
|
18
18
|
import { chartTypes, platformOption } from "../../constants/fields";
|
|
19
|
-
var classPrefix = 'modules-
|
|
19
|
+
var classPrefix = 'modules-interval-topbar';
|
|
20
20
|
var TopBar = function TopBar(props) {
|
|
21
21
|
// console.log('TopBar', props);
|
|
22
22
|
var _useContext = useContext(EventContext),
|
|
@@ -18,8 +18,7 @@ import { Apis } from "../../constants";
|
|
|
18
18
|
import { Spin } from 'antd';
|
|
19
19
|
import IntervalChart from "./intervalChart";
|
|
20
20
|
var EventChart = function EventChart(props) {
|
|
21
|
-
var _dataSource$app_data
|
|
22
|
-
console.log(888811111, props);
|
|
21
|
+
var _dataSource$app_data;
|
|
23
22
|
var params = props.params;
|
|
24
23
|
// 显示内容
|
|
25
24
|
var _useState = useState(),
|
|
@@ -82,7 +81,7 @@ var EventChart = function EventChart(props) {
|
|
|
82
81
|
className: "spin-container"
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
|
-
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$app_data = dataSource.app_data) !== null && _dataSource$app_data !== void 0 &&
|
|
84
|
+
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$app_data = dataSource.app_data) !== null && _dataSource$app_data !== void 0 && _dataSource$app_data.series.length)) {
|
|
86
85
|
return /*#__PURE__*/React.createElement(MiNone, {
|
|
87
86
|
label: "\u6682\u65E0\u6570\u636E"
|
|
88
87
|
});
|
|
@@ -25,7 +25,7 @@ var timer = 0;
|
|
|
25
25
|
var ajaxFlag = true;
|
|
26
26
|
var CancelToken = Request.CancelToken;
|
|
27
27
|
var cancel;
|
|
28
|
-
var classPrefix = '
|
|
28
|
+
var classPrefix = 'interval-content';
|
|
29
29
|
var EventContent = function EventContent(props) {
|
|
30
30
|
// console.log('EventContent', props);
|
|
31
31
|
// 最后的查询数据(防止图表在还没查询时就改变了类型)
|
|
@@ -117,9 +117,10 @@ var EventContent = function EventContent(props) {
|
|
|
117
117
|
return message.error('您查询的属性不一致,暂不支持查询');
|
|
118
118
|
}
|
|
119
119
|
var params = searchDataParams(searchData);
|
|
120
|
-
|
|
121
|
-
//
|
|
120
|
+
|
|
121
|
+
// const params = {"app_id":501909,"platform":0,"user_group":0,"time":{"dimension_date":"day","begin_date":"2023-08-08","end_date":"2023-09-07"},"start":{"operator":"and","event_id":48618641,"event_name":"Webhook事件"},"end":{"operator":"and","event_id":48618641,"event_name":"Webhook事件"}}
|
|
122
122
|
props.onChange && props.onChange(searchData);
|
|
123
|
+
console.log(77771111, searchData, params);
|
|
123
124
|
ajax(Apis.dataList, {
|
|
124
125
|
method: 'post',
|
|
125
126
|
data: _objectSpread({
|
|
@@ -18,7 +18,7 @@ import { EventContext } from "../../types";
|
|
|
18
18
|
import { getInitDate } from "../../constants/initData";
|
|
19
19
|
import EventContent from "../content";
|
|
20
20
|
import { chartTypes } from "../../constants";
|
|
21
|
-
var classPrefix = '
|
|
21
|
+
var classPrefix = 'interval-container';
|
|
22
22
|
var ModuleInterval = function ModuleInterval(props) {
|
|
23
23
|
// 属性
|
|
24
24
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.interval-form-data {
|
|
2
2
|
&-table-td {
|
|
3
3
|
padding: 0 !important;
|
|
4
4
|
|
|
5
|
+
.ant-table-column-sorters {
|
|
6
|
+
justify-content: end !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
&-show {
|
|
6
10
|
display: flex;
|
|
7
11
|
align-items: center;
|
|
@@ -9,6 +13,7 @@
|
|
|
9
13
|
min-width: 60px;
|
|
10
14
|
height: 48px;
|
|
11
15
|
cursor: pointer;
|
|
16
|
+
|
|
12
17
|
span {
|
|
13
18
|
width: 10px;
|
|
14
19
|
height: 10px;
|
|
@@ -20,6 +25,7 @@
|
|
|
20
25
|
&-name {
|
|
21
26
|
display: flex;
|
|
22
27
|
align-items: center;
|
|
28
|
+
|
|
23
29
|
.bsicon {
|
|
24
30
|
margin-right: 4px;
|
|
25
31
|
color: #fd9f41;
|
|
@@ -37,6 +43,7 @@
|
|
|
37
43
|
|
|
38
44
|
&-link {
|
|
39
45
|
cursor: pointer;
|
|
46
|
+
|
|
40
47
|
&:hover {
|
|
41
48
|
color: #165dff;
|
|
42
49
|
text-decoration: underline;
|
|
@@ -9,7 +9,7 @@ import { DisplaySetup } from '../components/searchPanel/types';
|
|
|
9
9
|
* @param columnData xAxis
|
|
10
10
|
* @returns column fields
|
|
11
11
|
*/
|
|
12
|
-
export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], userGroup: number[], searchData: SearchValue, showList: string[]): ColumnsType<EventProps.ColumnsDataType>;
|
|
12
|
+
export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], dataSource: ResponseDataProps, userGroup: number[], searchData: SearchValue, showList: string[]): ColumnsType<EventProps.ColumnsDataType>;
|
|
13
13
|
/**
|
|
14
14
|
* 获取属性的label
|
|
15
15
|
* @param attrData 当前属性
|
|
@@ -27,6 +27,16 @@ export declare function getColumns(eventGroupList: EventGroup[] | undefined, use
|
|
|
27
27
|
* @returns
|
|
28
28
|
*/
|
|
29
29
|
export declare function formTableData(originalData: ChartData): {
|
|
30
|
+
key: string;
|
|
31
|
+
time: string;
|
|
32
|
+
max: number;
|
|
33
|
+
Q1: number;
|
|
34
|
+
median: number;
|
|
35
|
+
Q3: number;
|
|
36
|
+
min: number;
|
|
37
|
+
perValue: number;
|
|
38
|
+
peopleNum: number;
|
|
39
|
+
}[] | {
|
|
30
40
|
key: number;
|
|
31
41
|
time: string;
|
|
32
42
|
max: number;
|
|
@@ -36,6 +46,17 @@ export declare function formTableData(originalData: ChartData): {
|
|
|
36
46
|
min: number;
|
|
37
47
|
perValue: number;
|
|
38
48
|
peopleNum: number;
|
|
49
|
+
children: {
|
|
50
|
+
key: string;
|
|
51
|
+
time: string;
|
|
52
|
+
max: number;
|
|
53
|
+
Q1: number;
|
|
54
|
+
median: number;
|
|
55
|
+
Q3: number;
|
|
56
|
+
min: number;
|
|
57
|
+
perValue: number;
|
|
58
|
+
peopleNum: number;
|
|
59
|
+
}[];
|
|
39
60
|
}[] | undefined;
|
|
40
61
|
type ChartData = {
|
|
41
62
|
app_data: {
|
|
@@ -49,9 +70,9 @@ type ChartData = {
|
|
|
49
70
|
};
|
|
50
71
|
export declare function convertDateArray(params: SearchValue | undefined, dateArray: string[]): string[] | undefined;
|
|
51
72
|
/**
|
|
52
|
-
*
|
|
73
|
+
* 获取查询结果
|
|
53
74
|
* @param source 结果数据
|
|
54
|
-
* @returns
|
|
75
|
+
* @returns 获取查询结果
|
|
55
76
|
*/
|
|
56
77
|
export declare function getDefaultShow(source: ResponseDataProps, data: DisplaySetup[]): never[] | {
|
|
57
78
|
app_data: any;
|
|
@@ -14,7 +14,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { chartColors } from "../constants/color";
|
|
16
16
|
import "../style/index.less";
|
|
17
|
-
var classPrefix = '
|
|
17
|
+
var classPrefix = 'interval-form-data';
|
|
18
18
|
function convertToHMS(seconds) {
|
|
19
19
|
var hours = Math.floor(seconds / 3600);
|
|
20
20
|
var h = hours ? hours + '时' : '';
|
|
@@ -29,12 +29,13 @@ function convertToHMS(seconds) {
|
|
|
29
29
|
* @param columnData xAxis
|
|
30
30
|
* @returns column fields
|
|
31
31
|
*/
|
|
32
|
-
export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, userGroup, searchData, showList
|
|
32
|
+
export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, dataSource, userGroup, searchData, showList
|
|
33
33
|
// onClickToDetailCallback: Function,
|
|
34
34
|
) {
|
|
35
|
+
var _dataSource$app_data, _dataSource$app_data$;
|
|
35
36
|
// 显示
|
|
36
37
|
var data = [{
|
|
37
|
-
title: '日期',
|
|
38
|
+
title: dataSource !== null && dataSource !== void 0 && (_dataSource$app_data = dataSource.app_data) !== null && _dataSource$app_data !== void 0 && (_dataSource$app_data$ = _dataSource$app_data.series[0]) !== null && _dataSource$app_data$ !== void 0 && _dataSource$app_data$.names[0] ? '' : '日期',
|
|
38
39
|
width: 148,
|
|
39
40
|
ellipsis: true,
|
|
40
41
|
key: 'time',
|
|
@@ -48,9 +49,13 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
48
49
|
title: '最大值',
|
|
49
50
|
width: 148,
|
|
50
51
|
ellipsis: true,
|
|
51
|
-
align: '
|
|
52
|
+
align: 'right',
|
|
52
53
|
dataIndex: 'min',
|
|
53
54
|
key: 'min',
|
|
55
|
+
sorter: function sorter(a, b) {
|
|
56
|
+
var _a$min, _b$min;
|
|
57
|
+
return ((_a$min = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min !== void 0 ? _a$min : 0) - ((_b$min = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min !== void 0 ? _b$min : 0);
|
|
58
|
+
},
|
|
54
59
|
className: "".concat(classPrefix, "-table-td"),
|
|
55
60
|
render: function render(text, record) {
|
|
56
61
|
return /*#__PURE__*/React.createElement("span", null, " ", convertToHMS(text));
|
|
@@ -59,9 +64,13 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
59
64
|
title: '上四分位',
|
|
60
65
|
width: 148,
|
|
61
66
|
ellipsis: true,
|
|
62
|
-
align: '
|
|
67
|
+
align: 'right',
|
|
63
68
|
key: 'Q1',
|
|
64
69
|
dataIndex: 'Q1',
|
|
70
|
+
sorter: function sorter(a, b) {
|
|
71
|
+
var _a$min2, _b$min2;
|
|
72
|
+
return ((_a$min2 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min2 !== void 0 ? _a$min2 : 0) - ((_b$min2 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min2 !== void 0 ? _b$min2 : 0);
|
|
73
|
+
},
|
|
65
74
|
className: "".concat(classPrefix, "-table-td"),
|
|
66
75
|
render: function render(text, record) {
|
|
67
76
|
return /*#__PURE__*/React.createElement("span", null, " ", convertToHMS(text));
|
|
@@ -70,8 +79,12 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
70
79
|
title: '中位数',
|
|
71
80
|
width: 148,
|
|
72
81
|
ellipsis: true,
|
|
73
|
-
align: '
|
|
82
|
+
align: 'right',
|
|
74
83
|
dataIndex: 'median',
|
|
84
|
+
sorter: function sorter(a, b) {
|
|
85
|
+
var _a$min3, _b$min3;
|
|
86
|
+
return ((_a$min3 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min3 !== void 0 ? _a$min3 : 0) - ((_b$min3 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min3 !== void 0 ? _b$min3 : 0);
|
|
87
|
+
},
|
|
75
88
|
key: 'median',
|
|
76
89
|
className: "".concat(classPrefix, "-table-td"),
|
|
77
90
|
render: function render(text, record) {
|
|
@@ -81,8 +94,12 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
81
94
|
title: '下四分位',
|
|
82
95
|
width: 148,
|
|
83
96
|
ellipsis: true,
|
|
84
|
-
align: '
|
|
97
|
+
align: 'right',
|
|
85
98
|
dataIndex: 'Q3',
|
|
99
|
+
sorter: function sorter(a, b) {
|
|
100
|
+
var _a$min4, _b$min4;
|
|
101
|
+
return ((_a$min4 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min4 !== void 0 ? _a$min4 : 0) - ((_b$min4 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min4 !== void 0 ? _b$min4 : 0);
|
|
102
|
+
},
|
|
86
103
|
key: 'Q3',
|
|
87
104
|
className: "".concat(classPrefix, "-table-td"),
|
|
88
105
|
render: function render(text, record) {
|
|
@@ -92,8 +109,12 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
92
109
|
title: '最小值',
|
|
93
110
|
width: 148,
|
|
94
111
|
ellipsis: true,
|
|
95
|
-
align: '
|
|
112
|
+
align: 'right',
|
|
96
113
|
key: 'max',
|
|
114
|
+
sorter: function sorter(a, b) {
|
|
115
|
+
var _a$min5, _b$min5;
|
|
116
|
+
return ((_a$min5 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min5 !== void 0 ? _a$min5 : 0) - ((_b$min5 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min5 !== void 0 ? _b$min5 : 0);
|
|
117
|
+
},
|
|
97
118
|
dataIndex: 'max',
|
|
98
119
|
className: "".concat(classPrefix, "-table-td"),
|
|
99
120
|
render: function render(text, record) {
|
|
@@ -103,8 +124,12 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
103
124
|
title: '人均值',
|
|
104
125
|
width: 148,
|
|
105
126
|
ellipsis: true,
|
|
106
|
-
align: '
|
|
127
|
+
align: 'right',
|
|
107
128
|
dataIndex: 'perValue',
|
|
129
|
+
sorter: function sorter(a, b) {
|
|
130
|
+
var _a$min6, _b$min6;
|
|
131
|
+
return ((_a$min6 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min6 !== void 0 ? _a$min6 : 0) - ((_b$min6 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min6 !== void 0 ? _b$min6 : 0);
|
|
132
|
+
},
|
|
108
133
|
key: 'perValue',
|
|
109
134
|
className: "".concat(classPrefix, "-table-td"),
|
|
110
135
|
render: function render(text, record) {
|
|
@@ -114,8 +139,12 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
114
139
|
title: '人数',
|
|
115
140
|
width: 148,
|
|
116
141
|
ellipsis: true,
|
|
117
|
-
align: '
|
|
142
|
+
align: 'right',
|
|
118
143
|
dataIndex: 'peopleNum',
|
|
144
|
+
sorter: function sorter(a, b) {
|
|
145
|
+
var _a$min7, _b$min7;
|
|
146
|
+
return ((_a$min7 = a === null || a === void 0 ? void 0 : a.min) !== null && _a$min7 !== void 0 ? _a$min7 : 0) - ((_b$min7 = b === null || b === void 0 ? void 0 : b.min) !== null && _b$min7 !== void 0 ? _b$min7 : 0);
|
|
147
|
+
},
|
|
119
148
|
key: 'peopleNum',
|
|
120
149
|
className: "".concat(classPrefix, "-table-td"),
|
|
121
150
|
render: function render(text, record) {
|
|
@@ -207,7 +236,7 @@ function getChildrenData(data, index) {
|
|
|
207
236
|
var values = firstSeries.values;
|
|
208
237
|
return x_axis.map(function (time, i) {
|
|
209
238
|
return {
|
|
210
|
-
key: i + (index + 1) * 10,
|
|
239
|
+
key: i + (index + 1) * 10 + 'key',
|
|
211
240
|
time: time,
|
|
212
241
|
max: values[i][0] || 0,
|
|
213
242
|
Q1: values[i][1] || 0,
|
|
@@ -222,17 +251,21 @@ function getChildrenData(data, index) {
|
|
|
222
251
|
return [];
|
|
223
252
|
}
|
|
224
253
|
/**
|
|
225
|
-
*
|
|
254
|
+
* 获取查询结果
|
|
226
255
|
* @param source 结果数据
|
|
227
|
-
* @returns
|
|
256
|
+
* @returns 获取查询结果
|
|
228
257
|
*/
|
|
229
258
|
export function getDefaultShow(source, data) {
|
|
230
259
|
if (source.app_data.series) {
|
|
231
260
|
var filteredArr = source.app_data.series.filter(function (obj) {
|
|
232
261
|
var names = obj.names;
|
|
233
|
-
|
|
234
|
-
return
|
|
235
|
-
|
|
262
|
+
if (!names) {
|
|
263
|
+
return data.some(function (item) {
|
|
264
|
+
return names.includes(item.label);
|
|
265
|
+
});
|
|
266
|
+
} else {
|
|
267
|
+
return obj;
|
|
268
|
+
}
|
|
236
269
|
});
|
|
237
270
|
return _objectSpread(_objectSpread({}, source), {}, {
|
|
238
271
|
app_data: _objectSpread(_objectSpread({}, source.app_data), {}, {
|