diff --git a/src/App.vue b/src/App.vue
index 97a3d26..5ba71db 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,7 +27,7 @@ import { GET_USER_INFO } from "@/api/ThirdApi";
import { getCookie } from "@/api/utils";
import { USER_INFO } from "@/api/api";
-console.log("版本1.3.5------------");
+console.log("版本1.3.6------------");
const store = useStore();
const router = useRouter();
diff --git a/src/api/api.js b/src/api/api.js
index 62ab106..023a3f6 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -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-01 19:07:28
+ * @LastEditTime: 2023-03-03 13:47:22
* @FilePath: /stu_h5/src/api/api.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -31,7 +31,7 @@ export const ACTIVITY = '/activity'
export const EXAMINATION_QUERY = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`
export const TASK_OFFCOURSE_NOTASK_SIGN = '/stu/task/offcourse/notask/sign post'
export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post'
-export const LINK_DETAILS = linkId => `/link/getOne?linkId=${linkId}`
+export const LINK_DETAILS = `/link/getOne`
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
@@ -42,13 +42,13 @@ export const ROUTER_DETAILS = '/admin/router/detail'
export const TASK_LIST = '/stu/tasks'
export const ONLINE_PROCESS = '/onlineClasses/queryOnlineClassesStudyDetail post'
export const PROJECT_PROCESS = '/stu/project/process'
-export const EVALUATION_DETAIL = evaluationId => `/evaluation/queryEvaluationDetailById?evaluationId=${evaluationId} post`
+export const EVALUATION_DETAIL = `/evaluation/queryEvaluationDetailById`
export const DISCUSS_LIKE = '/discussSubmit/clickDiscussLikeCountOr post'
export const DISCUSS_LIST = '/discussSubmit/taskList'
export const DISCUSS_DETAIL = '/discussSubmit/detail'
export const DISCUSS_SUBMIT_REVIEW_LIST = '/discussSubmit/queryDiscussSubmitAndReview'
export const VOTE_DETAIL2 = `/vote/queryVoteById`
-export const VOTE_DETAIL3 = voteId => `/vote/queryVoteById?voteId=${voteId}`
+export const VOTE_DETAIL3 = `/vote/queryVoteById`
// 投票详情接口
export const VOTE_DETAIL_SUBMIT = `voteSubmit/vote/commit post`
@@ -82,4 +82,6 @@ export const SubmitExternalExam = `/stu/externalExam/submitExternalExam post`
export const UPDATE_CURRENT_TASK = `/admin/student/updateCurrentTask post`
// 测评任务去学习
export const EvaluationToLearn = '/evaluation/evaluationToLearn post'
-export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img'
\ No newline at end of file
+export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + 'file/img'
+// 查询单个测评的状态
+export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
\ No newline at end of file
diff --git a/src/components/PathDetailImage.vue b/src/components/PathDetailImage.vue
index 5226459..d9cb2f8 100644
--- a/src/components/PathDetailImage.vue
+++ b/src/components/PathDetailImage.vue
@@ -14,8 +14,8 @@
:key="i"
class="cha"
:style="{
- top: `${imgAttr.positions[i]?.top - (current === i ? 1 : 0)}px`,
- left: `${imgAttr.positions[i]?.left - (current === i ? 11 : 0)}px`,
+ top: `${imgAttr?.positions[i]?.top - (current === i ? 1 : 0)}px`,
+ left: `${imgAttr?.positions[i]?.left - (current === i ? 11 : 0)}px`,
}"
>
- imageAttrs[Object.keys(imageAttrs).find((e) => props.img.includes(e))] || {}
-);
-const imgAttrindex = computed(() =>
- Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图背景"
- ? 1
- : Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
- ? 2
- : 3
+const imgAttr = computed(() => {
+ if (props.img) {
+ return (
+ imageAttrs[Object.keys(imageAttrs).find((e) => props.img.includes(e))] ||
+ {}
+ );
+ }
+});
+const imgAttrindex = computed(
+ () => {
+ // console.log("props.img.includes1", props.img);
+ // console.log("props.img", props.img.includes("路径图背景"));
+ if (
+ props.img &&
+ Object.keys(imageAttrs).find((e) => props.img.includes(e)) ===
+ "路径图背景"
+ ) {
+ return 1;
+ } else if (
+ props.img &&
+ Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
+ ) {
+ return 2;
+ } else if (
+ props.img &&
+ Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图3"
+ ) {
+ return 3;
+ }
+ }
+ // Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图背景"
+ // ? 1
+ // : Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
+ // ? 2
+ // : 3
);
console.log("imgAttrindex", imgAttrindex);
diff --git a/src/store/index.js b/src/store/index.js
index 50c4893..84b92f3 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-17 19:47:07
* @LastEditors: lixg lixg@dongwu-inc.com
- * @LastEditTime: 2023-02-28 15:31:03
+ * @LastEditTime: 2023-03-03 10:30:46
* @FilePath: /stu_h5/src/store/index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -81,8 +81,8 @@ export default createStore({
},
},
actions: {
- getProjectInfo(content, { projectId }) {
- request(PROJECT_PROCESS, { projectId }).then(res => {
+ getProjectInfo(content, { projectId, type }) {
+ request(PROJECT_PROCESS, { projectId, type }).then(res => {
content.commit('SET_PROJECT_INFO', res.data)
content.commit('INIT_PROJECT_INFO')
})
diff --git a/src/views/activities/ActivitiesPage.vue b/src/views/activities/ActivitiesPage.vue
index 441d96a..d038c54 100644
--- a/src/views/activities/ActivitiesPage.vue
+++ b/src/views/activities/ActivitiesPage.vue
@@ -168,7 +168,7 @@ const state = reactive({
const { isAllowSign, closeBtn } = toRefs(state);
-const { data } = useRequest(ACTIVITY, { activityId }, (e) => {
+const { data } = useRequest(ACTIVITY, { activityId, type }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
diff --git a/src/views/ballotpage/BallotPage.vue b/src/views/ballotpage/BallotPage.vue
index fb180ba..091e629 100644
--- a/src/views/ballotpage/BallotPage.vue
+++ b/src/views/ballotpage/BallotPage.vue
@@ -182,12 +182,12 @@ import dayjs from "dayjs";
import store from "@/store";
import { ElMessage } from "element-plus";
import { useRoute, useRouter } from "vue-router/dist/vue-router";
-
+const router = useRouter();
const {
- query: { courseId, chapterOrStageId, infoId, id, btype },
+ query: { courseId, chapterOrStageId, infoId, id, btype, type },
} = useRoute();
const userInfo = computed(() => store.state.userInfo);
-const { data } = useRequest(VOTE_DETAIL3(courseId), {}, (e) => {
+const { data } = useRequest(VOTE_DETAIL3, { voteId: courseId, type }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
diff --git a/src/views/discuss/DiscussPage.vue b/src/views/discuss/DiscussPage.vue
index b3eb360..9c5f943 100644
--- a/src/views/discuss/DiscussPage.vue
+++ b/src/views/discuss/DiscussPage.vue
@@ -157,7 +157,7 @@ const {
query: { id, type },
} = useRoute();
request(DISCUSS_LIST, {
- type: type == 1 ? 2 : 1,
+ type: type,
id,
})
.then((e) => {
diff --git a/src/views/evaluation/Evaluation.vue b/src/views/evaluation/Evaluation.vue
index b227324..9b751f1 100644
--- a/src/views/evaluation/Evaluation.vue
+++ b/src/views/evaluation/Evaluation.vue
@@ -71,7 +71,12 @@ 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 { EVALUATION_DETAIL, STUDY_RECORD, EvaluationToLearn } from "@/api/api";
+import {
+ EVALUATION_DETAIL,
+ STUDY_RECORD,
+ EvaluationToLearn,
+ QueryEvaluationTaskStatusOne,
+} from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
@@ -86,10 +91,12 @@ const {
chapterOrStageId,
infoId,
btype,
+ quizTaskId,
+ type,
},
} = useRoute();
const router = useRouter();
-const { data } = useRequest(EVALUATION_DETAIL(evaluationId), {}, (e) => {
+const { data } = useRequest(EVALUATION_DETAIL, { evaluationId, type }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",
@@ -128,26 +135,77 @@ onUnmounted(() => {
});
const goOuterChain = () => {
console.log("点击去查看");
- request(EvaluationToLearn, {
- businessType: btype == 1 ? "project" : "learningpath",
- chapterId: chapterOrStageId,
- courseId: evaluationId,
- quizKid: data.value.evaluationTypeId,
- routerOrProjectId: infoId,
- studentId: userInfo.value.id,
- studentName: userInfo.value.realName,
- })
- .then((res) => {
- console.log(res);
- // if (res.code == 200) {
- // let jumpUrl = res.data.quizUrl;
- // // 此处写跳转url
- // window.open(jumpUrl, "_top");
- // }
+ if (quizTaskId == null) {
+ request(EvaluationToLearn, {
+ businessType: btype == 1 ? "project" : "learningpath",
+ chapterId: chapterOrStageId,
+ courseId: evaluationId,
+ quizKid: data.value.evaluationTypeId,
+ routerOrProjectId: infoId,
+ studentId: userInfo.value.id,
+ studentName: userInfo.value.realName,
})
- .catch((err) => {
- console.log(err);
- });
+ .then((res) => {
+ console.log(res);
+ if (res.code == 200) {
+ let jumpUrl = res.data.quizUrl;
+ // 此处写跳转url
+ window.open(jumpUrl, "_top");
+ }
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ } else {
+ request(QueryEvaluationTaskStatusOne, {
+ quizTaskId: quizTaskId,
+ })
+ .then((res) => {
+ console.log(res);
+ if (res.code == 200) {
+ if (res.data.complete_status == 2) {
+ ElMessage.error("您已完成测评");
+ return;
+ } else {
+ // 重新查询跳转
+ // 调用接口 跳转页面
+ console.log("我是查询测评跳转链接所传递得参数", {
+ businessType: btype === 2 ? "learningpath" : "project",
+ chapterId: chapterOrStageId,
+ courseId: evaluationId,
+ quizKid: data.value.evaluationTypeId,
+ routerOrProjectId: infoId,
+ studentId: userInfo.value.id,
+ studentName: userInfo.value.realName,
+ });
+ request(EvaluationToLearn, {
+ businessType: "learningpath",
+ chapterId: chapterOrStageId,
+ courseId: evaluationId,
+ quizKid: data.value.evaluationTypeId,
+ routerOrProjectId: infoId,
+ studentId: userInfo.value.id,
+ studentName: userInfo.value.realName,
+ })
+ .then((res) => {
+ console.log(res);
+ if (res.code == 200) {
+ let jumpUrl = res.data.quizUrl;
+ // 此处写跳转url
+ window.open(jumpUrl, "_top");
+ }
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ }
+ }
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ }
+
// window.open(
// evaType == 0
// ? window.location.protocol +
diff --git a/src/views/examination/ExternalExam.vue b/src/views/examination/ExternalExam.vue
index 0b626c4..fe11c0c 100644
--- a/src/views/examination/ExternalExam.vue
+++ b/src/views/examination/ExternalExam.vue
@@ -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-02 02:38:59
+ * @LastEditTime: 2023-03-03 09:37:16
* @FilePath: /stu_h5/src/views/examination/ExternalExam.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -45,14 +45,14 @@ import { EXTERNALEXAM } from "@/api/api";
import { reactive } from "vue";
import { useRoute, useRouter } from "vue-router/dist/vue-router";
const {
- query: { courseId },
+ query: { courseId, type },
} = useRoute();
const router = useRouter();
const state = reactive({
datainfo: {},
});
//获取基本信息
-request(EXTERNALEXAM, { externalId: courseId })
+request(EXTERNALEXAM, { externalId: courseId, type })
.then((res) => {
console.log("获取考试", res);
if (res.code === 6) {
diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue
index d7608d7..027c482 100644
--- a/src/views/faceteach/FaceTeach.vue
+++ b/src/views/faceteach/FaceTeach.vue
@@ -314,7 +314,7 @@
name="third"
:disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))"
>
-
+
{{ data.examinationDto?.examinationName }}
@@ -418,7 +418,14 @@ const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
- window.open(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) => {
ElMessage.warning("未到开始时间,请耐心等待!");
@@ -537,9 +544,9 @@ function toSurvery() {
path: "/investigatpage",
query: {
id: taskId,
- courseId: data.value.planDto.evaluateId,
+ courseId: data.value.planDto.assessmentId,
pName: "面授课",
- infoId: data.value.planDto.offcoursePlanId,
+ infoId: data.value.planDto.id,
chapterOrStageId: 0,
sName: data.value.planDto.name,
type,
@@ -559,9 +566,9 @@ function toWork() {
router.push({
path: "/homeworkpage",
query: {
- courseId: data.value.workDto.workId,
+ courseId: data.value.planDto.homeWorkId,
id: taskId,
- infoId: data.value.offcourseDto.offcourseId,
+ infoId: data.value.planDto.id,
chapterOrStageId: 0,
type,
pName: "面授课",
@@ -579,14 +586,24 @@ function toExamItem(obj) {
return;
}
}
- console.log("obj", obj.examinationTestId);
- window.open(
- window.location.protocol +
- import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
- "/mobile/pages/exam/exam?id=" +
- obj.examinationTestId,
- "_top"
- ); //测评
+ console.log("obj", obj);
+ if (obj.examType === 2) {
+ router.push({
+ path: "/externalexam",
+ query: {
+ courseId: obj.id,
+ type,
+ },
+ });
+ } else {
+ window.open(
+ window.location.protocol +
+ import.meta.env.VITE_BOE_EXAM_DETAIL_URL +
+ obj.id,
+ "_top"
+ );
+ }
+
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
}
diff --git a/src/views/faceteach/FaceTeachNoCommon.vue b/src/views/faceteach/FaceTeachNoCommon.vue
index ffcc71b..274a35e 100644
--- a/src/views/faceteach/FaceTeachNoCommon.vue
+++ b/src/views/faceteach/FaceTeachNoCommon.vue
@@ -181,12 +181,13 @@ const handleClick = (tab, event) => {
};
const download = (url) => {
console.log(
- "下载url",
- import.meta.env.VITE_FILE_PATH,
- process.env.VITE_FILE_PATH,
- url
+ "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"
);
- window.open(import.meta.env.VITE_FILE_PATH + url);
};
const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!");
diff --git a/src/views/faceteach/FaceTeachNoCourse.vue b/src/views/faceteach/FaceTeachNoCourse.vue
index f009044..43cede5 100644
--- a/src/views/faceteach/FaceTeachNoCourse.vue
+++ b/src/views/faceteach/FaceTeachNoCourse.vue
@@ -184,7 +184,14 @@ const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
- window.open(import.meta.env.VITE_FILE_PATH + 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) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!");
diff --git a/src/views/faceteach/FaceTeachSignUp.vue b/src/views/faceteach/FaceTeachSignUp.vue
index 87e36f9..44fc67d 100644
--- a/src/views/faceteach/FaceTeachSignUp.vue
+++ b/src/views/faceteach/FaceTeachSignUp.vue
@@ -193,7 +193,14 @@ const handleClick = (tab, event) => {
console.log("附件", tab, event);
};
const download = (url) => {
- window.open(import.meta.env.VITE_FILE_PATH + 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"
+ );
};
let timer = null;
diff --git a/src/views/filestorag/fileStorag.vue b/src/views/filestorag/fileStorag.vue
index 321fd6b..5f71ef1 100644
--- a/src/views/filestorag/fileStorag.vue
+++ b/src/views/filestorag/fileStorag.vue
@@ -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-02-18 15:27:53
+ * @LastEditTime: 2023-03-04 10:42:36
* @FilePath: /stu_h5/src/views/filestorag/fileStorag.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -108,7 +108,14 @@ const fileList = computed(() =>
);
//下载
function downloadFile(url) {
- window.open(url);
+ console.log(
+ "url222",
+ 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"
+ );
}