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
4a7ee3a4
Commit
4a7ee3a4
authored
Oct 25, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化
parent
891d79f3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
EC_HistoryView.md
...es/extend-components/EC_HistoryView/src/EC_HistoryView.md
+1
-1
GridDemo.js
...es/extend-components/EC_HistoryView/src/demos/GridDemo.js
+2
-2
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+8
-2
index.js
packages/extend-components/EC_HistoryView/src/index.js
+1
-1
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+3
-0
No files found.
packages/extend-components/EC_HistoryView/src/EC_HistoryView.md
View file @
4a7ee3a4
...
@@ -40,7 +40,7 @@ path: /
...
@@ -40,7 +40,7 @@ path: /
## 多图表
## 多图表
[
//
]:
#
(<code src="./demos/GridDemo.js"></code>)
<code
src=
"./demos/GridDemo.js"
></code>
## API
## API
...
...
packages/extend-components/EC_HistoryView/src/demos/GridDemo.js
View file @
4a7ee3a4
...
@@ -8,7 +8,7 @@ const deviceParams = [
...
@@ -8,7 +8,7 @@ const deviceParams = [
deviceType
:
'二供泵房'
,
deviceType
:
'二供泵房'
,
pointAddressID
:
4
,
pointAddressID
:
4
,
},
},
{
/*
{
deviceCode: 'EGBF00000137',
deviceCode: 'EGBF00000137',
sensors: '进水压力,出水瞬时流量,出水累计流量',
sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房',
deviceType: '二供泵房',
...
@@ -20,7 +20,7 @@ const deviceParams = [
...
@@ -20,7 +20,7 @@ const deviceParams = [
sensors: '进水压力,出水瞬时流量,出水累计流量',
sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房',
deviceType: '二供泵房',
pointAddressID: 4,
pointAddressID: 4,
},
},
*/
];
];
/*const deviceParams = [
/*const deviceParams = [
{
{
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
4a7ee3a4
...
@@ -82,7 +82,7 @@ const deviceParams = [
...
@@ -82,7 +82,7 @@ const deviceParams = [
"deviceType": "加矾间"
"deviceType": "加矾间"
}, */
}, */
{
/*
{
"deviceCode": "QSBF00000001",
"deviceCode": "QSBF00000001",
"sensors": "取水浊度",
"sensors": "取水浊度",
"deviceType": "取水泵房"
"deviceType": "取水泵房"
...
@@ -101,7 +101,7 @@ const deviceParams = [
...
@@ -101,7 +101,7 @@ const deviceParams = [
"deviceCode": "LLJ00000001",
"deviceCode": "LLJ00000001",
"sensors": "瞬时流量",
"sensors": "瞬时流量",
"deviceType": "流量计"
"deviceType": "流量计"
},
},
*/
/* {
/* {
deviceCode: 'EGJZ00000027',
deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率',
sensors: '2#变频器运行频率',
...
@@ -127,6 +127,12 @@ const deviceParams = [
...
@@ -127,6 +127,12 @@ const deviceParams = [
"sensors": "pH",
"sensors": "pH",
"deviceType": "水质监测仪"
"deviceType": "水质监测仪"
}*/
}*/
// 滦州
{
"deviceCode"
:
"XMSB00000015"
,
"sensors"
:
"今日出水量"
,
"deviceType"
:
"熊猫水表"
}
];
];
const
Demo
=
()
=>
{
const
Demo
=
()
=>
{
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
4a7ee3a4
...
@@ -755,7 +755,7 @@ const HistoryView = (props) => {
...
@@ -755,7 +755,7 @@ const HistoryView = (props) => {
)
:
(
)
:
(
''
''
)}
)}
{
isChart
&&
isSingle
&&
showBoxOption
&&
!
isStatus
?
(
{
isChart
&&
isSingle
&&
showBoxOption
&&
!
isStatus
&&
!
grid
?
(
<>
<>
{
lineDataType
!==
'原始曲线'
?
(
{
lineDataType
!==
'原始曲线'
?
(
<>
<>
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
4a7ee3a4
...
@@ -1143,9 +1143,12 @@ const optionGenerator = (
...
@@ -1143,9 +1143,12 @@ const optionGenerator = (
}
}
// 单曲线需要标记最大值、最小值的情况下,需要增加自定义的series,将最大最小值显示在图表上
// 单曲线需要标记最大值、最小值的情况下,需要增加自定义的series,将最大最小值显示在图表上
if
(
dataSource
?.[
0
]?.
dataModel
?.
length
&&
chartType
===
'lineChart'
)
{
if
(
dataSource
?.[
0
]?.
dataModel
?.
length
&&
chartType
===
'lineChart'
)
{
let
_dataSource
=
dataSource
?.
filter
(
item
=>
item
.
pv
);
if
(
_dataSource
?.
length
)
{
let
_customSeries
=
returnCustomSeries
(
dataSource
);
let
_customSeries
=
returnCustomSeries
(
dataSource
);
series
.
push
(
_customSeries
);
series
.
push
(
_customSeries
);
}
}
}
}
else
{
}
else
{
tooltip
=
tooltipAccessor
(
tooltip
=
tooltipAccessor
(
series
.
map
((
item
)
=>
item
.
unit
),
series
.
map
((
item
)
=>
item
.
unit
),
...
...
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