diff --git a/src/api/api.js b/src/api/api.js index 5f5dc6c..c54171d 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -88,7 +88,7 @@ export const QueryDiscussSubmitDetailByDiscussId = '/discussSubmit/queryDiscussS export const EvaluationToLearn = '/evaluation/evaluationToLearn post' // 个人/小组完成度排行 -export const CompletionList = `/stu/project/rank_list/completion_list` +export const CompletionList = `/stu/project/rank_list/project_rank_list` // 积分排行榜 export const PointList = `/stu/project/rank_list/point_list` @@ -124,7 +124,10 @@ export const PostList = `/statement/list` export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne` // 投票浏览和参与数目 -export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post` +export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post` + +//查询路径关卡列表 +export const ROUTER_DETAIL_CHAPTER_LIST = `/stu/router/chapterPcList` diff --git a/src/api/utils.js b/src/api/utils.js index 14db917..08fce68 100644 --- a/src/api/utils.js +++ b/src/api/utils.js @@ -16,6 +16,10 @@ export function getCookie(name) { return document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || '' } +export function delCookie(name){ + setCookie(name, "", -1) +} + export function useUserInfo(id) { const userInfo = ref({}) watch(id, () => { diff --git a/src/components/PathDetailImage.vue b/src/components/PathDetailImage.vue index 64b05eb..f0604a9 100644 --- a/src/components/PathDetailImage.vue +++ b/src/components/PathDetailImage.vue @@ -1,39 +1,39 @@ \ No newline at end of file diff --git a/src/components/img/UploadImgHomeWork.vue b/src/components/img/UploadImgHomeWork.vue index 4d0d827..126d3df 100644 --- a/src/components/img/UploadImgHomeWork.vue +++ b/src/components/img/UploadImgHomeWork.vue @@ -51,19 +51,31 @@ function handleChange(file) { f.uid = file.uid; file.raw = f; console.log(file.raw) - imageRef.value.submit(); + if(file.raw.name.includes('.mp4') || file.raw.name.includes('.MP4')){ + files.value = [] + emit('update:value', files.value) + ElMessage.error(`暂不支持视频文件上传`); + return + }else if(file.raw.name.includes('.jpeg') || file.raw.name.includes('.JPEG')){ + files.value = [] + emit('update:value', files.value) + ElMessage.error(`暂不支持jpeg格式图片文件上传`); + return + }else{ + imageRef.value.submit(); - if (file.response && file.response.code === 200) { - file.url = file.response.data - } - const index = files.value.findIndex(f => f.uid === file.uid) - if (index === -1) { - files.value.unshift(file) - } else { - files.value[index] = file - } + if (file.response && file.response.code === 200) { + file.url = file.response.data + } + const index = files.value.findIndex(f => f.uid === file.uid) + if (index === -1) { + files.value.unshift(file) + } else { + files.value[index] = file + } - emit('update:value', files.value) + emit('update:value', files.value) + } } function remove(i) { diff --git a/src/store/index.js b/src/store/index.js index 379211a..9701359 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -28,7 +28,7 @@ export default createStore({ if (state.projectInfo.unlockMode === 1) { state.projectInfo.stageProcessList.forEach((t) => { t.statusName = "进行中"; - t.taskProcessList?.forEach((s) => s.statusName = (s.status === 1) ? "已完成" : TASK_TYPES.toName[s.type]); + t.taskProcessList?.forEach((s) => s.statusName = (s.status === 1) ? "已完成" : s.status === 2 ? (s.statusName = "进行中") : TASK_TYPES.toName[s.type]); t.taskProcessList?.every((s) => s.status === 1) && (t.statusName = "已完成"); }); return; @@ -38,8 +38,8 @@ export default createStore({ const stageState = t.taskProcessList?.some((s) => { s.unlock = true; s.statusName = "已完成"; - s.status === 2 ? (s.statusName = "进行中") : (!s.status && (s.statusName = TASK_TYPES.toName[s.type])); - return state.projectInfo.unlockMode === 2 ? s.status !== 1 : (s.status !== 1 && s.flag); + s.status !== 1 && (s.statusName = TASK_TYPES.toName[s.type]) + return state.projectInfo.unlockMode === 2 ? s.status !== 1 : (s.status !== 1 && s.flag) }); stageState && (t.statusName = "进行中"); return stageState; @@ -57,7 +57,7 @@ export default createStore({ } state.routerInfo.statusName = "进行中"; if (state.routerInfo.unlockMode === 1) { - state.routerInfo.taskBoList?.forEach((s) => s.statusName = (s.status === 1) ? "已完成" : TASK_TYPES.toName[s.type]); + state.routerInfo.taskBoList?.forEach((s) => s.statusName = (s.status === 1) ? "已完成" : s.status === 2 ? (s.statusName = "进行中") : TASK_TYPES.toName[s.type]); state.routerInfo.taskBoList?.every((s) => s.status === 1) && (state.routerInfo.statusName = "已完成"); return; } diff --git a/src/views/ballot/BallotPage.vue b/src/views/ballot/BallotPage.vue index 764a421..768f71c 100644 --- a/src/views/ballot/BallotPage.vue +++ b/src/views/ballot/BallotPage.vue @@ -99,6 +99,7 @@ style="width: 140px; height: 140px; border-radius: 8px" :src="value.optionPictureAddress" /> +