|  |  |  | 
|---|
|  |  |  | <el-checkbox-group | 
|---|
|  |  |  | class="custom-radio" | 
|---|
|  |  |  | v-model="item.scriptResult" | 
|---|
|  |  |  | @change="updateScore($event, index, item)" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-checkbox | 
|---|
|  |  |  | border | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 处理多选选项 | 
|---|
|  |  |  | 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> | 
|---|