@zgfe/modules-interval 1.0.0-interval.8 → 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.
Files changed (49) hide show
  1. package/dist/esm/assets/business/demo_index.html +164 -26
  2. package/dist/esm/assets/business/iconfont.css +31 -7
  3. package/dist/esm/assets/business/iconfont.js +10 -10
  4. package/dist/esm/assets/business/iconfont.json +49 -7
  5. package/dist/esm/assets/business/iconfont.ttf +0 -0
  6. package/dist/esm/assets/business/iconfont.woff +0 -0
  7. package/dist/esm/assets/business/iconfont.woff2 +0 -0
  8. package/dist/esm/components/common/index.js +9 -9
  9. package/dist/esm/components/common/styles/index.less +21 -8
  10. package/dist/esm/components/eventFilter/index.js +20 -13
  11. package/dist/esm/components/eventFilter/styles/index.less +1 -4
  12. package/dist/esm/components/eventFilter/types.d.ts +2 -0
  13. package/dist/esm/components/renderContent/index.js +4 -4
  14. package/dist/esm/components/renderContent/styles/index.less +1 -1
  15. package/dist/esm/components/searchPanel/index.js +4 -1
  16. package/dist/esm/components/searchPanel/styles/index.less +34 -28
  17. package/dist/esm/components/table/styles/index.less +20 -5
  18. package/dist/esm/components/topBar/index.js +35 -21
  19. package/dist/esm/components/topBar/styles/index.less +1 -0
  20. package/dist/esm/components/topBar/types.d.ts +1 -0
  21. package/dist/esm/constants/fields.d.ts +6 -78
  22. package/dist/esm/constants/fields.js +7 -47
  23. package/dist/esm/index.d.ts +2 -2
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/modules/chart/customTooltip.js +9 -3
  26. package/dist/esm/modules/chart/demo/data.d.ts +34 -71
  27. package/dist/esm/modules/chart/demo/data.js +36 -488
  28. package/dist/esm/modules/chart/demo/index.js +8 -37
  29. package/dist/esm/modules/chart/index.d.ts +2 -2
  30. package/dist/esm/modules/chart/index.js +41 -34
  31. package/dist/esm/modules/chart/index.less +28 -18
  32. package/dist/esm/modules/chart/intervalChart.js +10 -3
  33. package/dist/esm/modules/content/index.js +21 -13
  34. package/dist/esm/modules/content/types.d.ts +1 -0
  35. package/dist/esm/modules/content/utils.d.ts +2 -5
  36. package/dist/esm/modules/content/utils.js +17 -7
  37. package/dist/esm/modules/home/demo/index.js +5 -0
  38. package/dist/esm/modules/home/index.js +2 -1
  39. package/dist/esm/modules/home/styles/index.less +10 -3
  40. package/dist/esm/modules/home/types.d.ts +1 -0
  41. package/dist/esm/modules/topPanel/index.js +80 -79
  42. package/dist/esm/modules/topPanel/styles/index.less +116 -4
  43. package/dist/esm/modules/topPanel/types.d.ts +3 -1
  44. package/dist/esm/style/image/empty.png +0 -0
  45. package/dist/esm/types.d.ts +26 -2
  46. package/dist/esm/utils/formData.js +3 -3
  47. package/package.json +2 -2
  48. package/dist/esm/modules/chart/demo/panel.d.ts +0 -3
  49. 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
- var EventChart = function EventChart(props) {
21
- var _dataSource$appData;
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 _extractNames;
52
- 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);
53
- var app = getDefaultShow(dataSource, arr);
54
- setShowList(app);
55
- setDataSourceList(arr);
56
- }, [params === null || params === void 0 ? void 0 : params.displaySetup]);
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
- setLoading(true);
59
- ajax(Apis.dataList, {
60
- method: 'post',
61
- data: _objectSpread({
62
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
63
- platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
64
- }, params)
65
- }).then(function (res) {
66
- if (!res) {
67
- return;
68
- }
69
- setDataSource(res.data);
70
- }).catch(function () {
71
- setLoading(false);
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(Spin, {
81
- className: "spin-container"
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$appData = dataSource.appData) !== null && _dataSource$appData !== void 0 && _dataSource$appData.series.length)) {
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: "\u6682\u65E0\u6570\u636E"
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 EventChart;
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 rgba(0, 0, 0, 0.1);
16
- backdrop-filter: blur(2px);
16
+ box-shadow: 0px 4px 10px 0px #0000001a;
17
17
 
18
- > div:nth-child(2) {
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: 7px;
30
+ gap: 6px;
22
31
  width: 100%;
23
32
  height: 100%;
24
- padding: 4px 8px;
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
- > div:nth-child(1) {
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
- type: 'scroll'
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),
@@ -93,7 +92,7 @@ var EventContent = function EventContent(props) {
93
92
  var flag = true;
94
93
  timer = setTimeout(function () {
95
94
  if (flag) {
96
- fetchRequest();
95
+ fetchRequest(false);
97
96
  }
98
97
  }, 500);
99
98
  return function () {
@@ -112,21 +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
- setLoading(true);
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) {
118
+ setLoading(false);
119
+ return;
120
+ }
119
121
  setEventData(undefined);
122
+ setLoading(true);
120
123
  // 取消上次未完成的请求
121
- if (typeof cancel === 'function') {
122
- cancel();
123
- }
124
+ // if (typeof cancel === 'function') {
125
+ // cancel();
126
+ // }
124
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);
125
129
  return message.error('您查询的属性不一致,暂不支持查询');
126
130
  }
127
131
  var params = searchDataParams(searchData);
128
132
  props.onChange && props.onChange(searchData);
129
- // console.log(77771111, searchData, params);
130
133
  ajax(Apis.dataList, {
131
134
  method: 'post',
132
135
  data: _objectSpread({
@@ -153,10 +156,10 @@ var EventContent = function EventContent(props) {
153
156
 
154
157
  // 改变时间和图表类型
155
158
  var onChangeContent = function onChangeContent(data) {
156
- setAjaxFlag(true);
157
159
  setSearchData(function (value) {
158
160
  return _objectSpread(_objectSpread({}, value), data);
159
161
  });
162
+ setAjaxFlag(true);
160
163
  };
161
164
 
162
165
  // 改变显示内容
@@ -166,35 +169,40 @@ var EventContent = function EventContent(props) {
166
169
 
167
170
  // 平台变更
168
171
  var platformChange = function platformChange(data) {
169
- setAjaxFlag(true);
170
- setSearchData(function (_searchData) {
171
- return _objectSpread(_objectSpread({}, _searchData), {}, {
172
+ setSearchData(function (value) {
173
+ return _objectSpread(_objectSpread({}, value), {}, {
172
174
  platform: data
173
175
  });
174
176
  });
177
+ setTimeout(function () {
178
+ setAjaxFlag(true);
179
+ }, 100);
175
180
  };
176
181
 
177
182
  // TopPanel组件数值变更
178
183
  var onChangeSearch = function onChangeSearch(data, flag) {
179
- setAjaxFlag(false);
180
184
  data.id ? setEventId(data.id) : setEventId(-1);
181
185
  setSearchData(function (_searchData) {
182
186
  return _objectSpread(_objectSpread({}, _searchData), data);
183
187
  });
188
+ setAjaxFlag(false);
184
189
  };
185
190
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
186
191
  searchData: searchData,
192
+ loading: loading,
187
193
  eventData: eventData,
188
194
  platformChange: platformChange,
189
195
  onUserDrill: props.onUserDrill
190
196
  }), /*#__PURE__*/React.createElement(BizLayout, {
191
197
  showTitle: false,
192
198
  hasCollapse: true,
199
+ className: "interval-layout",
193
200
  collapseRef: collapseRef,
194
201
  topPanel: /*#__PURE__*/React.createElement(TopPanel, {
195
202
  collapseRef: collapseRef,
196
203
  onChange: onChangeSearch,
197
204
  defaultValue: searchData,
205
+ urlParam: props.urlParam,
198
206
  ajaxFlag: ajaxFlag,
199
207
  loading: loading,
200
208
  finalSearchData: finalSearchData,
@@ -9,6 +9,7 @@ export declare namespace EventContentProps {
9
9
  * 默认值
10
10
  */
11
11
  value: SearchValue;
12
+ urlParam?: SearchValue;
12
13
  /**
13
14
  * 展示列表
14
15
  */
@@ -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,3 +1,9 @@
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); }
1
7
  /**
2
8
  * 判断当前细分属性是否为”城市“
3
9
  * @param name 属性名称
@@ -46,7 +52,7 @@ export var getValue = function getValue(param, eventGroupList, eventEnvList, use
46
52
  if (attr.key === key) res = attr;
47
53
  });
48
54
  }
49
- console.log('获取当前属性的全部数据', res);
55
+ // console.log('获取当前属性的全部数据', res);
50
56
  return res;
51
57
  };
52
58
  export function searchCondition(params) {
@@ -74,13 +80,9 @@ export function searchCondition(params) {
74
80
  };
75
81
  }
76
82
  export function searchDataParams(params) {
77
- var _params$time, _params$time2, _params$time3, _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;
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;
78
84
  return {
79
- time: {
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
- },
85
+ time: _objectSpread({}, params === null || params === void 0 ? void 0 : params.time),
84
86
  platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
85
87
  userGroup: params.userGroup,
86
88
  start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
@@ -96,4 +98,12 @@ export function searchDataParams(params) {
96
98
  associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
97
99
  associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
98
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
+ });
99
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: 100%;
42
+ height: auto;
36
43
  }
37
44
 
38
45
  .biz-select-option:not(.biz-select-option-multiple),
@@ -6,6 +6,7 @@ export declare namespace EventProps {
6
6
  * @description 默认查询值
7
7
  */
8
8
  defaultValue?: Value;
9
+ urlParam?: SearchValue;
9
10
  /**
10
11
  * @description 是否包含今天
11
12
  * @default false