Browse Source

修改未测试返回--测试计划页面

plg 6 months ago
parent
commit
92862c87db
1 changed files with 28 additions and 2 deletions
  1. 28 2
      src/views/shapeIntuition_random.vue

+ 28 - 2
src/views/shapeIntuition_random.vue

@@ -263,11 +263,37 @@ export default {
           });
           //调用接口---查看此计划后边是不是还有--需要测试的认知任务---如果有的话
           //跳转到--- 计划页
-          this.$router.push({ name: 'plan' })
+
+          //判断该计划下是否还有 需要显示且需要测试记的计划//如果还有的话需要跳转到plan界面
+          //如果该计划下没有需要测试的话--需要跳转到 测试记录里边
+
+
+          //根据planId查询计划列表
+          let params = {
+            planId: planList.value[i].id,
+            userNo: userInfo.userInfo.userNo
+          }
+          let temp = await userPlanDetailApi(params)
+          let listT = temp.data;
+          let listP = []
+          listP = listT.filter((item) => {
+            return item.isCompleted == '0' && item.contentType == '1'
+          })
+          this.saveFalg = false;
+          //等--认知任务如果有未测试的话--需要跳转到测试计划页面
+          //否则--跳转到测试计划页面
+          if (listP.length > 0) {
+            this.$router.push({ name: 'plan' })
+          } else {
+            this.$router.push({ name: 'testRecord' })
+          }
+
+
+
 
           //如果后边没有--则测试跳转到报告页
           //需要跳转到
-          this.saveFalg = false;
+
         }
       }
     },