@zgfe/modules-interval 1.0.3-alpha.5 → 1.0.3-alpha.6
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.
|
@@ -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,30 +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({},
|
|
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(
|
|
180
|
-
groupValue: searchData.dimension ? record.time : undefined
|
|
181
|
-
})
|
|
181
|
+
params: _objectSpread({}, searchParam)
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
if (
|
|
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 (
|
|
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] ||
|
|
189
|
+
params.params.time.end = record.time.split('|')[1] || record.time.split('|')[0];
|
|
190
190
|
}
|
|
191
|
+
console.log('下钻参数', params);
|
|
191
192
|
onUserDrill === null || onUserDrill === void 0 ? void 0 : onUserDrill(params);
|
|
192
193
|
}
|
|
193
194
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -291,7 +292,8 @@ function getChildrenData(data, index) {
|
|
|
291
292
|
min: values[i][4] || 0,
|
|
292
293
|
perValue: values[i][5] || 0,
|
|
293
294
|
total: values[i][6] || 0,
|
|
294
|
-
peopleNum: values[i][7] || 0
|
|
295
|
+
peopleNum: values[i][7] || 0,
|
|
296
|
+
names: firstSeries.names
|
|
295
297
|
};
|
|
296
298
|
});
|
|
297
299
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-interval",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.6",
|
|
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": "
|
|
65
|
+
"gitHead": "ba0839a60a99048a40e3c6082a1c11086089acad"
|
|
66
66
|
}
|