|
|
@@ -102,15 +102,22 @@
|
|
|
else sessionStorage.setItem("currentPage", "1");
|
|
|
|
|
|
this.getQuestionList(this.pageSize, this.currentPage).then(
|
|
|
- data => {
|
|
|
+ data => { //虽然写的很丑陋但是并不想优化代码了~
|
|
|
let d = data.data;
|
|
|
this.totalElements = d.totalElements;
|
|
|
this.questionList = d.content.map(item => {
|
|
|
+ let tagged = true;
|
|
|
+ if (item == null || item.knowledgeId == null || item.knowledgeId.length === 0
|
|
|
+ || item.weight == null || item.weight === 0)
|
|
|
+ {
|
|
|
+ tagged = false;
|
|
|
+ }
|
|
|
return {
|
|
|
- questionId: item.id,
|
|
|
- title: item.title,
|
|
|
- stem: item.stem,
|
|
|
- type: item.type
|
|
|
+ tagged: tagged,
|
|
|
+ questionId: item?.id,
|
|
|
+ title: item?.title,
|
|
|
+ stem: item?.stem,
|
|
|
+ type: item?.type
|
|
|
}
|
|
|
})
|
|
|
}
|