Commit d43bba2d authored by 涂茜's avatar 涂茜

fix: bug

parent 262b39c3
Pipeline #30396 canceled with stages
......@@ -138,7 +138,7 @@
"registry": "https://g.civnet.cn:4873"
},
"dependencies": {
"@wisdom-components/basictable": "^1.5.12",
"@wisdom-components/basictable": "^1.5.14",
"@wisdom-components/empty": "^1.3.9",
"@wisdom-components/exportexcel": "^1.1.2",
"@wisdom-components/timerangepicker": "^1.3.4",
......
......@@ -14,7 +14,7 @@ const GET_DICTIONARY_LIST =
// const GET_HISTORY_INFO = '/api/PandaCore/GCK/Device/SensorsDataForStation'; //获取历史信息
// const GET_DICTIONARY_LIST = '/api/PandaCore/OMS//DataManger/GetDataDictionaryList'; //获取数据字典信息
// const GET_DICTIONARY_LIST = '/api/PandaCore/OMS/DataManger/GetDataDictionaryList'; //获取数据字典信息
const historyInfoService = {
getHistoryInfo: {
......
......@@ -270,7 +270,7 @@ const HistoryInfo = (props) => {
data: data,
};
if (timeValue === 'contrast' && dataModel[0]) {
const time = dataModel[0].pt.slice(0, contrastOption === 'day' ? 10 : 7);
const time = dataModel[0].pt.slice(0, contrastOption === 'day' ? 10 : 7).replace(/-/g, '');
obj.name = obj.name + '-' + time;
}
seriesData.push(obj);
......@@ -311,13 +311,20 @@ const HistoryInfo = (props) => {
timeData = timeSort(timeData);
// 处理表头数据
const columnsData = resData.map((item, index) => {
return {
let obj = {
title: `${item.equipmentName}-${item.sensorName}${item.unit ? `(${item.unit})` : ''}`,
dataIndex: `value${index + 1}`,
key: `value${index + 1}`,
ellipsis: true,
align: 'center',
};
if (timeValue === 'contrast' && item.dataModel[0]) {
const time = item.dataModel[0].pt
.slice(0, contrastOption === 'day' ? 10 : 7)
.replace(/-/g, '');
obj.title = `${item.equipmentName}-${item.sensorName}-${time}`;
}
return obj;
});
// 处理表格数据
const tableData = timeData.map((item, index) => {
......
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