|
|
@ -15,7 +15,7 @@ let underColorList = [ |
|
|
|
"rgba(255,194,20,0.5)" |
|
|
|
] |
|
|
|
|
|
|
|
const type = ['culvert','', 'road', 'bridge'] |
|
|
|
const type = ['culvert', '', 'road', 'bridge'] |
|
|
|
|
|
|
|
const RightBottom = (props) => { |
|
|
|
const { roadMaintenances } = props |
|
|
@ -23,7 +23,7 @@ const RightBottom = (props) => { |
|
|
|
let typesNum = null |
|
|
|
const list = roadMaintenances?.reportCount?.map((r, index) => { |
|
|
|
totalData += Number(r.count) |
|
|
|
if (r.projectType === type[index]) { |
|
|
|
if (r.projectType === 'culvert' || 'road' || 'bridge') { |
|
|
|
typesNum += Number(r.count) |
|
|
|
} |
|
|
|
switch (r.projectType) { |
|
|
@ -41,12 +41,16 @@ const RightBottom = (props) => { |
|
|
|
return { |
|
|
|
name: '桥梁', |
|
|
|
value: r.count |
|
|
|
} |
|
|
|
}; |
|
|
|
case '其他': |
|
|
|
return { |
|
|
|
name: '其他', |
|
|
|
value: r.count |
|
|
|
}; |
|
|
|
} |
|
|
|
}).filter(f => f !== undefined) |
|
|
|
const otherNum = totalData - typesNum |
|
|
|
console.log(); |
|
|
|
otherNum !== null && list?.push({ name: '其他', value: otherNum }) |
|
|
|
// const otherNum = totalData - typesNum
|
|
|
|
// otherNum !== null && list?.push({ name: '其他', value: otherNum })
|
|
|
|
const style = { height: "31%", marginTop: "3%" } |
|
|
|
return ( |
|
|
|
<> |
|
|
|