|
|
@@ -222,7 +222,6 @@
|
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { ClassType } from '@/api/class.js'
|
|
|
import {
|
|
|
ArrowDown,
|
|
|
ArrowRightBold,
|
|
|
@@ -241,21 +240,21 @@ import {
|
|
|
import { Search, ArrowLeftBold } from '@element-plus/icons-vue'
|
|
|
import { valueEquals } from 'element-plus'
|
|
|
// 引入视频
|
|
|
-import video1 from '@/assets/02video/01video.mp4'
|
|
|
-import video2 from '@/assets/02video/02video.mp4'
|
|
|
-import video3 from '@/assets/02video/03video.mp4'
|
|
|
-import video4 from '@/assets/02video/04video.mp4'
|
|
|
-import video5 from '@/assets/02video/05video.mp4'
|
|
|
-import video6 from '@/assets/02video/06video.mp4'
|
|
|
-import video7 from '@/assets/02video/07video.mp4'
|
|
|
-import video8 from '@/assets/02video/08video.mp4'
|
|
|
-import video9 from '@/assets/02video/09video.mp4'
|
|
|
-import video10 from '@/assets/02video/10video.mp4'
|
|
|
-import video11 from '@/assets/02video/11video.mp4'
|
|
|
-import video12 from '@/assets/02video/12video.mp4'
|
|
|
-import video13 from '@/assets/02video/13video.mp4'
|
|
|
-import video14 from '@/assets/02video/14video.mp4'
|
|
|
-import video15 from '@/assets/02video/15video.mp4'
|
|
|
+// import video1 from '@/assets/02video/01video.mp4'
|
|
|
+// import video2 from '@/assets/02video/02video.mp4'
|
|
|
+// import video3 from '@/assets/02video/03video.mp4'
|
|
|
+// import video4 from '@/assets/02video/04video.mp4'
|
|
|
+// import video5 from '@/assets/02video/05video.mp4'
|
|
|
+// import video6 from '@/assets/02video/06video.mp4'
|
|
|
+// import video7 from '@/assets/02video/07video.mp4'
|
|
|
+// import video8 from '@/assets/02video/08video.mp4'
|
|
|
+// import video9 from '@/assets/02video/09video.mp4'
|
|
|
+// import video10 from '@/assets/02video/10video.mp4'
|
|
|
+// import video11 from '@/assets/02video/11video.mp4'
|
|
|
+// import video12 from '@/assets/02video/12video.mp4'
|
|
|
+// import video13 from '@/assets/02video/13video.mp4'
|
|
|
+// import video14 from '@/assets/02video/14video.mp4'
|
|
|
+// import video15 from '@/assets/02video/15video.mp4'
|
|
|
import {ClassType} from "@/api/class.js";
|
|
|
|
|
|
const router = useRouter() // 获取当前路由对象
|
|
|
@@ -271,33 +270,28 @@ const toggleDrawer = () => {
|
|
|
}
|
|
|
|
|
|
// 定义映射
|
|
|
-const videoMap = {
|
|
|
- '1-1': video1,
|
|
|
- '1-2': video2,
|
|
|
- '1-3': video3,
|
|
|
- '1-4': video4,
|
|
|
- '1-5': video5,
|
|
|
- '1-6': video6,
|
|
|
- '1-7': video7,
|
|
|
- '1-8': video8,
|
|
|
- '1-9': video9,
|
|
|
- '1-10': video10,
|
|
|
- '1-11': video11,
|
|
|
- '1-12': video12,
|
|
|
- '1-13': video13,
|
|
|
- '1-14': video14,
|
|
|
- '1-15': video15
|
|
|
-}
|
|
|
-// 定义视频源
|
|
|
-const videoSrc = ref(video1)
|
|
|
+// const videoMap = {
|
|
|
+// '1-1': video1,
|
|
|
+// '1-2': video2,
|
|
|
+// '1-3': video3,
|
|
|
+// '1-4': video4,
|
|
|
+// '1-5': video5,
|
|
|
+// '1-6': video6,
|
|
|
+// '1-7': video7,
|
|
|
+// '1-8': video8,
|
|
|
+// '1-9': video9,
|
|
|
+// '1-10': video10,
|
|
|
+// '1-11': video11,
|
|
|
+// '1-12': video12,
|
|
|
+// '1-13': video13,
|
|
|
+// '1-14': video14,
|
|
|
+// '1-15': video15
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-const courseList = ref([])
|
|
|
|
|
|
|
|
|
-// // 获取课程列表
|
|
|
-// ClassType().then(res=>{
|
|
|
-// console.log(res);
|
|
|
-// })
|
|
|
|
|
|
// 返回上一页
|
|
|
const goBack = () => {
|
|
|
@@ -305,32 +299,57 @@ const goBack = () => {
|
|
|
}
|
|
|
// 渲染页面标题
|
|
|
const boxIconTitle = ref('')
|
|
|
-
|
|
|
-// 教学大纲id
|
|
|
+// 课程数据
|
|
|
+const courseList = ref([])
|
|
|
+// 菜单数据
|
|
|
+const menuItems = ref([])
|
|
|
+// 定义视频源
|
|
|
+const videoSrc = ref('')
|
|
|
+// 新增视频路径映射
|
|
|
+const videoPathMap = ref({})
|
|
|
|
|
|
onMounted(async () => {
|
|
|
const typeId = router.currentRoute.value.query.typeId
|
|
|
- console.log(typeId,"----")
|
|
|
+ console.log(typeId, "----")
|
|
|
if (typeId) {
|
|
|
- //取课程数据
|
|
|
- // await ClassType(typeId).then(res => {
|
|
|
- // courseList.value = res.data
|
|
|
- // console.log("课程数据:",courseList.value)
|
|
|
- // })
|
|
|
+ try {
|
|
|
+ // 取课程数据并添加错误处理
|
|
|
+ const res = await ClassType(typeId)
|
|
|
+ courseList.value = res.data
|
|
|
+ console.log("课程数据:", courseList.value)
|
|
|
+
|
|
|
+ // 构建视频路径映射
|
|
|
+ videoPathMap.value = courseList.value.reduce((map, item, index) => {
|
|
|
+ const idx = `1-${index + 1}`
|
|
|
+ if (item.courseVideoPath) {
|
|
|
+ map[idx] = item.courseVideoPath
|
|
|
+ }
|
|
|
+ return map
|
|
|
+ }, {})
|
|
|
+
|
|
|
+ // 初始化第一个视频源和标题
|
|
|
+ if (courseList.value.length > 0 && courseList.value[0].courseVideoPath) {
|
|
|
+ videoSrc.value = courseList.value[0].courseVideoPath
|
|
|
+ currentIndex.value = '1-1'
|
|
|
+ smallTitle.value = courseList.value[0].courseName
|
|
|
+ }
|
|
|
|
|
|
+ // 将接口数据中的 courseName 转换为菜单格式
|
|
|
+ menuItems.value = courseList.value.map((item, index) => {
|
|
|
+ const idx = `1-${index + 1}`
|
|
|
+ return {
|
|
|
+ index: idx,
|
|
|
+ title: item.courseName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ console.error("获取课程数据失败:", error)
|
|
|
+ }
|
|
|
}
|
|
|
const title = router.currentRoute.value.query.typeName
|
|
|
if (title) {
|
|
|
boxIconTitle.value = String(title)
|
|
|
}
|
|
|
- if (id) {
|
|
|
- outlineId.value = id // 接收并存储id参数
|
|
|
- }
|
|
|
- console.log(outlineId.value);
|
|
|
- // 获取课程列表
|
|
|
- ClassType({ typeId: outlineId.value }).then(res => {
|
|
|
- console.log(res);
|
|
|
- })
|
|
|
})
|
|
|
|
|
|
// 菜单打开和关闭的处理函数
|
|
|
@@ -338,29 +357,29 @@ const handleOpen = () => {}
|
|
|
const handleClose = () => {}
|
|
|
|
|
|
// 动态渲染树型结构
|
|
|
-const menuItems = ref([
|
|
|
- { index: '1-1', title: '课前回顾' },
|
|
|
- { index: '1-2', title: '课程引入' },
|
|
|
- {
|
|
|
- index: '1',
|
|
|
- title: '知识讲解',
|
|
|
- children: [
|
|
|
- { index: '1-3', title: '图灵测试' },
|
|
|
- { index: '1-4', title: '课堂提问' },
|
|
|
- { index: '1-5', title: '达特茅斯会议' },
|
|
|
- { index: '1-6', title: '课堂选择' },
|
|
|
- { index: '1-7', title: '聊天机器人' },
|
|
|
- { index: '1-8', title: '专家系统' },
|
|
|
- { index: '1-9', title: '课堂互动' },
|
|
|
- { index: '1-10', title: '互联网快速发展' },
|
|
|
- { index: '1-11', title: '黄金时代' },
|
|
|
- { index: '1-12', title: '课堂提问' },
|
|
|
- { index: '1-13', title: '大模型时代' }
|
|
|
- ]
|
|
|
- },
|
|
|
- { index: '1-14', title: '趣味实操' },
|
|
|
- { index: '1-15', title: '课程总结' }
|
|
|
-])
|
|
|
+// const menuItems = ref([
|
|
|
+// { index: '1-1', title: '课前回顾' },
|
|
|
+// { index: '1-2', title: '课程引入' },
|
|
|
+// {
|
|
|
+// index: '1',
|
|
|
+// title: '知识讲解',
|
|
|
+// children: [
|
|
|
+// { index: '1-3', title: '图灵测试' },
|
|
|
+// { index: '1-4', title: '课堂提问' },
|
|
|
+// { index: '1-5', title: '达特茅斯会议' },
|
|
|
+// { index: '1-6', title: '课堂选择' },
|
|
|
+// { index: '1-7', title: '聊天机器人' },
|
|
|
+// { index: '1-8', title: '专家系统' },
|
|
|
+// { index: '1-9', title: '课堂互动' },
|
|
|
+// { index: '1-10', title: '互联网快速发展' },
|
|
|
+// { index: '1-11', title: '黄金时代' },
|
|
|
+// { index: '1-12', title: '课堂提问' },
|
|
|
+// { index: '1-13', title: '大模型时代' }
|
|
|
+// ]
|
|
|
+// },
|
|
|
+// { index: '1-14', title: '趣味实操' },
|
|
|
+// { index: '1-15', title: '课程总结' }
|
|
|
+// ])
|
|
|
|
|
|
// 当前播放的索引
|
|
|
const currentIndex = ref('1-1')
|
|
|
@@ -386,9 +405,9 @@ const handleSelect = index => {
|
|
|
if (title) {
|
|
|
smallTitle.value = title
|
|
|
}
|
|
|
- // 根据索引切换视频
|
|
|
- if (videoMap[index]) {
|
|
|
- videoSrc.value = videoMap[index]
|
|
|
+ // 根据索引切换视频,使用新的 videoPathMap
|
|
|
+ if (videoPathMap.value[index]) {
|
|
|
+ videoSrc.value = videoPathMap.value[index]
|
|
|
currentIndex.value = index
|
|
|
}
|
|
|
}
|
|
|
@@ -428,6 +447,7 @@ const playNextVideo = () => {
|
|
|
userMessage = ref('')
|
|
|
messageHistory = ref([])
|
|
|
}
|
|
|
+
|
|
|
// 切换视频
|
|
|
// 播放上一个视频
|
|
|
const playPreviousVideo = () => {
|
|
|
@@ -473,134 +493,134 @@ let userMessage = ref('')
|
|
|
let messageHistory = ref([])
|
|
|
|
|
|
// 定义每个视频对应的暂停时间和问题
|
|
|
-const videoPauseTimes = {
|
|
|
- [video2]: {
|
|
|
- pauseTimes: [30],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '视频当中发生了什么事情呢?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '视频当中发生了什么事情呢',
|
|
|
- aiAnswer:
|
|
|
- '让我来告诉你吧:泡泡怪篡改了Ai历史数据,导致Ai系统发生崩溃,所以要修正Ai历史抓到泡泡怪!'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video3]: {
|
|
|
- pauseTimes: [49],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '同学们,大家了解图灵测试了吗?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '视频当中发生了什么事情呢',
|
|
|
- aiAnswer:
|
|
|
- '让我来告诉你吧:泡泡怪篡改了Ai历史数据,导致Ai系统发生崩溃,所以要修正Ai历史抓到泡泡怪!'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video4]: {
|
|
|
- pauseTimes: [2],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '你觉得deepseek、豆包等大模型可以通过图灵测试吗?为什么?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '你觉得deepseek、豆包等大模型可以通过图灵测试吗?为什么?',
|
|
|
- aiAnswer:
|
|
|
- '大模型已缩短与图灵测试的标志距离,尤其在表面对话层面,但因缺乏深层次理解、逻辑一致性与真实认知,仍无法在严格测试中稳定通过。'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video5]: {
|
|
|
- pauseTimes: [49],
|
|
|
- questions: []
|
|
|
- },
|
|
|
- [video6]: {
|
|
|
- pauseTimes: [5]
|
|
|
- },
|
|
|
- [video7]: {
|
|
|
- pauseTimes: [64.5, 91],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '如果你是聊天机器人,你会怎么回答用户呢?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '',
|
|
|
- aiAnswer: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title:
|
|
|
- '当我们和聊天机器人对话的内容被人类所查看并回答时,隐私信息是否泄露?',
|
|
|
- options: [],
|
|
|
- aiQuestion:
|
|
|
- '当我们和聊天机器人对话的内容被人类所查看并回答时,隐私信息是否泄露?',
|
|
|
- aiAnswer:
|
|
|
- '与聊天机器人的对话被人类查看时,隐私泄露风险客\n' +
|
|
|
- '观存在,尤其是人类介入或安全漏洞场景下。建议优先选择支持本地'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video8]: {
|
|
|
- pauseTimes: [72],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '如果你身体不舒服时找这样的专家检查,那么它开的药你敢喝吗?',
|
|
|
- options: [],
|
|
|
- aiQuestion:
|
|
|
- '如果你身体不舒服时找这样的专家检查,那么它开的药你敢喝吗?',
|
|
|
- aiAnswer: '这题没给答案,你自己去查吧!'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video9]: {
|
|
|
- pauseTimes: [2],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '在生活中,有哪些正在使用的专家系统呢?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '在生活中,有哪些正在使用的专家系统呢?',
|
|
|
- aiAnswer:
|
|
|
- '在医疗健康领域有复杂疾病协同决策和Ai医生分身与诊断辅助;在水利交通领域的水利厅专家库系统用于项目验收和抢险督查'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video11]: {
|
|
|
- pauseTimes: [1, 90, 176],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '怎么会有爆炸声?泡泡怪在这里吗?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '',
|
|
|
- aiAnswer: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: '同学们喜欢下围棋吗?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '',
|
|
|
- aiAnswer: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: '为什么AlphaGo要在围棋上攻克真人冠军呢?',
|
|
|
- options: [],
|
|
|
- aiQuestion: '为什么AlphaGo要在围棋上攻克真人冠军呢?',
|
|
|
- aiAnswer:
|
|
|
- '围棋是人类智力游戏的巅峰,拥有天文数字级的可能性,每颗棋子价值由全局态势动态决定,所以当前一手可能百步之后才显现价值。AlphaGo战胜人类顶尖选手,它证明了Ai不仅能处理规则明确的事物,更能攻克依赖直觉、策略的“人类专属领域”'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- [video12]: {
|
|
|
- pauseTimes: [1]
|
|
|
- },
|
|
|
- [video13]: {
|
|
|
- pauseTimes: [62],
|
|
|
- questions: [
|
|
|
- {
|
|
|
- title: '我们一起来感受一下大模型吧!',
|
|
|
- options: [],
|
|
|
- aiQuestion: '',
|
|
|
- aiAnswer: ''
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
-}
|
|
|
+ const videoPauseTimes = {
|
|
|
+ [video2]: {
|
|
|
+ pauseTimes: [30],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '视频当中发生了什么事情呢?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '视频当中发生了什么事情呢',
|
|
|
+ aiAnswer:
|
|
|
+ '让我来告诉你吧:泡泡怪篡改了Ai历史数据,导致Ai系统发生崩溃,所以要修正Ai历史抓到泡泡怪!'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video3]: {
|
|
|
+ pauseTimes: [49],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '同学们,大家了解图灵测试了吗?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '视频当中发生了什么事情呢',
|
|
|
+ aiAnswer:
|
|
|
+ '让我来告诉你吧:泡泡怪篡改了Ai历史数据,导致Ai系统发生崩溃,所以要修正Ai历史抓到泡泡怪!'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video4]: {
|
|
|
+ pauseTimes: [2],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '你觉得deepseek、豆包等大模型可以通过图灵测试吗?为什么?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '你觉得deepseek、豆包等大模型可以通过图灵测试吗?为什么?',
|
|
|
+ aiAnswer:
|
|
|
+ '大模型已缩短与图灵测试的标志距离,尤其在表面对话层面,但因缺乏深层次理解、逻辑一致性与真实认知,仍无法在严格测试中稳定通过。'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video5]: {
|
|
|
+ pauseTimes: [49],
|
|
|
+ questions: []
|
|
|
+ },
|
|
|
+ [video6]: {
|
|
|
+ pauseTimes: [5]
|
|
|
+ },
|
|
|
+ [video7]: {
|
|
|
+ pauseTimes: [64.5, 91],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '如果你是聊天机器人,你会怎么回答用户呢?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '',
|
|
|
+ aiAnswer: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:
|
|
|
+ '当我们和聊天机器人对话的内容被人类所查看并回答时,隐私信息是否泄露?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion:
|
|
|
+ '当我们和聊天机器人对话的内容被人类所查看并回答时,隐私信息是否泄露?',
|
|
|
+ aiAnswer:
|
|
|
+ '与聊天机器人的对话被人类查看时,隐私泄露风险客\n' +
|
|
|
+ '观存在,尤其是人类介入或安全漏洞场景下。建议优先选择支持本地'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video8]: {
|
|
|
+ pauseTimes: [72],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '如果你身体不舒服时找这样的专家检查,那么它开的药你敢喝吗?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion:
|
|
|
+ '如果你身体不舒服时找这样的专家检查,那么它开的药你敢喝吗?',
|
|
|
+ aiAnswer: '这题没给答案,你自己去查吧!'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video9]: {
|
|
|
+ pauseTimes: [2],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '在生活中,有哪些正在使用的专家系统呢?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '在生活中,有哪些正在使用的专家系统呢?',
|
|
|
+ aiAnswer:
|
|
|
+ '在医疗健康领域有复杂疾病协同决策和Ai医生分身与诊断辅助;在水利交通领域的水利厅专家库系统用于项目验收和抢险督查'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video11]: {
|
|
|
+ pauseTimes: [1, 90, 176],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '怎么会有爆炸声?泡泡怪在这里吗?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '',
|
|
|
+ aiAnswer: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '同学们喜欢下围棋吗?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '',
|
|
|
+ aiAnswer: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '为什么AlphaGo要在围棋上攻克真人冠军呢?',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '为什么AlphaGo要在围棋上攻克真人冠军呢?',
|
|
|
+ aiAnswer:
|
|
|
+ '围棋是人类智力游戏的巅峰,拥有天文数字级的可能性,每颗棋子价值由全局态势动态决定,所以当前一手可能百步之后才显现价值。AlphaGo战胜人类顶尖选手,它证明了Ai不仅能处理规则明确的事物,更能攻克依赖直觉、策略的“人类专属领域”'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ [video12]: {
|
|
|
+ pauseTimes: [1]
|
|
|
+ },
|
|
|
+ [video13]: {
|
|
|
+ pauseTimes: [62],
|
|
|
+ questions: [
|
|
|
+ {
|
|
|
+ title: '我们一起来感受一下大模型吧!',
|
|
|
+ options: [],
|
|
|
+ aiQuestion: '',
|
|
|
+ aiAnswer: ''
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 处理视频时间更新事件
|
|
|
const handleTimeUpdate = () => {
|