Commit a7ea0293 authored by 李纪文's avatar 李纪文

fix: 修改历史曲线

parent d687c172
...@@ -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 />
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
} }
&-extra-right { &-extra-right {
position: absolute;
top: 10px;
right: 40px;
width: 82px; width: 82px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment