Commit 4a7ee3a4 authored by 陈龙's avatar 陈龙

feat: 优化

parent 891d79f3
...@@ -40,7 +40,7 @@ path: / ...@@ -40,7 +40,7 @@ path: /
## 多图表 ## 多图表
[//]: # (<code src="./demos/GridDemo.js"></code>) <code src="./demos/GridDemo.js"></code>
## API ## API
......
...@@ -8,7 +8,7 @@ const deviceParams = [ ...@@ -8,7 +8,7 @@ const deviceParams = [
deviceType: '二供泵房', deviceType: '二供泵房',
pointAddressID: 4, pointAddressID: 4,
}, },
{ /* {
deviceCode: 'EGBF00000137', deviceCode: 'EGBF00000137',
sensors: '进水压力,出水瞬时流量,出水累计流量', sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房', deviceType: '二供泵房',
...@@ -20,7 +20,7 @@ const deviceParams = [ ...@@ -20,7 +20,7 @@ const deviceParams = [
sensors: '进水压力,出水瞬时流量,出水累计流量', sensors: '进水压力,出水瞬时流量,出水累计流量',
deviceType: '二供泵房', deviceType: '二供泵房',
pointAddressID: 4, pointAddressID: 4,
}, },*/
]; ];
/*const deviceParams = [ /*const deviceParams = [
{ {
......
...@@ -82,7 +82,7 @@ const deviceParams = [ ...@@ -82,7 +82,7 @@ const deviceParams = [
"deviceType": "加矾间" "deviceType": "加矾间"
}, */ }, */
{ /* {
"deviceCode": "QSBF00000001", "deviceCode": "QSBF00000001",
"sensors": "取水浊度", "sensors": "取水浊度",
"deviceType": "取水泵房" "deviceType": "取水泵房"
...@@ -101,7 +101,7 @@ const deviceParams = [ ...@@ -101,7 +101,7 @@ const deviceParams = [
"deviceCode": "LLJ00000001", "deviceCode": "LLJ00000001",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "流量计" "deviceType": "流量计"
}, },*/
/* { /* {
deviceCode: 'EGJZ00000027', deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率', sensors: '2#变频器运行频率',
...@@ -127,6 +127,12 @@ const deviceParams = [ ...@@ -127,6 +127,12 @@ const deviceParams = [
"sensors": "pH", "sensors": "pH",
"deviceType": "水质监测仪" "deviceType": "水质监测仪"
}*/ }*/
// 滦州
{
"deviceCode": "XMSB00000015",
"sensors": "今日出水量",
"deviceType": "熊猫水表"
}
]; ];
const Demo = () => { const Demo = () => {
......
...@@ -755,7 +755,7 @@ const HistoryView = (props) => { ...@@ -755,7 +755,7 @@ const HistoryView = (props) => {
) : ( ) : (
'' ''
)} )}
{isChart && isSingle && showBoxOption && !isStatus ? ( {isChart && isSingle && showBoxOption && !isStatus && !grid ? (
<> <>
{lineDataType !== '原始曲线' ? ( {lineDataType !== '原始曲线' ? (
<> <>
......
...@@ -1143,9 +1143,12 @@ const optionGenerator = ( ...@@ -1143,9 +1143,12 @@ const optionGenerator = (
} }
// 单曲线需要标记最大值、最小值的情况下,需要增加自定义的series,将最大最小值显示在图表上 // 单曲线需要标记最大值、最小值的情况下,需要增加自定义的series,将最大最小值显示在图表上
if (dataSource?.[0]?.dataModel?.length && chartType === 'lineChart') { if (dataSource?.[0]?.dataModel?.length && chartType === 'lineChart') {
let _dataSource = dataSource?.filter(item => item.pv);
if (_dataSource?.length) {
let _customSeries = returnCustomSeries(dataSource); let _customSeries = returnCustomSeries(dataSource);
series.push(_customSeries); series.push(_customSeries);
} }
}
} else { } else {
tooltip = tooltipAccessor( tooltip = tooltipAccessor(
series.map((item) => item.unit), series.map((item) => item.unit),
......
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