@zgfe/modules-interval 1.0.0-interval.4 → 1.0.0-interval.40

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 (54) hide show
  1. package/dist/esm/assets/business/demo_index.html +164 -26
  2. package/dist/esm/assets/business/iconfont.css +31 -7
  3. package/dist/esm/assets/business/iconfont.js +10 -10
  4. package/dist/esm/assets/business/iconfont.json +49 -7
  5. package/dist/esm/assets/business/iconfont.ttf +0 -0
  6. package/dist/esm/assets/business/iconfont.woff +0 -0
  7. package/dist/esm/assets/business/iconfont.woff2 +0 -0
  8. package/dist/esm/components/common/index.js +9 -9
  9. package/dist/esm/components/common/styles/index.less +21 -8
  10. package/dist/esm/components/eventFilter/index.js +25 -19
  11. package/dist/esm/components/eventFilter/styles/index.less +2 -5
  12. package/dist/esm/components/eventFilter/types.d.ts +2 -0
  13. package/dist/esm/components/renderContent/index.js +10 -11
  14. package/dist/esm/components/renderContent/styles/index.less +13 -2
  15. package/dist/esm/components/searchPanel/index.js +8 -3
  16. package/dist/esm/components/searchPanel/styles/index.less +34 -28
  17. package/dist/esm/components/table/index.js +13 -87
  18. package/dist/esm/components/table/styles/index.less +21 -6
  19. package/dist/esm/components/topBar/index.js +33 -20
  20. package/dist/esm/components/topBar/styles/index.less +2 -1
  21. package/dist/esm/components/topBar/types.d.ts +3 -1
  22. package/dist/esm/constants/apis.js +1 -1
  23. package/dist/esm/constants/fields.d.ts +6 -78
  24. package/dist/esm/constants/fields.js +7 -47
  25. package/dist/esm/index.d.ts +2 -2
  26. package/dist/esm/index.js +2 -2
  27. package/dist/esm/modules/chart/customTooltip.js +9 -3
  28. package/dist/esm/modules/chart/demo/data.d.ts +34 -71
  29. package/dist/esm/modules/chart/demo/data.js +36 -488
  30. package/dist/esm/modules/chart/demo/index.js +8 -37
  31. package/dist/esm/modules/chart/index.d.ts +2 -2
  32. package/dist/esm/modules/chart/index.js +39 -30
  33. package/dist/esm/modules/chart/index.less +28 -18
  34. package/dist/esm/modules/chart/intervalChart.js +12 -5
  35. package/dist/esm/modules/chart/types.d.ts +1 -1
  36. package/dist/esm/modules/content/index.js +36 -22
  37. package/dist/esm/modules/content/styles/index.less +1 -1
  38. package/dist/esm/modules/content/utils.d.ts +16 -18
  39. package/dist/esm/modules/content/utils.js +32 -21
  40. package/dist/esm/modules/home/index.js +1 -1
  41. package/dist/esm/modules/home/styles/index.less +10 -3
  42. package/dist/esm/modules/topPanel/index.js +122 -84
  43. package/dist/esm/modules/topPanel/styles/index.less +135 -16
  44. package/dist/esm/modules/topPanel/types.d.ts +4 -1
  45. package/dist/esm/style/image/empty.png +0 -0
  46. package/dist/esm/style/index.less +8 -1
  47. package/dist/esm/types.d.ts +28 -4
  48. package/dist/esm/utils/formData.d.ts +27 -6
  49. package/dist/esm/utils/formData.js +65 -29
  50. package/package.json +2 -2
  51. package/dist/esm/modules/chart/demo/panel.d.ts +0 -3
  52. package/dist/esm/modules/chart/demo/panel.js +0 -30
  53. package/dist/esm/utils/base64.d.ts +0 -29
  54. package/dist/esm/utils/base64.js +0 -132
@@ -1,11 +1,21 @@
1
- .mi-table {
1
+ .mi-interval-table {
2
2
  width: 100%;
3
3
  margin-top: 16px;
4
4
 
5
5
  .ant-table {
6
6
  border-radius: 8px;
7
7
  }
8
-
8
+ .ant-table-cell-with-append .ant-table-row-expand-icon {
9
+ left: 16px !important;
10
+ color: #9aa1a9;
11
+ border: 1px solid #9aa1a9;
12
+ }
13
+ .ant-table-row-expand-icon::before {
14
+ height: 1.4px !important;
15
+ }
16
+ .ant-table-row-expand-icon::after {
17
+ width: 1.4px !important;
18
+ }
9
19
  .ant-table-cell {
10
20
  height: 50px;
11
21
  padding: 0 16px !important;
@@ -31,26 +41,31 @@
31
41
  line-height: 50px;
32
42
  background: #fafafb;
33
43
  border: 1px solid var(--gray-6, #ecedf0);
44
+ border-bottom: none;
34
45
  border-radius: 8px 8px 0 0;
35
46
 
36
47
  > :nth-child(2) {
37
48
  display: flex;
38
49
  margin-top: 9px;
39
-
40
50
  div {
51
+ display: flex;
52
+ align-items: center;
41
53
  height: 32px;
42
54
  padding: 0 16px;
43
55
  line-height: 32px;
44
56
  background: #fff;
45
57
  border: 1px solid #f2f3f4;
58
+ border-radius: 4px;
46
59
  cursor: pointer;
47
-
48
60
  .xiazai1 {
49
61
  margin-right: 4px;
50
- font-size: 18px !important;
51
- vertical-align: -2px;
62
+ font-size: 16px !important;
52
63
  }
53
64
  }
65
+ div:hover {
66
+ color: #165dff;
67
+ border: 1px solid #165dff;
68
+ }
54
69
  }
55
70
  }
56
71
 
@@ -11,14 +11,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
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
13
  import { Button } from 'antd';
14
- import React, { useContext, useState } from 'react';
14
+ import React, { useContext, useEffect, useState } from 'react';
15
15
  import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/business-lib';
16
16
  import "./styles/index.less";
17
17
  import { EventContext } from "../../types";
18
18
  import { chartTypes, platformOption } from "../../constants/fields";
19
- var classPrefix = 'modules-event-topbar';
19
+ import { appVersionType } from '@zgfe/business-lib/es/context';
20
+ var classPrefix = 'modules-interval-topbar';
20
21
  var TopBar = function TopBar(props) {
21
- // console.log('TopBar', props);
22
22
  var _useContext = useContext(EventContext),
23
23
  panelId = _useContext.panelId,
24
24
  afterEditTarget = _useContext.afterEditTarget,
@@ -31,19 +31,23 @@ var TopBar = function TopBar(props) {
31
31
  _useState4 = _slicedToArray(_useState3, 2),
32
32
  showScene = _useState4[0],
33
33
  setShowScene = _useState4[1];
34
+ var _useState5 = useState(true),
35
+ _useState6 = _slicedToArray(_useState5, 2),
36
+ showLoading = _useState6[0],
37
+ setShowLoading = _useState6[1];
34
38
  var _useContext2 = useContext(BizGlobalDataContext),
35
39
  currentApp = _useContext2.currentApp;
36
40
  var searchData = props.searchData,
37
41
  platformChange = props.platformChange;
38
- var _useState5 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
39
- _useState6 = _slicedToArray(_useState5, 2),
40
- selectPlatform = _useState6[0],
41
- setselectPlatform = _useState6[1];
42
- // 看板弹窗类型
43
- var _useState7 = useState(),
42
+ var _useState7 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
44
43
  _useState8 = _slicedToArray(_useState7, 2),
45
- panelType = _useState8[0],
46
- setPanelType = _useState8[1];
44
+ selectPlatform = _useState8[0],
45
+ setselectPlatform = _useState8[1];
46
+ // 看板弹窗类型
47
+ var _useState9 = useState(),
48
+ _useState10 = _slicedToArray(_useState9, 2),
49
+ panelType = _useState10[0],
50
+ setPanelType = _useState10[1];
47
51
 
48
52
  // 关闭弹窗
49
53
  var closeHandle = function closeHandle(type) {
@@ -54,7 +58,11 @@ var TopBar = function TopBar(props) {
54
58
  setShowScene(false);
55
59
  }
56
60
  };
57
-
61
+ useEffect(function () {
62
+ if (props.eventData !== undefined) {
63
+ setShowLoading(false);
64
+ }
65
+ }, [props.eventData]);
58
66
  // 保存
59
67
  var _onOk = function onOk(type, val) {
60
68
  // console.log('onOk', type, val);
@@ -66,15 +74,18 @@ var TopBar = function TopBar(props) {
66
74
  }, !panelId && /*#__PURE__*/React.createElement("div", {
67
75
  className: "".concat(classPrefix, "-panel")
68
76
  }, /*#__PURE__*/React.createElement(Button, {
77
+ disabled: showLoading,
69
78
  onClick: function onClick() {
70
79
  setShowPanel(true);
71
80
  }
72
81
  }, "\u6DFB\u52A0\u5230\u770B\u677F"), showPanel && /*#__PURE__*/React.createElement(BizAddToPanel, {
73
82
  type: panelType,
74
- params: _objectSpread({
75
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
76
- module: 'event'
77
- }, searchData),
83
+ params: _objectSpread(_objectSpread({
84
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
85
+ module: 'interval'
86
+ }, searchData), {}, {
87
+ chartType: 'boxplot'
88
+ }),
78
89
  styleOptions: chartTypes,
79
90
  onCancel: function onCancel() {
80
91
  return closeHandle('panel');
@@ -85,13 +96,14 @@ var TopBar = function TopBar(props) {
85
96
  })), enableAddScene && /*#__PURE__*/React.createElement("div", {
86
97
  className: "".concat(classPrefix, "-scene")
87
98
  }, /*#__PURE__*/React.createElement(Button, {
99
+ disabled: showLoading,
88
100
  onClick: function onClick() {
89
101
  setShowScene(true);
90
102
  }
91
103
  }, "\u6DFB\u52A0\u5E38\u7528\u573A\u666F"), showScene && /*#__PURE__*/React.createElement(BizAddToScene, {
92
104
  params: _objectSpread({
93
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
94
- module: 'event'
105
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
106
+ module: 'interval'
95
107
  }, searchData),
96
108
  onOk: function onOk(data) {
97
109
  return _onOk('scene', data);
@@ -99,9 +111,10 @@ var TopBar = function TopBar(props) {
99
111
  onCancel: function onCancel() {
100
112
  return closeHandle('scene');
101
113
  }
102
- })), /*#__PURE__*/React.createElement(Button, {
114
+ })), (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) === appVersionType.CityCommercialBank ? /*#__PURE__*/React.createElement(Button, {
103
115
  className: "".concat(classPrefix, "-earlywarning"),
104
116
  type: "primary",
117
+ disabled: showLoading,
105
118
  onClick: function onClick() {
106
119
  props.onUserDrill({
107
120
  appId: Number(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId),
@@ -112,7 +125,7 @@ var TopBar = function TopBar(props) {
112
125
  url: ''
113
126
  }, searchData);
114
127
  }
115
- }, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"), /*#__PURE__*/React.createElement("div", {
128
+ }, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66") : null, /*#__PURE__*/React.createElement("div", {
116
129
  className: "".concat(classPrefix, "-platform")
117
130
  }, platformOption.map(function (item) {
118
131
  return /*#__PURE__*/React.createElement("div", {
@@ -1,6 +1,6 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
- .modules-event-topbar {
3
+ .modules-interval-topbar {
4
4
  display: flex;
5
5
  justify-content: flex-end;
6
6
  margin: 8px 0;
@@ -21,6 +21,7 @@
21
21
  > div {
22
22
  position: relative;
23
23
  padding: 0 16px;
24
+ font-size: 14px;
24
25
  background: #fff;
25
26
  border: 1px solid #ecedf0;
26
27
  cursor: pointer;
@@ -1,9 +1,11 @@
1
- import { SearchValue, UserDrillParamsProp } from '../../types';
1
+ import { ResponseDataProps, SearchValue, UserDrillParamsProp } from '../../types';
2
2
  export interface TopBarProps {
3
3
  /**
4
4
  * @description 标题
5
5
  */
6
6
  searchData?: SearchValue;
7
+ loading?: boolean;
8
+ eventData?: ResponseDataProps;
7
9
  onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
8
10
  platformChange: (data: number) => void;
9
11
  }
@@ -2,6 +2,6 @@ var Apis = {
2
2
  // dataList: '/zg/web/v2/data/eventDataList',
3
3
  dataList: '/zg/web/v2/interval/intervalData',
4
4
  getEventDataSql: '/zg/web/v2/dataSql/getEventDataSql',
5
- eventDownloadReport: '/interval/downLoadintervalData.jsp'
5
+ eventDownloadReport: '/zg/web/v2/interval/downLoadintervalData'
6
6
  };
7
7
  export default Apis;
@@ -2,35 +2,11 @@ export declare const platformOption: {
2
2
  key: number;
3
3
  value: string;
4
4
  }[];
5
- export declare const chartTypes: ({
5
+ export declare const chartTypes: {
6
6
  label: string;
7
7
  value: string;
8
8
  icon: string;
9
- children?: undefined;
10
- disabled?: undefined;
11
- } | {
12
- label: string;
13
- icon: string;
14
- value: string;
15
- children: ({
16
- label: string;
17
- value: string;
18
- icon: string;
19
- disabled?: undefined;
20
- } | {
21
- label: string;
22
- value: string;
23
- icon: string;
24
- disabled: boolean;
25
- })[];
26
- disabled?: undefined;
27
- } | {
28
- label: string;
29
- value: string;
30
- icon: string;
31
- disabled: boolean;
32
- children?: undefined;
33
- })[];
9
+ }[];
34
10
  export declare const addPanelFields: ({
35
11
  label: string;
36
12
  name: string;
@@ -66,35 +42,11 @@ export declare const addPanelFields: ({
66
42
  label: string;
67
43
  name: string;
68
44
  type: string;
69
- options: ({
70
- label: string;
71
- value: string;
72
- icon: string;
73
- children?: undefined;
74
- disabled?: undefined;
75
- } | {
76
- label: string;
77
- icon: string;
78
- value: string;
79
- children: ({
80
- label: string;
81
- value: string;
82
- icon: string;
83
- disabled?: undefined;
84
- } | {
85
- label: string;
86
- value: string;
87
- icon: string;
88
- disabled: boolean;
89
- })[];
90
- disabled?: undefined;
91
- } | {
45
+ options: {
92
46
  label: string;
93
47
  value: string;
94
48
  icon: string;
95
- disabled: boolean;
96
- children?: undefined;
97
- })[];
49
+ }[];
98
50
  rules: {
99
51
  required: boolean;
100
52
  message: string;
@@ -128,35 +80,11 @@ export declare const editPanelFields: ({
128
80
  label: string;
129
81
  name: string;
130
82
  type: string;
131
- options: ({
132
- label: string;
133
- value: string;
134
- icon: string;
135
- children?: undefined;
136
- disabled?: undefined;
137
- } | {
138
- label: string;
139
- icon: string;
140
- value: string;
141
- children: ({
142
- label: string;
143
- value: string;
144
- icon: string;
145
- disabled?: undefined;
146
- } | {
147
- label: string;
148
- value: string;
149
- icon: string;
150
- disabled: boolean;
151
- })[];
152
- disabled?: undefined;
153
- } | {
83
+ options: {
154
84
  label: string;
155
85
  value: string;
156
86
  icon: string;
157
- disabled: boolean;
158
- children?: undefined;
159
- })[];
87
+ }[];
160
88
  rules: {
161
89
  required: boolean;
162
90
  message: string;
@@ -2,59 +2,19 @@ export var platformOption = [{
2
2
  key: 0,
3
3
  value: '全部'
4
4
  }, {
5
- key: 1,
6
- value: 'Android'
5
+ key: 3,
6
+ value: 'JS'
7
7
  }, {
8
8
  key: 2,
9
9
  value: 'IOS'
10
10
  }, {
11
- key: 3,
12
- value: 'JS'
11
+ key: 1,
12
+ value: 'Android'
13
13
  }];
14
14
  export var chartTypes = [{
15
- label: '趋势图',
16
- value: 'line',
17
- icon: 'qushitu1'
18
- }, {
19
- label: '汇总图',
20
- value: 'bar',
21
- icon: 'huizongtu'
22
- }, {
23
- label: '占比图',
24
- value: 'pie',
25
- icon: 'bingtu'
26
- }, {
27
- label: '表格',
28
- icon: 'biaoge',
29
- value: 'grid',
30
- children: [{
31
- label: '',
32
- value: 'line',
33
- icon: 'qushitu1'
34
- }, {
35
- label: '',
36
- value: 'bar',
37
- icon: 'huizongtu'
38
- }, {
39
- label: '',
40
- value: 'pie',
41
- icon: 'bingtu'
42
- }, {
43
- label: '',
44
- value: 'map',
45
- icon: 'ditu',
46
- disabled: true
47
- }]
48
- }, {
49
- label: '地图',
50
- value: 'map',
51
- icon: 'ditu',
52
- disabled: true
53
- }, {
54
- label: '数值',
55
- value: 'number',
56
- icon: 'fenshu',
57
- disabled: true
15
+ label: '盒须图',
16
+ value: 'boxplot',
17
+ icon: 'hexutu'
58
18
  }];
59
19
 
60
20
  // 添加看板弹窗内容
@@ -1,4 +1,4 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import EventChart from './modules/chart';
2
+ import IntervalEventChart from './modules/chart';
3
3
  import ModuleInterval from './modules/home';
4
- export { ModuleInterval, EventChart };
4
+ export { ModuleInterval, IntervalEventChart };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import EventChart from "./modules/chart";
2
+ import IntervalEventChart from "./modules/chart";
3
3
  import ModuleInterval from "./modules/home";
4
- export { ModuleInterval, EventChart };
4
+ export { ModuleInterval, IntervalEventChart };
@@ -15,12 +15,18 @@ var CustomTooltip = function CustomTooltip(_ref) {
15
15
  var marker = payload === null || payload === void 0 ? void 0 : payload.marker;
16
16
  var value = payload === null || payload === void 0 ? void 0 : payload.value;
17
17
  return /*#__PURE__*/React.createElement("div", {
18
- className: "custom-tooltip"
19
- }, /*#__PURE__*/React.createElement("div", null, payload.name), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
18
+ className: "custom-tooltip-chart"
19
+ }, /*#__PURE__*/React.createElement("div", {
20
+ className: "custom-tooltip-name"
21
+ }, payload.name, " "), /*#__PURE__*/React.createElement("div", {
22
+ className: "custom-tooltip-div"
23
+ }, (series === null || series === void 0 ? void 0 : series.names[0]) && /*#__PURE__*/React.createElement("div", {
24
+ className: "tooltip-marker"
25
+ }, /*#__PURE__*/React.createElement("div", {
20
26
  dangerouslySetInnerHTML: {
21
27
  __html: marker
22
28
  }
23
- }), (series === null || series === void 0 ? void 0 : series.names[0]) && /*#__PURE__*/React.createElement("div", {
29
+ }), /*#__PURE__*/React.createElement("div", {
24
30
  className: "tooltip-span"
25
31
  }, series.names[0])), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
26
32
  className: "tooltip-span"
@@ -1,79 +1,42 @@
1
- export declare const result: {
2
- xAxis: string[];
3
- series: ({
4
- duration: never[];
5
- index: string;
6
- names: string[];
7
- values: number[];
8
- } | {
9
- duration: {
10
- name: string;
11
- values: number[];
12
- }[];
13
- index: null;
14
- names: string[];
15
- values: number[];
16
- })[];
17
- };
18
- export declare const totalResult: {
19
- xAxis: string[];
20
- series: ({
21
- duration: never[];
22
- index: string;
23
- names: string[];
24
- original_names: never[];
25
- p_total: never[];
26
- total: never[];
27
- values: number[];
28
- } | {
29
- duration: never[];
30
- index: null;
31
- names: string[];
32
- original_names: never[];
33
- p_total: never[];
34
- total: never[];
35
- values: number[];
36
- })[];
37
- };
38
1
  export declare const searchData: {
39
- targets: {
40
- type: string;
41
- alias: string;
42
- eventId: number;
43
- eventName: string;
44
- eventGroupId: number;
45
- analysisDimension: {
46
- analysisIndex: string;
47
- };
48
- }[];
49
- userGroup: number[];
2
+ appId: number;
50
3
  time: {
51
- unit: string;
52
- relative: number[];
53
- begin: string;
54
- end: string;
4
+ dimensionDate: string;
5
+ beginDate: string;
6
+ endDate: string;
55
7
  };
56
- chartType: string;
57
- };
58
- export declare const totalSearchData: {
59
- appId: number;
60
8
  platform: number;
61
- targets: {
62
- type: string;
63
- alias: string;
9
+ userGroup: number[];
10
+ start: {
11
+ operator: string;
64
12
  eventId: number;
65
13
  eventName: string;
66
- eventGroupId: number;
67
- analysisDimension: {
68
- analysisIndex: string;
69
- };
70
- }[];
71
- userGroup: number[];
72
- time: {
73
- unit: string;
74
- relative: number[];
75
- begin: string;
76
- end: string;
77
14
  };
78
- chartType: string;
15
+ end: {
16
+ operator: string;
17
+ eventId: number;
18
+ eventName: string;
19
+ };
20
+ dimension: null;
21
+ };
22
+ export declare const searchDataParams: {
23
+ appData: {
24
+ huanbi: never[];
25
+ series: {
26
+ diyTarget: boolean;
27
+ duration: never[];
28
+ index: null;
29
+ names: never[];
30
+ originalNames: never[];
31
+ pNext: never[];
32
+ pTotal: never[];
33
+ resultFormat: null;
34
+ total: never[];
35
+ values: number[][];
36
+ }[];
37
+ tongbi: never[];
38
+ total: never[];
39
+ xAxis: string[];
40
+ yesterDay: never[];
41
+ };
79
42
  };