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
863ce357
Commit
863ce357
authored
Feb 01, 2023
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(EC_HistoryView): 优化历史曲线多图表标题
parent
af793980
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
GridChart.js
packages/extend-components/EC_HistoryView/src/GridChart.js
+6
-5
No files found.
packages/extend-components/EC_HistoryView/src/GridChart.js
View file @
863ce357
...
...
@@ -4,12 +4,12 @@ import { BasicChart } from '@wisdom-components/basicchart';
import
PandaEmpty
from
'@wisdom-components/empty'
;
import
optionGenerator
from
'./utils'
;
const
ChartTitle
=
({
prefixCls
})
=>
{
const
ChartTitle
=
({
prefixCls
,
title
,
unit
})
=>
{
const
cls
=
`
${
prefixCls
}
-grid-item-title`
;
return
(
<
div
className
=
{
cls
}
>
<
span
className
=
{
`
${
cls
}
_text`
}
>
进水压力
<
/span
>
<
span
className
=
{
`
${
cls
}
_unit`
}
>
(单位:
MPa
)
<
/span
>
<
span
className
=
{
`
${
cls
}
_text`
}
>
{
title
}
<
/span
>
{
unit
&&
<
span
className
=
{
`
${
cls
}
_unit`
}
>
(单位:
{
unit
}
)
<
/span>
}
<
/div
>
);
};
...
...
@@ -80,14 +80,15 @@ const GridChart = memo((props) => {
return
(
<
div
className
=
{
`
${
prefixCls
}
-grid`
}
>
{
options
.
map
((
item
)
=>
{
{
options
.
map
((
item
,
index
)
=>
{
const
{
sensorName
,
unit
}
=
gridData
[
index
];
const
isEmpty
=
!
item
.
option
.
series
.
length
||
!
item
.
option
.
series
.
find
((
e
)
=>
e
.
data
&&
e
.
data
.
length
>
0
);
return
(
<
div
key
=
{
item
.
key
}
className
=
{
`
${
prefixCls
}
-grid-item`
}
>
<
div
className
=
{
`
${
prefixCls
}
-grid-item-wrap`
}
>
<
ChartTitle
prefixCls
=
{
prefixCls
}
/
>
<
ChartTitle
prefixCls
=
{
prefixCls
}
title
=
{
sensorName
}
unit
=
{
unit
}
/
>
{
isEmpty
?
(
<
PandaEmpty
/>
)
:
(
...
...
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