Commit 348636d6 by zhaochengxiang

岗位关联服务,增加统计

parent 60c0b690
......@@ -75,9 +75,9 @@ const FC = (props) => {
if (g.status === -1) {
g.title = `${g.title}_已停用`
}
// if (countMap?.[g.id]!==undefined && countMap?.[g.id]!==null) {
// g.title = `${g.title} (${countMap[g.id]})`
// }
if (countMap?.[g.id]!==undefined && countMap?.[g.id]!==null) {
g.title = `${g.title} (${countMap[g.id]})`
}
g.children = [];
(g.subCatalogs??[]).forEach((child) => {
......@@ -173,12 +173,15 @@ const FC = (props) => {
let newData = {}
for (const key in (data||{})) {
let total = 0
const item = data[key]
for (const id in item) {
if (id === '4') {
total = total + item[id]??0
}
newData[key] = total
}
}
}
setCount(newData)
}
......
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