Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2023-03-17 14:57:12 +08:00
13 changed files with 314 additions and 80 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-13 11:42:48
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-03-10 00:56:52
* @LastEditTime: 2023-03-17 09:44:50
* @FilePath: /stu_h5/src/api/api.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -86,4 +86,6 @@ export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + '/file/img'
// 查询单个测评的状态
export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
// 投票浏览和参与数目
export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post`
export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post`
//任务是否删除
export const checkStudentExist = `/admin/taskmanage/checkStudentExist post`

View File

@@ -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);
@@ -230,17 +230,34 @@ const closeLoading = () => {
// ],
// });
// closeLoading();
const { data } = useRequest(
ROUTERTASK_LIST,
{ routerId: props.routerId },
(e) => {
closeLoading();
console.log("获取路径图", e);
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
useRequest(
checkStudentExist,
{
targetId: props.routerId,
type: 2,
},
(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);

View File

@@ -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) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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);

View File

@@ -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) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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, () => {

View File

@@ -127,6 +127,7 @@ import {
QueryDiscussSubmitDetailByDiscussId,
PostList,
PostPraise,
checkStudentExist,
} from "@/api/api";
const router = useRouter();
const state = reactive({
@@ -169,22 +170,40 @@ const closeLoading = () => {
};
//获取讨论详情
const {
query: { id, type },
query: { id, type, infoId, chapterOrStageId, id: taskId },
} = useRoute();
request(DISCUSS_LIST, {
type: type,
id,
})
.then((e) => {
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);
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",
});
}
state.info = e.data;
console.log("讨论详情", state.info);
state.discussId = e.data.discussDtoList[0].id;
getPostList(e.data.discussDtoList[0].id);
}
}
);
})
.catch((err) => {
console.log(err);

View File

@@ -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) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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);

View File

@@ -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-03 09:37:16
* @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
-->
@@ -41,11 +41,11 @@
<script setup>
import ReturnHead from "@/components/ReturnHead.vue";
import { useRequest, request } from "@/api/request";
import { EXTERNALEXAM } from "@/api/api";
import { EXTERNALEXAM, checkStudentExist } from "@/api/api";
import { reactive } from "vue";
import { useRoute, useRouter } from "vue-router/dist/vue-router";
const {
query: { courseId, type },
query: { courseId, type, id: taskId, infoId, chapterOrStageId },
} = useRoute();
const router = useRouter();
const state = reactive({
@@ -53,14 +53,32 @@ const state = reactive({
});
//获取基本信息
request(EXTERNALEXAM, { externalId: courseId, type })
.then((res) => {
console.log("获取考试", res);
if (res.code === 6) {
router.push({
path: "/notpath",
});
}
state.datainfo = res.data;
.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",
});
} else {
state.datainfo = e.data;
}
}
}
);
})
.catch((err) => {
console.log(err);

View File

@@ -100,6 +100,7 @@ import {
TASK_WORK_DETAIL,
TASK_WORK_SUBMIT_LIST,
WORK_HISTROY,
checkStudentExist,
} from "@/api/api";
import dayjs from "dayjs";
import { useRouter } from "vue-router";
@@ -123,7 +124,7 @@ const returnclick = () => {
router.back();
};
const {
query: { courseId: workId, type, id: taskId, infoId },
query: { courseId: workId, type, id: taskId, infoId, chapterOrStageId },
} = useRoute();
// 从报错信息来看 是因为内部 把这个组件看成了个异步组件 中间有代码是异步执行的 导致unmounted执行的时机不对。。放上面就好了
onBeforeUnmount(() => {
@@ -146,17 +147,36 @@ openLoading();
const closeLoading = () => {
loading.value.close();
};
console.log("infoId", infoId);
const { data } =
taskId && taskId !== "undefined"
? useRequest(TASK_WORK_DETAIL, { workId, taskId, type }, (e) => {
closeLoading();
if (e.code === 6) {
console.log("作业判断", e);
router.push({
path: "/notpath",
});
}
useRequest(
checkStudentExist,
{
targetId: infoId,
type: type,
chapterId: chapterOrStageId,
courseId: taskId,
},
(res) => {
console.log("判断任务是否删除", res);
closeLoading();
if (res.code === 7) {
router.push({
path: "/loseefficacy",
});
} else {
if (e.code === 6) {
console.log("作业判断", e);
router.push({
path: "/notpath",
});
}
}
}
);
})
: useRequest(TASK_WORK_DETAIL, { workId, type }, (e) => {
closeLoading();

View File

@@ -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,11 +259,29 @@ const { data } = useRequest(
targetId: infoId ? infoId : 0,
},
(e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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",
});
}
}
}
);
}
);

View File

@@ -208,7 +208,11 @@ 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 { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
import {
TASK_BROADCAST_DETAIL,
TASK_BROADCAST_SIGN,
checkStudentExist,
} from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
@@ -225,6 +229,8 @@ const {
projectStatus,
projectEndTime,
targetId,
infoId,
chapterOrStageId,
},
} = useRoute();
const router = useRouter();
@@ -238,11 +244,29 @@ onUnmounted(() => {
});
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId, type }, (e) => {
console.log("直播判断", e);
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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);

View File

@@ -0,0 +1,21 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-03-01 20:41:06
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-03-17 10:15:42
* @FilePath: /stu_h5/src/views/nottask/LoseEfficacy.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-result icon="success" title="二维码已失效">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</template>
<script setup>
function toIndex() {
window.location.href =
window.location.protocol + import.meta.env.VITE_BOE_HOME;
}
</script>

View File

@@ -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) => {
if (e.code === 6) {
router.push({
path: "/notpath",
});
}
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);

View File

@@ -208,6 +208,7 @@ import {
PROJECT_DETAIL,
SubmitExternalExam,
UPDATE_CURRENT_TASK,
checkStudentExist,
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
@@ -224,12 +225,27 @@ const router = useRouter();
const { commit, dispatch, state } = useStore();
const data = computed(() => state.projectInfo);
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
if (e.code === 6) {
console.log("eee", e);
router.push({
path: "/notpath",
});
}
useRequest(
checkStudentExist,
{
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, () => {
if (data.value.code === 6) {