Преглед на файлове

修改认知任务正确率计算及进度条修改

plg преди 5 месеца
родител
ревизия
6f915c8998
променени са 5 файла, в които са добавени 15 реда и са изтрити 12 реда
  1. 2 2
      src/components/CpdmTask.vue
  2. 4 4
      src/views/CognizeFaceDot.vue
  3. 2 2
      src/views/ETBexperiment_new.vue
  4. 3 0
      src/views/PopularizationScience.vue
  5. 4 4
      src/views/Stroop.vue

+ 2 - 2
src/components/CpdmTask.vue

@@ -47,8 +47,8 @@ const querySelectTask = async () => {
 //放弃
 const giveUp = () => {
     //点击放弃则开始调用评论的插件
-    planNumGet()
-    getUnread()
+    // planNumGet()
+    // getUnread()
     updateTaskApi(planId.value)
     cpdmMe.value.open()
 }

+ 4 - 4
src/views/CognizeFaceDot.vue

@@ -105,7 +105,7 @@ onMounted(() => {
     if (formalTest.value !== '0') {
         turnsNumber.value = 95
     } else {
-        turnsNumber.value = 10
+        turnsNumber.value = 9
     }
     //接收到传过来的参数后
     //判断是练习还是测试
@@ -511,7 +511,7 @@ const submitData = async () => {
     neutralResponse2.map((item) => {
         neutralAllTime2 += item.responseTime;
     });
-    let scoreFin = blockRight1.length / (turnsNumber.value + 1) * 100
+    let scoreFin = (blockRight1.length + blockRight2.length) / 20 * 100
     if (scoreFin > 60) {
         userInfo.saveIspass('FDOT')
     }
@@ -964,8 +964,8 @@ const userClick = (param: any) => {
 <template>
     <div class="cognize_plu" @contextmenu.prevent="" @click.left="userClick(0)" @click.right="userClick(1)">
         <el-progress class="main_progress" color="linear-gradient(to right,#48D68E,#ffffff)" :text-inside="true"
-            :stroke-width="48" :percentage="(cumulation / turnsNumber) * 100" style="width: 50%">
-            <span style="color: #000;font-size: 20px;"> {{ cumulation }}/{{ turnsNumber }}</span>
+            :stroke-width="48" :percentage="((cumulation + 1) / (turnsNumber + 1)) * 100" style="width: 50%">
+            <span style="color: #000;font-size: 20px;"> {{ cumulation + 1 }}/{{ turnsNumber + 1 }}</span>
         </el-progress>
         <p class="correct_txt" v-show="responseF && formalTest == '0'">
             <img src="../assets/cognize/correct.png" alt="" v-show="responseFlag">

+ 2 - 2
src/views/ETBexperiment_new.vue

@@ -9,8 +9,8 @@
             <div style="width: 50%; margin-left: 10%; margin-top: 24px; z-index: 10">
                 <p v-if="testMode === 0" style='margin-top:50px'>&nbsp;</p>
                 <el-progress v-else class="main_progress" color="linear-gradient(to right, #3854f1, #92bbf0)"
-                    :text-inside="true" :format="format" :stroke-width="48" :percentage="((cumulation) / 71) * 100">
-                    <span style="color: #000;font-size: 20px;">{{ cumulation }}/{{ 71 }}</span>
+                    :text-inside="true" :format="format" :stroke-width="48" :percentage="((cumulation + 1) / 72) * 100">
+                    <span style="color: #000;font-size: 20px;">{{ cumulation + 1 }}/{{ 72 }}</span>
                 </el-progress>
             </div>
 

+ 3 - 0
src/views/PopularizationScience.vue

@@ -5,6 +5,7 @@ import { format } from 'date-fns/format';
 
 import { menuStatusStore, userInfoStore } from '@/stores'
 import { userPlanApi } from '@/api/home';
+import { getUnread, planNumGet } from '@/utils/test';
 const userInfo = userInfoStore()
 const menuStatus = menuStatusStore();
 
@@ -176,6 +177,8 @@ const timeFormat = () => {
 
 //刚进入页面就将高度设置为页面需要的
 onMounted(() => {
+    planNumGet()
+    getUnread()
 
     //进到界面开始轮询
 })

+ 4 - 4
src/views/Stroop.vue

@@ -275,13 +275,13 @@ const clickColor = async (val: string) => {
     //测试结果的集合
     recordResult.value.push(obj)
     //修改文本
-
+    //88
     if (numberFlag.value < allCount.value - 1) {
         showAdd()
         numberFlag.value++
         numberFlagTem.value++
     } else {
-        numberFlagTem.value++
+        // numberFlagTem.value++
         //开始保存了
         saveStart.value = true
         //开始调用-----
@@ -524,8 +524,8 @@ const formatterData = () => {
         <div style="width: 50%; margin-left: 10%; margin-top: 24px; z-index: 10">
 
             <el-progress class="main_progress" color="linear-gradient(to right, hwb(17 58% 9%), #99ebee)"
-                :text-inside="true" :stroke-width="48" :percentage="((numberFlagTem) / allCount) * 100">
-                <span style="color: #000;font-size: 20px;">{{ numberFlagTem }}/{{ allCount }}</span>
+                :text-inside="true" :stroke-width="48" :percentage="((numberFlagTem + 1) / (allCount)) * 100">
+                <span style="color: #000;font-size: 20px;">{{ numberFlagTem + 1 }}/{{ allCount }}</span>
             </el-progress>
         </div>
         <p class="correct_txt" v-show="formalTest == '0' && isCom">