|
|
@@ -64,10 +64,9 @@
|
|
|
suspectedNum: 0, // 疑似隐蔽工作面数量
|
|
|
vaOverLimitNum: 0, // 风速超限异常数量
|
|
|
m3LackNum: 0, // 风量不足异常数量
|
|
|
- // m3NotClosedNum: 0, // 风量不闭合异常数量
|
|
|
disconnectNum: [] as any[], // 数据掉线点列表
|
|
|
enforceOffices: null, // 执法处判识情况列表
|
|
|
- windClosedStats: [] as any[], // 风量闭合/风量异常饼图统计(getMineData)
|
|
|
+ windClosedStats: [] as any[], // 风量异常饼图统计(getMineData)
|
|
|
hiddenWorkfaces: [] as any[], // 疑似隐蔽工作面列表
|
|
|
});
|
|
|
|
|
|
@@ -80,14 +79,12 @@
|
|
|
suspectedNum: 0,
|
|
|
vaOverLimitNum: 0,
|
|
|
m3LackNum: 0,
|
|
|
- // m3NotClosedNum: 0,
|
|
|
disconnectNum: [] as any[],
|
|
|
pointRecords: [] as any[], // 测风点实时数据
|
|
|
identifyData: {
|
|
|
// 判识结果数据(对接 getMineData → Mine 记录)
|
|
|
conclusion: '正常',
|
|
|
m3Exception: 0, // 风量异常数
|
|
|
- m3Closed: '数据不足', // 风量闭合
|
|
|
mineAreaCount: 0, // 测风地点数
|
|
|
windrectCount: 0, // 测风装置数
|
|
|
},
|
|
|
@@ -97,7 +94,6 @@
|
|
|
// WindrectData.status:1正常、0已删除
|
|
|
const windrectStatusMap: Record<string, string> = { '1': '正常', '0': '已删除' };
|
|
|
const judgeResultMap: Record<string, string> = { '0': '数据不足', '1': '疑似', '2': '正常' };
|
|
|
- const m3ClosedMap: Record<string, string> = { '0': '数据不足', /* '1': '不闭合', */ '2': '闭合' };
|
|
|
|
|
|
/** WindrectData 分页记录 → 首页风速风量传感器表格行 */
|
|
|
function mapWindrectRecords(records: any[]) {
|
|
|
@@ -119,21 +115,16 @@
|
|
|
mineName: r.mineName,
|
|
|
parentArea: r.parentArea,
|
|
|
judgeResult: judgeResultMap[String(r.judgeResult)] ?? '-',
|
|
|
- m3Closed: m3ClosedMap[String(r.m3Closed)] ?? '-',
|
|
|
m3Exception: r.m3Exception ?? '-',
|
|
|
lastCdssTime: r.lastCdssTime,
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
- /** Mine 分页记录 → 风量闭合/风量异常饼图统计(闭合矿井数 m3Closed==2;风量异常矿井数 m3Exception>0) */
|
|
|
+ /** Mine 分页记录 → 风量异常饼图统计(风量异常矿井数 m3Exception>0) */
|
|
|
function countWindClosedStats(records: any[]) {
|
|
|
const list = records || [];
|
|
|
- const closedNum = list.filter((r) => Number(r.m3Closed) === 2).length;
|
|
|
const exceptionNum = list.filter((r) => Number(r.m3Exception) > 0).length;
|
|
|
- return [
|
|
|
- { name: '风量闭合', value: closedNum },
|
|
|
- { name: '风量异常', value: exceptionNum },
|
|
|
- ];
|
|
|
+ return [{ name: '风量异常', value: exceptionNum }];
|
|
|
}
|
|
|
|
|
|
async function fetchHomeData() {
|
|
|
@@ -152,7 +143,7 @@
|
|
|
console.error('执法处判识情况获取失败:', e);
|
|
|
return null;
|
|
|
}),
|
|
|
- // 一次 getMineData 同时派生:左下角饼图(风量闭合/风量异常)+ 右下角疑似隐蔽工作面表格
|
|
|
+ // 一次 getMineData 同时派生:左下角饼图(风量异常)+ 右下角疑似隐蔽工作面表格
|
|
|
getMineData({ deptId, pageNo: 1, pageSize: 100 })
|
|
|
.then((r) => {
|
|
|
const records = r?.records || [];
|
|
|
@@ -162,7 +153,7 @@
|
|
|
};
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
- console.error('隐蔽工作面/风量闭合风量异常数据获取失败:', e);
|
|
|
+ console.error('隐蔽工作面/风量异常数据获取失败:', e);
|
|
|
return { windClosedStats: [], hiddenWorkfaces: [] };
|
|
|
}),
|
|
|
]);
|
|
|
@@ -175,7 +166,6 @@
|
|
|
suspectedNum: statistics.suspectedNum ?? 0,
|
|
|
vaOverLimitNum: statistics.vaOverLimitNum ?? 0,
|
|
|
m3LackNum: statistics.m3LackNum ?? 0,
|
|
|
- // m3NotClosedNum: statistics.m3NotClosedNum ?? 0,
|
|
|
disconnectNum: Array.isArray(statistics.disconnectNum) ? statistics.disconnectNum : [],
|
|
|
enforceOffices: judgeList,
|
|
|
windClosedStats: mineStats.windClosedStats,
|
|
|
@@ -205,14 +195,13 @@
|
|
|
return {
|
|
|
conclusion: judgeResultMap[String(mine.judgeResult)] ?? '数据不足',
|
|
|
m3Exception: mine.m3Exception ?? 0,
|
|
|
- m3Closed: m3ClosedMap[String(mine.m3Closed)] ?? '数据不足',
|
|
|
mineAreaCount: Array.isArray(mine.mineAreaList) ? mine.mineAreaList.length : 0,
|
|
|
windrectCount: Array.isArray(mine.windrectList) ? mine.windrectList.length : 0,
|
|
|
};
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
console.error('判识结果获取失败:', e);
|
|
|
- return { conclusion: '正常', m3Exception: 0, m3Closed: '数据不足', mineAreaCount: 0, windrectCount: 0 };
|
|
|
+ return { conclusion: '正常', m3Exception: 0, mineAreaCount: 0, windrectCount: 0 };
|
|
|
}),
|
|
|
|
|
|
getWindrectData({ deptId, pageNo: 1, pageSize: 20 })
|
|
|
@@ -231,10 +220,9 @@
|
|
|
suspectedNum: statistics.suspectedNum ?? 0,
|
|
|
vaOverLimitNum: statistics.vaOverLimitNum ?? 0,
|
|
|
m3LackNum: statistics.m3LackNum ?? 0,
|
|
|
- // m3NotClosedNum: statistics.m3NotClosedNum ?? 0,
|
|
|
disconnectNum: Array.isArray(statistics.disconnectNum) ? statistics.disconnectNum : [],
|
|
|
pointRecords: windrectPage,
|
|
|
- identifyData: identifyResult || { conclusion: '正常', m3Exception: 0, m3Closed: '数据不足', mineAreaCount: 0, windrectCount: 0 },
|
|
|
+ identifyData: identifyResult || { conclusion: '正常', m3Exception: 0, mineAreaCount: 0, windrectCount: 0 },
|
|
|
};
|
|
|
updateData(mineData.value);
|
|
|
} catch (error) {
|