significative 3 months ago
commit 008f84f123
  1. 6
      src/Layout/main/index.vue
  2. 23
      src/permissions.ts
  3. 19
      src/store/module/user.ts
  4. 2
      src/views/course/components/courseTree.vue
  5. 103
      src/views/course/index.vue
  6. 5
      src/views/home/index.vue
  7. 3
      src/views/knowledge/index.vue
  8. 20
      src/views/pedagogicalReform/index.vue
  9. 1
      src/views/professionalProfile/index.vue
  10. 13
      src/views/scientificResearch/index.vue

@ -4,7 +4,11 @@
<router-view :key="$route.path" />
</transition>
</section> -->
<router-view></router-view>
<div class="view-container">
<div class="banner"></div>
<div class="container"> <router-view></router-view></div>
</div>
</template>
<script lang="ts" setup>

@ -2,16 +2,31 @@
import router from '@/router/index'
import pinia from './store'
import { constRouter } from '@/router/module/constRouter'
import userStore from '@/store/module/user'
import useSettingStore from '@/store/module/setting'
const settingStore = useSettingStore(pinia) //重新指向pinia仓储
const useUserStore = userStore(pinia)
router.beforeEach((to, _from, next) => {
console.log(to.query)
// 判断是否登录
if (!useUserStore.token) {
// http://10.121.2.26:8866/portal#/home?code=abcdef
if (Object.keys(to.query).length) {
console.log('有参数')
// 传入token
useUserStore.verifyToken('1111111')
} else {
// window.location.replace('http://39.106.16.162/')
}
}
let index = constRouter[0].children.findIndex((item: any) => {
console.log(to.path,item.path);
// console.log(to.path,item.path);
return to.path.includes(item.path)
});
console.log(index);
})
// console.log(index);
settingStore.setuseIndex(index)
document.title = `教学一体化-${to.meta.title}`

@ -0,0 +1,19 @@
import { defineStore } from 'pinia'
const userStore = defineStore('userStore', {
state() {
return {
token: '',
}
},
actions: {
async verifyToken(token:string){
const res = await verifyTokenApi({token})
if(res){
this.token = token
}else{
return false
}
}
},
})
export default userStore

@ -2,7 +2,7 @@
<div class="tree-box">
<el-tree
default-expand-all
style="max-width: 600px"
style="max-width: 400px"
:data="chapterList"
@node-click="handleNodeClick"
:props="defaultProps"

@ -1,6 +1,4 @@
<template>
<div class="view-container">
<div class="banner"></div>
<div class="container" v-if="loading">
<div class="left" v-loading="tabLoading">
<div class="gruop">
@ -35,6 +33,14 @@
</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">
<el-tabs
v-model="activeName"
@ -101,8 +107,8 @@
</div>
<div class="description">
<div class="description-box">
Vues 设计与实现这本书的简介 Vues
设计与实现是一本深入剖析 Vues 框架核心原理的权威著作
Vues 设计与实现这本书的简介 Vues 设计与实现是一本深入剖析
Vues 框架核心原理的权威著作
本书首先会为读者搭建起一个坚实的知识基础详细介绍 Vues
的发展历程和其在前端开发领域的重要地位接着深入探讨 Vues
的设计理念让读者理解其背后的创新思维和解决问题的独特视角
@ -122,6 +128,8 @@
<div class="chapter">
<courseTree :chapterList="chapterList" />
</div>
<div class="student-list">
</div>
</div>
</div>
@ -161,7 +169,28 @@ const getCourseChapterEvent = async () => {
}
getCourseChapterEvent()
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) => {
console.log(e)
}
@ -200,7 +229,6 @@ const clickFile = async (file: any, index: number) => {
videoUrl.value = file.url
flag.value = index
tabLoading.value = false
} else if (index === 3) {
pdfUrl.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}`
const loadingTask = createLoadingTask(pdfUrl.value)
@ -218,47 +246,46 @@ const clickFile = async (file: any, index: number) => {
docx.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}`
flag.value = index
tabLoading.value = false
}
}
//
const download = (file: any) => {
console.log(file);
console.log(file)
downloadImage(file.url, file.name)
}
function downloadImage(imageUrl: any, filename: any) {
fetch(imageUrl)
.then(response => response.blob())
.then(blob => {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.style.display = 'none';
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(a);
.then((response) => response.blob())
.then((blob) => {
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.style.display = 'none'
a.href = url
a.download = filename
document.body.appendChild(a)
a.click()
window.URL.revokeObjectURL(url)
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) => {
console.log(id);
if (nodeID === id) {
Router.push({
path: '/knowledge',
query:{id}
query: { id },
})
} else {
nodeID = id
}
// isTabsLoading.value = true
// const res = await getCourseOneFiles({KnowId:227})
// console.log(res);
// courseFilesList.value = filterFilesType(res.data)
// isTabsLoading.value = false
}
</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 {
width: 400px;
@ -372,7 +413,13 @@ const clickGraphChange = async(id:number) => {
}
.chapter {
overflow-y: auto;
height: 700px;
height: 500px;
width: 100%;
margin-top: 20px;
background-color: #fff;
}
.student-list{
height: 500px;
width: 100%;
margin-top: 20px;
background-color: #fff;

@ -1,8 +1,4 @@
<template>
<div class="view-container">
<div class="banner">
<div class="title">课图开源智慧课程管理系统首次开源</div>
</div>
<div class="loop" v-for="(item,index) in couresData.content" :key="item.id">
<div class="main" v-if="index % 2 === 0">
<!-- <div class="course-list">111</div> -->
@ -69,7 +65,6 @@
<div class="get-more">
<div class="btn" @click="getMore">{{btnTexst}}</div>
</div>
</div>
</template>
<script lang="ts" setup>

@ -1,6 +1,4 @@
<template>
<div class="view-container">
<div class="banner"></div>
<div class="container" v-if="loading">
<div class="left" v-loading="tabLoading">
<div class="gruop">
@ -111,7 +109,6 @@
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>

@ -1,20 +1,14 @@
<template>
<div class="view-container">
<div class="banner"></div>
<div class="container">教学改革</div>
<div>
111
</div>
</template>
<script lang="ts" setup>
import {} from 'vue'
<script lang='ts' setup>
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
</script>
<style lang="scss" scoped>
.view-container {
height: 100vh;
.container {
width: $base-container-width;
margin: 0 auto;
}
}
<style lang='scss' scoped>
</style>

@ -1,6 +1,5 @@
<template>
<div class="view-container">
<div class="banner"></div>
<div class="container">
<div class="title">知识图谱</div>
<div class="graph-box">

@ -1,8 +1,5 @@
<template>
<div class="view-container">
<div class="banner"></div>
<div class="container">科学研究</div>
</div>
<div>111</div>
</template>
<script lang="ts" setup>
@ -10,11 +7,5 @@ import {} from 'vue'
</script>
<style lang="scss" scoped>
.view-container {
height: 100vh;
.container {
width: $base-container-width;
margin: 0 auto;
}
}
</style>

Loading…
Cancel
Save