WXL
2025-01-16 080186b670ed6ee1c3149454a1abe44da0085d52
src/views/outsideChainwtnew.vue
@@ -63,7 +63,6 @@
              <el-checkbox-group
                class="custom-radio"
                v-model="item.scriptResult"
                @change="updateScore($event, index, item)"
              >
                <el-checkbox
                  border
@@ -448,19 +447,19 @@
      }
    },
    // 处理多选选项
    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>