|
@@ -17,16 +17,26 @@
|
|
|
style="width:50%;margin-top:10px"></el-progress>
|
|
|
</div>
|
|
|
<div class="glass">
|
|
|
- <p class="correct_txt" v-show="showCorrectTxt && testTypeCode == 0"><img v-show="showCorrectImg" src="../assets/cognize/correct.png" alt=""> <img v-show="showWrongImg" src="../assets/cognize/wrong.png" alt=""><span>{{ correctTxt
|
|
|
+ <p class="correct_txt" v-show="showCorrectTxt && testTypeCode == 0"><img v-show="showCorrectImg"
|
|
|
+ src="../assets/cognize/correct.png" alt=""> <img v-show="showWrongImg" src="../assets/cognize/wrong.png"
|
|
|
+ alt=""><span>{{ correctTxt
|
|
|
}}</span></p>
|
|
|
<p v-show="countDownShow" class="countdownStr">
|
|
|
{{ countDownStr }}
|
|
|
</p>
|
|
|
<img v-show="showDuckEgg" :src="examImgUrl" alt="" class="shapeImg" />
|
|
|
<div class="operate_demo" v-if="testTypeCode == 0">
|
|
|
- <p v-show="showMouseLeft || showMouseRight">请点鼠标{{ showMouseLeft ? '左键' : '右键' }}</p>
|
|
|
- <img v-show="showMouseLeft" src="../assets/cognize/mouseL.png" alt="">
|
|
|
- <img v-show="showMouseRight" src="../assets/cognize/mouseR.png" alt="">
|
|
|
+ <p v-show="showMouseLeft || showMouseRight">
|
|
|
+ <span>当前鸭蛋尖朝<span class="sbclass" style="font-weight: 700;color: red;">
|
|
|
+ {{ showMouseLeft ? '左' :
|
|
|
+ '右' }}</span></span>,请点你的鼠标
|
|
|
+ <span class="sbclass" style="font-weight: 700;color: red;">{{
|
|
|
+ showMouseLeft ? '左键' :
|
|
|
+ '右键'
|
|
|
+ }}</span>
|
|
|
+ </p>
|
|
|
+ <img v-show="showMouseLeft" src="../assets/cognize/mouseL.png" alt="" style="visibility: hidden;">
|
|
|
+ <img v-show="showMouseRight" src="../assets/cognize/mouseR.png" alt="" style="visibility: hidden;">
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <img v-show="showWhiteFlag" src='../../assets/congnitiveAblitity/whiteFlag.png' alt="" style="width: 50px; height: 50px; margin-top: 20%"> -->
|
|
@@ -265,17 +275,34 @@ export default {
|
|
|
this.testState = false;
|
|
|
//this.testTypeCode =1
|
|
|
this.countDownStr = "练习马上开始!";
|
|
|
- this.userRightResponseCount = 0;
|
|
|
- this.imgIndex = 0;
|
|
|
+
|
|
|
this.countDownTime = 6;
|
|
|
this.testEndFlag = false;
|
|
|
this.showDuckEgg = false;
|
|
|
- this.userTestPicList = [];
|
|
|
+
|
|
|
this.button1Show = true;
|
|
|
- this.$message({
|
|
|
- message: "练习测试结束!",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ //计算一下正确率
|
|
|
+ // let userScore = (
|
|
|
+ // (this.userRightResponseCount / this.userResponseRecords.length) *
|
|
|
+ // 100
|
|
|
+ // ).toFixed(2);
|
|
|
+
|
|
|
+ if (this.userRightResponseCount / this.userTestPicList.length >= 0.8) {
|
|
|
+ //设置状态为true
|
|
|
+ userInfo.saveIspass()
|
|
|
+ this.$message({
|
|
|
+ message: `练习测试通过!正确率为${this.userRightResponseCount / this.userTestPicList.length * 100}%`,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: `练习测试未通过!正确率为${this.userRightResponseCount / this.userTestPicList.length * 100}%`,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.userRightResponseCount = 0;
|
|
|
+ this.imgIndex = 0;
|
|
|
+ this.userTestPicList = [];
|
|
|
//跳转到上一页
|
|
|
this.$router.go(-1)
|
|
|
} else {
|
|
@@ -442,6 +469,27 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+.sbclass {
|
|
|
+ animation-duration: 1s;
|
|
|
+ animation-name: slidein;
|
|
|
+ animation-iteration-count: infinite;
|
|
|
+ animation-direction: alternate;
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes slidein {
|
|
|
+ from {
|
|
|
+ /* margin-left: 100%; */
|
|
|
+ /* width: 300%; */
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ to {
|
|
|
+ /* margin-left: 0%;
|
|
|
+ width: 100%; */
|
|
|
+ font-size: 30px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.testMainDiv {
|
|
|
margin: 0 auto;
|
|
|
margin-top: 10px;
|