Commit 348636d6 by zhaochengxiang

岗位关联服务,增加统计

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