zdg_dev #174

Merged
zhengdegang merged 3 commits from zdg_dev into main 2024-12-24 12:05:04 +08:00
1 changed files with 7 additions and 4 deletions
Showing only changes of commit db86299523 - Show all commits

View File

@ -205,13 +205,12 @@ import TreeLog from '@/views/prepare/components/treeLog.vue'
import classStart from './container/class-start.vue' //
import MsgEnum from '@/plugins/imChat/msgEnum' // im
import * as commUtils from "@/utils/comm";
import * as Api_server from "@/api/apiService";
import msgUtils from "@/plugins/modal";
import * as Api_server from "@/api/apiService";
import * as API_entpcoursefile from "@/api/education/entpcoursefile";
import { slidesToImg } from '@/utils/ppt' // ppt
import ChatWs from '@/plugins/socket' // socket
if (!ChatWs.ws) ChatWs.init()
// import Chat from '@/utils/chat' // im
// if (!Chat.imChat) Chat.init()
const toolStore = useToolState()
const fs = require('fs')
@ -573,8 +572,9 @@ export default {
},500)
})
},
openFilePicker(){
async openFilePicker(){
this.$refs.fileInput.click();
// const files = await commUtils.getFiles()
},
handleFileChange(){
const file = event.target.files[0];
@ -634,6 +634,8 @@ export default {
this.pgDialog.pg.percentage = 0
const resPptJson = await PPTXFileToJson(file)
const { def, slides, ...content } = resPptJson
//
const thumbnails = await slidesToImg(slides, content.width)
// || 线
let completed = 0
const total = slides.length
@ -686,6 +688,7 @@ export default {
title: '',
filetype: 'slide',
slides: resSlides,
thumbnails, //
edituserid: this.userStore.userId
}
const res_3 = await API_entpcoursefile.batchAddNew(params)