Commit f23d3a78 authored by 陈龙's avatar 陈龙

feat: 优化历史曲线时间选择器;优化数据加载

parent a383e3fa
......@@ -26,16 +26,16 @@ path: /
## 单图表-状态
<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>'
## 多图表
[//]: # (## 多图表)
[//]: # (<code src="./demos/GridDemo.js"></code>)
......@@ -52,6 +52,19 @@ path: /
| deviceParams | 设备参数信息 | array | - | - |
| needMarkLine | 是否添加报警标识线 | boolean | true | |
## 字典配置
```text
数据字典中,根据需要配置以下条目
组件_ec_historyview
- 曲线居中 true/false
- 数据滤波 true/false
- 日期模式 常规模式/简易模式
- 离散算法设备类型 水厂,二供泵房
曲线居中、数据滤波,默认是否勾选;
日期模式下,常规模式时间格式为 YYYY-MM-DD HH:mm,简易模式时间格式为YYYY-MM-DD;
离散算法设备类型,适用于数据起伏较大的设备类型,根据实际场景,配置设备类型即可
```
### deviceParams
```javascript
......
......@@ -59,7 +59,20 @@ export function getDictionaryInfoAll(params) {
params
})
}
export function searchDataDictionaryList (params) {
return request({
url: `${baseUrl}/PandaOMS/OMS/DataManger/SearchDataDictionaryList`,
method: REQUEST_METHOD_GET,
params
})
}
export function getDataDictionaryList (params) {
return request({
url: `${baseUrl}/PandaOMS/OMS/DataManger/GetDataDictionaryList`,
method: REQUEST_METHOD_GET,
params
})
}
export function getSensorType() {
return request({
url: `${baseUrl}/PandaMonitor/Monitor/Sensor/GetSensorType`,
......
......@@ -95,14 +95,9 @@ import HistoryView from '../index';
];*/
const deviceParams = [
{
"deviceCode": "EGJZ00000002",
"sensors": "出水实际压力,1#水箱液位",
"deviceType": "二供机组"
},
{
"deviceCode": "EGBF00000004",
"sensors": "今日用电量,今日供水量",
"deviceType": "二供泵房"
"deviceCode": "SZJCY00000001",
"sensors": "温度,压力,浊度,二氧化氯",
"deviceType": "水质监测仪"
}
]
const Demo = () => {
......
......@@ -2,10 +2,15 @@ import React from 'react';
import HistoryView from '../index';
const deviceParams = [
/* {
"deviceCode": "EGBF00000022",
"sensors": "出水瞬时流量,今日用电量,余氯",
"deviceType": "二供泵房"
}*/
{
"deviceCode": "EGBF00000022",
"sensors": "出水瞬时流量,今日用电量,余氯",
"deviceType": "二供泵房"
"deviceCode": "SZJCY00000006",
"sensors": "浊度",
"deviceType": "水质监测仪"
}
]
const Demo = () => {
......@@ -13,8 +18,8 @@ const Demo = () => {
<>
<div>
<div style={{height: 700}}>
{/*<HistoryView deviceParams={deviceParams} defaultModel="curve" />*/}
<HistoryView theme={'BI'} deviceParams={deviceParams} defaultModel="curve"/>
<HistoryView deviceParams={deviceParams} defaultModel="curve"/>
{/*<HistoryView theme={'BI'} deviceParams={deviceParams} defaultModel="curve"/>*/}
</div>
</div>
</>
......
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