Commit 91692510 authored by 徐乐's avatar 徐乐

feat: 修改

parent bb203f71
...@@ -110,22 +110,29 @@ const RealTimeInfo = (props) => { ...@@ -110,22 +110,29 @@ const RealTimeInfo = (props) => {
}; };
const getData = () => { const getData = () => {
// const deviceType = const deviceType = '';
// deviceParams.length > 0 if (infoData) {
// ? Array.from(new Set(deviceParams.map((item) => item.deviceType))).join(',') let devices = [infoData.aName];
// : '二供泵房,二供机组'; infoData.child?.forEach(function (val) {
const deviceType = [infoData.aName]; let k = devices.find(function (a) { return a == val.aName });
infoData.child?.forEach(function (val) { if (!k) {
let k = deviceType.find(function (a) { return a == val.aName }); devices.push(val.aName);
if (!k) { }
deviceType.push(val.aName); })
} deviceType = devices.join(',');
}) } else {
deviceType =
deviceParams.length > 0
? Array.from(new Set(deviceParams.map((item) => item.deviceType))).join(',')
: '二供泵房,二供机组';
}
const configReq = getMonitorConfig({ const configReq = getMonitorConfig({
params: { params: {
user, user,
showAll: true, showAll: true,
deviceType: deviceType.join(','), deviceType: deviceType,
}, },
}); });
const sensorReq = getSensorType(); const sensorReq = getSensorType();
......
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