Commit 7524448e authored by 涂茜's avatar 涂茜

Merge branch 'fix/bug' into 'dev'

Fix/bug See merge request !53
parents 262b39c3 6057061c
Pipeline #30439 failed with stages
in 14 seconds
......@@ -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",
......
......@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.14](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.13...@wisdom-components/ec_historyinfo@1.2.14) (2021-06-24)
### Bug Fixes
- bug ([d43bba2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d43bba2dee3401d9d118c08d9eff10359b0ff272))
## [1.2.13](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.11...@wisdom-components/ec_historyinfo@1.2.13) (2021-06-18)
### Bug Fixes
......
{
"name": "@wisdom-components/ec_historyinfo",
"version": "1.2.13",
"version": "1.2.14",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -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