diff --git a/src/views/manage/continueSigning/index.vue b/src/views/manage/continueSigning/index.vue index 210d046..ced449d 100644 --- a/src/views/manage/continueSigning/index.vue +++ b/src/views/manage/continueSigning/index.vue @@ -83,7 +83,7 @@ + value-format="yyyy-MM-dd" @change="changestarttime" placeholder="选择日期" style="width:150px"> diff --git a/src/views/system/addQuestionnaire/index.vue b/src/views/system/addQuestionnaire/index.vue index 549a76f..815096f 100644 --- a/src/views/system/addQuestionnaire/index.vue +++ b/src/views/system/addQuestionnaire/index.vue @@ -427,10 +427,12 @@
- + + {{ item.optionName }}
- + + @@ -553,26 +555,44 @@ export default { questionnaireTotalScore: function () { var score = 0 this.questionlist.forEach(e => { - if (!e.list) { - if (e.questionSubjectOptionList.length > 0) { - e.questionScore = e.questionSubjectOptionList[0].optionScore - e.questionSubjectOptionList.forEach(el => { - if (el.optionScore > e.questionScore) { - e.questionScore = el.optionScore + if (e.whetherScore) { + if (!e.list) { + if (e.questionSubjectOptionList?.length > 0) { + if (e.questionType == "MULTIPLE_CHOICE_QUESTIONS") { + e.questionScore = e.questionSubjectOptionList[0].optionScore + e.questionSubjectOptionList.forEach(el => { + score += el.optionScore + }) + } else { + e.questionScore = e.questionSubjectOptionList[0].optionScore + e.questionSubjectOptionList.forEach(el => { + if (el.optionScore > e.questionScore) { + e.questionScore = el.optionScore + } + }) + score += e.questionScore } - }) - score += e.questionScore + } + } else { + if (e.questionType == "MULTIPLE_CHOICE_QUESTIONS") { + e.list.forEach(el => { + el.questionScore = el.questionSubjectOptionList[0].optionScore + el.questionSubjectOptionList.forEach(ele => { + score += ele.questionScore + }) + }) + } else { + e.list.forEach(el => { + el.questionScore = el.questionSubjectOptionList[0].optionScore + el.questionSubjectOptionList.forEach(ele => { + if (ele.optionScore > el.questionScore) { + el.questionScore = ele.optionScore + } + }) + score += el.questionScore + }) + } } - } else { - e.list.forEach(el => { - el.questionScore = el.questionSubjectOptionList[0].optionScore - el.questionSubjectOptionList.forEach(ele => { - if (ele.optionScore > el.questionScore) { - el.questionScore = ele.optionScore - } - }) - score += el.questionScore - }) } }) this.list.questionnaireTotalScore = score @@ -761,7 +781,7 @@ export default { optionid: ++this.optionid, optionName: '', optionScore: 0, - checked: false, + // checked: false, optionAnswer: '', //题目名称 questionName: undefined, @@ -771,7 +791,7 @@ export default { optionid: ++this.optionid, optionScore: 0, optionName: '', - checked: false, + // checked: false, optionAnswer: '', //题目名称 questionName: undefined, @@ -793,7 +813,7 @@ export default { optionid: ++this.optionid, optionName: '', optionScore: 0, - checked: false, + // checked: false, optionAnswer: '', //题目名称 questionName: undefined, @@ -803,7 +823,7 @@ export default { optionid: ++this.optionid, optionScore: 0, optionName: '', - checked: false, + // checked: false, optionAnswer: '', //题目名称 questionName: undefined, @@ -953,7 +973,7 @@ export default { optionName: '', optionScore: 0, optionAnswer: '', - checked: false, + // checked: false, }) }, deloption(item, uitem, index, uindex) { @@ -981,7 +1001,7 @@ export default { optionid: ++this.optionid, optionName: i + 1, optionScore: 0, - checked: false, + // checked: false, optionAnswer: '', //题目名称 questionName: undefined, @@ -1061,9 +1081,7 @@ export default { } }, //保存并发布 - releaseupload() { - - }, + releaseupload() { }, info() { getQuestion(this.$route.query.id).then(res => { this.list = res.data