| | |
| | | </div> |
| | | <span style="color:#ECAB3C;">{{ '批改:' }}</span> |
| | | <el-input-number size="mini" v-model="question.score" :precision="1" :min="0" |
| | | :max="parseInt(question.questionScore)" @change="updateRight"></el-input-number> |
| | | :max="parseFloat(question.questionScore)" @change="updateRight"></el-input-number> |
| | | </div> |
| | | <div v-else> |
| | | </div> |
| | |
| | | methods: { |
| | | updateRight () { |
| | | // 当score变化时,检查它是否等于questionScore |
| | | this.question.right = this.question.score === parseInt(this.question.questionScore) |
| | | this.question.right = this.question.score === parseFloat(this.question.questionScore) |
| | | const foundAnswer = this.answer.find(answer => answer.itemOrder === this.question.itemOrder) |
| | | if (foundAnswer) { |
| | | foundAnswer.right = this.question.right |