Commit 0d572f8b authored by 陈龙's avatar 陈龙

fix: 修复预测曲线功能,在未获取到设备时增加参数导致数据请求异常的问题

parent f8cdee82
...@@ -2,55 +2,55 @@ import React from 'react'; ...@@ -2,55 +2,55 @@ import React from 'react';
import HistoryView from '../index'; import HistoryView from '../index';
import { MobileHistoryChart } from '../mobile'; import { MobileHistoryChart } from '../mobile';
const deviceParams = [ /*const deviceParams = [
/*10.182*/ /!*10.182*!/
/* { /!* {
"deviceCode": "EGBF00000136", "deviceCode": "EGBF00000136",
// "sensors": "进水压力,出水压力,出水瞬时流量,今日供水量,1#水箱液位,视频报警", // "sensors": "进水压力,出水压力,出水瞬时流量,今日供水量,1#水箱液位,视频报警",
"sensors": "进水压力", "sensors": "进水压力",
// "sensors": "视频报警", // "sensors": "视频报警",
"deviceType": "二供泵房" "deviceType": "二供泵房"
},*/ },*!/
/* { /!* {
"deviceCode": "EGJZ00000158", "deviceCode": "EGJZ00000158",
// "sensors": "进水压力,出水压力,泵1状态", // "sensors": "进水压力,出水压力,泵1状态",
"sensors": "进水压力", "sensors": "进水压力",
// "sensors": "泵1状态", // "sensors": "泵1状态",
"deviceType": "二供机组" "deviceType": "二供机组"
}*/ }*!/
/* { /!* {
deviceCode: 'EGBF00000141', deviceCode: 'EGBF00000141',
// sensors: '进水压力,出水瞬时流量,出水累计流量', // sensors: '进水压力,出水瞬时流量,出水累计流量',
sensors: '进水压力', sensors: '进水压力',
deviceType: '熊猫二供泵房', deviceType: '熊猫二供泵房',
pointAddressID: 208, pointAddressID: 208,
},*/ },*!/
/* { /!* {
"deviceCode": "SYJ00000008", "deviceCode": "SYJ00000008",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "水源井" "deviceType": "水源井"
},*/ },*!/
/* { /!* {
deviceCode: 'EGJZ00000197', deviceCode: 'EGJZ00000197',
sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量', sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
// sensors: '1#变频器运行频率', // sensors: '1#变频器运行频率',
deviceType: '二供机组', deviceType: '二供机组',
// pointAddressID: 208, // pointAddressID: 208,
},*/ },*!/
/* { /!* {
"deviceCode": "SC00000001", "deviceCode": "SC00000001",
// "sensors": "出厂瞬时流量1,1#清水池液位,2#清水池液位,今日供水量,出水压力1", // "sensors": "出厂瞬时流量1,1#清水池液位,2#清水池液位,今日供水量,出水压力1",
"sensors": "出厂瞬时流量1", "sensors": "出厂瞬时流量1",
"deviceType": "水厂" "deviceType": "水厂"
}*/ }*!/
/* { /!* {
deviceCode: 'EGJZ00000198', deviceCode: 'EGJZ00000198',
// sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量', // sensors: '进水压力,出水压力,出水瞬时流量,出水累计流量',
sensors: '1#变频器运行频率', sensors: '1#变频器运行频率',
deviceType: '二供机组', deviceType: '二供机组',
// pointAddressID: 208, // pointAddressID: 208,
}, */ }, *!/
/* { /!* {
// deviceCode: 'EGBF00000002', // deviceCode: 'EGBF00000002',
// deviceCode: 'EGBF00000018', // deviceCode: 'EGBF00000018',
// deviceCode: 'XMYL00000345', // deviceCode: 'XMYL00000345',
...@@ -60,30 +60,30 @@ const deviceParams = [ ...@@ -60,30 +60,30 @@ const deviceParams = [
sensors: '进水压力', sensors: '进水压力',
deviceType: '熊猫压力表', deviceType: '熊猫压力表',
pointAddressID: 4, pointAddressID: 4,
},*/ },*!/
/* { /!* {
deviceCode: 'EGJZ00000226', deviceCode: 'EGJZ00000226',
sensors: '出水压力', sensors: '出水压力',
deviceType: '二供机组', deviceType: '二供机组',
pointAddressID: 4, pointAddressID: 4,
}, */ }, *!/
/* { /!* {
"deviceCode": "LLJ00000055", "deviceCode": "LLJ00000055",
"sensors": "正累计流量,瞬时流量", "sensors": "正累计流量,瞬时流量",
"deviceType": "流量计" "deviceType": "流量计"
}*/ }*!/
/* { /!* {
"deviceCode": "EGJZ00000163", "deviceCode": "EGJZ00000163",
"sensors": "进水压力", "sensors": "进水压力",
"deviceType": "二供机组" "deviceType": "二供机组"
}*/ }*!/
// 邳州张楼水厂 // 邳州张楼水厂
/* { /!* {
"deviceCode": "LLJ00000001", "deviceCode": "LLJ00000001",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "流量计" "deviceType": "流量计"
} */ } *!/
/* { /!* {
"deviceCode": "SC00000023", "deviceCode": "SC00000023",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "水厂" "deviceType": "水厂"
...@@ -92,9 +92,9 @@ const deviceParams = [ ...@@ -92,9 +92,9 @@ const deviceParams = [
"deviceCode": "JFJ00000001", "deviceCode": "JFJ00000001",
"sensors": "沉淀池投矾量瞬时,", "sensors": "沉淀池投矾量瞬时,",
"deviceType": "加矾间" "deviceType": "加矾间"
}, */ }, *!/
/* { /!* {
"deviceCode": "QSBF00000001", "deviceCode": "QSBF00000001",
"sensors": "取水浊度", "sensors": "取水浊度",
"deviceType": "取水泵房" "deviceType": "取水泵房"
...@@ -113,84 +113,90 @@ const deviceParams = [ ...@@ -113,84 +113,90 @@ const deviceParams = [
"deviceCode": "LLJ00000001", "deviceCode": "LLJ00000001",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "流量计" "deviceType": "流量计"
},*/ },*!/
/* { /!* {
"deviceCode": "LLJ00000001", "deviceCode": "LLJ00000001",
"sensors": "瞬时流量", "sensors": "瞬时流量",
"deviceType": "流量计" "deviceType": "流量计"
}*/ }*!/
/* { /!* {
deviceCode: 'EGJZ00000027', deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率', sensors: '2#变频器运行频率',
deviceType: '二供机组', deviceType: '二供机组',
}, */ }, *!/
/*确山*/ /!*确山*!/
/*泵3状态*/ /!*泵3状态*!/
/* { /!* {
// EGJZ00000003 // EGJZ00000003
deviceCode: 'EGJZ00000003', deviceCode: 'EGJZ00000003',
// sensors: '3#频率', // sensors: '3#频率',
sensors: '出1累计流量', sensors: '出1累计流量',
deviceType: '二供机组', deviceType: '二供机组',
},*/ },*!/
/* { /!* {
"deviceCode": "EGBF00000006", "deviceCode": "EGBF00000006",
"sensors": "出1累计流量", "sensors": "出1累计流量",
"deviceType": "二供泵房" "deviceType": "二供泵房"
}*/ }*!/
// 永吉 // 永吉
/* { /!* {
"deviceCode": "SZJCY00000001", "deviceCode": "SZJCY00000001",
"sensors": "pH", "sensors": "pH",
"deviceType": "水质监测仪" "deviceType": "水质监测仪"
}*/ }*!/
// 滦州 // 滦州
/* { /!* {
"deviceCode": "XMSB00000015", "deviceCode": "XMSB00000015",
"sensors": "今日出水量", "sensors": "今日出水量",
"deviceType": "熊猫水表" "deviceType": "熊猫水表"
} */ } *!/
/* { /!* {
deviceCode: 'SYJ00000003', deviceCode: 'SYJ00000003',
sensors: '站点在线状态', sensors: '站点在线状态',
deviceType: '水源井', deviceType: '水源井',
}, */ }, *!/
/* { /!* {
"deviceCode": "SSB00000005", "deviceCode": "SSB00000005",
"sensors": "频率,站点在线状态", "sensors": "频率,站点在线状态",
"deviceType": "送水泵" "deviceType": "送水泵"
}*/ }*!/
/*界首*/ /!*界首*!/
/* { /!* {
"deviceCode": "SYJ00000022", "deviceCode": "SYJ00000022",
"sensors": "IC", "sensors": "IC",
"deviceType": "水源井" "deviceType": "水源井"
}*/ }*!/
/* { /!* {
"deviceCode": "JYJZ00000002", "deviceCode": "JYJZ00000002",
"sensors": "频率,泵1状态", "sensors": "频率,泵1状态",
"deviceType": "加压机组" "deviceType": "加压机组"
}*/ }*!/
/*铁山*/ /!*铁山*!/
/* { /!* {
"deviceCode": "SZ00000001", "deviceCode": "SZ00000001",
"deviceType": "水质", "deviceType": "水质",
"sensors": "PH,浑浊度,氨氮,总氮,总磷,溶解氧,水温,电导率,叶绿素a,藻密度,高锰酸盐指数" "sensors": "PH,浑浊度,氨氮,总氮,总磷,溶解氧,水温,电导率,叶绿素a,藻密度,高锰酸盐指数"
}*/ }*!/
/*邳州*/ /!*邳州*!/
/* { /!* {
"deviceCode": "TLC00000001", "deviceCode": "TLC00000001",
"sensors": "1号碳滤池浊度", "sensors": "1号碳滤池浊度",
"deviceType": "碳滤池" "deviceType": "碳滤池"
}*/ }*!/
/*邳州*/ /!*邳州*!/
{ {
"deviceCode": "SSBF00000001", "deviceCode": "SSBF00000001",
"sensors": "出水压力", "sensors": "出水压力",
"deviceType": "送水泵房" "deviceType": "送水泵房"
} }
]; ];*/
const deviceParams = [
{
"deviceCode": "YLB00000041",
"sensors": "进水压力",
"deviceType": "压力表"
}
]
const Demo = () => { const Demo = () => {
return ( return (
<> <>
......
...@@ -1436,7 +1436,7 @@ const HistoryView = (props) => { ...@@ -1436,7 +1436,7 @@ const HistoryView = (props) => {
setIsSingleStatusSensor(_isStatusSensor); setIsSingleStatusSensor(_isStatusSensor);
} }
// 单设备单曲线的设定加载 // 单设备单曲线的设定加载
if (_res3.code === 0) { if (_res3.code === 0 && _res3.data) {
setPredicateDevice({..._res3.data, deviceType: '预测'}); setPredicateDevice({..._res3.data, deviceType: '预测'});
} }
} }
......
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