|
@@ -57,6 +57,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {Toast} from "vant";
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -121,55 +123,56 @@ export default {
|
|
|
// 查看测试详情
|
|
|
goResultDetail(item) {
|
|
|
//新旧结果页兼容跳转方法
|
|
|
- this.goTestResult(item);
|
|
|
+ this.goTestResultSchool(item);
|
|
|
},
|
|
|
- goTestResult(item) {
|
|
|
- this.$http.get(`getRecordById?id=${item.id}`, {}, (res) => {
|
|
|
- if (res.code == 2001) {
|
|
|
- this.$toast.fail(res.msg);
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res && res.code == 200) {
|
|
|
- console.log(res,"认知任务返回数据版本")
|
|
|
-
|
|
|
- if (res.data?.userRecordEntity.type == '1') {
|
|
|
- // 认知任务跳转
|
|
|
- let versionNo = JSON.parse(res.data?.userRecordEntity?.testResult).versionNo;
|
|
|
- if (versionNo == "2.0.1" || versionNo == '2.0') {
|
|
|
- //跳转新测试结果模版数据暂存本地
|
|
|
- // sessionStorage.setItem("testResult", res.data?.userRecordEntity?.testResult);
|
|
|
- this.$store.dispatch("setTestResult",res?.data);
|
|
|
- this.$router.push({
|
|
|
- name: "testResultNew",
|
|
|
- query: {
|
|
|
- id: res.data?.userRecordEntity?.id,
|
|
|
- title: res.data?.userRecordEntity?.name,
|
|
|
- testPlanId: this.$route.query.testPlanId || "",
|
|
|
- // userName: res.data?.userRecordEntity?.phone,
|
|
|
- // testDate: res.data?.userRecordEntity?.testDate,
|
|
|
- come: 2, //1-来自认知任务列表,2-测试记录列表
|
|
|
- },
|
|
|
- });
|
|
|
- } else {
|
|
|
- //跳转旧测试结果模版
|
|
|
- this.$router.push(`/cognitiveTaskOldTestRecord?flag=${item.flag}&id=${item.id}&from=2`);
|
|
|
-
|
|
|
- }
|
|
|
- }else {
|
|
|
- // 量表跳转
|
|
|
- this.$router.push({
|
|
|
- path: "/testRecordsSCl",
|
|
|
- query: {
|
|
|
- id: item.id,
|
|
|
- from: 2,
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- this.$toast.fail("获取数据失败!服务器异常");
|
|
|
- }
|
|
|
- });
|
|
|
+ goTestResultSchool(item) {
|
|
|
+ Toast.fail('恭喜你顺利完成测评!若想了解你的具体测评成绩,请与老师联系以获取详细反馈。')
|
|
|
+ // this.$http.get(`getRecordById?id=${item.id}`, {}, (res) => {
|
|
|
+ // if (res.code == 2001) {
|
|
|
+ // this.$toast.fail(res.msg);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // if (res && res.code == 200) {
|
|
|
+ // console.log(res,"认知任务返回数据版本")
|
|
|
+ //
|
|
|
+ // if (res.data?.userRecordEntity.type == '1') {
|
|
|
+ // // 认知任务跳转
|
|
|
+ // let versionNo = JSON.parse(res.data?.userRecordEntity?.testResult).versionNo;
|
|
|
+ // if (versionNo == "2.0.1" || versionNo == '2.0') {
|
|
|
+ // //跳转新测试结果模版数据暂存本地
|
|
|
+ // // sessionStorage.setItem("testResult", res.data?.userRecordEntity?.testResult);
|
|
|
+ // this.$store.dispatch("setTestResult",res?.data);
|
|
|
+ // this.$router.push({
|
|
|
+ // name: "testResultNew",
|
|
|
+ // query: {
|
|
|
+ // id: res.data?.userRecordEntity?.id,
|
|
|
+ // title: res.data?.userRecordEntity?.name,
|
|
|
+ // testPlanId: this.$route.query.testPlanId || "",
|
|
|
+ // // userName: res.data?.userRecordEntity?.phone,
|
|
|
+ // // testDate: res.data?.userRecordEntity?.testDate,
|
|
|
+ // come: 2, //1-来自认知任务列表,2-测试记录列表
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // //跳转旧测试结果模版
|
|
|
+ // this.$router.push(`/cognitiveTaskOldTestRecord?flag=${item.flag}&id=${item.id}&from=2`);
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // }else {
|
|
|
+ // // 量表跳转
|
|
|
+ // this.$router.push({
|
|
|
+ // path: "/testRecordsSCl",
|
|
|
+ // query: {
|
|
|
+ // id: item.id,
|
|
|
+ // from: 2,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // } else {
|
|
|
+ // this.$toast.fail("获取数据失败!服务器异常");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
// 搜索量表
|
|
|
onSearch() {
|