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
b935d842
Commit
b935d842
authored
Apr 17, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 剔除isVertical参数;修复x轴错误的问题
parent
206b3f82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
report.js
...ges/base-components/BasicReport/src/api/service/report.js
+1
-1
index.js
packages/extend-components/EC_HistoryView/src/index.js
+3
-2
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+6
-9
No files found.
packages/base-components/BasicReport/src/api/service/report.js
View file @
b935d842
...
...
@@ -7,7 +7,7 @@
import
{
request
}
from
'@wisdom-utils/utils'
;
import
*
as
constants
from
'../constants'
;
const
BASEURL
=
'/PandaAssets/
Assets
/ReportManager'
;
const
BASEURL
=
'/PandaAssets/
CityWater
/ReportManager'
;
export
const
API
=
{
GET_REPORT_INFO
:
`
${
BASEURL
}
/GetReportInfo`
,
// 获取报表信息
GET_REPORT_FILTER_VALUE
:
`
${
BASEURL
}
/GetReportFilterValue`
,
// 获取过滤字段的值的枚举
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
b935d842
...
...
@@ -438,8 +438,9 @@ const HistoryView = (props) => {
if
(
key
===
'chartType'
)
{
data
[
_index1
].
showInCurve
=
e
.
target
.
value
;
data
[
_index1
].
checked
=
false
;
data
[
_index
].
showInCurve
=
false
;
data
[
_index
].
checked
=
false
;
}
debugger
setCheckboxData
(
data
);
};
...
...
@@ -686,7 +687,7 @@ const HistoryView = (props) => {
zoom,
unit,
ignoreOutliers,
isVertical: false, // 是否查询竖表
//
isVertical: false, // 是否查询竖表
dateFrom: item.dateFrom,
dateTo: item.dateTo,
acrossTables,
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
b935d842
...
...
@@ -348,7 +348,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
markArea
,
};
});
console
.
log
(
'series: '
,
series
);
// 由于series更新后,没有的数据曲线仍然停留在图表区上,导致图表可视区范围有问题
const
min
=
Math
.
min
(
...
series
.
map
((
item
)
=>
item
.
data
?.[
0
]?.[
0
]).
filter
((
item
)
=>
item
!==
undefined
),
...
...
@@ -360,7 +360,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
);
let
xAxis
=
{
type
:
'time'
,
min
,
max
};
decorateAxisGridLine
(
xAxis
,
showGridLine
);
console
.
log
(
'series: '
,
series
);
const
tooltipTimeFormat
=
!
contrast
?
'YYYY-MM-DD HH:mm:ss'
:
contrastOption
===
'day'
...
...
@@ -380,8 +380,9 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
const
{
firstPV
,
lastPV
,
maxPV
,
minPV
}
=
item
;
return
[
firstPV
,
lastPV
,
minPV
,
maxPV
]
})
||
[];
//当存在othersData的时候,只是单曲线
xAxis
=
{
type
:
'category'
,
data
:
series
[
0
].
data
.
map
(
item
=>
moment
(
item
[
0
]).
format
(
'YYYY-MM-DD'
))};
series
=
series
.
map
(
item
=>
{
let
_item
=
{...
item
,
symbol
:
false
};
let
_item
=
{...
item
,
symbol
:
null
};
_item
.
data
=
_item
?.
data
?.
map
(
d
=>
{
return
d
[
1
]
||
null
})
||
[];
...
...
@@ -390,7 +391,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
series
.
push
({
type
:
'candlestick'
,
name
:
'箱线图'
,
symbol
:
false
,
symbol
:
null
,
data
:
otherData
});
}
else
{
...
...
@@ -401,6 +402,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
_maxData
.
push
(
maxPV
);
_minData
.
push
(
minPV
);
});
//当存在othersData的时候,只是单曲线
xAxis
=
{
type
:
'category'
,
data
:
series
[
0
].
data
.
map
(
item
=>
moment
(
item
[
0
]).
format
(
'YYYY-MM-DD'
))};
series
=
series
.
map
(
item
=>
{
let
_item
=
{...
item
,
symbol
:
false
};
_item
.
data
=
_item
?.
data
?.
map
(
d
=>
{
...
...
@@ -426,12 +428,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
});
})
}
xAxis
=
{
type
:
'category'
,
data
:
series
[
0
].
data
.
map
(
item
=>
moment
(
item
[
0
]).
format
(
'YYYY-MM-DD'
))};
tooltip
.
formatter
=
(
e
)
=>
{
console
.
log
(
e
);
}
}
debugger
return
{
yAxis
,
grid
,
...
...
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