Commit 91692510 authored by 徐乐's avatar 徐乐

feat: 修改

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