Compare commits

..

No commits in common. "45315333828c7f0219e941fbe78f6b38a145b468" and "086836e016da9f4537346b29ff5e9f9ed8abec71" have entirely different histories.

4 changed files with 10 additions and 29 deletions

View File

@ -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

View File

@ -126,17 +126,11 @@
<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)">
@ -187,7 +181,7 @@ export default {
}
}
},
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null,'on-importPPT': null },
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
listenList: [],
@ -223,9 +217,6 @@ export default {
})
.catch(() => {})
},
importPPT(item) {
this.$emit('on-importPPT', item)
},
downloadFile(item) {
ipcRenderer.send('save-as', item.fileFullPath, item.fileShowName)
},

View File

@ -99,7 +99,6 @@
@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" />
@ -556,15 +555,6 @@ 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)
@ -583,7 +573,7 @@ export default {
console.log('文件名:', file.name);
console.log('文件类型:', file.type);
console.log('文件大小:', file.size);
this.createAIPPTByFile(file, this.currentNode.itemtitle + '.aippt')
this.createAIPPTByFile(file)
}
},
async toRousrceUrl(o) {
@ -629,7 +619,7 @@ export default {
}
}
},
async createAIPPTByFile(file,fileShowName) {
async createAIPPTByFile(file) {
this.pgDialog.visible = true
this.pgDialog.pg.percentage = 0
const resPptJson = await PPTXFileToJson(file)
@ -675,7 +665,7 @@ export default {
...this.uploadData,
fileId: slideid,
fileFlag: 'aippt',
fileShowName: fileShowName
fileShowName: this.currentNode.itemtitle + '.aippt'
}).then(async (res) => {
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide))

View File

@ -117,7 +117,7 @@ const pgDialog = reactive({ // 弹窗-进度条
}
})
const curMode = ref(2)
const curMode = ref(1)
const modeOptions = ref([
{
label: '教学大模型',
@ -223,7 +223,7 @@ const editKeyWord = (item, val) => {
const removeItem = async (item, isChild) => {
/**
* item: 当前操作的模板
* isChild: 子模板中的移除为 true
* isChild: 子模板中的移除为 true
*/
if (item.ex3 != '1') {
ElMessageBox.confirm(
@ -280,7 +280,7 @@ const scrollToBottom = (height, index) => {
let listDom = listRef.value.children
if (index == 0) {
// 220
// 220
let screenHeight = window.innerHeight - 220
if (height > screenHeight) {
listRef.value.scrollTop = (height - screenHeight + 50)
@ -735,4 +735,4 @@ onUnmounted(() => {
width: 110px !important;
min-width: 110px !important;
}
</style>
</style>