feat:修改任务接口传参

This commit is contained in:
lixg
2023-03-03 14:03:41 +08:00
parent f0276906c1
commit b14f26053e
14 changed files with 36 additions and 31 deletions

View File

@@ -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.4------------");
console.log("版本1.3.5------------");
const store = useStore();
const router = useRouter();

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-02 18:04:53
* @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`

View File

@@ -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')
})

View File

@@ -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",

View File

@@ -184,10 +184,10 @@ 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",

View File

@@ -157,7 +157,7 @@ const {
query: { id, type },
} = useRoute();
request(DISCUSS_LIST, {
type: type == 1 ? 2 : 1,
type: type,
id,
})
.then((e) => {

View File

@@ -92,10 +92,11 @@ const {
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",

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-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) {

View File

@@ -585,6 +585,7 @@ function toExamItem(obj) {
path: "/externalexam",
query: {
courseId: obj.id,
type,
},
});
} else {

View File

@@ -117,7 +117,7 @@ const {
// console.log("type", type);
const { data } =
taskId && taskId !== "undefined"
? useRequest(TASK_WORK_DETAIL, { workId, taskId }, (e) => {
? useRequest(TASK_WORK_DETAIL, { workId, taskId, type }, (e) => {
if (e.code === 6) {
console.log("作业判断", e);
router.push({
@@ -125,7 +125,7 @@ const { data } =
});
}
})
: useRequest(TASK_WORK_DETAIL, { workId }, (e) => {
: useRequest(TASK_WORK_DETAIL, { workId, type }, (e) => {
if (e.code === 6) {
console.log("作业判断", e);
router.push({

View File

@@ -222,7 +222,7 @@ const returnclick = () => {
router.back();
};
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId }, (e) => {
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId, type }, (e) => {
console.log("直播判断", e);
if (e.code === 6) {
router.push({

View File

@@ -77,7 +77,7 @@ const {
const router = useRouter();
console.log("外链信息", linkId);
const { data } = useRequest(LINK_DETAILS(linkId), {}, (e) => {
const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => {
if (e.code === 6) {
router.push({
path: "/notpath",

View File

@@ -370,7 +370,7 @@ function toFinish(d) {
return;
}
// 此处判断外部考试跳转
if (d.startTime == null || d.endTime == null) {
if (d.examType == 2) {
// 点击即更新状态 进行中
request(SubmitExternalExam, {
chapterId: data.value.currentStageId,
@@ -389,6 +389,7 @@ function toFinish(d) {
path: "/externalexam",
query: {
courseId: d.courseId,
type: ROUTER,
},
});
return;
@@ -435,6 +436,7 @@ function toFinish(d) {
path: "/projectdetails",
query: {
projectId: d.courseId,
type: ROUTER,
},
});
return;

View File

@@ -160,7 +160,7 @@
</div>
<div
class="goclass"
@click="toFinish(el)"
@click="toFinish(el, item.stageName, item.id)"
:style="{
background:
el.statusName !== '已结束' &&
@@ -221,12 +221,12 @@ import { PROJECT, TASK_TYPES } from "@/api/CONST";
import dayjs from "dayjs";
import { useStore } from "vuex";
const {
query: { courseId, projectId },
query: { courseId, projectId, type },
} = useRoute();
const router = useRouter();
const { commit, dispatch, state } = useStore();
const data = computed(() => state.projectInfo);
useRequest(PROJECT_PROCESS, { projectId: projectId }, (e) => {
useRequest(PROJECT_PROCESS, { projectId: projectId, type }, (e) => {
if (e.code === 6) {
console.log("eee", e);
router.push({
@@ -242,7 +242,7 @@ watch(data, () => {
}
});
onMounted(() => {
dispatch("getProjectInfo", { projectId });
dispatch("getProjectInfo", { projectId, type });
});
watch(
() => data.value.stageProcessList,
@@ -457,13 +457,13 @@ function toFinish(d, sName, chapterOrStageId) {
return;
}
// 此处判断外部考试跳转
if (d.startTime == null || d.endTime == null) {
// 点击即更新状态 进行中
if (d.examType == 2) {
// 点击即更新状态 进行中 chapterOrStageId
request(SubmitExternalExam, {
chapterId: data.value.currentStageId,
chapterId: chapterOrStageId,
externalId: d.courseId,
externalName: d.name,
targetId: routerId,
targetId: data.value.projectId,
studentNo: userInfo.value.userNo,
})
.then((res) => {
@@ -476,6 +476,7 @@ function toFinish(d, sName, chapterOrStageId) {
path: "/externalexam",
query: {
courseId: d.courseId,
type: PROJECT,
},
});
return;
@@ -539,7 +540,7 @@ function toFinish(d, sName, chapterOrStageId) {
courseId: d.courseId,
pName: data.value.name,
sName,
chapterOrStageId: data.value.currentStageId,
chapterOrStageId: chapterOrStageId,
studentId: userInfo.value.id,
status: d.status,
targetId: d.targetId,
@@ -565,7 +566,7 @@ function toFinish(d, sName, chapterOrStageId) {
// courseId: d.courseId,
// pName: data.value.name,
// sName,
// chapterOrStageId: data.value.currentStageId,
// chapterOrStageId: chapterOrStageId,
// studentId: userInfo.value.id,
// status: d.status,
// targetId: d.targetId,