Commit ac49be56 authored by 涂茜's avatar 涂茜

Merge branch 'fix/bug' into 'dev'

Fix/bug See merge request !49
parents 954f1766 efa43af0
Pipeline #29621 failed with stages
in 14 seconds
...@@ -2,6 +2,12 @@ ...@@ -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. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.3.1...@wisdom-components/basictools@1.3.2) (2021-06-10)
### Bug Fixes
- bug ([753d393](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/753d39313b5308310a4640b887a55d2f85422069))
## [1.3.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.3.0...@wisdom-components/basictools@1.3.1) (2021-05-12) ## [1.3.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.3.0...@wisdom-components/basictools@1.3.1) (2021-05-12)
**Note:** Version bump only for package @wisdom-components/basictools **Note:** Version bump only for package @wisdom-components/basictools
......
{ {
"name": "@wisdom-components/basictools", "name": "@wisdom-components/basictools",
"version": "1.3.1", "version": "1.3.2",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -66,16 +66,16 @@ const getTimeRange = (type) => { ...@@ -66,16 +66,16 @@ const getTimeRange = (type) => {
.endOf('month'); .endOf('month');
break; break;
case 'lastWeek': // 上周 case 'lastWeek': // 上周
start = moment().subtract(14, 'days'); start = moment().startOf('week').subtract(1, 'week');
end = moment().subtract(7, 'days'); end = moment().endOf('week').subtract(1, 'week');
break; break;
case 'thisWeek': // 本周 case 'thisWeek': // 本周
start = moment().subtract(6, 'days'); start = moment().startOf('week');
end = moment(); end = moment().endOf('week');
break; break;
case 'nextWeek': // 下周 case 'nextWeek': // 下周
start = moment().subtract(-1, 'days'); start = moment().startOf('week').subtract(-1, 'week');
end = moment().subtract(-7, 'days'); end = moment().endOf('week').subtract(-1, 'week');
break; break;
case 'lastDay': // 昨天 case 'lastDay': // 昨天
start = moment().subtract(1, 'days'); start = moment().subtract(1, 'days');
......
...@@ -2,6 +2,12 @@ ...@@ -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. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.4.2...@wisdom-components/devicetree@1.4.3) (2021-06-10)
### Bug Fixes
- bug ([753d393](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/753d39313b5308310a4640b887a55d2f85422069))
## [1.4.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.4.1...@wisdom-components/devicetree@1.4.2) (2021-06-01) ## [1.4.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.4.1...@wisdom-components/devicetree@1.4.2) (2021-06-01)
### Bug Fixes ### Bug Fixes
......
{ {
"name": "@wisdom-components/devicetree", "name": "@wisdom-components/devicetree",
"version": "1.4.2", "version": "1.4.3",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
.ant-tree-checkbox { .ant-tree-checkbox {
margin: 4px 2px 0 0; margin: 7px 2px 0 0;
} }
.ant-tree-title { .ant-tree-title {
...@@ -24,14 +24,26 @@ ...@@ -24,14 +24,26 @@
width: 100%; width: 100%;
} }
.ant-tree-switcher {
line-height: 30px;
}
.ant-tree-switcher-noop { .ant-tree-switcher-noop {
width: 14px; width: 14px;
} }
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
flex: 1; flex: 1;
min-height: 30px;
overflow: hidden; overflow: hidden;
line-height: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
border-radius: 3px;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #1890ff;
background-color: #eaf1fe;
} }
&-content { &-content {
......
...@@ -2,6 +2,12 @@ ...@@ -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. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.4.1...@wisdom-components/timerangepicker@1.4.2) (2021-06-10)
### Bug Fixes
- bug ([753d393](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/753d39313b5308310a4640b887a55d2f85422069))
## [1.4.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.4.0...@wisdom-components/timerangepicker@1.4.1) (2021-05-12) ## [1.4.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.4.0...@wisdom-components/timerangepicker@1.4.1) (2021-05-12)
**Note:** Version bump only for package @wisdom-components/timerangepicker **Note:** Version bump only for package @wisdom-components/timerangepicker
......
{ {
"name": "@wisdom-components/timerangepicker", "name": "@wisdom-components/timerangepicker",
"version": "1.4.1", "version": "1.4.2",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -23,12 +23,12 @@ const Demo = () => { ...@@ -23,12 +23,12 @@ const Demo = () => {
end = moment().format(endFormat); end = moment().format(endFormat);
break; break;
case 'thisWeek': case 'thisWeek':
start = moment().subtract(6, 'days').format(startFormat); start = moment().startOf('week').format(startFormat);
end = moment().format(endFormat); end = moment().endOf('week').format(endFormat);
break; break;
case 'lastWeek': case 'lastWeek':
start = moment().subtract(14, 'days').format(startFormat); start = moment().startOf('week').subtract(1, 'week').format(startFormat);
end = moment().subtract(7, 'days').format(endFormat); end = moment().endOf('week').subtract(1, 'week').format(endFormat);
break; break;
case 'thisMonth': case 'thisMonth':
start = moment().startOf('month').format(startFormat); start = moment().startOf('month').format(startFormat);
...@@ -151,7 +151,7 @@ export default Demo; ...@@ -151,7 +151,7 @@ export default Demo;
const startFormat = 'YYYY-MM-DD 00:00:00'; const startFormat = 'YYYY-MM-DD 00:00:00';
const endFormat = 'YYYY-MM-DD 23:59:59'; const endFormat = 'YYYY-MM-DD 23:59:59';
const timeFormat = 'YYYY-MM-DD kk:mm:ss'; const timeFormat = 'YYYY-MM-DD hh:mm:ss';
const dateList = [ const dateList = [
{ {
......
...@@ -2,6 +2,45 @@ ...@@ -2,6 +2,45 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.10](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.10) (2021-06-10)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
- bug ([4ce73cc](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/4ce73ccc73136ab8a7f4131669eb50aabe2b45a6))
- bug ([cb52c1d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/cb52c1df3d7f5d792e5e8aa07d1217852017ed8e))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
## [1.5.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.9) (2021-06-07)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
- bug ([4ce73cc](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/4ce73ccc73136ab8a7f4131669eb50aabe2b45a6))
- bug ([cb52c1d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/cb52c1df3d7f5d792e5e8aa07d1217852017ed8e))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
## [1.5.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.8) (2021-06-04)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
- bug ([cb52c1d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/cb52c1df3d7f5d792e5e8aa07d1217852017ed8e))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
## [1.5.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.7) (2021-06-04)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
## [1.5.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.6) (2021-06-03)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.5.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.5) (2021-06-03) ## [1.5.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_devicetree@1.5.2...@wisdom-components/ec_devicetree@1.5.5) (2021-06-03)
### Bug Fixes ### Bug Fixes
......
{ {
"name": "@wisdom-components/ec_devicetree", "name": "@wisdom-components/ec_devicetree",
"version": "1.5.5", "version": "1.5.10",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -29,6 +29,10 @@ const DeviceTree = (props) => { ...@@ -29,6 +29,10 @@ const DeviceTree = (props) => {
setParams(serviceParams); setParams(serviceParams);
}, []); }, []);
useEffect(() => {
setParams(serviceParams);
}, [serviceParams]);
const handleData = (data) => { const handleData = (data) => {
data.map((item) => { data.map((item) => {
item.title = item.deviceName; item.title = item.deviceName;
...@@ -51,8 +55,8 @@ const DeviceTree = (props) => { ...@@ -51,8 +55,8 @@ const DeviceTree = (props) => {
setLoading(false); setLoading(false);
setTreeData(newData); setTreeData(newData);
setTotalCount(response.data.totalCount); setTotalCount(response.data.totalCount);
onTreeCheck([newData[0]]); onTreeCheck(newData.length > 0 ? [newData[0]] : []);
onTreeSelect([newData[0]]); onTreeSelect(newData.length > 0 ? [newData[0]] : []);
} else { } else {
message.error(response.msg); message.error(response.msg);
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
.ant-tree-checkbox { .ant-tree-checkbox {
margin: 4px 2px 0 0; margin: 7px 2px 0 0;
} }
.ant-tree-title { .ant-tree-title {
...@@ -24,14 +24,26 @@ ...@@ -24,14 +24,26 @@
width: 100%; width: 100%;
} }
.ant-tree-switcher {
line-height: 30px;
}
.ant-tree-switcher-noop { .ant-tree-switcher-noop {
width: 14px; width: 14px;
} }
.ant-tree-node-content-wrapper { .ant-tree-node-content-wrapper {
flex: 1; flex: 1;
min-height: 30px;
overflow: hidden; overflow: hidden;
line-height: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
border-radius: 3px;
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
color: #1890ff;
background-color: #eaf1fe;
} }
&-content { &-content {
......
...@@ -2,6 +2,51 @@ ...@@ -2,6 +2,51 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.10](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.10) (2021-06-10)
### Bug Fixes
- 修改历史曲线表格采集时间展示问题及分页问题 ([d47334d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d47334d7da2dfc264a7ce49b8f333c9afb89e3d7))
- bug ([753d393](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/753d39313b5308310a4640b887a55d2f85422069))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
- bug ([62c4960](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/62c49603efc3e1dfe31a922329e142d038a46c73))
## [1.2.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.9) (2021-06-07)
### Bug Fixes
- 修改历史曲线表格采集时间展示问题及分页问题 ([d47334d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d47334d7da2dfc264a7ce49b8f333c9afb89e3d7))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
- bug ([62c4960](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/62c49603efc3e1dfe31a922329e142d038a46c73))
## [1.2.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.8) (2021-06-04)
### Bug Fixes
- 修改历史曲线表格采集时间展示问题及分页问题 ([d47334d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d47334d7da2dfc264a7ce49b8f333c9afb89e3d7))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
- bug ([62c4960](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/62c49603efc3e1dfe31a922329e142d038a46c73))
## [1.2.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.7) (2021-06-04)
### Bug Fixes
- 修改历史曲线表格采集时间展示问题及分页问题 ([d47334d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d47334d7da2dfc264a7ce49b8f333c9afb89e3d7))
- bug ([dba39ec](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dba39ecef9aea597c66df08f859863b41b207b92))
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
- bug ([62c4960](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/62c49603efc3e1dfe31a922329e142d038a46c73))
## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.6) (2021-06-03)
### Bug Fixes
- 修改历史曲线表格采集时间展示问题及分页问题 ([d47334d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d47334d7da2dfc264a7ce49b8f333c9afb89e3d7))
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
- bug ([62c4960](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/62c49603efc3e1dfe31a922329e142d038a46c73))
## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.5) (2021-06-03) ## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyinfo@1.2.3...@wisdom-components/ec_historyinfo@1.2.5) (2021-06-03)
### Bug Fixes ### Bug Fixes
......
{ {
"name": "@wisdom-components/ec_historyinfo", "name": "@wisdom-components/ec_historyinfo",
"version": "1.2.5", "version": "1.2.10",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -3,7 +3,8 @@ import PropTypes from 'prop-types'; ...@@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import Highcharts from 'highcharts/highstock'; import Highcharts from 'highcharts/highstock';
import HighchartsReact from 'highcharts-react-official'; import HighchartsReact from 'highcharts-react-official';
import { Tabs, Select, Radio, Checkbox, ConfigProvider, DatePicker } from 'antd'; import HighchartsBoost from 'highcharts/modules/boost';
import { Tabs, Select, Radio, Checkbox, ConfigProvider, DatePicker, Spin } from 'antd';
import { PlusCircleOutlined, CloseCircleFilled } from '@ant-design/icons'; import { PlusCircleOutlined, CloseCircleFilled } from '@ant-design/icons';
import TimeRangePicker from '@wisdom-components/timerangepicker'; import TimeRangePicker from '@wisdom-components/timerangepicker';
import BasicTable from '@wisdom-components/basictable'; import BasicTable from '@wisdom-components/basictable';
...@@ -11,6 +12,8 @@ import Empty from '@wisdom-components/empty'; ...@@ -11,6 +12,8 @@ import Empty from '@wisdom-components/empty';
import moment from 'moment'; import moment from 'moment';
import './index.less'; import './index.less';
HighchartsBoost(Highcharts);
const { TabPane } = Tabs; const { TabPane } = Tabs;
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { Option } = Select; const { Option } = Select;
...@@ -115,6 +118,9 @@ const DefaultOptions = (color, contrastOption) => ({ ...@@ -115,6 +118,9 @@ const DefaultOptions = (color, contrastOption) => ({
zoomType: 'x', zoomType: 'x',
backgroundColor: 'rgba(255, 255, 255, 0.5)', backgroundColor: 'rgba(255, 255, 255, 0.5)',
}, },
boost: {
useGPUTranslations: true,
},
colors: color, colors: color,
title: null, title: null,
credits: false, credits: false,
...@@ -202,6 +208,7 @@ const HistoryInfo = (props) => { ...@@ -202,6 +208,7 @@ const HistoryInfo = (props) => {
defaultChecked, defaultChecked,
} = props; } = props;
const [loading, setLoading] = useState(false);
const [activeTabKey, setActiveTabKey] = useState('curve'); const [activeTabKey, setActiveTabKey] = useState('curve');
const [timeValue, setTimeValue] = useState('customer'); const [timeValue, setTimeValue] = useState('customer');
const [contrastOption, setContrastOption] = useState('day'); const [contrastOption, setContrastOption] = useState('day');
...@@ -318,7 +325,7 @@ const HistoryInfo = (props) => { ...@@ -318,7 +325,7 @@ const HistoryInfo = (props) => {
resData.forEach((child, index) => { resData.forEach((child, index) => {
child.dataModel.forEach((value, j) => { child.dataModel.forEach((value, j) => {
const formatTime = moment(value.pt).format(format); const formatTime = moment(value.pt).format(format);
if (timeData[i] === formatTime) item[`value${index + 1}`] = value.pv; if (timeData[i] === formatTime) item[`value${index + 1}`] = value.pv || '--';
}); });
}); });
}); });
...@@ -344,6 +351,7 @@ const HistoryInfo = (props) => { ...@@ -344,6 +351,7 @@ const HistoryInfo = (props) => {
}; };
requestArr.push(historyInfoService(param)); requestArr.push(historyInfoService(param));
}); });
setLoading(true);
Promise.all(requestArr).then((values) => { Promise.all(requestArr).then((values) => {
if (values.length) { if (values.length) {
let data = []; let data = [];
...@@ -352,6 +360,7 @@ const HistoryInfo = (props) => { ...@@ -352,6 +360,7 @@ const HistoryInfo = (props) => {
data = data.concat(res.data); data = data.concat(res.data);
} }
}); });
setLoading(false);
handleTableData(data); handleTableData(data);
handleSeries(data); handleSeries(data);
} }
...@@ -769,35 +778,41 @@ const HistoryInfo = (props) => { ...@@ -769,35 +778,41 @@ const HistoryInfo = (props) => {
<TabPane tab={item.tab} key={item.key}> <TabPane tab={item.tab} key={item.key}>
<div className={classNames(`${prefixCls}-content`)}> <div className={classNames(`${prefixCls}-content`)}>
{renderOptions(item)} {renderOptions(item)}
{!tableData.length && <Empty />} <Spin spinning={loading}>
{!!tableData.length && ( {!tableData.length && (
<div className={classNames(`${prefixCls}-wrap`)}> <div className={classNames(`${prefixCls}-empty`)}>
<div className={classNames(`${prefixCls}-main`)}> <Empty />
{item.key === 'curve' && ( </div>
<div className={classNames(`${prefixCls}-chart`)} ref={container}> )}
<HighchartsReact {!!tableData.length && (
immutable={true} <div className={classNames(`${prefixCls}-wrap`)}>
highcharts={Highcharts} <div className={classNames(`${prefixCls}-main`)}>
constructorType={'stockChart'} {item.key === 'curve' && (
options={options} <div className={classNames(`${prefixCls}-chart`)} ref={container}>
allowChartUpdate={true} <HighchartsReact
immutable={true}
highcharts={Highcharts}
constructorType={'stockChart'}
options={options}
allowChartUpdate={true}
/>
</div>
)}
{item.key === 'table' && (
<BasicTable
dataSource={tableData}
columns={columns}
{...tableProps}
pagination={{ pageSize, showQuickJumper: true, showSizeChanger: true }}
onChange={(value) => {
setPageSize(value.pageSize);
}}
/> />
</div> )}
)} </div>
{item.key === 'table' && (
<BasicTable
dataSource={tableData}
columns={columns}
{...tableProps}
pagination={{ pageSize, showQuickJumper: true, showSizeChanger: true }}
onChange={(value) => {
setPageSize(value.pageSize);
}}
/>
)}
</div> </div>
</div> )}
)} </Spin>
</div> </div>
</TabPane> </TabPane>
))} ))}
......
...@@ -14,9 +14,31 @@ ...@@ -14,9 +14,31 @@
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
padding: 10px 0 0 0; padding: 10px 0 0 0;
.ant-spin-nested-loading {
display: flex;
flex: 1;
}
.ant-spin-container {
display: flex;
flex: 1;
}
.ant-spin-nested-loading > div > .ant-spin {
max-height: none;
}
}
&-empty {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
} }
&-wrap { &-wrap {
display: flex;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
} }
......
...@@ -2,6 +2,36 @@ ...@@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.2...@wisdom-components/ec_quotaselect@1.3.7) (2021-06-10)
### Bug Fixes
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.2...@wisdom-components/ec_quotaselect@1.3.6) (2021-06-07)
### Bug Fixes
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.2...@wisdom-components/ec_quotaselect@1.3.5) (2021-06-04)
### Bug Fixes
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
## [1.3.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.2...@wisdom-components/ec_quotaselect@1.3.4) (2021-06-04)
### Bug Fixes
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
## [1.3.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.2...@wisdom-components/ec_quotaselect@1.3.3) (2021-06-03)
### Bug Fixes
- bug ([00b32ce](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/00b32cee8a0b0bcbbb40455b31feb578bef737cc))
## [1.3.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.1...@wisdom-components/ec_quotaselect@1.3.2) (2021-06-01) ## [1.3.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.1...@wisdom-components/ec_quotaselect@1.3.2) (2021-06-01)
### Bug Fixes ### Bug Fixes
......
{ {
"name": "@wisdom-components/ec_quotaselect", "name": "@wisdom-components/ec_quotaselect",
"version": "1.3.2", "version": "1.3.7",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
.@{ec-quota-select-prefix-cls} { .@{ec-quota-select-prefix-cls} {
&-btn-wrap { &-btn-wrap {
overflow: auto; overflow: auto;
white-space: nowrap;
button { button {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px;
} }
} }
} }
......
...@@ -2,6 +2,36 @@ ...@@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.8) (2021-06-10)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.4.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.7) (2021-06-07)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.4.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.6) (2021-06-04)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.4.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.5) (2021-06-04)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.4.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.4) (2021-06-03)
### Bug Fixes
- 修改接口参数 ([e264059](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/e264059c14783ca793161f069c6b2476a5c8f5ce))
## [1.4.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.3) (2021-06-03) ## [1.4.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.4.0...@wisdom-components/ec_realtimeinfo@1.4.3) (2021-06-03)
### Bug Fixes ### Bug Fixes
......
{ {
"name": "@wisdom-components/ec_realtimeinfo", "name": "@wisdom-components/ec_realtimeinfo",
"version": "1.4.3", "version": "1.4.8",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
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