|
@@ -447,14 +447,16 @@ function saveScore() {
|
|
|
}
|
|
|
|
|
|
function handleChange(value, row) {
|
|
|
- let info = setParentScores(ruleInfo.value.trees, row)
|
|
|
- if(info) {
|
|
|
- info.score = null
|
|
|
- info.children.forEach(item => {
|
|
|
- info.score = (info.score || 0) + item.score
|
|
|
- })
|
|
|
- if(info.pid.length != 1) {
|
|
|
- handleChange(value, info)
|
|
|
+ if(row.pid.length != 1) {
|
|
|
+ let info = setParentScores(ruleInfo.value.trees, row)
|
|
|
+ if(info) {
|
|
|
+ info.score = null
|
|
|
+ info.children.forEach(item => {
|
|
|
+ info.score = (info.score || 0) + item.score
|
|
|
+ })
|
|
|
+ if(info.pid.length != 1) {
|
|
|
+ handleChange(value, info)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|