fix: 修复跳转异常

This commit is contained in:
2025-09-23 19:48:18 +08:00
parent 0f4959d80b
commit 9b9dd8499d

View File

@@ -167,7 +167,7 @@
<div <div
v-if="data.unlockMode === 1" v-if="data.unlockMode === 1"
class="goclass" class="goclass"
@click.prevent=" @click="
toFinish(el, item.stageName, item.id, item.studyModel, $event) toFinish(el, item.stageName, item.id, item.studyModel, $event)
" "
:style="{ :style="{
@@ -188,7 +188,7 @@
<div <div
v-else v-else
class="goclass" class="goclass"
@click.prevent=" @click="
toFinish(el, item.stageName, item.id, item.studyModel) toFinish(el, item.stageName, item.id, item.studyModel)
" "
:style="{ :style="{
@@ -313,27 +313,23 @@
</template> </template>
<script setup> <script setup>
import { computed, reactive, ref, watch, onMounted } from "vue"; import {computed, onMounted, ref, watch} from "vue";
import { ElLoading } from "element-plus"; import {ElMessage} from "element-plus";
import { useRequest, request } from "@/api/request"; import {request, useRequest} from "@/api/request";
import { import {
PROJECT_PROCESS,
STUDY_RECORD,
PROJECT_DETAIL,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
checkStudentExist, checkStudentExist,
EvaluationToLearn, EvaluationToLearn,
QueryEvaluationTaskStatusOne, QueryEvaluationTaskStatusOne,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
} from "@/api/api"; } from "@/api/api";
import {useRoute, useRouter} from "vue-router"; import {useRoute, useRouter} from "vue-router";
import store from "@/store"; import store from "@/store";
import { ElMessage } from "element-plus";
import ReturnHead from "@/components/ReturnHead.vue";
import {PROJECT, TASK_TYPES} from "@/api/CONST"; import {PROJECT, TASK_TYPES} from "@/api/CONST";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {useStore} from "vuex"; import {useStore} from "vuex";
import {changeTime} from "@/api/method"; import {changeTime} from "@/api/method";
const { const {
query: {courseId, projectId, type, infoId, chapterOrStageId, id}, query: {courseId, projectId, type, infoId, chapterOrStageId, id},
} = useRoute(); } = useRoute();
@@ -422,6 +418,7 @@ function getTaskStatus(d) {
} }
return "进行中"; return "进行中";
} }
console.log("datadata", data); console.log("datadata", data);
const openCourseVisible = ref(false); const openCourseVisible = ref(false);
const openCourseList = ref([]); const openCourseList = ref([]);
@@ -779,10 +776,8 @@ function toFinish(d, sName, chapterOrStageId, studyModel,e) {
}); });
} else if (typeof TASK_TYPES.path[d.type] === "function") { } else if (typeof TASK_TYPES.path[d.type] === "function") {
if (d.type == 5) { if (d.type == 5) {
const url = TASK_TYPES.path[d.type](d) + d.targetId
if (isIOS()){
// 模拟点击跳转 // 模拟点击跳转
const url = TASK_TYPES.path[d.type](d) + d.targetId
const a = document.createElement("a"); const a = document.createElement("a");
a.href = url; a.href = url;
// a.target = "_blank"; // a.target = "_blank";
@@ -793,7 +788,8 @@ function toFinish(d, sName, chapterOrStageId, studyModel,e) {
} else { } else {
TASK_TYPES.path[d.type](d); TASK_TYPES.path[d.type](d);
} }
}}}) }
})
// if (typeof types.value.path[d.type] === "string") { // if (typeof types.value.path[d.type] === "string") {
// types.value.path[d.type] && // types.value.path[d.type] &&
// types.value.path[d.type].startsWith("http") && // types.value.path[d.type].startsWith("http") &&
@@ -829,6 +825,7 @@ function toOffcoursePlanPage(id){
function whiteTypes(type) { function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-"); return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
} }
// 查询当前阶段所有任务是否都完成 // 查询当前阶段所有任务是否都完成
const queryAllStatus = (data) => { const queryAllStatus = (data) => {
// status === 1 已完成 // status === 1 已完成
@@ -847,19 +844,23 @@ const queryAllStatus = (data) => {
.el-dialog__body { .el-dialog__body {
width: 80%; width: 80%;
} }
.el-dialog__header { .el-dialog__header {
display: none; display: none;
} }
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.main { .main {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
//justify-content: center; //justify-content: center;
margin-top: 10px; margin-top: 10px;
.up { .up {
width: 100%; width: 100%;
height: 162px; height: 162px;
@@ -868,6 +869,7 @@ const queryAllStatus = (data) => {
align-items: center; align-items: center;
//justify-content: center; //justify-content: center;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
.notice { .notice {
background-color: rgba(255, 251, 238, 1); background-color: rgba(255, 251, 238, 1);
width: 100%; width: 100%;
@@ -875,6 +877,7 @@ const queryAllStatus = (data) => {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: relative; position: relative;
.text { .text {
//display: flex; //display: flex;
height: 25px; height: 25px;
@@ -887,6 +890,7 @@ const queryAllStatus = (data) => {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.close { .close {
display: flex; display: flex;
position: absolute; position: absolute;
@@ -900,10 +904,12 @@ const queryAllStatus = (data) => {
margin-bottom: 8px; margin-bottom: 8px;
} }
} }
.content { .content {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.title { .title {
margin-top: 15.5px; margin-top: 15.5px;
font-size: 14px; font-size: 14px;
@@ -911,6 +917,7 @@ const queryAllStatus = (data) => {
line-height: 21.6px; line-height: 21.6px;
color: rgba(4, 36, 60, 1); color: rgba(4, 36, 60, 1);
} }
.text2 { .text2 {
display: flex; display: flex;
margin-top: 10px; margin-top: 10px;
@@ -923,6 +930,7 @@ const queryAllStatus = (data) => {
} }
} }
} }
.down { .down {
width: 100%; width: 100%;
margin-top: 11.5px; margin-top: 11.5px;
@@ -932,6 +940,7 @@ const queryAllStatus = (data) => {
align-items: center; align-items: center;
//justify-content: center; //justify-content: center;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
.project_title { .project_title {
width: calc(100% - 36.5px); width: calc(100% - 36.5px);
display: flex; display: flex;
@@ -942,12 +951,14 @@ const queryAllStatus = (data) => {
padding: 17px 0 17px 36.5px; padding: 17px 0 17px 36.5px;
border-bottom: 0.5px solid rgba(241, 242, 243, 1); border-bottom: 0.5px solid rgba(241, 242, 243, 1);
} }
.project_first { .project_first {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 18px; margin-top: 18px;
.course1_first { .course1_first {
width: 100%; width: 100%;
height: 35px; height: 35px;
@@ -955,6 +966,7 @@ const queryAllStatus = (data) => {
justify-content: content; justify-content: content;
border-radius: 10px; border-radius: 10px;
background-color: #f9f9f9; background-color: #f9f9f9;
.text8 { .text8 {
display: flex; display: flex;
flex: 1; flex: 1;
@@ -966,6 +978,7 @@ const queryAllStatus = (data) => {
font-weight: 600; font-weight: 600;
color: #333330; color: #333330;
} }
.course1_right { .course1_right {
display: flex; display: flex;
position: relative; position: relative;
@@ -982,6 +995,7 @@ const queryAllStatus = (data) => {
border-radius: 7px; border-radius: 7px;
border: 1px solid #0060ff; border: 1px solid #0060ff;
} }
.text9 { .text9 {
display: flex; display: flex;
justify-content: content; justify-content: content;
@@ -996,6 +1010,7 @@ const queryAllStatus = (data) => {
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
} }
.btn1 { .btn1 {
width: 7px; width: 7px;
height: 6px; height: 6px;
@@ -1006,28 +1021,33 @@ const queryAllStatus = (data) => {
} }
} }
} }
.course_content { .course_content {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
margin-top: 26.5px; margin-top: 26.5px;
.study1 { .study1 {
display: flex; display: flex;
//justify-content: center; //justify-content: center;
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
.firstclass { .firstclass {
display: flex; display: flex;
width: 74px; width: 74px;
height: 43px; height: 43px;
background-image: url(../../assets/image/pathmap/firstclass.png); background-image: url(../../assets/image/pathmap/firstclass.png);
} }
.firstprogress { .firstprogress {
display: flex; display: flex;
flex: 1; flex: 1;
position: relative; position: relative;
margin-left: 9.5px; margin-left: 9.5px;
.firsttext { .firsttext {
position: absolute; position: absolute;
//top: 6px; //top: 6px;
@@ -1039,6 +1059,7 @@ const queryAllStatus = (data) => {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.secondtext { .secondtext {
position: absolute; position: absolute;
//top: 6px; //top: 6px;
@@ -1047,6 +1068,7 @@ const queryAllStatus = (data) => {
line-height: 30.29px; line-height: 30.29px;
color: rgba(39, 122, 255, 1); color: rgba(39, 122, 255, 1);
} }
.progressbox { .progressbox {
width: 100%; width: 100%;
position: absolute; position: absolute;
@@ -1055,6 +1077,7 @@ const queryAllStatus = (data) => {
bottom: 4px; bottom: 4px;
background-color: rgba(232, 241, 254, 1); background-color: rgba(232, 241, 254, 1);
border-radius: 2px; border-radius: 2px;
.progressboxpart { .progressboxpart {
width: 70%; width: 70%;
height: 6.4px; height: 6.4px;
@@ -1068,20 +1091,24 @@ const queryAllStatus = (data) => {
} }
} }
} }
.study2 { .study2 {
display: flex; display: flex;
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
.secondclass { .secondclass {
width: 74px; width: 74px;
height: 43px; height: 43px;
background-image: url(../../assets/image/pathmap/secondclass.png); background-image: url(../../assets/image/pathmap/secondclass.png);
} }
.secondprogress { .secondprogress {
display: flex; display: flex;
flex: 1; flex: 1;
position: relative; position: relative;
margin-left: 9.5px; margin-left: 9.5px;
.firsttext { .firsttext {
position: absolute; position: absolute;
//top: 6px; //top: 6px;
@@ -1093,6 +1120,7 @@ const queryAllStatus = (data) => {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.secondtext { .secondtext {
position: absolute; position: absolute;
//top: 6px; //top: 6px;
@@ -1101,6 +1129,7 @@ const queryAllStatus = (data) => {
line-height: 30.29px; line-height: 30.29px;
color: rgba(39, 122, 255, 1); color: rgba(39, 122, 255, 1);
} }
.progressbox { .progressbox {
width: 100%; width: 100%;
position: absolute; position: absolute;
@@ -1109,6 +1138,7 @@ const queryAllStatus = (data) => {
bottom: 4px; bottom: 4px;
background-color: rgba(232, 241, 254, 1); background-color: rgba(232, 241, 254, 1);
border-radius: 2px; border-radius: 2px;
.progressboxpart { .progressboxpart {
width: 52%; width: 52%;
height: 6.4px; height: 6.4px;
@@ -1124,12 +1154,14 @@ const queryAllStatus = (data) => {
} }
} }
} }
.project_second { .project_second {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 10.5px; margin-top: 10.5px;
.course1_first { .course1_first {
width: 100%; width: 100%;
height: 35px; height: 35px;
@@ -1137,6 +1169,7 @@ const queryAllStatus = (data) => {
justify-content: content; justify-content: content;
border-radius: 10px; border-radius: 10px;
background-color: #f9f9f9; background-color: #f9f9f9;
.text8 { .text8 {
display: flex; display: flex;
flex: 1; flex: 1;
@@ -1148,6 +1181,7 @@ const queryAllStatus = (data) => {
font-weight: 600; font-weight: 600;
color: #333330; color: #333330;
} }
.course1_right { .course1_right {
display: flex; display: flex;
position: relative; position: relative;
@@ -1164,6 +1198,7 @@ const queryAllStatus = (data) => {
border-radius: 7px; border-radius: 7px;
border: 1px solid #0060ff; border: 1px solid #0060ff;
} }
.text9 { .text9 {
display: flex; display: flex;
justify-content: content; justify-content: content;
@@ -1178,6 +1213,7 @@ const queryAllStatus = (data) => {
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
} }
.btn1 { .btn1 {
width: 7px; width: 7px;
height: 6px; height: 6px;
@@ -1188,12 +1224,14 @@ const queryAllStatus = (data) => {
} }
} }
} }
.secondcontent { .secondcontent {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
margin-top: 10px; margin-top: 10px;
.question { .question {
width: 100%; width: 100%;
display: flex; display: flex;
@@ -1215,10 +1253,12 @@ const queryAllStatus = (data) => {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.coursetag { .coursetag {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.goclass { .goclass {
width: 63px; width: 63px;
height: 23px; height: 23px;
@@ -1234,6 +1274,7 @@ const queryAllStatus = (data) => {
// margin-right: 37px; // margin-right: 37px;
cursor: pointer; cursor: pointer;
} }
// .tag1 { // .tag1 {
// position: absolute; // position: absolute;
// left: 0; // left: 0;
@@ -1277,6 +1318,7 @@ const queryAllStatus = (data) => {
} }
} }
} }
.last { .last {
width: 100%; width: 100%;
margin-top: 11.5px; margin-top: 11.5px;
@@ -1284,6 +1326,7 @@ const queryAllStatus = (data) => {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
.project_title { .project_title {
width: calc(100% - 36.5px); width: calc(100% - 36.5px);
display: flex; display: flex;
@@ -1294,6 +1337,7 @@ const queryAllStatus = (data) => {
padding: 17px 0 17px 36.5px; padding: 17px 0 17px 36.5px;
border-bottom: 0.5px solid rgba(241, 242, 243, 1); border-bottom: 0.5px solid rgba(241, 242, 243, 1);
} }
.ranking { .ranking {
width: 90%; width: 90%;
display: flex; display: flex;
@@ -1302,11 +1346,13 @@ const queryAllStatus = (data) => {
border-radius: 10px; border-radius: 10px;
background-color: rgba(242, 245, 247, 1); background-color: rgba(242, 245, 247, 1);
margin-bottom: 13.5px; margin-bottom: 13.5px;
.rankingbox { .rankingbox {
width: 90%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.ranknumber { .ranknumber {
width: 100%; width: 100%;
height: 50px; height: 50px;
@@ -1314,6 +1360,7 @@ const queryAllStatus = (data) => {
position: relative; position: relative;
align-items: center; align-items: center;
border-bottom: 0.5px solid rgba(223, 223, 223, 1); border-bottom: 0.5px solid rgba(223, 223, 223, 1);
.describe { .describe {
display: flex; display: flex;
position: absolute; position: absolute;
@@ -1322,6 +1369,7 @@ const queryAllStatus = (data) => {
line-height: 24px; line-height: 24px;
color: rgba(51, 51, 48, 1); color: rgba(51, 51, 48, 1);
} }
.number { .number {
display: flex; display: flex;
position: absolute; position: absolute;
@@ -1331,6 +1379,7 @@ const queryAllStatus = (data) => {
line-height: 24px; line-height: 24px;
color: rgba(0, 96, 255, 1); color: rgba(0, 96, 255, 1);
} }
.describe_part { .describe_part {
display: flex; display: flex;
position: absolute; position: absolute;