feat:增加二维码判断

This commit is contained in:
lixg
2023-03-17 14:13:27 +08:00
14 changed files with 316 additions and 480 deletions

View File

@@ -97,7 +97,7 @@
import { computed, defineProps, ref, watch } from "vue"; import { computed, defineProps, ref, watch } from "vue";
import { useRouter } from "vue-router/dist/vue-router"; import { useRouter } from "vue-router/dist/vue-router";
import { ElLoading, ElMessage } from "element-plus"; import { ElLoading, ElMessage } from "element-plus";
import { ROUTERTASK_LIST } from "@/api/api"; import { ROUTERTASK_LIST, checkStudentExist } from "@/api/api";
import { usePage, useRequest } from "@/api/request"; import { usePage, useRequest } from "@/api/request";
const listheight = document.body.clientHeight - 300 + "px"; const listheight = document.body.clientHeight - 300 + "px";
console.log("listheight", listheight); console.log("listheight", listheight);
@@ -235,13 +235,29 @@ const { data } = useRequest(
ROUTERTASK_LIST, ROUTERTASK_LIST,
{ routerId: props.routerId }, { routerId: props.routerId },
(e) => { (e) => {
closeLoading(); useRequest(
console.log("获取路径图", e); checkStudentExist,
if (e.code === 6) { {
router.push({ targetId: props.routerId,
path: "/notpath", type: 1,
}); },
} (res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
closeLoading();
console.log("获取路径图", e);
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
} }
); );
console.log("data", data, props.routerInfo); console.log("data", data, props.routerInfo);

View File

@@ -147,7 +147,7 @@
</template> </template>
<script setup> <script setup>
import { TASK_ACTIVITY_SIGN, ACTIVITY } from "@/api/api"; import { TASK_ACTIVITY_SIGN, ACTIVITY, checkStudentExist } from "@/api/api";
import { request, useRequest } from "@/api/request"; import { request, useRequest } from "@/api/request";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useRoute } from "vue-router/dist/vue-router"; import { useRoute } from "vue-router/dist/vue-router";
@@ -160,7 +160,7 @@ const returnclick = () => {
router.back(); router.back();
}; };
const { const {
query: { courseId: activityId, id: taskId, type }, query: { courseId: activityId, id: taskId, type, chapterOrStageId, infoId },
} = useRoute(); } = useRoute();
console.log("query", activityId, taskId, type); console.log("query", activityId, taskId, type);
const state = reactive({ const state = reactive({
@@ -175,11 +175,29 @@ onUnmounted(() => {
const { isAllowSign, closeBtn } = toRefs(state); const { isAllowSign, closeBtn } = toRefs(state);
const { data } = useRequest(ACTIVITY, { activityId, type }, (e) => { const { data } = useRequest(ACTIVITY, { activityId, type }, (e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
chapterId: chapterOrStageId,
courseId: taskId,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
}); });
console.log("data", data); console.log("data", data);

View File

@@ -181,6 +181,7 @@ import {
VOTE_DETAIL3, VOTE_DETAIL3,
VOTE_DETAIL_SUBMIT, VOTE_DETAIL_SUBMIT,
EditVoteInvolvedAndBrowse, EditVoteInvolvedAndBrowse,
checkStudentExist,
} from "@/api/api"; } from "@/api/api";
import dayjs from "dayjs"; import dayjs from "dayjs";
import store from "@/store"; import store from "@/store";
@@ -199,11 +200,29 @@ onUnmounted(() => {
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const { data } = useRequest(VOTE_DETAIL3, { voteId: courseId, type }, (e) => { const { data } = useRequest(VOTE_DETAIL3, { voteId: courseId, type }, (e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
chapterId: chapterOrStageId,
courseId: id,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
}); });
// 增加浏览量 // 增加浏览量
watch(data, () => { watch(data, () => {

View File

@@ -127,6 +127,7 @@ import {
QueryDiscussSubmitDetailByDiscussId, QueryDiscussSubmitDetailByDiscussId,
PostList, PostList,
PostPraise, PostPraise,
checkStudentExist,
} from "@/api/api"; } from "@/api/api";
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
@@ -169,22 +170,40 @@ const closeLoading = () => {
}; };
//获取讨论详情 //获取讨论详情
const { const {
query: { id, type }, query: { id, type, infoId, chapterOrStageId, id: taskId },
} = useRoute(); } = useRoute();
request(DISCUSS_LIST, { request(DISCUSS_LIST, {
type: type, type: type,
id, id,
}) })
.then((e) => { .then((e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
state.info = e.data; chapterId: chapterOrStageId,
console.log("讨论详情", state.info); courseId: taskId,
state.discussId = e.data.discussDtoList[0].id; },
getPostList(e.data.discussDtoList[0].id); (res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
state.info = e.data;
console.log("讨论详情", state.info);
state.discussId = e.data.discussDtoList[0].id;
getPostList(e.data.discussDtoList[0].id);
}
}
);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);

View File

@@ -76,6 +76,7 @@ import {
STUDY_RECORD, STUDY_RECORD,
EvaluationToLearn, EvaluationToLearn,
QueryEvaluationTaskStatusOne, QueryEvaluationTaskStatusOne,
checkStudentExist,
} from "@/api/api"; } from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router"; import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
@@ -94,6 +95,7 @@ const {
btype, btype,
quizTaskId, quizTaskId,
type, type,
id: taskId,
}, },
} = useRoute(); } = useRoute();
const router = useRouter(); const router = useRouter();
@@ -103,11 +105,29 @@ onUnmounted(() => {
} }
}); });
const { data } = useRequest(EVALUATION_DETAIL, { evaluationId, type }, (e) => { const { data } = useRequest(EVALUATION_DETAIL, { evaluationId, type }, (e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
chapterId: chapterOrStageId,
courseId: taskId,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
}); });
console.log("测评信息222", data); console.log("测评信息222", data);

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-06 18:26:23 * @Date: 2023-02-06 18:26:23
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-03-17 11:27:21 * @LastEditTime: 2023-03-17 12:19:23
* @FilePath: /stu_h5/src/views/examination/ExternalExam.vue * @FilePath: /stu_h5/src/views/examination/ExternalExam.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@@ -64,7 +64,6 @@ request(EXTERNALEXAM, { externalId: courseId, type })
}, },
(res) => { (res) => {
console.log("判断任务是否删除", res); console.log("判断任务是否删除", res);
closeLoading();
if (res.code === 7) { if (res.code === 7) {
router.push({ router.push({
path: "/loseefficacy", path: "/loseefficacy",
@@ -74,12 +73,12 @@ request(EXTERNALEXAM, { externalId: courseId, type })
router.push({ router.push({
path: "/notpath", path: "/notpath",
}); });
} else {
state.datainfo = e.data;
} }
} }
} }
); );
state.datainfo = e.data;
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);

View File

@@ -33,34 +33,23 @@
<div v-if="projectStatus && projectEndTime"> <div v-if="projectStatus && projectEndTime">
<div <div
v-if=" v-if=" projectStatus !== '3' &&
projectStatus !== '3' && new Date(projectEndTime).getTime() > new Date().getTime()
new Date(changeTime(projectEndTime)).getTime() >
new Date().getTime()
" "
style="display: flex" style="display: flex"
> >
<botton <botton
class="titlebtn" class="titlebtn"
style="margin-right: 20px" style="margin-right: 20px"
:style="{ :style="{ background: isAllowSign && !data.signFlag ?'rgb(57, 146, 249)' : '#999' }"
background: isAllowSign
? data.signFlag
? '#999'
: 'rgb(57, 146, 249)'
: '#999',
}"
@click="signClick" @click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }} >{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton> -->
<botton <botton
v-if="data.planDto?.evalFlag !== 0" v-if="data.planDto?.evalFlag !== 0"
:style="{ :style="{
background: `${ background: `${
new Date(changeTime(data.planDto?.beginTime)).getTime() > new Date(data.planDto?.beginTime).getTime() >
new Date().getTime() new Date().getTime()
? '#999' ? '#999'
: data.isSurvery : data.isSurvery
@@ -70,7 +59,7 @@
}" }"
class="titlebtn" class="titlebtn"
@click="toSurvery" @click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }} >{{ data.isSurvery ? "已评估" : "评估" }}
</botton> </botton>
</div> </div>
</div> </div>
@@ -87,16 +76,13 @@
: '#999', : '#999',
}" }"
@click="signClick" @click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }} >{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton> -->
<botton <botton
v-if="data.planDto?.evalFlag !== 0" v-if="data.planDto?.evalFlag !== 0"
:style="{ :style="{
background: `${ background: `${
new Date(changeTime(data.planDto?.beginTime)).getTime() > new Date(data.planDto?.beginTime).getTime() >
new Date().getTime() new Date().getTime()
? '#999' ? '#999'
: data.isSurvery : data.isSurvery
@@ -106,28 +92,10 @@
}" }"
class="titlebtn" class="titlebtn"
@click="toSurvery" @click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }} >{{ data.isSurvery ? "已评估" : "评估" }}
</botton> </botton>
</div> </div>
</div> </div>
<!-- <button
v-if="data.planDto?.evalFlag !== 0"
:style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="titlebtn"
@click="toSurvery"
>
{{ data.isSurvery ? "已评估" : "评估" }}
</button> -->
</div> </div>
</div> </div>
<div class="teacher"> <div class="teacher">
@@ -141,14 +109,13 @@
<div class="box" style="width: 80px; right: 0px"></div> <div class="box" style="width: 80px; right: 0px"></div>
</div> </div>
<div class="teachermain"> <div class="teachermain">
<img class="teacherAvatar" :src="teacherInfo?.avatar" /> <img class="teacherAvatar" :src="teacherInfo?.avatar"/>
<div style="flex: 1; margin-left: 11px; margin-right: 13px"> <div style="flex: 1; margin-left: 11px; margin-right: 13px">
<div class="teacherName">{{ data.planDto?.teacher }}</div> <div class="teacherName">{{ data.planDto?.teacher }}</div>
<div class="teacherIntro"> <div class="teacherIntro">
{{ data.planDto?.bandDesc }} {{ data.planDto?.bandDesc }}
</div> </div>
</div> </div>
<!-- <div class="teacherFollow">+ 关注</div> -->
</div> </div>
</div> </div>
</div> </div>
@@ -213,18 +180,15 @@
el.name el.name
? el.name ? el.name
: el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) + : el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf(".")) el.slice(el.lastIndexOf("."))
}} }}
</div> </div>
<!-- <img style="width: 19.5px; height: 22px" :src="el.img" />
<div style="margin-left: 15px">{{ el.name }}</div> -->
</div> </div>
<div> <div>
<div <div
v-if=" v-if="
new Date( new Date(data.planDto.beginTime).getTime() >
changeTime(data.planDto?.beginTime) new Date().getTime()
).getTime() > new Date().getTime()
" "
class="download" class="download"
> >
@@ -283,9 +247,8 @@
<div <div
:style="{ :style="{
background: background:
new Date( new Date(data.planDto?.beginTime).getTime() >
changeTime(data.planDto?.beginTime) new Date().getTime()
).getTime() > new Date().getTime()
? '#999' ? '#999'
: '', : '',
}" }"
@@ -346,9 +309,8 @@
<div <div
:style="{ :style="{
background: background:
new Date( new Date(data.planDto?.beginTime).getTime() >
changeTime(data.planDto?.beginTime) new Date().getTime()
).getTime() > new Date().getTime()
? '#999' ? '#999'
: '', : '',
}" }"
@@ -384,181 +346,71 @@
<script setup> <script setup>
import TitleHead from "@/components/TitleHead.vue"; import TitleHead from "@/components/TitleHead.vue";
import ReturnHead from "@/components/ReturnHead.vue"; import ReturnHead from "@/components/ReturnHead.vue";
import { computed, reactive, toRefs, watch, onUnmounted, ref } from "vue"; import {computed, onBeforeMount} from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue"; import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request"; import {request, useRequest} from "@/api/request";
import { import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
STU_OFFCOURSE_DETAIL, import {useRoute, useRouter} from "vue-router";
TASK_OFFCOURSE_NOTASK_SIGN, import {useUserInfo} from "@/api/utils";
TASK_OFFCOURSE_SIGN, import {ElMessage} from "element-plus";
TASK_BROADCAST_SIGN,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { changeTime } from "@/api/method"; import isBetween from "dayjs/plugin/isBetween";
const router = useRouter(); const router = useRouter();
onBeforeMount(() => dayjs.extend(isBetween));
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
}; };
const { const {
query: { courseId, type, id: taskId, projectStatus, projectEndTime }, query: { courseId, type, id: taskId, projectStatus, projectEndTime },
} = useRoute(); } = useRoute();
onUnmounted(() => {
if (timer) {
clearInterval(timer);
}
});
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }); const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
console.log("datadatadatadatadatadatadata", data);
// console.log("项目状态字段传递", projectStatus, projectEndTime);
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId)); const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
const state = reactive({ const activeName = ref("first");
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log("附件", tab, event); console.log("附件", tab, event);
}; };
const download = (url) => { const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
console.log(
"url2",
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url
);
window.open(
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url,
"_top"
);
};
const downloads = (url) => { const downloads = (url) => {
ElMessage.warning("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
}; };
function formateArr(strs) { function formateArr(strs) {
console.log("strs", strs); let newArr;
let newArr = [];
try { try {
newArr = JSON.parse(strs); newArr = JSON.parse(strs);
} catch { } catch {
newArr = strs ? strs.split(",") : []; newArr = strs ? strs.split(",") : [];
} }
console.log("112233", newArr);
return newArr; return newArr;
} }
let timer = null;
//判断能否签到
function isSignClick() {
// timer = setInterval(() => {
if (
data &&
data.value &&
data.value.planDto?.beginTime &&
data.value.planDto?.endTime
) {
let newStartTime = changeTime(data.value.planDto?.beginTime);
let newEndTime = data.value.planDto?.endTime.replaceAll("-", "/");
let beginTime = new Date(newStartTime).getTime();
let endTime = !data.value.planDto?.afterStart
? new Date(newEndTime).getTime()
: new Date(newStartTime).getTime();
let nowTime = new Date().getTime();
if (data.value.planDto?.beforeStart && data.value.planDto?.afterStart) {
//有开始前有开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111");
} else if (
data.value.planDto?.beforeStart &&
!data.value.planDto?.afterStart
) {
//只有开始前无开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
console.log("11112222");
} else if (
!data.value.planDto?.beforeStart &&
data.value.planDto?.afterStart
) {
//无开始前有开始后
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111333");
}
console.log("nowTime", nowTime, endTime);
if (nowTime < endTime && nowTime > beginTime) {
state.isAllowSign = true;
} else {
state.isAllowSign = false;
}
}
// console.log(
// "isAllowSign",
// state.isAllowSign,
// nowTime,
// endTime,
// beginTime,
// nowTime < endTime,
// nowTime > beginTime
// );
// }, 1000);
}
watch(data, () => {
isSignClick();
});
//签到 //签到
const signClick = () => { const signClick = () => {
if (data.value.signFlag) { if (data.value.signFlag) {
return; return;
} }
// console.log( if (!isAllowSign.value) {
// "data.signFlag", return ElMessage.warning("未在允许签到时间范围内");
// data.value.signFlag,
// state.isAllowSign,
// !state.isAllowSign
// );
//if (data.value.planDto.beginTime) {
// let date1 = new Date(data.value.planDto.beginTime).getTime()
// let date2 = new Date().getTime()
// if (date1 > date2) {
// ElMessage.info("未到开始时间,请耐心等待!");
// return;
// }
//}
if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.warning("未在允许签到时间范围内");
return;
} }
data.value.signFlag = 1; data.value.signFlag = 1;
ElMessage.warning("签到成功"); ElMessage.warning("签到成功");
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId,taskId:courseId,type:3 });
if (taskId) {
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
} else {
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
}
}; };
function toSurvery() { function toSurvery() {
if (data.value.isSurvery) { if (dayjs().isBefore(data.value.planDto.beginTime)) {
// return;
}
if (
data.value.planDto.beginTime &&
dayjs().isBefore(data.value.planDto.beginTime)
) {
ElMessage.warning("课程未开始,请耐心等待!"); ElMessage.warning("课程未开始,请耐心等待!");
return; return;
} }
if (data.value.planDto.evalFlag == 0) { if (!data.value.planDto.evalFlag) {
ElMessage.warning("此课程无评估"); ElMessage.warning("此课程无评估");
return; return;
} }
@@ -577,13 +429,9 @@ function toSurvery() {
} }
function toWork() { function toWork() {
if (data.value.planDto.beginTime) { if (dayjs().isBefore(data.value.planDto.beginTime)) {
let date1 = new Date(changeTime(data.value.planDto.beginTime)).getTime(); ElMessage.warning("未到开始时间,请耐心等待!");
let date2 = new Date().getTime(); return;
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
} }
router.push({ router.push({
path: "/homeworkpage", path: "/homeworkpage",
@@ -600,15 +448,10 @@ function toWork() {
} }
function toExamItem(obj) { function toExamItem(obj) {
if (data.value.planDto.beginTime) { if (dayjs().isBefore(data.value.planDto.beginTime)) {
let date1 = new Date(changeTime(data.value.planDto.beginTime)).getTime(); ElMessage.warning("未到开始时间,请耐心等待!");
let date2 = new Date().getTime(); return;
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
} }
console.log("obj", obj);
if (obj.examType === 2) { if (obj.examType === 2) {
router.push({ router.push({
path: "/externalexam", path: "/externalexam",
@@ -617,30 +460,23 @@ function toExamItem(obj) {
type: 3, type: 3,
}, },
}); });
} else { } else window.open(window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, "_top");
window.open(
window.location.protocol +
import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
obj.examinationTestId,
"_top"
);
}
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
} }
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss"> <style lang="scss">
.faceteach { .faceteach {
width: 100%; width: 100%;
padding-bottom: 20px; padding-bottom: 20px;
.main { .main {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: -14.5px; margin-top: -14.5px;
.title { .title {
width: 90%; width: 90%;
height: 74px; height: 74px;
@@ -648,17 +484,20 @@ function toExamItem(obj) {
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
display: flex; display: flex;
justify-content: center; justify-content: center;
.titlemain { .titlemain {
width: 90%; width: 90%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.timeposition { .timeposition {
.time { .time {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
.titlebtn { .titlebtn {
width: 83px; width: 83px;
height: 33px; height: 33px;
@@ -676,12 +515,14 @@ function toExamItem(obj) {
} }
} }
} }
.teachertitle { .teachertitle {
width: 90px; width: 90px;
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 21px; margin-top: 21px;
.talk { .talk {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
@@ -689,6 +530,7 @@ function toExamItem(obj) {
line-height: 12px; line-height: 12px;
margin-left: 7.5px; margin-left: 7.5px;
} }
.box { .box {
position: absolute; position: absolute;
width: 62.5px; width: 62.5px;
@@ -698,6 +540,7 @@ function toExamItem(obj) {
background: rgba(36, 120, 255, 0.15); background: rgba(36, 120, 255, 0.15);
} }
} }
.teacher { .teacher {
width: 90%; width: 90%;
padding-bottom: 15px; padding-bottom: 15px;
@@ -712,18 +555,21 @@ function toExamItem(obj) {
margin-top: 24px; margin-top: 24px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.teacherAvatar { .teacherAvatar {
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 25px; border-radius: 25px;
margin-left: 4px; margin-left: 4px;
} }
.teacherName { .teacherName {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #394145; color: #394145;
line-height: 21px; line-height: 21px;
} }
.teacherIntro { .teacherIntro {
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
@@ -731,6 +577,7 @@ function toExamItem(obj) {
line-height: 21px; line-height: 21px;
margin-top: 12px; margin-top: 12px;
} }
.teacherFollow { .teacherFollow {
width: 73px; width: 73px;
height: 28px; height: 28px;
@@ -748,6 +595,7 @@ function toExamItem(obj) {
} }
} }
} }
.detail { .detail {
width: 90%; width: 90%;
padding-bottom: 25px; padding-bottom: 25px;
@@ -757,6 +605,7 @@ function toExamItem(obj) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.detailMain { .detailMain {
margin-top: 22px; margin-top: 22px;
font-size: 13px; font-size: 13px;
@@ -765,6 +614,7 @@ function toExamItem(obj) {
line-height: 24px; line-height: 24px;
} }
} }
.course { .course {
width: 90%; width: 90%;
// padding-bottom: 15px; // padding-bottom: 15px;
@@ -774,12 +624,14 @@ function toExamItem(obj) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.el-tabs__nav { .el-tabs__nav {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.el-tabs__item { .el-tabs__item {
height: 50px; height: 50px;
padding: 0px; padding: 0px;
@@ -788,12 +640,15 @@ function toExamItem(obj) {
line-height: 21px; line-height: 21px;
padding-top: 15px; padding-top: 15px;
} }
.el-tabs__nav-wrap::after { .el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2); background-color: rgba(56, 125, 247, 0.2);
} }
.el-tabs__header { .el-tabs__header {
margin: 0; margin: 0;
} }
.enclosure { .enclosure {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
@@ -801,6 +656,7 @@ function toExamItem(obj) {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.enclosureL { .enclosureL {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -809,6 +665,7 @@ function toExamItem(obj) {
color: #677d86; color: #677d86;
line-height: 19px; line-height: 19px;
} }
.download { .download {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -818,6 +675,7 @@ function toExamItem(obj) {
line-height: 19px; line-height: 19px;
} }
} }
.work { .work {
// margin-left: 51px; // margin-left: 51px;
// margin-right: 40px; // margin-right: 40px;
@@ -829,6 +687,7 @@ function toExamItem(obj) {
justify-content: space-between; justify-content: space-between;
margin-top: 17.5px; margin-top: 17.5px;
} }
.work .question { .work .question {
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 500;

View File

@@ -147,24 +147,15 @@
<script setup> <script setup>
import ReturnHead from "@/components/ReturnHead.vue"; import ReturnHead from "@/components/ReturnHead.vue";
import { import {computed, ref,} from "vue";
computed,
reactive,
toRefs,
watch,
onUnmounted,
onMounted,
ref,
} from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue"; import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request"; import {request, useRequest} from "@/api/request";
import { STU_OFFCOURSE_DETAIL, FACETEACH_SIGNUP } from "@/api/api"; import {FACETEACH_SIGNUP, STU_OFFCOURSE_DETAIL} from "@/api/api";
import { useRoute, useRouter } from "vue-router"; import {useRoute, useRouter} from "vue-router";
import { useUserInfo } from "@/api/utils"; import {useUserInfo} from "@/api/utils";
import { ElMessage, messageConfig, ElLoading } from "element-plus"; import {ElLoading, ElMessage} from "element-plus";
import dayjs from "dayjs"; import dayjs from "dayjs";
import UploadPostImg from "@/components/img/UploadPostImg.vue";
import CommentReply from "@/components/CommentReply.vue";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
@@ -184,36 +175,15 @@ openLoading();
const closeLoading = () => { const closeLoading = () => {
loading.value.close(); loading.value.close();
}; };
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => { const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => closeLoading());
closeLoading();
});
console.log("获取信息", data);
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId)); const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({ const activeName = ref("first");
activeName: "first", const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
console.log(
"url2",
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url
);
window.open(
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url,
"_top"
);
};
const downloads = (url) => { const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!"); ElMessage.warning("未在有效时间范围内,请耐心等待!");
}; };
let timer = null;
// 报名 // 报名
function onLineSignUp() { function onLineSignUp() {
@@ -231,21 +201,8 @@ function formateArr(strs) {
return arrs; return arrs;
} }
// watch(data, () => {
// console.log("data.offcourseDto", data.value.offcourseDto);
// if (data.value.offcourseDto && data.value.offcourseDto.outline) {
// let obj = data.value.offcourseDto.outline;
// let regex = new RegExp("<img", "gi");
// let deleteStyle = /(?<=\" )style=\".*?\"/gi;
// obj = obj.replace(deleteStyle, "");
// obj = obj.replace(regex, '<img style="max-width: 100%;height:auto"');
// data.value.offcourseDto.outline = obj;
// console.log("data.offcourseDto.outline", data.value.offcourseDto.outline);
// }
// });
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss"> <style lang="scss">
.faceteachnocommon { .faceteachnocommon {
width: 100%; width: 100%;

View File

@@ -153,20 +153,21 @@
<script setup> <script setup>
import ReturnHead from "@/components/ReturnHead.vue"; import ReturnHead from "@/components/ReturnHead.vue";
import { computed, reactive, toRefs, watch, onUnmounted, ref } from "vue"; import {computed, ref} from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue"; import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request"; import {request, useRequest} from "@/api/request";
import { STU_OFFCOURSE_DETAIL, FACETEACH_SIGNUP } from "@/api/api"; import {FACETEACH_SIGNUP, STU_OFFCOURSE_DETAIL} from "@/api/api";
import { useRoute, useRouter } from "vue-router"; import {useRoute, useRouter} from "vue-router";
import { useUserInfo } from "@/api/utils"; import {useUserInfo} from "@/api/utils";
import { ElMessage, messageConfig, ElLoading } from "element-plus"; import {ElLoading, ElMessage} from "element-plus";
import dayjs from "dayjs"; import dayjs from "dayjs";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
}; };
const { const {
query: { courseId, type, id: taskId }, query: { courseId },
} = useRoute(); } = useRoute();
const loading = ref(false); // loading const loading = ref(false); // loading
const openLoading = () => { const openLoading = () => {
@@ -177,40 +178,20 @@ const openLoading = () => {
}); });
}; };
openLoading(); openLoading();
const closeLoading = () => { const closeLoading = () => loading.value.close();
loading.value.close(); const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => closeLoading());
};
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => {
closeLoading();
});
console.log("获取信息", data);
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId)); const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const activeName = ref("first");
const state = reactive({
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log("附件", tab, event); console.log("附件", tab, event);
}; };
const download = (url) => { const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
console.log(
"url2",
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url
);
window.open(
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url,
"_top"
);
};
const downloads = (url) => { const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!"); ElMessage.warning("未在有效时间范围内,请耐心等待!");
}; };
let timer = null;
// 报名 // 报名
function onLineSignUp() { function onLineSignUp() {
if (data.value.isSignUp) { if (data.value.isSignUp) {
@@ -222,25 +203,11 @@ function onLineSignUp() {
} }
function formateArr(strs) { function formateArr(strs) {
let arrs = strs.split(","); return strs?.split(",");
console.log("112233", arrs);
return arrs;
} }
// watch(data, () => {
// console.log("data.offcourseDto", data.value.offcourseDto);
// if (data.value.offcourseDto && data.value.offcourseDto.outline) {
// let obj = data.value.offcourseDto.outline;
// let regex = new RegExp("<img", "gi");
// let deleteStyle = /(?<=\" )style=\".*?\"/gi;
// obj = obj.replace(deleteStyle, "");
// obj = obj.replace(regex, '<img style="max-width: 100%;height:auto"');
// data.value.offcourseDto.outline = obj;
// console.log("data.offcourseDto.outline", data.value.offcourseDto.outline);
// }
// });
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss"> <style lang="scss">
.faceteachnocourse { .faceteachnocourse {
width: 100%; width: 100%;

View File

@@ -183,31 +183,25 @@
<script setup> <script setup>
import ReturnHead from "@/components/ReturnHead.vue"; import ReturnHead from "@/components/ReturnHead.vue";
import { import {computed, onBeforeMount, ref,} from "vue";
computed,
reactive,
toRefs,
watch,
onUnmounted,
onMounted,
ref,
} from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue"; import FileTypeImg from "@/components/FileTypeImg.vue";
import { request, useRequest } from "@/api/request"; import {request, useRequest} from "@/api/request";
import { STU_OFFCOURSE_DETAIL, FACETEACH_SIGNUP } from "@/api/api"; import {FACETEACH_SIGNUP, STU_OFFCOURSE_DETAIL} from "@/api/api";
import { useRoute, useRouter } from "vue-router"; import {useRoute, useRouter} from "vue-router";
import { useUserInfo } from "@/api/utils"; import {useUserInfo} from "@/api/utils";
import { ElMessage, messageConfig, ElLoading } from "element-plus"; import {ElLoading, ElMessage} from "element-plus";
import CommentReply from "@/components/CommentReply.vue"; import CommentReply from "@/components/CommentReply.vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { changeTime } from "@/api/method"; import isBetween from "dayjs/plugin/isBetween";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
}; };
const { const {
query: { courseId, type, id: taskId }, query: { courseId },
} = useRoute(); } = useRoute();
onBeforeMount(() => dayjs.extend(isBetween));
const loading = ref(false); // loading const loading = ref(false); // loading
const openLoading = () => { const openLoading = () => {
loading.value = ElLoading.service({ loading.value = ElLoading.service({
@@ -220,50 +214,18 @@ openLoading();
const closeLoading = () => { const closeLoading = () => {
loading.value.close(); loading.value.close();
}; };
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => { const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => closeLoading());
closeLoading(); const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
});
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId)); const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const activeName = ref("first");
const state = reactive({
activeName: "first",
enclosure: "",
isAllowSign: false,
});
const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log("附件", tab, event); console.log("附件", tab, event);
}; };
const download = (url) => { const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
console.log(
"url2",
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url
);
window.open(
import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url,
"_top"
);
};
//判断能否报名 (TODO-大于面授课截止时间就不能报名了,其余均可以)
function isSignClick() {
let endTime = new Date(changeTime(data.value.planDto?.endTime)).getTime();
let nowTime = new Date().getTime();
if (nowTime < endTime) {
state.isAllowSign = true;
} else {
state.isAllowSign = false;
}
console.log(state.isAllowSign);
}
watch(data, () => {
isSignClick();
});
// 报名 // 报名
function onLineSignUp(isAgain) { function onLineSignUp(isAgain) {
if (!state.isAllowSign) { if (!isAllowSign.value) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.warning("未在允许报名时间范围内"); ElMessage.warning("未在允许报名时间范围内");
return; return;
} }
@@ -272,72 +234,17 @@ function onLineSignUp(isAgain) {
} }
request(FACETEACH_SIGNUP, { courseId }); request(FACETEACH_SIGNUP, { courseId });
data.value.isSignUp = true; data.value.isSignUp = true;
//重置按钮
data.value.isSignUpAgain = isAgain; data.value.isSignUpAgain = isAgain;
data.value.isRefused = false; data.value.isRefused = false;
ElMessage.success(isAgain ? "重新报名成功" : "报名成功"); ElMessage.success(isAgain ? "重新报名成功" : "报名成功");
} }
function formateArr(strs) { function formateArr(strs) {
let arrs = strs.split(","); return strs?.split(",");
console.log("112233", arrs);
return arrs;
}
// watch(data, () => {
// console.log("data.offcourseDto", data, data.value.offcourseDto);
// if (data.value.offcourseDto && data.value.offcourseDto.outline) {
// let obj = data.value.offcourseDto.outline;
// let regex = new RegExp("<img", "gi");
// let deleteStyle = /(?<=\" )style=\".*?\"/gi;
// obj = obj.replace(deleteStyle, "");
// obj = obj.replace(regex, '<img style="max-width: 100%;height:auto"');
// data.value.offcourseDto.outline = obj;
// console.log("data.offcourseDto.outline", data.value.offcourseDto.outline);
// }
// });
// onMounted(() => {
// console.log("data.offcourseDto?.outline", data.value);
// // console.log("document", document.getElementById("face_img_id"));
// let imgs = document.getElementById("face_img_id").getElementsByTagName("img");
// console.log("imgs", imgs, imgs.length);
// let timer = setInterval(() => {
// if (imgs && imgs.length !== 0) {
// clearInterval(timer);
// for (let i = 0; i < imgs.length; i++) {
// console.log("11111", imgs[i], i);
// // console.log(
// // "document.body.clientWidth",
// // document.body.clientWidth,
// // imgs[i].width
// // );
// // if (document.body.clientWidth <= imgs[i].width) {
// // imgs[i].style.width = "100%";
// // }
// getImgInfo(imgs[i].src, i, imgs);
// }
// }
// }, 1000);
// });
function getImgInfo(url, i, imgs) {
console.log("url_i", url, i);
let image = new Image();
let w, h;
image.src = url;
console.log("dj", image.width);
image.onload = function () {
w = image.width;
console.log("image.width", image.width);
h = image.height;
console.log("document.body.clientWidth", document.body.clientWidth);
if (document.body.clientWidth <= w) {
imgs[i].style.width = "100%";
}
image.onload = null;
};
} }
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss"> <style lang="scss">
.faceteachsignup { .faceteachsignup {
width: 100%; width: 100%;

View File

@@ -223,7 +223,11 @@ import checkbox from "@/assets/image/checkbox.png";
import checkbox2 from "@/assets/image/checkbox2.png"; import checkbox2 from "@/assets/image/checkbox2.png";
import { useRoute, useRouter } from "vue-router/dist/vue-router"; import { useRoute, useRouter } from "vue-router/dist/vue-router";
import { request, usePage, useRequest } from "@/api/request"; import { request, usePage, useRequest } from "@/api/request";
import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api"; import {
ASSESSMENT_QUERY,
ASSESSMENT_SUBMIT,
checkStudentExist,
} from "@/api/api";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import ReturnHead from "@/components/ReturnHead.vue"; import ReturnHead from "@/components/ReturnHead.vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -255,11 +259,29 @@ const { data } = useRequest(
targetId: infoId ? infoId : 0, targetId: infoId ? infoId : 0,
}, },
(e) => { (e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
chapterId: chapterOrStageId,
courseId: taskId,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
} }
); );

View File

@@ -254,7 +254,6 @@ const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId, type }, (e) => {
}, },
(res) => { (res) => {
console.log("判断任务是否删除", res); console.log("判断任务是否删除", res);
closeLoading();
if (res.code === 7) { if (res.code === 7) {
router.push({ router.push({
path: "/loseefficacy", path: "/loseefficacy",

View File

@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue";
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue"; import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
import img from "@/assets/image/uploadimg.png"; import img from "@/assets/image/uploadimg.png";
import { request, useRequest } from "@/api/request"; import { request, useRequest } from "@/api/request";
import { LINK_DETAILS, STUDY_RECORD } from "@/api/api"; import { LINK_DETAILS, STUDY_RECORD, checkStudentExist } from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router"; import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils"; import { useUserInfo } from "@/api/utils";
@@ -78,11 +78,29 @@ const router = useRouter();
console.log("外链信息", linkId); console.log("外链信息", linkId);
const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => { const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => {
if (e.code === 6) { useRequest(
router.push({ checkStudentExist,
path: "/notpath", {
}); targetId: infoId,
} type: type,
chapterId: chapterOrStageId,
courseId: taskId,
},
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
}); });
console.log("外链信息", data); console.log("外链信息", data);

View File

@@ -213,6 +213,7 @@ import {
PROJECT_DETAIL, PROJECT_DETAIL,
SubmitExternalExam, SubmitExternalExam,
UPDATE_CURRENT_TASK, UPDATE_CURRENT_TASK,
checkStudentExist,
} 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";
@@ -229,12 +230,27 @@ const router = useRouter();
const { commit, dispatch, state } = useStore(); const { commit, dispatch, state } = useStore();
const data = computed(() => state.projectInfo); const data = computed(() => state.projectInfo);
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => { useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
if (e.code === 6) { useRequest(
console.log("eee", e); checkStudentExist,
router.push({ {
path: "/notpath", targetId: projectId,
}); type: type,
} },
(res) => {
console.log("判断任务是否删除", res);
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
}
}
);
}); });
watch(data, () => { watch(data, () => {
if (data.value.code === 6) { if (data.value.code === 6) {