@zgfe/modules-interval 1.0.0-interval.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/assets/business/demo_index.html +164 -26
- package/dist/esm/assets/business/iconfont.css +31 -7
- package/dist/esm/assets/business/iconfont.js +10 -10
- package/dist/esm/assets/business/iconfont.json +49 -7
- package/dist/esm/assets/business/iconfont.ttf +0 -0
- package/dist/esm/assets/business/iconfont.woff +0 -0
- package/dist/esm/assets/business/iconfont.woff2 +0 -0
- package/dist/esm/components/common/index.js +9 -9
- package/dist/esm/components/common/styles/index.less +21 -8
- package/dist/esm/components/eventFilter/index.js +20 -13
- package/dist/esm/components/eventFilter/styles/index.less +1 -4
- package/dist/esm/components/eventFilter/types.d.ts +2 -0
- package/dist/esm/components/renderContent/index.js +4 -4
- package/dist/esm/components/renderContent/styles/index.less +1 -1
- package/dist/esm/components/searchPanel/index.js +3 -2
- package/dist/esm/components/searchPanel/styles/index.less +34 -28
- package/dist/esm/components/table/styles/index.less +20 -5
- package/dist/esm/components/topBar/index.js +35 -21
- package/dist/esm/components/topBar/styles/index.less +1 -0
- package/dist/esm/components/topBar/types.d.ts +1 -0
- package/dist/esm/constants/fields.d.ts +6 -78
- package/dist/esm/constants/fields.js +7 -47
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/modules/chart/customTooltip.js +9 -3
- package/dist/esm/modules/chart/demo/data.d.ts +34 -71
- package/dist/esm/modules/chart/demo/data.js +36 -488
- package/dist/esm/modules/chart/demo/index.js +8 -37
- package/dist/esm/modules/chart/index.d.ts +2 -2
- package/dist/esm/modules/chart/index.js +41 -34
- package/dist/esm/modules/chart/index.less +28 -18
- package/dist/esm/modules/chart/intervalChart.js +10 -3
- package/dist/esm/modules/content/index.js +17 -14
- package/dist/esm/modules/content/types.d.ts +1 -0
- package/dist/esm/modules/content/utils.d.ts +2 -5
- package/dist/esm/modules/content/utils.js +17 -9
- package/dist/esm/modules/home/demo/index.js +5 -0
- package/dist/esm/modules/home/index.js +2 -1
- package/dist/esm/modules/home/styles/index.less +10 -3
- package/dist/esm/modules/home/types.d.ts +1 -0
- package/dist/esm/modules/topPanel/index.js +80 -79
- package/dist/esm/modules/topPanel/styles/index.less +116 -4
- package/dist/esm/modules/topPanel/types.d.ts +3 -1
- package/dist/esm/style/image/empty.png +0 -0
- package/dist/esm/types.d.ts +26 -2
- package/dist/esm/utils/formData.js +3 -3
- package/package.json +2 -2
- package/dist/esm/modules/chart/demo/panel.d.ts +0 -3
- package/dist/esm/modules/chart/demo/panel.js +0 -30
|
@@ -11,14 +11,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
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
13
|
import React, { useContext, useEffect, useState } from 'react';
|
|
14
|
-
import { BizGlobalDataContext, ajax } from '@zgfe/business-lib';
|
|
14
|
+
import { BizGlobalDataContext, BizLoading, ajax } from '@zgfe/business-lib';
|
|
15
15
|
import { EventTable, MiNone } from "../../components";
|
|
16
16
|
import { extractNames, getDefaultShow } from "../../utils/formData";
|
|
17
17
|
import { Apis } from "../../constants";
|
|
18
|
-
import { Spin } from 'antd';
|
|
19
18
|
import IntervalChart from "./intervalChart";
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import { searchDataParams } from "../content/utils";
|
|
20
|
+
var IntervalEventChart = function IntervalEventChart(props) {
|
|
21
|
+
var _dataSource$appData2;
|
|
22
22
|
var params = props.params;
|
|
23
23
|
// 显示内容
|
|
24
24
|
var _useState = useState(),
|
|
@@ -41,35 +41,42 @@ var EventChart = function EventChart(props) {
|
|
|
41
41
|
setLoading = _useState8[1];
|
|
42
42
|
useEffect(function () {
|
|
43
43
|
// 没有dataSource时(看板列表访问),请求查询
|
|
44
|
-
if (!props.dataSource) {
|
|
44
|
+
if (!props.dataSource || (params === null || params === void 0 ? void 0 : params.module) === 'interval') {
|
|
45
45
|
fetchResult();
|
|
46
46
|
}
|
|
47
47
|
}, []);
|
|
48
48
|
|
|
49
49
|
// 初始化,判断showList是否有值,如果没值,取结果的前10条
|
|
50
50
|
useEffect(function () {
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
var _dataSource$appData, _dataSource$appData$s;
|
|
52
|
+
if ((dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData = dataSource.appData) === null || _dataSource$appData === void 0 ? void 0 : (_dataSource$appData$s = _dataSource$appData.series) === null || _dataSource$appData$s === void 0 ? void 0 : _dataSource$appData$s.length) > 0) {
|
|
53
|
+
var _extractNames;
|
|
54
|
+
var arr = params !== null && params !== void 0 && params.displaySetup ? params === null || params === void 0 ? void 0 : params.displaySetup : (_extractNames = extractNames(dataSource)) === null || _extractNames === void 0 ? void 0 : _extractNames.splice(0, 4);
|
|
55
|
+
var app = getDefaultShow(dataSource, arr);
|
|
56
|
+
setShowList(app);
|
|
57
|
+
setDataSourceList(arr);
|
|
58
|
+
}
|
|
59
|
+
}, [params === null || params === void 0 ? void 0 : params.displaySetup, dataSource]);
|
|
57
60
|
var fetchResult = function fetchResult() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
var _obj$start, _obj$end, _params$start, _params$end;
|
|
62
|
+
var obj = searchDataParams(params);
|
|
63
|
+
if (obj !== null && obj !== void 0 && (_obj$start = obj.start) !== null && _obj$start !== void 0 && _obj$start.eventId && obj !== null && obj !== void 0 && (_obj$end = obj.end) !== null && _obj$end !== void 0 && _obj$end.eventId || params !== null && params !== void 0 && (_params$start = params.start) !== null && _params$start !== void 0 && _params$start.eventId && params !== null && params !== void 0 && (_params$end = params.end) !== null && _params$end !== void 0 && _params$end.eventId) {
|
|
64
|
+
setLoading(true);
|
|
65
|
+
ajax(Apis.dataList, {
|
|
66
|
+
method: 'post',
|
|
67
|
+
data: _objectSpread({
|
|
68
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
69
|
+
}, obj)
|
|
70
|
+
}).then(function (res) {
|
|
71
|
+
if (!res) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
setLoading(false);
|
|
75
|
+
setDataSource(res.data);
|
|
76
|
+
}).catch(function () {
|
|
77
|
+
setLoading(false);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
73
80
|
};
|
|
74
81
|
|
|
75
82
|
// 表格筛选,取前10个
|
|
@@ -77,13 +84,13 @@ var EventChart = function EventChart(props) {
|
|
|
77
84
|
if (props.onChangeShow) props.onChangeShow(names);
|
|
78
85
|
};
|
|
79
86
|
if (loading) {
|
|
80
|
-
return /*#__PURE__*/React.createElement(
|
|
81
|
-
className: "
|
|
82
|
-
});
|
|
87
|
+
return /*#__PURE__*/React.createElement(BizLoading, {
|
|
88
|
+
className: "mi-common-interval-content"
|
|
89
|
+
}, /*#__PURE__*/React.createElement("div", null));
|
|
83
90
|
}
|
|
84
|
-
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$
|
|
91
|
+
if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$appData2 = dataSource.appData) !== null && _dataSource$appData2 !== void 0 && _dataSource$appData2.series.length)) {
|
|
85
92
|
return /*#__PURE__*/React.createElement(MiNone, {
|
|
86
|
-
label:
|
|
93
|
+
label: !dataSource ? '请选择条件进行查询' : '暂无数据'
|
|
87
94
|
});
|
|
88
95
|
}
|
|
89
96
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IntervalChart, {
|
|
@@ -91,11 +98,11 @@ var EventChart = function EventChart(props) {
|
|
|
91
98
|
showList: showList,
|
|
92
99
|
dataSourceList: dataSourceList,
|
|
93
100
|
params: params
|
|
94
|
-
}), /*#__PURE__*/React.createElement(EventTable, {
|
|
101
|
+
}), (params === null || params === void 0 ? void 0 : params.chartType) === 'line' ? /*#__PURE__*/React.createElement(EventTable, {
|
|
95
102
|
dataSource: dataSource,
|
|
96
103
|
searchData: params,
|
|
97
104
|
showList: [],
|
|
98
105
|
changeShow: onChangeShow
|
|
99
|
-
}));
|
|
106
|
+
}) : null);
|
|
100
107
|
};
|
|
101
|
-
export default
|
|
108
|
+
export default IntervalEventChart;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.custom-tooltip {
|
|
1
|
+
.custom-tooltip-chart {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
flex-shrink: 0;
|
|
@@ -6,43 +6,53 @@
|
|
|
6
6
|
align-items: flex-start;
|
|
7
7
|
width: 146px;
|
|
8
8
|
height: 100%;
|
|
9
|
+
padding: 8px;
|
|
9
10
|
color: var(--io-n, #021429);
|
|
10
11
|
font-weight: 500;
|
|
11
12
|
font-size: 12px;
|
|
12
13
|
font-style: normal;
|
|
13
|
-
background: rgba(250, 251, 253, 0.8);
|
|
14
|
+
// background: rgba(250, 251, 253, 0.8);
|
|
14
15
|
border-radius: 10px;
|
|
15
|
-
box-shadow: 0px 4px 10px 0px
|
|
16
|
-
backdrop-filter: blur(2px);
|
|
16
|
+
box-shadow: 0px 4px 10px 0px #0000001a;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
.custom-tooltip-name {
|
|
19
|
+
color: var(--io-n, #021429);
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-family: PingFang SC;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
line-height: normal;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.custom-tooltip-div {
|
|
19
28
|
display: flex;
|
|
20
29
|
flex-direction: column;
|
|
21
|
-
gap:
|
|
30
|
+
gap: 6px;
|
|
22
31
|
width: 100%;
|
|
23
32
|
height: 100%;
|
|
24
|
-
padding:
|
|
33
|
+
padding: 0px 8px;
|
|
25
34
|
background: #fff;
|
|
26
35
|
border-radius: 4px;
|
|
27
36
|
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
|
|
37
|
+
|
|
38
|
+
.tooltip-span {
|
|
39
|
+
display: block;
|
|
40
|
+
color: var(--3, #5f6085);
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
font-family: PingFang SC;
|
|
44
|
+
font-style: normal;
|
|
45
|
+
line-height: normal;
|
|
46
|
+
}
|
|
47
|
+
|
|
28
48
|
> div {
|
|
29
49
|
display: flex;
|
|
30
50
|
align-items: center;
|
|
31
51
|
justify-content: space-between;
|
|
32
52
|
}
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
.tooltip-marker {
|
|
35
55
|
justify-content: flex-start;
|
|
36
56
|
}
|
|
37
57
|
}
|
|
38
|
-
|
|
39
|
-
.tooltip-span {
|
|
40
|
-
display: block;
|
|
41
|
-
color: var(--3, #5f6085);
|
|
42
|
-
font-weight: 400;
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
font-family: PingFang SC;
|
|
45
|
-
font-style: normal;
|
|
46
|
-
line-height: normal;
|
|
47
|
-
}
|
|
48
58
|
}
|
|
@@ -30,8 +30,13 @@ var IntervalChart = function IntervalChart(props) {
|
|
|
30
30
|
},
|
|
31
31
|
legend: {
|
|
32
32
|
bottom: 0,
|
|
33
|
-
|
|
33
|
+
icon: 'circle',
|
|
34
|
+
type: 'scroll',
|
|
35
|
+
itemWidth: 10,
|
|
36
|
+
// 设置图例的宽度为10px
|
|
37
|
+
itemHeight: 10 // 设置图例的高度为10px
|
|
34
38
|
},
|
|
39
|
+
|
|
35
40
|
grid: {
|
|
36
41
|
top: '10',
|
|
37
42
|
left: '0',
|
|
@@ -79,14 +84,16 @@ var IntervalChart = function IntervalChart(props) {
|
|
|
79
84
|
type: 'inside',
|
|
80
85
|
start: 0,
|
|
81
86
|
end: 20,
|
|
87
|
+
right: 3,
|
|
82
88
|
height: 20 // 设置内置的dataZoom的高度
|
|
83
89
|
}, {
|
|
84
|
-
show: true,
|
|
90
|
+
show: (params === null || params === void 0 ? void 0 : params.module) === 'interval' ? false : true,
|
|
85
91
|
type: 'slider',
|
|
86
92
|
bottom: '38px',
|
|
87
93
|
xAxisIndex: [0],
|
|
88
94
|
start: 0,
|
|
89
95
|
end: 20,
|
|
96
|
+
right: 3,
|
|
90
97
|
height: 20 // 设置滑动条的高度
|
|
91
98
|
}],
|
|
92
99
|
|
|
@@ -102,7 +109,7 @@ var IntervalChart = function IntervalChart(props) {
|
|
|
102
109
|
tooltip: {
|
|
103
110
|
show: true,
|
|
104
111
|
// 单独配置series中的tooltip为显示
|
|
105
|
-
extraCssText: 'border: none;',
|
|
112
|
+
extraCssText: 'border: none;padding:0;border-radius:10px;background: rgba(250, 251, 253, 0.8)',
|
|
106
113
|
// 添加自定义的CSS样式,去掉边框
|
|
107
114
|
formatter: function formatter(params) {
|
|
108
115
|
var tooltipString = renderToString( /*#__PURE__*/React.createElement(CustomTooltip, {
|
|
@@ -26,7 +26,6 @@ var CancelToken = Request.CancelToken;
|
|
|
26
26
|
var cancel;
|
|
27
27
|
var classPrefix = 'interval-content';
|
|
28
28
|
var EventContent = function EventContent(props) {
|
|
29
|
-
// console.log('EventContent', props);
|
|
30
29
|
// 最后的查询数据(防止图表在还没查询时就改变了类型)
|
|
31
30
|
var _useState = useState(props.value),
|
|
32
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -112,26 +111,25 @@ var EventContent = function EventContent(props) {
|
|
|
112
111
|
}, [ajaxFlag]);
|
|
113
112
|
// 查询
|
|
114
113
|
var fetchRequest = function fetchRequest(flag) {
|
|
115
|
-
var _searchData$associate, _searchData$associate2, _searchData$associate3;
|
|
114
|
+
var _searchData$start, _searchData$end, _searchData$associate, _searchData$associate2, _searchData$associate3;
|
|
116
115
|
if (flag !== undefined) setAjaxFlag(flag);
|
|
117
116
|
if (!ajaxFlag) return;
|
|
118
|
-
if (
|
|
117
|
+
if ((searchData === null || searchData === void 0 ? void 0 : (_searchData$start = searchData.start) === null || _searchData$start === void 0 ? void 0 : _searchData$start.id) === null || (searchData === null || searchData === void 0 ? void 0 : (_searchData$end = searchData.end) === null || _searchData$end === void 0 ? void 0 : _searchData$end.id) === null) {
|
|
119
118
|
setLoading(false);
|
|
120
119
|
return;
|
|
121
120
|
}
|
|
122
|
-
;
|
|
123
|
-
setLoading(true);
|
|
124
121
|
setEventData(undefined);
|
|
122
|
+
setLoading(true);
|
|
125
123
|
// 取消上次未完成的请求
|
|
126
|
-
if (typeof cancel === 'function') {
|
|
127
|
-
|
|
128
|
-
}
|
|
124
|
+
// if (typeof cancel === 'function') {
|
|
125
|
+
// cancel();
|
|
126
|
+
// }
|
|
129
127
|
if (searchData !== null && searchData !== void 0 && (_searchData$associate = searchData.associatedNextAttr) !== null && _searchData$associate !== void 0 && _searchData$associate.type && (searchData === null || searchData === void 0 ? void 0 : (_searchData$associate2 = searchData.associatedPreAttr) === null || _searchData$associate2 === void 0 ? void 0 : _searchData$associate2.type) !== (searchData === null || searchData === void 0 ? void 0 : (_searchData$associate3 = searchData.associatedNextAttr) === null || _searchData$associate3 === void 0 ? void 0 : _searchData$associate3.type)) {
|
|
128
|
+
setLoading(false);
|
|
130
129
|
return message.error('您查询的属性不一致,暂不支持查询');
|
|
131
130
|
}
|
|
132
131
|
var params = searchDataParams(searchData);
|
|
133
132
|
props.onChange && props.onChange(searchData);
|
|
134
|
-
// console.log(77771111, searchData, params);
|
|
135
133
|
ajax(Apis.dataList, {
|
|
136
134
|
method: 'post',
|
|
137
135
|
data: _objectSpread({
|
|
@@ -158,10 +156,10 @@ var EventContent = function EventContent(props) {
|
|
|
158
156
|
|
|
159
157
|
// 改变时间和图表类型
|
|
160
158
|
var onChangeContent = function onChangeContent(data) {
|
|
161
|
-
setAjaxFlag(true);
|
|
162
159
|
setSearchData(function (value) {
|
|
163
160
|
return _objectSpread(_objectSpread({}, value), data);
|
|
164
161
|
});
|
|
162
|
+
setAjaxFlag(true);
|
|
165
163
|
};
|
|
166
164
|
|
|
167
165
|
// 改变显示内容
|
|
@@ -171,35 +169,40 @@ var EventContent = function EventContent(props) {
|
|
|
171
169
|
|
|
172
170
|
// 平台变更
|
|
173
171
|
var platformChange = function platformChange(data) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return _objectSpread(_objectSpread({}, _searchData), {}, {
|
|
172
|
+
setSearchData(function (value) {
|
|
173
|
+
return _objectSpread(_objectSpread({}, value), {}, {
|
|
177
174
|
platform: data
|
|
178
175
|
});
|
|
179
176
|
});
|
|
177
|
+
setTimeout(function () {
|
|
178
|
+
setAjaxFlag(true);
|
|
179
|
+
}, 100);
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
// TopPanel组件数值变更
|
|
183
183
|
var onChangeSearch = function onChangeSearch(data, flag) {
|
|
184
|
-
setAjaxFlag(false);
|
|
185
184
|
data.id ? setEventId(data.id) : setEventId(-1);
|
|
186
185
|
setSearchData(function (_searchData) {
|
|
187
186
|
return _objectSpread(_objectSpread({}, _searchData), data);
|
|
188
187
|
});
|
|
188
|
+
setAjaxFlag(false);
|
|
189
189
|
};
|
|
190
190
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
|
|
191
191
|
searchData: searchData,
|
|
192
|
+
loading: loading,
|
|
192
193
|
eventData: eventData,
|
|
193
194
|
platformChange: platformChange,
|
|
194
195
|
onUserDrill: props.onUserDrill
|
|
195
196
|
}), /*#__PURE__*/React.createElement(BizLayout, {
|
|
196
197
|
showTitle: false,
|
|
197
198
|
hasCollapse: true,
|
|
199
|
+
className: "interval-layout",
|
|
198
200
|
collapseRef: collapseRef,
|
|
199
201
|
topPanel: /*#__PURE__*/React.createElement(TopPanel, {
|
|
200
202
|
collapseRef: collapseRef,
|
|
201
203
|
onChange: onChangeSearch,
|
|
202
204
|
defaultValue: searchData,
|
|
205
|
+
urlParam: props.urlParam,
|
|
203
206
|
ajaxFlag: ajaxFlag,
|
|
204
207
|
loading: loading,
|
|
205
208
|
finalSearchData: finalSearchData,
|
|
@@ -26,11 +26,7 @@ export declare function searchCondition(params: any): {
|
|
|
26
26
|
condition: any;
|
|
27
27
|
};
|
|
28
28
|
export declare function searchDataParams(params: any): {
|
|
29
|
-
time:
|
|
30
|
-
dimensionDate: any;
|
|
31
|
-
beginDate: any;
|
|
32
|
-
endDate: any;
|
|
33
|
-
};
|
|
29
|
+
time: any;
|
|
34
30
|
platform: any;
|
|
35
31
|
userGroup: any;
|
|
36
32
|
start: {
|
|
@@ -56,3 +52,4 @@ export declare function searchDataParams(params: any): {
|
|
|
56
52
|
associatedPreAttr: any;
|
|
57
53
|
associatedNextAttr: any;
|
|
58
54
|
};
|
|
55
|
+
export declare function transformData(data: any[][]): string[];
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
2
7
|
/**
|
|
3
8
|
* 判断当前细分属性是否为”城市“
|
|
4
9
|
* @param name 属性名称
|
|
@@ -47,7 +52,7 @@ export var getValue = function getValue(param, eventGroupList, eventEnvList, use
|
|
|
47
52
|
if (attr.key === key) res = attr;
|
|
48
53
|
});
|
|
49
54
|
}
|
|
50
|
-
console.log('获取当前属性的全部数据', res);
|
|
55
|
+
// console.log('获取当前属性的全部数据', res);
|
|
51
56
|
return res;
|
|
52
57
|
};
|
|
53
58
|
export function searchCondition(params) {
|
|
@@ -75,16 +80,11 @@ export function searchCondition(params) {
|
|
|
75
80
|
};
|
|
76
81
|
}
|
|
77
82
|
export function searchDataParams(params) {
|
|
78
|
-
var _params$
|
|
79
|
-
console.log(777777, params.userGroup, _typeof(params.userGroup[0]));
|
|
83
|
+
var _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$dimension12, _params$associatedPre, _params$associatedNex;
|
|
80
84
|
return {
|
|
81
|
-
time: {
|
|
82
|
-
dimensionDate: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
|
|
83
|
-
beginDate: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
|
|
84
|
-
endDate: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
|
|
85
|
-
},
|
|
85
|
+
time: _objectSpread({}, params === null || params === void 0 ? void 0 : params.time),
|
|
86
86
|
platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
|
|
87
|
-
userGroup:
|
|
87
|
+
userGroup: params.userGroup,
|
|
88
88
|
start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
|
|
89
89
|
end: searchCondition(params === null || params === void 0 ? void 0 : params.end),
|
|
90
90
|
dimension: params !== null && params !== void 0 && (_params$dimension = params.dimension) !== null && _params$dimension !== void 0 && _params$dimension.propCategory ? {
|
|
@@ -98,4 +98,12 @@ export function searchDataParams(params) {
|
|
|
98
98
|
associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
|
|
99
99
|
associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
|
|
100
100
|
};
|
|
101
|
+
}
|
|
102
|
+
export function transformData(data) {
|
|
103
|
+
return data[0].map(function (group) {
|
|
104
|
+
var _group$, _group$2;
|
|
105
|
+
var labelGroup = (_group$ = group[1]) === null || _group$ === void 0 ? void 0 : _group$.id;
|
|
106
|
+
var labelId = (_group$2 = group[2]) === null || _group$2 === void 0 ? void 0 : _group$2.layerLabelId;
|
|
107
|
+
return "".concat(labelGroup, ":").concat(labelId);
|
|
108
|
+
});
|
|
101
109
|
}
|
|
@@ -24,6 +24,10 @@ export default (function () {
|
|
|
24
24
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
25
25
|
searchParams = _useState6[0],
|
|
26
26
|
setSearchParams = _useState6[1];
|
|
27
|
+
var _useState7 = useState(),
|
|
28
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
29
|
+
urlParam = _useState8[0],
|
|
30
|
+
setUrlParam = _useState8[1];
|
|
27
31
|
useEffect(function () {
|
|
28
32
|
setGlobalConfig(requestConfig);
|
|
29
33
|
}, []);
|
|
@@ -42,6 +46,7 @@ export default (function () {
|
|
|
42
46
|
}
|
|
43
47
|
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
|
|
44
48
|
defaultValue: searchParams,
|
|
49
|
+
urlParam: urlParam,
|
|
45
50
|
afterEditTarget: afterEditTarget,
|
|
46
51
|
onUserDrill: onUserDrill
|
|
47
52
|
}));
|
|
@@ -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 = 'interval-container';
|
|
21
|
+
var classPrefix = 'interval-module-container';
|
|
22
22
|
var ModuleInterval = function ModuleInterval(props) {
|
|
23
23
|
// 属性
|
|
24
24
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -131,6 +131,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
131
131
|
defaultValue: props.defaultValue ? props.defaultValue.data : undefined,
|
|
132
132
|
value: searchData,
|
|
133
133
|
show: showList,
|
|
134
|
+
urlParam: props.urlParam,
|
|
134
135
|
onUserDrill: props.onUserDrill,
|
|
135
136
|
onChange: setSearchData,
|
|
136
137
|
initSearch: initSearch
|
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
padding: 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.interval-container {
|
|
6
|
+
.interval-module-container {
|
|
7
7
|
width: 100%;
|
|
8
8
|
min-width: 1000px;
|
|
9
9
|
height: 100%;
|
|
10
10
|
background: #fafafb;
|
|
11
|
-
|
|
11
|
+
.interval-layout {
|
|
12
|
+
.biz-layout-collapse-container {
|
|
13
|
+
height: 24px;
|
|
14
|
+
}
|
|
15
|
+
.biz-layout-collapse-handle {
|
|
16
|
+
height: 24px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
12
19
|
&-header-title {
|
|
13
20
|
height: 48px;
|
|
14
21
|
padding: 0px 24px;
|
|
@@ -32,7 +39,7 @@
|
|
|
32
39
|
|
|
33
40
|
.ant-spin-container {
|
|
34
41
|
width: 100%;
|
|
35
|
-
height:
|
|
42
|
+
height: auto;
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
.biz-select-option:not(.biz-select-option-multiple),
|