Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
bbd74775
Commit
bbd74775
authored
Nov 01, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化箱线图的显示
parent
ed7a0f01
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
55 deletions
+77
-55
EC_HistoryView.md
...es/extend-components/EC_HistoryView/src/EC_HistoryView.md
+4
-3
index.js
packages/extend-components/EC_HistoryView/src/demos/index.js
+67
-50
index.js
packages/extend-components/EC_HistoryView/src/index.js
+6
-2
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+0
-0
No files found.
packages/extend-components/EC_HistoryView/src/EC_HistoryView.md
View file @
bbd74775
...
...
@@ -22,15 +22,16 @@ path: /
## 单图表
<
code
src=
"./demos/index.js"
></code
>
<
!-- <code src="./demos/index.js"></code>
--
>
## 单图表-状态
[
//
]:
#
'<code src="./demos/indexForStatus.js"></code>'
<!-- <code src="./demos/indexForStatus.js"></code>
-->
## 单图表-频率
[
//
]:
#
'<code src="./demos/indexForFrequency.js"></code>'
<code src="./demos/indexForFrequency.js"></code>
[
//
]:
#
'## 移动端'
[
//
]:
#
'<code src="./demos/mobile.js"></code>'
...
...
packages/extend-components/EC_HistoryView/src/demos/index.js
View file @
bbd74775
...
...
@@ -4,73 +4,79 @@ import { MobileHistoryChart } from '../mobile';
const
deviceParams
=
[
/*10.182*/
/*
{
/*
{
"deviceCode": "EGBF00000136",
// "sensors": "进水压力,出水压力,出水瞬时流量,今日供水量,1#水箱液位,视频报警",
"sensors": "视频报警",
"sensors": "进水压力",
// "sensors": "视频报警",
"deviceType": "二供泵房"
},
*/
/*
{
},*/
/*
{
"deviceCode": "EGJZ00000158",
// "sensors": "进水压力,出水压力,泵1状态",
"sensors": "进水压力",
// "sensors": "泵1状态",
"deviceType": "二供机组"
}
*/
/*
{
}*/
/*
{
deviceCode: 'EGBF00000141',
// sensors: '进水压力,出水瞬时流量,出水累计流量',
sensors: '进水压力',
deviceType: '熊猫二供泵房',
pointAddressID: 208,
},*/
/* {
"deviceCode": "SYJ00000008",
"sensors": "瞬时流量",
"deviceType": "水源井"
},*/
/* {
deviceCode: 'EGJZ00000197',
sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
// sensors: '1#变频器运行频率',
/* {
"deviceCode": "SYJ00000008",
"sensors": "瞬时流量",
"deviceType": "水源井"
},*/
/* {
deviceCode: 'EGJZ00000197',
// sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
sensors: '1#变频器运行频率',
deviceType: '二供机组',
// pointAddressID: 208,
}, */
/* {
deviceCode: 'EGJZ00000198',
// sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
sensors: '1#变频器运行频率',
deviceType: '二供机组',
// pointAddressID: 208,
}, */
/* {
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018',
// deviceCode: 'XMYL00000345',
// deviceCode: 'XMYL00000000',
deviceCode: 'EGBF00000014',
// sensors: '今日供水量,今日用电量,1#水箱液位',
sensors: '进水压力',
deviceType: '熊猫压力表',
pointAddressID: 4,
},*/
/* {
deviceCode: 'EGJZ00000198',
sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
// sensors: '1#变频器运行频率',
deviceType: '二供机组',
// pointAddressID: 208,
}, */
/* {
// deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018',
// deviceCode: 'XMYL00000345',
// deviceCode: 'XMYL00000000',
deviceCode: 'EGBF00000014',
// sensors: '今日供水量,今日用电量,1#水箱液位',
sensors: '进水压力',
deviceType: '熊猫压力表',
pointAddressID: 4,
},*/
/* {
deviceCode: 'EGJZ00000226',
sensors: '出水压力',
deviceType: '二供机组',
pointAddressID: 4,
}, */
/* {
"deviceCode": "LLJ00000055",
"sensors": "正累计流量,瞬时流量",
"deviceType": "流量计"
}*/
/* {
"deviceCode": "EGJZ00000163",
"sensors": "进水压力",
"deviceType": "二供机组"
/* {
deviceCode: 'EGJZ00000226',
sensors: '出水压力',
deviceType: '二供机组',
pointAddressID: 4,
}, */
/* {
"deviceCode": "LLJ00000055",
"sensors": "正累计流量,瞬时流量",
"deviceType": "流量计"
}*/
/* {
"deviceCode": "EGJZ00000163",
"sensors": "进水压力",
"deviceType": "二供机组"
}*/
// 邳州张楼水厂
/* {
"deviceCode": "LLJ00000001",
"sensors": "瞬时流量",
"deviceType": "流量计"
} */
/* {
"deviceCode": "SC00000023",
"sensors": "瞬时流量",
...
...
@@ -102,6 +108,11 @@ const deviceParams = [
"sensors": "瞬时流量",
"deviceType": "流量计"
},*/
/* {
"deviceCode": "LLJ00000001",
"sensors": "瞬时流量",
"deviceType": "流量计"
}*/
/* {
deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率',
...
...
@@ -133,11 +144,17 @@ const deviceParams = [
"sensors": "今日出水量",
"deviceType": "熊猫水表"
} */
{
/*
{
deviceCode: 'SYJ00000003',
sensors: '站点在线状态',
deviceType: '水源井',
},
}, */
{
"deviceCode"
:
"SSB00000005"
,
"sensors"
:
"频率,站点在线状态"
,
"deviceType"
:
"送水泵"
}
];
const
Demo
=
()
=>
{
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
bbd74775
/**
* 走influxdb版本的,不抽稀通过zoom和unit传空字符串实现;
* 非influxdb版本的接口,使用isDilute=false实现;
* 建议:不抽稀的时候,传isDilute=false&zoom=''&unit=''
* */
import
React
,
{
useContext
,
useEffect
,
useMemo
,
useState
,
useCallback
,
useRef
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
classNames
from
'classnames'
;
...
...
@@ -24,7 +29,6 @@ import moment from 'moment';
import
_
from
'lodash'
;
import
TimeRangePicker
from
'@wisdom-components/timerangepicker'
;
import
PandaEmpty
from
'@wisdom-components/empty'
;
import
BasicTable
from
'@wisdom-components/basictable'
;
import
{
getHistoryInfo
,
getDeviceAlarmScheme
,
...
...
@@ -1131,7 +1135,7 @@ const HistoryView = (props) => {
*/
d
.
dataModel
=
d
.
dataModel
.
map
((
item
)
=>
{
let
{
firstPV
,
lastPV
,
maxPV
,
minPV
,
pv
}
=
item
;
if
(
firstPV
===
null
&&
lastPV
===
null
&&
maxPV
===
null
&&
minPV
===
null
)
{
if
(
pv
!==
null
&&
firstPV
===
null
&&
lastPV
===
null
&&
maxPV
===
null
&&
minPV
===
null
)
{
firstPV
=
pv
;
lastPV
=
pv
;
maxPV
=
pv
;
...
...
packages/extend-components/EC_HistoryView/src/utils.js
View file @
bbd74775
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment