@zgfe/modules-interval 1.0.23-zhongyuan.0 → 1.0.23-zhongyuan.10

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 (47) hide show
  1. package/README.md +35 -35
  2. package/dist/esm/components/common/styles/index.less +40 -40
  3. package/dist/esm/components/eventFilter/index.js +6 -5
  4. package/dist/esm/components/eventFilter/styles/index.less +39 -39
  5. package/dist/esm/components/renderContent/styles/index.css +32 -0
  6. package/dist/esm/components/renderContent/styles/index.less +1 -0
  7. package/dist/esm/components/searchPanel/index.js +6 -1
  8. package/dist/esm/components/searchPanel/styles/index.less +71 -71
  9. package/dist/esm/components/table/index.js +3 -2
  10. package/dist/esm/components/table/styles/index.less +138 -138
  11. package/dist/esm/components/topBar/styles/index.less +16 -16
  12. package/dist/esm/constants/apis.js +4 -4
  13. package/dist/esm/constants/code.d.ts +13 -0
  14. package/dist/esm/constants/code.js +13 -0
  15. package/dist/esm/constants/fields.js +4 -4
  16. package/dist/esm/modules/chart/customTooltip.js +5 -3
  17. package/dist/esm/modules/chart/customTooltip1.d.ts +7 -0
  18. package/dist/esm/modules/chart/customTooltip1.js +46 -0
  19. package/dist/esm/modules/chart/index.css +52 -0
  20. package/dist/esm/modules/chart/index.js +19 -8
  21. package/dist/esm/modules/chart/index.less +1 -1
  22. package/dist/esm/modules/chart/intervalChart copy.d.ts +4 -0
  23. package/dist/esm/modules/chart/intervalChart copy.js +299 -0
  24. package/dist/esm/modules/chart/intervalChart.js +321 -35
  25. package/dist/esm/modules/chart/types.d.ts +5 -0
  26. package/dist/esm/modules/content/index.js +50 -20
  27. package/dist/esm/modules/content/styles/index.less +25 -25
  28. package/dist/esm/modules/content/utils.js +1 -1
  29. package/dist/esm/modules/home/demo/create.js +5 -3
  30. package/dist/esm/modules/home/demo/edit.js +132 -34
  31. package/dist/esm/modules/home/demo/index.js +1 -1
  32. package/dist/esm/modules/home/demo/scene.js +1 -1
  33. package/dist/esm/modules/home/demo/styles/index.less +33 -33
  34. package/dist/esm/modules/home/index.js +8 -1
  35. package/dist/esm/modules/home/styles/index.less +69 -69
  36. package/dist/esm/modules/topPanel/index.js +39 -29
  37. package/dist/esm/modules/topPanel/styles/index.less +6 -6
  38. package/dist/esm/modules/topPanel/types.d.ts +1 -0
  39. package/dist/esm/style/image/empty.png +0 -0
  40. package/dist/esm/style/image/ring.svg +9 -9
  41. package/dist/esm/style/index.less +67 -67
  42. package/dist/esm/types.js +6 -6
  43. package/dist/esm/utils/ajaxConfig.js +5 -5
  44. package/dist/esm/utils/formData.d.ts +4 -0
  45. package/dist/esm/utils/formData.js +36 -30
  46. package/dist/esm/utils/util.js +28 -28
  47. package/package.json +6 -6
@@ -44,7 +44,7 @@
44
44
  padding-left: 12px;
45
45
  }
46
46
  &:hover {
47
- background-color: #e8efff;
47
+ background-color: #e7f3fe;
48
48
  }
49
49
  }
50
50
  }
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .ant-space-item:nth-child(2):hover {
69
- background-color: #e8efff;
69
+ background-color: #e7f3fe;
70
70
  }
71
71
  }
72
72
  }
@@ -110,7 +110,7 @@
110
110
  }
111
111
 
112
112
  > div:nth-child(1):hover {
113
- background-color: #e8efff;
113
+ background-color: #e7f3fe;
114
114
  }
115
115
 
116
116
  .biz-attr-condition-group-handle {
@@ -135,7 +135,7 @@
135
135
  }
136
136
 
137
137
  .ant-space-item:hover {
138
- background-color: #e8efff;
138
+ background-color: #e7f3fe;
139
139
  }
140
140
  }
141
141
 
@@ -145,7 +145,7 @@
145
145
  }
146
146
 
147
147
  .ant-form-item-control-input:hover {
148
- background-color: #e8efff;
148
+ background-color: #e7f3fe;
149
149
  }
150
150
  }
151
151
  }
@@ -186,7 +186,7 @@
186
186
  }
187
187
 
188
188
  .ant-form-item-control-input:hover {
189
- background-color: #e8efff;
189
+ background-color: #e7f3fe;
190
190
  }
191
191
 
192
192
  .associated-link {
@@ -42,6 +42,7 @@ export interface TopPanelProps {
42
42
  * 默认值
43
43
  */
44
44
  defaultValue?: SearchValue;
45
+ propsDefaultValue?: SearchValue;
45
46
  loading?: boolean;
46
47
  /**
47
48
  * 数据更新
File without changes
@@ -1,9 +1,9 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
3
- <circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
4
- <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
5
- </circle>
6
- <circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
7
- <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
8
- </circle>
9
- <!-- [ldio] generated by https://loading.io/ --></svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
3
+ <circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
4
+ <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
5
+ </circle>
6
+ <circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
7
+ <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
8
+ </circle>
9
+ <!-- [ldio] generated by https://loading.io/ --></svg>
@@ -1,67 +1,67 @@
1
- .interval-form-data {
2
- &-table-td {
3
- padding: 0 !important;
4
-
5
- .ant-table-column-sorters {
6
- justify-content: end !important;
7
- }
8
-
9
- &-show {
10
- display: flex;
11
- align-items: center;
12
- justify-content: center;
13
- min-width: 60px;
14
- height: 48px;
15
- cursor: pointer;
16
-
17
- span {
18
- width: 10px;
19
- height: 10px;
20
- border-radius: 50%;
21
- cursor: pointer;
22
- }
23
- }
24
-
25
- &-name {
26
- display: flex;
27
- align-items: center;
28
-
29
- .bsicon {
30
- margin-right: 4px;
31
- color: #fd9f41;
32
- }
33
-
34
- &-content {
35
- display: inline-block;
36
- max-width: 300px;
37
- overflow: hidden;
38
- white-space: nowrap;
39
- text-overflow: ellipsis;
40
- cursor: pointer;
41
- }
42
- }
43
-
44
- &-link {
45
- cursor: pointer;
46
-
47
- &:hover {
48
- color: #165dff;
49
- text-decoration: underline;
50
- }
51
- }
52
- }
53
- }
54
- .interval-drill {
55
- display: block;
56
- .bsicon {
57
- display: none;
58
- margin-right: 4px;
59
- }
60
- &:hover {
61
- color: @primary-color;
62
- cursor: pointer;
63
- .bsicon {
64
- display: inline;
65
- }
66
- }
67
- }
1
+ .interval-form-data {
2
+ &-table-td {
3
+ padding: 0 !important;
4
+
5
+ .ant-table-column-sorters {
6
+ justify-content: end !important;
7
+ }
8
+
9
+ &-show {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ min-width: 60px;
14
+ height: 48px;
15
+ cursor: pointer;
16
+
17
+ span {
18
+ width: 10px;
19
+ height: 10px;
20
+ border-radius: 50%;
21
+ cursor: pointer;
22
+ }
23
+ }
24
+
25
+ &-name {
26
+ display: flex;
27
+ align-items: center;
28
+
29
+ .bsicon {
30
+ margin-right: 4px;
31
+ color: #fd9f41;
32
+ }
33
+
34
+ &-content {
35
+ display: inline-block;
36
+ max-width: 300px;
37
+ overflow: hidden;
38
+ white-space: nowrap;
39
+ text-overflow: ellipsis;
40
+ cursor: pointer;
41
+ }
42
+ }
43
+
44
+ &-link {
45
+ cursor: pointer;
46
+
47
+ &:hover {
48
+ color: #165dff;
49
+ text-decoration: underline;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ .interval-drill {
55
+ display: block;
56
+ .bsicon {
57
+ display: none;
58
+ margin-right: 4px;
59
+ }
60
+ &:hover {
61
+ color: @primary-color;
62
+ cursor: pointer;
63
+ .bsicon {
64
+ display: inline;
65
+ }
66
+ }
67
+ }
package/dist/esm/types.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { createContext } from 'react';
2
2
 
3
- /**
4
- * 属性选择器 默认值
3
+ /**
4
+ * 属性选择器 默认值
5
5
  */
6
6
 
7
- /**
8
- * 图表选择类型
7
+ /**
8
+ * 图表选择类型
9
9
  */
10
10
 
11
- /**
12
- * series value
11
+ /**
12
+ * series value
13
13
  */
14
14
 
15
15
  var defaultContext = {
@@ -1,10 +1,10 @@
1
1
  import _ from 'lodash';
2
2
 
3
- /**
4
- * 接口option封装
5
- * @param url url
6
- * @param options 操作
7
- * @returns
3
+ /**
4
+ * 接口option封装
5
+ * @param url url
6
+ * @param options 操作
7
+ * @returns
8
8
  */
9
9
  function setOptionWapper(url, options) {
10
10
  var reqOption = _.cloneDeep(options);
@@ -38,9 +38,11 @@ export declare function formTableData(originalData: ChartData): {
38
38
  total: number;
39
39
  peopleNum: number;
40
40
  names: string[];
41
+ originalNames: string[];
41
42
  }[] | {
42
43
  key: number;
43
44
  time: string;
45
+ originalNames: string[];
44
46
  max: number;
45
47
  Q1: number;
46
48
  median: number;
@@ -61,12 +63,14 @@ export declare function formTableData(originalData: ChartData): {
61
63
  total: number;
62
64
  peopleNum: number;
63
65
  names: string[];
66
+ originalNames: string[];
64
67
  }[];
65
68
  }[] | undefined;
66
69
  type ChartData = {
67
70
  appData: {
68
71
  series?: {
69
72
  names: string[];
73
+ originalNames: string[];
70
74
  values: number[][];
71
75
  total: number[];
72
76
  }[];
@@ -12,6 +12,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  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); }
14
14
  import React from 'react';
15
+ import { Tooltip } from 'antd';
15
16
  import { chartColors } from "../constants/color";
16
17
  import "../style/index.less";
17
18
  import { IconFont } from '@zgfe/business-lib';
@@ -27,10 +28,10 @@ function convertToHMS(seconds) {
27
28
  var s = remainingSeconds ? remainingSeconds + '秒' : '0秒';
28
29
  return h + m + s;
29
30
  }
30
- /**
31
- * 获取table的columns
32
- * @param columnData xAxis
33
- * @returns column fields
31
+ /**
32
+ * 获取table的columns
33
+ * @param columnData xAxis
34
+ * @returns column fields
34
35
  */
35
36
  export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, dataSource, userGroup, searchData, showList, onUserDrill, currentApp
36
37
  // onClickToDetailCallback: Function,
@@ -46,7 +47,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
46
47
  dataIndex: 'time',
47
48
  className: "".concat(classPrefix, "-table-td"),
48
49
  render: function render(text, record) {
49
- return /*#__PURE__*/React.createElement("span", null, " ", text);
50
+ return /*#__PURE__*/React.createElement(Tooltip, {
51
+ title: text
52
+ }, /*#__PURE__*/React.createElement("span", null, " ", text));
50
53
  }
51
54
  }, {
52
55
  title: '最大值',
@@ -188,7 +191,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
188
191
  };
189
192
  }
190
193
  if (searchParam.dimension) {
191
- params.params.groupValue = /\d{4}-\d{2}-\d{2}/.test(record.time || '') ? record.names ? record.names[0] : undefined : record.time;
194
+ params.params.groupValue = record.originalNames ? record.originalNames[0] : undefined;
195
+ params.params.groupValueEncry = searchParam.dimension.encryptionType > 0;
192
196
  }
193
197
  if (/\d{4}-\d{2}-\d{2}/.test(record.time || '')) {
194
198
  params.params.time.begin = record.time.split('|')[0];
@@ -204,22 +208,22 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
204
208
  return data;
205
209
  }
206
210
 
207
- /**
208
- * 获取属性的label
209
- * @param attrData 当前属性
210
- * @param eventGroupList 事件属性列表
211
- * @param userPropList 用户属性列表
212
- * @param eventEnvList 环境属性列表
213
- * @returns label
211
+ /**
212
+ * 获取属性的label
213
+ * @param attrData 当前属性
214
+ * @param eventGroupList 事件属性列表
215
+ * @param userPropList 用户属性列表
216
+ * @param eventEnvList 环境属性列表
217
+ * @returns label
214
218
  */
215
219
 
216
- /**
217
- * 格式化表格数据
218
- * @param originalData 查询的数据
219
- * @param hasUserGroup 是否有多个用户群
220
- * @param attrNum 属性细分个数
221
- * @param showList 要展示的内容,如果没传,则展示全部
222
- * @returns
220
+ /**
221
+ * 格式化表格数据
222
+ * @param originalData 查询的数据
223
+ * @param hasUserGroup 是否有多个用户群
224
+ * @param attrNum 属性细分个数
225
+ * @param showList 要展示的内容,如果没传,则展示全部
226
+ * @returns
223
227
  */
224
228
  export function formTableData(originalData) {
225
229
  var result = createNewArray(originalData);
@@ -236,6 +240,7 @@ function createNewArray(data) {
236
240
  return {
237
241
  key: i + 1,
238
242
  time: item.names[0],
243
+ originalNames: item.originalNames,
239
244
  max: item.total[0] || 0,
240
245
  Q1: item.total[1] || 0,
241
246
  median: item.total[2] || 0,
@@ -298,16 +303,17 @@ function getChildrenData(data, index) {
298
303
  perValue: values[i][5] || 0,
299
304
  total: values[i][6] || 0,
300
305
  peopleNum: values[i][7] || 0,
301
- names: firstSeries.names
306
+ names: firstSeries.names,
307
+ originalNames: firstSeries.originalNames
302
308
  };
303
309
  });
304
310
  }
305
311
  return [];
306
312
  }
307
- /**
308
- * 获取查询结果
309
- * @param source 结果数据
310
- * @returns 获取查询结果
313
+ /**
314
+ * 获取查询结果
315
+ * @param source 结果数据
316
+ * @returns 获取查询结果
311
317
  */
312
318
  export function getDefaultShow(source, data) {
313
319
  if (source.appData.series) {
@@ -329,11 +335,11 @@ export function getDefaultShow(source, data) {
329
335
  }
330
336
  return [];
331
337
  }
332
- /**
333
- * 获取显示事件对应的颜色
334
- * @param source 结果数据
335
- * @param showList 展示列表
336
- * @returns 展示列表对应的颜色
338
+ /**
339
+ * 获取显示事件对应的颜色
340
+ * @param source 结果数据
341
+ * @param showList 展示列表
342
+ * @returns 展示列表对应的颜色
337
343
  */
338
344
  export function getShowColor(source, showList) {
339
345
  var colors = [];
@@ -29,11 +29,11 @@ var util = {
29
29
  equal: function equal(a, b) {
30
30
  return JSON.stringify(a) === JSON.stringify(b);
31
31
  },
32
- /**
33
- * 获取指定范围的随机数
34
- * @param min
35
- * @param max
36
- * @returns {*}
32
+ /**
33
+ * 获取指定范围的随机数
34
+ * @param min
35
+ * @param max
36
+ * @returns {*}
37
37
  */
38
38
  random: function random(min, max) {
39
39
  return Math.round(Math.random() * (max - min)) + min;
@@ -68,42 +68,42 @@ var util = {
68
68
  }
69
69
  return option;
70
70
  },
71
- /**
72
- * 将数字转为千分位分割格式
73
- * @param num
74
- * @returns {string}
71
+ /**
72
+ * 将数字转为千分位分割格式
73
+ * @param num
74
+ * @returns {string}
75
75
  */
76
76
  toThousands: function toThousands(num) {
77
77
  var source = String(num).split('.'); // 按小数点分成2部分
78
78
  source[0] = source[0].replace(new RegExp('(\\d)(?=(\\d{3})+$)', 'ig'), '$1,'); // 只将整数部分进行都好分割
79
79
  return source.join('.'); // 再将小数部分合并进来
80
80
  },
81
- /**
82
- * 为单数前补0
83
- * @param num
84
- * @returns {string}
81
+ /**
82
+ * 为单数前补0
83
+ * @param num
84
+ * @returns {string}
85
85
  */
86
86
  toDoubleNumber: function toDoubleNumber(num) {
87
87
  // num += ''
88
88
  var num2 = num.toString();
89
89
  return num > 9 ? num2 : '0' + num2;
90
90
  },
91
- /**
92
- * 日期格式化
93
- * @param date
94
- * @param formatter
95
- * @returns {string}
91
+ /**
92
+ * 日期格式化
93
+ * @param date
94
+ * @param formatter
95
+ * @returns {string}
96
96
  */
97
97
  dateFormat: function dateFormat() {
98
98
  var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
99
99
  var formatter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
100
100
  return formatter.replace('yyyy', date.getFullYear()).replace('mm', this.toDoubleNumber(date.getMonth() + 1)).replace('dd', this.toDoubleNumber(date.getDate()));
101
101
  },
102
- /**
103
- * 日期格式化
104
- * @param date
105
- * @param formatter
106
- * @returns {string}
102
+ /**
103
+ * 日期格式化
104
+ * @param date
105
+ * @param formatter
106
+ * @returns {string}
107
107
  */
108
108
  timeFormat: function timeFormat() {
109
109
  var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
@@ -128,11 +128,11 @@ var util = {
128
128
  return formatter.replace('hh', this.toDoubleNumber(h)).replace('mm', this.toDoubleNumber(m)).replace('ss', this.toDoubleNumber(s));
129
129
  }
130
130
  },
131
- /**
132
- * 从中间拆分字符串,长度超出的话,解析为xxx...xxx
133
- * @param str
134
- * @param config
135
- * @returns {string}
131
+ /**
132
+ * 从中间拆分字符串,长度超出的话,解析为xxx...xxx
133
+ * @param str
134
+ * @param config
135
+ * @returns {string}
136
136
  */
137
137
  strMiddleSplit: function strMiddleSplit(str) {
138
138
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
package/package.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.23-zhongyuan.0",
3
+ "version": "1.0.23-zhongyuan.10",
4
+ "private": false,
4
5
  "module": "dist/esm/index.js",
5
6
  "typings": "dist/esm/index.d.ts",
6
- "private": false,
7
- "publishConfig": {
8
- "access": "public"
9
- },
10
7
  "files": [
11
8
  "dist"
12
9
  ],
@@ -59,7 +56,10 @@
59
56
  "umi-request": "^1.4.0",
60
57
  "yorkie": "^2.0.0"
61
58
  },
62
- "gitHead": "c1029ad4038cc39d49878a4ced941e120ec59982",
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "gitHead": "84e4a80651712930d3f41e02179b62c9c8891793",
63
63
  "gitHooks": {
64
64
  "pre-commit": "lint-staged"
65
65
  }