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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
19 deletions
+25
-19
index.js
packages/extend-components/EC_HistoryView/src/index.js
+22
-19
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) => {
)
:
(
''
)}
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-label`
)}
>
曲线设置
<
/div
>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-label`
)}
>
{
activeTabKey
!==
'table'
?
'曲线设置'
:
'表格设置'
}
<
/div
>
{
checkboxData
.
map
((
child
)
=>
{
const
box
=
renderCheckbox
(
child
,
isChart
&&
isSingle
);
if
(
!
box
)
return
null
;
...
...
@@ -563,7 +565,7 @@ const HistoryView = (props) => {
aDom.click();
aDom.remove();
})
.catch((err) => {
});
.catch((err) => {});
});
};
...
...
@@ -613,29 +615,31 @@ const HistoryView = (props) => {
};
data.forEach((item, index) => {
const { stationCode, sensorName, dataModel } = item;
dataModel && dataModel.forEach((data) => {
const formatTime = moment(data.pt).format(format);
dataModel &&
dataModel.forEach((data) => {
const formatTime = moment(data.pt).format(format);
let time = formatTime;
if (timeValue === 'contrast') {
time = time.slice(contrastOption === 'day' ? 11 : 8, 16);
}
let time = formatTime;
if (timeValue === 'contrast') {
time = time.slice(contrastOption === 'day' ? 11 : 8, 16);
}
timeData[formatTime] = timeData[formatTime] || buildDefaultData(time);
});
timeData[formatTime] = timeData[formatTime] || buildDefaultData(time);
});
});
// 处理表格数据
data.forEach((child, index) => {
const { dataModel } = child;
const dataIndex = dataIndexAccess(child, index);
dataModel && dataModel.forEach((value, j) => {
const formatTime = moment(value.pt).format(format);
const dataRow = timeData[formatTime];
if (dataRow) {
dataRow[dataIndex] = value.pv === null || value.pv === undefined ? '' : value.pv;
}
});
dataModel &&
dataModel.forEach((value, j) => {
const formatTime = moment(value.pt).format(format);
const dataRow = timeData[formatTime];
if (dataRow) {
dataRow[dataIndex] = value.pv === null || value.pv === undefined ? '' : value.pv;
}
});
});
const timeSort = (a, b) => {
let aa = a,
...
...
@@ -756,7 +760,6 @@ const HistoryView = (props) => {
} else {
return {};
}
});
data = data.concat(list);
});
...
...
@@ -838,7 +841,7 @@ const HistoryView = (props) => {
columns={columns}
{...tableProps}
pagination={false}
onChange={() => {
}}
onChange={() => {}}
/>
) : (
<PandaEmpty />
...
...
packages/extend-components/EC_HistoryView/src/index.less
View file @
a7ea0293
...
...
@@ -24,6 +24,9 @@
}
&-extra-right {
position: absolute;
top: 10px;
right: 40px;
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