From 77012b78a6361fb106f2435fb2a262bc1df9cef2 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 23 Nov 2023 18:04:49 +0800 Subject: [PATCH] fix --- src/layouts/header/index.vue | 2 + src/pages/ass/list/index.vue | 11 +- src/pages/match/details/index.vue | 183 ++++++++++++++-------------- src/pages/match/list/index.vue | 6 +- src/pages/station/preview/index.vue | 71 +++++++---- 5 files changed, 158 insertions(+), 115 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index b5e8e7f..d361e36 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -165,6 +165,8 @@ export default { Bus.$emit('matchSocket') } else if (content == 2) { Bus.$emit('activitySocket') + } else if (content.includes('3-')) { // 考核:3-考核id + Bus.$emit('assSocket') } else if (content == 4) { Bus.$emit('modelSocket') } else { diff --git a/src/pages/ass/list/index.vue b/src/pages/ass/list/index.vue index 440988c..fb69bed 100644 --- a/src/pages/ass/list/index.vue +++ b/src/pages/ass/list/index.vue @@ -202,6 +202,7 @@ import { mapState, mapActions } from "vuex"; import Setting from "@/setting"; import util from "@/libs/util"; +import Bus from '@/libs/bus' export default { name: "ass", @@ -310,6 +311,12 @@ export default { } }, mounted () { + // websocket实时刷新 + Bus.$on('assSocket', () => { + this.getData() + }) + + // 页面离开的时候销毁手机和邮箱验证码定时器 this.$once("hook:beforeDestroy", function () { this.sss = 0 @@ -498,10 +505,10 @@ export default { util.cookies.set("token", token) util.cookies.set("assessmentId", this.assessmentId) util.cookies.set("classId", classId) - util.cookies.set("className", classItem ? encodeURIComponent(classItem.className) : '') + util.cookies.set("className", classItem ? classItem.className : '') util.cookies.set("projectId", this.projectId) util.cookies.set("courseId", this.cid) - util.cookies.set("curriculumName", escape(row.sysName)); + util.cookies.set("curriculumName", encodeURIComponent(row.sysName)); util.cookies.set("startTime", row.startTime) util.cookies.set("stopTime", row.stopTime) util.cookies.set("systemId", this.systemId); diff --git a/src/pages/match/details/index.vue b/src/pages/match/details/index.vue index 77ead7c..64b9cbe 100644 --- a/src/pages/match/details/index.vue +++ b/src/pages/match/details/index.vue @@ -83,8 +83,8 @@

比赛时间:{{ rule.startTime && rule.startTime + ' ~ ' + rule.endTime }}

比赛方式:{{ methods.find(e => e.id == rule.method) && methods.find(e => e.id == rule.method).name }}

课程系统:{{ rule.systemName }}

-

线下地点:{{ rule.onlineAddress }}

-

比赛地点:{{ rule.offlineAddress }}

+

线上地点:{{ rule.onlineAddress }}

+

线下地点:{{ rule.offlineAddress }}