|
|
@ -1,6 +1,4 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="view-container"> |
|
|
|
|
|
|
|
<div class="banner"></div> |
|
|
|
|
|
|
|
<div class="container" v-if="loading"> |
|
|
|
<div class="container" v-if="loading"> |
|
|
|
<div class="left" v-loading="tabLoading"> |
|
|
|
<div class="left" v-loading="tabLoading"> |
|
|
|
<div class="gruop"> |
|
|
|
<div class="gruop"> |
|
|
@ -35,6 +33,14 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="cours-target"> |
|
|
|
|
|
|
|
<div class="title">课程目标</div> |
|
|
|
|
|
|
|
<el-table :data="tableData" border style="width: 100%"> |
|
|
|
|
|
|
|
<el-table-column prop="date" label="课程分项目标"/> |
|
|
|
|
|
|
|
<el-table-column prop="name" label="支撑知识点"/> |
|
|
|
|
|
|
|
<el-table-column prop="address" width="180" label="占比" /> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="resource"> |
|
|
|
<div class="resource"> |
|
|
|
<el-tabs |
|
|
|
<el-tabs |
|
|
|
v-model="activeName" |
|
|
|
v-model="activeName" |
|
|
@ -101,8 +107,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="description"> |
|
|
|
<div class="description"> |
|
|
|
<div class="description-box"> |
|
|
|
<div class="description-box"> |
|
|
|
《Vues 设计与实现》这本书的简介: 《Vues |
|
|
|
《Vues 设计与实现》这本书的简介: 《Vues 设计与实现》是一本深入剖析 |
|
|
|
设计与实现》是一本深入剖析 Vues 框架核心原理的权威著作。 |
|
|
|
Vues 框架核心原理的权威著作。 |
|
|
|
本书首先会为读者搭建起一个坚实的知识基础,详细介绍 Vues |
|
|
|
本书首先会为读者搭建起一个坚实的知识基础,详细介绍 Vues |
|
|
|
的发展历程和其在前端开发领域的重要地位。接着,深入探讨 Vues |
|
|
|
的发展历程和其在前端开发领域的重要地位。接着,深入探讨 Vues |
|
|
|
的设计理念,让读者理解其背后的创新思维和解决问题的独特视角。 |
|
|
|
的设计理念,让读者理解其背后的创新思维和解决问题的独特视角。 |
|
|
@ -122,6 +128,8 @@ |
|
|
|
<div class="chapter"> |
|
|
|
<div class="chapter"> |
|
|
|
<courseTree :chapterList="chapterList" /> |
|
|
|
<courseTree :chapterList="chapterList" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="student-list"> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -131,7 +139,7 @@ |
|
|
|
import { ref } from 'vue' |
|
|
|
import { ref } from 'vue' |
|
|
|
import Graph from '../home/components/Graph.vue' |
|
|
|
import Graph from '../home/components/Graph.vue' |
|
|
|
import courseTree from './components/courseTree.vue' |
|
|
|
import courseTree from './components/courseTree.vue' |
|
|
|
import { useRoute,useRouter } from 'vue-router' |
|
|
|
import { useRoute, useRouter } from 'vue-router' |
|
|
|
import { getCourseChapter, getCourseFiles } from '@/api/course' |
|
|
|
import { getCourseChapter, getCourseFiles } from '@/api/course' |
|
|
|
import { ElLoading } from 'element-plus' |
|
|
|
import { ElLoading } from 'element-plus' |
|
|
|
import { filterFilesType } from '@/utils/filters' |
|
|
|
import { filterFilesType } from '@/utils/filters' |
|
|
@ -161,7 +169,28 @@ const getCourseChapterEvent = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
getCourseChapterEvent() |
|
|
|
getCourseChapterEvent() |
|
|
|
const activeName = ref<string>('1') |
|
|
|
const activeName = ref<string>('1') |
|
|
|
|
|
|
|
const tableData = [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
date: 'Vue.js设计与实现', |
|
|
|
|
|
|
|
name: 'HTML&CSS&JavaScript', |
|
|
|
|
|
|
|
address: '10%', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
date: 'Vue.js设计与实现', |
|
|
|
|
|
|
|
name: 'HTML&CSS&JavaScript', |
|
|
|
|
|
|
|
address: '20%', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
date: 'Vue.js设计与实现', |
|
|
|
|
|
|
|
name: 'HTML&CSS&JavaScript', |
|
|
|
|
|
|
|
address: '20%', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
date: 'Vue.js设计与实现', |
|
|
|
|
|
|
|
name: 'HTML&CSS&JavaScript', |
|
|
|
|
|
|
|
address: '20%', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
const handleClick = (e: any) => { |
|
|
|
const handleClick = (e: any) => { |
|
|
|
console.log(e) |
|
|
|
console.log(e) |
|
|
|
} |
|
|
|
} |
|
|
@ -200,11 +229,10 @@ const clickFile = async (file: any, index: number) => { |
|
|
|
videoUrl.value = file.url |
|
|
|
videoUrl.value = file.url |
|
|
|
flag.value = index |
|
|
|
flag.value = index |
|
|
|
tabLoading.value = false |
|
|
|
tabLoading.value = false |
|
|
|
|
|
|
|
|
|
|
|
} else if (index === 3) { |
|
|
|
} else if (index === 3) { |
|
|
|
pdfUrl.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}` |
|
|
|
pdfUrl.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}` |
|
|
|
const loadingTask = createLoadingTask(pdfUrl.value) |
|
|
|
const loadingTask = createLoadingTask(pdfUrl.value) |
|
|
|
loadingTask.promise.then((pdf:any) => { |
|
|
|
loadingTask.promise.then((pdf: any) => { |
|
|
|
numOfPages.value = pdf.numPages |
|
|
|
numOfPages.value = pdf.numPages |
|
|
|
}) |
|
|
|
}) |
|
|
|
flag.value = index |
|
|
|
flag.value = index |
|
|
@ -214,51 +242,50 @@ const clickFile = async (file: any, index: number) => { |
|
|
|
// fetch(res.filePath).then((resoinse) => { |
|
|
|
// fetch(res.filePath).then((resoinse) => { |
|
|
|
// console.log(resoinse.blob()) |
|
|
|
// console.log(resoinse.blob()) |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
}else if(index ===4){ |
|
|
|
} else if (index === 4) { |
|
|
|
docx.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}` |
|
|
|
docx.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}` |
|
|
|
flag.value = index |
|
|
|
flag.value = index |
|
|
|
tabLoading.value = false |
|
|
|
tabLoading.value = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 下载资源 |
|
|
|
// 下载资源 |
|
|
|
const download = (file:any) => { |
|
|
|
const download = (file: any) => { |
|
|
|
console.log(file); |
|
|
|
console.log(file) |
|
|
|
downloadImage(file.url,file.name) |
|
|
|
downloadImage(file.url, file.name) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
function downloadImage(imageUrl:any, filename:any) { |
|
|
|
function downloadImage(imageUrl: any, filename: any) { |
|
|
|
fetch(imageUrl) |
|
|
|
fetch(imageUrl) |
|
|
|
.then(response => response.blob()) |
|
|
|
.then((response) => response.blob()) |
|
|
|
.then(blob => { |
|
|
|
.then((blob) => { |
|
|
|
const url = URL.createObjectURL(blob); |
|
|
|
const url = URL.createObjectURL(blob) |
|
|
|
const a = document.createElement('a'); |
|
|
|
const a = document.createElement('a') |
|
|
|
a.style.display = 'none'; |
|
|
|
a.style.display = 'none' |
|
|
|
a.href = url; |
|
|
|
a.href = url |
|
|
|
a.download = filename; |
|
|
|
a.download = filename |
|
|
|
document.body.appendChild(a); |
|
|
|
document.body.appendChild(a) |
|
|
|
a.click(); |
|
|
|
a.click() |
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
document.body.removeChild(a); |
|
|
|
document.body.removeChild(a) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(error => console.error('Error downloading the image', error)); |
|
|
|
.catch((error) => console.error('Error downloading the image', error)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let nodeID = 0 |
|
|
|
// 点击节点 |
|
|
|
// 点击节点 |
|
|
|
const clickGraphChange = async(id:number) => { |
|
|
|
const clickGraphChange = async (id: number) => { |
|
|
|
console.log(id); |
|
|
|
if (nodeID === id) { |
|
|
|
Router.push({ |
|
|
|
Router.push({ |
|
|
|
path:'/knowledge', |
|
|
|
path: '/knowledge', |
|
|
|
query:{id} |
|
|
|
query: { id }, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
nodeID = id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// isTabsLoading.value = true |
|
|
|
// isTabsLoading.value = true |
|
|
|
// const res = await getCourseOneFiles({KnowId:227}) |
|
|
|
// const res = await getCourseOneFiles({KnowId:227}) |
|
|
|
// console.log(res); |
|
|
|
// console.log(res); |
|
|
|
// courseFilesList.value = filterFilesType(res.data) |
|
|
|
// courseFilesList.value = filterFilesType(res.data) |
|
|
|
// isTabsLoading.value = false |
|
|
|
// isTabsLoading.value = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
@ -340,6 +367,20 @@ const clickGraphChange = async(id:number) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.cours-target { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 300px; |
|
|
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
.title{ |
|
|
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
|
|
height: 40px; |
|
|
|
|
|
|
|
line-height: 40px; |
|
|
|
|
|
|
|
padding-left: 5px; |
|
|
|
|
|
|
|
font-weight: 700; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.right { |
|
|
|
.right { |
|
|
|
width: 400px; |
|
|
|
width: 400px; |
|
|
@ -372,7 +413,13 @@ const clickGraphChange = async(id:number) => { |
|
|
|
} |
|
|
|
} |
|
|
|
.chapter { |
|
|
|
.chapter { |
|
|
|
overflow-y: auto; |
|
|
|
overflow-y: auto; |
|
|
|
height: 700px; |
|
|
|
height: 500px; |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.student-list{ |
|
|
|
|
|
|
|
height: 500px; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
margin-top: 20px; |
|
|
|
margin-top: 20px; |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
@ -387,7 +434,7 @@ const clickGraphChange = async(id:number) => { |
|
|
|
::-webkit-scrollbar-button { |
|
|
|
::-webkit-scrollbar-button { |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
} |
|
|
|
:deep(.docx-wrapper){ |
|
|
|
:deep(.docx-wrapper) { |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|