fix:增加项目列表

This commit is contained in:
lixg
2022-12-18 21:07:03 +08:00
parent 8c382d74b6
commit eb42c94ce6
5 changed files with 345 additions and 13 deletions

View File

@@ -100,7 +100,7 @@
</div>
</div>
</div>
<div class="goclass" @click="toFinish(value, i.name)">
<div class="goclass" @click="toFinish(value, i.name, i.stageId)">
{{
value.status === 1
? "已完成"
@@ -313,7 +313,12 @@ import medal2 from "@/assets/image/medal/medal2.png";
import medal3 from "@/assets/image/medal/medal3.png";
import img from "@/assets/image/uploadimg.png";
import { useRequest, request } from "@/api/request";
import { PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS } from "@/api/api";
import {
PROJECT_PROCESS,
ROUTER_PROCESS,
LINK_DETAILS,
STUDY_RECORD,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
@@ -393,12 +398,21 @@ const types = ref({
},
});
function toFinish(d, sName) {
function toFinish(d, sName, chapterId) {
console.log("dddddd", d);
if (!types.value.path[d.type]) {
ElMessage.error("暂时未开放");
return;
}
if (d.type == 3 || d.type == 7) {
request(STUDY_RECORD, {
studentId: data.value.userInfoBo.userId,
targetId: data.value.routerId,
logo: 2,
stageOrChapterId: chapterId,
taskId: d.projectTaskId,
});
}
if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&