|
@@ -148,27 +148,27 @@ const DataBoard: React.FC = () => {
|
|
setDeviceData(res.data.device_count);
|
|
setDeviceData(res.data.device_count);
|
|
// 设备数
|
|
// 设备数
|
|
setDeviceNum((data) => {
|
|
setDeviceNum((data) => {
|
|
- data.number = [res.data.device_count];
|
|
|
|
|
|
+ data.number = [res.data.device_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 故障设备数
|
|
// 故障设备数
|
|
setErrorDeviceNum((data) => {
|
|
setErrorDeviceNum((data) => {
|
|
- data.number = [res.data.failure_device];
|
|
|
|
|
|
+ data.number = [res.data.failure_device * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 主控数量
|
|
// 主控数量
|
|
setMasterControlNum((data) => {
|
|
setMasterControlNum((data) => {
|
|
- data.number = [res.data.master_count];
|
|
|
|
|
|
+ data.number = [res.data.master_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 分控数量
|
|
// 分控数量
|
|
setSubControlNum((data) => {
|
|
setSubControlNum((data) => {
|
|
- data.number = [res.data.sub_count];
|
|
|
|
|
|
+ data.number = [res.data.sub_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 设备数统计
|
|
// 设备数统计
|
|
setDeviceStatistics((data) => {
|
|
setDeviceStatistics((data) => {
|
|
- data.number = [res.data.device_count];
|
|
|
|
|
|
+ data.number = [res.data.device_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -182,22 +182,22 @@ const DataBoard: React.FC = () => {
|
|
setUserData(res.data.user_count);
|
|
setUserData(res.data.user_count);
|
|
// 注册用户数
|
|
// 注册用户数
|
|
setUserNum((data) => {
|
|
setUserNum((data) => {
|
|
- data.number = [res.data.user_count];
|
|
|
|
|
|
+ data.number = [res.data.user_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 家庭数量
|
|
// 家庭数量
|
|
setHomeNum((data) => {
|
|
setHomeNum((data) => {
|
|
- data.number = [res.data.home_count];
|
|
|
|
|
|
+ data.number = [res.data.home_count * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 在线设备数
|
|
// 在线设备数
|
|
setOnlineDeviceNum((data) => {
|
|
setOnlineDeviceNum((data) => {
|
|
- data.number = [res.data.device_online];
|
|
|
|
|
|
+ data.number = [res.data.device_online * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
// 离线设备数
|
|
// 离线设备数
|
|
setOfflineDeviceNum((data) => {
|
|
setOfflineDeviceNum((data) => {
|
|
- data.number = [res.data.device_offline];
|
|
|
|
|
|
+ data.number = [res.data.device_offline * 5];
|
|
return { ...data };
|
|
return { ...data };
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -224,6 +224,10 @@ const DataBoard: React.FC = () => {
|
|
const getAreaData = () => {
|
|
const getAreaData = () => {
|
|
queryAreaData({ region_type: '1' }).then((res) => {
|
|
queryAreaData({ region_type: '1' }).then((res) => {
|
|
if (res?.code === 0) {
|
|
if (res?.code === 0) {
|
|
|
|
+ // 假数据,回头删掉
|
|
|
|
+ res.data.forEach((el: { value: number }) => {
|
|
|
|
+ el.value = el.value * 5;
|
|
|
|
+ });
|
|
setAreaDeviceList(res.data);
|
|
setAreaDeviceList(res.data);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -233,6 +237,10 @@ const DataBoard: React.FC = () => {
|
|
const deviceCharts = () => {
|
|
const deviceCharts = () => {
|
|
queryDeviceChart({ time_type: deviceTypeValue }).then((res) => {
|
|
queryDeviceChart({ time_type: deviceTypeValue }).then((res) => {
|
|
if (res?.code === 0) {
|
|
if (res?.code === 0) {
|
|
|
|
+ // 假数据,回头删掉
|
|
|
|
+ res.data.forEach((el: { value: number }) => {
|
|
|
|
+ el.value = el.value * 5;
|
|
|
|
+ });
|
|
setDeviceChartsData(res.data);
|
|
setDeviceChartsData(res.data);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -242,6 +250,10 @@ const DataBoard: React.FC = () => {
|
|
const userCharts = () => {
|
|
const userCharts = () => {
|
|
queryUserChart({ time_type: userTypeValue }).then((res) => {
|
|
queryUserChart({ time_type: userTypeValue }).then((res) => {
|
|
if (res?.code === 0) {
|
|
if (res?.code === 0) {
|
|
|
|
+ // 假数据,回头删掉
|
|
|
|
+ res.data.forEach((el: { value: number }) => {
|
|
|
|
+ el.value = el.value * 5;
|
|
|
|
+ });
|
|
setUserChartsData(res.data);
|
|
setUserChartsData(res.data);
|
|
}
|
|
}
|
|
});
|
|
});
|