基础文件上传核心开发

This commit is contained in:
朱浩 2024-07-15 16:13:26 +08:00
parent 9ad99c523f
commit 27394568a4
1 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="page-resource flex" v-loading="isLoading"> <div class="page-resource flex" v-loading="isLoading">
<ChooseTextbook @node-click="nodeClick" /> <ChooseTextbook @changeBook="changeBook" @node-click="nodeClick" />
<div class="page-right"> <div class="page-right">
<div class="prepare-body-header"> <div class="prepare-body-header">
<div> <div>
@ -93,6 +93,7 @@
</template> </template>
<script setup> <script setup>
import { Check } from '@element-plus/icons-vue' import { Check } from '@element-plus/icons-vue'
import ChooseTextbook from '@/components/choose-textbook/index.vue'
</script> </script>
<script> <script>
import FileUpload from '@/components/file-upload/index.vue' import FileUpload from '@/components/file-upload/index.vue'
@ -169,15 +170,18 @@ export default {
} }
console.log('File copied to:', filePath) console.log('File copied to:', filePath)
}, },
nodeClick(data,bookId) { changeBook(data) {
this.currentNode = data; console.log(data)
this.uploadData.levelFirstId = data.id; },
this.uploadData.textbookId = bookId.value nodeClick(data) {
console.log(data)
this.currentNode = data.node;
this.uploadData.levelFirstId = data.node.id;
this.uploadData.textbookId = data.textBook.curBookId
this.isLoading = true; this.isLoading = true;
getSmarttalkPage({...this.uploadData,orderByColumn:'uploadTime',isAsc:'desc'}).then(res=>{ getSmarttalkPage({...this.uploadData,orderByColumn:'uploadTime',isAsc:'desc',fileSuffix:'mp4'}).then(res=>{
this.currentFileList = [...res.rows] this.currentFileList = [...res.rows]
this.isLoading = false; this.isLoading = false;
console.log(res)
}).catch(res=>{ }).catch(res=>{
this.isLoading = false; this.isLoading = false;
}) })