From 84ce401711710579b25fcc300cb1133cfff817ce Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期五, 03 一月 2025 16:36:28 +0800 Subject: [PATCH] ceshi --- src/books/aviationEtiquette/view/components/chapter003.vue | 46 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/books/aviationEtiquette/view/components/chapter003.vue b/src/books/aviationEtiquette/view/components/chapter003.vue index dfc5e2a..0c5350e 100644 --- a/src/books/aviationEtiquette/view/components/chapter003.vue +++ b/src/books/aviationEtiquette/view/components/chapter003.vue @@ -465,7 +465,7 @@ value="1" id="1" :disabled="evaluation.isComplete" - v-model="evaluation.evaluationThreeValue.Two" + v-model="evaluation.evaluationThreeValue.two" @change="setEvaluation" />A.鐩存帴鍐插埌閭d釜鍚屼簨闈㈠墠锛屽拰浠栧ぇ鍚典竴椤�</p> <p class="block"><input @@ -474,7 +474,7 @@ value="2" id="1" :disabled="evaluation.isComplete" - v-model="evaluation.evaluationThreeValue.Two" + v-model="evaluation.evaluationThreeValue.two" @change="setEvaluation" />B.鍚戦瀵艰鏄庢儏鍐碉紝璇烽瀵艰皟鏌ョ湡鐩�</p> <p class="block"><input @@ -483,7 +483,7 @@ value="3" id="1" :disabled="evaluation.isComplete" - v-model="evaluation.evaluationThreeValue.Two" + v-model="evaluation.evaluationThreeValue.two" @change="setEvaluation" />C.娓呰�呰嚜娓咃紝涓嶅幓鐞嗙潿锛屽拰浠ュ墠涓�鏍峰共濂藉伐浣�</p> <p class="block">3.濡傛灉鐖舵瘝鎬ф牸涓嶅悎锛岀粡甯稿惖鏋讹紝浣犱細鎬庝箞鍔烇紵</p> @@ -2333,13 +2333,23 @@ goCheckThree(){ let obj = 0 + let index = 0 for (let key in this.evaluation.evaluationThreeValue) { - if (this.evaluation.evaluationThreeValue[key] != '') { + if (this.evaluation.evaluationThreeValue[key] !== '') { let cont = Number(this.evaluation.evaluationThreeValue[key]) obj = obj + cont + }else{ + index ++ } } - if(obj){ + console.log(index,this.evaluation.evaluationThreeValue) + if(index > 0 || Object.keys(this.evaluation.evaluationThreeValue).length < 10) { + this.$message({ + message: "鎮ㄨ繕鏈夐鐩湭閫夋嫨绛旀", + type: "warning" + }); + return; + }else{ this.evaluatioThreeResults = obj this.evaluation.showCheckAnswerThree = true localStorage.setItem("aviationEtiquette-book-evaluation-three",this.evaluatioThreeResults); @@ -2352,13 +2362,22 @@ }, goCheckFour(){ let obj = 0 + let index = 0 for (let key in this.evaluation.evaluationFourValue) { - if (this.evaluation.evaluationFourValue[key] != '') { + if (this.evaluation.evaluationFourValue[key] !== '') { let cont = Number(this.evaluation.evaluationFourValue[key]) obj = obj + cont + }else{ + index++ } } - if(obj){ + if(index > 0 || Object.keys(this.evaluation.evaluationFourValue).length < 6) { + this.$message({ + message: "鎮ㄨ繕鏈夐鐩湭閫夋嫨绛旀", + type: "warning" + }); + return; + }else{ this.evaluationFourResults = obj this.evaluation.showCheckAnswerFour = true localStorage.setItem("aviationEtiquette-book-evaluation-four",this.evaluationFourResults); @@ -2371,13 +2390,22 @@ }, goCheckFive(){ let obj = 0 + let index = 0 for (let key in this.evaluation.evaluationFiveValue) { - if (this.evaluation.evaluationFiveValue[key] != '') { + if (this.evaluation.evaluationFiveValue[key] !== '') { let cont = Number(this.evaluation.evaluationFiveValue[key]) obj = obj + cont + }else{ + index++ } } - if(obj){ + if(index > 0 || Object.keys(this.evaluation.evaluationFiveValue).length < 12) { + this.$message({ + message: "鎮ㄨ繕鏈夐鐩湭閫夋嫨绛旀", + type: "warning" + }); + return; + }else{ this.evaluationFiveResults = obj this.evaluation.showCheckAnswerFive = true localStorage.setItem("aviationEtiquette-book-evaluation-five",this.evaluationFiveResults); -- Gitblit v1.9.1