@zgfe/modules-whole 1.0.10-zhongyuan.0

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 (97) hide show
  1. package/README.md +37 -0
  2. package/es/components/dataUpdateTime/index.d.ts +3 -0
  3. package/es/components/dataUpdateTime/index.js +53 -0
  4. package/es/components/eventFilter/index.d.ts +5 -0
  5. package/es/components/eventFilter/index.js +263 -0
  6. package/es/components/eventFilter/styles/index.less +36 -0
  7. package/es/components/eventFilter/types.d.ts +20 -0
  8. package/es/components/eventFilter/types.js +1 -0
  9. package/es/components/index.d.ts +4 -0
  10. package/es/components/index.js +4 -0
  11. package/es/components/renderContent/index.d.ts +5 -0
  12. package/es/components/renderContent/index.js +44 -0
  13. package/es/components/renderContent/styles/index.less +20 -0
  14. package/es/components/renderContent/types.d.ts +9 -0
  15. package/es/components/renderContent/types.js +1 -0
  16. package/es/components/searchPanel/index.d.ts +5 -0
  17. package/es/components/searchPanel/index.js +164 -0
  18. package/es/components/searchPanel/styles/index.less +22 -0
  19. package/es/components/searchPanel/types.d.ts +23 -0
  20. package/es/components/searchPanel/types.js +1 -0
  21. package/es/components/table/index.d.ts +5 -0
  22. package/es/components/table/index.js +130 -0
  23. package/es/components/table/styles/index.less +193 -0
  24. package/es/components/table/types.d.ts +9 -0
  25. package/es/components/table/types.js +1 -0
  26. package/es/components/topBar/index.d.ts +5 -0
  27. package/es/components/topBar/index.js +163 -0
  28. package/es/components/topBar/styles/index.less +71 -0
  29. package/es/components/topBar/types.d.ts +8 -0
  30. package/es/components/topBar/types.js +1 -0
  31. package/es/constants/apis.d.ts +8 -0
  32. package/es/constants/apis.js +8 -0
  33. package/es/constants/chart.d.ts +2 -0
  34. package/es/constants/chart.js +31 -0
  35. package/es/constants/color.d.ts +1 -0
  36. package/es/constants/color.js +1 -0
  37. package/es/constants/fields.d.ts +271 -0
  38. package/es/constants/fields.js +260 -0
  39. package/es/constants/index.d.ts +6 -0
  40. package/es/constants/index.js +6 -0
  41. package/es/constants/initData.d.ts +2 -0
  42. package/es/constants/initData.js +9 -0
  43. package/es/constants/json/line.d.ts +20 -0
  44. package/es/constants/json/line.js +25 -0
  45. package/es/index.d.ts +5 -0
  46. package/es/index.js +4 -0
  47. package/es/modules/chart/demo/data.d.ts +78 -0
  48. package/es/modules/chart/demo/data.js +489 -0
  49. package/es/modules/chart/demo/index.d.ts +3 -0
  50. package/es/modules/chart/demo/index.js +12 -0
  51. package/es/modules/chart/demo/panel.d.ts +3 -0
  52. package/es/modules/chart/demo/panel.js +11 -0
  53. package/es/modules/chart/index.d.ts +4 -0
  54. package/es/modules/chart/index.js +246 -0
  55. package/es/modules/chart/types.d.ts +15 -0
  56. package/es/modules/chart/types.js +1 -0
  57. package/es/modules/content/index.d.ts +5 -0
  58. package/es/modules/content/index.js +234 -0
  59. package/es/modules/content/styles/index.less +7 -0
  60. package/es/modules/content/types.d.ts +11 -0
  61. package/es/modules/content/types.js +1 -0
  62. package/es/modules/content/utils.d.ts +17 -0
  63. package/es/modules/content/utils.js +107 -0
  64. package/es/modules/home/demo/create.d.ts +3 -0
  65. package/es/modules/home/demo/create.js +58 -0
  66. package/es/modules/home/demo/edit.d.ts +3 -0
  67. package/es/modules/home/demo/edit.js +86 -0
  68. package/es/modules/home/demo/index.d.ts +4 -0
  69. package/es/modules/home/demo/index.js +83 -0
  70. package/es/modules/home/demo/scene.d.ts +3 -0
  71. package/es/modules/home/demo/scene.js +89 -0
  72. package/es/modules/home/demo/styles/index.less +33 -0
  73. package/es/modules/home/index.d.ts +5 -0
  74. package/es/modules/home/index.js +218 -0
  75. package/es/modules/home/styles/index.less +39 -0
  76. package/es/modules/home/types.d.ts +34 -0
  77. package/es/modules/home/types.js +1 -0
  78. package/es/modules/topPanel/index.d.ts +5 -0
  79. package/es/modules/topPanel/index.js +154 -0
  80. package/es/modules/topPanel/styles/index.less +41 -0
  81. package/es/modules/topPanel/types.d.ts +39 -0
  82. package/es/modules/topPanel/types.js +1 -0
  83. package/es/style/image/ring.svg +9 -0
  84. package/es/style/index.less +62 -0
  85. package/es/style/theme.d.ts +15 -0
  86. package/es/style/theme.js +14 -0
  87. package/es/types.d.ts +79 -0
  88. package/es/types.js +6 -0
  89. package/es/utils/ajaxConfig.d.ts +8 -0
  90. package/es/utils/ajaxConfig.js +12 -0
  91. package/es/utils/base64.d.ts +23 -0
  92. package/es/utils/base64.js +125 -0
  93. package/es/utils/formData.d.ts +21 -0
  94. package/es/utils/formData.js +366 -0
  95. package/es/utils/util.d.ts +36 -0
  96. package/es/utils/util.js +167 -0
  97. package/package.json +63 -0
@@ -0,0 +1,164 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ 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); }
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
+ 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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import { BizDatePickerV2, BizGlobalDataContext, BizSelect, IconFont, ajax } from '@zgfe/business-lib';
14
+ import React, { useContext, useEffect, useState } from 'react';
15
+ import { Apis, chartTypeOptions, getInitDate } from '../../constants';
16
+ import { WholeContext } from '../../types';
17
+ import './styles/index.less';
18
+ import { Button, message } from 'antd';
19
+ import base64 from '../../utils/base64';
20
+ var classPrefix = 'search-panel';
21
+ var SearchPanel = function SearchPanel(props) {
22
+ var _useContext = useContext(WholeContext),
23
+ includeToday = _useContext.includeToday,
24
+ refreshLoading = _useContext.refreshLoading,
25
+ searchData = _useContext.searchData,
26
+ currentApp = _useContext.currentApp,
27
+ disableItemList = _useContext.disableItemList,
28
+ setSearchData = _useContext.setSearchData;
29
+ var _useContext2 = useContext(BizGlobalDataContext),
30
+ authority = _useContext2.authority;
31
+ var _useState = useState(props.time || getInitDate(includeToday)),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ time = _useState2[0],
34
+ setTime = _useState2[1];
35
+ var _useState3 = useState(chartTypeOptions[0]),
36
+ _useState4 = _slicedToArray(_useState3, 2),
37
+ chart = _useState4[0],
38
+ setChart = _useState4[1];
39
+ useEffect(function () {
40
+ var val = getInitDate(includeToday);
41
+ setTime(val);
42
+ }, [includeToday]);
43
+ useEffect(function () {
44
+ if (searchData.chartType && searchData.chartType !== chart.value) {
45
+ if (searchData.chartType.indexOf(',') !== -1) {
46
+ setChart({
47
+ value: searchData.chartType.split(',')[0]
48
+ });
49
+ } else {
50
+ setChart({
51
+ value: searchData.chartType
52
+ });
53
+ }
54
+ }
55
+ }, [searchData]);
56
+ useEffect(function () {
57
+ var currentChart = chartTypeOptions.filter(function (item) {
58
+ return !disableItemList.some(function (it) {
59
+ return it == item.value;
60
+ });
61
+ })[0];
62
+ if (searchData.chartType && disableItemList.some(function (it) {
63
+ return it == searchData.chartType;
64
+ }) && searchData.chartType !== currentChart.value) {
65
+ setSearchData(_objectSpread(_objectSpread({}, searchData), {}, {
66
+ chartType: currentChart.value
67
+ }));
68
+ setChart(currentChart);
69
+ props.onChange && props.onChange({
70
+ chartType: currentChart.value
71
+ });
72
+ }
73
+ }, [disableItemList]);
74
+ var onChangeTime = function onChangeTime(val) {
75
+ setTime(val);
76
+ props.onChange && props.onChange({
77
+ time: val
78
+ });
79
+ };
80
+ var onChange = function onChange(val) {
81
+ setChart(val);
82
+ props.onChange && props.onChange({
83
+ chartType: val.value
84
+ });
85
+ };
86
+ var download = function download() {
87
+ var _searchData$userGroup;
88
+ var seriesNames = [];
89
+ if (((_searchData$userGroup = searchData.userGroup) === null || _searchData$userGroup === void 0 ? void 0 : _searchData$userGroup.length) && searchData.userGroup[0] !== 0) {
90
+ seriesNames.push(base64.encode('用户群'));
91
+ }
92
+ if (searchData.dimension) {
93
+ var _searchData$dimension;
94
+ seriesNames.push(base64.encode((_searchData$dimension = searchData.dimension) === null || _searchData$dimension === void 0 ? void 0 : _searchData$dimension.label));
95
+ }
96
+ if (searchData.id && !searchData.dimension || !searchData.id) {
97
+ seriesNames.push(base64.encode('指标'));
98
+ }
99
+ var fname = "\u6574\u4F53\u5206\u6790_".concat(searchData.time.begin, "_").concat(searchData.time.end);
100
+ var params = _objectSpread(_objectSpread({
101
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
102
+ platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0,
103
+ analysisIndex: 'number'
104
+ }, searchData), {}, {
105
+ down: {
106
+ fname: base64.encode(fname),
107
+ titles: seriesNames
108
+ }
109
+ });
110
+ ajax(Apis.downloadReport, {
111
+ method: 'post',
112
+ data: params,
113
+ responseType: 'blob',
114
+ fileName: fname,
115
+ getResponse: true
116
+ }).then(function () {
117
+ message.success('下载成功!');
118
+ });
119
+ };
120
+ return /*#__PURE__*/React.createElement("div", {
121
+ className: classPrefix
122
+ }, /*#__PURE__*/React.createElement("div", {
123
+ style: {
124
+ display: 'flex'
125
+ }
126
+ }, /*#__PURE__*/React.createElement(BizDatePickerV2, {
127
+ key: searchData.id,
128
+ includeToday: includeToday,
129
+ defaultValue: time,
130
+ onChange: onChangeTime,
131
+ selectRange: 365,
132
+ selectRangeUnit: "days"
133
+ })), /*#__PURE__*/React.createElement("div", {
134
+ className: "".concat(classPrefix, "-search-right")
135
+ }, /*#__PURE__*/React.createElement(Button, {
136
+ className: "".concat(classPrefix, "-search-right-refresh"),
137
+ icon: /*#__PURE__*/React.createElement(IconFont, {
138
+ type: "zhongxinjiazai"
139
+ }),
140
+ loading: refreshLoading,
141
+ onClick: function onClick() {
142
+ return props.refreshHandle();
143
+ }
144
+ }, "\u5237\u65B0"), /*#__PURE__*/React.createElement(BizSelect, {
145
+ className: "".concat(classPrefix, "-select"),
146
+ options: chartTypeOptions,
147
+ value: chart,
148
+ labelField: "label",
149
+ keyField: "value",
150
+ theme: "secondary",
151
+ onChange: onChange,
152
+ disableItemList: disableItemList.map(function (item) {
153
+ return chartTypeOptions.find(function (it) {
154
+ return it.value == item;
155
+ });
156
+ })
157
+ }), /*#__PURE__*/React.createElement(Button, {
158
+ disabled: !authority[100042],
159
+ onClick: download
160
+ }, /*#__PURE__*/React.createElement(IconFont, {
161
+ type: "xiazai1"
162
+ }), "\u4E0B\u8F7D")));
163
+ };
164
+ export default SearchPanel;
@@ -0,0 +1,22 @@
1
+ @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
+
3
+ .search-panel {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ height: 32px;
8
+ margin-bottom: 16px;
9
+
10
+ &-search-right {
11
+ display: flex;
12
+ gap: 16px;
13
+ &-refresh {
14
+ display: flex !important;
15
+ gap: 4px;
16
+ }
17
+ }
18
+
19
+ &-select {
20
+ width: 112px;
21
+ }
22
+ }
@@ -0,0 +1,23 @@
1
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
2
+ import { WholeChartTypes } from '../../types';
3
+ import { ReactNode } from 'react';
4
+ import { TargetConditionTypes } from '@zgfe/business-lib';
5
+ export interface AnalysisSubject {
6
+ subjectId?: number;
7
+ id?: number;
8
+ name?: string;
9
+ unit?: string;
10
+ subjectAlias?: string;
11
+ subjectName?: string;
12
+ }
13
+ export interface SearchPanelProps {
14
+ refreshHandle: Function;
15
+ time?: DatePickerTypes.Value;
16
+ eventId?: number;
17
+ chartType?: WholeChartTypes;
18
+ optionNode?: ReactNode;
19
+ onChange?: (data: SearchPanelProps) => void;
20
+ setIsCity?: Function;
21
+ dimension?: TargetConditionTypes.DimensionValue;
22
+ setDimension?: Function;
23
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { WholeTableProps } from './types';
3
+ import './styles/index.less';
4
+ declare const WholeTable: React.FC<WholeTableProps>;
5
+ export default WholeTable;
@@ -0,0 +1,130 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ 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); }
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
+ 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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useContext, useEffect, useMemo, useState } from 'react';
14
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
15
+ import { Table, ConfigProvider, Empty } from 'antd';
16
+ import { formTableData, getColumns } from '../../utils/formData';
17
+ import './styles/index.less';
18
+ import { WholeContext } from '../../types';
19
+ var classPrefix = 'event-mi-table';
20
+ var WholeTable = function WholeTable(props) {
21
+ var dataSource = props.dataSource,
22
+ searchData = props.searchData,
23
+ showList = props.showList,
24
+ sourcePanel = props.sourcePanel;
25
+ var _useState = useState([]),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ tableData = _useState2[0],
28
+ setTableData = _useState2[1];
29
+ var _useContext = useContext(BizGlobalDataContext),
30
+ _useContext$eventGrou = _useContext.eventGroupList,
31
+ eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou,
32
+ eventEnvList = _useContext.eventEnvList,
33
+ userPropList = _useContext.userPropList;
34
+ var _useContext2 = useContext(WholeContext),
35
+ onUserDrill = _useContext2.onUserDrill,
36
+ panelName = _useContext2.panelName,
37
+ currentApp = _useContext2.currentApp;
38
+ var _useState3 = useState(1),
39
+ _useState4 = _slicedToArray(_useState3, 2),
40
+ current = _useState4[0],
41
+ setCurrent = _useState4[1];
42
+ var _useState5 = useState(10),
43
+ _useState6 = _slicedToArray(_useState5, 2),
44
+ pageSize = _useState6[0],
45
+ setPageSize = _useState6[1];
46
+ var _useState7 = useState(0),
47
+ _useState8 = _slicedToArray(_useState7, 2),
48
+ total = _useState8[0],
49
+ setTotal = _useState8[1];
50
+ useEffect(function () {
51
+ var gLen = (searchData === null || searchData === void 0 ? void 0 : searchData.dimension) ? 1 : 0;
52
+ var _data = formTableData(dataSource, searchData.userGroup || [0], gLen);
53
+ setTotal(_data.length);
54
+ setTableData(_data);
55
+ }, []);
56
+ var columns = useMemo(function () {
57
+ var _searchData$userGroup = searchData.userGroup,
58
+ userGroup = _searchData$userGroup === void 0 ? [0] : _searchData$userGroup;
59
+ var onShowClick = function onShowClick(nameGroup) {
60
+ props.changeShowByName(nameGroup);
61
+ };
62
+ var onClickToDetail = function onClickToDetail(item, time, count) {
63
+ var _searchData$time, _searchData$time2, _searchData$filters;
64
+ if (searchData.module == 'duration' && item.eventName != '活跃用户') return;
65
+ var _time = searchData.module == 'duration' ? [(_searchData$time = searchData.time) === null || _searchData$time === void 0 ? void 0 : _searchData$time.begin, (_searchData$time2 = searchData.time) === null || _searchData$time2 === void 0 ? void 0 : _searchData$time2.end] : time.split('|');
66
+ onUserDrill && onUserDrill({
67
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
68
+ platform: (searchData === null || searchData === void 0 ? void 0 : searchData.platform) || 0,
69
+ count: count,
70
+ params: {
71
+ module: searchData === null || searchData === void 0 ? void 0 : searchData.module,
72
+ chartType: searchData === null || searchData === void 0 ? void 0 : searchData.chartType,
73
+ userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup,
74
+ moduleType: 'overall',
75
+ id: 0,
76
+ time: _objectSpread(_objectSpread({}, searchData === null || searchData === void 0 ? void 0 : searchData.time), {}, {
77
+ begin: _time[0],
78
+ end: _time.length > 1 ? _time[1] : _time[0]
79
+ }),
80
+ conditions: (_searchData$filters = searchData.filters) === null || _searchData$filters === void 0 ? void 0 : _searchData$filters.conditions,
81
+ dataType: searchData.module == 'add' ? 'new' : searchData.module,
82
+ groupValue: searchData.module == 'duration' ? time : (item === null || item === void 0 ? void 0 : item.dimension) || '',
83
+ dimension: searchData === null || searchData === void 0 ? void 0 : searchData.dimension
84
+ },
85
+ source: 'WHOLE',
86
+ url: '/zg/web/v2/data/appEventBatch'
87
+ });
88
+ };
89
+ var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, dataSource.xAxis || [], userGroup, searchData, showList, onShowClick, onClickToDetail);
90
+ return _getColumns;
91
+ }, [dataSource.xAxis, showList, panelName, searchData]);
92
+ var pageChange = function pageChange(page, pageSize) {
93
+ setCurrent(page);
94
+ setPageSize(pageSize);
95
+ };
96
+ var tableEmptyRender = function tableEmptyRender() {
97
+ return /*#__PURE__*/React.createElement(Empty, {
98
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
99
+ description: "\u6682\u65E0\u6570\u636E"
100
+ });
101
+ };
102
+ return /*#__PURE__*/React.createElement("div", {
103
+ className: classPrefix
104
+ }, /*#__PURE__*/React.createElement("div", {
105
+ className: "table-area ".concat(sourcePanel ? 'sourcepanel-table-header' : '')
106
+ }, /*#__PURE__*/React.createElement(ConfigProvider, {
107
+ renderEmpty: tableEmptyRender
108
+ }, /*#__PURE__*/React.createElement(Table, {
109
+ className: "table",
110
+ rowKey: 'id',
111
+ columns: columns,
112
+ dataSource: tableData,
113
+ scroll: {
114
+ x: true
115
+ },
116
+ pagination: {
117
+ showQuickJumper: true,
118
+ total: total,
119
+ defaultPageSize: 10,
120
+ defaultCurrent: 1,
121
+ current: current,
122
+ pageSize: pageSize,
123
+ onChange: pageChange,
124
+ showTotal: function showTotal(total) {
125
+ return "\u603B\u6761\u6570\uFF1A".concat(total, " ");
126
+ }
127
+ }
128
+ }))));
129
+ };
130
+ export default WholeTable;
@@ -0,0 +1,193 @@
1
+ .event-mi-table {
2
+ margin-top: 16px;
3
+ &-loading {
4
+ min-height: 300px;
5
+ }
6
+ &-table-header {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+ height: 50px;
11
+ margin-bottom: -1px;
12
+ padding: 0 12px;
13
+ line-height: 50px;
14
+ background: #fafafb;
15
+ border: 1px solid #e6e7ea;
16
+ border-radius: 8px 8px 0 0;
17
+ > :nth-child(2) {
18
+ display: flex;
19
+ > :nth-child(1) {
20
+ margin-right: 16px;
21
+ }
22
+ div {
23
+ height: 32px;
24
+ padding: 0 16px;
25
+ line-height: 32px;
26
+ background: #fff;
27
+ border: 1px solid #f2f3f4;
28
+ border-radius: 4px;
29
+ cursor: pointer;
30
+ .xiazai1 {
31
+ margin-right: 4px;
32
+ font-size: 18px !important;
33
+ vertical-align: -2px;
34
+ }
35
+ }
36
+ div:hover {
37
+ color: #165dff;
38
+ background: #e8efff;
39
+ border: 1px solid #165dff;
40
+ }
41
+ div:active {
42
+ color: #1454e5;
43
+ background: #e8efff;
44
+ border: 1px solid #1454e5;
45
+ }
46
+ }
47
+ }
48
+ .ant-table {
49
+ border-radius: 8px;
50
+ }
51
+ .sourcepanel-table-header {
52
+ overflow: hidden;
53
+ border-radius: 8px 8px 0 0;
54
+ .ant-table {
55
+ max-height: none;
56
+ }
57
+ }
58
+ .ant-pagination {
59
+ margin-top: 24px !important;
60
+ }
61
+ .ant-table
62
+ .ant-table-thead
63
+ .ant-table-cell.ant-table-column-has-sorters
64
+ .ant-table-column-sorters {
65
+ justify-content: flex-end !important;
66
+ }
67
+ .ant-table-cell-with-append {
68
+ padding-left: 20px;
69
+ .ant-table-row-expand-icon {
70
+ position: absolute;
71
+ left: 0;
72
+ margin-top: 0;
73
+ }
74
+ }
75
+ .tooltip-name-box {
76
+ display: flex;
77
+ &-market {
78
+ // max-width: calc(100% - 20px);
79
+ margin-right: 8px;
80
+ overflow: hidden;
81
+ white-space: nowrap;
82
+ text-overflow: ellipsis;
83
+ cursor: pointer;
84
+ -webkit-line-clamp: 1;
85
+ -webkit-box-orient: vertical;
86
+ .shoucang {
87
+ color: #fd9f41;
88
+ font-size: 16px !important;
89
+ }
90
+ .notshoucang {
91
+ opacity: 0;
92
+ }
93
+ }
94
+
95
+ .fuzhi1 {
96
+ display: none;
97
+ font-size: 16px !important;
98
+ }
99
+ .fuzhi1:hover {
100
+ color: #165dff;
101
+ }
102
+ }
103
+ .tooltip-name-box:hover {
104
+ .fuzhi1 {
105
+ display: block;
106
+ }
107
+ }
108
+
109
+ &-table-empty {
110
+ img {
111
+ width: 50px !important;
112
+ height: auto;
113
+ margin-top: 30px;
114
+ margin-bottom: 10px;
115
+ }
116
+ p {
117
+ color: rgba(0, 0, 0, 0.25);
118
+ }
119
+ }
120
+
121
+ &-chart-box {
122
+ display: flex;
123
+ flex-direction: column;
124
+ width: 100%;
125
+ &-tooltip {
126
+ width: 220px;
127
+ margin-bottom: 8px;
128
+ color: #67727f;
129
+ font-size: 12px;
130
+ }
131
+ }
132
+ }
133
+ .event-table-sql-modal {
134
+ .ant-modal {
135
+ width: 720px !important;
136
+ }
137
+ .ant-modal-header {
138
+ position: relative;
139
+ z-index: 1;
140
+ height: 82px;
141
+ background: transparent;
142
+ }
143
+ .ant-modal-body {
144
+ padding: 0 24px 24px 24px;
145
+ }
146
+ .ant-modal-close-x {
147
+ margin-top: 13px;
148
+ margin-right: 8px;
149
+ }
150
+ img {
151
+ width: 100%;
152
+ }
153
+ .qingchu {
154
+ font-weight: 500;
155
+ font-size: 22px !important;
156
+ }
157
+ .modal-bg {
158
+ position: absolute;
159
+ top: 0;
160
+ left: 0;
161
+ width: 100%;
162
+ height: auto;
163
+ }
164
+ pre {
165
+ margin-bottom: 0;
166
+ }
167
+ .hljs {
168
+ height: 400px;
169
+ padding: 16px;
170
+ padding-bottom: 0;
171
+ background: #fafafb;
172
+ border-radius: 8px;
173
+ }
174
+ .copy-box {
175
+ position: absolute;
176
+ top: 98px;
177
+ right: 40px;
178
+ padding: 0 8px;
179
+ background: #f2f3f4;
180
+ border-radius: 4px;
181
+ .fuzhi1 {
182
+ margin-right: 8px;
183
+ }
184
+ }
185
+ .copy-box:hover {
186
+ color: #165dff;
187
+ background: #e8efff;
188
+ }
189
+ .copy-box:active {
190
+ color: #1454e5;
191
+ background: #e8efff;
192
+ }
193
+ }
@@ -0,0 +1,9 @@
1
+ import { ResponseDataProps, SearchValue } from '../../types';
2
+ export interface WholeTableProps {
3
+ dataSource: ResponseDataProps;
4
+ sourcePanel: boolean;
5
+ searchData: SearchValue;
6
+ showList: string[];
7
+ isOverview?: boolean;
8
+ changeShowByName: (name: string) => void;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './styles/index.less';
3
+ import { TopBarProps } from './types';
4
+ declare const TopBar: React.FC<TopBarProps>;
5
+ export default TopBar;