@zgfe/modules-interval 1.0.0-interval.4 → 1.0.0-interval.40

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 (54) 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 +25 -19
  11. package/dist/esm/components/eventFilter/styles/index.less +2 -5
  12. package/dist/esm/components/eventFilter/types.d.ts +2 -0
  13. package/dist/esm/components/renderContent/index.js +10 -11
  14. package/dist/esm/components/renderContent/styles/index.less +13 -2
  15. package/dist/esm/components/searchPanel/index.js +8 -3
  16. package/dist/esm/components/searchPanel/styles/index.less +34 -28
  17. package/dist/esm/components/table/index.js +13 -87
  18. package/dist/esm/components/table/styles/index.less +21 -6
  19. package/dist/esm/components/topBar/index.js +33 -20
  20. package/dist/esm/components/topBar/styles/index.less +2 -1
  21. package/dist/esm/components/topBar/types.d.ts +3 -1
  22. package/dist/esm/constants/apis.js +1 -1
  23. package/dist/esm/constants/fields.d.ts +6 -78
  24. package/dist/esm/constants/fields.js +7 -47
  25. package/dist/esm/index.d.ts +2 -2
  26. package/dist/esm/index.js +2 -2
  27. package/dist/esm/modules/chart/customTooltip.js +9 -3
  28. package/dist/esm/modules/chart/demo/data.d.ts +34 -71
  29. package/dist/esm/modules/chart/demo/data.js +36 -488
  30. package/dist/esm/modules/chart/demo/index.js +8 -37
  31. package/dist/esm/modules/chart/index.d.ts +2 -2
  32. package/dist/esm/modules/chart/index.js +39 -30
  33. package/dist/esm/modules/chart/index.less +28 -18
  34. package/dist/esm/modules/chart/intervalChart.js +12 -5
  35. package/dist/esm/modules/chart/types.d.ts +1 -1
  36. package/dist/esm/modules/content/index.js +36 -22
  37. package/dist/esm/modules/content/styles/index.less +1 -1
  38. package/dist/esm/modules/content/utils.d.ts +16 -18
  39. package/dist/esm/modules/content/utils.js +32 -21
  40. package/dist/esm/modules/home/index.js +1 -1
  41. package/dist/esm/modules/home/styles/index.less +10 -3
  42. package/dist/esm/modules/topPanel/index.js +122 -84
  43. package/dist/esm/modules/topPanel/styles/index.less +135 -16
  44. package/dist/esm/modules/topPanel/types.d.ts +4 -1
  45. package/dist/esm/style/image/empty.png +0 -0
  46. package/dist/esm/style/index.less +8 -1
  47. package/dist/esm/types.d.ts +28 -4
  48. package/dist/esm/utils/formData.d.ts +27 -6
  49. package/dist/esm/utils/formData.js +65 -29
  50. package/package.json +2 -2
  51. package/dist/esm/modules/chart/demo/panel.d.ts +0 -3
  52. package/dist/esm/modules/chart/demo/panel.js +0 -30
  53. package/dist/esm/utils/base64.d.ts +0 -29
  54. package/dist/esm/utils/base64.js +0 -132
@@ -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
  }
@@ -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.app_data;
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: {
@@ -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',
@@ -43,7 +48,7 @@ var IntervalChart = function IntervalChart(props) {
43
48
  type: 'category',
44
49
  boundaryGap: true,
45
50
  nameGap: 30,
46
- data: convertDateArray(params, seriesData === null || seriesData === void 0 ? void 0 : seriesData.x_axis),
51
+ data: convertDateArray(params, seriesData === null || seriesData === void 0 ? void 0 : seriesData.xAxis),
47
52
  splitArea: {
48
53
  show: false
49
54
  },
@@ -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, {
@@ -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
- app_data: any;
6
+ appData: any;
7
7
  xAxis: [];
8
8
  x_axis: [];
9
9
  }
@@ -22,12 +22,10 @@ import { ContentPanel, SearchPanel } from "../../components";
22
22
  import TopPanel from "../topPanel";
23
23
  import { message } from 'antd';
24
24
  var timer = 0;
25
- var ajaxFlag = true;
26
25
  var CancelToken = Request.CancelToken;
27
26
  var cancel;
28
- var classPrefix = 'event-content';
27
+ var classPrefix = 'interval-content';
29
28
  var EventContent = function EventContent(props) {
30
- // console.log('EventContent', props);
31
29
  // 最后的查询数据(防止图表在还没查询时就改变了类型)
32
30
  var _useState = useState(props.value),
33
31
  _useState2 = _slicedToArray(_useState, 2),
@@ -58,10 +56,14 @@ var EventContent = function EventContent(props) {
58
56
  _useState12 = _slicedToArray(_useState11, 2),
59
57
  isCity = _useState12[0],
60
58
  setIsCity = _useState12[1];
61
- var _useState13 = useState(-1),
59
+ var _useState13 = useState(false),
62
60
  _useState14 = _slicedToArray(_useState13, 2),
63
- eventId = _useState14[0],
64
- setEventId = _useState14[1];
61
+ ajaxFlag = _useState14[0],
62
+ setAjaxFlag = _useState14[1];
63
+ var _useState15 = useState(-1),
64
+ _useState16 = _slicedToArray(_useState15, 2),
65
+ eventId = _useState16[0],
66
+ setEventId = _useState16[1];
65
67
  var _useContext2 = useContext(EventContext),
66
68
  searchData = _useContext2.searchData,
67
69
  setSearchData = _useContext2.setSearchData,
@@ -90,7 +92,7 @@ var EventContent = function EventContent(props) {
90
92
  var flag = true;
91
93
  timer = setTimeout(function () {
92
94
  if (flag) {
93
- fetchRequest();
95
+ fetchRequest(false);
94
96
  }
95
97
  }, 500);
96
98
  return function () {
@@ -102,11 +104,20 @@ var EventContent = function EventContent(props) {
102
104
  useEffect(function () {
103
105
  handleSearch && handleSearch(loading);
104
106
  }, [loading]);
107
+ useEffect(function () {
108
+ if (ajaxFlag) {
109
+ fetchRequest(true);
110
+ }
111
+ }, [ajaxFlag]);
105
112
  // 查询
106
113
  var fetchRequest = function fetchRequest(flag) {
107
- var _searchData$associate, _searchData$associate2, _searchData$associate3;
108
- if (flag !== undefined) ajaxFlag = flag;
114
+ var _searchData$start, _searchData$end, _searchData$associate, _searchData$associate2, _searchData$associate3;
115
+ if (flag !== undefined) setAjaxFlag(flag);
109
116
  if (!ajaxFlag) return;
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
+ }
110
121
  setLoading(true);
111
122
  setEventData(undefined);
112
123
  // 取消上次未完成的请求
@@ -114,17 +125,15 @@ var EventContent = function EventContent(props) {
114
125
  cancel();
115
126
  }
116
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);
117
129
  return message.error('您查询的属性不一致,暂不支持查询');
118
130
  }
119
131
  var params = searchDataParams(searchData);
120
- // const params = {"app_id":177,"platform":0,"user_group":"0","time":{"dimension_date":"week","begin_date":"2023-08-07","end_date":"2023-09-04"},"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"}}
121
- // console.log(666666, searchData, params);
122
132
  props.onChange && props.onChange(searchData);
123
133
  ajax(Apis.dataList, {
124
134
  method: 'post',
125
135
  data: _objectSpread({
126
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
127
- platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
136
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
128
137
  }, params),
129
138
  cancelToken: new CancelToken(function executor(c) {
130
139
  cancel = c;
@@ -147,10 +156,10 @@ var EventContent = function EventContent(props) {
147
156
 
148
157
  // 改变时间和图表类型
149
158
  var onChangeContent = function onChangeContent(data) {
150
- ajaxFlag = true;
151
159
  setSearchData(function (value) {
152
160
  return _objectSpread(_objectSpread({}, value), data);
153
161
  });
162
+ setAjaxFlag(true);
154
163
  };
155
164
 
156
165
  // 改变显示内容
@@ -160,39 +169,44 @@ var EventContent = function EventContent(props) {
160
169
 
161
170
  // 平台变更
162
171
  var platformChange = function platformChange(data) {
163
- ajaxFlag = true;
164
- setSearchData(function (_searchData) {
165
- return _objectSpread(_objectSpread({}, _searchData), {}, {
172
+ setSearchData(function (value) {
173
+ return _objectSpread(_objectSpread({}, value), {}, {
166
174
  platform: data
167
175
  });
168
176
  });
177
+ setTimeout(function () {
178
+ setAjaxFlag(true);
179
+ }, 100);
169
180
  };
170
181
 
171
182
  // TopPanel组件数值变更
172
183
  var onChangeSearch = function onChangeSearch(data, flag) {
173
- ajaxFlag = flag;
174
184
  data.id ? setEventId(data.id) : setEventId(-1);
175
185
  setSearchData(function (_searchData) {
176
186
  return _objectSpread(_objectSpread({}, _searchData), data);
177
187
  });
188
+ setAjaxFlag(false);
178
189
  };
179
190
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
180
191
  searchData: searchData,
192
+ loading: loading,
193
+ eventData: eventData,
181
194
  platformChange: platformChange,
182
195
  onUserDrill: props.onUserDrill
183
196
  }), /*#__PURE__*/React.createElement(BizLayout, {
184
197
  showTitle: false,
185
198
  hasCollapse: true,
199
+ className: "interval-layout",
186
200
  collapseRef: collapseRef,
187
- topPanel: /*#__PURE__*/React.createElement("div", {
188
- ref: collapseRef
189
- }, /*#__PURE__*/React.createElement(TopPanel, {
201
+ topPanel: /*#__PURE__*/React.createElement(TopPanel, {
202
+ collapseRef: collapseRef,
190
203
  onChange: onChangeSearch,
191
204
  defaultValue: searchData,
192
205
  ajaxFlag: ajaxFlag,
206
+ loading: loading,
193
207
  finalSearchData: finalSearchData,
194
208
  fetchRequest: fetchRequest
195
- }))
209
+ })
196
210
  }, /*#__PURE__*/React.createElement("div", {
197
211
  className: classPrefix
198
212
  }, /*#__PURE__*/React.createElement(SearchPanel, {
@@ -1,4 +1,4 @@
1
- .event-content {
1
+ .interval-content {
2
2
  &-options {
3
3
  display: flex;
4
4
  justify-content: flex-end;
@@ -21,37 +21,35 @@ 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
- event_id: any;
25
- event_name: any;
24
+ eventId: any;
25
+ eventName: any;
26
26
  condition: any;
27
27
  };
28
28
  export declare function searchDataParams(params: any): {
29
- time: {
30
- dimension_date: any;
31
- begin_date: any;
32
- end_date: any;
33
- };
34
- user_group: any;
29
+ time: any;
30
+ platform: any;
31
+ userGroup: any;
35
32
  start: {
36
33
  operator: any;
37
- event_id: any;
38
- event_name: any;
34
+ eventId: any;
35
+ eventName: any;
39
36
  condition: any;
40
37
  };
41
38
  end: {
42
39
  operator: any;
43
- event_id: any;
44
- event_name: any;
40
+ eventId: any;
41
+ eventName: any;
45
42
  condition: any;
46
43
  };
47
44
  dimension: {
48
45
  sub: any;
49
46
  category: any;
50
- attr_id: any;
51
- user_attr: any;
52
- event_attr: any;
47
+ attrId: any;
48
+ userAttr: any;
49
+ eventAttr: any;
53
50
  event: any;
54
- };
55
- associated_pre_attr: any;
56
- associated_next_attr: any;
51
+ } | null;
52
+ associatedPreAttr: any;
53
+ associatedNextAttr: any;
57
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) {
@@ -58,14 +64,14 @@ export function searchCondition(params) {
58
64
  };
59
65
  return {
60
66
  operator: (params === null || params === void 0 ? void 0 : (_params$filters = params.filters) === null || _params$filters === void 0 ? void 0 : _params$filters.relation) || 'and',
61
- event_id: params === null || params === void 0 ? void 0 : params.id,
62
- event_name: params === null || params === void 0 ? void 0 : params.name,
67
+ eventId: params === null || params === void 0 ? void 0 : params.id,
68
+ eventName: params === null || params === void 0 ? void 0 : params.name,
63
69
  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
70
  return {
65
71
  name: item === null || item === void 0 ? void 0 : item.attrName,
66
72
  attrId: item === null || item === void 0 ? void 0 : item.attrId,
67
73
  params: item === null || item === void 0 ? void 0 : item.values,
68
- attr_sub: (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,
74
+ 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
75
  category: (item === null || item === void 0 ? void 0 : item.category) || 'custom',
70
76
  attrType: numAttrTypeMap[item === null || item === void 0 ? void 0 : item.type],
71
77
  operator: item === null || item === void 0 ? void 0 : item.operator
@@ -74,25 +80,30 @@ export function searchCondition(params) {
74
80
  };
75
81
  }
76
82
  export function searchDataParams(params) {
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;
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
- dimension_date: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
81
- begin_date: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
82
- end_date: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
83
- },
84
- user_group: (_params$userGroup$ = params.userGroup[0]) === null || _params$userGroup$ === void 0 ? void 0 : _params$userGroup$.id,
85
+ time: _objectSpread({}, params === null || params === void 0 ? void 0 : params.time),
86
+ platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
87
+ userGroup: params.userGroup,
85
88
  start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
86
89
  end: searchCondition(params === null || params === void 0 ? void 0 : params.end),
87
- dimension: {
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
- category: (params === null || params === void 0 ? void 0 : (_params$dimension4 = params.dimension) === null || _params$dimension4 === void 0 ? void 0 : _params$dimension4.category) || 'custom',
90
- attr_id: params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.id,
91
- user_attr: (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
- event_attr: (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
- 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
- },
95
- associated_pre_attr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
96
- associated_next_attr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
90
+ dimension: params !== null && params !== void 0 && (_params$dimension = params.dimension) !== null && _params$dimension !== void 0 && _params$dimension.propCategory ? {
91
+ sub: (params === null || params === void 0 ? void 0 : (_params$dimension2 = params.dimension) === null || _params$dimension2 === void 0 ? void 0 : _params$dimension2.propCategory) === 'userProp' ? 'user_attr' : (params === null || params === void 0 ? void 0 : (_params$dimension3 = params.dimension) === null || _params$dimension3 === void 0 ? void 0 : _params$dimension3.propCategory) === 'eventProp' ? 'event_attr' : params === null || params === void 0 ? void 0 : (_params$dimension4 = params.dimension) === null || _params$dimension4 === void 0 ? void 0 : _params$dimension4.name,
92
+ category: (params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.category) || 'custom',
93
+ attrId: params === null || params === void 0 ? void 0 : (_params$dimension6 = params.dimension) === null || _params$dimension6 === void 0 ? void 0 : _params$dimension6.id,
94
+ userAttr: (params === null || params === void 0 ? void 0 : (_params$dimension7 = params.dimension) === null || _params$dimension7 === void 0 ? void 0 : _params$dimension7.propCategory) === 'userProp' ? params === null || params === void 0 ? void 0 : (_params$dimension8 = params.dimension) === null || _params$dimension8 === void 0 ? void 0 : _params$dimension8.dimensionSub : null,
95
+ eventAttr: (params === null || params === void 0 ? void 0 : (_params$dimension9 = params.dimension) === null || _params$dimension9 === void 0 ? void 0 : _params$dimension9.propCategory) === 'eventProp' ? params === null || params === void 0 ? void 0 : (_params$dimension10 = params.dimension) === null || _params$dimension10 === void 0 ? void 0 : _params$dimension10.label : null,
96
+ event: (params === null || params === void 0 ? void 0 : (_params$dimension11 = params.dimension) === null || _params$dimension11 === void 0 ? void 0 : _params$dimension11.propCategory) !== 'envProp' ? params === null || params === void 0 ? void 0 : (_params$dimension12 = params.dimension) === null || _params$dimension12 === void 0 ? void 0 : _params$dimension12.eventId : null
97
+ } : null,
98
+ associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
99
+ associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
97
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
+ });
98
109
  }
@@ -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 = 'event-container';
21
+ var classPrefix = 'interval-module-container';
22
22
  var ModuleInterval = function ModuleInterval(props) {
23
23
  // 属性
24
24
  var _useContext = useContext(BizGlobalDataContext),
@@ -3,12 +3,19 @@
3
3
  padding: 0;
4
4
  }
5
5
 
6
- .event-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),