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
81994548
Commit
81994548
authored
Aug 14, 2023
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改历史曲线bug
parent
942a536c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
index.js
packages/extend-components/EC_HistoryInfo/src/index.js
+6
-1
index.js
packages/extend-components/EC_HistoryView/src/index.js
+3
-1
No files found.
packages/extend-components/EC_HistoryInfo/src/index.js
View file @
81994548
...
...
@@ -354,6 +354,10 @@ const HistoryInfo = (props) => {
// 处理接口服务参数的变化
const
onChangeParams
=
(
value
=
[])
=>
{
const
{
dateRange
,
ignoreOutliers
,
zoom
,
unit
}
=
value
;
if
(
!
dateRange
.
length
){
handleTableData
([]);
handleSeries
([]);
}
const
requestArr
=
[];
dateRange
.
forEach
((
item
)
=>
{
const
param
=
{
...
...
@@ -371,6 +375,7 @@ const HistoryInfo = (props) => {
});
setLoading
(
true
);
Promise
.
all
(
requestArr
).
then
((
values
)
=>
{
setLoading
(
false
);
if
(
values
.
length
)
{
let
data
=
[];
values
.
forEach
((
res
)
=>
{
...
...
@@ -378,7 +383,6 @@ const HistoryInfo = (props) => {
data
=
data
.
concat
(
res
.
data
);
}
});
setLoading
(
false
);
handleTableData
(
data
);
handleSeries
(
data
);
}
...
...
@@ -572,6 +576,7 @@ const HistoryInfo = (props) => {
onChange
=
{(
date
,
dateString
)
=>
onContrastPickerChange
(
date
,
dateString
,
child
)
}
style
=
{{
width
:
130
}}
/
>
{
datePickerArr
.
length
>
2
&&
(
<
div
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
81994548
...
...
@@ -412,6 +412,7 @@ const HistoryView = (props) => {
picker
=
{
contrastOption
}
value
=
{
child
.
value
}
onChange
=
{(
date
,
dateString
)
=>
onContrastPickerChange
(
date
,
dateString
,
child
)}
style
=
{{
width
:
130
}}
/
>
{
datePickerArr
.
length
>
2
&&
(
<
div
...
...
@@ -722,7 +723,7 @@ const HistoryView = (props) => {
if (i.sensors && i.deviceCode && i.deviceCode)
acrossTables.push(_.omit(i, ['pointAddressID']));
});
if (!acrossTables?.length) {
if (!acrossTables?.length
||!dateRange.length
) {
handleTableData([]);
setChartDataSource([]);
return;
...
...
@@ -745,6 +746,7 @@ const HistoryView = (props) => {
});
setLoading(true);
Promise.all(requestArr).then((results) => {
setLoading(false);
if (results.length) {
let data = [];
results.forEach((res, index) => {
...
...
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