From aca04f37198001100eec8d593545911bfc9cc343 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Thu, 2 Jan 2025 17:44:58 +0800
Subject: [PATCH] fix
---
src/layouts/header/index.vue | 4 +-
src/pages/backend/list/index.vue | 8 ++-
src/pages/expSystem/list/index.vue | 2 +-
src/pages/lesson/content/index.vue | 2 +-
src/pages/lesson/content/source.vue | 2 +-
src/pages/lesson/detail/index.vue | 35 +++++----
src/pages/station/preview/index.vue | 106 +++++++++++++++-------------
src/pages/system/list/index.vue | 13 ++--
src/pages/workbench/list/index.vue | 2 +-
9 files changed, 95 insertions(+), 79 deletions(-)
diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue
index 06b387e..40f065c 100644
--- a/src/layouts/header/index.vue
+++ b/src/layouts/header/index.vue
@@ -131,7 +131,7 @@ export default {
},
initSocket ({ id, account }) {
// 实例化socket
- this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '192.168.31.51:9100' : location.host}/nakadai/websocket/${id}/${account}`)
+ this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51:9100' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://118.31.167.228:9100/nakadai/websocket/${id}/${account}`)
// 监听socket连接
this.socket.onopen = this.open;
@@ -163,7 +163,6 @@ export default {
},
getUserDetail () { // 获取用户详情
this.$get(this.api.queryUserInfoDetails).then(res => {
- this.initSocket(res.result.userAccount)
let { hrUserInfo } = res.result
if (hrUserInfo) {
const { userAvatars, userName, userId } = hrUserInfo
@@ -172,6 +171,7 @@ export default {
console.log("🚀 ~ this.$get ~ userAvatars:", userName)
this.setUserName(userName)
}
+ this.initSocket(res.result.userAccount)
}).catch(res => { })
},
userCommand (command) { // 切换下拉菜单
diff --git a/src/pages/backend/list/index.vue b/src/pages/backend/list/index.vue
index 5d0a42d..4690ead 100644
--- a/src/pages/backend/list/index.vue
+++ b/src/pages/backend/list/index.vue
@@ -25,7 +25,7 @@ export default {
},
data () {
return {
- active: 'tab1',
+ active: this.$route.query.type || 'tab1',
tabs: {
tab1: '学生管理',
tab2: '实验系统管理',
@@ -45,6 +45,12 @@ export default {
methods: {
tabChange (index) {
this.active = index
+ this.$router.push({
+ path: 'list',
+ query: {
+ type: index
+ }
+ })
},
initTabs () {
const { btns } = this
diff --git a/src/pages/expSystem/list/index.vue b/src/pages/expSystem/list/index.vue
index 4a5e9f4..7b7089e 100644
--- a/src/pages/expSystem/list/index.vue
+++ b/src/pages/expSystem/list/index.vue
@@ -155,7 +155,7 @@ export default {
if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}`
} else {
- this.$router.push(`backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`)
+ this.$router.push(`/expSystem/backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`)
}
},
}
diff --git a/src/pages/lesson/content/index.vue b/src/pages/lesson/content/index.vue
index 08d4e0d..f7e9504 100644
--- a/src/pages/lesson/content/index.vue
+++ b/src/pages/lesson/content/index.vue
@@ -447,7 +447,7 @@ export default {
]
this.moveVisible = true
} else {
- this.$message.warning('请选择小节!')
+ this.$message.warning('请选择资源!')
}
},
// 批量移除小节
diff --git a/src/pages/lesson/content/source.vue b/src/pages/lesson/content/source.vue
index 5b1fd93..0338066 100644
--- a/src/pages/lesson/content/source.vue
+++ b/src/pages/lesson/content/source.vue
@@ -20,7 +20,7 @@
@click="course.shrink = !course.shrink">
- {{ course.curriculumName }}
+ {{ course.curriculumName || course.courseName }}
将图片拖到此处,或点击上传
@@ -225,7 +225,7 @@