@zgfe/modules-interval 1.0.0-interval.6 → 1.0.0-interval.7
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/renderContent/index.js +3 -3
- package/dist/esm/components/renderContent/styles/index.less +1 -1
- package/dist/esm/components/table/index.js +10 -25
- package/dist/esm/components/topBar/index.js +2 -1
- package/dist/esm/components/topBar/types.d.ts +2 -1
- package/dist/esm/constants/apis.js +1 -1
- package/dist/esm/modules/chart/index.js +2 -2
- package/dist/esm/modules/chart/intervalChart.js +2 -2
- package/dist/esm/modules/chart/types.d.ts +1 -1
- package/dist/esm/modules/content/index.js +3 -2
- package/dist/esm/modules/content/utils.d.ts +15 -15
- package/dist/esm/modules/content/utils.js +12 -12
- package/dist/esm/modules/topPanel/index.js +1 -1
- package/dist/esm/modules/topPanel/styles/index.less +13 -13
- package/dist/esm/types.d.ts +2 -2
- package/dist/esm/utils/formData.d.ts +3 -3
- package/dist/esm/utils/formData.js +12 -12
- package/package.json +2 -2
- package/dist/esm/utils/base64.d.ts +0 -29
- package/dist/esm/utils/base64.js +0 -132
|
@@ -9,9 +9,9 @@ import React, { useEffect, useState } from 'react';
|
|
|
9
9
|
import { MiNone, MiSpin } from '..';
|
|
10
10
|
import "./styles/index.less";
|
|
11
11
|
import EventChart from "../../modules/chart";
|
|
12
|
-
var classPrefix = 'render-content';
|
|
12
|
+
var classPrefix = 'render-content-interval';
|
|
13
13
|
var ContentPanel = function ContentPanel(props) {
|
|
14
|
-
var _eventData$
|
|
14
|
+
var _eventData$appData, _eventData$appData$se;
|
|
15
15
|
var loading = props.loading,
|
|
16
16
|
eventData = props.eventData,
|
|
17
17
|
searchData = props.searchData;
|
|
@@ -41,7 +41,7 @@ var ContentPanel = function ContentPanel(props) {
|
|
|
41
41
|
className: classPrefix
|
|
42
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
className: "".concat(classPrefix, "-chart-container")
|
|
44
|
-
}, eventData && (_eventData$
|
|
44
|
+
}, eventData && (_eventData$appData = eventData.appData) !== null && _eventData$appData !== void 0 && (_eventData$appData$se = _eventData$appData.series) !== null && _eventData$appData$se !== void 0 && _eventData$appData$se.length ? /*#__PURE__*/React.createElement(EventChart, {
|
|
45
45
|
type: "grid",
|
|
46
46
|
dataSource: eventData,
|
|
47
47
|
params: searchData,
|
|
@@ -10,18 +10,17 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { ajax, BizGlobalDataContext, BizTable, IconFont } from '@zgfe/business-lib';
|
|
13
|
+
import { ajax, base64, BizGlobalDataContext, BizTable, IconFont } from '@zgfe/business-lib';
|
|
14
14
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
15
|
-
import base64 from "../../utils/base64";
|
|
16
15
|
import { Apis } from "../../constants";
|
|
17
16
|
import { message } from 'antd';
|
|
18
17
|
import { formTableData, getColumns } from "../../utils/formData";
|
|
19
18
|
import "./styles/index.less";
|
|
20
|
-
import {
|
|
19
|
+
import { searchDataParams } from "../../modules/content/utils";
|
|
21
20
|
import { EventContext } from "../../types";
|
|
22
21
|
var classPrefix = 'mi-interval-table';
|
|
23
22
|
var EventTable = function EventTable(props) {
|
|
24
|
-
var _dataSource$
|
|
23
|
+
var _dataSource$appData2;
|
|
25
24
|
var dataSource = props.dataSource,
|
|
26
25
|
searchData = props.searchData,
|
|
27
26
|
showList = props.showList;
|
|
@@ -67,12 +66,12 @@ var EventTable = function EventTable(props) {
|
|
|
67
66
|
|
|
68
67
|
// 表格column
|
|
69
68
|
var columns = useMemo(function () {
|
|
70
|
-
var _dataSource$
|
|
69
|
+
var _dataSource$appData;
|
|
71
70
|
var _searchData$userGroup = searchData.userGroup,
|
|
72
71
|
userGroup = _searchData$userGroup === void 0 ? [0] : _searchData$userGroup;
|
|
73
|
-
var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$
|
|
72
|
+
var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData = dataSource.appData) === null || _dataSource$appData === void 0 ? void 0 : _dataSource$appData.x_axis) || [], dataSource, userGroup, searchData, showList);
|
|
74
73
|
return _getColumns;
|
|
75
|
-
}, [dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$
|
|
74
|
+
}, [dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData2 = dataSource.appData) === null || _dataSource$appData2 === void 0 ? void 0 : _dataSource$appData2.x_axis, showList, sortTable, panelName]);
|
|
76
75
|
|
|
77
76
|
// 监听分页变化,如果页码发生变化则调用合并行方法
|
|
78
77
|
var onChangeTable = function onChangeTable(pagination) {
|
|
@@ -84,32 +83,18 @@ var EventTable = function EventTable(props) {
|
|
|
84
83
|
|
|
85
84
|
// 下载数据
|
|
86
85
|
var download = function download() {
|
|
87
|
-
var _searchData$userGroup2;
|
|
88
|
-
var seriesNames = [];
|
|
89
|
-
// 有用户群
|
|
90
|
-
if (searchData !== null && searchData !== void 0 && searchData.userGroup && (searchData === null || searchData === void 0 ? void 0 : (_searchData$userGroup2 = searchData.userGroup) === null || _searchData$userGroup2 === void 0 ? void 0 : _searchData$userGroup2.length) > 1) {
|
|
91
|
-
seriesNames.push(base64.encode('用户群'));
|
|
92
|
-
}
|
|
93
|
-
// 有细分属性
|
|
94
|
-
if (searchData !== null && searchData !== void 0 && searchData.dimension) {
|
|
95
|
-
seriesNames.push(base64.encode(getValue(searchData === null || searchData === void 0 ? void 0 : searchData.dimension, eventGroupList, eventEnvList, userPropList).label));
|
|
96
|
-
}
|
|
97
|
-
// 事件(有事件-无细分属性 || 事件概览)
|
|
98
|
-
if (searchData.id && !searchData.dimension || !searchData.id) {
|
|
99
|
-
seriesNames.push(base64.encode('事件'));
|
|
100
|
-
}
|
|
101
86
|
var obj = searchDataParams(searchData);
|
|
102
87
|
var params = _objectSpread(_objectSpread({
|
|
103
|
-
|
|
88
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
104
89
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
105
90
|
}, obj), {}, {
|
|
106
91
|
down: {
|
|
107
|
-
fname: base64.encode('间隔分析')
|
|
92
|
+
fname: base64.encode('间隔分析', false)
|
|
108
93
|
}
|
|
109
94
|
});
|
|
110
95
|
ajax(Apis.eventDownloadReport, {
|
|
111
|
-
method: '
|
|
112
|
-
|
|
96
|
+
method: 'post',
|
|
97
|
+
data: params,
|
|
113
98
|
responseType: 'blob',
|
|
114
99
|
fileName: '间隔分析',
|
|
115
100
|
getResponse: true
|
|
@@ -18,7 +18,7 @@ import { EventContext } from "../../types";
|
|
|
18
18
|
import { chartTypes, platformOption } from "../../constants/fields";
|
|
19
19
|
var classPrefix = 'modules-interval-topbar';
|
|
20
20
|
var TopBar = function TopBar(props) {
|
|
21
|
-
|
|
21
|
+
var _props$eventData, _props$eventData$appD, _props$eventData$appD2;
|
|
22
22
|
var _useContext = useContext(EventContext),
|
|
23
23
|
panelId = _useContext.panelId,
|
|
24
24
|
afterEditTarget = _useContext.afterEditTarget,
|
|
@@ -102,6 +102,7 @@ var TopBar = function TopBar(props) {
|
|
|
102
102
|
})), /*#__PURE__*/React.createElement(Button, {
|
|
103
103
|
className: "".concat(classPrefix, "-earlywarning"),
|
|
104
104
|
type: "primary",
|
|
105
|
+
disabled: (props === null || props === void 0 ? void 0 : (_props$eventData = props.eventData) === null || _props$eventData === void 0 ? void 0 : (_props$eventData$appD = _props$eventData.appData) === null || _props$eventData$appD === void 0 ? void 0 : (_props$eventData$appD2 = _props$eventData$appD.series) === null || _props$eventData$appD2 === void 0 ? void 0 : _props$eventData$appD2.length) === 0,
|
|
105
106
|
onClick: function onClick() {
|
|
106
107
|
props.onUserDrill({
|
|
107
108
|
appId: Number(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { SearchValue, UserDrillParamsProp } from '../../types';
|
|
1
|
+
import { ResponseDataProps, SearchValue, UserDrillParamsProp } from '../../types';
|
|
2
2
|
export interface TopBarProps {
|
|
3
3
|
/**
|
|
4
4
|
* @description 标题
|
|
5
5
|
*/
|
|
6
6
|
searchData?: SearchValue;
|
|
7
|
+
eventData?: ResponseDataProps;
|
|
7
8
|
onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
|
|
8
9
|
platformChange: (data: number) => void;
|
|
9
10
|
}
|
|
@@ -2,6 +2,6 @@ var Apis = {
|
|
|
2
2
|
// dataList: '/zg/web/v2/data/eventDataList',
|
|
3
3
|
dataList: '/zg/web/v2/interval/intervalData',
|
|
4
4
|
getEventDataSql: '/zg/web/v2/dataSql/getEventDataSql',
|
|
5
|
-
eventDownloadReport: '/interval/downLoadintervalData
|
|
5
|
+
eventDownloadReport: '/zg/web/v2/interval/downLoadintervalData'
|
|
6
6
|
};
|
|
7
7
|
export default Apis;
|
|
@@ -18,7 +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$
|
|
21
|
+
var _dataSource$appData;
|
|
22
22
|
var params = props.params;
|
|
23
23
|
// 显示内容
|
|
24
24
|
var _useState = useState(),
|
|
@@ -81,7 +81,7 @@ var EventChart = function EventChart(props) {
|
|
|
81
81
|
className: "spin-container"
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$
|
|
84
|
+
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$appData = dataSource.appData) !== null && _dataSource$appData !== void 0 && _dataSource$appData.series.length)) {
|
|
85
85
|
return /*#__PURE__*/React.createElement(MiNone, {
|
|
86
86
|
label: "\u6682\u65E0\u6570\u636E"
|
|
87
87
|
});
|
|
@@ -19,7 +19,7 @@ var IntervalChart = function IntervalChart(props) {
|
|
|
19
19
|
setOption = _useState2[1];
|
|
20
20
|
useEffect(function () {
|
|
21
21
|
var _props$showList, _seriesData$series;
|
|
22
|
-
var seriesData = props === null || props === void 0 ? void 0 : (_props$showList = props.showList) === null || _props$showList === void 0 ? void 0 : _props$showList.
|
|
22
|
+
var seriesData = props === null || props === void 0 ? void 0 : (_props$showList = props.showList) === null || _props$showList === void 0 ? void 0 : _props$showList.appData;
|
|
23
23
|
var params = props === null || props === void 0 ? void 0 : props.params;
|
|
24
24
|
var eCharts = {
|
|
25
25
|
tooltip: {
|
|
@@ -43,7 +43,7 @@ var IntervalChart = function IntervalChart(props) {
|
|
|
43
43
|
type: 'category',
|
|
44
44
|
boundaryGap: true,
|
|
45
45
|
nameGap: 30,
|
|
46
|
-
data: convertDateArray(params, seriesData === null || seriesData === void 0 ? void 0 : seriesData.
|
|
46
|
+
data: convertDateArray(params, seriesData === null || seriesData === void 0 ? void 0 : seriesData.xAxis),
|
|
47
47
|
splitArea: {
|
|
48
48
|
show: false
|
|
49
49
|
},
|
|
@@ -3,7 +3,7 @@ import { SearchValue } from '../../types';
|
|
|
3
3
|
import { DisplaySetup } from '../../components/searchPanel/types';
|
|
4
4
|
export declare namespace eventChartProps {
|
|
5
5
|
interface ChartTypesProps extends ChartTypes.Value {
|
|
6
|
-
|
|
6
|
+
appData: any;
|
|
7
7
|
xAxis: [];
|
|
8
8
|
x_axis: [];
|
|
9
9
|
}
|
|
@@ -118,13 +118,13 @@ var EventContent = function EventContent(props) {
|
|
|
118
118
|
}
|
|
119
119
|
var params = searchDataParams(searchData);
|
|
120
120
|
|
|
121
|
-
// const params = {"app_id":
|
|
121
|
+
// const params = {"app_id":177,"platform":0,"time":{"dimension_date":"day","begin_date":"2023-09-01","end_date":"2023-09-08"},"user_group":0,"start":{"operator":"and","event_id":16530,"event_name":"查看商品A"},"end":{"operator":"and","event_id":16530,"event_name":"查看商品A"},"dimension":{"sub":"user_attr","category":"fixed","attr_id":743,"user_attr":"name","event_attr":null}}
|
|
122
122
|
props.onChange && props.onChange(searchData);
|
|
123
123
|
console.log(77771111, searchData, params);
|
|
124
124
|
ajax(Apis.dataList, {
|
|
125
125
|
method: 'post',
|
|
126
126
|
data: _objectSpread({
|
|
127
|
-
|
|
127
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
128
128
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
129
129
|
}, params),
|
|
130
130
|
cancelToken: new CancelToken(function executor(c) {
|
|
@@ -179,6 +179,7 @@ var EventContent = function EventContent(props) {
|
|
|
179
179
|
};
|
|
180
180
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
|
|
181
181
|
searchData: searchData,
|
|
182
|
+
eventData: eventData,
|
|
182
183
|
platformChange: platformChange,
|
|
183
184
|
onUserDrill: props.onUserDrill
|
|
184
185
|
}), /*#__PURE__*/React.createElement(BizLayout, {
|
|
@@ -21,37 +21,37 @@ export declare const judgeIsArea: (name: string | undefined) => boolean;
|
|
|
21
21
|
export declare const getValue: (param: bizAttributeSelectorValueProp, eventGroupList: EventGroup[] | undefined, eventEnvList: EnvProp[] | undefined, userPropList: UserProp[] | undefined) => AttributeSelect.Value | undefined;
|
|
22
22
|
export declare function searchCondition(params: any): {
|
|
23
23
|
operator: any;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
eventId: any;
|
|
25
|
+
eventName: any;
|
|
26
26
|
condition: any;
|
|
27
27
|
};
|
|
28
28
|
export declare function searchDataParams(params: any): {
|
|
29
29
|
time: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
dimensionDate: any;
|
|
31
|
+
beginDate: any;
|
|
32
|
+
endDate: any;
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
userGroup: any;
|
|
35
35
|
start: {
|
|
36
36
|
operator: any;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
eventId: any;
|
|
38
|
+
eventName: any;
|
|
39
39
|
condition: any;
|
|
40
40
|
};
|
|
41
41
|
end: {
|
|
42
42
|
operator: any;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
eventId: any;
|
|
44
|
+
eventName: any;
|
|
45
45
|
condition: any;
|
|
46
46
|
};
|
|
47
47
|
dimension: {
|
|
48
48
|
sub: any;
|
|
49
49
|
category: any;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
attrId: any;
|
|
51
|
+
userAttr: any;
|
|
52
|
+
eventAttr: any;
|
|
53
53
|
event: any;
|
|
54
54
|
};
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
associatedPreAttr: any;
|
|
56
|
+
associatedNextAttr: any;
|
|
57
57
|
};
|
|
@@ -58,14 +58,14 @@ export function searchCondition(params) {
|
|
|
58
58
|
};
|
|
59
59
|
return {
|
|
60
60
|
operator: (params === null || params === void 0 ? void 0 : (_params$filters = params.filters) === null || _params$filters === void 0 ? void 0 : _params$filters.relation) || 'and',
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
eventId: params === null || params === void 0 ? void 0 : params.id,
|
|
62
|
+
eventName: params === null || params === void 0 ? void 0 : params.name,
|
|
63
63
|
condition: params === null || params === void 0 ? void 0 : (_params$filters2 = params.filters) === null || _params$filters2 === void 0 ? void 0 : _params$filters2.conditions.map(function (item) {
|
|
64
64
|
return {
|
|
65
65
|
name: item === null || item === void 0 ? void 0 : item.attrName,
|
|
66
66
|
attrId: item === null || item === void 0 ? void 0 : item.attrId,
|
|
67
67
|
params: item === null || item === void 0 ? void 0 : item.values,
|
|
68
|
-
|
|
68
|
+
attrSub: (item === null || item === void 0 ? void 0 : item.propCategory) === 'userProp' ? 'user_attr' : (item === null || item === void 0 ? void 0 : item.propCategory) === 'eventProp' ? 'event_attr' : item === null || item === void 0 ? void 0 : item.attrName,
|
|
69
69
|
category: (item === null || item === void 0 ? void 0 : item.category) || 'custom',
|
|
70
70
|
attrType: numAttrTypeMap[item === null || item === void 0 ? void 0 : item.type],
|
|
71
71
|
operator: item === null || item === void 0 ? void 0 : item.operator
|
|
@@ -77,22 +77,22 @@ export function searchDataParams(params) {
|
|
|
77
77
|
var _params$time, _params$time2, _params$time3, _params$userGroup$, _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$associatedPre, _params$associatedNex;
|
|
78
78
|
return {
|
|
79
79
|
time: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
dimensionDate: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
|
|
81
|
+
beginDate: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
|
|
82
|
+
endDate: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
|
|
83
83
|
},
|
|
84
|
-
|
|
84
|
+
userGroup: (_params$userGroup$ = params.userGroup[0]) === null || _params$userGroup$ === void 0 ? void 0 : _params$userGroup$.id,
|
|
85
85
|
start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
|
|
86
86
|
end: searchCondition(params === null || params === void 0 ? void 0 : params.end),
|
|
87
87
|
dimension: {
|
|
88
88
|
sub: (params === null || params === void 0 ? void 0 : (_params$dimension = params.dimension) === null || _params$dimension === void 0 ? void 0 : _params$dimension.propCategory) === 'userProp' ? 'user_attr' : (params === null || params === void 0 ? void 0 : (_params$dimension2 = params.dimension) === null || _params$dimension2 === void 0 ? void 0 : _params$dimension2.propCategory) === 'eventProp' ? 'event_attr' : params === null || params === void 0 ? void 0 : (_params$dimension3 = params.dimension) === null || _params$dimension3 === void 0 ? void 0 : _params$dimension3.name,
|
|
89
89
|
category: (params === null || params === void 0 ? void 0 : (_params$dimension4 = params.dimension) === null || _params$dimension4 === void 0 ? void 0 : _params$dimension4.category) || 'custom',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
attrId: params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.id,
|
|
91
|
+
userAttr: (params === null || params === void 0 ? void 0 : (_params$dimension6 = params.dimension) === null || _params$dimension6 === void 0 ? void 0 : _params$dimension6.propCategory) === 'userProp' ? params === null || params === void 0 ? void 0 : (_params$dimension7 = params.dimension) === null || _params$dimension7 === void 0 ? void 0 : _params$dimension7.dimensionSub : null,
|
|
92
|
+
eventAttr: (params === null || params === void 0 ? void 0 : (_params$dimension8 = params.dimension) === null || _params$dimension8 === void 0 ? void 0 : _params$dimension8.propCategory) === 'eventProp' ? params === null || params === void 0 ? void 0 : (_params$dimension9 = params.dimension) === null || _params$dimension9 === void 0 ? void 0 : _params$dimension9.label : null,
|
|
93
93
|
event: (params === null || params === void 0 ? void 0 : (_params$dimension10 = params.dimension) === null || _params$dimension10 === void 0 ? void 0 : _params$dimension10.propCategory) !== 'envProp' ? params === null || params === void 0 ? void 0 : (_params$dimension11 = params.dimension) === null || _params$dimension11 === void 0 ? void 0 : _params$dimension11.eventId : null
|
|
94
94
|
},
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
|
|
96
|
+
associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
|
|
97
97
|
};
|
|
98
98
|
}
|
|
@@ -9,7 +9,7 @@ import { Form, Button } from 'antd';
|
|
|
9
9
|
import { BizAttributeSelector, BizUserGroupHeader } from '@zgfe/business-lib';
|
|
10
10
|
import EventFilter from "../../components/eventFilter";
|
|
11
11
|
import "./styles/index.less";
|
|
12
|
-
var classPrefix = 'top-panel';
|
|
12
|
+
var classPrefix = 'top-panel-interval';
|
|
13
13
|
var TopPanel = function TopPanel(props) {
|
|
14
14
|
var defaultValue = props.defaultValue,
|
|
15
15
|
ajaxFlag = props.ajaxFlag,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import '../../../assets/icons/iconfont.css';
|
|
2
2
|
@import '../../../assets/business/iconfont.css';
|
|
3
3
|
|
|
4
|
-
.top-panel {
|
|
4
|
+
.top-panel-interval {
|
|
5
5
|
&-form-botton-box {
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: flex-end;
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.panel-form {
|
|
21
|
+
.space-item {
|
|
22
|
+
.ant-space-item {
|
|
23
|
+
.biz-user-group {
|
|
24
|
+
width: 208px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-space-horizontal .ant-space-item:nth-child(2) .tianjia {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
.biz-event-select {
|
|
22
34
|
width: 208px;
|
|
23
35
|
}
|
|
@@ -53,15 +65,3 @@
|
|
|
53
65
|
}
|
|
54
66
|
}
|
|
55
67
|
}
|
|
56
|
-
|
|
57
|
-
.space-item {
|
|
58
|
-
.ant-space-item {
|
|
59
|
-
.biz-user-group {
|
|
60
|
-
max-width: 208px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.ant-space-horizontal .ant-space-item:nth-child(2) .tianjia {
|
|
65
|
-
display: none;
|
|
66
|
-
}
|
|
67
|
-
}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface ChartItemProp {
|
|
|
135
135
|
disabled?: boolean;
|
|
136
136
|
}
|
|
137
137
|
export interface ChartData {
|
|
138
|
-
|
|
138
|
+
appData: {
|
|
139
139
|
series?: {
|
|
140
140
|
names: string[];
|
|
141
141
|
values: number[][];
|
|
@@ -145,7 +145,7 @@ export interface ChartData {
|
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
export interface ResponseDataProps {
|
|
148
|
-
|
|
148
|
+
appData: any;
|
|
149
149
|
xAxis?: string[];
|
|
150
150
|
x_axis?: string[];
|
|
151
151
|
series: SeriesProps[];
|
|
@@ -59,13 +59,13 @@ export declare function formTableData(originalData: ChartData): {
|
|
|
59
59
|
}[];
|
|
60
60
|
}[] | undefined;
|
|
61
61
|
type ChartData = {
|
|
62
|
-
|
|
62
|
+
appData: {
|
|
63
63
|
series?: {
|
|
64
64
|
names: string[];
|
|
65
65
|
values: number[][];
|
|
66
66
|
total: number[];
|
|
67
67
|
}[];
|
|
68
|
-
|
|
68
|
+
xAxis?: string[];
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
export declare function convertDateArray(params: SearchValue | undefined, dateArray: string[]): string[] | undefined;
|
|
@@ -75,7 +75,7 @@ export declare function convertDateArray(params: SearchValue | undefined, dateAr
|
|
|
75
75
|
* @returns 获取查询结果
|
|
76
76
|
*/
|
|
77
77
|
export declare function getDefaultShow(source: ResponseDataProps, data: DisplaySetup[]): never[] | {
|
|
78
|
-
|
|
78
|
+
appData: any;
|
|
79
79
|
xAxis?: string[] | undefined;
|
|
80
80
|
x_axis?: string[] | undefined;
|
|
81
81
|
series: SeriesProps[];
|
|
@@ -32,10 +32,10 @@ function convertToHMS(seconds) {
|
|
|
32
32
|
export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, dataSource, userGroup, searchData, showList
|
|
33
33
|
// onClickToDetailCallback: Function,
|
|
34
34
|
) {
|
|
35
|
-
var _dataSource$
|
|
35
|
+
var _dataSource$appData, _dataSource$appData$s;
|
|
36
36
|
// 显示
|
|
37
37
|
var data = [{
|
|
38
|
-
title: dataSource !== null && dataSource !== void 0 && (_dataSource$
|
|
38
|
+
title: dataSource !== null && dataSource !== void 0 && (_dataSource$appData = dataSource.appData) !== null && _dataSource$appData !== void 0 && (_dataSource$appData$s = _dataSource$appData.series[0]) !== null && _dataSource$appData$s !== void 0 && _dataSource$appData$s.names[0] ? '' : '日期',
|
|
39
39
|
width: 148,
|
|
40
40
|
ellipsis: true,
|
|
41
41
|
key: 'time',
|
|
@@ -177,7 +177,7 @@ export function formTableData(originalData) {
|
|
|
177
177
|
}
|
|
178
178
|
function createNewArray(data) {
|
|
179
179
|
var _series$;
|
|
180
|
-
var series = data.
|
|
180
|
+
var series = data.appData.series;
|
|
181
181
|
if (series && ((_series$ = series[0]) === null || _series$ === void 0 ? void 0 : _series$.total.length) === 0) {
|
|
182
182
|
return getChildrenData(data, 0);
|
|
183
183
|
} else {
|
|
@@ -228,13 +228,13 @@ export function convertDateArray(params, dateArray) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
function getChildrenData(data, index) {
|
|
231
|
-
var _data$
|
|
232
|
-
series = _data$
|
|
233
|
-
|
|
231
|
+
var _data$appData = data.appData,
|
|
232
|
+
series = _data$appData.series,
|
|
233
|
+
xAxis = _data$appData.xAxis;
|
|
234
234
|
var firstSeries = series === null || series === void 0 ? void 0 : series[index];
|
|
235
|
-
if (
|
|
235
|
+
if (xAxis && firstSeries) {
|
|
236
236
|
var values = firstSeries.values;
|
|
237
|
-
return
|
|
237
|
+
return xAxis.map(function (time, i) {
|
|
238
238
|
return {
|
|
239
239
|
key: i + (index + 1) * 10 + 'key',
|
|
240
240
|
time: time,
|
|
@@ -256,8 +256,8 @@ function getChildrenData(data, index) {
|
|
|
256
256
|
* @returns 获取查询结果
|
|
257
257
|
*/
|
|
258
258
|
export function getDefaultShow(source, data) {
|
|
259
|
-
if (source.
|
|
260
|
-
var filteredArr = source.
|
|
259
|
+
if (source.appData.series) {
|
|
260
|
+
var filteredArr = source.appData.series.filter(function (obj) {
|
|
261
261
|
var names = obj.names;
|
|
262
262
|
if (!names) {
|
|
263
263
|
return data.some(function (item) {
|
|
@@ -268,7 +268,7 @@ export function getDefaultShow(source, data) {
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
return _objectSpread(_objectSpread({}, source), {}, {
|
|
271
|
-
|
|
271
|
+
appData: _objectSpread(_objectSpread({}, source.appData), {}, {
|
|
272
272
|
series: filteredArr
|
|
273
273
|
})
|
|
274
274
|
});
|
|
@@ -298,7 +298,7 @@ export function getShowColor(source, showList) {
|
|
|
298
298
|
return colors;
|
|
299
299
|
}
|
|
300
300
|
export function extractNames(data) {
|
|
301
|
-
var series = data.
|
|
301
|
+
var series = data.appData.series;
|
|
302
302
|
var namesArray = [];
|
|
303
303
|
if (series) {
|
|
304
304
|
var _iterator = _createForOfIteratorHelper(series),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-interval",
|
|
3
|
-
"version": "1.0.0-interval.
|
|
3
|
+
"version": "1.0.0-interval.7",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@types/uuid": "^9.0.2",
|
|
44
44
|
"@umijs/fabric": "^2.8.1",
|
|
45
45
|
"@umijs/test": "^3.0.5",
|
|
46
|
-
"@zgfe/business-lib": "1.1.
|
|
46
|
+
"@zgfe/business-lib": "1.1.81-scenes1.0.8",
|
|
47
47
|
"@zgfe/modules-demo-manage": "^1.0.1",
|
|
48
48
|
"antd": "^4.22.6",
|
|
49
49
|
"dumi": "^1.1.0",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by yqdong on 16/3/15.
|
|
3
|
-
* qq: 1013501639
|
|
4
|
-
* @author yqdong
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
_keyStr: string;
|
|
9
|
-
_utf8_encode: (string: string) => string;
|
|
10
|
-
_utf8_decode: (utftext: string) => string;
|
|
11
|
-
encode: (input: string, type?: any) => string;
|
|
12
|
-
decode: (input: string) => string;
|
|
13
|
-
_$: string[];
|
|
14
|
-
pw: string;
|
|
15
|
-
gString: (O6b8: {
|
|
16
|
-
[x: string]: (arg0: number) => {
|
|
17
|
-
(): any;
|
|
18
|
-
new (): any;
|
|
19
|
-
[x: string]: () => any;
|
|
20
|
-
};
|
|
21
|
-
}[], O492: {
|
|
22
|
-
[x: string]: (arg0: number) => {
|
|
23
|
-
(): any;
|
|
24
|
-
new (): any;
|
|
25
|
-
[x: string]: () => any;
|
|
26
|
-
};
|
|
27
|
-
}[]) => string;
|
|
28
|
-
};
|
|
29
|
-
export default _default;
|
package/dist/esm/utils/base64.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by yqdong on 16/3/15.
|
|
3
|
-
* qq: 1013501639
|
|
4
|
-
* @author yqdong
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
export default {
|
|
8
|
-
_keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
|
|
9
|
-
_utf8_encode: function _utf8_encode(string) {
|
|
10
|
-
string = string.replace(/\r\n/g, '\n');
|
|
11
|
-
var utftext = '';
|
|
12
|
-
for (var n = 0; n < string.length; n++) {
|
|
13
|
-
var c = string.charCodeAt(n);
|
|
14
|
-
if (c < 128) {
|
|
15
|
-
utftext += String.fromCharCode(c);
|
|
16
|
-
} else if (c > 127 && c < 2048) {
|
|
17
|
-
utftext += String.fromCharCode(c >> 6 | 192); // jshint ignore:line
|
|
18
|
-
utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
|
|
19
|
-
} else {
|
|
20
|
-
utftext += String.fromCharCode(c >> 12 | 224); // jshint ignore:line
|
|
21
|
-
utftext += String.fromCharCode(c >> 6 & 63 | 128); // jshint ignore:line
|
|
22
|
-
utftext += String.fromCharCode(c & 63 | 128); // jshint ignore:line
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return utftext;
|
|
27
|
-
},
|
|
28
|
-
_utf8_decode: function _utf8_decode(utftext) {
|
|
29
|
-
var string = '';
|
|
30
|
-
var i = 0,
|
|
31
|
-
c = 0,
|
|
32
|
-
c2 = 0,
|
|
33
|
-
c3 = 0;
|
|
34
|
-
while (i < utftext.length) {
|
|
35
|
-
c = utftext.charCodeAt(i);
|
|
36
|
-
if (c < 128) {
|
|
37
|
-
string += String.fromCharCode(c);
|
|
38
|
-
i++;
|
|
39
|
-
} else if (c > 191 && c < 224) {
|
|
40
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
41
|
-
string += String.fromCharCode((c & 31) << 6 | c2 & 63); // jshint ignore:line
|
|
42
|
-
i += 2;
|
|
43
|
-
} else {
|
|
44
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
45
|
-
c3 = utftext.charCodeAt(i + 2);
|
|
46
|
-
string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); // jshint ignore:line
|
|
47
|
-
i += 3;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return string;
|
|
51
|
-
},
|
|
52
|
-
encode: function encode(input, type) {
|
|
53
|
-
var output = '';
|
|
54
|
-
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
55
|
-
var i = 0;
|
|
56
|
-
input = this._utf8_encode(input);
|
|
57
|
-
while (i < input.length) {
|
|
58
|
-
chr1 = input.charCodeAt(i++);
|
|
59
|
-
chr2 = input.charCodeAt(i++);
|
|
60
|
-
chr3 = input.charCodeAt(i++);
|
|
61
|
-
enc1 = chr1 >> 2; // jshint ignore:line
|
|
62
|
-
enc2 = (chr1 & 3) << 4 | chr2 >> 4; // jshint ignore:line
|
|
63
|
-
enc3 = (chr2 & 15) << 2 | chr3 >> 6; // jshint ignore:line
|
|
64
|
-
enc4 = chr3 & 63; // jshint ignore:line
|
|
65
|
-
if (isNaN(chr2)) {
|
|
66
|
-
enc3 = enc4 = 64;
|
|
67
|
-
} else if (isNaN(chr3)) {
|
|
68
|
-
enc4 = 64;
|
|
69
|
-
}
|
|
70
|
-
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
|
71
|
-
}
|
|
72
|
-
if (type) {
|
|
73
|
-
return output.replace(/[\+]?[\/]?[\=]?/g, '');
|
|
74
|
-
} else {
|
|
75
|
-
return output.replace(/\+/g, '-');
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
decode: function decode(input) {
|
|
79
|
-
input = input.replace(/\-/g, '+');
|
|
80
|
-
var output = '';
|
|
81
|
-
var chr1, chr2, chr3;
|
|
82
|
-
var enc1, enc2, enc3, enc4;
|
|
83
|
-
var i = 0;
|
|
84
|
-
while (i < input.length) {
|
|
85
|
-
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
|
86
|
-
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
|
87
|
-
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
|
88
|
-
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
|
89
|
-
chr1 = enc1 << 2 | enc2 >> 4; // jshint ignore:line
|
|
90
|
-
chr2 = (enc2 & 15) << 4 | enc3 >> 2; // jshint ignore:line
|
|
91
|
-
chr3 = (enc3 & 3) << 6 | enc4; // jshint ignore:line
|
|
92
|
-
output = output + String.fromCharCode(chr1);
|
|
93
|
-
if (enc3 != 64) {
|
|
94
|
-
output = output + String.fromCharCode(chr2);
|
|
95
|
-
}
|
|
96
|
-
if (enc4 != 64) {
|
|
97
|
-
output = output + String.fromCharCode(chr3);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
output = this._utf8_decode(output);
|
|
101
|
-
return output;
|
|
102
|
-
},
|
|
103
|
-
_$: [''],
|
|
104
|
-
pw: '0&Gqs0a5',
|
|
105
|
-
gString: function gString(O6b8, O492) {
|
|
106
|
-
var dfc4 = Array(0x100);
|
|
107
|
-
var O26e = Array(0x100);
|
|
108
|
-
var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
|
|
109
|
-
var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
|
|
110
|
-
for (var O98c = 0x0; O98c < 0x100; O98c++) {
|
|
111
|
-
dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
|
|
112
|
-
O26e[O98c] = O98c;
|
|
113
|
-
}
|
|
114
|
-
for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
|
|
115
|
-
O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
|
|
116
|
-
var O23f = O26e[O98c];
|
|
117
|
-
O26e[O98c] = O26e[O8cf];
|
|
118
|
-
O26e[O8cf] = O23f;
|
|
119
|
-
}
|
|
120
|
-
var ac35 = this._$[0];
|
|
121
|
-
for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
|
|
122
|
-
O577 = (O577 + 0x1) % 0x100;
|
|
123
|
-
O8cf = (O8cf + O26e[O577]) % 0x100;
|
|
124
|
-
var tmp = O26e[O577];
|
|
125
|
-
O26e[O577] = O26e[O8cf];
|
|
126
|
-
O26e[O8cf] = tmp;
|
|
127
|
-
var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
|
|
128
|
-
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);
|
|
129
|
-
}
|
|
130
|
-
return ac35;
|
|
131
|
-
}
|
|
132
|
-
};
|