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
8ec638b1
Commit
8ec638b1
authored
Jul 20, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化文字样式
parent
b6b788fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
53 deletions
+54
-53
mobile.js
...ages/extend-components/EC_HistoryView/src/demos/mobile.js
+1
-1
index.less
packages/extend-components/EC_HistoryView/src/index.less
+1
-1
mobile.js
packages/extend-components/EC_HistoryView/src/mobile.js
+52
-51
No files found.
packages/extend-components/EC_HistoryView/src/demos/mobile.js
View file @
8ec638b1
...
...
@@ -28,7 +28,7 @@ const Demo = () => {
},[])
return
(
<
div
>
<
div
style
=
{{
height
:
4
00
}}
>
<
div
style
=
{{
height
:
6
00
}}
>
<
MobileHistoryChart
deviceParams
=
{
deviceParams
}
date
=
{
date
}
/
>
<
/div
>
<
/div
>
...
...
packages/extend-components/EC_HistoryView/src/index.less
View file @
8ec638b1
...
...
@@ -203,5 +203,5 @@
.@{history-view}-item {
display: flex;
align-items: center;
margin-bottom:
10px
;
margin-bottom:
0.3rem
;
}
packages/extend-components/EC_HistoryView/src/mobile.js
View file @
8ec638b1
...
...
@@ -27,6 +27,11 @@ const MobileHistoryChart = (
curveCenter
:
true
,
ignoreOutliers
:
true
});
const
checkboxStyle
=
{
'--icon-size'
:
handlePx
(
18
,
'px'
),
'--font-size'
:
handlePx
(
14
,
'px'
),
'--gap'
:
handlePx
(
6
,
'px'
),
}
const
checkBoxOptions
=
useMemo
(()
=>
{
return
Object
.
keys
(
options
).
reduce
((
final
,
cur
)
=>
{
if
(
options
[
cur
])
final
.
push
(
cur
);
...
...
@@ -128,59 +133,55 @@ const MobileHistoryChart = (
useEffect
(()
=>
{
getDataSource
();
},
[
options
.
ignoreOutliers
,
date
])
return
deviceAlarmSchemes
&&
chartDataSource
?
<
div
style
=
{{
width
:
'100%'
}}
>
{
chartDataSource
.
length
===
1
?
<
div
className
=
{
styles
[
`
${
prefixCls
}
-item`
]}
>
<
span
style
=
{{
fontSize
:
handlePx
(
14
)}}
>
曲线形态:
<
/span
>
<
Selector
style
=
{{
display
:
'inline-block'
,
fontSize
:
handlePx
(
14
)}}
options
=
{[
{
label
:
'线形图'
,
value
:
'lineChart'
},
{
label
:
'箱线图'
,
value
:
'boxChart'
}
]}
defaultValue
=
{
lineType
}
onChange
=
{(
arr
,
extend
)
=>
{
setLineType
(
arr
)
return
deviceAlarmSchemes
&&
chartDataSource
?
<
div
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
flexDirection
:
'column'
}}
>
{
chartDataSource
.
length
===
1
?
<
div
className
=
{
styles
[
`
${
prefixCls
}
-item`
]}
>
<
span
style
=
{{
fontSize
:
handlePx
(
14
)}}
>
曲线形态:
<
/span
>
<
Selector
style
=
{{
display
:
'inline-block'
,
fontSize
:
handlePx
(
14
)}}
options
=
{[
{
label
:
'线形图'
,
value
:
'lineChart'
},
{
label
:
'箱线图'
,
value
:
'boxChart'
}
]}
defaultValue
=
{
lineType
}
onChange
=
{(
arr
,
extend
)
=>
{
setLineType
(
arr
)
}}
/
>
<
/div> : '
'
}
<
div
className
=
{
styles
[
`
${
prefixCls
}
-item`
]}
>
<
span
style
=
{{
fontSize
:
handlePx
(
14
)}}
>
曲线设置:
<
/span
>
<
Checkbox
.
Group
value
=
{
checkBoxOptions
}
onChange
=
{
val
=>
{
let
_arr
=
Object
.
keys
(
options
);
let
_options
=
_arr
.
reduce
((
final
,
cur
)
=>
{
final
[
cur
]
=
!!
val
.
includes
(
cur
);
return
final
;
},
{})
setOptions
(
_options
);
}}
>
<
Space
direction
=
'horizontal'
>
<
Checkbox
style
=
{
checkboxStyle
}
value
=
'curveCenter'
>
曲线居中
<
/Checkbox
>
<
Checkbox
style
=
{
checkboxStyle
}
value
=
'ignoreOutliers'
>
滤波
<
/Checkbox
>
<
/Space
>
<
/Checkbox.Group
>
<
/div
>
<
div
style
=
{{
width
:
'100%'
,
flex
:
1
}}
>
<
SimgleChart
showBoxOption
=
{
showBoxOption
}
curveCenter
=
{
options
.
curveCenter
}
showGridLine
=
{
chartGrid
}
prefixCls
=
{
prefixCls
}
dataSource
=
{
chartDataSource
}
chartType
=
{
isBoxPlots
?
lineType
[
0
]
:
null
}
deviceAlarmSchemes
=
{
deviceAlarmSchemes
}
/
>
<
/div> : '
'
}
<
div
className
=
{
styles
[
`
${
prefixCls
}
-item`
]}
>
<
span
style
=
{{
fontSize
:
handlePx
(
14
)}}
>
曲线设置:
<
/span
>
<
Checkbox
.
Group
style
=
{{
'--icon-size'
:
handlePx
(
18
),
'--font-size'
:
handlePx
(
14
),
'--gap'
:
handlePx
(
6
),
}}
value
=
{
checkBoxOptions
}
onChange
=
{
val
=>
{
let
_arr
=
Object
.
keys
(
options
);
let
_options
=
_arr
.
reduce
((
final
,
cur
)
=>
{
final
[
cur
]
=
!!
val
.
includes
(
cur
);
return
final
;
},
{})
setOptions
(
_options
);
}}
>
<
Space
direction
=
'horizontal'
>
<
Checkbox
value
=
'curveCenter'
>
曲线居中
<
/Checkbox
>
<
Checkbox
value
=
'ignoreOutliers'
>
滤波
<
/Checkbox
>
<
/Space
>
<
/Checkbox.Group
>
<
/div
>
<
div
style
=
{{
height
:
rest
.
height
||
'10rem'
,
width
:
rest
.
width
||
'100%'
}}
>
<
SimgleChart
showBoxOption
=
{
showBoxOption
}
curveCenter
=
{
options
.
curveCenter
}
showGridLine
=
{
chartGrid
}
prefixCls
=
{
prefixCls
}
dataSource
=
{
chartDataSource
}
chartType
=
{
isBoxPlots
?
lineType
[
0
]
:
null
}
deviceAlarmSchemes
=
{
deviceAlarmSchemes
}
/
>
<
/div
>
<
/div> : nul
l
<
/div
>
<
/div> : nul
l
}
export
{
MobileHistoryChart
...
...
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