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
acf7465a
Commit
acf7465a
authored
Dec 13, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复历史曲线内的虚拟表格,无法根据数据变化自动设定宽度的问题
parent
b81008b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
VirtualTable.js
...ages/extend-components/EC_HistoryView/src/VirtualTable.js
+1
-1
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+5
-14
No files found.
packages/extend-components/EC_HistoryView/src/VirtualTable.js
View file @
acf7465a
...
@@ -54,7 +54,7 @@ const VirtualTable = (props) => {
...
@@ -54,7 +54,7 @@ const VirtualTable = (props) => {
shouldForceUpdate
:
true
,
shouldForceUpdate
:
true
,
});
});
};
};
useEffect
(()
=>
resetVirtualGrid
,
[
tableWidth
]);
useEffect
(()
=>
resetVirtualGrid
,
[
tableWidth
,
props
.
dataSource
]);
const
renderVirtualList
=
(
rawData
,
{
scrollbarSize
,
ref
,
onScroll
})
=>
{
const
renderVirtualList
=
(
rawData
,
{
scrollbarSize
,
ref
,
onScroll
})
=>
{
ref
.
current
=
connectObject
;
ref
.
current
=
connectObject
;
const
totalHeight
=
rawData
.
length
*
TABLE_ROW_HEIGHT
;
const
totalHeight
=
rawData
.
length
*
TABLE_ROW_HEIGHT
;
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
acf7465a
...
@@ -391,7 +391,7 @@ const handleSpecial1 = (special, dataSource) => {
...
@@ -391,7 +391,7 @@ const handleSpecial1 = (special, dataSource) => {
工频: '#00d0c7',
工频: '#00d0c7',
运行: '#1685ff',
运行: '#1685ff',
故障: '#ff6b37',
故障: '#ff6b37',
停止: '#
666666
',
停止: '#
aeaeae
',
};
};
let _special1 = special?.special1 ?? {};
let _special1 = special?.special1 ?? {};
let _valDesc = _special1?.valDesc ?? {};
let _valDesc = _special1?.valDesc ?? {};
...
@@ -1203,15 +1203,6 @@ const handleDataSource = (dataSource) => {
...
@@ -1203,15 +1203,6 @@ const handleDataSource = (dataSource) => {
});
});
return
_data
;
return
_data
;
};
};
const
returnLegend
=
(
sensorType
)
=>
{
const
_colorMap
=
{
变频
:
'#1685ff'
,
工频
:
'#00d0c7'
,
运行
:
'#1685ff'
,
故障
:
'#ff6b37'
,
停止
:
'#666666'
,
};
};
const
handleSpecial2
=
(
special
,
sensorName
,
sensorType
,
data1
,
data2
)
=>
{
const
handleSpecial2
=
(
special
,
sensorName
,
sensorType
,
data1
,
data2
)
=>
{
let
color
=
''
;
let
color
=
''
;
let
name
=
''
;
let
name
=
''
;
...
@@ -1224,7 +1215,7 @@ const handleSpecial2 = (special, sensorName, sensorType, data1, data2) => {
...
@@ -1224,7 +1215,7 @@ const handleSpecial2 = (special, sensorName, sensorType, data1, data2) => {
工频
:
'#00d0c7'
,
工频
:
'#00d0c7'
,
运行
:
'#1685ff'
,
运行
:
'#1685ff'
,
故障
:
'#ff6b37'
,
故障
:
'#ff6b37'
,
停止
:
'#
666666
'
,
停止
:
'#
aeaeae
'
,
};
};
let
_valDescMap
=
special
.
allValDesc
[
sensorName
]?.
split
(
';'
).
reduce
((
final
,
cur
)
=>
{
let
_valDescMap
=
special
.
allValDesc
[
sensorName
]?.
split
(
';'
).
reduce
((
final
,
cur
)
=>
{
let
_arr
=
cur
.
split
(
':'
);
let
_arr
=
cur
.
split
(
':'
);
...
@@ -1238,7 +1229,7 @@ const handleSpecial2 = (special, sensorName, sensorType, data1, data2) => {
...
@@ -1238,7 +1229,7 @@ const handleSpecial2 = (special, sensorName, sensorType, data1, data2) => {
//2. 开关量
//2. 开关量
if
(
sensorType
===
'开关值'
)
{
if
(
sensorType
===
'开关值'
)
{
const
_switchColorMap
=
{
const
_switchColorMap
=
{
0
:
'#
666666
'
,
0
:
'#
aeaeae
'
,
1
:
'#1685ff'
,
1
:
'#1685ff'
,
};
};
const
_switchNameMap
=
{
const
_switchNameMap
=
{
...
@@ -1369,8 +1360,8 @@ const specialTypeChartOptionGenerator = ({
...
@@ -1369,8 +1360,8 @@ const specialTypeChartOptionGenerator = ({
工频
:
'#00d0c7'
,
工频
:
'#00d0c7'
,
运行
:
'#1685ff'
,
运行
:
'#1685ff'
,
故障
:
'#ff6b37'
,
故障
:
'#ff6b37'
,
停止
:
'#
666666
'
,
停止
:
'#
898989
'
,
关
:
'#
666666
'
,
关
:
'#
cacaca
'
,
开
:
'#1685ff'
,
开
:
'#1685ff'
,
};
};
return
{
return
{
...
...
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