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
a7ea0293
Commit
a7ea0293
authored
Jun 08, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改历史曲线
parent
d687c172
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
index.js
packages/extend-components/EC_HistoryView/src/index.js
+9
-6
index.less
packages/extend-components/EC_HistoryView/src/index.less
+3
-0
No files found.
packages/extend-components/EC_HistoryView/src/index.js
View file @
a7ea0293
...
@@ -512,7 +512,9 @@ const HistoryView = (props) => {
...
@@ -512,7 +512,9 @@ const HistoryView = (props) => {
)
:
(
)
:
(
''
''
)}
)}
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-label`
)}
>
曲线设置
<
/div
>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-label`
)}
>
{
activeTabKey
!==
'table'
?
'曲线设置'
:
'表格设置'
}
<
/div
>
{
checkboxData
.
map
((
child
)
=>
{
{
checkboxData
.
map
((
child
)
=>
{
const
box
=
renderCheckbox
(
child
,
isChart
&&
isSingle
);
const
box
=
renderCheckbox
(
child
,
isChart
&&
isSingle
);
if
(
!
box
)
return
null
;
if
(
!
box
)
return
null
;
...
@@ -563,7 +565,7 @@ const HistoryView = (props) => {
...
@@ -563,7 +565,7 @@ const HistoryView = (props) => {
aDom.click();
aDom.click();
aDom.remove();
aDom.remove();
})
})
.catch((err) => {
});
.catch((err) => {});
});
});
};
};
...
@@ -613,7 +615,8 @@ const HistoryView = (props) => {
...
@@ -613,7 +615,8 @@ const HistoryView = (props) => {
};
};
data.forEach((item, index) => {
data.forEach((item, index) => {
const { stationCode, sensorName, dataModel } = item;
const { stationCode, sensorName, dataModel } = item;
dataModel && dataModel.forEach((data) => {
dataModel &&
dataModel.forEach((data) => {
const formatTime = moment(data.pt).format(format);
const formatTime = moment(data.pt).format(format);
let time = formatTime;
let time = formatTime;
...
@@ -629,7 +632,8 @@ const HistoryView = (props) => {
...
@@ -629,7 +632,8 @@ const HistoryView = (props) => {
data.forEach((child, index) => {
data.forEach((child, index) => {
const { dataModel } = child;
const { dataModel } = child;
const dataIndex = dataIndexAccess(child, index);
const dataIndex = dataIndexAccess(child, index);
dataModel && dataModel.forEach((value, j) => {
dataModel &&
dataModel.forEach((value, j) => {
const formatTime = moment(value.pt).format(format);
const formatTime = moment(value.pt).format(format);
const dataRow = timeData[formatTime];
const dataRow = timeData[formatTime];
if (dataRow) {
if (dataRow) {
...
@@ -756,7 +760,6 @@ const HistoryView = (props) => {
...
@@ -756,7 +760,6 @@ const HistoryView = (props) => {
} else {
} else {
return {};
return {};
}
}
});
});
data = data.concat(list);
data = data.concat(list);
});
});
...
@@ -838,7 +841,7 @@ const HistoryView = (props) => {
...
@@ -838,7 +841,7 @@ const HistoryView = (props) => {
columns={columns}
columns={columns}
{...tableProps}
{...tableProps}
pagination={false}
pagination={false}
onChange={() => {
}}
onChange={() => {}}
/>
/>
) : (
) : (
<PandaEmpty />
<PandaEmpty />
...
...
packages/extend-components/EC_HistoryView/src/index.less
View file @
a7ea0293
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
}
}
&-extra-right {
&-extra-right {
position: absolute;
top: 10px;
right: 40px;
width: 82px;
width: 82px;
}
}
...
...
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