修改总分
This commit is contained in:
parent
9716080532
commit
c456faee40
@ -153,6 +153,10 @@
|
||||
<span v-if="item.questionType == 'FILL_IN_THE_BLANKS'"
|
||||
>(填空题)</span
|
||||
>
|
||||
<span v-if="item.questionType == 'FEEDBACK_BLANKS_SUBJECT'"
|
||||
>(反馈填空题)</span
|
||||
>
|
||||
|
||||
<span v-if="item.questionType == 'COMBINATION_SCORING_SUBJECT'"
|
||||
>(组合打分题)</span
|
||||
>
|
||||
@ -203,7 +207,8 @@
|
||||
<div
|
||||
v-if="
|
||||
item.questionType == 'FILL_IN_THE_BLANKS' ||
|
||||
item.questionType == 'COMBINATION_BLANKS_SUBJECT'
|
||||
item.questionType == 'COMBINATION_BLANKS_SUBJECT' ||
|
||||
item.questionType == 'FEEDBACK_BLANKS_SUBJECT'
|
||||
"
|
||||
class="tk"
|
||||
>
|
||||
@ -569,10 +574,12 @@ export default {
|
||||
e.questionType == "COMBINATION_MULTIPLE_SUBJECT" ||
|
||||
e.questionType == "COMBINATION_SCORING_SUBJECT"
|
||||
) {
|
||||
e.whetherScore = "1";
|
||||
} else {
|
||||
if(e.whetherScore==true){
|
||||
e.whetherScore = "1";
|
||||
}else{
|
||||
e.whetherScore = "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
e.questionSubjectOptionList.forEach((el) => {
|
||||
el.questionNumber = e.questionNumber;
|
||||
if (
|
||||
@ -589,13 +596,13 @@ export default {
|
||||
|
||||
/** 提交按钮 */
|
||||
submit() {
|
||||
// return
|
||||
if (this.$route.query.taskNodeType == "QUESTIONNAIRE_SCALE") {
|
||||
// 对象.新名字=对象.原数组
|
||||
this.$delete(this.questiondata, "updateBy");
|
||||
this.$delete(this.questiondata, "updateTime");
|
||||
var score = 0;
|
||||
// 单选、多选、打分分值
|
||||
var lengthScore=this.questiondata.questionSubjectList.filter(f=> f.whetherScore == '0')
|
||||
this.questiondata.questionSubjectList.forEach((e) => {
|
||||
if (e.questionSubjectOptionList?.length > 0) {
|
||||
e.questionSubjectOptionList.forEach((el) => {
|
||||
@ -607,12 +614,17 @@ export default {
|
||||
e.questionType == "COMBINATION_MULTIPLE_SUBJECT" ||
|
||||
e.questionType == "COMBINATION_SCORING_SUBJECT"
|
||||
) {
|
||||
if (el.optionChooseSign == "0") {
|
||||
if (el.optionChooseSign == "0" && e.whetherScore == '1') {
|
||||
score += el.optionScore;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
if(lengthScore.length==this.questiondata.questionSubjectList.length){
|
||||
this.questiondata.totalScore = '';
|
||||
}else{
|
||||
this.questiondata.totalScore = score;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.questiondata.subjectResultDTOList =
|
||||
@ -649,6 +661,7 @@ export default {
|
||||
// this.$delete(this.obj, 'totalScore',)
|
||||
}
|
||||
// 问卷
|
||||
// return
|
||||
if (this.$route.query.taskNodeType == "QUESTIONNAIRE_SCALE") {
|
||||
this.$refs["questiondata"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@ -585,7 +585,7 @@
|
||||
<el-dialog title="问卷查看" :visible.sync="questionshow" width="40%">
|
||||
<div class="bottomheader">
|
||||
<div class="right">
|
||||
<div class="title" v-if="totalScoredata>0">总分:{{ totalScoredata }}分</div>
|
||||
<div class="title" v-if="questiondata.totalScore || questiondata.totalScore ==0">总分:{{ questiondata.totalScore }}分</div>
|
||||
<div
|
||||
class="words"
|
||||
v-for="(item, index) in questiondata.subjectResultList"
|
||||
@ -840,7 +840,7 @@ export default {
|
||||
// { required: true, message: "患者表id不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// },
|
||||
totalScoredata:0,
|
||||
// totalScoredata:0,
|
||||
questionshow: false,
|
||||
checkeddata: [],
|
||||
formlist: [],
|
||||
@ -867,17 +867,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async questionlook(row) {
|
||||
this.totalScoredata=0,
|
||||
// this.totalScoredata=0,
|
||||
await selectPatientQuestionSubmit(row.taskExecuteRecordId).then((res) => {
|
||||
this.questiondata = res.data;
|
||||
this.questiondata.subjectResultList.forEach((e) => {
|
||||
if(e.whetherScore==1){
|
||||
e.optionResults.forEach((el) => {
|
||||
if(el.optionChooseSign=="0"){
|
||||
this.totalScoredata += el.optionScore
|
||||
}
|
||||
})
|
||||
}
|
||||
// if(e.whetherScore==1){
|
||||
// e.optionResults.forEach((el) => {
|
||||
// if(el.optionChooseSign=="0"){
|
||||
// this.totalScoredata += el.optionScore
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
e.optionResults.forEach((el) => {
|
||||
if (
|
||||
(el.optionChooseSign == "0" &&
|
||||
|
||||
Loading…
Reference in New Issue
Block a user