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
6a5da773
Commit
6a5da773
authored
Jul 18, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化显示
parent
26fbdcef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+1
-1
mobile.js
packages/extend-components/EC_HistoryView/src/mobile.js
+9
-9
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+0
-0
No files found.
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
6a5da773
...
@@ -33,7 +33,7 @@ const Demo = () => {
...
@@ -33,7 +33,7 @@ const Demo = () => {
<
HistoryView
deviceParams
=
{
deviceParams
}
defaultModel
=
"curve"
/>
<
HistoryView
deviceParams
=
{
deviceParams
}
defaultModel
=
"curve"
/>
<
/div
>
<
/div
>
<
div
style
=
{{
height
:
300
}}
>
<
div
style
=
{{
height
:
300
}}
>
<
MobileHistoryChart
deviceParams
=
{
deviceParams
}
chartType
=
{
'
line
Chart'
}
/
>
<
MobileHistoryChart
deviceParams
=
{
deviceParams
}
chartType
=
{
'
box
Chart'
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
packages/extend-components/EC_HistoryView/src/mobile.js
View file @
6a5da773
...
@@ -40,14 +40,14 @@ const MobileHistoryChart = (
...
@@ -40,14 +40,14 @@ const MobileHistoryChart = (
date
=
{
date
=
{
dateFrom
:
moment
().
format
(
`
${
DATE_FORMAT
}
00:00:00`
),
dateFrom
:
moment
().
format
(
`
${
DATE_FORMAT
}
00:00:00`
),
dateTo
:
moment
().
format
(
`
${
DATE_FORMAT
}
23:59:59`
)
dateTo
:
moment
().
format
(
`
${
DATE_FORMAT
}
23:59:59`
)
},
},
// 默认当天
deviceParams
=
[],
deviceParams
=
[],
// 设备参数,必传
ignoreOutliers
=
true
,
isDilute
=
true
,
needMarkLine
=
true
,
showBoxOption
=
true
,
//
chartGrid
=
true
,
chartType
=
'lineChart'
,
// lineChart boxChart
chartType
=
'lineChart'
,
// lineChart boxChart
ignoreOutliers
=
true
,
// 滤波
isDilute
=
true
,
// 抽稀去重
needMarkLine
=
true
,
showBoxOption
=
true
,
// 开启箱线图配置,默认开启
chartGrid
=
true
,
// 开启网格
}
}
)
=>
{
)
=>
{
const
[
deviceAlarmSchemes
,
setDeviceAlarmSchemes
]
=
useState
(
null
);
const
[
deviceAlarmSchemes
,
setDeviceAlarmSchemes
]
=
useState
(
null
);
...
@@ -57,7 +57,7 @@ const MobileHistoryChart = (
...
@@ -57,7 +57,7 @@ const MobileHistoryChart = (
const
isBoxPlots
=
const
isBoxPlots
=
deviceParams
?.
length
===
1
&&
deviceParams
[
0
]?.
sensors
?.
split
(
','
).
length
===
1
;
deviceParams
?.
length
===
1
&&
deviceParams
[
0
]?.
sensors
?.
split
(
','
).
length
===
1
;
const
handleDataThinKey
=
(
diffDays
)
=>
{
const
handleDataThinKey
=
(
diffDays
)
=>
{
// 移动端缩放的抽稀一倍
// 移动端缩放的抽稀一倍
,需要实际调试
if
(
diffDays
>=
7
&&
diffDays
<
15
)
{
if
(
diffDays
>=
7
&&
diffDays
<
15
)
{
return
{
unit
:
'h'
,
zoom
:
'4'
};
return
{
unit
:
'h'
,
zoom
:
'4'
};
}
else
if
(
diffDays
>=
15
&&
diffDays
<
30
)
{
}
else
if
(
diffDays
>=
15
&&
diffDays
<
30
)
{
...
@@ -69,7 +69,7 @@ const MobileHistoryChart = (
...
@@ -69,7 +69,7 @@ const MobileHistoryChart = (
}
else
if
(
diffDays
<
2
&&
diffDays
>=
1
)
{
}
else
if
(
diffDays
<
2
&&
diffDays
>=
1
)
{
return
{
unit
:
'min'
,
zoom
:
'60'
};
return
{
unit
:
'min'
,
zoom
:
'60'
};
}
else
{
}
else
{
return
{
unit
:
'min'
,
zoom
:
'
2
0'
};
return
{
unit
:
'min'
,
zoom
:
'
6
0'
};
}
}
};
};
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
6a5da773
This diff is collapsed.
Click to expand it.
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