diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue index 9308a20..0c3886b 100644 --- a/src/layouts/home/index.vue +++ b/src/layouts/home/index.vue @@ -144,7 +144,7 @@ export default { setInterval(() => { if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) { - util.errorMsg("用户登录过期,请重新登录"); + util.errorMsg("由于您已经有一个小时没有操作,系统自动登出,请重新登录。页面刷新到登录页。"); setTimeout(this.logout, 1500); } }, 1000); diff --git a/src/pages/match/add/step3.vue b/src/pages/match/add/step3.vue index 699aa24..4881567 100644 --- a/src/pages/match/add/step3.vue +++ b/src/pages/match/add/step3.vue @@ -60,8 +60,7 @@ :label="1">是 + diff --git a/src/pages/match/manage/matchArchList.vue b/src/pages/match/manage/matchArchList.vue index 310facd..f356459 100644 --- a/src/pages/match/manage/matchArchList.vue +++ b/src/pages/match/manage/matchArchList.vue @@ -59,7 +59,8 @@
批量导出 + :loading="loading" + @click="exportData1">{{ loading ? '正在导出' : '批量导出' }}
@@ -293,7 +295,8 @@ export default { }, statData: {}, tabs: ['成绩列表', '文件列表'], - active: 0 + active: 0, + loading: false }; }, watch: { @@ -318,6 +321,22 @@ export default { stageId: this.stageId, keyWord: this.keyword, }).then(({ data }) => { + data.records.forEach(e => { + e.fileType = '其他' + if (util.isVideo(e.fileFormat)) { + e.fileType = '视频' + } else if (util.isAudio(e.fileFormat)) { + e.fileType = '音频' + } else if (util.isImg(e.fileFormat)) { + e.fileType = '图片' + } else if (util.isDoc(e.fileFormat)) { + e.fileType = '文档' + } else if (util.isCompress(e.fileFormat)) { + e.fileType = '压缩包' + } else if (e.fileType === 'pdf') { + e.fileType = 'pdf' + } + }) this.list1 = data.records this.total1 = data.total }).catch(res => { }) @@ -375,12 +394,13 @@ export default { stageId: this.stageId, } if (ids) data.ids = ids + this.loading = true axios.post(this.api.derive, data, { headers: this.headers, responseType: 'blob' }).then((res) => { - console.log("🚀 ~ file: matchArchList.vue:378 ~ exportData1 ~ res:", res) util.downloadFileDirect(`批量导出.zip`, new Blob([res.data])) + this.loading = false }).catch(res => { }) }, handleDelete (row) { // 删除 diff --git a/src/pages/match/manage/matchInfo.vue b/src/pages/match/manage/matchInfo.vue index 0cdd5ec..1e02155 100644 --- a/src/pages/match/manage/matchInfo.vue +++ b/src/pages/match/manage/matchInfo.vue @@ -579,33 +579,27 @@ export default { selectPar (row) { const item = this.form.competitionStage.find(e => e.stageId == row.stageId) if (item) { - // 该阶段已经开始比赛则不能修改 - const now = new Date() - if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) { - return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!') + const { teamLimit, stages, teamDetail } = this.info + // teamLimit=true,则每个成员只能参加一个阶段的比赛,要获取stages里返回的所有participantAccountIds(参赛人员的accountId),然后不显示这些参赛人员 + if (teamLimit) { + const chooses = [] + let ids = [] + // 获取已经允许参赛的人员accountId + stages.map(e => { + const id = e.participantAccountIds + if (e.stageId != row.stageId && id) ids.push(...id.split(',').map(n => +n)) + }) + ids = [...new Set(ids)] + teamDetail.map(e => { + ids.includes(e.accountId) || chooses.push(e) // 没有参赛的人员则显示出来 + }) + this.chooses = chooses } else { - const { teamLimit, stages, teamDetail } = this.info - // teamLimit=true,则每个成员只能参加一个阶段的比赛,要获取stages里返回的所有participantAccountIds(参赛人员的accountId),然后不显示这些参赛人员 - if (teamLimit) { - const chooses = [] - let ids = [] - // 获取已经允许参赛的人员accountId - stages.map(e => { - const id = e.participantAccountIds - if (e.stageId != row.stageId && id) ids.push(...id.split(',').map(n => +n)) - }) - ids = [...new Set(ids)] - teamDetail.map(e => { - ids.includes(e.accountId) || chooses.push(e) // 没有参赛的人员则显示出来 - }) - this.chooses = chooses - } else { - this.chooses = this.info.teamDetail - } - this.curRow = row - this.checkedMembers = [] - this.chooseVisible = true + this.chooses = this.info.teamDetail } + this.curRow = row + this.checkedMembers = [] + this.chooseVisible = true } }, // 选择参赛人员提交 diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index 9d8c446..f394b4e 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -943,7 +943,7 @@ export default { util.cookies.set('token', token) util.cookies.set('mallId', this.mallId) util.cookies.set('courseId', this.courseId) - util.cookies.set('curriculumName', escape(this.curriculumName)) + util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName)) util.cookies.set('systemId', id) util.cookies.set('fromManager', 1) util.cookies.set('isSubmit', '', -1) diff --git a/src/setting.js b/src/setting.js index ed645f0..cfe673b 100644 --- a/src/setting.js +++ b/src/setting.js @@ -48,7 +48,7 @@ const Setting = { showProgressBar: true, // 页面切换时,是否显示模拟的进度条 apiBaseURL: host, // 接口请求地址 jumpPath, // 判分点系统前缀 - autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间 + autoLogoutTime: 1000 * 60 * 60, // 长时间未操作,自动退出登录时间 projectData: "sta_data", // 新增项目跳转判分点数据存储cookie的key modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒 errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice