@zgfe/modules-interval 1.0.3-alpha.3 → 1.0.3-alpha.30

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.
@@ -17,15 +17,18 @@
17
17
  }
18
18
 
19
19
  .panel-form-interval {
20
+ .ant-form-item-explain-error {
21
+ margin-left: 24px;
22
+ }
20
23
  &-item {
21
24
  .ant-form-item-label {
22
- padding-left: 24px;
25
+ padding-left: 24px !important;
23
26
  font-weight: 500;
24
27
  }
25
28
  .ant-form-item-control-input-content {
26
29
  height: 40px;
27
- padding: 0 24px;
28
- line-height: 40px;
30
+ padding: 0 24px !important;
31
+ line-height: 40px !important;
29
32
  .biz-select-handle {
30
33
  display: inline-block;
31
34
  width: 208px;
@@ -203,5 +206,8 @@
203
206
  line-height: 32px;
204
207
  text-align: right;
205
208
  }
209
+ .ant-form-item-explain-error {
210
+ margin-left: 0 !important;
211
+ }
206
212
  }
207
213
  }
@@ -42,23 +42,14 @@ export interface TopPanelProps {
42
42
  * 默认值
43
43
  */
44
44
  defaultValue?: SearchValue;
45
- urlParam?: SearchValue;
46
45
  loading?: boolean;
47
46
  /**
48
47
  * 数据更新
49
48
  */
50
49
  onChange: (data: SearchValue, flag: boolean) => void;
51
- /**
52
- * 是否请求数据
53
- */
54
- ajaxFlag: boolean;
55
50
  /**
56
51
  * 请求后的最新查询数据
57
52
  */
58
53
  finalSearchData?: SearchValue;
59
- /**
60
- * 请求数据方法
61
- */
62
- fetchRequest: (flag?: boolean) => void;
63
54
  collapseRef?: any;
64
55
  }
@@ -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);
@@ -144,6 +145,11 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
144
145
  align: 'right',
145
146
  dataIndex: 'total',
146
147
  key: 'total',
148
+ className: "".concat(classPrefix, "-table-td"),
149
+ sorter: function sorter(a, b) {
150
+ var _a$total, _b$total;
151
+ return ((_a$total = a === null || a === void 0 ? void 0 : a.total) !== null && _a$total !== void 0 ? _a$total : 0) - ((_b$total = b === null || b === void 0 ? void 0 : b.total) !== null && _b$total !== void 0 ? _b$total : 0);
152
+ },
147
153
  render: function render(text, record) {
148
154
  return /*#__PURE__*/React.createElement("span", null, " ", convertToHMS(text));
149
155
  }
@@ -164,22 +170,30 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
164
170
  className: "interval-drill",
165
171
  onClick: function onClick() {
166
172
  var params;
173
+ var searchParam = searchDataParams(searchData);
167
174
  // 主体下钻
168
175
  if (searchData.analysisSubject) {
169
176
  params = {
170
177
  url: Apis.subjectDrill,
171
178
  count: Number(text),
172
- params: _objectSpread({}, searchData)
179
+ params: _objectSpread({}, searchParam)
173
180
  };
174
181
  } else {
175
182
  // 用户下钻
176
183
  params = {
177
184
  url: Apis.userDrill,
178
185
  count: Number(text),
179
- params: _objectSpread({}, searchData)
186
+ params: _objectSpread({}, searchParam)
180
187
  };
181
188
  }
182
- onUserDrill === null || onUserDrill === void 0 ? void 0 : onUserDrill(params);
189
+ if (searchParam.dimension) {
190
+ params.params.groupValue = /\d{4}-\d{2}-\d{2}/.test(record.time || '') ? record.names ? record.names[0] : undefined : record.time;
191
+ }
192
+ if (/\d{4}-\d{2}-\d{2}/.test(record.time || '')) {
193
+ params.params.time.begin = record.time.split('|')[0];
194
+ params.params.time.end = record.time.split('|')[1] || record.time.split('|')[0];
195
+ }
196
+ onUserDrill === null || onUserDrill === void 0 ? void 0 : onUserDrill(params, searchData.analysisSubject ? true : false);
183
197
  }
184
198
  }, /*#__PURE__*/React.createElement(IconFont, {
185
199
  type: "a-yanjingkai"
@@ -282,7 +296,8 @@ function getChildrenData(data, index) {
282
296
  min: values[i][4] || 0,
283
297
  perValue: values[i][5] || 0,
284
298
  total: values[i][6] || 0,
285
- peopleNum: values[i][7] || 0
299
+ peopleNum: values[i][7] || 0,
300
+ names: firstSeries.names
286
301
  };
287
302
  });
288
303
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.3-alpha.3",
3
+ "version": "1.0.3-alpha.30",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -47,7 +47,7 @@
47
47
  "@types/uuid": "^9.0.2",
48
48
  "@umijs/fabric": "^2.8.1",
49
49
  "@umijs/test": "^3.0.5",
50
- "@zgfe/business-lib": "1.1.89-qirui.10",
50
+ "@zgfe/business-lib": "1.1.89-qirui.20",
51
51
  "@zgfe/modules-demo-manage": "^1.0.1",
52
52
  "antd": "^4.22.6",
53
53
  "dumi": "^1.1.0",
@@ -62,5 +62,5 @@
62
62
  "umi-request": "^1.4.0",
63
63
  "yorkie": "^2.0.0"
64
64
  },
65
- "gitHead": "ff72ad7d6d914c1f5d4e1659b0efaed33059dd3a"
65
+ "gitHead": "3c71b0146a12fcdaa4c35e4e595bb144aaa09ec3"
66
66
  }