@zgfe/modules-interval 1.0.0-interval.4 → 1.0.0-interval.5
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.
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { Spin } from 'antd';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { MiSpin } from '..';
|
|
10
10
|
import "./styles/index.less";
|
|
11
11
|
import EventChart from "../../modules/chart";
|
|
12
12
|
var classPrefix = 'render-content';
|
|
@@ -39,14 +39,7 @@ var ContentPanel = function ContentPanel(props) {
|
|
|
39
39
|
}
|
|
40
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: classPrefix
|
|
42
|
-
}, /*#__PURE__*/React.createElement(
|
|
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, {
|
|
42
|
+
}, 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
43
|
type: "grid",
|
|
51
44
|
dataSource: eventData,
|
|
52
45
|
params: searchData,
|
|
@@ -122,7 +122,7 @@ var EventTable = function EventTable(props) {
|
|
|
122
122
|
// },
|
|
123
123
|
// );
|
|
124
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
|
|
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) || [], dataSource, userGroup, searchData, showList
|
|
126
126
|
// onClickToDetail,
|
|
127
127
|
);
|
|
128
128
|
|
|
@@ -117,8 +117,7 @@ var EventContent = function EventContent(props) {
|
|
|
117
117
|
return message.error('您查询的属性不一致,暂不支持查询');
|
|
118
118
|
}
|
|
119
119
|
var params = searchDataParams(searchData);
|
|
120
|
-
// const params = {"app_id":177,"platform":0,"user_group":
|
|
121
|
-
// console.log(666666, searchData, params);
|
|
120
|
+
// const params = {"app_id":177,"platform":0,"user_group":0,"time":{"dimension_date":"week","begin_date":"2023-08-07","end_date":"2023-09-05"},"start":{"operator":"and","event_id":16530,"event_name":"查看商品A"},"end":{"operator":"and","event_id":16530,"event_name":"查看商品A"},"dimension":{"sub":"user_attr","category":"fixed","user_attr":"name"}}
|
|
122
121
|
props.onChange && props.onChange(searchData);
|
|
123
122
|
ajax(Apis.dataList, {
|
|
124
123
|
method: 'post',
|
|
@@ -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: {
|
|
@@ -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',
|
|
@@ -207,7 +208,7 @@ function getChildrenData(data, index) {
|
|
|
207
208
|
var values = firstSeries.values;
|
|
208
209
|
return x_axis.map(function (time, i) {
|
|
209
210
|
return {
|
|
210
|
-
key: i + (index + 1) * 10,
|
|
211
|
+
key: i + (index + 1) * 10 + 'key',
|
|
211
212
|
time: time,
|
|
212
213
|
max: values[i][0] || 0,
|
|
213
214
|
Q1: values[i][1] || 0,
|