Compare commits
5 Commits
086836e016
...
4531533382
Author | SHA1 | Date |
---|---|---|
朱浩 | 4531533382 | |
朱浩 | a601a9f8dd | |
朱浩 | a2c2c4eec7 | |
朱浩 | 1983dafbba | |
朱浩 | 6c7284383a |
|
@ -9,7 +9,7 @@ export const asyncLocalFile = (item) => {
|
|||
if (isAsync === true) {
|
||||
item.async = 'on'
|
||||
if (type === 'down') {
|
||||
console.log(item)
|
||||
// console.log(item)
|
||||
ipcRenderer.send('download-file-default', {
|
||||
url: item.fileFullPath,
|
||||
fileName: item.fileNewName
|
||||
|
|
|
@ -126,11 +126,17 @@
|
|||
<span>下载</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="item.fileSuffix === 'ppt' || item.fileSuffix === 'pptx'" class="item-popover-item">
|
||||
<!-- <div v-if="item.fileSuffix === 'ppt' || item.fileSuffix === 'pptx'" class="item-popover-item">
|
||||
<el-button text @click="adToKj(item)">
|
||||
<i class="iconfont icon-jiahao"></i>
|
||||
<span>加入课件</span>
|
||||
</el-button>
|
||||
</div>-->
|
||||
<div v-if="item.fileSuffix === 'ppt' || item.fileSuffix === 'pptx'" class="item-popover-item">
|
||||
<el-button text @click="importPPT(item)">
|
||||
<i class="iconfont icon-jiahao"></i>
|
||||
<span>导入PPT</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="item-popover-item">
|
||||
<el-button text @click="moveSmarttalkFun(item)">
|
||||
|
@ -181,7 +187,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null },
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null,'on-importPPT': null },
|
||||
data() {
|
||||
return {
|
||||
listenList: [],
|
||||
|
@ -217,6 +223,9 @@ export default {
|
|||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
importPPT(item) {
|
||||
this.$emit('on-importPPT', item)
|
||||
},
|
||||
downloadFile(item) {
|
||||
ipcRenderer.send('save-as', item.fileFullPath, item.fileShowName)
|
||||
},
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
@on-delete="deleteTalk"
|
||||
@on-set="openSet"
|
||||
@on-delhomework="delhomework"
|
||||
@on-importPPT="importPPT"
|
||||
@on-filearg="isOpenHomework = true"
|
||||
>
|
||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||
|
@ -555,6 +556,15 @@ export default {
|
|||
progDownFile(e, num) {
|
||||
this.downloadNum = num
|
||||
},
|
||||
importPPT(item) {
|
||||
let _this = this;
|
||||
fetch(item.fileFullPath)
|
||||
.then(res => res.arrayBuffer())
|
||||
.then(buffer => {
|
||||
let name = item.fileShowName.substring(0, item.fileShowName.lastIndexOf('.')) + '.aippt'
|
||||
_this.createAIPPTByFile(buffer, name)
|
||||
})
|
||||
},
|
||||
createFile() {
|
||||
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
|
||||
this.currentFileList.unshift(res.resData)
|
||||
|
@ -573,7 +583,7 @@ export default {
|
|||
console.log('文件名:', file.name);
|
||||
console.log('文件类型:', file.type);
|
||||
console.log('文件大小:', file.size);
|
||||
this.createAIPPTByFile(file)
|
||||
this.createAIPPTByFile(file, this.currentNode.itemtitle + '.aippt')
|
||||
}
|
||||
},
|
||||
async toRousrceUrl(o) {
|
||||
|
@ -619,7 +629,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
async createAIPPTByFile(file) {
|
||||
async createAIPPTByFile(file,fileShowName) {
|
||||
this.pgDialog.visible = true
|
||||
this.pgDialog.pg.percentage = 0
|
||||
const resPptJson = await PPTXFileToJson(file)
|
||||
|
@ -665,7 +675,7 @@ export default {
|
|||
...this.uploadData,
|
||||
fileId: slideid,
|
||||
fileFlag: 'aippt',
|
||||
fileShowName: this.currentNode.itemtitle + '.aippt'
|
||||
fileShowName: fileShowName
|
||||
}).then(async (res) => {
|
||||
|
||||
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide))
|
||||
|
|
|
@ -117,7 +117,7 @@ const pgDialog = reactive({ // 弹窗-进度条
|
|||
}
|
||||
})
|
||||
|
||||
const curMode = ref(1)
|
||||
const curMode = ref(2)
|
||||
const modeOptions = ref([
|
||||
{
|
||||
label: '教学大模型',
|
||||
|
|
Loading…
Reference in New Issue