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) { if (isAsync === true) {
item.async = 'on' item.async = 'on'
if (type === 'down') { if (type === 'down') {
// console.log(item) console.log(item)
ipcRenderer.send('download-file-default', { ipcRenderer.send('download-file-default', {
url: item.fileFullPath, url: item.fileFullPath,
fileName: item.fileNewName fileName: item.fileNewName

View File

@ -126,17 +126,11 @@
<span>下载</span> <span>下载</span>
</el-button> </el-button>
</div> </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)"> <el-button text @click="adToKj(item)">
<i class="iconfont icon-jiahao"></i> <i class="iconfont icon-jiahao"></i>
<span>加入课件</span> <span>加入课件</span>
</el-button> </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>
<div class="item-popover-item"> <div class="item-popover-item">
<el-button text @click="moveSmarttalkFun(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() { data() {
return { return {
listenList: [], listenList: [],
@ -223,9 +217,6 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
importPPT(item) {
this.$emit('on-importPPT', item)
},
downloadFile(item) { downloadFile(item) {
ipcRenderer.send('save-as', item.fileFullPath, item.fileShowName) ipcRenderer.send('save-as', item.fileFullPath, item.fileShowName)
}, },

View File

@ -99,7 +99,6 @@
@on-delete="deleteTalk" @on-delete="deleteTalk"
@on-set="openSet" @on-set="openSet"
@on-delhomework="delhomework" @on-delhomework="delhomework"
@on-importPPT="importPPT"
@on-filearg="isOpenHomework = true" @on-filearg="isOpenHomework = true"
> >
<el-checkbox v-if="!item.uniquekey" label="" :value="item" /> <el-checkbox v-if="!item.uniquekey" label="" :value="item" />
@ -556,15 +555,6 @@ export default {
progDownFile(e, num) { progDownFile(e, num) {
this.downloadNum = 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() { createFile() {
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => { creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
this.currentFileList.unshift(res.resData) this.currentFileList.unshift(res.resData)
@ -583,7 +573,7 @@ export default {
console.log('文件名:', file.name); console.log('文件名:', file.name);
console.log('文件类型:', file.type); console.log('文件类型:', file.type);
console.log('文件大小:', file.size); console.log('文件大小:', file.size);
this.createAIPPTByFile(file, this.currentNode.itemtitle + '.aippt') this.createAIPPTByFile(file)
} }
}, },
async toRousrceUrl(o) { async toRousrceUrl(o) {
@ -629,7 +619,7 @@ export default {
} }
} }
}, },
async createAIPPTByFile(file,fileShowName) { async createAIPPTByFile(file) {
this.pgDialog.visible = true this.pgDialog.visible = true
this.pgDialog.pg.percentage = 0 this.pgDialog.pg.percentage = 0
const resPptJson = await PPTXFileToJson(file) const resPptJson = await PPTXFileToJson(file)
@ -675,7 +665,7 @@ export default {
...this.uploadData, ...this.uploadData,
fileId: slideid, fileId: slideid,
fileFlag: 'aippt', fileFlag: 'aippt',
fileShowName: fileShowName fileShowName: this.currentNode.itemtitle + '.aippt'
}).then(async (res) => { }).then(async (res) => {
const resSlides = slides.map(({id, ...slide}) => JSON.stringify(slide)) 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([ const modeOptions = ref([
{ {
label: '教学大模型', label: '教学大模型',
@ -223,7 +223,7 @@ const editKeyWord = (item, val) => {
const removeItem = async (item, isChild) => { const removeItem = async (item, isChild) => {
/** /**
* item: 当前操作的模板 * item: 当前操作的模板
* isChild: 子模板中的移除为 true * isChild: 子模板中的移除为 true
*/ */
if (item.ex3 != '1') { if (item.ex3 != '1') {
ElMessageBox.confirm( ElMessageBox.confirm(
@ -280,7 +280,7 @@ const scrollToBottom = (height, index) => {
let listDom = listRef.value.children let listDom = listRef.value.children
if (index == 0) { if (index == 0) {
// 220 // 220
let screenHeight = window.innerHeight - 220 let screenHeight = window.innerHeight - 220
if (height > screenHeight) { if (height > screenHeight) {
listRef.value.scrollTop = (height - screenHeight + 50) listRef.value.scrollTop = (height - screenHeight + 50)
@ -735,4 +735,4 @@ onUnmounted(() => {
width: 110px !important; width: 110px !important;
min-width: 110px !important; min-width: 110px !important;
} }
</style> </style>