commit
0b7db324da
17 changed files with 9174 additions and 344 deletions
@ -0,0 +1,10 @@ |
||||
/* generated using openapi-typescript-codegen -- do not edit */ |
||||
/* istanbul ignore file */ |
||||
/* tslint:disable */ |
||||
/* eslint-disable */ |
||||
import type { courseLearningRecords } from './CourseLearningRecords'; |
||||
export type BaseResponse_List_CourseLearningRecords_ = { |
||||
code?: number; |
||||
data?: Array<courseLearningRecords>; |
||||
message?: string; |
||||
}; |
@ -0,0 +1,9 @@ |
||||
|
||||
export type courseLearningRecords = { |
||||
time?: string; |
||||
chapterId?: string; |
||||
coursesId?: string; |
||||
id?: string; |
||||
userId?: string; |
||||
img?: string; |
||||
}; |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,121 @@ |
||||
|
||||
<script setup> |
||||
import { ref } from 'vue' |
||||
import { onMounted } from 'vue' |
||||
import { useRouter,useRoute } from 'vue-router' |
||||
import useUserStore from '@/store/modules/user' |
||||
import { LearningRecordsControllerService } from '../../../generated/services/LearningRecordsControllerService' |
||||
const recordList = ref([]) |
||||
const userStore = useUserStore() |
||||
|
||||
onMounted(()=>{ |
||||
userStore.getUserInfo() |
||||
}) |
||||
const route = useRoute() |
||||
const router = useRouter() |
||||
const params = ref({ |
||||
userId: userStore.data.id, |
||||
courseId: route.query.courseId, |
||||
pagenum: '1', |
||||
pagesize: '10', |
||||
}) |
||||
// console.log("courseId:"+ route.query.courseId); |
||||
//this.$route.query.courseId |
||||
//获取浏览记录列表 |
||||
const getrecordList = async () => { |
||||
const res = await LearningRecordsControllerService.knowlegdeLearningRecords( |
||||
params.value.userId, |
||||
params.value.courseId, |
||||
params.value.pagenum, |
||||
params.value.pagesize, |
||||
) |
||||
console.log("记录列表:"); |
||||
console.log(res) |
||||
recordList.value = res.data.records |
||||
} |
||||
//跳转页面 |
||||
const goToAnotherPage = (address,courseId,knowledgeId) => { |
||||
router.push({ |
||||
path:address, |
||||
query:{ |
||||
courseId: courseId, |
||||
knowledgeId: knowledgeId |
||||
} |
||||
}) |
||||
} |
||||
//跳转页面(返回上级目录) |
||||
const goToAnotherPageback = () => { |
||||
router.push({ |
||||
path:'/myCourseStudyManagement/learningProcess' |
||||
}) |
||||
} |
||||
getrecordList() |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
||||
<template> |
||||
<!-- 头部 --> |
||||
<div class="header"> |
||||
<el-button type="primary" plain>浏览记录</el-button> |
||||
<el-button |
||||
type="primary" |
||||
plain |
||||
@click="goToAnotherPageback" |
||||
style="float: right" |
||||
> |
||||
返回上级目录 |
||||
</el-button> |
||||
</div> |
||||
<!-- 中间 --> |
||||
<div class="record-list"> |
||||
<ul v-if="recordList.length > 0"> |
||||
<li> |
||||
<div |
||||
style=" |
||||
display: flex; |
||||
justify-content: space-between; |
||||
flex-grow: 1; |
||||
margin-top: 10px; |
||||
margin-bottom: 10px; |
||||
background-color: aqua; |
||||
" |
||||
> |
||||
<p> |
||||
知识点名称 |
||||
</p> |
||||
<p> |
||||
学习时间 |
||||
</p> |
||||
<p> |
||||
学习人数 |
||||
</p> |
||||
</div> |
||||
</li> |
||||
<li v-for="record in recordList" :key="record.id" @click="goToAnotherPage('/myCourseStudyManagement/learningProcess2',record.coursesId,record.knowledgeId)"> |
||||
<div |
||||
style=" |
||||
display: flex; |
||||
justify-content: space-between; |
||||
flex-grow: 1; |
||||
margin-top: 10px; |
||||
margin-bottom: 10px; |
||||
" |
||||
> |
||||
<p> |
||||
{{ record.knowledgeName}} |
||||
</p> |
||||
<p> |
||||
{{ record.time}} |
||||
</p> |
||||
<p> |
||||
{{record.number}} |
||||
</p> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
<el-empty v-else description="暂时没有浏览记录" /> |
||||
</div> |
||||
</template> |
||||
|
||||
|
||||
|
@ -0,0 +1,154 @@ |
||||
|
||||
<script setup> |
||||
import { ref } from 'vue' |
||||
import { onMounted } from 'vue' |
||||
import { useRouter,useRoute } from 'vue-router' |
||||
import useUserStore from '@/store/modules/user' |
||||
import { LearningRecordsControllerService } from '../../../generated/services/LearningRecordsControllerService' |
||||
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs' |
||||
|
||||
const recordList = ref([]) |
||||
const userStore = useUserStore() |
||||
|
||||
onMounted(()=>{ |
||||
userStore.getUserInfo() |
||||
}) |
||||
const sp = "https://wenyu132.oss-cn-beijing.aliyuncs.com/wenyu/merge.mp4" |
||||
// const video = "D:\Users\Desktop\image\video\merge.mp4" |
||||
const route = useRoute() |
||||
const router = useRouter() |
||||
const params = ref({ |
||||
userId: userStore.data.id, |
||||
knowledgeId: route.query.knowledgeId, |
||||
courseId: route.query.courseId, |
||||
pagenum: '1', |
||||
pagesize: '10', |
||||
}) |
||||
|
||||
//获取浏览记录列表 |
||||
const getrecordList = async () => { |
||||
const res = await LearningRecordsControllerService.resourceLearningRecords( |
||||
params.value.userId, |
||||
params.value.knowledgeId, |
||||
params.value.courseId, |
||||
params.value.pagenum, |
||||
params.value.pagesize, |
||||
) |
||||
// console.log("记录列表:"); |
||||
// console.log(res) |
||||
recordList.value = res.data.records |
||||
} |
||||
|
||||
//跳转页面(返回上级目录) |
||||
const goToAnotherPage = () => { |
||||
router.push({ |
||||
path:'/myCourseStudyManagement/learningProcess1', |
||||
query:{ |
||||
courseId: route.query.courseId |
||||
} |
||||
}) |
||||
} |
||||
getrecordList() |
||||
|
||||
//上传文件 |
||||
const upload = async(file) => { |
||||
console.log(file); |
||||
console.log(file.raw); |
||||
new FormData(file) |
||||
const res = await LearningRecordsControllerService.upload( |
||||
new FormData(file) |
||||
) |
||||
} |
||||
|
||||
// const video = this.$refs.videoRef; |
||||
|
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
||||
<template> |
||||
<!-- 头部 --> |
||||
<div class="header"> |
||||
<el-button type="primary" plain>浏览记录</el-button> |
||||
<el-button |
||||
type="primary" |
||||
plain |
||||
@click="goToAnotherPage" |
||||
style="float: right" |
||||
> |
||||
返回上级目录 |
||||
</el-button> |
||||
</div> |
||||
<!-- 中间 --> |
||||
<div class="record-list"> |
||||
<ul v-if="recordList.length > 0"> |
||||
<li> |
||||
<div |
||||
style=" |
||||
display: flex; |
||||
justify-content: space-between; |
||||
flex-grow: 1; |
||||
margin-top: 10px; |
||||
margin-bottom: 10px; |
||||
background-color: aqua; |
||||
" |
||||
> |
||||
<p> |
||||
资源名称 |
||||
</p> |
||||
<p> |
||||
学习时间 |
||||
</p> |
||||
<p> |
||||
学习人数 |
||||
</p> |
||||
</div> |
||||
</li> |
||||
<li v-for="record in recordList" :key="record.id" > |
||||
<div |
||||
style=" |
||||
display: flex; |
||||
justify-content: space-between; |
||||
flex-grow: 1; |
||||
margin-top: 10px; |
||||
margin-bottom: 10px; |
||||
" |
||||
> |
||||
<p> |
||||
{{ record.resourceName}} |
||||
</p> |
||||
<p> |
||||
{{ record.time}} |
||||
</p> |
||||
<p> |
||||
{{record.number}} |
||||
</p> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
<el-empty v-else description="暂时没有浏览记录" /> |
||||
</div> |
||||
<hr> |
||||
|
||||
<el-upload |
||||
class="avatar-uploader" |
||||
:show-file-list="false" |
||||
:auto-upload="false" |
||||
:before-upload="beforeAvatarUpload" |
||||
:on-change="upload" |
||||
> |
||||
<img v-if="imageUrl" :src="imageUrl" class="avatar" /> |
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> |
||||
</el-upload> |
||||
<!-- autoplay --> |
||||
<!-- <video ref="videoRef" controls width="600"> |
||||
<source :src="sp" type="video/mp4" /> |
||||
</video> --> |
||||
|
||||
<!-- <div> |
||||
<video ref="videoRef" controls="true" :controlslist="nodownload" @contextmenu="handleContextMenu"></video> |
||||
</div> --> |
||||
|
||||
</template> |
||||
|
||||
|
||||
|
Loading…
Reference in new issue