mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 17:36:45 +08:00
feat:增加二维码判断
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
import { computed, defineProps, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router/dist/vue-router";
|
||||
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";
|
||||
const listheight = document.body.clientHeight - 300 + "px";
|
||||
console.log("listheight", listheight);
|
||||
@@ -235,6 +235,19 @@ const { data } = useRequest(
|
||||
ROUTERTASK_LIST,
|
||||
{ routerId: props.routerId },
|
||||
(e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
targetId: props.routerId,
|
||||
type: 1,
|
||||
},
|
||||
(res) => {
|
||||
console.log("判断任务是否删除", res);
|
||||
if (res.code === 7) {
|
||||
router.push({
|
||||
path: "/loseefficacy",
|
||||
});
|
||||
} else {
|
||||
closeLoading();
|
||||
console.log("获取路径图", e);
|
||||
if (e.code === 6) {
|
||||
@@ -243,6 +256,9 @@ const { data } = useRequest(
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
console.log("data", data, props.routerInfo);
|
||||
let current = ref(null);
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</template>
|
||||
|
||||
<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 { useRouter } from "vue-router";
|
||||
import { useRoute } from "vue-router/dist/vue-router";
|
||||
@@ -160,7 +160,7 @@ const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId: activityId, id: taskId, type },
|
||||
query: { courseId: activityId, id: taskId, type, chapterOrStageId, infoId },
|
||||
} = useRoute();
|
||||
console.log("query", activityId, taskId, type);
|
||||
const state = reactive({
|
||||
@@ -175,11 +175,29 @@ onUnmounted(() => {
|
||||
const { isAllowSign, closeBtn } = toRefs(state);
|
||||
|
||||
const { data } = useRequest(ACTIVITY, { activityId, type }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -181,6 +181,7 @@ import {
|
||||
VOTE_DETAIL3,
|
||||
VOTE_DETAIL_SUBMIT,
|
||||
EditVoteInvolvedAndBrowse,
|
||||
checkStudentExist,
|
||||
} from "@/api/api";
|
||||
import dayjs from "dayjs";
|
||||
import store from "@/store";
|
||||
@@ -199,11 +200,29 @@ onUnmounted(() => {
|
||||
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const { data } = useRequest(VOTE_DETAIL3, { voteId: courseId, type }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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, () => {
|
||||
|
||||
@@ -127,6 +127,7 @@ import {
|
||||
QueryDiscussSubmitDetailByDiscussId,
|
||||
PostList,
|
||||
PostPraise,
|
||||
checkStudentExist,
|
||||
} from "@/api/api";
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
@@ -169,13 +170,28 @@ const closeLoading = () => {
|
||||
};
|
||||
//获取讨论详情
|
||||
const {
|
||||
query: { id, type },
|
||||
query: { id, type, infoId, chapterOrStageId, id: taskId },
|
||||
} = useRoute();
|
||||
request(DISCUSS_LIST, {
|
||||
type: type,
|
||||
id,
|
||||
})
|
||||
.then((e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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",
|
||||
@@ -185,6 +201,9 @@ request(DISCUSS_LIST, {
|
||||
console.log("讨论详情", state.info);
|
||||
state.discussId = e.data.discussDtoList[0].id;
|
||||
getPostList(e.data.discussDtoList[0].id);
|
||||
}
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
@@ -76,6 +76,7 @@ import {
|
||||
STUDY_RECORD,
|
||||
EvaluationToLearn,
|
||||
QueryEvaluationTaskStatusOne,
|
||||
checkStudentExist,
|
||||
} from "@/api/api";
|
||||
import { useRoute } from "vue-router/dist/vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
@@ -94,6 +95,7 @@ const {
|
||||
btype,
|
||||
quizTaskId,
|
||||
type,
|
||||
id: taskId,
|
||||
},
|
||||
} = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -103,11 +105,29 @@ onUnmounted(() => {
|
||||
}
|
||||
});
|
||||
const { data } = useRequest(EVALUATION_DETAIL, { evaluationId, type }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-06 18:26:23
|
||||
* @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
|
||||
* @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) => {
|
||||
console.log("判断任务是否删除", res);
|
||||
closeLoading();
|
||||
if (res.code === 7) {
|
||||
router.push({
|
||||
path: "/loseefficacy",
|
||||
@@ -74,12 +73,12 @@ request(EXTERNALEXAM, { externalId: courseId, type })
|
||||
router.push({
|
||||
path: "/notpath",
|
||||
});
|
||||
} else {
|
||||
state.datainfo = e.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
state.datainfo = e.data;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
@@ -33,34 +33,23 @@
|
||||
|
||||
<div v-if="projectStatus && projectEndTime">
|
||||
<div
|
||||
v-if="
|
||||
projectStatus !== '3' &&
|
||||
new Date(changeTime(projectEndTime)).getTime() >
|
||||
new Date().getTime()
|
||||
v-if=" projectStatus !== '3' &&
|
||||
new Date(projectEndTime).getTime() > new Date().getTime()
|
||||
"
|
||||
style="display: flex"
|
||||
>
|
||||
<botton
|
||||
class="titlebtn"
|
||||
style="margin-right: 20px"
|
||||
:style="{
|
||||
background: isAllowSign
|
||||
? data.signFlag
|
||||
? '#999'
|
||||
: 'rgb(57, 146, 249)'
|
||||
: '#999',
|
||||
}"
|
||||
:style="{ background: isAllowSign && !data.signFlag ?'rgb(57, 146, 249)' : '#999' }"
|
||||
@click="signClick"
|
||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
|
||||
评估
|
||||
</botton> -->
|
||||
<botton
|
||||
v-if="data.planDto?.evalFlag !== 0"
|
||||
:style="{
|
||||
background: `${
|
||||
new Date(changeTime(data.planDto?.beginTime)).getTime() >
|
||||
new Date(data.planDto?.beginTime).getTime() >
|
||||
new Date().getTime()
|
||||
? '#999'
|
||||
: data.isSurvery
|
||||
@@ -89,29 +78,7 @@
|
||||
@click="signClick"
|
||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
|
||||
评估
|
||||
</botton> -->
|
||||
<botton
|
||||
v-if="data.planDto?.evalFlag !== 0"
|
||||
:style="{
|
||||
background: `${
|
||||
new Date(changeTime(data.planDto?.beginTime)).getTime() >
|
||||
new Date().getTime()
|
||||
? '#999'
|
||||
: data.isSurvery
|
||||
? '#999'
|
||||
: 'rgb(57, 146, 249)'
|
||||
}`,
|
||||
}"
|
||||
class="titlebtn"
|
||||
@click="toSurvery"
|
||||
>{{ data.isSurvery ? "已评估" : "评估" }}
|
||||
</botton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <button
|
||||
v-if="data.planDto?.evalFlag !== 0"
|
||||
:style="{
|
||||
background: `${
|
||||
@@ -125,9 +92,10 @@
|
||||
}"
|
||||
class="titlebtn"
|
||||
@click="toSurvery"
|
||||
>
|
||||
{{ data.isSurvery ? "已评估" : "评估" }}
|
||||
</button> -->
|
||||
>{{ data.isSurvery ? "已评估" : "评估" }}
|
||||
</botton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="teacher">
|
||||
@@ -148,7 +116,6 @@
|
||||
{{ data.planDto?.bandDesc }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="teacherFollow">+ 关注</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,15 +183,12 @@
|
||||
el.slice(el.lastIndexOf("."))
|
||||
}}
|
||||
</div>
|
||||
<!-- <img style="width: 19.5px; height: 22px" :src="el.img" />
|
||||
<div style="margin-left: 15px">{{ el.name }}</div> -->
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
v-if="
|
||||
new Date(
|
||||
changeTime(data.planDto?.beginTime)
|
||||
).getTime() > new Date().getTime()
|
||||
new Date(data.planDto.beginTime).getTime() >
|
||||
new Date().getTime()
|
||||
"
|
||||
class="download"
|
||||
>
|
||||
@@ -283,9 +247,8 @@
|
||||
<div
|
||||
:style="{
|
||||
background:
|
||||
new Date(
|
||||
changeTime(data.planDto?.beginTime)
|
||||
).getTime() > new Date().getTime()
|
||||
new Date(data.planDto?.beginTime).getTime() >
|
||||
new Date().getTime()
|
||||
? '#999'
|
||||
: '',
|
||||
}"
|
||||
@@ -346,9 +309,8 @@
|
||||
<div
|
||||
:style="{
|
||||
background:
|
||||
new Date(
|
||||
changeTime(data.planDto?.beginTime)
|
||||
).getTime() > new Date().getTime()
|
||||
new Date(data.planDto?.beginTime).getTime() >
|
||||
new Date().getTime()
|
||||
? '#999'
|
||||
: '',
|
||||
}"
|
||||
@@ -384,181 +346,71 @@
|
||||
<script setup>
|
||||
import TitleHead from "@/components/TitleHead.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 {request, useRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
TASK_OFFCOURSE_NOTASK_SIGN,
|
||||
TASK_OFFCOURSE_SIGN,
|
||||
TASK_BROADCAST_SIGN,
|
||||
} from "@/api/api";
|
||||
import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
import { ElMessage, messageConfig } from "element-plus";
|
||||
import {ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import { changeTime } from "@/api/method";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
|
||||
const router = useRouter();
|
||||
onBeforeMount(() => dayjs.extend(isBetween));
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId, type, id: taskId, projectStatus, projectEndTime },
|
||||
} = useRoute();
|
||||
onUnmounted(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
});
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
console.log("datadatadatadatadatadatadata", data);
|
||||
// console.log("项目状态字段传递", projectStatus, projectEndTime);
|
||||
|
||||
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({
|
||||
activeName: "first",
|
||||
enclosure: "",
|
||||
isAllowSign: false,
|
||||
});
|
||||
const { activeName, enclosure, isAllowSign } = toRefs(state);
|
||||
const activeName = ref("first");
|
||||
|
||||
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 download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
|
||||
|
||||
const downloads = (url) => {
|
||||
ElMessage.warning("未到开始时间,请耐心等待!");
|
||||
};
|
||||
|
||||
function formateArr(strs) {
|
||||
console.log("strs", strs);
|
||||
let newArr = [];
|
||||
let newArr;
|
||||
try {
|
||||
newArr = JSON.parse(strs);
|
||||
} catch {
|
||||
newArr = strs ? strs.split(",") : [];
|
||||
}
|
||||
console.log("112233", 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 = () => {
|
||||
if (data.value.signFlag) {
|
||||
return;
|
||||
}
|
||||
// console.log(
|
||||
// "data.signFlag",
|
||||
// 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;
|
||||
if (!isAllowSign.value) {
|
||||
return ElMessage.warning("未在允许签到时间范围内");
|
||||
}
|
||||
|
||||
data.value.signFlag = 1;
|
||||
ElMessage.warning("签到成功");
|
||||
|
||||
if (taskId) {
|
||||
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
|
||||
} else {
|
||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
|
||||
}
|
||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId,taskId:courseId,type:3 });
|
||||
};
|
||||
|
||||
function toSurvery() {
|
||||
if (data.value.isSurvery) {
|
||||
// return;
|
||||
}
|
||||
if (
|
||||
data.value.planDto.beginTime &&
|
||||
dayjs().isBefore(data.value.planDto.beginTime)
|
||||
) {
|
||||
if (dayjs().isBefore(data.value.planDto.beginTime)) {
|
||||
ElMessage.warning("课程未开始,请耐心等待!");
|
||||
return;
|
||||
}
|
||||
if (data.value.planDto.evalFlag == 0) {
|
||||
if (!data.value.planDto.evalFlag) {
|
||||
ElMessage.warning("此课程无评估");
|
||||
return;
|
||||
}
|
||||
@@ -577,14 +429,10 @@ function toSurvery() {
|
||||
}
|
||||
|
||||
function toWork() {
|
||||
if (data.value.planDto.beginTime) {
|
||||
let date1 = new Date(changeTime(data.value.planDto.beginTime)).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 > date2) {
|
||||
if (dayjs().isBefore(data.value.planDto.beginTime)) {
|
||||
ElMessage.warning("未到开始时间,请耐心等待!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
router.push({
|
||||
path: "/homeworkpage",
|
||||
query: {
|
||||
@@ -600,15 +448,10 @@ function toWork() {
|
||||
}
|
||||
|
||||
function toExamItem(obj) {
|
||||
if (data.value.planDto.beginTime) {
|
||||
let date1 = new Date(changeTime(data.value.planDto.beginTime)).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 > date2) {
|
||||
if (dayjs().isBefore(data.value.planDto.beginTime)) {
|
||||
ElMessage.warning("未到开始时间,请耐心等待!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("obj", obj);
|
||||
if (obj.examType === 2) {
|
||||
router.push({
|
||||
path: "/externalexam",
|
||||
@@ -617,30 +460,23 @@ function toExamItem(obj) {
|
||||
type: 3,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
window.open(
|
||||
window.location.protocol +
|
||||
import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
|
||||
obj.examinationTestId,
|
||||
"_top"
|
||||
);
|
||||
}
|
||||
} else 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>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteach {
|
||||
width: 100%;
|
||||
padding-bottom: 20px;
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: -14.5px;
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
height: 74px;
|
||||
@@ -648,17 +484,20 @@ function toExamItem(obj) {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.titlemain {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.timeposition {
|
||||
.time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.titlebtn {
|
||||
width: 83px;
|
||||
height: 33px;
|
||||
@@ -676,12 +515,14 @@ function toExamItem(obj) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.teachertitle {
|
||||
width: 90px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 21px;
|
||||
|
||||
.talk {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
@@ -689,6 +530,7 @@ function toExamItem(obj) {
|
||||
line-height: 12px;
|
||||
margin-left: 7.5px;
|
||||
}
|
||||
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 62.5px;
|
||||
@@ -698,6 +540,7 @@ function toExamItem(obj) {
|
||||
background: rgba(36, 120, 255, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.teacher {
|
||||
width: 90%;
|
||||
padding-bottom: 15px;
|
||||
@@ -712,18 +555,21 @@ function toExamItem(obj) {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.teacherAvatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 25px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.teacherName {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #394145;
|
||||
line-height: 21px;
|
||||
}
|
||||
|
||||
.teacherIntro {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
@@ -731,6 +577,7 @@ function toExamItem(obj) {
|
||||
line-height: 21px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.teacherFollow {
|
||||
width: 73px;
|
||||
height: 28px;
|
||||
@@ -748,6 +595,7 @@ function toExamItem(obj) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 90%;
|
||||
padding-bottom: 25px;
|
||||
@@ -757,6 +605,7 @@ function toExamItem(obj) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.detailMain {
|
||||
margin-top: 22px;
|
||||
font-size: 13px;
|
||||
@@ -765,6 +614,7 @@ function toExamItem(obj) {
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.course {
|
||||
width: 90%;
|
||||
// padding-bottom: 15px;
|
||||
@@ -774,12 +624,14 @@ function toExamItem(obj) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.el-tabs__nav {
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
height: 50px;
|
||||
padding: 0px;
|
||||
@@ -788,12 +640,15 @@ function toExamItem(obj) {
|
||||
line-height: 21px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
background-color: rgba(56, 125, 247, 0.2);
|
||||
}
|
||||
|
||||
.el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.enclosure {
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
@@ -801,6 +656,7 @@ function toExamItem(obj) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.enclosureL {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -809,6 +665,7 @@ function toExamItem(obj) {
|
||||
color: #677d86;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
.download {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -818,6 +675,7 @@ function toExamItem(obj) {
|
||||
line-height: 19px;
|
||||
}
|
||||
}
|
||||
|
||||
.work {
|
||||
// margin-left: 51px;
|
||||
// margin-right: 40px;
|
||||
@@ -829,6 +687,7 @@ function toExamItem(obj) {
|
||||
justify-content: space-between;
|
||||
margin-top: 17.5px;
|
||||
}
|
||||
|
||||
.work .question {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -147,24 +147,15 @@
|
||||
|
||||
<script setup>
|
||||
import ReturnHead from "@/components/ReturnHead.vue";
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
toRefs,
|
||||
watch,
|
||||
onUnmounted,
|
||||
onMounted,
|
||||
ref,
|
||||
} from "vue";
|
||||
import {computed, ref,} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
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 {useUserInfo} from "@/api/utils";
|
||||
import { ElMessage, messageConfig, ElLoading } from "element-plus";
|
||||
import {ElLoading, ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import UploadPostImg from "@/components/img/UploadPostImg.vue";
|
||||
import CommentReply from "@/components/CommentReply.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
@@ -184,36 +175,15 @@ openLoading();
|
||||
const closeLoading = () => {
|
||||
loading.value.close();
|
||||
};
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => {
|
||||
closeLoading();
|
||||
});
|
||||
console.log("获取信息", data);
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => closeLoading());
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
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 activeName = ref("first");
|
||||
const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
|
||||
|
||||
const downloads = (url) => {
|
||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
// 报名
|
||||
function onLineSignUp() {
|
||||
@@ -231,21 +201,8 @@ function formateArr(strs) {
|
||||
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>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteachnocommon {
|
||||
width: 100%;
|
||||
|
||||
@@ -153,20 +153,21 @@
|
||||
|
||||
<script setup>
|
||||
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 {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 {useUserInfo} from "@/api/utils";
|
||||
import { ElMessage, messageConfig, ElLoading } from "element-plus";
|
||||
import {ElLoading, ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId, type, id: taskId },
|
||||
query: { courseId },
|
||||
} = useRoute();
|
||||
const loading = ref(false); // loading
|
||||
const openLoading = () => {
|
||||
@@ -177,40 +178,20 @@ const openLoading = () => {
|
||||
});
|
||||
};
|
||||
openLoading();
|
||||
const closeLoading = () => {
|
||||
loading.value.close();
|
||||
};
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => {
|
||||
closeLoading();
|
||||
});
|
||||
console.log("获取信息", data);
|
||||
const closeLoading = () => loading.value.close();
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => closeLoading());
|
||||
|
||||
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) => {
|
||||
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 download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
|
||||
|
||||
const downloads = (url) => {
|
||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
// 报名
|
||||
function onLineSignUp() {
|
||||
if (data.value.isSignUp) {
|
||||
@@ -222,25 +203,11 @@ function onLineSignUp() {
|
||||
}
|
||||
|
||||
function formateArr(strs) {
|
||||
let arrs = strs.split(",");
|
||||
console.log("112233", arrs);
|
||||
return arrs;
|
||||
return strs?.split(",");
|
||||
}
|
||||
// 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>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteachnocourse {
|
||||
width: 100%;
|
||||
|
||||
@@ -183,31 +183,25 @@
|
||||
|
||||
<script setup>
|
||||
import ReturnHead from "@/components/ReturnHead.vue";
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
toRefs,
|
||||
watch,
|
||||
onUnmounted,
|
||||
onMounted,
|
||||
ref,
|
||||
} from "vue";
|
||||
import {computed, onBeforeMount, ref,} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
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 {useUserInfo} from "@/api/utils";
|
||||
import { ElMessage, messageConfig, ElLoading } from "element-plus";
|
||||
import {ElLoading, ElMessage} from "element-plus";
|
||||
import CommentReply from "@/components/CommentReply.vue";
|
||||
import dayjs from "dayjs";
|
||||
import { changeTime } from "@/api/method";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId, type, id: taskId },
|
||||
query: { courseId },
|
||||
} = useRoute();
|
||||
onBeforeMount(() => dayjs.extend(isBetween));
|
||||
const loading = ref(false); // loading
|
||||
const openLoading = () => {
|
||||
loading.value = ElLoading.service({
|
||||
@@ -220,50 +214,18 @@ openLoading();
|
||||
const closeLoading = () => {
|
||||
loading.value.close();
|
||||
};
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => {
|
||||
closeLoading();
|
||||
});
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }, () => 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 activeName = ref("first");
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
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"
|
||||
);
|
||||
};
|
||||
|
||||
//判断能否报名 (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();
|
||||
});
|
||||
const download = (url) => window.open(import.meta.env.VITE_BOE_API_URL + import.meta.env.VITE_FILE_PATH + url, "_top");
|
||||
// 报名
|
||||
function onLineSignUp(isAgain) {
|
||||
if (!state.isAllowSign) {
|
||||
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
||||
if (!isAllowSign.value) {
|
||||
ElMessage.warning("未在允许报名时间范围内");
|
||||
return;
|
||||
}
|
||||
@@ -272,72 +234,17 @@ function onLineSignUp(isAgain) {
|
||||
}
|
||||
request(FACETEACH_SIGNUP, { courseId });
|
||||
data.value.isSignUp = true;
|
||||
//重置按钮
|
||||
data.value.isSignUpAgain = isAgain;
|
||||
data.value.isRefused = false;
|
||||
ElMessage.success(isAgain ? "重新报名成功" : "报名成功");
|
||||
}
|
||||
|
||||
function formateArr(strs) {
|
||||
let arrs = 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;
|
||||
};
|
||||
return strs?.split(",");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteachsignup {
|
||||
width: 100%;
|
||||
|
||||
@@ -223,7 +223,11 @@ import checkbox from "@/assets/image/checkbox.png";
|
||||
import checkbox2 from "@/assets/image/checkbox2.png";
|
||||
import { useRoute, useRouter } from "vue-router/dist/vue-router";
|
||||
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 ReturnHead from "@/components/ReturnHead.vue";
|
||||
import dayjs from "dayjs";
|
||||
@@ -255,12 +259,30 @@ const { data } = useRequest(
|
||||
targetId: infoId ? infoId : 0,
|
||||
},
|
||||
(e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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("我是查询评估的参数", {
|
||||
|
||||
@@ -254,7 +254,6 @@ const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId, type }, (e) => {
|
||||
},
|
||||
(res) => {
|
||||
console.log("判断任务是否删除", res);
|
||||
closeLoading();
|
||||
if (res.code === 7) {
|
||||
router.push({
|
||||
path: "/loseefficacy",
|
||||
|
||||
@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue";
|
||||
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
||||
import img from "@/assets/image/uploadimg.png";
|
||||
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 { useRouter } from "vue-router";
|
||||
import { useUserInfo } from "@/api/utils";
|
||||
@@ -78,11 +78,29 @@ const router = useRouter();
|
||||
console.log("外链信息", linkId);
|
||||
|
||||
const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -213,6 +213,7 @@ import {
|
||||
PROJECT_DETAIL,
|
||||
SubmitExternalExam,
|
||||
UPDATE_CURRENT_TASK,
|
||||
checkStudentExist,
|
||||
} from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import store from "@/store";
|
||||
@@ -229,12 +230,27 @@ const router = useRouter();
|
||||
const { commit, dispatch, state } = useStore();
|
||||
const data = computed(() => state.projectInfo);
|
||||
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
|
||||
useRequest(
|
||||
checkStudentExist,
|
||||
{
|
||||
targetId: projectId,
|
||||
type: type,
|
||||
},
|
||||
(res) => {
|
||||
console.log("判断任务是否删除", res);
|
||||
if (res.code === 7) {
|
||||
router.push({
|
||||
path: "/loseefficacy",
|
||||
});
|
||||
} else {
|
||||
if (e.code === 6) {
|
||||
console.log("eee", e);
|
||||
router.push({
|
||||
path: "/notpath",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
watch(data, () => {
|
||||
if (data.value.code === 6) {
|
||||
|
||||
Reference in New Issue
Block a user