Explorar el Código

前瞻性记忆游戏修改

周玉佂 hace 3 meses
padre
commit
b49700a518
Se han modificado 55 ficheros con 0 adiciones y 3006 borrados
  1. BIN
      public/static/flying/arrow_left.png
  2. BIN
      public/static/flying/arrow_right.png
  3. BIN
      public/static/flying/bg_game.png
  4. BIN
      public/static/flying/compass.png
  5. BIN
      public/static/flying/dashboard.png
  6. BIN
      public/static/flying/index-outline-1.png
  7. BIN
      public/static/flying/index-outline.png
  8. BIN
      public/static/flying/m0s0.png
  9. BIN
      public/static/flying/m0s1.png
  10. BIN
      public/static/flying/m0s2.png
  11. BIN
      public/static/flying/m1s0.png
  12. BIN
      public/static/flying/m1s1.png
  13. BIN
      public/static/flying/m1s2.png
  14. BIN
      public/static/flying/m2s0.png
  15. BIN
      public/static/flying/m2s1.png
  16. BIN
      public/static/flying/m2s2.png
  17. BIN
      public/static/flying/tjq1dc.png
  18. BIN
      public/static/flying/tjq1di.png
  19. BIN
      public/static/flying/tjq1do.png
  20. BIN
      public/static/flying/tjq2dc.png
  21. BIN
      public/static/flying/tjq2di.png
  22. BIN
      public/static/flying/tjq2do.png
  23. BIN
      public/static/flying/tjq3dc.png
  24. BIN
      public/static/flying/tjq3di.png
  25. BIN
      public/static/flying/tjq3do.png
  26. BIN
      public/static/flying/tjq4dc.png
  27. BIN
      public/static/flying/tjq4di.png
  28. BIN
      public/static/flying/tjq4do.png
  29. BIN
      public/static/flying/tnq1dc.png
  30. BIN
      public/static/flying/tnq1di.png
  31. BIN
      public/static/flying/tnq1do.png
  32. BIN
      public/static/flying/tnq2dc.png
  33. BIN
      public/static/flying/tnq2di.png
  34. BIN
      public/static/flying/tnq2do.png
  35. BIN
      public/static/flying/tnq3dc.png
  36. BIN
      public/static/flying/tnq3di.png
  37. BIN
      public/static/flying/tnq3do.png
  38. BIN
      public/static/flying/tnq4dc.png
  39. BIN
      public/static/flying/tnq4di.png
  40. BIN
      public/static/flying/tnq4do.png
  41. BIN
      public/static/flying/tyq1dc.png
  42. BIN
      public/static/flying/tyq1di.png
  43. BIN
      public/static/flying/tyq1do.png
  44. BIN
      public/static/flying/tyq2dc.png
  45. BIN
      public/static/flying/tyq2di.png
  46. BIN
      public/static/flying/tyq2do.png
  47. BIN
      public/static/flying/tyq3dc.png
  48. BIN
      public/static/flying/tyq3di.png
  49. BIN
      public/static/flying/tyq3do.png
  50. BIN
      public/static/flying/tyq4dc.png
  51. BIN
      public/static/flying/tyq4di.png
  52. BIN
      public/static/flying/tyq4do.png
  53. 0 805
      src/views/CognitiveAbilityTask/prospectiveMemoryAbility/formal.vue
  54. 0 1166
      src/views/CognitiveAbilityTask/prospectiveMemoryAbility/formal_back.vue
  55. 0 1035
      src/views/CognitiveAbilityTask/prospectiveMemoryAbility/practice.vue

BIN
public/static/flying/arrow_left.png


BIN
public/static/flying/arrow_right.png


BIN
public/static/flying/bg_game.png


BIN
public/static/flying/compass.png


BIN
public/static/flying/dashboard.png


BIN
public/static/flying/index-outline-1.png


BIN
public/static/flying/index-outline.png


BIN
public/static/flying/m0s0.png


BIN
public/static/flying/m0s1.png


BIN
public/static/flying/m0s2.png


BIN
public/static/flying/m1s0.png


BIN
public/static/flying/m1s1.png


BIN
public/static/flying/m1s2.png


BIN
public/static/flying/m2s0.png


BIN
public/static/flying/m2s1.png


BIN
public/static/flying/m2s2.png


BIN
public/static/flying/tjq1dc.png


BIN
public/static/flying/tjq1di.png


BIN
public/static/flying/tjq1do.png


BIN
public/static/flying/tjq2dc.png


BIN
public/static/flying/tjq2di.png


BIN
public/static/flying/tjq2do.png


BIN
public/static/flying/tjq3dc.png


BIN
public/static/flying/tjq3di.png


BIN
public/static/flying/tjq3do.png


BIN
public/static/flying/tjq4dc.png


BIN
public/static/flying/tjq4di.png


BIN
public/static/flying/tjq4do.png


BIN
public/static/flying/tnq1dc.png


BIN
public/static/flying/tnq1di.png


BIN
public/static/flying/tnq1do.png


BIN
public/static/flying/tnq2dc.png


BIN
public/static/flying/tnq2di.png


BIN
public/static/flying/tnq2do.png


BIN
public/static/flying/tnq3dc.png


BIN
public/static/flying/tnq3di.png


BIN
public/static/flying/tnq3do.png


BIN
public/static/flying/tnq4dc.png


BIN
public/static/flying/tnq4di.png


BIN
public/static/flying/tnq4do.png


BIN
public/static/flying/tyq1dc.png


BIN
public/static/flying/tyq1di.png


BIN
public/static/flying/tyq1do.png


BIN
public/static/flying/tyq2dc.png


BIN
public/static/flying/tyq2di.png


BIN
public/static/flying/tyq2do.png


BIN
public/static/flying/tyq3dc.png


BIN
public/static/flying/tyq3di.png


BIN
public/static/flying/tyq3do.png


BIN
public/static/flying/tyq4dc.png


BIN
public/static/flying/tyq4di.png


BIN
public/static/flying/tyq4do.png


+ 0 - 805
src/views/CognitiveAbilityTask/prospectiveMemoryAbility/formal.vue

@@ -1,805 +0,0 @@
-<template>
-  <div class="content-container">
-    <div class="content-outline" v-if="!running">
-      <div class="left_part">
-        <div id="left_top" class="flex-row">
-          <el-image class="setting" :src="require('@/assets/9551.png')" fit="cover" />
-          <div class="text"> 操作提示:</div>
-        </div>
-        <div class="left-desc-80">
-          {{ practiceFlag ? '请先练习测试,练习完成后,即将正式测试。' : '请开始正式测试!' }}
-        </div>
-      </div>
-      <div
-          class="right_part"
-          :style="{
-          background:
-            'url(' + require('../../../assets/page' + taskId + '.png') + ')',
-          'background-size': '100% 100%',
-        }"
-      >
-        <div id="title">
-          <span>{{ subjectInfo.name }}</span>
-        </div>
-        <div
-            style="
-            position: absolute;
-            bottom: 0.156rem;
-            left: 50%;
-            transform: translateX(-50%);
-          "
-        >
-          <el-button type="primary" class="start" @click="startTest()">
-            {{ practiceFlag ? '练习测试' : '正式测试' }}
-          </el-button>
-        </div>
-      </div>
-    </div>
-
-    <div v-if="running" class="activeTask" >
-      <MainProgress v-if="!practiceFlag" :cur-percentage="(currentIndex / collectedDataArray.length)" />
-
-      <div class="taskHead">
-        <div class="scale" @click.stop="screen">
-          <img src="@/assets/small-big.png" alt="" />
-        </div>
-      </div>
-      <div id="game">
-        <img v-if="showPic" ref="missile" id="missile" :src="collectedDataArray[currentIndex].leftImg" alt="" draggable="false">
-        <img v-if="showPic" ref="compass" id="compass" :src="collectedDataArray[currentIndex].rightImg" alt="" draggable="false">
-      </div>
-      <div id="tip" v-if="false">
-        <img id="arrow" v-if="currentArrowImg" :src="currentArrowImg" alt="">
-      </div>
-    </div>
-
-
-<!--    <pre>{{ practiceMaps }}</pre>-->
-
-    <go-back />
-  </div>
-</template>
-
-<script>
-import screenfull from "screenfull";
-import { oSessionStorage, dateFormat } from "@/utils/utils";
-import GoBack from "@/components/goBack/index.vue"
-import MainProgress from "@/components/MainProgress/index.vue"
-import { generateRandomRangeNumbers } from "../../../utils/utils";
-
-export default {
-  name: "prospectiveMemoryAbility",
-  components: { GoBack, MainProgress },
-  data() {
-    return {
-      subjectInfo: "", //认知任务详情
-      taskId: "", // 认知任务id
-      userId: '',
-
-      disabled: true, // 是否处于注视点时长内,如果是,在不响应任何按键
-
-      running: false,  // 游戏是否开始
-      practiceFlag: true, // 是否处于练习模式,默认是练习模式
-
-      currentIndex: 0,
-      selectedDirection: '',  // 用户选择的方向,left 或 right
-      selectedKey: '',  // 用户当前选择的按键,用于阻止重复选择
-      pseudoRandomArray: [
-        // 伪随机数组,前72个是主任务,后8个是前瞻性任务
-        // 第1-12个是左键-A键, 第13-24个是左键-S键, 第25-36个是左键-D键, 第37-48个是右键-A键, 第49-60个是右键-S键, 第61-72个是右键-D键, 第73-80个是空格键
-        { index: 0, missile: 'm1s0', compass: 'tjq3dc', taskType: '1' },
-        { index: 1, missile: 'm1s1', compass: 'tjq3dc', taskType: '1' },
-        { index: 2, missile: 'm1s2', compass: 'tjq3dc', taskType: '1' },
-        { index: 3, missile: 'm2s0', compass: 'tjq3dc', taskType: '1' },
-        { index: 4, missile: 'm2s1', compass: 'tjq3dc', taskType: '1' },
-        { index: 5, missile: 'm2s2', compass: 'tjq3dc', taskType: '1' },
-        { index: 6, missile: 'm1s0', compass: 'tjq2dc', taskType: '1' },
-        { index: 7, missile: 'm1s1', compass: 'tjq2dc', taskType: '1' },
-        { index: 8, missile: 'm1s2', compass: 'tjq2dc', taskType: '1' },
-        { index: 9, missile: 'm2s0', compass: 'tjq2dc', taskType: '1' },
-        { index: 10, missile: 'm2s1', compass: 'tjq2dc', taskType: '1' },
-        { index: 11, missile: 'm2s2', compass: 'tjq2dc', taskType: '1' },
-        { index: 12, missile: 'm1s0', compass: 'tjq1dc', taskType: '1' },
-        { index: 13, missile: 'm1s1', compass: 'tjq1dc', taskType: '1' },
-        { index: 14, missile: 'm1s2', compass: 'tjq1dc', taskType: '1' },
-        { index: 15, missile: 'm2s0', compass: 'tjq1dc', taskType: '1' },
-        { index: 16, missile: 'm2s1', compass: 'tjq1dc', taskType: '1' },
-        { index: 17, missile: 'm2s2', compass: 'tjq1dc', taskType: '1' },
-        { index: 18, missile: 'm1s0', compass: 'tjq4dc', taskType: '1' },
-        { index: 19, missile: 'm1s1', compass: 'tjq4dc', taskType: '1' },
-        { index: 20, missile: 'm1s2', compass: 'tjq4dc', taskType: '1' },
-        { index: 21, missile: 'm2s0', compass: 'tjq4dc', taskType: '1' },
-        { index: 22, missile: 'm2s1', compass: 'tjq4dc', taskType: '1' },
-        { index: 23, missile: 'm2s2', compass: 'tjq4dc', taskType: '1' },
-        { index: 24, missile: 'm0s1', compass: 'tjq3di', taskType: '1' },
-        { index: 25, missile: 'm1s1', compass: 'tjq3di', taskType: '1' },
-        { index: 26, missile: 'm2s1', compass: 'tjq3di', taskType: '1' },
-        { index: 27, missile: 'm0s2', compass: 'tjq3di', taskType: '1' },
-        { index: 28, missile: 'm1s2', compass: 'tjq3di', taskType: '1' },
-        { index: 29, missile: 'm2s2', compass: 'tjq3di', taskType: '1' },
-        { index: 30, missile: 'm0s1', compass: 'tjq2di', taskType: '1' },
-        { index: 31, missile: 'm1s1', compass: 'tjq2di', taskType: '1' },
-        { index: 32, missile: 'm2s1', compass: 'tjq2di', taskType: '1' },
-        { index: 33, missile: 'm0s2', compass: 'tjq2di', taskType: '1' },
-        { index: 34, missile: 'm1s2', compass: 'tjq2di', taskType: '1' },
-        { index: 35, missile: 'm2s2', compass: 'tjq2di', taskType: '1' },
-        { index: 36, missile: 'm0s1', compass: 'tjq1di', taskType: '1' },
-        { index: 37, missile: 'm1s1', compass: 'tjq1di', taskType: '1' },
-        { index: 38, missile: 'm2s1', compass: 'tjq1di', taskType: '1' },
-        { index: 39, missile: 'm0s2', compass: 'tjq1di', taskType: '1' },
-        { index: 40, missile: 'm1s2', compass: 'tjq1di', taskType: '1' },
-        { index: 41, missile: 'm2s2', compass: 'tjq1di', taskType: '1' },
-        { index: 42, missile: 'm0s1', compass: 'tjq4di', taskType: '1' },
-        { index: 43, missile: 'm1s1', compass: 'tjq4di', taskType: '1' },
-        { index: 44, missile: 'm2s1', compass: 'tjq4di', taskType: '1' },
-        { index: 45, missile: 'm0s2', compass: 'tjq4di', taskType: '1' },
-        { index: 46, missile: 'm1s2', compass: 'tjq4di', taskType: '1' },
-        { index: 47, missile: 'm2s2', compass: 'tjq4di', taskType: '1' },
-        { index: 48, missile: 'm0s0', compass: 'tyq2di', taskType: '1' },
-        { index: 49, missile: 'm0s1', compass: 'tyq3di', taskType: '1' },
-        { index: 50, missile: 'm0s2', compass: 'tyq2dc', taskType: '1' },
-        { index: 51, missile: 'm1s0', compass: 'tyq3dc', taskType: '1' },
-        { index: 52, missile: 'm1s1', compass: 'tyq2do', taskType: '1' },
-        { index: 53, missile: 'm1s2', compass: 'tyq3do', taskType: '1' },
-        { index: 54, missile: 'm2s0', compass: 'tyq2di', taskType: '1' },
-        { index: 55, missile: 'm2s1', compass: 'tyq3di', taskType: '1' },
-        { index: 56, missile: 'm2s2', compass: 'tyq2dc', taskType: '1' },
-        { index: 57, missile: 'm0s1', compass: 'tyq3dc', taskType: '1' },
-        { index: 58, missile: 'm1s2', compass: 'tyq2do', taskType: '1' },
-        { index: 59, missile: 'm2s0', compass: 'tyq3do', taskType: '1' },
-        { index: 60, missile: 'm0s0', compass: 'tyq1di', taskType: '1' },
-        { index: 61, missile: 'm0s1', compass: 'tyq4di', taskType: '1' },
-        { index: 62, missile: 'm0s2', compass: 'tyq1dc', taskType: '1' },
-        { index: 63, missile: 'm1s0', compass: 'tyq4dc', taskType: '1' },
-        { index: 64, missile: 'm1s1', compass: 'tyq1do', taskType: '1' },
-        { index: 65, missile: 'm1s2', compass: 'tyq4do', taskType: '1' },
-        { index: 66, missile: 'm2s0', compass: 'tyq1di', taskType: '1' },
-        { index: 67, missile: 'm2s1', compass: 'tyq4di', taskType: '1' },
-        { index: 68, missile: 'm2s2', compass: 'tyq1dc', taskType: '1' },
-        { index: 69, missile: 'm0s1', compass: 'tyq4dc', taskType: '1' },
-        { index: 70, missile: 'm1s2', compass: 'tyq1do', taskType: '1' },
-        { index: 71, missile: 'm2s0', compass: 'tyq4do', taskType: '1' },
-        { index: 72, missile: 'm2s1', compass: 'tnq1di', taskType: '2' },
-        { index: 73, missile: 'm2s2', compass: 'tnq2dc', taskType: '2' },
-        { index: 74, missile: 'm0s1', compass: 'tnq3do', taskType: '2' },
-        { index: 75, missile: 'm1s2', compass: 'tnq4dc', taskType: '2' },
-        { index: 76, missile: 'm1s0', compass: 'tjq1do', taskType: '2' },
-        { index: 77, missile: 'm0s1', compass: 'tjq2dc', taskType: '2' },
-        { index: 78, missile: 'm1s2', compass: 'tjq3do', taskType: '2' },
-        { index: 79, missile: 'm0s0', compass: 'tjq4di', taskType: '2' }
-      ],
-      currentMap: null,
-      collectedDataArray: [
-        // {
-        //   id: 1,
-        //   name: '1',
-        //   startTime: '',
-        //   missile: '',
-        //   compass: '',
-        //   taskType: '1', // 1 主任务,2 前瞻性任务
-        //   mainTaskDirectionReactionTime: '', // 主任务的方向选择反应时间
-        //   mainTaskMissileReactionTime: '', // 主任务的挂载反应时间
-        //   mainTaskDirectionCorrection: '', // 主任务的方向选择是否正确
-        //   mainTaskMissileCorrection: '', // 主任务的挂载选择是否正确
-        //   prospectiveTaskReactionTime: '', // 主任务的反应时间
-        //   prospectiveTaskCorrection: '', // 主任务的反应是否正确
-        // }
-      ],
-      collectedData: null,
-      directionKey: '',
-      missileKey: '',
-      prospectiveKey: '',
-      taskStartTime: 0, // 任务开始时间
-      taskEndTime: 0, // 任务结束时间
-      showPic: false,
-
-      showCurrentMissile: false, // 隐藏图片
-      showCurrentCompass: false  // 隐藏图片
-    };
-  },
-  computed: { },
-  created() {
-    this.taskId = this.$route.query.taskId;
-    this.subjectInfo = JSON.parse(oSessionStorage.getItem("subjectInfo"));
-    this.userId = sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f");
-
-    this.createData()
-  },
-  watch: { },
-  methods: {
-    screen() {
-      screenfull.toggle()
-    },
-
-    createData() {
-      this.pseudoRandomArray = this.pseudoRandomArray.map((item, index) => {
-        let newItem = {
-          id: 1,
-
-          leftImg: `/static/flying/${item.missile}.png`,
-          rightImg: `/static/flying/${item.compass}.png`,
-
-          startTime: '', // 本局开始时间
-          endTime: '', // 本局结束时间
-          onceStartTime: '',
-          onceEndTime: '',
-
-          mainTaskDirectionReactionTime: '', // 主任务的方向选择反应时间
-          mainTaskDirectionCorrection: '', // 主任务的方向选择是否正确
-          mainTaskDirectionStartTime: '', // 主任务方向选择的开始时间
-          mainTaskDirectionEndTime: '', // 主任务方向选择的结束时间
-          mainTaskDirectionCorrectionResponse: '', // 主任务方向正确反应 ['ArrowLeft' | 'ArrowRight' | '']
-          mainTaskDirectionActualResponse: '', // 主任务方向实际反应 ['ArrowLeft' | 'ArrowRight' | '其他任意按键' | '']
-
-          mainTaskMissileReactionTime: '', // 主任务的挂载反应时间
-          mainTaskMissileCorrection: '', // 主任务的挂载选择是否正确
-          mainTaskMissileStartTime: '', // 主任务武器选择的开始时间
-          mainTaskMissileEndTime: '', // 主任务武器选择的结束时间
-          mainTaskMissileCorrectionResponse: '', // 主任务挂载正确反应 ['KeyA' | 'KeyS' | 'KeyD' | '']
-          mainTaskMissileActualResponse: '', // 主任务挂载实际反应 ['KeyA' | 'KeyS' | 'KeyD' | '其他任意按键' | '']
-
-          prospectiveTaskReactionTime: '', // 前瞻性记忆任务的反应时间
-          prospectiveTaskCorrection: '', // 前瞻性记忆任务的反应是否正确
-          prospectiveTaskStartTime: '', // 前瞻性记忆任务反应的开始时间
-          prospectiveTaskEndTime: '', // 前瞻性记忆任务反应的结束时间
-          prospectiveTaskCorrectionResponse: '', // 前瞻性记忆任务正确反应  ['Space' | '']
-          prospectiveTaskActualResponse: '', // 前瞻性记忆任务实际反应  ['Space' | 'ArrowLeft' | 'ArrowRight' | '其他任意按键' | '']
-        }
-        // 第1-12个是左键-A键,
-        // 第13-24个是右键-A键,
-        // 第25-36个是左键-S键,
-        // 第37-48个是右键-S键,
-        // 第49-60个是左键-D键,
-        // 第61-72个是右键-D键,
-        // 第73-80个是空格键
-        if(index < 12) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowLeft'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyA'
-        } else if (index >= 12 && index < 24) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowRight'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyA'
-        } else if (index >= 24 && index < 36) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowLeft'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyS'
-        } else if(index >= 36 && index < 48) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowRight'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyS'
-        } else if (index >= 48 && index < 60) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowLeft'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyD'
-        } else if (index >= 60 && index < 72) {
-          newItem.mainTaskDirectionCorrectionResponse = 'ArrowRight'
-          newItem.mainTaskMissileCorrectionResponse = 'KeyD'
-        } else {
-          newItem.prospectiveTaskCorrectionResponse = 'Space'
-        }
-
-        return  { ...item, ...newItem }
-      })
-    },
-
-    startTest() {
-      // 进入全屏
-      this.currentIndex = 0
-      this.running = true
-      this.screen()
-      if (this.practiceFlag) {
-        let tempArray = generateRandomRangeNumbers(1, 72, 6)
-        this.collectedDataArray = tempArray.map(index => {
-          return this.pseudoRandomArray[index - 1]
-        })
-        let tempArray_1 = generateRandomRangeNumbers(72, 80, 1)
-        this.collectedDataArray.push(this.pseudoRandomArray[tempArray_1[0] - 1])
-      } else {
-        this.taskStartTime = Date.now()
-        this.collectedDataArray = this.pseudoRandomArray
-      }
-      console.log('this.collectedDataArray: ', this.collectedDataArray)
-      this.collectedDataArray = this.collectedDataArray.sort(() => Math.random() - 0.5)
-      this.next()
-    },
-
-    next() {
-      if (this.currentIndex < this.collectedDataArray.length) {
-        console.log(' ------------------------------------------ ')
-        console.log(' ---- current:  ', this.collectedDataArray[this.currentIndex])
-        console.log(' ------------------------------------------ ')
-        setTimeout(() => {
-          // 注视点时长300-500之间
-          setTimeout(() => this.disabled = false, Math.floor(Math.random() * 200 + 300))
-          this.collectedDataArray[this.currentIndex].startTime = performance.now()
-          this.collectedDataArray[this.currentIndex].onceStartTime = Date.now()
-          this.collectedDataArray[this.currentIndex].mainTaskDirectionStartTime = performance.now()
-          this.collectedDataArray[this.currentIndex].mainTaskMissileStartTime = performance.now()
-          this.collectedDataArray[this.currentIndex].prospectiveTaskStartTime = performance.now()
-          this.showPic = true
-        }, 240) // 空屏 500 毫秒
-
-        this.disabled = true // 开启注视点时长控制
-      } else {
-        // 结束游戏
-        if (this.practiceFlag) {
-          // 游戏结束时,如果是练习模式,则不发送数据,,,并且
-          this.running = false // 退出游戏
-          this.screen() // 退出全屏
-          this.collectedDataArray = [] // 清理数据
-          // 否则进入正式测试模式
-          this.practiceFlag = false  // 将练习标识改成 false,下次开始游戏时,则为正式测试
-        } else {
-          // 如果不是测试模式,则发送,发送完成后,退出游戏,退出全屏,清理数据
-          this.sendCollectedData()
-        }
-      }
-    },
-    sendCollectedData() {
-      // 计算各种反应时间,单位秒,保留两位小数
-      const result = this.collectedDataArray.map(data => {
-        return {
-          ...data,
-          startTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.onceStartTime)),
-          endTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.onceEndTime)),
-          onceStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.onceStartTime)),
-          onceEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.onceEndTime)),
-          responseTime: (data.endTime - data.startTime).toFixed(2),
-        }
-      })
-
-      // 计算各种成绩和准确率
-      const {
-          prospectiveTaskScore,
-          prospectiveTaskCount,
-          prospectiveTaskRight,
-          mainTaskDirectionScore,
-          mainTaskDirectionCount,
-          mainTaskDirectionRight,
-          mainTaskMissileScore,
-          mainTaskMissileCount,
-          mainTaskMissileRight
-      } = result.reduce((obj, task) => {
-        if (task.taskType === '1') {
-          if (task.mainTaskDirectionCorrection === '1') {
-            obj.mainTaskDirectionScore++
-            obj.mainTaskDirectionRight++
-          }
-          obj.mainTaskDirectionCount++
-          if (task.mainTaskDirectionCorrection === '1') {
-            obj.mainTaskMissileScore++
-            obj.mainTaskMissileRight++
-          }
-          obj.mainTaskMissileCount++
-        } else {
-          if (task.prospectiveTaskCorrection === '1') {
-            obj.prospectiveTaskScore++
-            obj.prospectiveTaskRight++
-          }
-          obj.prospectiveTaskCount++
-        }
-        return obj
-      }, {
-        prospectiveTaskScore: 0, // 前瞻性任务成绩
-        prospectiveTaskCount: 0, // 前瞻性任务数量
-        prospectiveTaskRight: 0, // 前瞻性任务正确数量
-
-        mainTaskDirectionScore: 0, // 主任务方向选择成绩
-        mainTaskDirectionCount: 0, // 主任务方向选择数量
-        mainTaskDirectionRight: 0, // 主任务方向选择正确数量
-
-        mainTaskMissileScore: 0, // 主任务子弹选择成绩
-        mainTaskMissileCount: 0, // 主任务子弹选择数量
-        mainTaskMissileRight: 0, // 主任务子弹选择正确数量
-      })
-
-      const prospectiveTaskAccuracy = (prospectiveTaskRight / prospectiveTaskCount).toFixed(4)
-      const mainTaskDirectionAccuracy = (mainTaskDirectionRight / mainTaskDirectionCount).toFixed(4)
-      const mainTaskMissileAccuracy = (mainTaskMissileRight / mainTaskMissileCount).toFixed(4)
-
-      this.taskEndTime = Date.now()
-      console.log('xxx前瞻性记忆任务:', this.taskEndTime - this.taskStartTime + 'ms');
-
-      const data = {
-        userId: this.userId,
-        testPlanId: this.$route.query.testPlanId || '',
-        prospectiveTaskScore, // 前瞻性任务成绩
-        prospectiveTaskAccuracy, // 前瞻性任务平均准确率
-        mainTaskDirectionScore, // 主任务方向选择成绩
-        mainTaskDirectionAccuracy, // 主任务方向选择平均准确率
-        mainTaskMissileScore, // 主任务子弹选择成绩
-        mainTaskMissileAccuracy, //  主任务子弹选择准确率
-        result,
-        taskStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(this.taskStartTime)),
-        taskEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(this.taskEndTime)),
-      }
-
-      console.log(' ------ 前瞻性任务提交数据:', data)
-      console.log(' ------ 前瞻性任务提交数据:', data.result.filter(item => item.taskType === '1').length)
-
-      if (
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") === "" ||
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == null
-      ) {
-        alert("请先登录!");
-        return;
-      } else {
-        this.$http.post("/cognize/ProspectiveMemory", data, (res) => {
-          console.log(res)
-          if (parseInt(res.code) === 200) {
-            this.$message({
-              message: "数据提交成功",
-              type: "success",
-            });
-            if(res.data && res.data != null){
-              //跳转测试结果页
-              this.goTestResult(res.data);
-            }else {
-              //跳转列表选择页
-              this.$message({
-                message: res.msg,
-                type: "error",
-              });
-            }
-          } else {
-            this.$message({
-              message: "服务器内部故障,请联系管理员",
-              type: "error",
-            });
-          }
-          // 退出游戏
-          this.running = false
-          // 退出全屏
-          this.screen()
-          // 发送数据之后,清理数据
-          this.collectedDataArray = []
-          this.maps.forEach(map => map.count = 0)
-        });
-      }
-
-    },
-    onKeyDown(e) {
-      if (this.disabled) {
-        console.log('注视点时长内不响应任何按键')
-        return
-      } // 注视点时长内不响应任何按键
-      this.disabled = true
-      if (this.collectedDataArray[this.currentIndex].taskType === '1') {
-        // 主任务
-        console.log('主任务')
-
-        // 先选择方向
-        if (this.collectedDataArray[this.currentIndex].mainTaskDirectionActualResponse === '') {
-          // 主任务方向的实际反应
-
-          // 记录主任务的方向选择按键
-          this.collectedDataArray[this.currentIndex].mainTaskDirectionActualResponse = e.code
-          // 记录主任务的方向选择反应时间
-          this.collectedDataArray[this.currentIndex].mainTaskDirectionEndTime = performance.now()
-          // 记录主任务的方向选择按键
-          this.collectedDataArray[this.currentIndex].mainTaskDirectionReactionTime = (this.collectedDataArray[this.currentIndex].mainTaskDirectionEndTime - this.collectedDataArray[this.currentIndex].mainTaskDirectionStartTime).toFixed(2)
-
-          // 判断主任务方向反应是否正确 ‘1’:正确  '0':错误
-          if (this.collectedDataArray[this.currentIndex].mainTaskDirectionActualResponse === this.collectedDataArray[this.currentIndex].mainTaskDirectionCorrectionResponse) {
-            this.collectedDataArray[this.currentIndex].mainTaskDirectionCorrection = '1'
-            console.log('方向选择正确')
-            if (this.practiceFlag) {
-              this.$message({
-                message: '方向反应正确',
-                type: 'success',
-              })
-            }
-            this.disabled = false
-          } else {
-            this.collectedDataArray[this.currentIndex].mainTaskDirectionCorrection = '0'
-            if (e.code === 'Space') {
-              console.log('主任务不可以点击空格键')
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应错误,主任务不可以点击空格键',
-                  type: 'error',
-                })
-              }
-              this.collectedDataArray[this.currentIndex].mainTaskMissileCorrection = '0'
-
-              this.collectedDataArray[this.currentIndex].endTime = performance.now() // 记录本局结束时间
-              this.collectedDataArray[this.currentIndex].onceEndTime = Date.now() // 记录本试次结束时间
-
-              setTimeout(() => {
-                this.disabled = false
-                this.showPic = false
-                // 本次主任务结束,进入下一次
-                this.currentIndex++
-                this.next()
-              }, 500)
-            } else {
-              this.disabled = false
-              console.log('方向反应错误')
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应错误',
-                  type: 'error',
-                })
-              }
-            }
-          }
-        } else {
-          // 如果方向键已经选择过,说明本次按键是为了选择武器挂载的
-          // 主任务挂载的实际反应
-          if (this.collectedDataArray[this.currentIndex].mainTaskMissileActualResponse === '') {
-            // 记录主任务的武器选择按键
-            this.collectedDataArray[this.currentIndex].mainTaskMissileActualResponse = e.code
-            // 记录主任务的武器选择反应时间
-            this.collectedDataArray[this.currentIndex].mainTaskMissileEndTime = performance.now()
-            // 记录主任务的武器选择按键
-            this.collectedDataArray[this.currentIndex].mainTaskMissileReactionTime = (this.collectedDataArray[this.currentIndex].mainTaskMissileEndTime - this.collectedDataArray[this.currentIndex].mainTaskMissileStartTime).toFixed(2)
-
-            // 判断主任务挂载反应是否正确 ‘1’:正确  '2':错误
-            if (this.collectedDataArray[this.currentIndex].mainTaskMissileActualResponse === this.collectedDataArray[this.currentIndex].mainTaskMissileCorrectionResponse) {
-              this.collectedDataArray[this.currentIndex].mainTaskMissileCorrection = '1'
-              console.log('武器选择正确')
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应正确',
-                  type: 'success',
-                })
-              }
-            } else {
-              this.collectedDataArray[this.currentIndex].mainTaskMissileCorrection = '0'
-              console.log('武器选择错误')
-              if (this.practiceFlag) {
-                this.$message({
-                  message: e.code === 'Space' ? '挂载反应错误,主任务不可以点击空格键' : '挂载反应错误',
-                  type: 'error',
-                })
-              }
-            }
-          } else {
-            console.log('按键错误')
-          }
-
-          this.collectedDataArray[this.currentIndex].endTime = performance.now() // 记录本局结束时间
-          this.collectedDataArray[this.currentIndex].onceEndTime = Date.now() // 记录本试次结束时间
-
-          setTimeout(() => {
-            this.disabled = false
-            this.showPic = false
-            // 本次主任务结束,进入下一次
-            this.currentIndex++
-            this.next()
-          }, 500)
-        }
-      } else {
-        // 前瞻性记忆任务
-        console.log('前瞻性记忆任务')
-        // 前瞻性记忆任务的实际反应
-        if (this.collectedDataArray[this.currentIndex].prospectiveTaskActualResponse === '') {
-          // 前瞻性记忆任务选择按键
-          this.collectedDataArray[this.currentIndex].prospectiveTaskActualResponse = e.code
-          // 前瞻性记忆任务结束时间
-          this.collectedDataArray[this.currentIndex].prospectiveTaskEndTime = performance.now()
-          // 前瞻性记忆任务反应时间
-          this.collectedDataArray[this.currentIndex].prospectiveTaskReactionTime = (this.collectedDataArray[this.currentIndex].prospectiveTaskEndTime - this.collectedDataArray[this.currentIndex].prospectiveTaskStartTime).toFixed(2)
-
-          // 判断主任务挂载反应是否正确 ‘1’:正确  '2':错误
-          if (this.collectedDataArray[this.currentIndex].prospectiveTaskActualResponse === this.collectedDataArray[this.currentIndex].prospectiveTaskCorrectionResponse) {
-            this.collectedDataArray[this.currentIndex].prospectiveTaskCorrection = '1'
-            console.log('前瞻性记忆任务选择正确')
-            if (this.practiceFlag) {
-              this.$message({
-                message: '前瞻性记忆任务反应正确',
-                type: 'success',
-              })
-            }
-          } else {
-            this.collectedDataArray[this.currentIndex].prospectiveTaskCorrection = '0'
-            console.log('前瞻性记忆任务选择错误')
-            if (this.practiceFlag) {
-              this.$message({
-                message: '前瞻性记忆任务反应错误',
-                type: 'error',
-              })
-            }
-          }
-
-          this.collectedDataArray[this.currentIndex].endTime = performance.now() // 记录本局结束时间
-          this.collectedDataArray[this.currentIndex].onceEndTime = Date.now() // 记录本试次结束时间
-
-          setTimeout(() => {
-            this.disabled = false
-            this.showPic = false
-            // 本次前瞻性记忆任务结束,进入下一次
-            this.currentIndex++
-            this.next()
-          }, 500)
-        } else {
-          this.disabled = false
-          this.showPic = false
-          // 本次前瞻性记忆任务结束,进入下一次
-          this.currentIndex++
-          this.next()
-        }
-      }
-    }
-  },
-  mounted() {
-    window.addEventListener('keydown', this.onKeyDown)
-  },
-  destroyed() {
-    window.removeEventListener('keydown', this.onKeyDown)
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-
-$sizeModifier: 2.1;
-
-.bTitle {
-  font-size: 24px;
-  color: #333333;
-  text-align: left;
-  text-indent: 20px;
-}
-
-#t1 {
-  font-size: 18px;
-  height: 36px;
-  line-height: 36px;
-  background: rgba(0, 0, 0, 0.39);
-  border-radius: 24px;
-  color: #ffffff;
-  margin-left: 240px;
-  text-align: center;
-}
-
-.pd-r16 {
-  padding-top: 8px;
-  padding-right: 16px;
-}
-
-#body2 {
-  margin-top: 65px;
-}
-.item {
-  width: 200px;
-  height: 210px;
-  margin-top: 20px;
-  margin-right: 10px;
-  float: left;
-}
-
-.el-image {
-  width: 100%;
-  height: 100%;
-}
-.btn {
-  margin-top: 60px;
-  margin-left: -10%;
-}
-.pbg {
-  position: fixed;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 100;
-  background: rgba(0, 0, 0, 0.7);
-}
-.mainbody {
-  height: 550px;
-  width: 500px;
-  border: 2px solid black;
-  border-radius: 12px;
-  background: #ffffff;
-}
-
-/*居中效果*/
-.middle {
-  /*使左上角对应到父元素的中心*/
-
-  top: 50%;
-  left: 50%;
-  position: absolute;
-  /*向左向上偏移50%*/
-  transform: translate(-50%, -50%);
-}
-.activeTask {
-  background: url(/static/flying/bg_game.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-.activeTask3 {
-  background: url(../../../assets/congnitiveAblitity/zhixing.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  /* position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0; */
-}
-.glass {
-  width: 932px;
-  height: 720px;
-  background: rgba(255, 255, 255, 0.39);
-  border: 1px solid rgba(255, 255, 255, 0.6);
-  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
-  border-radius: 12px;
-  position: absolute;
-  top: 46%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-
-  .opt-outline {
-    width: 70%;
-    height: 400px;
-    border: solid;
-    margin-left: 15%;
-  }
-
-  .opt-div {
-    width: 50%;
-    height: 400px;
-    float: right;
-    border-left: solid;
-    justify-content: space-around;
-
-    .start-bb {
-      width: 120px;
-      height: 42px;
-      border: 2px solid rgba(255, 255, 255, 0.8);
-      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
-      opacity: 1;
-      border-radius: 39px;
-      color: white;
-    }
-  }
-}
-.opt-tips {
-  font-size: 13px;
-  text-align: left;
-  text-indent: 2em;
-}
-
-#game {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  //border: 1px solid black;
-  background-image: url("/static/flying/dashboard.png");
-  background-repeat: no-repeat;
-  background-size: 95% 90%;
-  background-position: center;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: space-around;
-}
-#missile {
-  width: 359.5px * $sizeModifier;
-  height: 359.5px * $sizeModifier;
-}
-#compass {
-  width: 359.5px * $sizeModifier;
-  height: 359.5px * $sizeModifier;
-}
-
-#tip {
-  width: 809px;
-  height: 100px;
-  position: absolute;
-  left: 50%;
-  top: 800px;
-  transform: translateX(-50%);
-  background-color: #0abdc4;
-}
-
-#arrow {
-  width: 32px;
-  height: 32px;
-}
-</style>

+ 0 - 1166
src/views/CognitiveAbilityTask/prospectiveMemoryAbility/formal_back.vue

@@ -1,1166 +0,0 @@
-<template>
-  <div class="content-container">
-    <div class="content-outline" v-if="!running">
-      <div class="left_part">
-        <div id="left_top" class="flex-row">
-          <el-image class="setting" :src="require('@/assets/9551.png')" fit="cover" />
-          <div class="text"> 操作提示:</div>
-        </div>
-        <div class="left-desc-80" v-html="subjectInfo.testDescription" />
-      </div>
-      <div
-          class="right_part"
-          :style="{
-          background:
-            'url(' + require('../../../assets/page' + taskId + '.png') + ')',
-          'background-size': '100% 100%',
-        }"
-      >
-        <div id="title">
-          <span>{{ subjectInfo.name }}</span>
-        </div>
-        <div
-            style="
-            position: absolute;
-            bottom: 0.156rem;
-            left: 50%;
-            transform: translateX(-50%);
-          "
-        >
-          <el-button type="primary" class="start" @click="startTest()">
-            {{ practiceFlag ? '开始练习' : '正式测试' }}
-          </el-button>
-        </div>
-      </div>
-    </div>
-
-    <div v-if="running" class="activeTask" >
-      <MainProgress v-if="!practiceFlag" :cur-percentage="progress" />
-
-      <div class="taskHead">
-        <div class="scale" @click.stop="screen">
-          <img src="@/assets/small-big.png" alt="" />
-        </div>
-      </div>
-      <div id="game">
-        <img ref="missile" id="missile" v-if="showCurrentMissile" :src="currentMissile.image" alt="" draggable="false">
-        <img ref="compass" id="compass" v-if="showCurrentCompass" :src="currentCompass.image" alt="" draggable="false">
-      </div>
-      <div id="tip" v-if="false">
-        <img id="arrow" v-if="currentArrowImg" :src="currentArrowImg" alt="">
-      </div>
-    </div>
-
-
-<!--    <pre>{{ practiceMaps }}</pre>-->
-
-    <go-back />
-  </div>
-</template>
-
-<script>
-import screenfull from "screenfull";
-import { oSessionStorage, dateFormat } from "@/utils/utils";
-import GoBack from "@/components/goBack/index.vue"
-import MainProgress from "@/components/MainProgress/index.vue"
-
-export default {
-  name: "prospectiveMemoryAbility",
-  components: { GoBack, MainProgress },
-  data() {
-    return {
-      subjectInfo: "", //认知任务详情
-
-      taskId: "", // 认知任务id
-      userId: '',
-
-      disabled: true, // 是否处于注视点时长内,如果是,在不响应任何按键
-
-      running: false,  // 游戏是否开始
-      practiceFlag: true, // 是否处于练习模式,默认是练习模式
-
-      selectedDirection: '',  // 用户选择的方向,left 或 right
-      selectedKey: '',  // 用户当前选择的按键,用于阻止重复选择
-      missiles: [
-        { id: 'm0s0', middle: 0, short: 0, image: '/static/flying/middle0short0.png' },
-        { id: 'm0s1', middle: 0, short: 1, image: '/static/flying/middle0short1.png' },
-        { id: 'm0s2', middle: 0, short: 2, image: '/static/flying/middle0short2.png' },
-        { id: 'm1s0', middle: 1, short: 0, image: '/static/flying/middle1short0.png' },
-        { id: 'm1s1', middle: 1, short: 1, image: '/static/flying/middle1short1.png' },
-        { id: 'm1s2', middle: 1, short: 2, image: '/static/flying/middle1short2.png' },
-        { id: 'm2s0', middle: 2, short: 0, image: '/static/flying/middle2short0.png' },
-        { id: 'm2s1', middle: 2, short: 1, image: '/static/flying/middle2short1.png' },
-        { id: 'm2s2', middle: 2, short: 2, image: '/static/flying/middle2short2.png' },
-      ],
-      currentMissile: null,
-      compasses: [
-        { id: 'tjq1di', type: 'j', quadrant: 1, distance: 'inner', image: '/static/flying/tjq1di.png' },
-        { id: 'tjq2di', type: 'j', quadrant: 2, distance: 'inner', image: '/static/flying/tjq2di.png' },
-        { id: 'tjq3di', type: 'j', quadrant: 3, distance: 'inner', image: '/static/flying/tjq3di.png' },
-        { id: 'tjq4di', type: 'j', quadrant: 4, distance: 'inner', image: '/static/flying/tjq4di.png' },
-        { id: 'tjq1do', type: 'j', quadrant: 1, distance: 'outer', image: '/static/flying/tjq1do.png' },
-        { id: 'tjq2do', type: 'j', quadrant: 2, distance: 'outer', image: '/static/flying/tjq2do.png' },
-        { id: 'tjq3do', type: 'j', quadrant: 3, distance: 'outer', image: '/static/flying/tjq3do.png' },
-        { id: 'tjq4do', type: 'j', quadrant: 4, distance: 'outer', image: '/static/flying/tjq4do.png' },
-        { id: 'tjq1dc', type: 'j', quadrant: 1, distance: 'center', image: '/static/flying/tjq1dc.png' },
-        { id: 'tjq2dc', type: 'j', quadrant: 2, distance: 'center', image: '/static/flying/tjq2dc.png' },
-        { id: 'tjq3dc', type: 'j', quadrant: 3, distance: 'center', image: '/static/flying/tjq3dc.png' },
-        { id: 'tjq4dc', type: 'j', quadrant: 4, distance: 'center', image: '/static/flying/tjq4dc.png' },
-
-        { id: 'tyq1di', type: 'y', quadrant: 1, distance: 'inner', image: '/static/flying/tyq1di.png' },
-        { id: 'tyq2di', type: 'y', quadrant: 2, distance: 'inner', image: '/static/flying/tyq2di.png' },
-        { id: 'tyq3di', type: 'y', quadrant: 3, distance: 'inner', image: '/static/flying/tyq3di.png' },
-        { id: 'tyq4di', type: 'y', quadrant: 4, distance: 'inner', image: '/static/flying/tyq4di.png' },
-        { id: 'tyq1do', type: 'y', quadrant: 1, distance: 'outer', image: '/static/flying/tyq1do.png' },
-        { id: 'tyq2do', type: 'y', quadrant: 2, distance: 'outer', image: '/static/flying/tyq2do.png' },
-        { id: 'tyq3do', type: 'y', quadrant: 3, distance: 'outer', image: '/static/flying/tyq3do.png' },
-        { id: 'tyq4do', type: 'y', quadrant: 4, distance: 'outer', image: '/static/flying/tyq4do.png' },
-        { id: 'tyq1dc', type: 'y', quadrant: 1, distance: 'center', image: '/static/flying/tyq1dc.png' },
-        { id: 'tyq2dc', type: 'y', quadrant: 2, distance: 'center', image: '/static/flying/tyq2dc.png' },
-        { id: 'tyq3dc', type: 'y', quadrant: 3, distance: 'center', image: '/static/flying/tyq3dc.png' },
-        { id: 'tyq4dc', type: 'y', quadrant: 4, distance: 'center', image: '/static/flying/tyq4dc.png' },
-
-        { id: 'tnq1di', type: 'n', quadrant: 1, distance: 'inner', image: '/static/flying/tnq1di.png' },
-        { id: 'tnq2di', type: 'n', quadrant: 2, distance: 'inner', image: '/static/flying/tnq2di.png' },
-        { id: 'tnq3di', type: 'n', quadrant: 3, distance: 'inner', image: '/static/flying/tnq3di.png' },
-        { id: 'tnq4di', type: 'n', quadrant: 4, distance: 'inner', image: '/static/flying/tnq4di.png' },
-        { id: 'tnq1do', type: 'n', quadrant: 1, distance: 'outer', image: '/static/flying/tnq1do.png' },
-        { id: 'tnq2do', type: 'n', quadrant: 2, distance: 'outer', image: '/static/flying/tnq2do.png' },
-        { id: 'tnq3do', type: 'n', quadrant: 3, distance: 'outer', image: '/static/flying/tnq3do.png' },
-        { id: 'tnq4do', type: 'n', quadrant: 4, distance: 'outer', image: '/static/flying/tnq4do.png' },
-        { id: 'tnq1dc', type: 'n', quadrant: 1, distance: 'center', image: '/static/flying/tnq1dc.png' },
-        { id: 'tnq2dc', type: 'n', quadrant: 2, distance: 'center', image: '/static/flying/tnq2dc.png' },
-        { id: 'tnq3dc', type: 'n', quadrant: 3, distance: 'center', image: '/static/flying/tnq3dc.png' },
-        { id: 'tnq4dc', type: 'n', quadrant: 4, distance: 'center', image: '/static/flying/tnq4dc.png' },
-      ],
-      pseudoRandomArray: [
-        // 伪随机数组,前72个是主任务,后8个是前瞻性任务
-        // 第1-12个是左键-A键, 第13-24个是左键-S键, 第25-36个是左键-D键, 第37-48个是右键-A键, 第49-60个是右键-S键, 第61-72个是右键-D键, 第73-80个是空格键
-        { missile: 'm1s0', compass: 'tjq3dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm1s1', compass: 'tjq3dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm1s2', compass: 'tjq3dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm2s0', compass: 'tjq3dc', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm2s1', compass: 'tjq3dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm2s2', compass: 'tjq3dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq3dc.png' },
-        { missile: 'm1s0', compass: 'tjq2dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm1s1', compass: 'tjq2dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm1s2', compass: 'tjq2dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm2s0', compass: 'tjq2dc', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm2s1', compass: 'tjq2dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm2s2', compass: 'tjq2dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm1s0', compass: 'tjq1dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm1s1', compass: 'tjq1dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm1s2', compass: 'tjq1dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm2s0', compass: 'tjq1dc', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm2s1', compass: 'tjq1dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm2s2', compass: 'tjq1dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm1s0', compass: 'tjq4dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm1s1', compass: 'tjq4dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm1s2', compass: 'tjq4dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm2s0', compass: 'tjq4dc', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm2s1', compass: 'tjq4dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm2s2', compass: 'tjq4dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm0s1', compass: 'tjq3di', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm1s1', compass: 'tjq3di', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm2s1', compass: 'tjq3di', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm0s2', compass: 'tjq3di', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm1s2', compass: 'tjq3di', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm2s2', compass: 'tjq3di', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq3di.png' },
-        { missile: 'm0s1', compass: 'tjq2di', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm1s1', compass: 'tjq2di', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm2s1', compass: 'tjq2di', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm0s2', compass: 'tjq2di', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm1s2', compass: 'tjq2di', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm2s2', compass: 'tjq2di', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq2di.png' },
-        { missile: 'm0s1', compass: 'tjq1dc', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm1s1', compass: 'tjq1dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm2s1', compass: 'tjq1dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm0s2', compass: 'tjq1dc', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm1s2', compass: 'tjq1dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm2s2', compass: 'tjq1dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq1dc.png' },
-        { missile: 'm0s1', compass: 'tjq4dc', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm1s1', compass: 'tjq4dc', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm2s1', compass: 'tjq4dc', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm0s2', compass: 'tjq4dc', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm1s2', compass: 'tjq4dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm2s2', compass: 'tjq4dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tjq4dc.png' },
-        { missile: 'm0s0', compass: 'tyq2di', leftImg: '/static/flying/m0s0.png', rightImg: '/static/flying/tyq2di.png' },
-        { missile: 'm0s1', compass: 'tyq3di', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tyq3di.png' },
-        { missile: 'm0s2', compass: 'tyq2dc', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tyq2dc.png' },
-        { missile: 'm1s0', compass: 'tyq3dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tyq3dc.png' },
-        { missile: 'm1s1', compass: 'tyq2do', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tyq2do.png' },
-        { missile: 'm1s2', compass: 'tyq3do', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tyq3do.png' },
-        { missile: 'm2s0', compass: 'tyq2di', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tyq2di.png' },
-        { missile: 'm2s1', compass: 'tyq3di', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tyq3di.png' },
-        { missile: 'm2s2', compass: 'tyq2dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tyq2dc.png' },
-        { missile: 'm0s1', compass: 'tyq3dc', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tyq3dc.png' },
-        { missile: 'm1s2', compass: 'tyq2do', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tyq2do.png' },
-        { missile: 'm2s0', compass: 'tyq3do', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tyq3do.png' },
-        { missile: 'm0s0', compass: 'tyq1di', leftImg: '/static/flying/m0s0.png', rightImg: '/static/flying/tyq1di.png' },
-        { missile: 'm0s1', compass: 'tyq4di', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tyq4di.png' },
-        { missile: 'm0s2', compass: 'tyq1dc', leftImg: '/static/flying/m0s2.png', rightImg: '/static/flying/tyq1dc.png' },
-        { missile: 'm1s0', compass: 'tyq4dc', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tyq4dc.png' },
-        { missile: 'm1s1', compass: 'tyq1do', leftImg: '/static/flying/m1s1.png', rightImg: '/static/flying/tyq1do.png' },
-        { missile: 'm1s2', compass: 'tyq4do', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tyq4do.png' },
-        { missile: 'm2s0', compass: 'tyq1di', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tyq1di.png' },
-        { missile: 'm2s1', compass: 'tyq4di', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tyq4di.png' },
-        { missile: 'm2s2', compass: 'tyq1dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tyq1dc.png' },
-        { missile: 'm0s1', compass: 'tyq4dc', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tyq4dc.png' },
-        { missile: 'm1s2', compass: 'tyq1do', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tyq1do.png' },
-        { missile: 'm2s0', compass: 'tyq4do', leftImg: '/static/flying/m2s0.png', rightImg: '/static/flying/tyq4do.png' },
-        { missile: 'm2s1', compass: 'tnq1di', leftImg: '/static/flying/m2s1.png', rightImg: '/static/flying/tnq1di.png' },
-        { missile: 'm2s2', compass: 'tnq2dc', leftImg: '/static/flying/m2s2.png', rightImg: '/static/flying/tnq2dc.png' },
-        { missile: 'm0s1', compass: 'tnq3do', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tnq3do.png' },
-        { missile: 'm1s2', compass: 'tnq4dc', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tnq4dc.png' },
-        { missile: 'm1s0', compass: 'tjq1do', leftImg: '/static/flying/m1s0.png', rightImg: '/static/flying/tjq1do.png' },
-        { missile: 'm0s1', compass: 'tjq2dc', leftImg: '/static/flying/m0s1.png', rightImg: '/static/flying/tjq2dc.png' },
-        { missile: 'm1s2', compass: 'tjq3do', leftImg: '/static/flying/m1s2.png', rightImg: '/static/flying/tjq3do.png' },
-        { missile: 'm0s0', compass: 'tjq4di', leftImg: '/static/flying/m0s0.png', rightImg: '/static/flying/tjq4di.png' }
-      ],leftImg: '/static/flying/m1s2.png',
-      currentCompass: null,
-      testMaps: [
-        { id: '1', count: 0, total: 1},
-        { id: '2', count: 0, total: 1},
-        { id: '3', count: 0, total: 1},
-        { id: '4', count: 0, total: 1},
-        { id: '5', count: 0, total: 12},
-        { id: '6', count: 0, total: 12},
-        { id: '7', count: 0, total: 12},
-      ],
-      practiceMaps: [
-        { id: '1', count: 0, total: 1 },
-        { id: '2', count: 0, total: 1 },
-        { id: '3', count: 0, total: 1 },
-        { id: '4', count: 0, total: 1 },
-        { id: '5', count: 0, total: 1 },
-        { id: '6', count: 0, total: 1 },
-        { id: '7', count: 0, total: 1 },
-      ],
-      currentMap: null,
-      collectedDataArray: [
-        // {
-        //   id: 1,
-        //   name: '1',
-        //   startTime: '',
-        //   missile: '',
-        //   compass: '',
-        //   taskType: '1', // 1 主任务,2 前瞻性任务
-        //   mainTaskDirectionReactionTime: '', // 主任务的方向选择反应时间
-        //   mainTaskMissileReactionTime: '', // 主任务的挂载反应时间
-        //   mainTaskDirectionCorrection: '', // 主任务的方向选择是否正确
-        //   mainTaskMissileCorrection: '', // 主任务的挂载选择是否正确
-        //   prospectiveTaskReactionTime: '', // 主任务的反应时间
-        //   prospectiveTaskCorrection: '', // 主任务的反应是否正确
-        // }
-      ],
-      collectedData: null,
-      directionKey: '',
-      missileKey: '',
-      prospectiveKey: '',
-      taskStartTime: 0, // 任务开始时间
-      taskEndTime: 0, // 任务结束时间
-
-      showCurrentMissile: false, // 隐藏图片
-      showCurrentCompass: false  // 隐藏图片
-    };
-  },
-  computed: {
-    maps: {
-      get() {
-        if (this.practiceFlag) {
-          return this.practiceMaps
-        } else {
-          return this.testMaps
-        }
-      },
-    },
-    // 计算游戏进度
-    progress() {
-      const { count, total } = this.maps.reduce((acc, cur) => {
-        acc.count += cur.count
-        acc.total += cur.total
-        return acc
-      }, { count: 0, total: 0 });
-      return count / total
-    },
-    currentArrowImg() {
-      if (this.directionKey === 'ArrowLeft') {
-        return '/static/flying/arrow_left.png'
-      } else if (this.directionKey === 'ArrowRight') {
-        return '/static/flying/arrow_right.png'
-      } else {
-        return ''
-      }
-    }
-  },
-  created() {
-    this.taskId = this.$route.query.taskId;
-    this.subjectInfo = JSON.parse(oSessionStorage.getItem("subjectInfo"));
-    console.log('this.subjectInfo: ', this.subjectInfo)
-    this.userId = sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f");
-  },
-  watch: {
-    currentMissile(newVal) {
-      if(newVal && this.currentCompass !== null) {
-        this.showCurrentMissile = true
-        this.showCurrentCompass = true
-      } else {
-        this.showCurrentMissile = false
-        this.showCurrentCompass = false
-      }
-    }
-  },
-  methods: {
-    screen() {
-      screenfull.toggle()
-    },
-
-    startTest() {
-      // 进入游戏
-      this.running = true
-      // 进入全屏
-      this.screen()
-      // 开始游戏
-      this.next()
-      this.taskStartTime = Date.now()
-    },
-    initData(id) {
-      this.collectedData = {
-        id: 1,
-        // name: '1',
-        startTime: Date.now(),  // 本局开始时间
-        endTime: '',  // 本剧结束时间
-        onceStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date()),
-        onceEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date()),
-        missile: '', // 记录左边图片是九类中的哪一种
-        compass: '', // 记录右边图片是36种的哪一种
-        taskType: id < 5 ? '2' : '1', // 1 主任务,2 前瞻性记忆任务
-        mainTaskDirectionReactionTime: '', // 主任务的方向选择反应时间
-        mainTaskDirectionCorrection: '', // 主任务的方向选择是否正确
-        mainTaskDirectionStartTime: Date.now(), // 主任务方向选择的开始时间
-        mainTaskDirectionEndTime: '', // 主任务方向选择的结束时间
-        mainTaskDirectionCorrectionResponse: '', // 主任务方向正确反应 ['ArrowLeft' | 'ArrowRight' | '']
-        mainTaskDirectionActualResponse: '', // 主任务方向实际反应 ['ArrowLeft' | 'ArrowRight' | '其他任意按键' | '']
-
-        mainTaskMissileReactionTime: '', // 主任务的挂载反应时间
-        mainTaskMissileCorrection: '', // 主任务的挂载选择是否正确
-        mainTaskMissileStartTime: Date.now(), // 主任务武器选择的开始时间
-        mainTaskMissileEndTime: '', // 主任务武器选择的结束时间
-        mainTaskMissileCorrectionResponse: '', // 主任务挂载正确反应 ['KeyA' | 'KeyS' | 'KeyD' | '']
-        mainTaskMissileActualResponse: '', // 主任务挂载实际反应 ['KeyA' | 'KeyS' | 'KeyD' | '其他任意按键' | '']
-
-        prospectiveTaskReactionTime: '', // 前瞻性记忆任务的反应时间
-        prospectiveTaskCorrection: '', // 前瞻性记忆任务的反应是否正确
-        prospectiveTaskStartTime: Date.now(), // 前瞻性记忆任务反应的开始时间
-        prospectiveTaskEndTime: '', // 前瞻性记忆任务反应的结束时间
-        prospectiveTaskCorrectionResponse: '', // 前瞻性记忆任务正确反应  ['Space' | '']
-        prospectiveTaskActualResponse: '', // 前瞻性记忆任务实际反应  ['Space' | 'ArrowLeft' | 'ArrowRight' | '其他任意按键' | '']
-      }
-    },
-    next() {
-      console.log('next')
-      console.log(this.collectedData, this.collectedDataArray)
-
-      // 随机选择左右图映射关系
-      const tempMaps = this.maps.filter(map => map.count < map.total)  // 过滤出未达到指定数量的映射对象
-      if (tempMaps.length > 0) {
-        setTimeout(() => {
-          this.currentMap = tempMaps[Math.floor(Math.random() * tempMaps.length)]  // 随机选择为达到指定数量的映射对象
-          this.initData(this.currentMap)
-          this.updateMissile()  // 根据映射表ID(currentMap.id) 选择左侧挂载界面,同时在 this.collectedData.missile 中记录界面标识
-          this.updateCompass()  // 根据映射表ID(currentMap.id) 选择右侧姿态界面,同时在 this.collectedData.compass 中记录界面标识
-          this.directionKey = ''
-          this.missileKey = ''
-          this.prospectiveKey = ''
-
-          // 注视点时长300-500之间
-          setTimeout(() => this.disabled = false, Math.floor(Math.random() * 200 + 300))
-        }, 500) // 空屏 500 毫秒
-
-        this.disabled = true // 开启注视点时长控制
-      } else {
-        // 游戏结束
-        console.log('游戏结束')
-        if (this.practiceFlag) {
-          // 游戏结束时,如果是练习模式,则不发送数据,,,并且
-          this.running = false // 退出游戏
-          this.screen() // 退出全屏
-          this.collectedDataArray = [] // 清理数据
-          this.maps.forEach(map => map.count = 0)
-          // 否则进入正式测试模式
-          this.practiceFlag = false  // 将练习标识改成 false,下次开始游戏时,则为正式测试
-        } else {
-          // 如果不是测试模式,则发送,发送完成后,退出游戏,退出全屏,清理数据
-          this.sendCollectedData()
-        }
-      }
-
-      // console.log(this.missileBoard.currentMissile)
-      // console.log(this.compassBoard.currentCompass)
-      // console.log(this.currentMap)
-    },
-    updateCompass() {
-      if (this.currentMap.id === '1') {
-        // 选择未识别飞机
-        const tempCompasses = this.compasses.filter(compass => compass.type === 'n')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '2') {
-        // 选择中距目标机
-        const tempCompasses = this.compasses.filter(compass => compass.distance === 'center')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '3') {
-        // 选择近距目标机
-        const tempCompasses = this.compasses.filter(compass => compass.distance === 'inner')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '4') {
-        // 选择标号为歼击机,并且超出 60KM 距离的目标机
-        const tempCompasses = this.compasses.filter(compass => compass.type === 'j' && compass.distance === 'outer')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '5') {
-        // 选择标号为歼击机,并且在 20 - 60KM 内的目标机
-        const tempCompasses = this.compasses.filter(compass => compass.type === 'j' && compass.distance === 'center')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '6') {
-        // 选择标号为歼击机,并且在 20KM 内的目标机
-        const tempCompasses = this.compasses.filter(compass => compass.type === 'j' && compass.distance === 'inner')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      } else if (this.currentMap.id === '7') {
-        // 选择标号为预警机的目标机
-        const tempCompasses = this.compasses.filter(compass => compass.type === 'y')
-        this.currentCompass = tempCompasses[Math.floor(Math.random() * tempCompasses.length)]
-      }
-      // 记录右边图片是36种的哪一种
-      this.collectedData.compass = this.currentCompass.id
-    },
-    updateMissile() {
-      let imgStart = Date.now()
-      console.log(' -- 开始:', imgStart)
-      if (this.currentMap.id === '1') {
-        // 随机选择挂载图
-        this.currentMissile = this.missiles[Math.floor(Math.random() * this.missiles.length)]
-      } else if (this.currentMap.id === '2') {
-        // 选择无中距弹的挂载图
-        const tempMissiles = this.missiles.filter(missile => missile.middle === 0)
-        this.currentMissile = tempMissiles[Math.floor(Math.random() * tempMissiles.length)]
-      } else if (this.currentMap.id === '3') {
-        // 选择无近距弹且无中距弹的挂载图
-        const tempMissiles = this.missiles.filter(missile => missile.short === 0 && missile.middle === 0)
-        this.currentMissile = tempMissiles[Math.floor(Math.random() * tempMissiles.length)]
-      } else if (this.currentMap.id === '4') {
-        // 随机选择挂载图
-        this.currentMissile = this.missiles[Math.floor(Math.random() * this.missiles.length)]
-      } else if (this.currentMap.id === '5') {
-        // 选择有中距弹的挂载图
-        const tempMissiles = this.missiles.filter(missile => missile.middle > 0)
-        this.currentMissile = tempMissiles[Math.floor(Math.random() * tempMissiles.length)]
-      } else if (this.currentMap.id === '6') {
-        // 选择有近距弹并无中距弹的挂载图
-        const tempMissiles = this.missiles.filter(missile => missile.short > 0 && missile.middle === 0)
-        this.currentMissile = tempMissiles[Math.floor(Math.random() * tempMissiles.length)]
-      } else if (this.currentMap.id === '7') {
-        // 随机带有干扰仓的图(随机选择,因为所有图中都有干扰仓)
-        this.currentMissile = this.missiles[Math.floor(Math.random() * this.missiles.length)]
-      }
-      // 记录左边图片是九类中的哪一种
-      this.collectedData.missile = this.currentMissile.id
-      let imgEnd = Date.now()
-      console.log(' -- 开始:', imgEnd, ' --- 间隔: ', imgEnd - imgStart)
-    },
-    sendCollectedData() {
-      // 计算各种反应时间,单位秒,保留两位小数
-      const result = this.collectedDataArray.map(data => {
-        if (data.taskType === '1') {
-          // 如果是主任务,只计算主任务的数据
-          console.log('aaaa', data.mainTaskMissileEndTime, data.mainTaskDirectionEndTime)
-          return {
-            ...data,
-            startTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.startTime)),
-            endTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.endTime)),
-            onceStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.startTime)),
-            onceEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.endTime)),
-            responseTime: data.endTime - data.startTime,
-            mainTaskDirectionReactionTime: (data.mainTaskDirectionEndTime - data.mainTaskDirectionStartTime).toFixed(2),
-            mainTaskMissileReactionTime: (data.mainTaskMissileEndTime - data.mainTaskMissileStartTime).toFixed(2),
-          }
-        } else {
-          return {
-            ...data,
-            startTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.startTime)),
-            endTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.endTime)),
-            onceStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.startTime)),
-            onceEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(data.endTime)),
-            responseTime: data.endTime - data.startTime,
-            prospectiveTaskReactionTime: (data.prospectiveTaskEndTime - data.prospectiveTaskStartTime).toFixed(2),
-          }
-        }
-      })
-
-      // 计算各种成绩和准确率
-      const {
-          prospectiveTaskScore,
-          prospectiveTaskCount,
-          prospectiveTaskRight,
-          mainTaskDirectionScore,
-          mainTaskDirectionCount,
-          mainTaskDirectionRight,
-          mainTaskMissileScore,
-          mainTaskMissileCount,
-          mainTaskMissileRight
-      } = result.reduce((obj, task) => {
-        if (task.taskType === '1') {
-          if (task.mainTaskDirectionCorrection === '1') {
-            obj.mainTaskDirectionScore++
-            obj.mainTaskDirectionRight++
-          }
-          obj.mainTaskDirectionCount++
-          if (task.mainTaskDirectionCorrection === '1') {
-            obj.mainTaskMissileScore++
-            obj.mainTaskMissileRight++
-          }
-          obj.mainTaskMissileCount++
-        } else {
-          if (task.prospectiveTaskCorrection === '1') {
-            obj.prospectiveTaskScore++
-            obj.prospectiveTaskRight++
-          }
-          obj.prospectiveTaskCount++
-        }
-        return obj
-      }, {
-        prospectiveTaskScore: 0, // 前瞻性任务成绩
-        prospectiveTaskCount: 0, // 前瞻性任务数量
-        prospectiveTaskRight: 0, // 前瞻性任务正确数量
-
-        mainTaskDirectionScore: 0, // 主任务方向选择成绩
-        mainTaskDirectionCount: 0, // 主任务方向选择数量
-        mainTaskDirectionRight: 0, // 主任务方向选择正确数量
-
-        mainTaskMissileScore: 0, // 主任务子弹选择成绩
-        mainTaskMissileCount: 0, // 主任务子弹选择数量
-        mainTaskMissileRight: 0, // 主任务子弹选择正确数量
-      })
-
-      const prospectiveTaskAccuracy = (prospectiveTaskRight / prospectiveTaskCount * 100).toFixed(2)
-      const mainTaskDirectionAccuracy = (mainTaskDirectionRight / mainTaskDirectionCount * 100).toFixed(2)
-      const mainTaskMissileAccuracy = (mainTaskMissileRight / mainTaskMissileCount * 100).toFixed(2)
-
-      this.taskEndTime = Date.now()
-      console.log('xxx前瞻性记忆任务:', this.taskEndTime - this.taskStartTime + 'ms');
-
-      const data = {
-        userId: this.userId,
-        testPlanId: this.$route.query.testPlanId || '',
-        prospectiveTaskScore, // 前瞻性任务成绩
-        prospectiveTaskAccuracy, // 前瞻性任务平均准确率
-        mainTaskDirectionScore, // 主任务方向选择成绩
-        mainTaskDirectionAccuracy, // 主任务方向选择平均准确率
-        mainTaskMissileScore, // 主任务子弹选择成绩
-        mainTaskMissileAccuracy, //  主任务子弹选择准确率
-        result,
-        taskStartTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(this.taskStartTime)),
-        taskEndTime: dateFormat("YY-mm-dd HH:MM:SS", new Date(this.taskEndTime)),
-      }
-
-      console.log(' ------ 前瞻性任务提交数据:', data)
-      console.log(' ------ 前瞻性任务提交数据:', data.result.filter(item => item.taskType === '1').length)
-
-      // console.log(mainTaskDirectionRight, mainTaskDirectionCount)
-      // console.log(mainTaskMissileRight,mainTaskMissileCount)
-      // console.log(data)
-
-      // {
-      //   userId: '',
-      //   testPlanId: "",
-      //   prospectiveTaskScore: 0, // 前瞻性任务成绩
-      //   prospectiveTaskAccuracy: 0, // 前瞻性任务平均准确率
-      //   mainTaskDirectionScore: 0, // 主任务方向选择成绩
-      //   mainTaskDirectionAccuracy: 0, // 主任务方向选择平均准确率
-      //   mainTaskMissileScore: 0, // 主任务子弹选择成绩
-      //   mainTaskMissileAccuracy: 0, //  主任务子弹选择准确率
-      //   result: [
-      //     {
-      //       startTime: '',  // 本局开始时间
-      //       endTime: '',  // 本剧结束时间
-      //       missile: '', // 记录左边图片是九类中的哪一种
-      //       compass: '', // 记录右边图片是36种的哪一种
-      //       taskType: '', // 1 主任务,2 前瞻性记忆任务
-      //       mainTaskDirectionReactionTime: '', // 主任务的方向选择反应时间
-      //       mainTaskDirectionCorrection: '', // 主任务的方向选择是否正确
-      //       mainTaskDirectionEndTime: '', // 主任务方向选择的结束时间
-      //
-      //       mainTaskMissileReactionTime: '', // 主任务的挂载反应时间
-      //       mainTaskMissileCorrection: '', // 主任务的挂载选择是否正确
-      //       mainTaskMissileEndTime: '', // 主任务武器选择的结束时间
-      //
-      //       prospectiveTaskReactionTime: '', // 前瞻性记忆任务的反应时间
-      //       prospectiveTaskCorrection: '', // 前瞻性记忆任务的反应是否正确
-      //       prospectiveTaskEndTime: '', // 前瞻性记忆任务反应的结束时间
-      //     }
-      //   ]
-      // }
-
-      if (
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") === "" ||
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == null
-      ) {
-        alert("请先登录!");
-        return;
-      } else {
-        this.$http.post("/cognize/ProspectiveMemory", data, (res) => {
-          console.log(res)
-          if (parseInt(res.code) === 200) {
-            this.$message({
-              message: "数据提交成功",
-              type: "success",
-            });
-            if(res.data && res.data != null){
-              //跳转测试结果页
-              this.goTestResult(res.data);
-            }else {
-              //跳转列表选择页
-              this.$message({
-                message: res.msg,
-                type: "error",
-              });
-            }
-          } else {
-            this.$message({
-              message: "服务器内部故障,请联系管理员",
-              type: "error",
-            });
-          }
-          // 退出游戏
-          this.running = false
-          // 退出全屏
-          this.screen()
-          // 发送数据之后,清理数据
-          this.collectedDataArray = []
-          this.maps.forEach(map => map.count = 0)
-        });
-      }
-
-    },
-    onKeyDown(e) {
-      if (this.disabled) {
-        console.log('注视点时长内不响应任何按键')
-        return
-      } // 注视点时长内不响应任何按键
-
-      console.log(this.collectedData)
-      this.collectedData.taskType = '1' // 初始化任务类型,1 主任务,2 前瞻性记忆任务
-
-      // 判断任务类型
-      if (this.currentCompass.type === 'n') {
-        // 1. 目标机三角内无标识(未识别飞机)
-        this.collectedData.taskType = '2'
-      } else if (this.currentCompass.distance === 'center' && this.currentMissile.middle === 0 && this.currentCompass.type !== 'y') {
-        // 2. 目标机在中距但挂载无中距弹
-        this.collectedData.taskType = '2'
-      } else if (this.currentCompass.distance === 'inner' && this.currentMissile.short === 0 && this.currentCompass.type !== 'y') {
-        // 3. 目标机在近距但挂载无近距弹
-        this.collectedData.taskType = '2'
-      } else if (this.currentCompass.type === 'j' && this.currentCompass.distance === 'outer') {
-        // 4. 目标机为歼击机但超出 60KM 距离
-        this.collectedData.taskType = '2'
-      }
-
-      if (this.collectedData.taskType === '1') {
-        // 主任务
-        console.log('主任务')
-
-        // 如果方向键已经选择过,说明本次按键是为了选择武器挂载的
-        if (this.directionKey) {
-          if (this.currentCompass.type === 'j' || this.currentCompass.distance === 'center') {
-            // 如果目标机是歼击机,且位于 20~60KM 之间,则按 A 键选择中距弹
-            this.collectedData.mainTaskMissileCorrectionResponse = 'KeyA' // 主任务挂载的正确反应
-          } else if (this.currentCompass.type === 'j' || this.currentCompass.distance === 'inner') {
-            // 如果目标机是歼击机,且位于 20KM 以内,则按 S 键选择近距弹
-            this.collectedData.mainTaskMissileCorrectionResponse = 'KeyS' // 主任务挂载的正确反应
-          } else if (this.currentCompass.type === 'y' || this.currentCompass.distance === 'inner') {
-            // 如果目标机是预警机,且位于 20KM 以内,则按 D 键选择吊舱
-            this.collectedData.mainTaskMissileCorrectionResponse = 'KeyD' // 主任务挂载的正确反应
-          }
-          // 主任务挂载的实际反应
-          this.collectedData.mainTaskMissileActualResponse = e.code
-
-          if (!this.missileKey && e.code === 'KeyA') {
-            this.missileKey = e.code
-            console.log('选择中距 --- KeyA', this.currentCompass.type, this.currentCompass.distance)
-
-            if (this.currentCompass.type === 'j' || this.currentCompass.distance === 'center') {
-              // 武器选择正确
-              console.log('武器选择正确')
-              this.collectedData.mainTaskMissileCorrection = '1'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应正确',
-                  type: 'success',
-                });
-              }
-            } else {
-              // 武器选择错误
-              console.log('武器选择错误')
-              this.collectedData.mainTaskMissileCorrection = '0'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应错误',
-                  type: 'error',
-                })
-              }
-            }
-            // 记录主任务的武器选择反应时间
-            this.collectedData.mainTaskMissileEndTime = Date.now()
-
-            //--------------
-            this.collectedData.endTime = Date.now() // 记录本局结束时间
-            this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-            this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-            this.currentCompass = null // 清除右侧姿态界面
-            this.currentMissile = null // 选择左侧挂载界面
-
-            setTimeout(() => {
-              // 本次主任务结束,进入下一次
-              this.currentMap.count++
-              this.next()
-            }, 500)
-          } else if (!this.missileKey && e.code === 'KeyS') {
-            this.missileKey = e.code
-            console.log('选择近距 ---- KeyS', this.currentCompass.type, this.currentCompass.distance)
-            if (this.currentCompass.type === 'j' || this.currentCompass.distance === 'inner') {
-              // 武器选择正确
-              console.log('武器选择正确')
-              this.collectedData.mainTaskMissileCorrection = '1'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应正确',
-                  type: 'success',
-                })
-              }
-            } else {
-              // 武器选择错误
-              console.log('武器选择错误')
-              this.collectedData.mainTaskMissileCorrection = '0'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应错误',
-                  type: 'error',
-                })
-              }
-            }
-            // 记录主任务的武器选择反应时间
-            this.collectedData.mainTaskMissileEndTime = Date.now()
-
-            //--------------
-            this.collectedData.endTime = Date.now() // 记录本局结束时间
-            this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-            this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-            this.currentCompass = null // 清除右侧姿态界面
-            this.currentMissile = null // 选择左侧挂载界面
-
-            setTimeout(() => {
-              // 本次主任务结束,进入下一次
-              this.currentMap.count++
-              this.next()
-            }, 500)
-          } else if (!this.missileKey && e.code === 'KeyD') {
-            this.missileKey = e.code
-            console.log('选择吊舱')
-            if (this.currentCompass.type === 'y' || this.currentCompass.distance === 'inner') {
-              // 武器选择正确
-              console.log('武器选择正确')
-              this.collectedData.mainTaskMissileCorrection = '1'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应正确',
-                  type: 'success',
-                })
-              }
-            } else {
-              // 武器选择错误
-              console.log('武器选择错误')
-              this.collectedData.mainTaskMissileCorrection = '0'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '挂载反应错误',
-                  type: 'error',
-                })
-              }
-            }
-            // 记录主任务的武器选择反应时间
-            this.collectedData.mainTaskMissileEndTime = Date.now()
-
-            //--------------
-            this.collectedData.endTime = Date.now() // 记录本局结束时间
-            this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-            this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-            this.currentCompass = null // 清除右侧姿态界面
-            this.currentMissile = null // 选择左侧挂载界面
-
-            setTimeout(() => {
-              // 本次主任务结束,进入下一次
-              this.currentMap.count++
-              this.next()
-            }, 500)
-          } else {
-            // 武器选择错误
-            console.log('武器选择错误')
-            this.collectedData.mainTaskMissileCorrection = '0'
-            if (this.practiceFlag) {
-              this.$message({
-                message: '挂载反应错误',
-                type: 'error',
-              })
-            }
-            // 记录主任务的武器选择反应时间
-            this.collectedData.mainTaskMissileEndTime = Date.now()
-
-            //--------------
-            this.collectedData.endTime = Date.now() // 记录本局结束时间
-            this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-            this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-            this.currentCompass = null // 清除右侧姿态界面
-            this.currentMissile = null // 选择左侧挂载界面
-
-            setTimeout(() => {
-              // 本次主任务结束,进入下一次
-              this.currentMap.count++
-              this.next()
-            }, 500)
-          }
-        } else {
-
-          if (this.currentCompass.quadrant === 2 || this.currentCompass.quadrant === 3) {
-            // 如果目标机出现在第二或第三象限,则主任务方向的正确反应应该是按左键 ArrowLeft
-            this.collectedData.mainTaskDirectionCorrectionResponse = 'ArrowLeft'
-          } else if (this.currentCompass.quadrant === 1 || this.currentCompass.quadrant === 4) {
-            // 如果目标机出现在第一或第四象限,则主任务方向的正确反应应该是按右键 ArrowRight
-            this.collectedData.mainTaskDirectionCorrectionResponse = 'ArrowRight'
-          }
-
-          this.collectedData.mainTaskDirectionActualResponse = e.code // 主任务方向实际反应
-
-          // 如果方向键没有被选择过,说明此次按键是为了选择方向的
-          if (!this.directionKey && e.code === 'ArrowLeft') {
-            this.directionKey = e.code
-            console.log('按下左键')
-            // this.selectedDirection = 'left'
-            if (this.currentCompass.quadrant === 2 || this.currentCompass.quadrant === 3) {
-              // 方向选择正确
-              console.log('方向选择正确')
-              // 记录主任务方向选择是否正确
-              this.collectedData.mainTaskDirectionCorrection = '1'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应正确',
-                  type: 'success',
-                })
-              }
-            } else {
-              // 方向选择错误
-              console.log('方向选择错误')
-              // 记录主任务方向选择是否正确
-              this.collectedData.mainTaskDirectionCorrection = '0'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应错误',
-                  type: 'error',
-                })
-              }
-            }
-            // 记录主任务方向选择的结束时间
-            this.collectedData.mainTaskDirectionEndTime = Date.now()
-          } else if (!this.directionKey && e.code === 'ArrowRight') {
-            console.log('按下右键')
-            this.directionKey = e.code
-            // this.selectedDirection = 'right'
-            if (this.currentCompass.quadrant === 1 || this.currentCompass.quadrant === 4) {
-              // 方向选择正确
-              console.log('方向选择正确')
-              // 记录主任务方向选择是否正确
-              this.collectedData.mainTaskDirectionCorrection = '1'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应正确',
-                  type: 'success',
-                })
-              }
-            } else {
-              // 方向选择错误
-              console.log('方向选择错误')
-              // 记录主任务方向选择是否正确
-              this.collectedData.mainTaskDirectionCorrection = '0'
-              if (this.practiceFlag) {
-                this.$message({
-                  message: '方向反应错误',
-                  type: 'error',
-                })
-              }
-            }
-            // 记录主任务方向选择的结束时间
-            this.collectedData.mainTaskDirectionEndTime = Date.now()
-          } else if (!this.directionKey && e.code === 'Space') {
-            // 如果是主任务,则不能按空格键
-            console.log('这是主任务,按空格键错误')
-            this.directionKey = e.code
-            // 记录主任务方向选择是否正确
-            this.collectedData.mainTaskDirectionCorrection = '0'
-            if (this.practiceFlag) {
-              this.$message({
-                message: '方向反应错误',
-                type: 'error',
-              })
-            }
-            // 记录主任务方向选择的结束时间,如果是主任务,按空格选择错误,则方向选择结束时间和挂载选择结束时间应该是一致的
-            const now = Date.now()
-            this.collectedData.mainTaskDirectionEndTime = now
-            this.collectedData.mainTaskMissileEndTime = now
-            this.collectedData.endTime = Date.now() // 记录本局结束时间
-            this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-            this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-            this.currentCompass = null // 清除右侧姿态界面
-            this.currentMissile = null // 选择左侧挂载界面
-
-            setTimeout(() => {
-              // 本次主任务结束,进入下一次
-              this.currentMap.count++
-              this.next()
-            }, 500)
-          }
-        }
-      } else {
-        // 前瞻性记忆任务
-        console.log('前瞻性记忆任务')
-        this.collectedData.prospectiveTaskCorrection = 'Space' // 前瞻性任务正确反应
-        if (!this.prospectiveKey && e.code === 'Space') {
-          this.prospectiveKey = e.code
-          // 正确反应
-          console.log('正确反应')
-          this.collectedData.prospectiveTaskCorrection = '1'
-          if (this.practiceFlag) {
-            this.$message({
-              message: '反应正确',
-              type: 'success',
-            })
-          }
-        } else {
-          this.prospectiveKey = e.code
-          // 错误反应
-          console.log('错误反应')
-          this.collectedData.prospectiveTaskCorrection = '0'
-          if (this.practiceFlag) {
-            this.$message({
-              message: '反应错误',
-              type: 'error',
-            })
-          }
-        }
-
-        this.collectedData.prospectiveTaskActualResponse = e.code // 前瞻性任务实际反应
-
-        // 前瞻性记忆任务反应的结束时间
-        this.collectedData.prospectiveTaskEndTime = Date.now()
-        this.collectedData.endTime = Date.now() // 记录本局结束时间
-        this.collectedData.onceEndTime = dateFormat("YY-mm-dd HH:MM:SS", new Date())
-        this.collectedDataArray.push(this.collectedData) // 收集本局游戏数据
-
-        this.currentCompass = null // 清除右侧姿态界面
-        this.currentMissile = null // 选择左侧挂载界面
-
-        setTimeout(() => {
-          // 本次主任务结束,进入下一次
-          this.currentMap.count++
-          this.next()
-        }, 500)
-      }
-    },
-  },
-  mounted() {
-    window.addEventListener('keydown', this.onKeyDown)
-  },
-  destroyed() {
-    window.removeEventListener('keydown', this.onKeyDown)
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-
-$sizeModifier: 2.1;
-
-.bTitle {
-  font-size: 24px;
-  color: #333333;
-  text-align: left;
-  text-indent: 20px;
-}
-
-#t1 {
-  font-size: 18px;
-  height: 36px;
-  line-height: 36px;
-  background: rgba(0, 0, 0, 0.39);
-  border-radius: 24px;
-  color: #ffffff;
-  margin-left: 240px;
-  text-align: center;
-}
-
-.pd-r16 {
-  padding-top: 8px;
-  padding-right: 16px;
-}
-
-#body2 {
-  margin-top: 65px;
-}
-.item {
-  width: 200px;
-  height: 210px;
-  margin-top: 20px;
-  margin-right: 10px;
-  float: left;
-}
-
-.el-image {
-  width: 100%;
-  height: 100%;
-}
-.btn {
-  margin-top: 60px;
-  margin-left: -10%;
-}
-.pbg {
-  position: fixed;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 100;
-  background: rgba(0, 0, 0, 0.7);
-}
-.mainbody {
-  height: 550px;
-  width: 500px;
-  border: 2px solid black;
-  border-radius: 12px;
-  background: #ffffff;
-}
-
-/*居中效果*/
-.middle {
-  /*使左上角对应到父元素的中心*/
-
-  top: 50%;
-  left: 50%;
-  position: absolute;
-  /*向左向上偏移50%*/
-  transform: translate(-50%, -50%);
-}
-.activeTask {
-  background: url(/static/flying/bg_game.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-.activeTask3 {
-  background: url(../../../assets/congnitiveAblitity/zhixing.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  /* position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0; */
-}
-.glass {
-  width: 932px;
-  height: 720px;
-  background: rgba(255, 255, 255, 0.39);
-  border: 1px solid rgba(255, 255, 255, 0.6);
-  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
-  border-radius: 12px;
-  position: absolute;
-  top: 46%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-
-  .opt-outline {
-    width: 70%;
-    height: 400px;
-    border: solid;
-    margin-left: 15%;
-  }
-
-  .opt-div {
-    width: 50%;
-    height: 400px;
-    float: right;
-    border-left: solid;
-    justify-content: space-around;
-
-    .start-bb {
-      width: 120px;
-      height: 42px;
-      border: 2px solid rgba(255, 255, 255, 0.8);
-      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
-      opacity: 1;
-      border-radius: 39px;
-      color: white;
-    }
-  }
-}
-.opt-tips {
-  font-size: 13px;
-  text-align: left;
-  text-indent: 2em;
-}
-
-#game {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  //border: 1px solid black;
-  background-image: url("/static/flying/dashboard.png");
-  background-repeat: no-repeat;
-  background-size: 95% 90%;
-  background-position: center;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: space-around;
-}
-#missile {
-  width: 359.5px * $sizeModifier;
-  height: 359.5px * $sizeModifier;
-}
-#compass {
-  width: 359.5px * $sizeModifier;
-  height: 359.5px * $sizeModifier;
-}
-
-#tip {
-  width: 809px;
-  height: 100px;
-  position: absolute;
-  left: 50%;
-  top: 800px;
-  transform: translateX(-50%);
-  background-color: #0abdc4;
-}
-
-#arrow {
-  width: 32px;
-  height: 32px;
-}
-</style>

+ 0 - 1035
src/views/CognitiveAbilityTask/prospectiveMemoryAbility/practice.vue

@@ -1,1035 +0,0 @@
-<template>
-  <div>
-
-    <div id="pm"  class="txt-center activeTask" >
-
-      <div class='glass'>
-        <div class="pbg" v-show="cdv" >
-          <div  width="60%" center>
-            <div class="mainbody middle activeTask3" :class="{ 'middle-flip': tc }">
-              <h2 style="text-align:center">AD临床记忆问卷</h2>
-
-              <div style="text-align:left;margin-top:40px;">
-                <h3 style="margin-left:10%;margin-bottom:10px">第一题:</h3>
-                <div style="margin-left:20%;">
-                  <el-radio v-model="radio1" label="A">A.忘记生活中某些细节,但是之后可以回想起来</el-radio><br/>
-                  <el-radio v-model="radio1" label="B">B.反复多次就同一细节询问家人</el-radio>
-                </div>
-              </div>
-
-              <div style="text-align:left;margin-top:30px;">
-                <h3 style="margin-left:10%;margin-bottom:10px">第二题:</h3>
-                <div style="margin-left:20%;">
-                  <el-radio v-model="radio2" label="A">A.说话时,不能立即想起某个单词或者人名</el-radio><br/>
-                  <el-radio v-model="radio2" label="B">B.说话说到一半,突然不知道下半句该说什么</el-radio>
-                </div>
-              </div>
-
-              <div style="text-align:left;margin-top:30px;">
-                <h3 style="margin-left:10%;margin-bottom:10px">第三题:</h3>
-                <div style="margin-left:20%;">
-                  <el-radio v-model="radio3" label="A">A.不记得刚买的新家电的使用方法</el-radio><br/>
-                  <el-radio v-model="radio3" label="B">B.无法完成基础的日常家务</el-radio>
-                </div>
-              </div>
-              <!--<el-button class="start-bb" style="margin-top:60px;" @click="save()">保存</el-button>-->
-              <el-button class="start-bb" style="margin-top:60px;" @click="throttle()">保存</el-button>
-            </div>
-          </div>
-        </div>
-
-        <div>
-          <el-row>
-            <el-col :span='12'>
-              <h3 class="bTitle">前瞻记忆</h3>
-            </el-col>
-            <el-col :span='12' class="pd-r16">
-              <div id="t1" v-if="isBody2 == true" v-bind:text-content.prop="time1 + '(用时)'">用时</div>
-            </el-col>
-          </el-row>
-          <el-card
-              style="
-          margin-top: 20px;
-          background-color: white;
-          width:92%;
-          margin-left:4%;
-        "
-          >
-            <div class="opt-tips">
-              该任务需要您判断所呈现的词语是否为飞行术语,如果是飞行术语,就按“F”键,如果不是飞行术语,就按“J”键;感知条件下要求判断所呈现的模糊数字图片
-              是否为“0”,是就按“F”键,否就按“J”键。需要注意的是当呈现的词语包含方向信息或者数字下方出现黑色箭头时,按空格键反应。
-              每一屏呈现时间(回答时间)为2s。
-            </div>
-          </el-card>
-        </div>
-
-
-        <div v-if="(isclick == false)" class="btn">
-          <el-button style="margin-left:10%;" class="start-bb" type="primary" @click.once="begintime">点我开始学习</el-button>
-        </div>
-        <div v-if="isBody2 == true" id="body2" >
-          <div class="opt-outline">
-            <div class="flex-center" style="width:48%;height:100%;float:left;font-size:x-large;">
-              <h1 v-if="isbreak">{{this.randomName[id].idiomName}}</h1>
-              <el-image v-else-if="isbreak==false&&isimg==true" :src="randomImg[this.imgid].img " style="width: 40%; height: 150px" />
-            </div>
-            <div class="opt-div flex-center flex-column">
-              <h2 style="text-align:center;">操作</h2>
-              <div class="flex-row" style="width: 100%;justify-content: space-around; margin-top: 40px">
-                <el-button class="start-bb" type="primary" @click="idomevent(2)">F键</el-button>
-                <el-button class="start-bb" type="primary" @click="idomevent(3)">J键</el-button>
-              </div>
-              <el-button class="start-bb" type="primary" @click="idomevent(1)">空格</el-button>
-            </div>
-          </div>
-        </div>
-
-        <div v-if="isBody3" style="margin-top:60px;text-align:center">
-          <h2 style="text-align:center;margin-bottom:20px;">测试结果</h2>
-          <div style="margin-left:25%;">
-            <el-table
-                :data="tableData"
-                border
-                style="width: 70%;">
-              <el-table-column
-                  prop="item"
-                  label="项目"
-                  width="160">
-              </el-table-column>
-              <el-table-column
-                  prop="accary1"
-                  label="全部正确率(%)"
-                  width="160">
-              </el-table-column>
-              <el-table-column
-                  prop="accary2"
-                  label="空格正确率(%)">
-              </el-table-column>
-            </el-table>
-          </div>
-          <el-button style="margin-top:20px;" class="start-bb" type="primary" @click="save1()">问卷调查</el-button>
-        </div>
-
-      </div>
-    </div>
-
-    <go-back />
-  </div>
-</template>
-
-<script>
-import screenfull from "screenfull";
-import GoBack from "@/components/goBack/index.vue"
-
-export default {
-  name: "prospectiveMemoryAbility",
-  components: { GoBack },
-  data() {
-    return {
-      tableData: [
-        { item: "飞行术语", accary1: "", accary2: "" },
-        { item: "模糊数字", accary1: "", accary2: "" },
-      ],
-      rate1: "1",
-      rate2: "2",
-      rate3: "3",
-      rate4: "4",
-      digsum: 0,
-      abcsum: 0,
-      radio1: "",
-      radio2: "",
-      radio3: "",
-      id: 0, //name1数组游标
-      isimg: true,
-      imgid: 0,
-      tc: false,
-      isBody3: false,
-      isbreak: true,
-      complete: false,
-      quest: false,
-      isclick: false,
-      isBody2: false,
-      isok: false,
-      isin: false,
-      src: "",
-      cdv: false,
-      flag: 0, //定义图片进行游标,初始为0,展示数组imgGroup2的第一张图片
-      inputName: "",
-      time1: "00时00分00秒",
-      getNextButtonShow: true, //下一个按钮显示隐藏
-      countDownDivShow: false, //控制剩余时间显示隐藏
-      delayTestButtonShow: false, //控制剩余时间显示隐藏
-      remainingTime: 0, //延时测试剩余时间
-      changed: false, //用于查看数据20秒内是否发生变化
-      idomGrade: 0,
-      group: "1",
-      timer: 0,
-      memoryType: 1,
-      correlationMemory: "",
-      status: 1,
-      imgGroup2: [], //用于存放生成的随机展示的新数据
-      resultId: 0,
-      resuleArray: [0], //保存结果
-      resultNum: 0, //正确的个数
-      grade: 0,
-      phone: "",
-
-      beforeTime: true,
-      timer2: 0,
-      testName: [],
-      img: [
-        {
-          img: require("../../../../public/static/assets/prospectMemory/0.png"),
-          flagid: 2,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/1.png"),
-          flagid: 1, //1
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/2.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/3.png"),
-          flagid: 1, //2
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/4.png"),
-          flagid: 1, //3
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/5.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/6.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/7.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/8.png"),
-          flagid: 1, //4
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/9.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/10.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/11.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/12.png"),
-          flagid: 1, //5
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/13.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/14.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/15.png"),
-          flagid: 1, //6
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/16.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/17.png"),
-          flagid: 1, //7
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/18.png"),
-          flagid: 1, //8
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/19.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/20.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/21.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/22.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/23.png"),
-          flagid: 1, //9
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/24.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/25.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/26.png"),
-          flagid: 1, //10
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/27.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/28.png"),
-          flagid: 1, //11
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/29.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/30.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/31.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/32.png"),
-          flagid: 1, //12
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/33.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/34.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/35.png"),
-          flagid: 1, //13
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/36.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/37.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/38.png"),
-          flagid: 1, //14
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/39.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/40.png"),
-          flagid: 1, //15
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/41.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/42.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/43.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/44.png"),
-          flagid: 1, //16
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/45.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/46.png"),
-          flagid: 1, //17
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/47.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/48.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/49.png"),
-          flagid: 1, //18
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/50.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/51.png"),
-          flagid: 1, //19
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/52.png"),
-          flagid: 1, //20
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/53.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/54.png"),
-          flagid: 1, //21
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/55.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/56.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/57.png"),
-          flagid: 1, //22
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/58.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/59.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/60.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/61.png"),
-          flagid: 1, //23
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/62.png"),
-          flagid: 1, //24
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/63.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/64.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/65.png"),
-          flagid: 1, //25
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/66.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/67.png"),
-          flagid: 1, //26
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/68.png"),
-          flagid: 1, //27
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/69.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/70.png"),
-          flagid: 2,
-        },
-
-        {
-          img: require("../../../../public/static/assets/prospectMemory/71.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/72.png"),
-          flagid: 1, //28
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/73.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/74.png"),
-          flagid: 1, //29
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/75.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/76.png"),
-          flagid: 1, //30
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/77.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/78.png"),
-          flagid: 3,
-        },
-        {
-          img: require("../../../../public/static/assets/prospectMemory/79.png"),
-          flagid: 1, //31
-        },
-      ],
-      name1: [
-          // 普通词语
-        { flagid: 3, idiomName: "笔记本" },
-        { flagid: 3, idiomName: "越野车" },
-        { flagid: 3, idiomName: "显示器" },
-        { flagid: 3, idiomName: "一望无际" },
-        { flagid: 3, idiomName: "一触即发" },
-        { flagid: 3, idiomName: "半信半疑" },
-        { flagid: 3, idiomName: "空气污染" },
-        { flagid: 3, idiomName: "反复无常" },
-        { flagid: 3, idiomName: "拂袖而去" },
-        { flagid: 3, idiomName: "飞黄腾达" },
-        { flagid: 3, idiomName: "风花雪月" },
-        { flagid: 3, idiomName: "冠冕堂皇" },
-        { flagid: 3, idiomName: "宾至如归" },
-        { flagid: 3, idiomName: "会议室" },
-        { flagid: 3, idiomName: "人工智能" },
-        { flagid: 3, idiomName: "芯片封装" },
-        { flagid: 3, idiomName: "门诊楼" },
-        { flagid: 3, idiomName: "贸易战" },
-        { flagid: 3, idiomName: "环境保护" },
-        { flagid: 3, idiomName: "摩天大楼" },
-
-          // 普通飞行术语
-        { flagid: 2, idiomName: "战斗机" },
-        { flagid: 2, idiomName: "目标锁定" },
-        { flagid: 2, idiomName: "空地导弹" },
-        { flagid: 2, idiomName: "空空导弹" },
-        { flagid: 2, idiomName: "对地打击" },
-        { flagid: 2, idiomName: "对空防御" },
-        { flagid: 2, idiomName: "空速校准" },
-        { flagid: 2, idiomName: "失速警告" },
-        { flagid: 2, idiomName: "空地通信" },
-        { flagid: 2, idiomName: "敌我识别" },
-        { flagid: 2, idiomName: "紧急迫降" },
-        { flagid: 2, idiomName: "作战半径" },
-        { flagid: 2, idiomName: "电子对抗" },
-        { flagid: 2, idiomName: "滑跑方向" },
-        { flagid: 2, idiomName: "航迹偏差" },
-        { flagid: 2, idiomName: "滚转" },
-        { flagid: 2, idiomName: "抬轮" },
-        { flagid: 2, idiomName: "航迹角" },
-        { flagid: 2, idiomName: "地面效应" },
-        { flagid: 2, idiomName: "起落架" },
-
-          // 带有方向词的飞行术语
-        { flagid: 1, idiomName: "飞行高度" },
-        { flagid: 1, idiomName: "升降舵" },
-        { flagid: 1, idiomName: "高度计" },
-        { flagid: 1, idiomName: "指南针" },
-        { flagid: 1, idiomName: "紧急下降" },
-        { flagid: 1, idiomName: "下降气流" },
-        { flagid: 1, idiomName: "上升气流" },
-        { flagid: 1, idiomName: "低空飞行" },
-        { flagid: 1, idiomName: "高度保持" },
-        { flagid: 1, idiomName: "标高" },
-        { flagid: 1, idiomName: "东向航线" },
-        { flagid: 1, idiomName: "东磁航向" },
-        { flagid: 1, idiomName: "西方飞行" },
-        { flagid: 1, idiomName: "北向气流" },
-        { flagid: 1, idiomName: "南风面" },
-        { flagid: 1, idiomName: "中央航路" },
-        { flagid: 1, idiomName: "推力反推" },
-        { flagid: 1, idiomName: "进近" },
-        { flagid: 1, idiomName: "下降方向" },
-        { flagid: 1, idiomName: "低空飞行" },
-
-          // 带有方向词的普通词语
-        { flagid: 1, idiomName: "南来北往" },
-        { flagid: 1, idiomName: "无问东西" },
-        { flagid: 1, idiomName: "七上八下" },
-        { flagid: 1, idiomName: "下楼" },
-        { flagid: 1, idiomName: "高山流水" },
-        { flagid: 1, idiomName: "北极圈" },
-        { flagid: 1, idiomName: "日薄西山" },
-        { flagid: 1, idiomName: "中流砥柱" },
-        { flagid: 1, idiomName: "东窗事发" },
-        { flagid: 1, idiomName: "北斗星" },
-        { flagid: 1, idiomName: "南辕北辙" },
-        { flagid: 1, idiomName: "南腔北调" },
-        { flagid: 1, idiomName: "西装革履" },
-        { flagid: 1, idiomName: "自上而下" },
-        { flagid: 1, idiomName: "下不为例" },
-        { flagid: 1, idiomName: "东施效颦" },
-        { flagid: 1, idiomName: "东山再起" },
-        { flagid: 1, idiomName: "西北坡" },
-        { flagid: 1, idiomName: "西部开发" },
-        { flagid: 1, idiomName: "南京市" }
-      ],
-      randomImg: [],
-      randomName: [],
-      wholeProcess: "1", //0-流程测试1-分项测试是否进行全流程测试
-      userId: "",
-      isImmediate: "0", //是否是即时测试,0-不是即时,1-即时测试
-      throttleTimer: null,
-    };
-  },
-  created() {
-    this.isImmediate = this.$route.query.isImmediate || this.isImmediate;
-    this.wholeProcess = this.$route.query.wholeProcess || this.wholeProcess;
-    this.userId = sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f");
-    this.phone = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9e87");
-  },
-  mounted: function () {
-    const that = this
-    screenfull.request();
-    document.onkeydown = function (e) {
-      // let key = window.event.keyCode;
-      let e1 = e || event || window.event || arguments.callee.caller.arguments[0];
-
-      // if(that.isBody2 == true){
-      //     //任务监听事件触发点击按钮
-      //     if (e1.keyCode == 70) {
-      //         console.log("点了f")
-      //         that.idomevent(2)
-      //         e.preventDefault()
-      //     }
-      //     if (e1.keyCode == 74) {
-      //         console.log("点了J")
-      //         that.idomevent(3)
-      //         e.preventDefault()
-      //     }
-      //     if (e1.keyCode == 32) {
-      //         console.log("点了空格")
-      //         that.idomevent(1)
-      //         e.preventDefault()
-      //     }
-      // }
-
-      if (e1.keyCode === 122) {
-        e.preventDefault();
-        screenfull.toggle();
-      }
-    };
-
-    document.onkeyup = function (e) {
-      let e1 = e || event || window.event || arguments.callee.caller.arguments[0];
-
-      if(that.isBody2 == true){
-        //任务监听事件触发点击按钮
-        if (e1.keyCode == 70) {
-          console.log("点了f")
-          that.idomevent(2)
-          e.preventDefault()
-        }
-        if (e1.keyCode == 74) {
-          console.log("点了J")
-          that.idomevent(3)
-          e.preventDefault()
-        }
-        if (e1.keyCode == 32) {
-          console.log("点了空格")
-          that.idomevent(1)
-          e.preventDefault()
-        }
-      }
-    }
-
-  },
-  beforeMount() {
-    this.randomImg = this.getArrayItems(this.img);
-    this.randomName = this.getArrayItems(this.name1);
-
-    console.log('this.randomImg: ', this.randomImg);
-    console.log('this.randomName: ', this.randomName);
-  },
-  methods: {
-    screen() {
-      screenfull.toggle()
-    },
-    idomevent(i) {
-      console.log("flag", this.flag);
-      if (this.flag < 2) {
-        this.flag++;
-        console.log("执行了idom");
-        if (this.randomName[this.id].flagid == i && this.id <= 1) {
-          console.log("id:" + i);
-          if (this.randomName[this.id].flagid == 1) {
-            this.abcsum++;
-          }
-          this.resuleArray[this.resultId] = 1;
-          this.resultId++;
-          this.id++;
-        } else if (
-            this.randomName[this.id].flagid != i &&
-            i != 2 &&
-            this.id <= 1
-        ) {
-          this.resuleArray[this.resultId] = 0;
-          this.resultId++;
-          this.id++;
-        }
-      } else if (this.flag >= 2 && this.flag < 4) {
-        console.log("执行了img");
-        this.flag++;
-        if (this.randomImg[this.imgid].flagid == i && this.imgid <= 1) {
-          if (i == 1) {
-            this.digsum++;
-            console.log("数量:" + this.digsum);
-          }
-          this.resuleArray[this.resultId] = 1;
-          this.resultId++;
-          this.imgid++;
-        } else if (
-            this.randomImg[this.imgid].flagid != i &&
-            i != 2 &&
-            this.imgid <= 1
-        ) {
-          this.resuleArray[this.resultId] = 0;
-          this.resultId++;
-          this.imgid++;
-        }
-      }
-      this.getResultNUm();
-    },
-    getResultNUm() {
-      console.log(this.resuleArray);
-      this.resultNum = 0;
-      this.resuleArray.forEach((result) => {
-        if (result == 1) {
-          this.resultNum++;
-        }
-      });
-      let total1 = 0;
-      let total2 = 0;
-      for (let i = 0; i < 2; i++) {
-        if (this.resuleArray[i] == 1) {
-          total1++;
-        }
-      }
-      for (let i = 2; i < 4; i++) {
-        if (this.resuleArray[i] == 1) {
-          total2++;
-        }
-      }
-      console.log("方向信息个数:" + this.abcsum + "  0个数:" + this.digsum);
-      this.rate1 = this.getResultRatio(total1, 4);
-      this.rate2 = this.getResultRatio(total2, 4);
-      this.rate3 = this.getResultRatio(this.abcsum, 2);
-      this.rate4 = this.getResultRatio(this.digsum, 1);
-
-      this.tableData[0].accary1 = this.rate1;
-      this.tableData[0].accary2 = this.rate3;
-      this.tableData[1].accary1 = this.rate2;
-      this.tableData[1].accary2 = this.rate4;
-      return this.resultNum;
-    },
-    getResultRatio(num, total) {
-      return Math.round((num / total) * 10000) / 100.0;
-    },
-
-    getArrayItems(arr) {
-      // 随机生成数组用于初始
-      // 新建一个数组,将传入的数组复制过来,用于运算,而不要直接操作传入的数组;
-      const temp_array = new Array()
-      for (let index in arr) {
-        temp_array.push(arr[index]);
-      }
-      // 取出的数值项,保存在此数组
-      const return_array = new Array()
-      for (let i = 0; i < 2; i++) {
-        //判断如果数组还有可以取出的元素,以防下标越界
-        if (temp_array.length > 0) {
-          //在数组中产生一个随机索引
-          const arrIndex = Math.floor(Math.random() * temp_array.length)
-          //将此随机索引的对应的数组元素值复制出来
-          return_array[i] = temp_array[arrIndex];
-          //然后删掉此索引的数组元素,这时候temp_array变为新的数组
-          temp_array.splice(arrIndex, 1);
-        } else {
-          //数组中数据项取完后,退出循环,比如数组本来只有10项,但要求取出20项.
-          break;
-        }
-      }
-      return return_array;
-    },
-    begintime() {
-      this.isclick = true; //取反
-      this.isBody2 = true;
-      //this.changed=true;
-
-      let count = 0
-      let _this = this;
-      this.timer = setInterval(function () {
-        let h = parseInt(count / 1000 / 60 / 60)
-        let m = parseInt(count / 1000 / 60) % 60
-        let s = parseInt(count / 1000) % 60
-        h = h < 10 ? "0" + h : h;
-        m = m < 10 ? "0" + m : m;
-        s = s < 10 ? "0" + s : s;
-        _this.time1 = h + "时" + m + "分" + s + "秒";
-        count = count + 1000;
-      }, 1000);
-
-      console.log("执行了什么");
-      this.check();
-    },
-    check() {
-      let _this = this;
-      this.timer2 = setTimeout(function () {
-        if (_this.changed == true) {
-          _this.changed = false;
-        } else {
-          _this.idomevent(4);
-          _this.changed = false;
-        }
-      }, 2000);
-    },
-    closeWindow() {
-      this.cdv = false;
-      this.tc = false;
-    },
-    save1() {
-      this.cdv = true;
-      this.tc = true;
-      clearInterval(this.timer);
-    },
-    save() {
-
-      // console.log(this.resuleArray);
-
-      for (let i = 0; i < this.resuleArray.length; i++) {
-        if (this.resuleArray[i] == 1) this.grade++;
-      }
-
-      // console.log("成绩为", this.grade);
-      // console.log("时间为", this.time1); //做题时间
-
-      const question7 = {
-        questionNo: "7",
-        gradea: [ this.rate1, this.rate3 ],
-        gradeb: [ this.rate2, this.rate4 ],
-        gradec: this.grade,
-        mina: this.time1,
-        memoryType: this.memoryType,
-        correlationMemory: this.correlationMemory,
-        status: this.status
-      }
-
-      //提交成绩
-      if (
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") === "" ||
-          sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == null
-      ) {
-        alert("请先登录!");
-        return;
-      } else {
-        this.$emit('practiceEnd')
-
-        //退出全屏
-        screenfull.exit();
-      }
-
-      //跳转路由
-    },
-    throttle(){
-      clearTimeout(this.throttleTimer);
-      this.throttleTimer = setTimeout(()=>{
-        this.save();
-      },500)
-    },
-  },
-  watch: {
-    flag: {
-      handler() {
-        if (this.flag == 4) {
-          this.isimg = false;
-          this.complete = true;
-          this.getNextButtonShow = false;
-          clearInterval(this.timer);
-          clearTimeout(this.timer2);
-          this.isin = false;
-
-          this.isBody2 = false;
-          // this.isBody3 = true;
-          console.log("测试结束")
-          this.throttle();
-        }
-        if (this.flag == 80) {
-          this.isbreak = false;
-        }
-        this.changed = true;
-        clearTimeout(this.timer2);
-        this.changed = false;
-        this.check();
-        console.log(this.flag);
-      },
-    },
-  },
-
-}
-</script>
-
-<style lang="scss" scoped>
-
-.bTitle {
-  font-size: 24px;
-  color: #333333;
-  text-align: left;
-  text-indent: 20px;
-}
-
-#t1 {
-  font-size: 18px;
-  height: 36px;
-  line-height: 36px;
-  background: rgba(0, 0, 0, 0.39);
-  border-radius: 24px;
-  color: #ffffff;
-  margin-left: 240px;
-  text-align: center;
-}
-
-.pd-r16 {
-  padding-top: 8px;
-  padding-right: 16px;
-}
-
-#body2 {
-  margin-top: 65px;
-}
-.item {
-  width: 200px;
-  height: 210px;
-  margin-top: 20px;
-  margin-right: 10px;
-  float: left;
-}
-
-.el-image {
-  width: 100%;
-  height: 100%;
-}
-.btn {
-  margin-top: 60px;
-  margin-left: -10%;
-}
-.pbg {
-  position: fixed;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 100;
-  background: rgba(0, 0, 0, 0.7);
-}
-.mainbody {
-  height: 550px;
-  width: 500px;
-  border: 2px solid black;
-  border-radius: 12px;
-  background: #ffffff;
-}
-
-/*居中效果*/
-.middle {
-  /*使左上角对应到父元素的中心*/
-
-  top: 50%;
-  left: 50%;
-  position: absolute;
-  /*向左向上偏移50%*/
-  transform: translate(-50%, -50%);
-}
-.activeTask {
-  background: url(../../../assets/congnitiveAblitity/zhixing.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-.activeTask3 {
-  background: url(../../../assets/congnitiveAblitity/zhixing.png) no-repeat center;
-  background-size: cover;
-  /* background: black; */
-  /* position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0; */
-}
-.glass {
-  width: 932px;
-  height: 720px;
-  background: rgba(255, 255, 255, 0.39);
-  border: 1px solid rgba(255, 255, 255, 0.6);
-  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
-  border-radius: 12px;
-  position: absolute;
-  top: 46%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-
-  .opt-outline {
-    width: 70%;
-    height: 400px;
-    border: solid;
-    margin-left: 15%;
-  }
-
-  .opt-div {
-    width: 50%;
-    height: 400px;
-    float: right;
-    border-left: solid;
-    justify-content: space-around;
-
-    .start-bb {
-      width: 120px;
-      height: 42px;
-      border: 2px solid rgba(255, 255, 255, 0.8);
-      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
-      opacity: 1;
-      border-radius: 39px;
-      color: white;
-    }
-  }
-}
-.opt-tips {
-  font-size: 13px;
-  text-align: left;
-  text-indent: 2em;
-}
-</style>