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
857d4b8e
Commit
857d4b8e
authored
Jan 08, 2024
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加isInterpolation参数,解决接口在抽稀间隔大于等于12时在抽稀间隔内返回多条数据的问题
parent
57cdecc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+7
-1
index.js
packages/extend-components/EC_HistoryView/src/index.js
+14
-4
No files found.
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
857d4b8e
...
@@ -172,10 +172,16 @@ const deviceParams = [
...
@@ -172,10 +172,16 @@ const deviceParams = [
"deviceType": "加压机组"
"deviceType": "加压机组"
}*/
}*/
/*铁山*/
/*铁山*/
{
/*
{
"deviceCode": "SZ00000001",
"deviceCode": "SZ00000001",
"deviceType": "水质",
"deviceType": "水质",
"sensors": "PH,浑浊度,氨氮,总氮,总磷,溶解氧,水温,电导率,叶绿素a,藻密度,高锰酸盐指数"
"sensors": "PH,浑浊度,氨氮,总氮,总磷,溶解氧,水温,电导率,叶绿素a,藻密度,高锰酸盐指数"
}*/
/*邳州*/
{
"deviceCode"
:
"TLC00000001"
,
"sensors"
:
"1号碳滤池浊度"
,
"deviceType"
:
"碳滤池"
}
}
];
];
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
857d4b8e
...
@@ -197,6 +197,12 @@ const timeIntervalList = [
...
@@ -197,6 +197,12 @@ const timeIntervalList = [
unit
:
'h'
,
unit
:
'h'
,
name
:
'12小时'
,
name
:
'12小时'
,
},
},
{
key
:
'24'
,
zoom
:
'24'
,
unit
:
'h'
,
name
:
'24小时'
,
},
];
];
const
updateTime
=
(
key
)
=>
{
const
updateTime
=
(
key
)
=>
{
...
@@ -1105,8 +1111,6 @@ const HistoryView = (props) => {
...
@@ -1105,8 +1111,6 @@ const HistoryView = (props) => {
acrossTables
,
acrossTables
,
isBoxPlots
:
isBoxPlots
,
isBoxPlots
:
isBoxPlots
,
};
};
// if (ignoreOutliers) param.algorithmValue = algorithmValue;
// param.algorithmValue = algorithmValue;
let
diffYears
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'years'
);
let
diffYears
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'years'
);
let
diffDays
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'days'
);
let
diffDays
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'days'
);
let
diffHours
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'hours'
);
let
diffHours
=
moment
(
item
.
dateTo
).
diff
(
moment
(
item
.
dateFrom
),
'hours'
);
...
@@ -1116,8 +1120,14 @@ const HistoryView = (props) => {
...
@@ -1116,8 +1120,14 @@ const HistoryView = (props) => {
:
!
isDilute
:
!
isDilute
?
{
zoom
:
''
,
unit
:
''
}
?
{
zoom
:
''
,
unit
:
''
}
:
{};
// 表格也支持全数据模式;
:
{};
// 表格也支持全数据模式;
let
_finalParams
=
{...
param
,
...
zoomParam
};
requestArr
.
push
(
getHistoryInfo
({...
param
,
...
zoomParam
}));
// 2024年1月8日 抽稀间隔大于等于12小时时,会存在线性插值导致抽稀间隔内数据条数大于预期的问题。需要增加一个额外参数处理该情况。
if
(
_finalParams
.
zoom
)
{
let
_num
=
Number
(
_finalParams
.
zoom
);
let
_isNaN
=
isNaN
(
_num
);
if
(
!
_isNaN
&&
_num
>=
12
)
_finalParams
.
isInterpolation
=
false
;
}
requestArr
.
push
(
getHistoryInfo
(
_finalParams
));
});
});
setLoading
(
true
);
setLoading
(
true
);
Promise
.
all
(
requestArr
)
Promise
.
all
(
requestArr
)
...
...
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