Commit f50fcad0 authored by 涂茜's avatar 涂茜

Merge branch 'fix/bug' into 'dev'

Fix/bug See merge request !30
parents 206e7c16 22a9ef5b
Pipeline #26381 failed with stages
in 14 seconds
......@@ -137,8 +137,8 @@
"registry": "https://g.civnet.cn:4873"
},
"dependencies": {
"@wisdom-components/Empty": "^1.3.3",
"@wisdom-components/basictable": "^1.2.0",
"@wisdom-components/empty": "^1.3.9",
"@wisdom-components/timerangepicker": "^1.3.4",
"classnames": "^2.2.6",
"cross-spawn": "^7.0.3",
......
# `@wisdom-components/BasicTable`
# `@wisdom-components/basictable`
> TODO: description
## Usage
```
const basicTable = require('@wisdom-components/BasicTable');
const basicTable = require('@wisdom-components/basictable');
// TODO: DEMONSTRATE API
```
# `@wisdom-components/BasicTools`
# `@wisdom-components/basictools`
> TODO: description
## Usage
```
const basicTools = require('@wisdom-components/BasicTools');
const basicTools = require('@wisdom-components/basictools');
// TODO: DEMONSTRATE API
```
......@@ -16,7 +16,7 @@ group:
## 使用说明
```javascript
import { getTimeRange, getRange } from '@wisdom-components/BasicTools';
import { getTimeRange, getRange } from '@wisdom-components/basictools';
let result1 = getTimeRange('lastYear');
let result2 = getTimeRange('nextWeek');
......
......@@ -2,6 +2,25 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.11](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.8...@wisdom-components/devicetree@1.3.11) (2021-04-22)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
- update package ([f0b3401](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b34012654a1a9af9d20f72589b78671cb231a0))
## [1.3.10](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.8...@wisdom-components/devicetree@1.3.10) (2021-04-22)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.3.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.8...@wisdom-components/devicetree@1.3.9) (2021-04-21)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.3.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.5...@wisdom-components/devicetree@1.3.8) (2021-04-20)
### Bug Fixes
......
# `@wisdom-components/DeviceTree`
# `@wisdom-components/devicetree`
> TODO: description
## Usage
```
const devicetree = require('@wisdom-components/DeviceTree');
const devicetree = require('@wisdom-components/devicetree');
// TODO: DEMONSTRATE API
```
......
{
"name": "@wisdom-components/devicetree",
"version": "1.3.8",
"version": "1.3.11",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -79,7 +79,7 @@ const Demo = () => {
};
return (
<div style={{ width: '300px', height: '400px', border: '1px solid #eee' }}>
<div style={{ width: '200px', height: '400px', border: '1px solid #eee' }}>
<PandaDeviceTree
onSearch={onSearch}
checkable
......
......@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Input, Tree, Divider, ConfigProvider } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import Empty from '@wisdom-components/Empty';
import Empty from '@wisdom-components/empty';
import './index.less';
const DeviceTree = (props) => {
......
......@@ -12,6 +12,14 @@
margin: 6px 0 12px 0;
}
.ant-tree-checkbox {
margin: 4px 2px 0 0;
}
.ant-tree-title {
white-space: nowrap;
}
&-content {
flex: 1;
overflow-y: scroll;
......
# `@wisdom-components/Empty`
# `@wisdom-components/empty`
> TODO: description
## Usage
```
const empty = require('@wisdom-components/Empty');
const empty = require('@wisdom-components/empty');
// TODO: DEMONSTRATE API
```
......@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.10](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.8...@wisdom-components/historyinfo@1.4.10) (2021-04-22)
### Bug Fixes
- update package ([f0b3401](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b34012654a1a9af9d20f72589b78671cb231a0))
## [1.4.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.8...@wisdom-components/historyinfo@1.4.9) (2021-04-22)
**Note:** Version bump only for package @wisdom-components/historyinfo
## [1.4.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.5...@wisdom-components/historyinfo@1.4.8) (2021-04-20)
### Bug Fixes
......
# `@wisdom-components/HistoryInfo`
# `@wisdom-components/historyinfo`
> TODO: description
## Usage
```
const historyinfo = require('@wisdom-components/HistoryInfo');
const historyinfo = require('@wisdom-components/historyinfo');
// TODO: DEMONSTRATE API
```
{
"name": "@wisdom-components/historyinfo",
"version": "1.4.8",
"version": "1.4.10",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -92,15 +92,17 @@ const Demo = () => {
};
return (
<HistoryInfo
title={'指标曲线'}
columns={columns}
dataSource={data}
chartOptions={{ series }}
tableProps={{ bordered: true }}
onChange={onChangeParams}
defaultChecked={'roundClock'}
/>
<div style={{ height: '1200px' }}>
<HistoryInfo
title={'指标曲线'}
columns={columns}
dataSource={data}
chartOptions={{ series }}
tableProps={{ bordered: true }}
onChange={onChangeParams}
// defaultChecked={'fourHour'}
/>
</div>
);
};
......
import React, { useContext, useState, useReducer, useEffect } from 'react';
import React, { useContext, useState, useReducer, useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Highcharts from 'highcharts/highstock';
......@@ -7,7 +7,7 @@ import { Tabs, Select, Radio, Checkbox, ConfigProvider, DatePicker } from 'antd'
import { PlusCircleOutlined } from '@ant-design/icons';
import TimeRangePicker from '@wisdom-components/timerangepicker';
import BasicTable from '@wisdom-components/basictable';
import Empty from '@wisdom-components/Empty';
import Empty from '@wisdom-components/empty';
import moment from 'moment';
import './index.less';
......@@ -115,10 +115,16 @@ const HistoryInfo = (props) => {
const [state, dispatch] = useReducer(reducer, initialState);
const container = useRef(null);
useEffect(() => {
onChange(state);
}, [state]);
useEffect(() => {
dispatch({ type: UPDATE_TIME.UPDATE_TIME, payload: props.defaultChecked });
}, [props.defaultChecked]);
// 时间设置切换(自定义/同期对比)
const onTimeSetChange = (e) => {
setTimeValue(e.target.value);
......@@ -390,6 +396,15 @@ const HistoryInfo = (props) => {
};
}
if (container.current) {
Highcharts.setOptions({
chart: {
width: container.current.offsetWidth,
height: container.current.offsetHeight - 10,
},
});
}
return options;
};
......@@ -462,13 +477,14 @@ const HistoryInfo = (props) => {
{renderOptions(item)}
{!dataSource.length && <Empty />}
{!!dataSource.length && (
<div>
<div style={{ flex: 1 }} ref={container}>
{item.key === 'curve' && (
<HighchartsReact
immutable={true}
highcharts={Highcharts}
constructorType={'stockChart'}
options={handleChartOptions()}
allowChartUpdate={true}
/>
)}
{item.key === 'table' && (
......
......@@ -2,7 +2,17 @@
@history-info-prefix-cls: ~'@{ant-prefix}-history-info';
.@{history-info-prefix-cls} {
height: 100%;
.ant-tabs,
.ant-tabs-content {
height: 100%;
}
&-content {
display: flex;
flex-direction: column;
height: 100%;
padding: 10px 0 0 0;
}
......
......@@ -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.3.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.8...@wisdom-components/imageselect@1.3.9) (2021-04-22)
### Bug Fixes
- update package ([f0b3401](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b34012654a1a9af9d20f72589b78671cb231a0))
## [1.3.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.5...@wisdom-components/imageselect@1.3.8) (2021-04-20)
### Bug Fixes
......
# `@wisdom-components/ImageSelect`
# `@wisdom-components/imageselect`
> TODO: description
## Usage
```
const imageselect = require('@wisdom-components/ImageSelect');
const imageselect = require('@wisdom-components/imageselect');
// TODO: DEMONSTRATE API
```
{
"name": "@wisdom-components/imageselect",
"version": "1.3.8",
"version": "1.3.9",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -2,7 +2,7 @@ import React, { useContext, useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Input, Image, Modal, Row, Col, ConfigProvider } from 'antd';
import Empty from '@wisdom-components/Empty';
import Empty from '@wisdom-components/empty';
import { PlusOutlined, SearchOutlined } from '@ant-design/icons';
import './index.less';
......
# `@wisdom-components/MqttView`
# `@wisdom-components/mqttview`
> TODO: description
## Usage
```
const mqttView = require('@wisdom-components/MqttView');
const mqttView = require('@wisdom-components/mqttview');
// TODO: DEMONSTRATE API
```
......@@ -2,6 +2,25 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.7.2...@wisdom-components/quotaselect@1.7.5) (2021-04-22)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
- update package ([f0b3401](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b34012654a1a9af9d20f72589b78671cb231a0))
## [1.7.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.7.2...@wisdom-components/quotaselect@1.7.4) (2021-04-22)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.7.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.7.2...@wisdom-components/quotaselect@1.7.3) (2021-04-21)
### Bug Fixes
- bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.7.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.6.0...@wisdom-components/quotaselect@1.7.2) (2021-04-20)
### Bug Fixes
......
# `@wisdom-components/QuotaSelect`
# `@wisdom-components/quotaselect`
> TODO: description
## Usage
```
const quotaselect = require('@wisdom-components/QuotaSelect');
const quotaselect = require('@wisdom-components/quotaselect');
// TODO: DEMONSTRATE API
```
{
"name": "@wisdom-components/quotaselect",
"version": "1.7.2",
"version": "1.7.5",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -19,6 +19,16 @@ const Demo = () => {
.then(function (response) {
if (response.code == '0') {
let curData = response.data;
curData.forEach((item) => {
item.decimalBit = item.DecimalBit;
item.deviation = item.Deviation;
item.format = item.Format;
item.isShow = item.IsShow;
item.name = item.Name;
item.style = item.Style;
item.type = item.Type;
item.unit = item.Unit;
});
setQuotaList(curData);
}
})
......
......@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Button, Input, Radio, Modal, Checkbox, Row, Col, Tree, ConfigProvider } from 'antd';
import Empty from '@wisdom-components/Empty';
import Empty from '@wisdom-components/empty';
import { ExclamationCircleFilled, SearchOutlined, CloseOutlined } from '@ant-design/icons';
import './index.less';
......@@ -40,8 +40,8 @@ const QuotaSelect = ({
let data = dataSource.map((item) => ({
...item,
checked: false,
title: item.Name,
key: item.Name,
title: item.name,
key: item.name,
}));
setAllQuotaList(data);
}
......@@ -71,7 +71,7 @@ const QuotaSelect = ({
// 过滤重点指标
const filterEmphasisQuota = () => {
let newQuotaList = [...allQuotaList];
newQuotaList = newQuotaList.filter((item) => item.IsShow === '1');
newQuotaList = newQuotaList.filter((item) => item.isShow === '1');
setQuotaList(newQuotaList);
};
......@@ -111,7 +111,7 @@ const QuotaSelect = ({
if (e.target.value !== '') {
let newQuotaList = [];
quotaList.forEach((item) => {
if (item.Name.indexOf(e.target.value) > -1) newQuotaList.push(item);
if (item.name.indexOf(e.target.value) > -1) newQuotaList.push(item);
});
setQuotaList(newQuotaList);
} else {
......
# `@wisdom-components/RealTimeInfo`
# `@wisdom-components/realtimeinfo`
> TODO: description
## Usage
```
const realtimeinfo = require('@wisdom-components/RealTimeInfo');
const realtimeinfo = require('@wisdom-components/realtimeinfo');
// TODO: DEMONSTRATE API
```
# `@wisdom-components/TimeRangePicker`
# `@wisdom-components/timerangepicker`
> TODO: description
## Usage
```
const timeRangePicker = require('@wisdom-components/TimeRangePicker');
const timeRangePicker = require('@wisdom-components/timerangepicker');
// TODO: DEMONSTRATE API
```
......@@ -19,4 +19,4 @@ pkgList.map(async (path) => {
const distPath = `${join(__dirname, '../', 'packages', path, 'dist', `${path}.less`)}`;
fs.writeFileSync(distPath, importFiles.join('\n'));
});
\ No newline at end of file
});
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