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
07536788
Commit
07536788
authored
Sep 19, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复频率业务问题
parent
81f42fa3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
20 deletions
+17
-20
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+11
-10
index.js
packages/extend-components/EC_HistoryView/src/index.js
+4
-8
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+2
-2
No files found.
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
07536788
...
@@ -11,18 +11,19 @@ const deviceParams = [
...
@@ -11,18 +11,19 @@ const deviceParams = [
deviceType: '熊猫二供泵房',
deviceType: '熊猫二供泵房',
pointAddressID: 208,
pointAddressID: 208,
},*/
},*/
/* {
/* {
deviceCode: 'EGJZ00000197',
// sensors: '进水压力,出水瞬时流量,出水累计流量',
sensors: '1#变频器运行频率',
deviceType: '二供机组',
// pointAddressID: 208,
}*/
/* {
"deviceCode": "SYJ00000008",
"deviceCode": "SYJ00000008",
"sensors": "瞬时流量",
"sensors": "瞬时流量",
"deviceType": "水源井"
"deviceType": "水源井"
},*/
},*/
{
deviceCode
:
'EGJZ00000197'
,
sensors
:
'进水压力,出水压力,出水瞬时流量,出水累计流量'
,
// sensors: '1#变频器运行频率',
deviceType
:
'二供机组'
,
// pointAddressID: 208,
}
/* {
/* {
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018',
// deviceCode: 'EGBF00000018',
...
@@ -76,11 +77,11 @@ const deviceParams = [
...
@@ -76,11 +77,11 @@ const deviceParams = [
// "sensors": "沉淀池1号进水管流量",
// "sensors": "沉淀池1号进水管流量",
// "deviceType": "絮凝沉淀池"
// "deviceType": "絮凝沉淀池"
// }
// }
{
/*
{
"deviceCode": "LLJ00000001",
"deviceCode": "LLJ00000001",
"sensors": "瞬时流量",
"sensors": "瞬时流量",
"deviceType": "流量计"
"deviceType": "流量计"
}
}
*/
/*邳州*/
/*邳州*/
/* {
/* {
deviceCode: 'EGJZ00000027',
deviceCode: 'EGJZ00000027',
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
07536788
...
@@ -1001,10 +1001,6 @@ const HistoryView = (props) => {
...
@@ -1001,10 +1001,6 @@ const HistoryView = (props) => {
if (dataItem) {
if (dataItem) {
dataItem.dateFrom = dateFrom || '';
dataItem.dateFrom = dateFrom || '';
dataItem.dateTo = dateTo || '';
dataItem.dateTo = dateTo || '';
// 抽稀情况下,剔除掉为null的点
/* if (zoomArray[index]?.unit !== '' && zoomArray[index]?.zoom !== '') {
dataItem.dataModel = dataItem.dataModel.filter(item => item.pv !== null)
}*/
return dataItem;
return dataItem;
} else {
} else {
return {};
return {};
...
@@ -1190,11 +1186,11 @@ const HistoryView = (props) => {
...
@@ -1190,11 +1186,11 @@ const HistoryView = (props) => {
}
}
// 查点表配置
// 查点表配置
if
(
_res1
.
code
===
0
)
{
if
(
_res1
.
code
===
0
)
{
let
_sensorConfig
=
_res1
.
data
.
find
(
item
=>
item
.
name
.
trim
()
===
sensors
.
trim
());
let
_sensorConfig
=
_res1
.
data
.
find
(
item
=>
item
?
.
name
.
trim
()
===
sensors
.
trim
());
let
_statusName
=
_sensorConfig
.
statusName
;
let
_statusName
=
_sensorConfig
?
.
statusName
;
if
(
_statusName
)
{
if
(
_statusName
)
{
let
_statusConfig
=
_res1
.
data
.
find
(
item
=>
item
.
name
.
trim
()
===
_statusName
.
trim
());
let
_statusConfig
=
_res1
.
data
.
find
(
item
=>
item
?
.
name
.
trim
()
===
_statusName
.
trim
());
let
_valDesc
=
_statusConfig
.
valDesc
;
let
_valDesc
=
_statusConfig
?.
valDesc
||
''
;
setSpecial1
({
setSpecial1
({
name
:
_statusName
,
name
:
_statusName
,
valDesc
:
_valDesc
.
split
(
';'
).
reduce
((
final
,
cur
)
=>
{
valDesc
:
_valDesc
.
split
(
';'
).
reduce
((
final
,
cur
)
=>
{
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
07536788
...
@@ -613,9 +613,9 @@ const handleYAxis = ({dataSource, needUnit, curveCenter, showGridLine}) => {
...
@@ -613,9 +613,9 @@ const handleYAxis = ({dataSource, needUnit, curveCenter, showGridLine}) => {
type: 'value',
type: 'value',
name: needUnit ? unit : null,
name: needUnit ? unit : null,
position: i % 2 === 0 ? 'left' : 'right',
position: i % 2 === 0 ? 'left' : 'right',
offset: Math.floor(i / 2) *
AXIS_WIDTH
,
offset: Math.floor(i / 2) *
80
,
axisLabel: {
axisLabel: {
formatter: (value) => (value > 10000
0 ? `
$
{(
value
/
1000
).
toFixed
(
2
)}
k
` : value.toFixed(2
)),
formatter: (value) => (value > 10000
? `
$
{(
value
/
1000
).
toFixed
(
1
)}
k
` : value.toFixed(1
)),
},
},
axisLine: {
axisLine: {
show: true,
show: true,
...
...
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