Commit 9f3f3cf8 authored by 纪泽龙's avatar 纪泽龙

优化培训考试发布页面默认值0

parent ac174229
......@@ -337,13 +337,13 @@ export default {
computed: {
...mapGetters(["courseOptions"]),
danxs() {
return this.questionList.filter((item) => item.topicType === 1).length;
return this.questionList.filter((item) => item.topicType === 1).length || 0;
},
duoxs() {
return this.questionList.filter((item) => item.topicType === 2).length;
return this.questionList.filter((item) => item.topicType === 2).length || 0;
},
pds() {
return this.questionList.filter((item) => item.topicType === 3).length;
return this.questionList.filter((item) => item.topicType === 3).length || 0;
},
},
created() {
......@@ -472,10 +472,10 @@ export default {
})
.then((res) => {
this.bottomFrom = {
singleChoiceScore: res.data.singleChoiceScore,
multipleChoiceScore: res.data.multipleChoiceScore,
judgmentScore: res.data.judgmentScore,
qualifiedNum: res.data.qualifiedNum,
singleChoiceScore: res.data.singleChoiceScore || 0,
multipleChoiceScore: res.data.multipleChoiceScore || 0,
judgmentScore: res.data.judgmentScore || 0,
qualifiedNum: res.data.qualifiedNum || 0,
};
})
.then((res) => {
......
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