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

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

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