Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
00b32cee
Commit
00b32cee
authored
Jun 03, 2021
by
涂茜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bug
parent
954f1766
Pipeline
#29083
failed with stages
in 15 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
28 deletions
+50
-28
index.js
packages/extend-components/EC_HistoryInfo/src/index.js
+38
-27
index.less
packages/extend-components/EC_HistoryInfo/src/index.less
+11
-0
index.less
packages/extend-components/EC_QuotaSelect/src/index.less
+1
-1
No files found.
packages/extend-components/EC_HistoryInfo/src/index.js
View file @
00b32cee
...
...
@@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
import
classNames
from
'classnames'
;
import
Highcharts
from
'highcharts/highstock'
;
import
HighchartsReact
from
'highcharts-react-official'
;
import
{
Tabs
,
Select
,
Radio
,
Checkbox
,
ConfigProvider
,
DatePicker
}
from
'antd'
;
import
HighchartsBoost
from
'highcharts/modules/boost'
;
import
{
Tabs
,
Select
,
Radio
,
Checkbox
,
ConfigProvider
,
DatePicker
,
Spin
}
from
'antd'
;
import
{
PlusCircleOutlined
,
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
TimeRangePicker
from
'@wisdom-components/timerangepicker'
;
import
BasicTable
from
'@wisdom-components/basictable'
;
...
...
@@ -11,6 +12,8 @@ import Empty from '@wisdom-components/empty';
import
moment
from
'moment'
;
import
'./index.less'
;
HighchartsBoost
(
Highcharts
);
const
{
TabPane
}
=
Tabs
;
const
{
RangePicker
}
=
DatePicker
;
const
{
Option
}
=
Select
;
...
...
@@ -115,6 +118,9 @@ const DefaultOptions = (color, contrastOption) => ({
zoomType
:
'x'
,
backgroundColor
:
'rgba(255, 255, 255, 0.5)'
,
},
boost
:
{
useGPUTranslations
:
true
,
},
colors
:
color
,
title
:
null
,
credits
:
false
,
...
...
@@ -202,6 +208,7 @@ const HistoryInfo = (props) => {
defaultChecked
,
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
activeTabKey
,
setActiveTabKey
]
=
useState
(
'curve'
);
const
[
timeValue
,
setTimeValue
]
=
useState
(
'customer'
);
const
[
contrastOption
,
setContrastOption
]
=
useState
(
'day'
);
...
...
@@ -344,6 +351,7 @@ const HistoryInfo = (props) => {
};
requestArr
.
push
(
historyInfoService
(
param
));
});
setLoading
(
true
);
Promise
.
all
(
requestArr
).
then
((
values
)
=>
{
if
(
values
.
length
)
{
let
data
=
[];
...
...
@@ -352,6 +360,7 @@ const HistoryInfo = (props) => {
data
=
data
.
concat
(
res
.
data
);
}
});
setLoading
(
false
);
handleTableData
(
data
);
handleSeries
(
data
);
}
...
...
@@ -770,34 +779,36 @@ const HistoryInfo = (props) => {
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-content`
)}
>
{
renderOptions
(
item
)}
{
!
tableData
.
length
&&
<
Empty
/>
}
{
!!
tableData
.
length
&&
(
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-wrap`
)}
>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-main`
)}
>
{
item
.
key
===
'curve'
&&
(
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-chart`
)}
ref
=
{
container
}
>
<
HighchartsReact
immutable
=
{
true
}
highcharts
=
{
Highcharts
}
constructorType
=
{
'stockChart'
}
options
=
{
options
}
allowChartUpdate
=
{
true
}
<
Spin
spinning
=
{
loading
}
>
{
!!
tableData
.
length
&&
(
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-wrap`
)}
>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-main`
)}
>
{
item
.
key
===
'curve'
&&
(
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-chart`
)}
ref
=
{
container
}
>
<
HighchartsReact
immutable
=
{
true
}
highcharts
=
{
Highcharts
}
constructorType
=
{
'stockChart'
}
options
=
{
options
}
allowChartUpdate
=
{
true
}
/
>
<
/div
>
)}
{
item
.
key
===
'table'
&&
(
<
BasicTable
dataSource
=
{
tableData
}
columns
=
{
columns
}
{...
tableProps
}
pagination
=
{{
pageSize
,
showQuickJumper
:
true
,
showSizeChanger
:
true
}}
onChange
=
{(
value
)
=>
{
setPageSize
(
value
.
pageSize
);
}}
/
>
<
/div
>
)}
{
item
.
key
===
'table'
&&
(
<
BasicTable
dataSource
=
{
tableData
}
columns
=
{
columns
}
{...
tableProps
}
pagination
=
{{
pageSize
,
showQuickJumper
:
true
,
showSizeChanger
:
true
}}
onChange
=
{(
value
)
=>
{
setPageSize
(
value
.
pageSize
);
}}
/
>
)}
)}
<
/div
>
<
/div
>
<
/div
>
)}
)}
<
/Spin
>
<
/div
>
<
/TabPane
>
))}
...
...
packages/extend-components/EC_HistoryInfo/src/index.less
View file @
00b32cee
...
...
@@ -14,9 +14,20 @@
flex-direction: column;
height: 100%;
padding: 10px 0 0 0;
.ant-spin-nested-loading {
display: flex;
flex: 1;
}
.ant-spin-container {
display: flex;
flex: 1;
}
}
&-wrap {
display: flex;
flex: 1;
overflow: hidden;
}
...
...
packages/extend-components/EC_QuotaSelect/src/index.less
View file @
00b32cee
...
...
@@ -4,10 +4,10 @@
.@{ec-quota-select-prefix-cls} {
&-btn-wrap {
overflow: auto;
white-space: nowrap;
button {
margin-right: 20px;
margin-bottom: 10px;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment