@zgfe/modules-interval 1.0.3-alpha.5 → 1.0.3-alpha.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.
@@ -22,7 +22,7 @@ export declare namespace IntervalProps {
22
22
  /**
23
23
  * 用户钻取
24
24
  */
25
- onUserDrill: (data: IntervalDrillParams) => void;
25
+ onUserDrill: (data: IntervalDrillParams, isSubject: boolean) => void;
26
26
  onJumpWarning: (data: Record<string, any>, searchData: SearchValue) => void;
27
27
  }
28
28
  interface Value {
@@ -69,6 +69,7 @@ export declare namespace IntervalProps {
69
69
  min?: number;
70
70
  perValue?: number;
71
71
  peopleNum?: number;
72
+ names?: string[];
72
73
  children?: ColumnsDataType[];
73
74
  }
74
75
  }
@@ -37,6 +37,7 @@ export declare function formTableData(originalData: ChartData): {
37
37
  perValue: number;
38
38
  total: number;
39
39
  peopleNum: number;
40
+ names: string[];
40
41
  }[] | {
41
42
  key: number;
42
43
  time: string;
@@ -59,6 +60,7 @@ export declare function formTableData(originalData: ChartData): {
59
60
  perValue: number;
60
61
  total: number;
61
62
  peopleNum: number;
63
+ names: string[];
62
64
  }[];
63
65
  }[] | undefined;
64
66
  type ChartData = {
@@ -16,6 +16,7 @@ import { chartColors } from "../constants/color";
16
16
  import "../style/index.less";
17
17
  import { IconFont } from '@zgfe/business-lib';
18
18
  import { Apis } from "../constants";
19
+ import { searchDataParams } from "../modules/content/utils";
19
20
  var classPrefix = 'interval-form-data';
20
21
  function convertToHMS(seconds) {
21
22
  var hours = Math.floor(seconds / 3600);
@@ -164,31 +165,30 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
164
165
  className: "interval-drill",
165
166
  onClick: function onClick() {
166
167
  var params;
168
+ var searchParam = searchDataParams(searchData);
167
169
  // 主体下钻
168
170
  if (searchData.analysisSubject) {
169
171
  params = {
170
172
  url: Apis.subjectDrill,
171
173
  count: Number(text),
172
- params: _objectSpread({}, searchData)
174
+ params: _objectSpread({}, searchParam)
173
175
  };
174
176
  } else {
175
177
  // 用户下钻
176
178
  params = {
177
179
  url: Apis.userDrill,
178
180
  count: Number(text),
179
- params: _objectSpread(_objectSpread({}, searchData), {}, {
180
- groupValue: searchData.dimension ? record.time : undefined
181
- })
181
+ params: _objectSpread({}, searchParam)
182
182
  };
183
183
  }
184
- if (searchData.dimension) {
185
- params.params.groupValue = record.time;
184
+ if (searchParam.dimension) {
185
+ params.params.groupValue = /\d{4}-\d{2}-\d{2}/.test(record.time || '') ? record.names ? record.names[0] : undefined : record.time;
186
186
  }
187
- if (/dddd-dd-dd/.test(record.time || '')) {
187
+ if (/\d{4}-\d{2}-\d{2}/.test(record.time || '')) {
188
188
  params.params.time.begin = record.time.split('|')[0];
189
- params.params.time.end = record.time.split('|')[1] || params.params.time.end;
189
+ params.params.time.end = record.time.split('|')[1] || record.time.split('|')[0];
190
190
  }
191
- onUserDrill === null || onUserDrill === void 0 ? void 0 : onUserDrill(params);
191
+ onUserDrill === null || onUserDrill === void 0 ? void 0 : onUserDrill(params, searchData.analysisSubject ? true : false);
192
192
  }
193
193
  }, /*#__PURE__*/React.createElement(IconFont, {
194
194
  type: "a-yanjingkai"
@@ -291,7 +291,8 @@ function getChildrenData(data, index) {
291
291
  min: values[i][4] || 0,
292
292
  perValue: values[i][5] || 0,
293
293
  total: values[i][6] || 0,
294
- peopleNum: values[i][7] || 0
294
+ peopleNum: values[i][7] || 0,
295
+ names: firstSeries.names
295
296
  };
296
297
  });
297
298
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.3-alpha.5",
3
+ "version": "1.0.3-alpha.7",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -62,5 +62,5 @@
62
62
  "umi-request": "^1.4.0",
63
63
  "yorkie": "^2.0.0"
64
64
  },
65
- "gitHead": "502a09099976208baf7e37532ba69fa6e260c26a"
65
+ "gitHead": "802d131a050ab271873a660c0479908f6a663142"
66
66
  }