| | |
| | | <el-checkbox-group |
| | | class="custom-radio" |
| | | v-model="item.scriptResult" |
| | | @change="updateScore($event, index, item)" |
| | | > |
| | | <el-checkbox |
| | | border |
| | |
| | | var obj = item.svyLibTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | if (obj.isabnormal) { |
| | | console.log(obj.isabnormal); |
| | | form.excep = 1; |
| | | this.excep = 1; |
| | | if (obj) { |
| | | if (obj.isabnormal) { |
| | | console.log(obj.isabnormal); |
| | | form.excep = 1; |
| | | this.excep = 1; |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | } |
| | | }, |
| | | // 处理多选选项 |
| | | updateScore(selectedvalues, index, arr) { |
| | | // ��加分数 |
| | | let score = 0; |
| | | selectedvalues.forEach((value) => { |
| | | const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | (option) => option.optioncontent == value |
| | | ); |
| | | if (selectedOption) { |
| | | score += Number(selectedOption.score); |
| | | } |
| | | }); |
| | | this.questionList[index].score = score; |
| | | }, |
| | | // updateScore(selectedvalues, index, arr) { |
| | | // // ��加分数 |
| | | // let score = 0; |
| | | // selectedvalues.forEach((value) => { |
| | | // const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | // (option) => option.optioncontent == value |
| | | // ); |
| | | // if (selectedOption) { |
| | | // score += Number(selectedOption.score); |
| | | // } |
| | | // }); |
| | | // this.questionList[index].score = score; |
| | | // }, |
| | | }, |
| | | }; |
| | | </script> |