Compare commits

..

6 Commits

Author SHA1 Message Date
朱浩 222b0f54f8 Merge remote-tracking branch 'origin/main' 2024-12-09 10:51:25 +08:00
朱浩 e0a56b37ef 改名AIPPT 2024-12-09 10:51:07 +08:00
朱浩 a78497b263 Merge remote-tracking branch 'origin/main' 2024-12-06 14:21:19 +08:00
朱浩 65670af54f s生成PPT 2024-12-06 14:21:05 +08:00
朱浩 87dcd9d5c3 Merge remote-tracking branch 'origin/main' 2024-12-05 15:47:38 +08:00
朱浩 9803c09c43 s生成PPT 2024-12-04 17:04:20 +08:00
9 changed files with 142 additions and 27 deletions

View File

@ -81,5 +81,8 @@ const initLoad: Function = () => {
<style lang="scss">
#app {
height: 100%;
svg, canvas, img, audio, video, iframe {
display: unset;
}
}
</style>
</style>

View File

@ -35,7 +35,7 @@ const getFileTypeIcon = () => {
txt: 'icon-txt',
rar: 'icon-rar',
apt: 'icon-A',
aptist: 'icon-A',
aippt: 'icon-A',
}
if (iconObj[name]) {
return '#' + iconObj[name]

View File

@ -48,7 +48,7 @@
</div>
<div class="verson">V{{ version }}</div>
</div>
</div>
</template>
@ -87,6 +87,12 @@ const headerMenus = [
icon: 'icon-gongzuotai',
path: '/desktop'
},
{
name: '教学实践',
id: 4,
icon: 'icon-jiaoxueshijian',
path: '/prepare'
},
{
name: '资源中心',
id: 3,
@ -126,12 +132,12 @@ const computedregistertype = computed(() => {
if(type==3 && userStore.DeptInfo.register.auditStatus==0){
return 2
}
//
if(type==4 && userStore.DeptInfo.register.auditStatus==0){
return 3
}
})
const clickMenu = ({ id, disabled, path }) => {
if (disabled) return
@ -193,7 +199,7 @@ onMounted(() => {
}
.popoverStyle .head-aside{
width: 100%;
display: flex;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
@ -246,7 +252,7 @@ onMounted(() => {
align-items: center;
font-size: 12px;
.user-img{
width: 56px;
width: 56px;
height: 56px;
border-radius: 50%;
cursor: pointer;
@ -312,4 +318,4 @@ onMounted(() => {
font-size: 18px;
font-weight: 800;
}
</style>
</style>

View File

@ -10,7 +10,7 @@
<el-button type="primary" @click="onchange('/model/newClassTaskAssign')">作业管理</el-button>
<el-button type="success" @click="onchange('/model/teaching')">教材研读</el-button>
<el-button type="info" @click="onchange('/model/design')">教学框架设计</el-button>
<el-button type="success" @click="openPPTist">打开PPTist</el-button>
<!-- <el-button type="success" @click="openPPTist">打开PPTist</el-button>-->
<el-button type="info" @click="onchange('/model/examination')">考试分析</el-button>
<el-button type="primary" v-menus="dt.menus">测试</el-button>
<el-button type="success" @click="onchange('/model/aiKolors')">文生图片</el-button>
@ -230,7 +230,7 @@ const HTTP_SERVER_API = (type, params = {}) => {
ppttype: 'file',
title: enpt.coursetitle,
fileurl: '',
filetype: 'aptist',
filetype: 'aippt',
datacontent: '',
filekey: '',
filetag: '',
@ -287,7 +287,7 @@ const handleAll = async(type, row) =>{
break;
}
case 'open': { // -pptist
if (row.filetype != 'aptist') return msgUtils.msgWarning('暂不支持该类型文件操作!')
if (row.filetype != 'aippt') return msgUtils.msgWarning('暂不支持该类型文件操作!')
sessionStore.set('curr.resource', row) //
createWindow('open-win', {
url: '/pptist', //
@ -312,7 +312,7 @@ const handleAll = async(type, row) =>{
// icons type svg
const getIcon = (o, type) => {
let icon = typeof o == 'string' ? o : o?.filetype
if (['aptist'].includes(o?.filetype)) icon = 'pptx'
if (['aippt'].includes(o?.filetype)) icon = 'pptx'
if (!!type) { // icon
switch(type) {
case 'svg': // svg

View File

@ -158,7 +158,7 @@ const outlineCreatePPT = () => {
const checkProgress = () => {
getProgressV2(res.sid).then(response => {
percentage.value = Math.round(response?.donePages/response?.totalPages)*100;
percentage.value = Math.round(response?.donePages*100/response?.totalPages);
if (response.pptStatus === "done") {
emit('addSuccess',{...res,url:response.pptUrl})
ElMessage.success("生成成功");
@ -267,7 +267,6 @@ function webSocketSend(ws, data) {
function result1(resultData) {
let jsonData = JSON.parse(resultData);
console.log(jsonData)
outputText.value += jsonData.payload.choices.text[0].content;
const div = document.querySelector('.paragraphs');
if (div) {

View File

@ -262,7 +262,7 @@ const createClasscourse = async () => {
// getClasscourseList('update') //
ElMessage.success('创建课程-成功')
// -pptList
if (myClassActive.value.filetype == 'aptist') {
if (myClassActive.value.filetype == 'aippt') {
const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
setTimeout(() => {
msgEl.close()

View File

@ -341,7 +341,7 @@ export default {
cookieData: { ...configObj.data }
})
return
} else if(items.fileFlag === 'aptist') { // aptist PPT-List
} else if(items.fileFlag === 'aippt') { // aippt PPT-List
return this.$emit('change', 'click', items)
}
if (!items||!items.fileSuffix) return;

View File

@ -2,8 +2,20 @@
<div v-loading="isLoading" class="page-resource flex">
<ChooseTextbook @node-click="nodeClick" />
<div class="page-center-wrap">
<el-dropdown class="prepare-center-dropdown">
<el-button type="primary">
新建<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="createAptFile">新建文枢课件</el-dropdown-item>
<el-dropdown-item>AI一键生成</el-dropdown-item>
<el-dropdown-item>导入PPT</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-tabs v-model="activeAptTab" style="height: 100%;">
<el-tab-pane label="教学课件" name="教学课件" class="prepare-center-jxkj">
<el-tab-pane label="文枢课件" name="教学课件" class="prepare-center-jxkj">
<div class="prepare-center-header">
<div class="center-create-btn" style="background-color: rgb(64,158,255)" @click="createAptFile">
<div class="create-btn-title"><el-icon><Plus /></el-icon><label>APT</label></div>
@ -145,7 +157,7 @@
<!-- <button @click="test">test</button> -->
</template>
<script setup>
import { Check,Plus } from '@element-plus/icons-vue'
import {Check, Plus, Position} from '@element-plus/icons-vue'
import Reserv from '@/views/prepare/container/reserv.vue'
import { ArrowDown } from '@element-plus/icons-vue'
import PptDialog from '@/views/prepare/container/ppt-dialog.vue'
@ -253,11 +265,11 @@ export default {
},
currentKJFileList() {
// return this.currentFileList.filter((item) => item.fileFlag === 'apt' || item.fileFlag === '')
return this.currentFileList.filter((item) => ['apt','aptist','课件'].includes(item.fileFlag))
return this.currentFileList.filter((item) => ['apt','aippt','课件'].includes(item.fileFlag))
},
currentSCFileList() {
// return this.currentFileList.filter((item) => item.fileFlag !== 'apt' && item.fileFlag !== '')
return this.currentFileList.filter((item) => !['apt','aptist','课件'].includes(item.fileFlag))
return this.currentFileList.filter((item) => !['apt','aippt','课件'].includes(item.fileFlag))
}
},
@ -321,7 +333,7 @@ export default {
if(item.fileFlag === 'apt') {
this.$refs.calssRef.open(item.fileId, classObj)
}
if(item.fileFlag === 'aptist') {
if(item.fileFlag === 'aippt') {
this.$refs.calssRef.open(item.fileId, classObj)
}
},
@ -378,8 +390,8 @@ export default {
}, 1000)
break
}
case 'click': { // --aptist
if (row.fileFlag === 'aptist' && !!row.fileId) {
case 'click': { // --aippt
if (row.fileFlag === 'aippt' && !!row.fileId) {
const res = await getEntpcoursefile(row.fileId)
if (res && res.code === 200) {
sessionStore.set('curr.resource', res.data) //
@ -461,6 +473,93 @@ export default {
},500)
})
},
createAIPPT() {
listEntpcourse({
evalid: this.currentNode.id,
edituserid: this.userStore.userId,
pageSize: 500
}).then((response) => {
if (response.rows.length <= 0) return
let resCourse = response.rows[0]
//
let form = {
parentid: 0,
entpid: this.userStore.deptId,
entpcourseid: resCourse.id,
ppttype: 'file',
title: resCourse.coursetitle,
fileurl: '',
filetype: 'aippt',
datacontent: '',
filekey: '',
filetag: '',
fileidx: 0,
dflag: 0,
status: '',
edituserid: this.userStore.userId
}
addEntpcoursefileReturnId(form).then((slideid) => {
let pagearray = []
//
pagearray.push({
key: '公屏',
title: '公屏页',
slidedata: {
attrs: { width: 1333, height: 749.8125 },
className: 'Stage',
children: [
{
attrs: {},
className: 'Layer',
children: [
{
attrs: {
width: 1333,
height: 749.8125,
fill: 'white',
name: 'fixedbackground',
listening: true
},
className: 'Rect'
}
]
}
]
}
})
//
var form = {
parentid: slideid,
entpid: resCourse.entpid,
entpcourseid: resCourse.id,
ppttype: 'file',
title: '第一页',
fileurl: '',
filetype: 'slide',
datacontent: JSON.stringify(pagearray),
filekey: '',
filetag: '',
fileidx: 0,
dflag: 0,
status: '',
edituserid: this.userStore.userId
}
addEntpcoursefileReturnId(form).then((res) => {
creatAPT({
...this.uploadData,
fileId: slideid,
fileShowName: this.currentNode.itemtitle + '.apt'
}).then((res) => {
this.currentFileList.unshift(res.resData)
setTimeout(()=>{
this.$refs['kjItemRef'+res.resData.id][0].openFileWin(res.resData);
},500)
})
})
})
})
},
createAptFile() {
listEntpcourse({
evalid: this.currentNode.id,
@ -653,7 +752,7 @@ export default {
for (let i = 0; i < this.currentFileList.length; i++) {
let item = this.currentFileList[i]
if (item.fileFlag === 'apt') continue;
if (item.fileFlag === 'aptist') continue;
if (item.fileFlag === 'aippt') continue;
await asyncLocalFile(item)
}
this.asyncAllFileVisiable = false
@ -872,6 +971,13 @@ export default {
margin: 0 5px;
border-radius: 10px;
background-color: white;
position: relative;
.prepare-center-dropdown{
z-index: 9999;
position: absolute;
right: 10px;
top: 4px;
}
.prepare-center-jxkj{
height: 100%;
display: flex;

View File

@ -131,6 +131,7 @@ const params = reactive(
const addAiPPT = async(res) => {
let node = courseObj.node
pptDialog.value = false;
if (!node) return msgUtils.msgWarning('请选择章节?')
pgDialog.visible = true
pgDialog.pg.percentage = 0
@ -238,8 +239,8 @@ const HTTP_SERVER_API = (type, params = {}) => {
const node = courseObj.node || {}
const def = {
fileId: '', // id - Entpcoursefile id
fileFlag: 'aptist',
fileShowName: node.itemtitle + '.aptist',
fileFlag: 'aippt',
fileShowName: node.itemtitle + '.aippt',
textbookId: node.rootid,
levelFirstId: node.parentid||node.id,
levelSecondId: node.parentid && node.id,
@ -298,7 +299,7 @@ const getDefParams = (params) => {
ppttype: 'file',
title: enpt.coursetitle,
fileurl: '',
filetype: 'aptist',
filetype: 'aippt',
datacontent: '',
filekey: '',
filetag: '',