@zgfe/modules-event 1.0.7 → 1.0.29-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 (43) hide show
  1. package/README.md +35 -35
  2. package/es/components/eventFilter/index.js +68 -20
  3. package/es/components/eventFilter/setCascade.d.ts +3 -0
  4. package/es/components/eventFilter/setCascade.js +286 -0
  5. package/es/components/eventFilter/styles/index.less +148 -36
  6. package/es/components/renderContent/index.js +14 -25
  7. package/es/components/renderContent/styles/index.less +19 -19
  8. package/es/components/renderContent/types.d.ts +0 -1
  9. package/es/components/searchPanel/index.js +19 -6
  10. package/es/components/searchPanel/styles/index.less +22 -18
  11. package/es/components/searchPanel/types.d.ts +2 -2
  12. package/es/components/table/index.js +60 -9
  13. package/es/components/table/styles/index.less +241 -193
  14. package/es/components/table/types.d.ts +0 -1
  15. package/es/components/topBar/index.d.ts +6 -1
  16. package/es/components/topBar/index.js +39 -22
  17. package/es/components/topBar/styles/index.less +58 -63
  18. package/es/components/topBar/types.d.ts +0 -1
  19. package/es/constants/apis.d.ts +3 -1
  20. package/es/constants/apis.js +4 -2
  21. package/es/constants/fields.d.ts +0 -14
  22. package/es/constants/fields.js +1 -45
  23. package/es/modules/chart/demo/panel.js +7 -2
  24. package/es/modules/chart/index.js +105 -36
  25. package/es/modules/chart/types.d.ts +3 -0
  26. package/es/modules/content/index.d.ts +1 -1
  27. package/es/modules/content/index.js +94 -55
  28. package/es/modules/content/styles/index.less +19 -7
  29. package/es/modules/content/utils.d.ts +1 -1
  30. package/es/modules/content/utils.js +21 -19
  31. package/es/modules/home/demo/edit.js +6 -7
  32. package/es/modules/home/demo/index.js +1 -1
  33. package/es/modules/home/demo/styles/index.less +33 -33
  34. package/es/modules/home/index.js +53 -35
  35. package/es/modules/home/styles/index.less +49 -49
  36. package/es/modules/topPanel/index.js +36 -8
  37. package/es/modules/topPanel/styles/index.less +50 -49
  38. package/es/style/image/ring.svg +8 -8
  39. package/es/style/index.less +62 -62
  40. package/es/types.d.ts +6 -0
  41. package/es/utils/formData.d.ts +2 -1
  42. package/es/utils/formData.js +63 -16
  43. package/package.json +24 -20
@@ -1,49 +1,49 @@
1
- .event-module-container {
2
- width: 100%;
3
- min-width: 1000px;
4
- height: auto;
5
- background: #fafafb;
6
- &-header-title {
7
- height: 48px;
8
- padding: 0px 24px;
9
- color: #021429;
10
- font-weight: 500;
11
- font-size: 16px;
12
- line-height: 48px;
13
- background: #fff;
14
- }
15
- .biz-layout-top {
16
- margin-top: 2px;
17
- padding-top: 0;
18
- .biz-user-group-header {
19
- .ant-space-item {
20
- color: #5f6085;
21
- }
22
- }
23
- }
24
- .ant-spin-container {
25
- width: 100%;
26
- // height: 100%;
27
- }
28
-
29
- .biz-select-option:not(.biz-select-option-multiple),
30
- .biz-attr-select-option {
31
- &.active {
32
- background: @primary-color !important;
33
- }
34
- }
35
-
36
- // 设置下拉框最大高度
37
- .biz-select-overlay {
38
- max-height: 300px;
39
- }
40
-
41
- .biz-layout-panel-content {
42
- height: auto;
43
- }
44
-
45
- .biz-layout-collapse-container {
46
- align-items: center;
47
- height: 24px;
48
- }
49
- }
1
+ .event-module-container {
2
+ width: 100%;
3
+ min-width: 1000px;
4
+ height: 100% !important;
5
+ background: #fafafb;
6
+ &-header-title {
7
+ height: 48px;
8
+ padding: 0px 16px;
9
+ color: #021429;
10
+ font-weight: 500;
11
+ font-size: 16px;
12
+ line-height: 48px;
13
+ background: #fff;
14
+ }
15
+ .biz-layout-top {
16
+ margin-top: 2px;
17
+ padding: 0 16px 16px;
18
+ .biz-user-group-header {
19
+ .ant-space-item {
20
+ color: #5f6085;
21
+ }
22
+ }
23
+ }
24
+ .ant-spin-container {
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+
29
+ .biz-select-option:not(.biz-select-option-multiple),
30
+ .biz-attr-select-option {
31
+ &.active {
32
+ background: @primary-color !important;
33
+ }
34
+ }
35
+
36
+ // 设置下拉框最大高度
37
+ .biz-select-overlay {
38
+ max-height: 300px;
39
+ }
40
+
41
+ .biz-layout-panel-content {
42
+ height: auto;
43
+ }
44
+
45
+ .biz-layout-collapse-container {
46
+ align-items: center;
47
+ height: 24px;
48
+ }
49
+ }
@@ -10,14 +10,17 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState, useEffect } from 'react';
14
- import { Form, Button } from 'antd';
15
- import { BizUserGroupHeader, BizSelect, useSubject } from '@zgfe/business-lib';
13
+ import React, { useState, useEffect, useRef, useImperativeHandle, useContext } from 'react';
14
+ import { Form, Button, Tooltip } from 'antd';
15
+ import { BizUserGroupHeader, BizSelect, useSubject, IconFont } from '@zgfe/business-lib';
16
16
  import EventFilter from '../../components/eventFilter';
17
17
  import './styles/index.less';
18
18
  import _ from 'lodash';
19
+ import { EventContext } from '../../types';
19
20
  var classPrefix = 'modules-event-top-panel';
20
21
  var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
22
+ var _useContext = useContext(EventContext),
23
+ currentApp = _useContext.currentApp;
21
24
  var value = props.value,
22
25
  setIsCity = props.setIsCity,
23
26
  setEnableSelectChart = props.setEnableSelectChart,
@@ -62,6 +65,21 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
62
65
  });
63
66
  props.onChange(searchData, true);
64
67
  }
68
+ var collapseRef = useRef();
69
+ useImperativeHandle(ref, function () {
70
+ return {
71
+ onFormSetFieldsValue: function onFormSetFieldsValue(data) {
72
+ form.resetFields();
73
+ form.setFieldsValue(data);
74
+ },
75
+ getCollapseRef: function getCollapseRef() {
76
+ return collapseRef;
77
+ },
78
+ submit: function submit() {
79
+ return form.submit();
80
+ }
81
+ };
82
+ });
65
83
  var resetting = function resetting() {
66
84
  form.resetFields();
67
85
  form.setFieldsValue({
@@ -115,12 +133,22 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
115
133
  scrollToFirstError: true,
116
134
  onFinish: onSearch
117
135
  }, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
118
- label: "\u5206\u6790\u4E3B\u4F53",
136
+ label: /*#__PURE__*/React.createElement("div", {
137
+ className: "".concat(classPrefix, "-label-hasIcon")
138
+ }, /*#__PURE__*/React.createElement("span", null, "\u7EDF\u8BA1\u53E3\u5F84"), "\xA0\xA0", /*#__PURE__*/React.createElement(Tooltip, {
139
+ title: "\u5E2E\u52A9",
140
+ placement: "top"
141
+ }, /*#__PURE__*/React.createElement(IconFont, {
142
+ type: "bangzhu",
143
+ onClick: function onClick() {
144
+ return window.open('https://docs.zhugeio.com/datamanager/Statistical_caliber.html', '_blank');
145
+ }
146
+ }))),
119
147
  className: "".concat(classPrefix, "-form-event hoverable-form-item")
120
148
  }, /*#__PURE__*/React.createElement(BizSelect, {
121
149
  className: "".concat(classPrefix, "-form-event-select"),
122
150
  options: [{
123
- label: '用户',
151
+ label: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户',
124
152
  value: 'user'
125
153
  }, {
126
154
  label: '事件属性',
@@ -146,7 +174,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
146
174
  max: 3,
147
175
  enableTags: true
148
176
  })) : /*#__PURE__*/React.createElement(Form.Item, {
149
- label: "\u4E3B\u4F53\u540D\u79F0",
177
+ label: "\u53E3\u5F84\u540D\u79F0",
150
178
  name: "analysisSubject",
151
179
  className: "".concat(classPrefix, "-form-event hoverable-form-item"),
152
180
  rules: [{
@@ -154,7 +182,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
154
182
  if (value && (value.id || value.subjectId)) {
155
183
  return Promise.resolve();
156
184
  } else {
157
- return Promise.reject('请选择分析主体');
185
+ return Promise.reject('请选择口径名称');
158
186
  }
159
187
  }
160
188
  }]
@@ -165,7 +193,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
165
193
  labelField: "subjectName",
166
194
  keyField: "id"
167
195
  })), /*#__PURE__*/React.createElement("div", {
168
- ref: ref
196
+ ref: collapseRef
169
197
  }, /*#__PURE__*/React.createElement(Form.Item, {
170
198
  label: "\u4E8B\u4EF6",
171
199
  name: "filterConditions",
@@ -1,49 +1,50 @@
1
- .modules-event-top-panel {
2
- &-form-event {
3
- margin-bottom: 0;
4
- & .ant-form-item-label {
5
- padding-left: 24px !important;
6
- font-weight: 500;
7
- }
8
- &-select {
9
- width: 208px;
10
- margin-left: 24px;
11
- .biz-select-handle-input {
12
- padding-left: 12px;
13
- }
14
- }
15
- .ant-form-item-row .ant-form-item-control {
16
- margin-bottom: 24px;
17
- padding: 4px 0;
18
- }
19
- .ant-form-item-explain-error {
20
- padding-left: 24px;
21
- }
22
- }
23
- &-form-botton-box {
24
- display: flex;
25
- justify-content: flex-end;
26
- margin-right: 24px;
27
- > :nth-child(1) {
28
- margin-right: 16px;
29
- color: #fff;
30
- background-color: #29bd52;
31
- border-color: #29bd52;
32
- }
33
- }
34
- &-form {
35
- // .ant-form-item-has-error .biz-event-select {
36
- // border: 1px solid @error-color !important;
37
- // }
38
- }
39
- }
40
- .hoverable-form-item {
41
- .ant-form-item-control {
42
- &:hover {
43
- background: #e8efff !important;
44
- }
45
- }
46
- }
47
- .event---1 .ant-form-item-label {
48
- padding-bottom: 4px !important;
49
- }
1
+ .modules-event-top-panel {
2
+ &-form-event {
3
+ margin-bottom: 0;
4
+ & .ant-form-item-label {
5
+ padding-left: 24px !important;
6
+ font-weight: 500;
7
+ }
8
+ &-select {
9
+ width: 208px;
10
+ margin-left: 24px;
11
+ .biz-select-handle-input {
12
+ padding-left: 12px;
13
+ }
14
+ }
15
+ .ant-form-item-row .ant-form-item-control {
16
+ margin-bottom: 24px;
17
+ padding: 4px 0;
18
+ }
19
+ .ant-form-item-explain-error {
20
+ padding-left: 24px;
21
+ }
22
+ }
23
+ &-form-botton-box {
24
+ display: flex;
25
+ justify-content: flex-end;
26
+ margin-right: 24px;
27
+ > :nth-child(1) {
28
+ margin-right: 16px;
29
+ color: #fff;
30
+ background-color: #29bd52;
31
+ border-color: #29bd52;
32
+ }
33
+ }
34
+
35
+ &-label-hasIcon {
36
+ .bsicon {
37
+ cursor: pointer;
38
+ }
39
+ }
40
+ }
41
+ .hoverable-form-item {
42
+ .ant-form-item-control {
43
+ &:hover {
44
+ background: #e8efff !important;
45
+ }
46
+ }
47
+ }
48
+ .event---1 .ant-form-item-label {
49
+ padding-bottom: 4px !important;
50
+ }
@@ -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>
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
9
  <!-- [ldio] generated by https://loading.io/ --></svg>
@@ -1,62 +1,62 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
- .event-form-data {
3
- &-table-td {
4
- padding: 0 !important;
5
-
6
- &-show {
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- min-width: 60px;
11
- height: 48px;
12
- cursor: pointer;
13
- span {
14
- width: 10px;
15
- height: 10px;
16
- border-radius: 50%;
17
- cursor: pointer;
18
- }
19
- }
20
-
21
- &-name {
22
- display: flex;
23
- align-items: center;
24
- .bsicon {
25
- margin-right: 4px;
26
- color: #fd9f41;
27
- }
28
-
29
- &-content {
30
- display: inline-block;
31
- max-width: 300px;
32
- overflow: hidden;
33
- white-space: nowrap;
34
- text-overflow: ellipsis;
35
- cursor: pointer;
36
- }
37
- }
38
-
39
- &-link {
40
- display: flex;
41
- justify-content: flex-end;
42
- &:hover {
43
- .a-yanjingkai {
44
- display: block;
45
- }
46
- }
47
- .a-yanjingkai {
48
- display: none;
49
- margin-right: 10px;
50
- }
51
- }
52
- &-link:not(.not-to-detail) {
53
- cursor: pointer;
54
- &:hover {
55
- color: @primary-color;
56
- }
57
- }
58
- }
59
- &-table-event-data {
60
- text-align: right !important;
61
- }
62
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
+ .event-form-data {
3
+ &-table-td {
4
+ padding: 0 !important;
5
+
6
+ &-show {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ min-width: 60px;
11
+ height: 48px;
12
+ cursor: pointer;
13
+ span {
14
+ width: 10px;
15
+ height: 10px;
16
+ border-radius: 50%;
17
+ cursor: pointer;
18
+ }
19
+ }
20
+
21
+ &-name {
22
+ display: flex;
23
+ align-items: center;
24
+ .bsicon {
25
+ margin-right: 4px;
26
+ color: #fd9f41;
27
+ }
28
+
29
+ &-content {
30
+ display: inline-block;
31
+ max-width: 300px;
32
+ overflow: hidden;
33
+ white-space: nowrap;
34
+ text-overflow: ellipsis;
35
+ cursor: pointer;
36
+ }
37
+ }
38
+
39
+ &-link {
40
+ display: flex;
41
+ justify-content: flex-end;
42
+ &:hover {
43
+ .a-yanjingkai {
44
+ display: block;
45
+ }
46
+ }
47
+ .a-yanjingkai {
48
+ display: none;
49
+ margin-right: 10px;
50
+ }
51
+ }
52
+ &-link:not(.not-to-detail) {
53
+ cursor: pointer;
54
+ &:hover {
55
+ color: @primary-color;
56
+ }
57
+ }
58
+ }
59
+ &-table-event-data {
60
+ text-align: right !important;
61
+ }
62
+ }
package/es/types.d.ts CHANGED
@@ -62,6 +62,12 @@ export interface ResponseDataProps {
62
62
  huanbi?: number[];
63
63
  total?: number[];
64
64
  yesterDay?: string[];
65
+ sum?: number;
66
+ yValues: number[];
67
+ userGroupEventTimeSum: [{
68
+ [k: string]: number[];
69
+ }];
70
+ eventPvTitle: string;
65
71
  }
66
72
  export interface SeriesProps {
67
73
  names?: string[];
@@ -5,10 +5,11 @@ import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSe
5
5
  import { ResponseDataProps, SearchValue } from '../types';
6
6
  import { EventProps } from '../modules/home/types';
7
7
  import '../style/index.less';
8
+ export declare function sortOriginalData(data: any, sorter: any): any;
8
9
  export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], userGroup: number[] | string[], searchData: SearchValue, showList: string[], onShowCallback: Function, onClickToDetailCallback: Function, onSelectEvent?: (id: number, name: string) => void): ColumnsType<EventProps.ColumnsDataType>;
9
10
  export declare function getChartDataEventAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
10
11
  export declare function getEventAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
11
- export declare function getEventAliasId(name: string, eventGroupList: EventGroup[] | undefined): number;
12
+ export declare function getEventAliasId(name: any, eventGroupList: EventGroup[] | undefined): number;
12
13
  export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
13
14
  export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
14
15
  export declare function marketEventGroupList(eventGroupList: EventGroup[] | undefined): string[];
@@ -1,3 +1,9 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1
7
  import { util, IconFont } from '@zgfe/business-lib';
2
8
  import React from 'react';
3
9
  import { message } from 'antd';
@@ -9,6 +15,23 @@ import { Tooltip } from 'antd';
9
15
  import '../style/index.less';
10
16
  import { getValue } from '../modules/content/utils';
11
17
  var classPrefix = 'event-form-data';
18
+ export function sortOriginalData(data, sorter) {
19
+ var columnKey = sorter.columnKey,
20
+ order = sorter.order;
21
+ if (columnKey && order) {
22
+ var sortedData = _toConsumableArray(data).sort(function (a, b) {
23
+ if (order === 'ascend') {
24
+ return a[columnKey] - b[columnKey];
25
+ } else if (order === 'descend') {
26
+ return b[columnKey] - a[columnKey];
27
+ }
28
+ return 0;
29
+ });
30
+ return sortedData;
31
+ } else {
32
+ return data;
33
+ }
34
+ }
12
35
  export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, userGroup, searchData, showList, onShowCallback, onClickToDetailCallback, onSelectEvent) {
13
36
  var marketEventNameList = marketEventGroupList(eventGroupList);
14
37
  var data = [{
@@ -23,7 +46,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
23
46
  render: function render(_, record) {
24
47
  var isActive = showList.includes(record.nameGroup);
25
48
  var cannotClick = showList.length >= 10 && !isActive;
26
- return /*#__PURE__*/React.createElement("div", {
49
+ return record.color ? /*#__PURE__*/React.createElement("div", {
27
50
  className: "".concat(classPrefix, "-table-td-show"),
28
51
  onClick: function onClick() {
29
52
  if (cannotClick) return;
@@ -33,7 +56,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
33
56
  style: {
34
57
  background: isActive ? record.color : '#D9D9D9'
35
58
  }
36
- }));
59
+ })) : /*#__PURE__*/React.createElement("div", {
60
+ className: "".concat(classPrefix, "-table-td-show")
61
+ });
37
62
  }
38
63
  }];
39
64
  if (!(searchData === null || searchData === void 0 ? void 0 : searchData.analysisSubject) && (userGroup.length > 1 || userGroup[0] !== 0)) {
@@ -45,7 +70,11 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
45
70
  ellipsis: true,
46
71
  fixed: 'left',
47
72
  render: function render(text) {
48
- return text;
73
+ return /*#__PURE__*/React.createElement("div", {
74
+ className: "tooltip-userGroup-box"
75
+ }, /*#__PURE__*/React.createElement(Tooltip, {
76
+ title: text
77
+ }, /*#__PURE__*/React.createElement("div", null, text)));
49
78
  }
50
79
  });
51
80
  }
@@ -90,7 +119,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
90
119
  key: 'eventName',
91
120
  ellipsis: true,
92
121
  fixed: 'left',
93
- render: function render(val) {
122
+ render: function render(val, record) {
94
123
  var _val = val;
95
124
  return /*#__PURE__*/React.createElement("div", {
96
125
  className: "tooltip-name-box"
@@ -99,7 +128,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
99
128
  }, /*#__PURE__*/React.createElement("div", {
100
129
  className: "tooltip-name-box-market",
101
130
  onClick: function onClick() {
102
- onSelectEvent && onSelectEvent(getEventAliasId(val, eventGroupList), val);
131
+ !record.isAdd && onSelectEvent && onSelectEvent(getEventAliasId(record === null || record === void 0 ? void 0 : record.originalName, eventGroupList), val);
103
132
  }
104
133
  }, /*#__PURE__*/React.createElement(IconFont, {
105
134
  type: "shoucang",
@@ -117,6 +146,23 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
117
146
  }
118
147
  });
119
148
  }
149
+ data.push({
150
+ title: '合计',
151
+ width: 50,
152
+ dataIndex: 'attrSum',
153
+ ellipsis: true,
154
+ key: 'attrSum',
155
+ align: 'center',
156
+ className: "".concat(classPrefix, "-table-td"),
157
+ fixed: 'left',
158
+ render: function render(text) {
159
+ return /*#__PURE__*/React.createElement("div", {
160
+ className: "tooltip-userGroup-box"
161
+ }, /*#__PURE__*/React.createElement(Tooltip, {
162
+ title: text
163
+ }, /*#__PURE__*/React.createElement("div", null, text)));
164
+ }
165
+ });
120
166
  var _loop = function _loop(i) {
121
167
  var value = columnData[i];
122
168
  if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
@@ -137,18 +183,19 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
137
183
  align: 'center',
138
184
  ellipsis: true,
139
185
  dataIndex: "field".concat(i),
186
+ defaultSortOrder: i === columnData.length - 1 ? 'descend' : null,
140
187
  className: "".concat(classPrefix, "-table-event-data"),
141
188
  sorter: function sorter(a, b) {
142
- return a["field".concat(i)] - b["field".concat(i)];
189
+ return a.isAdd || b.isAdd ? 0 : a["field".concat(i)] - b["field".concat(i)];
143
190
  },
144
191
  render: function render(text, record) {
145
192
  var click = text > 0 && (searchData.analysisIndex === 'number' ? true : false);
146
193
  return /*#__PURE__*/React.createElement("div", {
147
- className: "".concat(classPrefix, "-table-td-link ").concat(click ? '' : 'not-to-detail'),
194
+ className: "".concat(classPrefix, "-table-td-link ").concat(!record.isAdd && click ? '' : 'not-to-detail'),
148
195
  onClick: function onClick() {
149
- click ? onClickToDetailCallback(record, columnData[i], text) : null;
196
+ !record.isAdd && click ? onClickToDetailCallback(record, columnData[i], text) : null;
150
197
  }
151
- }, click && /*#__PURE__*/React.createElement(IconFont, {
198
+ }, !record.isAdd && click && /*#__PURE__*/React.createElement(IconFont, {
152
199
  type: "a-yanjingkai"
153
200
  }), text);
154
201
  }
@@ -162,7 +209,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
162
209
  export function getChartDataEventAliasName(dataSource, eventGroupList) {
163
210
  var data = _.cloneDeep(dataSource);
164
211
  var series = [];
165
- data.series.map(function (item) {
212
+ data === null || data === void 0 ? void 0 : data.series.map(function (item) {
166
213
  item.originalNames = item.names;
167
214
  item.names = item.names.length > 1 ? [item.names[0], getEventAliasName(item.names[1], eventGroupList)] : [getEventAliasName(item.names[0], eventGroupList)];
168
215
  series.push(item);
@@ -193,7 +240,7 @@ export function getEventAliasId(name, eventGroupList) {
193
240
  return eventId;
194
241
  }
195
242
  export function getSortData(data) {
196
- var series = data.series;
243
+ var series = data === null || data === void 0 ? void 0 : data.series;
197
244
  var sort = function sort(obj1, obj2) {
198
245
  var val1 = obj1.values[0];
199
246
  var val2 = obj2.values[0];
@@ -209,20 +256,20 @@ export function getSortData(data) {
209
256
  return data;
210
257
  }
211
258
  export function getUserGroupsCompareData(data) {
212
- if (data.series.length <= 0) {
259
+ if ((data === null || data === void 0 ? void 0 : data.series.length) <= 0) {
213
260
  return data;
214
261
  } else {
215
262
  var _data = _.cloneDeep(data);
216
263
  var _series = [];
217
- _data.series.map(function (item, index) {
264
+ _data === null || _data === void 0 ? void 0 : _data.series.map(function (item, index) {
218
265
  _series.push(item);
219
- _data.series.map(function (_item, _index) {
266
+ _data === null || _data === void 0 ? void 0 : _data.series.map(function (_item, _index) {
220
267
  if (item.names[1] === _item.names[1] && index !== _index) {
221
268
  _series.push(_item);
222
- delete _data.series[_index];
269
+ _data === null || _data === void 0 ? true : delete _data.series[_index];
223
270
  }
224
271
  });
225
- delete _data.series[index];
272
+ _data === null || _data === void 0 ? true : delete _data.series[index];
226
273
  });
227
274
  _data.series = _series;
228
275
  return _data;