Commit 2f32ff0f7717dc61c024de419ba0a0e483e09b4a
1 parent
43f709ab
1.处理所有部门不在第一位,导致流程数据错误问题
Showing
1 changed file
with
8 additions
and
0 deletions
src/components/IndexCenter/IndexCenter.js
| ... | ... | @@ -205,6 +205,14 @@ class IndexCenter extends Component { |
| 205 | 205 | // } |
| 206 | 206 | const addState = {}; |
| 207 | 207 | Object.keys(model).sort((a, b) => { |
| 208 | + const targetKey = "所有部门"; | |
| 209 | + // 核心修改:优先让 targetKey 排在第一位 | |
| 210 | + if (a?.includes(targetKey) ) { | |
| 211 | + return -1; | |
| 212 | + } | |
| 213 | + if (b?.includes(targetKey)) { | |
| 214 | + return 1; | |
| 215 | + } | |
| 208 | 216 | const firstA = model[a][0]?.iJsOrder || 0; |
| 209 | 217 | const firstB = model[b][0]?.iJsOrder || 0; |
| 210 | 218 | return firstA - firstB; | ... | ... |