| | |
| | | }, |
| | | goCheckOne() { |
| | | let obj = 0; |
| | | let index = 0; |
| | | for (let key in this.evaluation.evaluationOneValue) { |
| | | if (this.evaluation.evaluationOneValue[key] == "1") { |
| | | if(this.evaluation.evaluationOneValue[key] === ""){ |
| | | index ++ |
| | | } |
| | | if (this.evaluation.evaluationOneValue[key] === "1") { |
| | | obj = obj + 1; |
| | | } else{ |
| | | obj = obj + 0; |
| | | } |
| | | } |
| | | this.evaluationOneResults = obj; |
| | | localStorage.setItem("aviationEtiquette-book-evaluation-one",this.evaluationOneResults); |
| | | if(index > 0 || Object.keys(this.evaluation.evaluationOneValue).length < 15) { |
| | | this.$message({ |
| | | message: "您还有题目未选择答案", |
| | | type: "warning" |
| | | }); |
| | | return; |
| | | }else{ |
| | | this.evaluationOneResults = obj; |
| | | localStorage.setItem("aviationEtiquette-book-evaluation-one",this.evaluationOneResults); |
| | | } |
| | | |
| | | }, |
| | | changeCheckData() { |
| | | this.evaluationOneResults = ''; |
| | |
| | | |
| | | goCheckTwo() { |
| | | let obj = 0; |
| | | let index = 0; |
| | | for (let key in this.evaluation.evaluationTwoValue) { |
| | | if(this.evaluation.evaluationTwoValue[key] === ""){ |
| | | index ++ |
| | | } |
| | | if (this.evaluation.evaluationTwoValue[key] == "0") { |
| | | obj = obj + 1; |
| | | } |
| | | } |
| | | this.evaluationTwoResults = 105 - obj * 7; |
| | | this.evaluation.showCheckAnswer = true; |
| | | localStorage.setItem("aviationEtiquette-book-evaluation-two",this.evaluationOneResults); |
| | | console.log(this.evaluation.evaluationTwoValue,index) |
| | | if(index > 0 || Object.keys(this.evaluation.evaluationTwoValue).length < 15) { |
| | | this.$message({ |
| | | message: "您还有题目未选择答案", |
| | | type: "warning" |
| | | }); |
| | | return; |
| | | }else{ |
| | | this.evaluationTwoResults = 105 - obj * 7; |
| | | this.evaluation.showCheckAnswer = true; |
| | | localStorage.setItem("aviationEtiquette-book-evaluation-two",this.evaluationOneResults); |
| | | } |
| | | }, |
| | | |
| | | changeCheckTwo() { |