Compare commits
10 Commits
a34883abbb
...
243561dfd8
Author | SHA1 | Date |
---|---|---|
小杨 | 243561dfd8 | |
zhengdegang | e5bc693f66 | |
zdg | 29888b0674 | |
zdg | 645f9ab120 | |
朱浩 | 74767b44df | |
朱浩 | ef4ec36bbe | |
zdg | c4a15e9c53 | |
yangws | 15b9f38810 | |
zdg | 6a9392d498 | |
zdg | e8ecc27441 |
|
@ -7,11 +7,14 @@ import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||||
import * as useStore from '../store' // pptist-状态管理
|
import * as useStore from '../store' // pptist-状态管理
|
||||||
import ChatWs from '@/plugins/socket' // 聊天socket
|
import ChatWs from '@/plugins/socket' // 聊天socket
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
|
import * as Fullscreen from '../utils/fullscreen' // 全屏
|
||||||
|
import useExecPlay from '../views/Screen/hooks/useExecPlay' // 播放控制
|
||||||
|
|
||||||
const slidesStore = useStore.useSlidesStore() // 幻灯片-状态管理
|
const slidesStore = useStore.useSlidesStore() // 幻灯片-状态管理
|
||||||
const screenStore = useStore.useScreenStore() // 全屏-状态管理
|
const screenStore = useStore.useScreenStore() // 全屏-状态管理
|
||||||
const classcourseStore = useStore.useClasscourseStore() // 课堂信息-状态管理
|
const classcourseStore = useStore.useClasscourseStore() // 课堂信息-状态管理
|
||||||
const classcourse = sessionStore.get('curr.classcourse') // 课堂信息
|
const classcourse = sessionStore.get('curr.classcourse') // 课堂信息
|
||||||
|
const execPlay = useExecPlay() // 播放控制
|
||||||
|
|
||||||
export class Classcourse {
|
export class Classcourse {
|
||||||
msgObj:ElMessageBox = null // 提示消息对象
|
msgObj:ElMessageBox = null // 提示消息对象
|
||||||
|
@ -27,7 +30,9 @@ export class Classcourse {
|
||||||
load() {
|
load() {
|
||||||
console.log('classcourse-load', classcourse)
|
console.log('classcourse-load', classcourse)
|
||||||
// 打开全屏
|
// 打开全屏
|
||||||
screenStore.setScreening(!!classcourse)
|
const isCourse = !!classcourse
|
||||||
|
if (isCourse) Fullscreen.enterFullscreen()
|
||||||
|
screenStore.setScreening(isCourse)
|
||||||
// 如果课堂信息有值,则连接socket
|
// 如果课堂信息有值,则连接socket
|
||||||
if (!!classcourse) {
|
if (!!classcourse) {
|
||||||
// 连接socket
|
// 连接socket
|
||||||
|
@ -36,8 +41,15 @@ export class Classcourse {
|
||||||
this.classcourse = classcourse // 课堂信息
|
this.classcourse = classcourse // 课堂信息
|
||||||
this.id = classcourse.id // 课堂id
|
this.id = classcourse.id // 课堂id
|
||||||
// 如果课堂信息有paging,则更新当前页码
|
// 如果课堂信息有paging,则更新当前页码
|
||||||
const isPaging = !!classcourse.paging||classcourse.paging==0
|
const isPaging = !!classcourse.paging
|
||||||
if (isPaging) slidesStore.updateSlideIndex(classcourse.paging)
|
if (isPaging) slidesStore.updateSlideIndex(classcourse.paging)
|
||||||
|
// 如果课堂信息有paging,则更新动画播放状态
|
||||||
|
const isAnim = !!classcourse.cartoonTimes
|
||||||
|
if (isAnim) { // 动画播放
|
||||||
|
for (let i = 0; i <= classcourse.cartoonTimes; i++) {
|
||||||
|
execPlay.runAnimation(true) // 异步执行动画
|
||||||
|
}
|
||||||
|
}
|
||||||
// 课堂信息-状态管理
|
// 课堂信息-状态管理
|
||||||
classcourseStore.setClasscourse(classcourse)
|
classcourseStore.setClasscourse(classcourse)
|
||||||
// 待上课提示
|
// 待上课提示
|
||||||
|
|
|
@ -12,6 +12,7 @@ import Classcourse from './classcourse' // 课程相关
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
import { Homework } from './index' // api-作业相关
|
import { Homework } from './index' // api-作业相关
|
||||||
import emitter from '@/utils/mitt' //mitt 事件总线
|
import emitter from '@/utils/mitt' //mitt 事件总线
|
||||||
|
import useExecPlay from '../views/Screen/hooks/useExecPlay' // 播放控制
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 监听器
|
* @description 监听器
|
||||||
|
@ -21,6 +22,7 @@ export default () => {
|
||||||
const classcourseStore = store.useClasscourseStore() // 课堂信息-状态管理
|
const classcourseStore = store.useClasscourseStore() // 课堂信息-状态管理
|
||||||
const resource = sessionStore.get('curr.resource') // apt 资源
|
const resource = sessionStore.get('curr.resource') // apt 资源
|
||||||
const smarttalk = sessionStore.get('curr.smarttalk') // 备课资源
|
const smarttalk = sessionStore.get('curr.smarttalk') // 备课资源
|
||||||
|
const execPlay = useExecPlay() // 播放控制
|
||||||
|
|
||||||
// 监听幻灯片内容变化
|
// 监听幻灯片内容变化
|
||||||
watch(() => slidesStore.slides, (newVal, oldVal) => {
|
watch(() => slidesStore.slides, (newVal, oldVal) => {
|
||||||
|
@ -82,8 +84,11 @@ export default () => {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
case MsgEnum.HEADS.MSG_slideFlapping: // 幻灯片翻页
|
||||||
const slideIndex = content.current
|
const slideIndex = content?.current || 0
|
||||||
slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标
|
const type = content?.animation
|
||||||
|
if (type === 'Nextsteps') execPlay.execNext() // 下一步
|
||||||
|
else if (type === 'Previoustep') execPlay.execPrev() // 上一步
|
||||||
|
else slidesStore.updateSlideIndex(slideIndex) // 更新幻灯片下标
|
||||||
break
|
break
|
||||||
case MsgEnum.HEADS.MSG_homework: // 作业|活动-布置
|
case MsgEnum.HEADS.MSG_homework: // 作业|活动-布置
|
||||||
if (!content.classWorkId) return
|
if (!content.classWorkId) return
|
||||||
|
|
|
@ -19,10 +19,10 @@ export default () => {
|
||||||
// 最小已播放页面索引
|
// 最小已播放页面索引
|
||||||
const playedSlidesMinIndex = ref(slideIndex.value)
|
const playedSlidesMinIndex = ref(slideIndex.value)
|
||||||
|
|
||||||
// 执行元素动画
|
// 执行元素动画 isAsync 为 true 时,异步执行,否则同步执行
|
||||||
const runAnimation = () => {
|
const runAnimation = (isAsync: boolean) => {
|
||||||
// 正在执行动画时,禁止其他新的动画开始
|
// 正在执行动画时,禁止其他新的动画开始
|
||||||
if (inAnimation.value) return
|
if (inAnimation.value && !isAsync) return
|
||||||
|
|
||||||
const { animations, autoNext } = formatedAnimations.value[animationIndex.value]
|
const { animations, autoNext } = formatedAnimations.value[animationIndex.value]
|
||||||
animationIndex.value += 1
|
animationIndex.value += 1
|
||||||
|
@ -174,6 +174,7 @@ export default () => {
|
||||||
|
|
||||||
// 鼠标滚动翻页
|
// 鼠标滚动翻页
|
||||||
const mousewheelListener = throttle(function(e: WheelEvent) {
|
const mousewheelListener = throttle(function(e: WheelEvent) {
|
||||||
|
e.preventDefault() // 阻止默认事件
|
||||||
if (e.deltaY < 0) execPrev()
|
if (e.deltaY < 0) execPrev()
|
||||||
else if (e.deltaY > 0) execNext()
|
else if (e.deltaY > 0) execNext()
|
||||||
}, 500, { leading: true, trailing: false })
|
}, 500, { leading: true, trailing: false })
|
||||||
|
@ -182,20 +183,20 @@ export default () => {
|
||||||
const touchInfo = ref<{ x: number; y: number; } | null>(null)
|
const touchInfo = ref<{ x: number; y: number; } | null>(null)
|
||||||
|
|
||||||
const touchStartListener = (e: TouchEvent) => {
|
const touchStartListener = (e: TouchEvent) => {
|
||||||
|
e.preventDefault() // 阻止默认事件
|
||||||
touchInfo.value = {
|
touchInfo.value = {
|
||||||
x: e.changedTouches[0].pageX,
|
// x: e.changedTouches[0].pageX,
|
||||||
y: e.changedTouches[0].pageY,
|
// y: e.changedTouches[0].pageY,
|
||||||
|
x: e.changedTouches[0].clientX,
|
||||||
|
y: e.changedTouches[0].clientY,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const touchEndListener = (e: TouchEvent) => {
|
const touchEndListener = (e: TouchEvent) => {
|
||||||
if (!touchInfo.value) return
|
if (!touchInfo.value) return
|
||||||
|
const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].clientX)
|
||||||
const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].pageX)
|
const offsetY = e.changedTouches[0].clientY - touchInfo.value.y
|
||||||
const offsetY = e.changedTouches[0].pageY - touchInfo.value.y
|
|
||||||
|
|
||||||
if ( Math.abs(offsetY) > offsetX && Math.abs(offsetY) > 50 ) {
|
if ( Math.abs(offsetY) > offsetX && Math.abs(offsetY) > 50 ) {
|
||||||
touchInfo.value = null
|
touchInfo.value = null
|
||||||
|
|
||||||
if (offsetY > 0) execPrev()
|
if (offsetY > 0) execPrev()
|
||||||
else execNext()
|
else execNext()
|
||||||
}
|
}
|
||||||
|
@ -203,6 +204,7 @@ export default () => {
|
||||||
|
|
||||||
// 快捷键翻页
|
// 快捷键翻页
|
||||||
const keydownListener = (e: KeyboardEvent) => {
|
const keydownListener = (e: KeyboardEvent) => {
|
||||||
|
e.preventDefault() // 阻止默认事件
|
||||||
const key = e.key.toUpperCase()
|
const key = e.key.toUpperCase()
|
||||||
|
|
||||||
if (key === KEYS.UP || key === KEYS.LEFT || key === KEYS.PAGEUP) execPrev()
|
if (key === KEYS.UP || key === KEYS.LEFT || key === KEYS.PAGEUP) execPrev()
|
||||||
|
|
|
@ -71,3 +71,11 @@ export const addFileToKj = (id) => {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getModelInfo = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/education/llmModel/getModelInfo',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<el-icon class="item-icon"><Flag /></el-icon>
|
<el-icon class="item-icon"><Flag /></el-icon>
|
||||||
<div class="content-header-title">{{item.name}}</div>
|
<div class="content-header-title">{{item.name}}</div>
|
||||||
<div class="content-header-body">
|
<div class="content-header-body">
|
||||||
<div class="content-header-num">6</div>
|
<div class="content-header-num">{{item.num}}</div>
|
||||||
<div class="content-header-text">分析结果</div>
|
<div class="content-header-text">分析结果</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,7 +83,7 @@ import useUserStore from '@/store/modules/user' // 用户信息
|
||||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
|
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
|
||||||
import FileImage from '@/components/file-image/index.vue'
|
import FileImage from '@/components/file-image/index.vue'
|
||||||
import {creatAPT, getSmarttalkPage} from '@/api/file'
|
import {creatAPT, getSmarttalkPage, getModelInfo} from '@/api/file'
|
||||||
import {ArrowDown, Flag, Position} from '@element-plus/icons-vue'
|
import {ArrowDown, Flag, Position} from '@element-plus/icons-vue'
|
||||||
import {asyncLocalFile, parseCataByNode} from "@/utils/talkFile";
|
import {asyncLocalFile, parseCataByNode} from "@/utils/talkFile";
|
||||||
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
||||||
|
@ -165,9 +165,6 @@ const uploadData = ref({
|
||||||
fileRoot: '备课'
|
fileRoot: '备课'
|
||||||
})
|
})
|
||||||
const currentFileList = ref([])
|
const currentFileList = ref([])
|
||||||
// 页面加载
|
|
||||||
onMounted(() => {
|
|
||||||
})
|
|
||||||
|
|
||||||
const gotoRoute = (item) => {
|
const gotoRoute = (item) => {
|
||||||
if (item.path) {
|
if (item.path) {
|
||||||
|
@ -392,6 +389,35 @@ const changeBook = async(data) => {
|
||||||
uploadData.value.levelSecondId = cata[1]
|
uploadData.value.levelSecondId = cata[1]
|
||||||
uploadData.value.levelThirdId = cata[2]
|
uploadData.value.levelThirdId = cata[2]
|
||||||
uploadData.value.textbookId = data.textBook.curBookId
|
uploadData.value.textbookId = data.textBook.curBookId
|
||||||
|
getModelInfo({cataid: currentNode.value.id}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
if (res&&res.data) {
|
||||||
|
tags.filter(item=>{
|
||||||
|
switch (item.name) {
|
||||||
|
case '课标分析':
|
||||||
|
item.num = res.data.kbs
|
||||||
|
break;
|
||||||
|
case '教材分析':
|
||||||
|
item.num = res.data.jcs
|
||||||
|
break;
|
||||||
|
case '考试分析':
|
||||||
|
item.num = res.data.kss
|
||||||
|
break;
|
||||||
|
case '素材设计':
|
||||||
|
item.num = res.data.scs
|
||||||
|
break;
|
||||||
|
case '作业设计':
|
||||||
|
item.num = res.data.zys
|
||||||
|
break;
|
||||||
|
case '框架设计':
|
||||||
|
item.num = res.data.kjs
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
getSmarttalkPage({
|
getSmarttalkPage({
|
||||||
...uploadData.value,
|
...uploadData.value,
|
||||||
orderByColumn: 'createTime',
|
orderByColumn: 'createTime',
|
||||||
|
@ -469,6 +495,11 @@ const changeClass = async (type, row, other) => {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onMounted(() => {
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.model-wrap{
|
.model-wrap{
|
||||||
|
|
|
@ -1131,6 +1131,7 @@ export default {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
.prepare-center-jxkj{
|
.prepare-center-jxkj{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -33,7 +33,7 @@ const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
||||||
|
|
||||||
//图片裁剪数据
|
//图片裁剪数据
|
||||||
const options = reactive({
|
const options = reactive({
|
||||||
img: userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api + userStore.user.avatar, // 裁剪图片的地址
|
img: userStore.user.avatar ==='/img/avatar-default.jpg' ? defaultUserImg : dev_api.value + userStore.user.avatar, // 裁剪图片的地址
|
||||||
autoCrop: true, // 是否默认生成截图框
|
autoCrop: true, // 是否默认生成截图框
|
||||||
autoCropWidth: 400, // 默认生成截图框宽度
|
autoCropWidth: 400, // 默认生成截图框宽度
|
||||||
autoCropHeight: 400, // 默认生成截图框高度
|
autoCropHeight: 400, // 默认生成截图框高度
|
||||||
|
@ -41,7 +41,6 @@ const options = reactive({
|
||||||
outputType: 'png', // 默认生成截图为PNG格式
|
outputType: 'png', // 默认生成截图为PNG格式
|
||||||
previews: {} //预览数据
|
previews: {} //预览数据
|
||||||
})
|
})
|
||||||
|
|
||||||
const cropper = ref(null)
|
const cropper = ref(null)
|
||||||
|
|
||||||
/** 编辑头像 */
|
/** 编辑头像 */
|
||||||
|
|
|
@ -346,7 +346,7 @@ const toRousrceUrl = async(o) => {
|
||||||
if (o?.background?.image) await toRousrceUrl(o.background.image)
|
if (o?.background?.image) await toRousrceUrl(o.background.image)
|
||||||
if(o?.elements){
|
if(o?.elements){
|
||||||
for (let element of o.elements) {
|
for (let element of o.elements) {
|
||||||
await this.toRousrceUrl(element);
|
await toRousrceUrl(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue