Commit 109e9818329d2d4915d7f3b9d2f993536770e9e3
1 parent
78156aa6
超哥牛批
Showing
1 changed file
with
3 additions
and
3 deletions
src/views/QuestionBank/index.vue
| @@ -311,14 +311,14 @@ | @@ -311,14 +311,14 @@ | ||
| 311 | this.getQuestionClassListHeadler(); | 311 | this.getQuestionClassListHeadler(); |
| 312 | }, | 312 | }, |
| 313 | methods: { | 313 | methods: { |
| 314 | - getSubTree(id, list) { | 314 | + getSubTree1(id, list) { |
| 315 | let result = []; | 315 | let result = []; |
| 316 | result = list.filter((t) => t.ParentId == id); | 316 | result = list.filter((t) => t.ParentId == id); |
| 317 | if (result.length) { | 317 | if (result.length) { |
| 318 | result = result.map((item) => { | 318 | result = result.map((item) => { |
| 319 | item.value = item.id; | 319 | item.value = item.id; |
| 320 | item.label = item.ClassificationName; | 320 | item.label = item.ClassificationName; |
| 321 | - item.children = this.getSubTree(item.id, list); | 321 | + item.children = this.getSubTree1(item.id, list); |
| 322 | if(!item.children || !item.children.length){ | 322 | if(!item.children || !item.children.length){ |
| 323 | delete item.children; | 323 | delete item.children; |
| 324 | } | 324 | } |
| @@ -335,7 +335,7 @@ | @@ -335,7 +335,7 @@ | ||
| 335 | list = list.map((t) => { | 335 | list = list.map((t) => { |
| 336 | t.value = t.id; | 336 | t.value = t.id; |
| 337 | t.label = t.ClassificationName; | 337 | t.label = t.ClassificationName; |
| 338 | - t.children = this.getSubTree(t.id,alllist); | 338 | + t.children = this.getSubTree1(t.id,alllist); |
| 339 | if(!t.children || !t.children.length){ | 339 | if(!t.children || !t.children.length){ |
| 340 | delete t.children; | 340 | delete t.children; |
| 341 | } | 341 | } |