From 64dd3eac9be750a14edee206984473910ab42392 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 30 Jun 2022 14:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 86 +++++++++++++------------- src/layouts/navbar/index.vue | 16 ++--- src/libs/util.js | 20 ++++-- src/pages/account/login/index.vue | 23 +++---- src/pages/index/list/index.vue | 6 +- src/pages/match/details/index.vue | 18 +++++- src/pages/match/list/index.vue | 8 +-- src/pages/match/noticeDetail/index.vue | 2 +- src/pages/station/preview/index.vue | 5 +- src/pages/touristMatch/list/index.vue | 49 ++++++++++----- src/setting.js | 25 +++----- src/store/modules/match.js | 6 +- 12 files changed, 147 insertions(+), 117 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 1f80ebc..1a98c4c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,24 +1,24 @@ import Setting from "@/setting"; const host = Setting.apiBaseURL; -const uploadURL = "http://121.37.12.51:9000/"; +const uploadURL = location.origin + '/' export default { logins: `users/users/user/login`, verification: `${host}users/users/user/captcha`,// 验证码图片 - logoDetail: `occupationlab/sys/logo/detail`, //查看系统设置信息 + logoDetail: `occupationlab/occupationlab/sys/logo/detail`, //查看系统设置信息 isClient: `${host}users/users/user/isClient`, sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`, getToken: `users/users/user/getToken`, getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`, unbindAccounts: `users/users/user/unbindAccounts`, - platformLogList: `nakadai/log/platformLogList`, - logNotification: `nakadai/log/logNotification`, + platformLogList: `nakadai/nakadai/log/platformLogList`, + logNotification: `nakadai/nakadai/log/logNotification`, //实验台 curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, // 课程详情 - curriculumChapter: `nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 - curriculumGetSubsection: `nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址 + curriculumChapter: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 + curriculumGetSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址 // 能力测评 canExperiment: `occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验 @@ -34,52 +34,52 @@ export default { // 实验记录 schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 - experimentOverview: `occupationlab/achievement/experimentOverview`, //实验概览 - queryAssessmentByStudent: `occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩 - queryPracticeByStudent: `occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩 - exportAssessmentByStudent: `occupationlab/achievement/exportAssessmentByStudent`, // 批量导出考核成绩 - exportPracticeByStudent: `${host}occupationlab/achievement/exportPracticeByStudent`, // 批量导出练习成绩 - practiceByStudentDetail: `occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况 - exportPracticeByStudentDetail: `${host}occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况 - reportDetail: `occupationlab/achievement/reportDetail`, // 成绩报告详情 - updateReport: `occupationlab/achievement/updateReport`, // 更新成绩报告 + experimentOverview: `occupationlab/occupationlab/achievement/experimentOverview`, //实验概览 + queryAssessmentByStudent: `occupationlab/occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩 + queryPracticeByStudent: `occupationlab/occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩 + exportAssessmentByStudent: `occupationlab/occupationlab/achievement/exportAssessmentByStudent`, // 批量导出考核成绩 + exportPracticeByStudent: `${host}occupationlab/occupationlab/achievement/exportPracticeByStudent`, // 批量导出练习成绩 + practiceByStudentDetail: `occupationlab/occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况 + exportPracticeByStudentDetail: `${host}occupationlab/occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况 + reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, // 成绩报告详情 + updateReport: `occupationlab/occupationlab/achievement/updateReport`, // 更新成绩报告 schoolCourseByAchievement: `nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程 - exportLabReport: `occupationlab/achievement/exportLabReport`, - exportBankExperimentReport: `occupationlab/achievement/exportBankExperimentReport`, - queryBcJudgmentPointByBcId: 'judgment/bcJudgmentPoint/queryBcJudgmentPointByBcId', - editExperimentalData: 'occupationlab/experimentalReport/editExperimentalData', + exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`, + exportBankExperimentReport: `occupationlab/occupationlab/achievement/exportBankExperimentReport`, + queryBcJudgmentPointByBcId: 'judgment/judgment/bcJudgmentPoint/queryBcJudgmentPointByBcId', + editExperimentalData: 'occupationlab/occupationlab/experimentalReport/editExperimentalData', // 考核列表 - pageStuAssessment: `occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表 - getPythonSysByStuAccountId: `occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称 - myClassByStudent: `occupationlab/achievement/myClassByStudent`, // 学生端:我的班级 - getStudentInfoByAccountId: `occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息 - enterExam: `occupationlab/assessment/enterExam`, // 学生端——进入考试 - collectPaper: `occupationlab/assessment/collectPaper`, // 自动结束考试 + pageStuAssessment: `occupationlab/occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表 + getPythonSysByStuAccountId: `occupationlab/occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称 + myClassByStudent: `occupationlab/occupationlab/achievement/myClassByStudent`, // 学生端:我的班级 + getStudentInfoByAccountId: `occupationlab/occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息 + enterExam: `occupationlab/occupationlab/assessment/enterExam`, // 学生端——进入考试 + collectPaper: `occupationlab/occupationlab/assessment/collectPaper`, // 自动结束考试 // 课程学习 - queryGlClassification: `occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类 - queryCourseByCondition: `occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询 - getCourseById: `occupationlab/management/edu/course/getCourse`, // 根据id查询课程 - queryChaptersAndSubsections: `occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 - getSubsection: `occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址 + queryGlClassification: `occupationlab/occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类 + queryCourseByCondition: `occupationlab/occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询 + getCourseById: `occupationlab/occupationlab/management/edu/course/getCourse`, // 根据id查询课程 + queryChaptersAndSubsections: `occupationlab/occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 + getSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址 // 资讯 - queryAllColumns: `occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树 - queryArticleByCondition: `occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询 - getArticle: `occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章 - firstLevelColumn: `occupationlab/enterprise/information/column/firstLevelColumn`, - secondaryColumnsByFirst: `occupationlab/enterprise/information/column/secondaryColumnsByFirst`, + queryAllColumns: `occupationlab/occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树 + queryArticleByCondition: `occupationlab/occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询 + getArticle: `occupationlab/occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章 + firstLevelColumn: `occupationlab/occupationlab/enterprise/information/column/firstLevelColumn`, + secondaryColumnsByFirst: `occupationlab/occupationlab/enterprise/information/column/secondaryColumnsByFirst`, // 线上赛事 - contestPageConditionQueryByOccupationlabStu: `occupationlab/enterprise/match/contest/contestPageConditionQueryByOccupationlabStu`, - contestPageConditionQueryByOccupationlab: `occupationlab/enterprise/match/contest/onlineCompetitionByStudent`, - listOfRegisteredEvents: `occupationlab/enterprise/match/contest/listOfRegisteredEvents`, - addApplicant: `occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员 - getContestProgress: `occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展 - getContest: `occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事 - queryAnnouncementByContestId: `occupationlab/contest/announcement/queryAnnouncementByContestId`, - queryAnnouncementDetails: `occupationlab/contest/announcement/queryAnnouncementDetails`, + contestPageConditionQueryByOccupationlabStu: `occupationlab/occupationlab/enterprise/match/contest/contestPageConditionQueryByOccupationlabStu`, + contestPageConditionQueryByOccupationlab: `occupationlab/occupationlab/enterprise/match/contest/onlineCompetitionByStudent`, + listOfRegisteredEvents: `occupationlab/occupationlab/enterprise/match/contest/listOfRegisteredEvents`, + addApplicant: `occupationlab/occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员 + getContestProgress: `occupationlab/occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展 + getContest: `occupationlab/occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事 + queryAnnouncementByContestId: `occupationlab/occupationlab/contest/announcement/queryAnnouncementByContestId`, + queryAnnouncementDetails: `occupationlab/occupationlab/contest/announcement/queryAnnouncementDetails`, // 阿里云文件/视频管理 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 585c610..6cf1519 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -56,6 +56,10 @@ export default { index: "/index/list", title: "首页" }, + { + index: "/touristMatch/list", + title: "大赛资讯" + }, { index: 'data', title: "数据科研" @@ -72,14 +76,10 @@ export default { index: "/log/list", title: "更新日志" }, - { - index: "/touristMatch/list", - title: "大赛资讯" - }, - { - index: "trial", - title: "试用申请" - } + // { + // index: "trial", + // title: "试用申请" + // } ], menus: [], columns: [], // 资讯一级栏目 diff --git a/src/libs/util.js b/src/libs/util.js index 5120747..9e9ea28 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -7,6 +7,13 @@ import api from "@/api"; import Setting from "@/setting"; let logout = false; +// 文件后缀集合 +const exts = { + video: 'mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv', + audio: 'mp3,aac,ape,flac,wav,wma,amr,mid', + img: 'jpg,jpeg,png,gif,svg,psd', + doc: 'doc,docx,txt,xls,xlsx,csv,xml,ppt,pptx' +} const util = { cookies, local: _local, @@ -66,24 +73,29 @@ const util = { }, // 传入文件后缀判断是否是视频 isVideo(ext) { - if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return true; + if (exts.video.includes(ext)) return true; return false; }, // 传入文件后缀判断是否是音频 isAudio(ext) { - if ("mp3,aac,ape,flac,wav,wma,amr,mid".includes(ext)) return true; + if (exts.audio.includes(ext)) return true; return false; }, // 传入文件后缀判断是否是图片 isImg(ext) { - if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return true; + if (exts.img.includes(ext)) return true; return false; }, // 传入文件后缀判断是否是pdf以外的文档 isDoc(ext) { - if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != "pdf") return true; + if (exts.doc.includes(ext)) return true; return false; }, + // 判断是否能够预览 + canPreview(ext) { + if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && !util.isDoc(ext)) return false + return true + }, // 循环去除html标签 removeHtmlTag(list, attr) { list.map(n => { diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 8944540..5510243 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -71,7 +71,7 @@
- 申请试用 + 设置为默认学校
登录 @@ -241,18 +241,12 @@ export default { }, // 获取学校列表 getSchool() { - // const schoolList = util.local.get('schoolList') - // if (schoolList && schoolList.length) { - // this.setSchool(schoolList) - // } else { - this.$get(this.api.querySchool, { - provinceId: '', - cityId: '' - }).then(({ list }) => { - this.setSchool(list) - // util.local.set('schoolList', list) - }).catch(res => {}) - // } + this.$get(this.api.querySchool, { + provinceId: '', + cityId: '' + }).then(({ list }) => { + this.setSchool(list) + }).catch(res => {}) }, getVerImg() { // 获取验证码图片 this.form.random = Math.floor(Math.random() * 999999999); @@ -623,7 +617,8 @@ export default { } .bottom { display: flex; - justify-content: space-between; + // justify-content: space-between; + justify-content: flex-end; } .el-select { width: 100%; diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index efce16d..6b4c34a 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -210,7 +210,7 @@
-

咨询,建议与反馈

+

咨询,建议与反馈

您的每一条建议声音,我们都认真对待

@@ -246,8 +246,8 @@ export default { document.documentElement.scrollTop = 0 document.body.scrollTop = 0 }, - // 申请试用 - toTrial() { + // 问卷调查 + toQues() { window.open('https://www.wjx.cn/vm/wB0RcMm.aspx') }, } diff --git a/src/pages/match/details/index.vue b/src/pages/match/details/index.vue index 7b02add..7332ba7 100644 --- a/src/pages/match/details/index.vue +++ b/src/pages/match/details/index.vue @@ -27,7 +27,8 @@
附件下载
@@ -199,6 +200,13 @@ export default { methods: { getData() { // 获取竞赛信息 this.$post(`${this.api.getContest}?contestId=${this.id}`).then(({ contest }) => { + const list = contest.contestAnnexList + if (list) { + list.map(e => { + const { filePath } = e + e.canPreview = util.canPreview(filePath.substr(filePath.lastIndexOf('.') + 1)) + }) + } this.form = contest this.$refs.breadcrumb.update('全部赛事/' + contest.name) }).catch(err => {}) @@ -220,7 +228,7 @@ export default { preview(item) { const { filePath } = item const suffix = filePath.substr(filePath.lastIndexOf('.') + 1) - window.open((util.isDoc(suffix) || suffix === 'pdf' ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) + window.open((util.isDoc(suffix) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) }, // 下载附件 download(item) { @@ -340,7 +348,7 @@ export default { } .texts{ margin: 20px 0 50px; - font-size: 16px; + font-size: 14px; line-height: 1.6; text-indent: 2em; overflow: hidden; @@ -513,6 +521,10 @@ export default { align-items: center; margin: 10px 0; } + .fileName { + margin-right: 10px; + font-size: 12px; + } } .notice-list { text-align: left; diff --git a/src/pages/match/list/index.vue b/src/pages/match/list/index.vue index f41c39c..4c484e8 100644 --- a/src/pages/match/list/index.vue +++ b/src/pages/match/list/index.vue @@ -297,10 +297,10 @@ export default { getData() { this.loadIns = Loading.service() this.getList() - if (!Setting.isDev) { - clearInterval(this.timer) - this.timer = setInterval(this.getList, 1000) - } + // if (!Setting.isDev) { + // clearInterval(this.timer) + // this.timer = setInterval(this.getList, 1000) + // } }, initData() { this.page = 1 diff --git a/src/pages/match/noticeDetail/index.vue b/src/pages/match/noticeDetail/index.vue index aba1445..48f0754 100644 --- a/src/pages/match/noticeDetail/index.vue +++ b/src/pages/match/noticeDetail/index.vue @@ -151,7 +151,7 @@ export default { .content{ margin-bottom: 20px; line-height: 1.8; - font-size: 16px; + font-size: 14px; text-indent: 2em; /deep/img{ display: block; diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index 5959790..b6fc643 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -301,9 +301,12 @@ export default { util.cookies.set("courseId", this.courseId); util.cookies.set("curriculumName", escape(this.curriculumName)); util.cookies.set("systemId", id); + // 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 location.href = process.env.NODE_ENV === 'development' ? `http://${location.hostname}:8080/#/` : - `${location.origin}/pyTrials` // 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 + Setting.isPro ? + 'https://www.occupationlab.com/pyTrials' : + `${location.origin}/pyTrials` } } } diff --git a/src/pages/touristMatch/list/index.vue b/src/pages/touristMatch/list/index.vue index 09529d2..72e84a1 100644 --- a/src/pages/touristMatch/list/index.vue +++ b/src/pages/touristMatch/list/index.vue @@ -54,7 +54,7 @@