Compare commits

..

No commits in common. "main" and "lyc-dev" have entirely different histories.

18 changed files with 42 additions and 173 deletions

View File

@ -17,7 +17,6 @@ VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktx
VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
# websocket 地址
# VITE_APP_WS_URL = 'wss://prev.ysaix.com:7868'
VITE_APP_WS_URL = 'wss://file.ysaix.com:7868'
# VITE_APP_WS_URL = 'ws://192.168.2.16:7865'

View File

@ -1,6 +1,6 @@
{
"name": "aix-win-ws",
"version": "2.5.9",
"version": "2.5.8",
"description": "",
"main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院",

View File

@ -1,47 +0,0 @@
export default class gridPic {
private static Instance: gridPic | null = null;
private gridPicRef: any = null;
constructor(elRef?: any) {
if (elRef) {
this.gridPicRef = elRef;
}
if (!gridPic.Instance) {
gridPic.Instance = this;
}
return gridPic.Instance;
}
// 初始化
init(elRef) {
if (elRef) {
this.gridPicRef = elRef;
}
return this;
}
addPIc(data) {
if (this.gridPicRef && this.gridPicRef.value && typeof this.gridPicRef.value.addPic === 'function') {
this.gridPicRef.value.addPic(data);
}
return this;
}
// 静态方法 - 初始化
static init(elRef) {
if (!gridPic.Instance) {
gridPic.Instance = new gridPic(elRef);
} else {
gridPic.Instance.init(elRef);
}
return gridPic.Instance;
}
// 静态方法 - 打开推图上屏幕
static addPIc(data) {
if (gridPic.Instance) {
return gridPic.Instance.addPIc(data);
}
return null;
}
}

View File

@ -274,7 +274,6 @@ export class PPTApi {
static toRousrceUrl =async (o:any) => {
const formData = new FormData()
formData.append('file', o)
formData.append('ral', true)
const res = await Api_server.Other.uploadFile(formData)
if (res && res.code == 200){
const url = res?.url

View File

@ -132,8 +132,6 @@ export class MsgEnum {
MSG_dz : 'dz',
/** @desc: 疑惑 */
MSG_yh : 'yh',
/** @desc: 推图片上屏 */
MSG_pushSreen_ImgList : 'pushSreen_ImgList',
// === 新定义-消息头 ===
/** @desc: 课程创建-待开课 */
MSG_0000: 0x0000,

View File

@ -12,10 +12,9 @@ import Classcourse from './classcourse' // 课程相关
import msgUtils from '@/plugins/modal' // 消息工具
import * as dialogUtils from '@/utils/dialog' // 弹窗-函数
import { Homework } from './index' // api-作业相关
import emitter from '@/utils/mitt' //mitt 事件总线
// import emitter from '@/utils/mitt' //mitt 事件总线
import useExecPlay from '../views/Screen/hooks/useExecPlay' // 播放控制
import hooksUpvote from './upvote' // 点赞-工具
import gridPic from './gridPic' // 上屏-工具
/**
* @description
@ -99,7 +98,6 @@ export default () => {
}
break
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
emitter.emit('closegridPic') //如果有推图片窗口 就关闭
const slideIndex = content?.current || 0
const type = content?.animation // 上下动作
const steps = content?.animationSteps // 动画步骤
@ -130,10 +128,6 @@ export default () => {
case MsgEnum.HEADS.MSG_yh: // 疑惑
hooksUpvote.trigger(2)
break
case MsgEnum.HEADS.MSG_pushSreen_ImgList: // 推图片上屏
const imgArray = content.ImgList.map((obj) => obj.url);
emitter.emit('opengridPic',{arr:imgArray}) // 打开推图片上屏窗口
break
case MsgEnum.HEADS.MSG_0010: // 备用
break
default:
@ -148,14 +142,4 @@ export default () => {
window.close() // 关闭窗口
}, 1000)
}
// setTimeout(async () => {
// emitter.emit('opengridPic',{arr:['https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg']})
// }, 3000)
// setTimeout(async () => {
// emitter.emit('closegridPic')
// }, 6000)
// setTimeout(async () => {
// emitter.emit('opengridPic',{arr:['https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg','https://prev.ysaix.com:7868/src/assets/images/homecard4.jpg']})
// }, 9000)
}

View File

@ -1,6 +1,5 @@
import { useScreenStore, useSlidesStore, useClasscourseStore } from '../store'
import { enterFullscreen, exitFullscreen, isFullscreen } from '../utils/fullscreen'
import { sessionStore } from '@/utils/store' // electron-store 状态管理
import ChatWs from '@/plugins/socket' // 聊天socket
export default () => {
@ -26,9 +25,6 @@ export default () => {
if (!!classcourse) { //DOTO 有课堂,执行退相关操作
console.log('退出放映状态')
ChatWs?.close() // 关闭ws
sessionStore.delete('curr.classcourse') // 清除课堂信息
sessionStore.delete('curr.resource') // 清除课件信息
sessionStore.delete('curr.isPublic') // 清除公屏状态
setTimeout(() => {
window.close() // 关闭窗口
}, 1000)

View File

@ -16,7 +16,7 @@
<PopoverMenuItem>导入 pptx 文件</PopoverMenuItem>
</FileInput>
<PopoverMenuItem @click="setDialogForExport('pptx')">导出文件</PopoverMenuItem> -->
<!-- <PopoverMenuItem @click="resetSlides(); mainMenuVisible = false">重置幻灯片</PopoverMenuItem> -->
<PopoverMenuItem @click="resetSlides(); mainMenuVisible = false">重置幻灯片</PopoverMenuItem>
<!-- <PopoverMenuItem @click="goLink('https://github.com/pipipi-pikachu/PPTist/issues')">意见反馈</PopoverMenuItem> -->
<!-- <PopoverMenuItem @click="goLink('https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md')">常见问题</PopoverMenuItem> -->
<PopoverMenuItem @click="mainMenuVisible = false; hotkeyDrawerVisible = true">快捷操作</PopoverMenuItem>

View File

@ -88,9 +88,7 @@ import Button from '../../../../components/Button.vue'
import ButtonGroup from '../../../../components/ButtonGroup.vue'
import Popover from '../../../../components/Popover.vue'
import NumberInput from '../../../../components/NumberInput.vue'
import { PPTApi } from '../../../../api'
import { Console } from 'node:console'
import { x64 } from 'crypto-js'
const shapeClipPathOptions = CLIPPATHS
const ratioClipOptions = [
{
@ -223,14 +221,10 @@ const presetImageClip = (shape: string, ratio = 0) => {
const replaceImage = (files: FileList) => {
const imageFile = files[0]
if (!imageFile) return
PPTApi.toRousrceUrl(imageFile).then(data=>{
const props = { src: data }
getImageDataURL(imageFile).then(dataURL => {
const props = { src: dataURL }
updateImage(props)
})
// getImageDataURL(imageFile).then(dataURL => {
// const props = { src: dataURL }
// updateImage(props)
// })
}
//

View File

@ -6,21 +6,11 @@
<upvote-vue ref="upvoteRef" type="2"></upvote-vue>
<!-- <div style="z-index: 999;position: absolute;top:10px">
</div> -->
<!-- 推图上屏弹窗 -->
<el-dialog
v-model="dialogVisible"
:fullscreen="true"
class="gridPicRefdiv"
style="overflow: hidden;"
:show-close="false"
>
<grid-pic ref="gridPicRef" style="height:100%;" @clear="clearchidrenPic"></grid-pic>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, ref , nextTick} from 'vue'
import { onMounted, onUnmounted, ref } from 'vue'
import { KEYS } from '../../configs/hotkey'
import useScreening from '../../hooks/useScreening'
import hooksUpvote from '../../api/upvote' // -
@ -28,13 +18,9 @@ import hooksUpvote from '../../api/upvote' // 点赞-工具
import BaseView from './BaseView.vue'
import PresenterView from './PresenterView.vue'
import upvoteVue from '@/views/tool/components/upvote.vue' // -
import gridPic from '@/components/grid-pic/index.vue' //
import emitter from '@/utils/mitt' //mitt 线
const viewMode = ref<'base' | 'presenter'>('base')
const dialogVisible = ref(false)
const gridPicRef:any= ref(null)
const changeViewMode = (mode: 'base' | 'presenter') => {
viewMode.value = mode
}
@ -49,23 +35,6 @@ const keydownListener = (e: KeyboardEvent) => {
if (key === KEYS.ESC) exitScreening()
}
const clearchidrenPic= ()=> {
dialogVisible.value = false
}
//
emitter.on('opengridPic', async (data:object)=> {
if(gridPicRef.value) gridPicRef.value.clearPic()
dialogVisible.value = true
await nextTick();
gridPicRef.value.addPic(data.arr)
});
//
emitter.on('closegridPic', ()=> {
if(!gridPicRef.value) return
gridPicRef.value.clearPic()
dialogVisible.value = false
});
onMounted(() => document.addEventListener('keydown', keydownListener))
onUnmounted(() => document.removeEventListener('keydown', keydownListener))
</script>
@ -77,8 +46,4 @@ onUnmounted(() => document.removeEventListener('keydown', keydownListener))
width: 100%;
height: 100%;
}
:deep(.gridPicRefdiv .el-dialog__body){
height: 100% !important;
}
</style>

View File

@ -80,15 +80,6 @@ export function updateClassworkdata(data) {
})
}
// 批阅后, 待所有学生都批改完成后自动结束当前作业为[已完成]
export function updateClassWorkDataAutoFinish(data) {
return request({
url: '/education/classworkdata/updAutoFinish',
method: 'put',
data: data
})
}
// 修改classwork
export function updateClasswork(data) {
return request({

View File

@ -16,15 +16,15 @@
<draggable handle=".header-btn" :draggable="false" item-key="backgroundColor" v-model="gridPicList" class="grid-pic-wrap" :style="getGrid">
<template #item="{ element, index }">
<div class="grid-pic-item" :key="element.backgroundColor" :style="getWH(element,index)">
<div class="delete-btn" @click="()=>{gridPicList.splice(index,1);if(!gridPicList.length) emits('clear')} ">X</div>
<div class="delete-btn" @click="gridPicList.splice(index,1)">X</div>
<div class="header-btn"></div>
<ViewerItem :gridPicList="gridPicList" :index="index" :images="element"></ViewerItem>
</div>
</template>
</draggable>
<div class="grid-pic-toolbar">
<el-input v-if="showToolbar" style="width: 500px" v-model="inputValue" type="text" />
<el-button v-if="showToolbar" class="add-btn" @click="pushPic">
<div v-if="showToolbar" class="grid-pic-toolbar">
<el-input style="width: 500px" v-model="inputValue" type="text" />
<el-button class="add-btn" @click="pushPic">
添加
</el-button>
<el-button class="add-btn" @click="clearPic">
@ -53,7 +53,7 @@
const props = defineProps({
showToolbar: {
type: Boolean,
default: false
default: true
}
})
//
@ -149,26 +149,20 @@
addPic(src)
}
//
const addPic = (data) => {
let list = Array.isArray(data)?data:[data]
if (gridPicList.value.length + list.length > 9) {
const addPic = (src) => {
if (gridPicList.value.length >= 9) {
console.log("超出九个图片")
emits('outIndex')
return
}
let listArr = [];
for (let i = 0; i < list.length; i++) {
let src = list[i]
if (!src) {
console.log("图片链接不能为空")
return;
}
listArr.push({
gridPicList.value.push({
src: src,
backgroundColor: getRandomColor()
})
}
gridPicList.value.push(...listArr)
inputValue.value = ''
}
//

View File

@ -140,8 +140,5 @@ watch(props.images, (newValue, oldValue) => {
.viewer-item-wrap{
width: 100%;
height: 100%;
:deep(.viewer-canvas img) {
display: block !important;
}
}
</style>

View File

@ -435,7 +435,7 @@ import useUserStore from '@/store/modules/user'
import { ref, reactive } from 'vue'
// import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import { updateClassworkeval, getClassworkdata, updateClassWorkDataAutoFinish } from '@/api/classTask'
import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask'
import { getTimeDate } from '@/utils/date'
import ReFilePreview from '@/components/refile-preview/index.vue'
import { quizStrToList } from '@/utils/comm';
@ -890,7 +890,7 @@ const onSubmit = () => {
updatedate: getTimeDate(),// = year+'-'+month+'-'+day+' '+hh+':'+mm;
};
//
updateClassWorkDataAutoFinish(formd).then(res => {
updateClassworkdata(formd).then(res => {
})
//

View File

@ -25,7 +25,7 @@
<c-form v-bind="classForm">
<template #item_classid="{prop, form}">
<span v-if="dt.ctCourse">{{ dt.ctCourse?.caption }}</span>
<el-select v-else v-model="form[prop]" placeholder="请选择班级" clearable>
<el-select v-else v-model="form[prop]" placeholder="请选择班级">
<el-option v-for="item in listData.classList" :value="item.id"
:label="`${item.caption} (${item.classstudentcount}人)`" />
</el-select>
@ -249,10 +249,10 @@ const getClasscourseList = async type => {
// isPublic
const createClasscourse = async (isPublic = false) => {
const { classid } = classForm.form
// if (!classid) {
// ElMessage.warning('')
// return
// }
if (!classid) {
ElMessage.warning('请选择班级')
return
}
dt.loading = true
const { entpcourseid, evalid, id, coursetitle } = myClassActive.value //
const curDate = commUtil.getDateNow('yyyy-MM-dd')
@ -372,9 +372,9 @@ const openPublicScreen = (classcourse, isPublic) => {
createWindow('open-win', {
url: '/pptist', //
close: () => {
sessionStore.delete('curr.resource') //
sessionStore.delete('curr.classcourse') //
sessionStore.delete('curr.isPublic') //
sessionStore.set('curr.resource', null) //
sessionStore.set('curr.classcourse', null) //
sessionStore.set('curr.isPublic', null) //
}
})
visible.value = false //

View File

@ -10,7 +10,7 @@
<el-dropdown-menu>
<el-dropdown-item @click="createAIPPT">新建文枢课件</el-dropdown-item>
<el-dropdown-item @click="aiTOPPT">AI一键生成</el-dropdown-item>
<!-- <el-dropdown-item @click="openGridPic">打开宫格</el-dropdown-item>-->
<el-dropdown-item @click="openGridPic">打开宫格</el-dropdown-item>
<el-dropdown-item @click="openFilePicker">导入PPT</el-dropdown-item>
<input type="file" ref="fileInput" style="display: none;" @change="handleFileChange" accept="application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation">
</el-dropdown-menu>
@ -497,11 +497,11 @@ export default {
createWindow('open-win', {
url: '/pptist', //
close: () => {
sessionStore.delete('curr.resource') //
sessionStore.set('curr.resource', null) //
if (type=='edit') {
sessionStore.delete('curr.smarttalk') //
sessionStore.set('curr.smarttalk', null) //
this.asyncAllFile() //
} else sessionStore.delete('curr.classcourse') //
} else sessionStore.set('curr.classcourse', null) //
}
})
},

View File

@ -206,7 +206,7 @@ export default {
width: 200px;
height: 200px;
position: relative;
left: 100px;
left: 150px;
overflow: hidden;
border-radius: 50%;
}

View File

@ -6,7 +6,6 @@
append-to-body
@opened="modalOpened"
@close="closeDialog"
width="100px"
>
<CropperImage
ref="cropper"