@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.
- package/README.md +35 -35
- package/dist/esm/components/common/styles/index.less +40 -40
- package/dist/esm/components/eventFilter/index.js +6 -5
- package/dist/esm/components/eventFilter/styles/index.less +39 -39
- package/dist/esm/components/renderContent/styles/index.css +32 -0
- package/dist/esm/components/renderContent/styles/index.less +1 -0
- package/dist/esm/components/searchPanel/index.js +6 -1
- package/dist/esm/components/searchPanel/styles/index.less +71 -71
- package/dist/esm/components/table/index.js +3 -2
- package/dist/esm/components/table/styles/index.less +138 -138
- package/dist/esm/components/topBar/styles/index.less +16 -16
- package/dist/esm/constants/apis.js +4 -4
- package/dist/esm/constants/code.d.ts +13 -0
- package/dist/esm/constants/code.js +13 -0
- package/dist/esm/constants/fields.js +4 -4
- package/dist/esm/modules/chart/customTooltip.js +5 -3
- package/dist/esm/modules/chart/customTooltip1.d.ts +7 -0
- package/dist/esm/modules/chart/customTooltip1.js +46 -0
- package/dist/esm/modules/chart/index.css +52 -0
- package/dist/esm/modules/chart/index.js +19 -8
- package/dist/esm/modules/chart/index.less +1 -1
- package/dist/esm/modules/chart/intervalChart copy.d.ts +4 -0
- package/dist/esm/modules/chart/intervalChart copy.js +299 -0
- package/dist/esm/modules/chart/intervalChart.js +321 -35
- package/dist/esm/modules/chart/types.d.ts +5 -0
- package/dist/esm/modules/content/index.js +50 -20
- package/dist/esm/modules/content/styles/index.less +25 -25
- package/dist/esm/modules/content/utils.js +1 -1
- package/dist/esm/modules/home/demo/create.js +5 -3
- package/dist/esm/modules/home/demo/edit.js +132 -34
- package/dist/esm/modules/home/demo/index.js +1 -1
- package/dist/esm/modules/home/demo/scene.js +1 -1
- package/dist/esm/modules/home/demo/styles/index.less +33 -33
- package/dist/esm/modules/home/index.js +8 -1
- package/dist/esm/modules/home/styles/index.less +69 -69
- package/dist/esm/modules/topPanel/index.js +39 -29
- package/dist/esm/modules/topPanel/styles/index.less +6 -6
- package/dist/esm/modules/topPanel/types.d.ts +1 -0
- package/dist/esm/style/image/empty.png +0 -0
- package/dist/esm/style/image/ring.svg +9 -9
- package/dist/esm/style/index.less +67 -67
- package/dist/esm/types.js +6 -6
- package/dist/esm/utils/ajaxConfig.js +5 -5
- package/dist/esm/utils/formData.d.ts +4 -0
- package/dist/esm/utils/formData.js +36 -30
- package/dist/esm/utils/util.js +28 -28
- package/package.json +6 -6
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
.mi-interval-table {
|
|
2
|
-
width: 100%;
|
|
3
|
-
margin-top: 16px;
|
|
4
|
-
|
|
5
|
-
.ant-table {
|
|
6
|
-
border-radius: 8px;
|
|
7
|
-
}
|
|
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
|
-
}
|
|
19
|
-
.ant-table-cell {
|
|
20
|
-
height: 50px;
|
|
21
|
-
padding: 0 16px !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ant-pagination {
|
|
25
|
-
margin-top: 24px !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ant-table-tbody > tr > td {
|
|
29
|
-
border-bottom: 0.1px solid #e6e7ea;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.ant-table .ant-table-container .ant-table-thead > tr > th {
|
|
33
|
-
background-color: #f2f3f4 !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&-table-header {
|
|
37
|
-
display: flex;
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
height: 50px;
|
|
40
|
-
padding: 0 16px;
|
|
41
|
-
line-height: 50px;
|
|
42
|
-
background: #fafafb;
|
|
43
|
-
border: 1px solid var(--gray-6, #ecedf0);
|
|
44
|
-
border-bottom: none;
|
|
45
|
-
border-radius: 8px 8px 0 0;
|
|
46
|
-
|
|
47
|
-
> :nth-child(2) {
|
|
48
|
-
display: flex;
|
|
49
|
-
margin-top: 9px;
|
|
50
|
-
div {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
height: 32px;
|
|
54
|
-
padding: 0 16px;
|
|
55
|
-
line-height: 32px;
|
|
56
|
-
background: #fff;
|
|
57
|
-
border: 1px solid #f2f3f4;
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
.xiazai1 {
|
|
61
|
-
margin-right: 4px;
|
|
62
|
-
font-size: 16px !important;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
div:hover {
|
|
66
|
-
color: #165dff;
|
|
67
|
-
border: 1px solid #165dff;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.ant-table {
|
|
73
|
-
border-radius: 0 0 8px 8px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ant-table-cell-with-append {
|
|
77
|
-
padding-left: 20px;
|
|
78
|
-
|
|
79
|
-
.ant-table-row-expand-icon {
|
|
80
|
-
position: absolute;
|
|
81
|
-
left: 0;
|
|
82
|
-
margin-top: 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.event-table-sql-modal {
|
|
88
|
-
.ant-modal-header {
|
|
89
|
-
position: relative;
|
|
90
|
-
z-index: 1;
|
|
91
|
-
height: 82px;
|
|
92
|
-
background: transparent;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ant-modal-body {
|
|
96
|
-
padding: 0 24px 18px 24px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ant-modal-close-x {
|
|
100
|
-
margin-top: 13px;
|
|
101
|
-
margin-right: 8px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
img {
|
|
105
|
-
width: 100%;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.qingchu {
|
|
109
|
-
font-weight: 500;
|
|
110
|
-
font-size: 22px !important;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.modal-bg {
|
|
114
|
-
position: absolute;
|
|
115
|
-
top: 0;
|
|
116
|
-
left: 0;
|
|
117
|
-
width: 100%;
|
|
118
|
-
height: auto;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.hljs {
|
|
122
|
-
padding: 16px;
|
|
123
|
-
background: #fafafb;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.copy-box {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 98px;
|
|
129
|
-
right: 40px;
|
|
130
|
-
padding: 0 8px;
|
|
131
|
-
background: #f2f3f4;
|
|
132
|
-
border-radius: 4px;
|
|
133
|
-
|
|
134
|
-
.fuzhi1 {
|
|
135
|
-
margin-right: 8px;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
1
|
+
.mi-interval-table {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin-top: 16px;
|
|
4
|
+
|
|
5
|
+
.ant-table {
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
}
|
|
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
|
+
}
|
|
19
|
+
.ant-table-cell {
|
|
20
|
+
height: 50px;
|
|
21
|
+
padding: 0 16px !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ant-pagination {
|
|
25
|
+
margin-top: 24px !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-table-tbody > tr > td {
|
|
29
|
+
border-bottom: 0.1px solid #e6e7ea;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ant-table .ant-table-container .ant-table-thead > tr > th {
|
|
33
|
+
background-color: #f2f3f4 !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-table-header {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
height: 50px;
|
|
40
|
+
padding: 0 16px;
|
|
41
|
+
line-height: 50px;
|
|
42
|
+
background: #fafafb;
|
|
43
|
+
border: 1px solid var(--gray-6, #ecedf0);
|
|
44
|
+
border-bottom: none;
|
|
45
|
+
border-radius: 8px 8px 0 0;
|
|
46
|
+
|
|
47
|
+
> :nth-child(2) {
|
|
48
|
+
display: flex;
|
|
49
|
+
margin-top: 9px;
|
|
50
|
+
div {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
height: 32px;
|
|
54
|
+
padding: 0 16px;
|
|
55
|
+
line-height: 32px;
|
|
56
|
+
background: #fff;
|
|
57
|
+
border: 1px solid #f2f3f4;
|
|
58
|
+
border-radius: 4px;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
.xiazai1 {
|
|
61
|
+
margin-right: 4px;
|
|
62
|
+
font-size: 16px !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
div:hover {
|
|
66
|
+
color: #165dff;
|
|
67
|
+
border: 1px solid #165dff;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ant-table {
|
|
73
|
+
border-radius: 0 0 8px 8px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ant-table-cell-with-append {
|
|
77
|
+
padding-left: 20px;
|
|
78
|
+
|
|
79
|
+
.ant-table-row-expand-icon {
|
|
80
|
+
position: absolute;
|
|
81
|
+
left: 0;
|
|
82
|
+
margin-top: 0;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.event-table-sql-modal {
|
|
88
|
+
.ant-modal-header {
|
|
89
|
+
position: relative;
|
|
90
|
+
z-index: 1;
|
|
91
|
+
height: 82px;
|
|
92
|
+
background: transparent;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ant-modal-body {
|
|
96
|
+
padding: 0 24px 18px 24px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ant-modal-close-x {
|
|
100
|
+
margin-top: 13px;
|
|
101
|
+
margin-right: 8px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
img {
|
|
105
|
+
width: 100%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.qingchu {
|
|
109
|
+
font-weight: 500;
|
|
110
|
+
font-size: 22px !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.modal-bg {
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 0;
|
|
116
|
+
left: 0;
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: auto;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.hljs {
|
|
122
|
+
padding: 16px;
|
|
123
|
+
background: #fafafb;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.copy-box {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 98px;
|
|
129
|
+
right: 40px;
|
|
130
|
+
padding: 0 8px;
|
|
131
|
+
background: #f2f3f4;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
|
|
134
|
+
.fuzhi1 {
|
|
135
|
+
margin-right: 8px;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
-
|
|
3
|
-
.modules-interval-topbar {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: flex-end;
|
|
6
|
-
margin: 8px 0;
|
|
7
|
-
&-panel {
|
|
8
|
-
margin-right: 16px;
|
|
9
|
-
}
|
|
10
|
-
&-scene {
|
|
11
|
-
margin-right: 16px;
|
|
12
|
-
}
|
|
13
|
-
&-earlywarning {
|
|
14
|
-
margin-right: 16px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.modules-interval-topbar {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: flex-end;
|
|
6
|
+
margin: 8px 0;
|
|
7
|
+
&-panel {
|
|
8
|
+
margin-right: 16px;
|
|
9
|
+
}
|
|
10
|
+
&-scene {
|
|
11
|
+
margin-right: 16px;
|
|
12
|
+
}
|
|
13
|
+
&-earlywarning {
|
|
14
|
+
margin-right: 16px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -2,12 +2,12 @@ var Apis = {
|
|
|
2
2
|
dataList: '/interval/intervalData',
|
|
3
3
|
getEventDataSql: '/dataSql/getEventDataSql',
|
|
4
4
|
eventDownloadReport: '/interval/downLoadintervalData',
|
|
5
|
-
/**
|
|
6
|
-
* 用户下钻
|
|
5
|
+
/**
|
|
6
|
+
* 用户下钻
|
|
7
7
|
*/
|
|
8
8
|
userDrill: '/interval/userDrill',
|
|
9
|
-
/**
|
|
10
|
-
* 主体下钻
|
|
9
|
+
/**
|
|
10
|
+
* 主体下钻
|
|
11
11
|
*/
|
|
12
12
|
subjectDrill: '/interval/eventDrill',
|
|
13
13
|
querySubjectDisplay: '/analysisSubject/querySubDisplay'
|
|
@@ -126,8 +126,8 @@ export var addSceneFields = [{
|
|
|
126
126
|
}]
|
|
127
127
|
}];
|
|
128
128
|
|
|
129
|
-
/**
|
|
130
|
-
* 维度对象
|
|
129
|
+
/**
|
|
130
|
+
* 维度对象
|
|
131
131
|
*/
|
|
132
132
|
export var indexObject = {
|
|
133
133
|
number: '人数',
|
|
@@ -139,8 +139,8 @@ export var indexObject = {
|
|
|
139
139
|
median: '中位数'
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
/**
|
|
143
|
-
* 内置指标
|
|
142
|
+
/**
|
|
143
|
+
* 内置指标
|
|
144
144
|
*/
|
|
145
145
|
export var BuiltinIndicators = {
|
|
146
146
|
id: -2,
|
|
@@ -3,6 +3,8 @@ import "./index.less";
|
|
|
3
3
|
var CustomTooltip = function CustomTooltip(_ref) {
|
|
4
4
|
var payload = _ref.payload,
|
|
5
5
|
series = _ref.series;
|
|
6
|
+
console.log(payload, series, 'payload, series');
|
|
7
|
+
|
|
6
8
|
// 初始化,判断showList是否有值,如果没值,取结果的前10条
|
|
7
9
|
useEffect(function () {}, []);
|
|
8
10
|
function convertToHMS(seconds) {
|
|
@@ -13,14 +15,14 @@ var CustomTooltip = function CustomTooltip(_ref) {
|
|
|
13
15
|
}
|
|
14
16
|
// 根据payload中的数据定义弹窗内容
|
|
15
17
|
var marker = payload === null || payload === void 0 ? void 0 : payload.marker;
|
|
16
|
-
var value = payload === null || payload === void 0 ? void 0 : payload.
|
|
18
|
+
var value = payload === null || payload === void 0 ? void 0 : payload.data;
|
|
17
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
20
|
className: "custom-tooltip-chart"
|
|
19
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20
22
|
className: "custom-tooltip-name"
|
|
21
23
|
}, payload.name, " "), /*#__PURE__*/React.createElement("div", {
|
|
22
24
|
className: "custom-tooltip-div"
|
|
23
|
-
},
|
|
25
|
+
}, payload.seriesName && /*#__PURE__*/React.createElement("div", {
|
|
24
26
|
className: "tooltip-marker"
|
|
25
27
|
}, /*#__PURE__*/React.createElement("div", {
|
|
26
28
|
dangerouslySetInnerHTML: {
|
|
@@ -28,7 +30,7 @@ var CustomTooltip = function CustomTooltip(_ref) {
|
|
|
28
30
|
}
|
|
29
31
|
}), /*#__PURE__*/React.createElement("div", {
|
|
30
32
|
className: "tooltip-span"
|
|
31
|
-
},
|
|
33
|
+
}, payload.seriesName)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
32
34
|
className: "tooltip-span"
|
|
33
35
|
}, "\u6700\u5927\u503C\uFF1A"), /*#__PURE__*/React.createElement("div", null, convertToHMS(value[5]))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
34
36
|
className: "tooltip-span"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./index.less";
|
|
3
|
+
var CustomTooltip = function CustomTooltip(_ref) {
|
|
4
|
+
var payload = _ref.payload,
|
|
5
|
+
series = _ref.series;
|
|
6
|
+
// 初始化,判断showList是否有值,如果没值,取结果的前10条
|
|
7
|
+
function convertToHMS(seconds) {
|
|
8
|
+
var hours = Math.floor(seconds / 3600);
|
|
9
|
+
var minutes = Math.floor(seconds % 3600 / 60);
|
|
10
|
+
var remainingSeconds = seconds % 60;
|
|
11
|
+
return ('00' + hours).slice(-2) + ':' + ('00' + minutes).slice(-2) + ':' + ('00' + remainingSeconds).slice(-2);
|
|
12
|
+
}
|
|
13
|
+
// 根据payload中的数据定义弹窗内容
|
|
14
|
+
// const marker = payload?.marker;
|
|
15
|
+
|
|
16
|
+
// const value = payload?.value;
|
|
17
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, payload.map(function (o, index) {
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "custom-tooltip-chart",
|
|
20
|
+
key: index
|
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "custom-tooltip-name"
|
|
23
|
+
}, o.name, " "), /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "custom-tooltip-div"
|
|
25
|
+
}, o.seriesName && /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "tooltip-marker"
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
dangerouslySetInnerHTML: {
|
|
29
|
+
__html: o === null || o === void 0 ? void 0 : o.marker
|
|
30
|
+
}
|
|
31
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "tooltip-span"
|
|
33
|
+
}, o.seriesName)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
className: "tooltip-span"
|
|
35
|
+
}, "\u6700\u5927\u503C\uFF1A"), /*#__PURE__*/React.createElement("div", null, convertToHMS(o.value[5]))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
className: "tooltip-span"
|
|
37
|
+
}, "\u4E0A\u56DB\u5206\u4F4D\uFF1A"), convertToHMS(o.value[2])), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
className: "tooltip-span"
|
|
39
|
+
}, "\u4E2D\u4F4D\u6570\uFF1A"), convertToHMS(o.value[3])), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
className: "tooltip-span"
|
|
41
|
+
}, "\u4E0B\u56DB\u5206\u4F4D\uFF1A"), convertToHMS(o.value[4])), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
42
|
+
className: "tooltip-span"
|
|
43
|
+
}, "\u6700\u5C0F\u503C\uFF1A"), convertToHMS(o.value[1]))));
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
export default CustomTooltip;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.custom-tooltip-chart {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
flex-shrink: 0;
|
|
5
|
+
gap: 4px;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
width: 146px;
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: 8px;
|
|
10
|
+
color: var(--io-n, #021429);
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
border-radius: 10px;
|
|
15
|
+
box-shadow: 0px 4px 10px 0px #0000001a;
|
|
16
|
+
}
|
|
17
|
+
.custom-tooltip-chart .custom-tooltip-name {
|
|
18
|
+
color: var(--io-n, #021429);
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
font-family: PingFang SC;
|
|
22
|
+
font-style: normal;
|
|
23
|
+
line-height: normal;
|
|
24
|
+
}
|
|
25
|
+
.custom-tooltip-chart .custom-tooltip-div {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 6px;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
padding: 0px 8px;
|
|
32
|
+
background: #fff;
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
|
|
35
|
+
}
|
|
36
|
+
.custom-tooltip-chart .custom-tooltip-div .tooltip-span {
|
|
37
|
+
display: block;
|
|
38
|
+
color: var(--3, #5f6085);
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
font-family: PingFang SC;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
line-height: normal;
|
|
44
|
+
}
|
|
45
|
+
.custom-tooltip-chart .custom-tooltip-div > div {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
}
|
|
50
|
+
.custom-tooltip-chart .custom-tooltip-div .tooltip-marker {
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
@@ -11,15 +11,18 @@ 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 React, { useContext, useEffect, useState } from 'react';
|
|
14
|
-
import { BizEmpty, BizGlobalDataContext,
|
|
14
|
+
import { BizEmpty, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
|
|
15
15
|
import { EventTable, MiNone } from "../../components";
|
|
16
16
|
import { extractNames, getDefaultShow } from "../../utils/formData";
|
|
17
17
|
import { Apis } from "../../constants";
|
|
18
18
|
import IntervalChart from "./intervalChart";
|
|
19
19
|
import { searchDataParams } from "../content/utils";
|
|
20
|
+
import { ERROR_RESPONESE_CODE } from "../../constants/code";
|
|
21
|
+
import { Spin } from 'antd';
|
|
20
22
|
var IntervalEventChart = function IntervalEventChart(props) {
|
|
21
23
|
var _dataSource$appData2;
|
|
22
|
-
var params = props.params
|
|
24
|
+
var params = props.params,
|
|
25
|
+
onChangeException = props.onChangeException;
|
|
23
26
|
// 显示内容
|
|
24
27
|
var _useState = useState(),
|
|
25
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -49,6 +52,7 @@ var IntervalEventChart = function IntervalEventChart(props) {
|
|
|
49
52
|
// 初始化,判断showList是否有值,如果没值,取结果的前10条
|
|
50
53
|
useEffect(function () {
|
|
51
54
|
var _dataSource$appData, _dataSource$appData$s;
|
|
55
|
+
var dataSource = props.dataSource;
|
|
52
56
|
if ((dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData = dataSource.appData) === null || _dataSource$appData === void 0 ? void 0 : (_dataSource$appData$s = _dataSource$appData.series) === null || _dataSource$appData$s === void 0 ? void 0 : _dataSource$appData$s.length) > 0) {
|
|
53
57
|
var _extractNames;
|
|
54
58
|
var arr = params !== null && params !== void 0 && params.displaySetup ? params === null || params === void 0 ? void 0 : params.displaySetup : (_extractNames = extractNames(dataSource)) === null || _extractNames === void 0 ? void 0 : _extractNames.splice(0, 4);
|
|
@@ -56,7 +60,8 @@ var IntervalEventChart = function IntervalEventChart(props) {
|
|
|
56
60
|
setShowList(app);
|
|
57
61
|
setDataSourceList(arr);
|
|
58
62
|
}
|
|
59
|
-
|
|
63
|
+
setDataSource(dataSource);
|
|
64
|
+
}, [params === null || params === void 0 ? void 0 : params.displaySetup, props.dataSource]);
|
|
60
65
|
var fetchResult = function fetchResult() {
|
|
61
66
|
var _obj$start, _obj$end, _params$start, _params$end;
|
|
62
67
|
var obj = searchDataParams(params);
|
|
@@ -66,12 +71,17 @@ var IntervalEventChart = function IntervalEventChart(props) {
|
|
|
66
71
|
method: 'post',
|
|
67
72
|
data: _objectSpread(_objectSpread({
|
|
68
73
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
69
|
-
}, params), obj)
|
|
74
|
+
}, params), obj),
|
|
75
|
+
intercept: false
|
|
70
76
|
}).then(function (res) {
|
|
77
|
+
setLoading(false);
|
|
71
78
|
if (!res) {
|
|
72
79
|
return;
|
|
73
80
|
}
|
|
74
|
-
|
|
81
|
+
if (res.code == ERROR_RESPONESE_CODE.EXCEPTION) {
|
|
82
|
+
onChangeException === null || onChangeException === void 0 ? void 0 : onChangeException();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
75
85
|
setDataSource(res.data);
|
|
76
86
|
}).catch(function () {
|
|
77
87
|
setLoading(false);
|
|
@@ -84,9 +94,10 @@ var IntervalEventChart = function IntervalEventChart(props) {
|
|
|
84
94
|
if (props.onChangeShow) props.onChangeShow(names);
|
|
85
95
|
};
|
|
86
96
|
if (loading) {
|
|
87
|
-
return /*#__PURE__*/React.createElement(
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
98
|
+
tip: "",
|
|
99
|
+
size: "default"
|
|
100
|
+
}, "\u6570\u636E\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u7B49~");
|
|
90
101
|
}
|
|
91
102
|
if (dataSource !== null && dataSource !== void 0 && dataSource.appData.delEvent) {
|
|
92
103
|
return /*#__PURE__*/React.createElement("div", {
|