|
@@ -114,7 +114,11 @@ function Detail(props) {
|
|
|
</Row>
|
|
|
<Row>
|
|
|
{result.map((item, index) => (
|
|
|
- <Col span={index == 0 ? 10 : 7} className={styles.cardText}>
|
|
|
+ <Col
|
|
|
+ span={index == 0 ? 10 : 7}
|
|
|
+ className={styles.cardText}
|
|
|
+ key={item.label}
|
|
|
+ >
|
|
|
{index == 0 && '自检结果:'}
|
|
|
{item.label}-
|
|
|
<span style={{ color: item.color }}>{item.value}</span>
|
|
@@ -128,7 +132,7 @@ function Detail(props) {
|
|
|
onChange={(check) => {
|
|
|
// 未勾选则认为全部显示
|
|
|
if (check.length == 0) {
|
|
|
- setStatusCheck([1, 2, 3]);
|
|
|
+ setStatusCheck([0, 1, 2]);
|
|
|
} else {
|
|
|
setStatusCheck(check);
|
|
|
}
|
|
@@ -186,7 +190,7 @@ function DeviceReport(props) {
|
|
|
|
|
|
// 子集全部隐藏的情况下,父级也隐藏
|
|
|
const show = useMemo(() => {
|
|
|
- let total = subStatus.reduce((item, total) => (total += item), 0);
|
|
|
+ let total = subStatus.reduce((item, total) => total + item, 0);
|
|
|
return total > 0;
|
|
|
}, [subStatus]);
|
|
|
|
|
@@ -257,7 +261,7 @@ function SecureReport(props) {
|
|
|
|
|
|
// 子集全部隐藏的情况下,父级也隐藏
|
|
|
const show = useMemo(() => {
|
|
|
- let total = subStatus.reduce((item, total) => (total += item), 0);
|
|
|
+ let total = subStatus.reduce((item, total) => total + item, 0);
|
|
|
return total > 0;
|
|
|
}, [subStatus]);
|
|
|
|
|
@@ -282,7 +286,7 @@ function SecureReport(props) {
|
|
|
});
|
|
|
useEffect(() => {
|
|
|
setDumuList(data?.dumuList);
|
|
|
- data?.dumuList?.map((item) => {
|
|
|
+ data?.dumuList?.forEach((item) => {
|
|
|
detailRun(item.id);
|
|
|
});
|
|
|
}, [data?.dumuList]);
|
|
@@ -353,8 +357,8 @@ function AalysisTable(props) {
|
|
|
if (record.fix_plan instanceof Array) {
|
|
|
return (
|
|
|
<div>
|
|
|
- {record.fix_plan.map((item) => (
|
|
|
- <div style={{ lineHeight: 1.8 }}>
|
|
|
+ {record.fix_plan.map((item, index) => (
|
|
|
+ <div style={{ lineHeight: 1.8 }} key={index}>
|
|
|
{item.content}
|
|
|
<MandateBtn relationId={record.id} />
|
|
|
</div>
|