Compare commits
No commits in common. "f035cf87eab720615572948d233b67e8162a31a1" and "e56eb059be2e4cc399dfe99047239f09673a5626" have entirely different histories.
f035cf87ea
...
e56eb059be
|
@ -16,9 +16,4 @@ VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktx
|
||||||
|
|
||||||
VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
|
VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
|
||||||
|
|
||||||
# websocket 地址
|
|
||||||
# VITE_APP_WS_URL = 'wss://file.ysaix.com:7868'
|
|
||||||
VITE_APP_WS_URL = 'ws://192.168.2.16:7865'
|
|
||||||
|
|
||||||
# 是否显示开发工具
|
|
||||||
VITE_SHOW_DEV_TOOLS = 'true'
|
VITE_SHOW_DEV_TOOLS = 'true'
|
||||||
|
|
|
@ -18,8 +18,4 @@ VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktx
|
||||||
|
|
||||||
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
|
||||||
|
|
||||||
# websocket 地址
|
|
||||||
VITE_APP_WS_URL = 'wss://file.ysaix.com:7868'
|
|
||||||
|
|
||||||
# 是否显示开发工具
|
|
||||||
VITE_SHOW_DEV_TOOLS = 'false'
|
VITE_SHOW_DEV_TOOLS = 'false'
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
declare module '*.vue' {
|
|
||||||
import { ComponentOptions } from 'vue'
|
|
||||||
const componentOptions: ComponentOptions
|
|
||||||
export default componentOptions
|
|
||||||
}
|
|
|
@ -28,7 +28,6 @@ import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关ap
|
||||||
import { PPTApi } from './api'
|
import { PPTApi } from './api'
|
||||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||||
import './api/watcher' // 监听
|
import './api/watcher' // 监听
|
||||||
import './api/classcourse' // 课程相关
|
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const _isPC = isPC()
|
const _isPC = isPC()
|
||||||
|
@ -82,8 +81,5 @@ const initLoad: Function = () => {
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
#app {
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
svg, canvas, img, audio, video, iframe {
|
|
||||||
display: unset;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
* @author zdg
|
|
||||||
* @description 上课相关内容
|
|
||||||
*/
|
|
||||||
import type { Classcourse } from './types'
|
|
||||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
|
||||||
import * as useStore from '../store' // pptist-状态管理
|
|
||||||
import { ChatWs } from '@/plugins/socket' // 聊天socket
|
|
||||||
const screenStore = useStore.useScreenStore() // 全屏-状态管理
|
|
||||||
const classcourseStore = useStore.useClasscourseStore() // 课堂信息-状态管理
|
|
||||||
const classcourse: Classcourse = sessionStore.get('curr.classcourse') // 课堂信息
|
|
||||||
|
|
||||||
// 如果课堂信息有值,则连接socket
|
|
||||||
if (!!classcourse) {
|
|
||||||
// 连接socket
|
|
||||||
const ws = new ChatWs()
|
|
||||||
console.log('ws- ',ws)
|
|
||||||
// ChatWs.connect(classcourse.id)
|
|
||||||
classcourseStore.setClasscourse(classcourse)
|
|
||||||
}
|
|
||||||
// 打开全屏
|
|
||||||
screenStore.setScreening(!!classcourse)
|
|
|
@ -137,15 +137,13 @@ export class PPTApi {
|
||||||
id: currentSlide.id,
|
id: currentSlide.id,
|
||||||
datacontent: JSON.stringify(currentSlide),
|
datacontent: JSON.stringify(currentSlide),
|
||||||
}
|
}
|
||||||
Utils.mxThrottle(() => {this.updateSlide(params)}, 200, 2)
|
Utils.mxThrottle(() => {this.updateSlide(params)}, 1000, 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 更新幻灯片
|
// 更新幻灯片
|
||||||
static updateSlide(data: object): Promise<Boolean> {
|
static updateSlide(data: object): Promise<Boolean> {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const res: Result = await API_entpcoursefile.updateEntpcoursefileNew(data)
|
const res: Result = await API_entpcoursefile.updateEntpcoursefileNew(data)
|
||||||
console.log(data,'data');
|
|
||||||
console.log(res,'dresata');
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
resolve(true)
|
resolve(true)
|
||||||
} else msgUtils.msgError(res.msg || '更新失败');resolve(false)
|
} else msgUtils.msgError(res.msg || '更新失败');resolve(false)
|
||||||
|
|
|
@ -5,20 +5,4 @@ export interface Result {
|
||||||
data?: any
|
data?: any
|
||||||
rows?: Array<any>,
|
rows?: Array<any>,
|
||||||
total?: number
|
total?: number
|
||||||
}
|
|
||||||
|
|
||||||
/** 课程信息 */
|
|
||||||
export interface Classcourse {
|
|
||||||
id?: number|string, // 课程id
|
|
||||||
coursetitle?: string, // 课程名称
|
|
||||||
coursetype?: string, // 课程类型
|
|
||||||
courseverid?: string, // 课程版本id
|
|
||||||
coursedesc?: string, // 课程描述
|
|
||||||
status?: number, // 课程状态
|
|
||||||
teacherid?: number|string, // 教师id
|
|
||||||
entpcoursefileid?: number|string, // 课程文件id
|
|
||||||
classid?: number|string, // 班级id
|
|
||||||
entpcourseid?: number|string, // 章节中间表id
|
|
||||||
plandate?: string, // 计划时间
|
|
||||||
opendate?: string, // 开课时间
|
|
||||||
}
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
import { useScreenStore, useSlidesStore, useClasscourseStore } from '../store'
|
import { useScreenStore, useSlidesStore } from '../store'
|
||||||
import { enterFullscreen, exitFullscreen, isFullscreen } from '../utils/fullscreen'
|
import { enterFullscreen, exitFullscreen, isFullscreen } from '../utils/fullscreen'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const screenStore = useScreenStore()
|
const screenStore = useScreenStore()
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const classcourseStore = useClasscourseStore() // 课堂信息
|
|
||||||
|
|
||||||
// 进入放映状态(从当前页开始)
|
// 进入放映状态(从当前页开始)
|
||||||
const enterScreening = () => {
|
const enterScreening = () => {
|
||||||
|
@ -20,11 +19,7 @@ export default () => {
|
||||||
|
|
||||||
// 退出放映状态
|
// 退出放映状态
|
||||||
const exitScreening = () => {
|
const exitScreening = () => {
|
||||||
const classcourse = classcourseStore.classcourse
|
screenStore.setScreening(false)
|
||||||
if (!!classcourse) { //DOTO 有课堂,执行退相关操作
|
|
||||||
console.log('退出放映状态')
|
|
||||||
window.close()
|
|
||||||
} else screenStore.setScreening(false)
|
|
||||||
if (isFullscreen()) exitFullscreen()
|
if (isFullscreen()) exitFullscreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,8 +125,7 @@ import {
|
||||||
User,
|
User,
|
||||||
Switch,
|
Switch,
|
||||||
More,
|
More,
|
||||||
Material,
|
Material
|
||||||
AddPicture
|
|
||||||
} from '@icon-park/vue-next'
|
} from '@icon-park/vue-next'
|
||||||
|
|
||||||
export interface Icons {
|
export interface Icons {
|
||||||
|
@ -257,8 +256,7 @@ export const icons: Icons = {
|
||||||
IconUser: User,
|
IconUser: User,
|
||||||
IconSwitch: Switch,
|
IconSwitch: Switch,
|
||||||
IconMore: More,
|
IconMore: More,
|
||||||
IconMaterial: Material,
|
IconMaterial: Material
|
||||||
IconAddPicture: AddPicture
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
import type { Classcourse } from '../api/types'
|
|
||||||
|
|
||||||
export interface ClasscourseState {
|
|
||||||
classcourse: Classcourse
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useClasscourseStore = defineStore('classcourse', {
|
|
||||||
state: (): ClasscourseState => ({
|
|
||||||
classcourse: null, // 课堂信息
|
|
||||||
}),
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
setClasscourse(classcourse: Classcourse) {
|
|
||||||
this.classcourse = classcourse
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -3,7 +3,6 @@ import { useSlidesStore } from './slides'
|
||||||
import { useSnapshotStore } from './snapshot'
|
import { useSnapshotStore } from './snapshot'
|
||||||
import { useKeyboardStore } from './keyboard'
|
import { useKeyboardStore } from './keyboard'
|
||||||
import { useScreenStore } from './screen'
|
import { useScreenStore } from './screen'
|
||||||
import { useClasscourseStore } from './classcourse'
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
useMainStore,
|
useMainStore,
|
||||||
|
@ -11,5 +10,4 @@ export {
|
||||||
useSnapshotStore,
|
useSnapshotStore,
|
||||||
useKeyboardStore,
|
useKeyboardStore,
|
||||||
useScreenStore,
|
useScreenStore,
|
||||||
useClasscourseStore,
|
|
||||||
}
|
}
|
|
@ -11,7 +11,6 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="onInsert(item)">插入</el-button>
|
<el-button type="primary" @click="onInsert(item)">插入</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-empty description="暂无素材" v-if="!list.length" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -94,9 +93,11 @@ const GetUrlParameters = (parameters) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return resData;
|
return resData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const proxyToBase64 = (url)=> {
|
const proxyToBase64 = (url)=> {
|
||||||
const dourl = GetUrlParameters(url)
|
const dourl = GetUrlParameters(url)
|
||||||
console.log(dourl,'dourl')
|
console.log(dourl,'dourl')
|
||||||
|
|
|
@ -83,7 +83,6 @@
|
||||||
</Popover>
|
</Popover>
|
||||||
<IconPreviewOpen class="handler-item" v-tooltip="'插入试题'" @click="classWorkTaskVisible = true" />
|
<IconPreviewOpen class="handler-item" v-tooltip="'插入试题'" @click="classWorkTaskVisible = true" />
|
||||||
<IconMaterial class="handler-item" v-tooltip="'插入素材'" @click="materiaVisible = true"/>
|
<IconMaterial class="handler-item" v-tooltip="'插入素材'" @click="materiaVisible = true"/>
|
||||||
<IconAddPicture class="handler-item" v-tooltip="'文生图'" @click="imgVisible = true" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-handler">
|
<div class="right-handler">
|
||||||
|
@ -122,18 +121,14 @@
|
||||||
@update="data => { onhtml2canvas(data); classWorkTaskVisible = false }"
|
@update="data => { onhtml2canvas(data); classWorkTaskVisible = false }"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--插入素材-->
|
|
||||||
<Modal
|
<Modal
|
||||||
v-model:visible="materiaVisible"
|
v-model:visible="materiaVisible"
|
||||||
:width="880">
|
:width="880">
|
||||||
<MaterialDialog @close="materiaVisible = false" @insertMaterial="insertMaterial"/>
|
<MaterialDialog @close="materiaVisible = false" @insertMaterial="insertMaterial"/>
|
||||||
</Modal>
|
</Modal>
|
||||||
<!--文生图-->
|
|
||||||
<Modal
|
|
||||||
v-model:visible="imgVisible"
|
|
||||||
:width="1300">
|
|
||||||
<TextCreateImg hasPPt @insertImg="(url: string) => { createImageElement(url); imgVisible = false }" />
|
|
||||||
</Modal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -162,8 +157,6 @@ import PopoverMenuItem from '../../../components/PopoverMenuItem.vue'
|
||||||
import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
|
import QuestToPPTist from '@/views/classTask/newClassTaskAssign/questToPPTist/index.vue'
|
||||||
import MaterialDialog from './MaterialDialog.vue'
|
import MaterialDialog from './MaterialDialog.vue'
|
||||||
import { PPTApi } from '../../../api'
|
import { PPTApi } from '../../../api'
|
||||||
import TextCreateImg from '@/components/ai-kolors/index.vue'
|
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
const { creatingElement, creatingCustomShape, showSelectPanel, showSearchPanel, showNotesPanel } = storeToRefs(mainStore)
|
||||||
const { canUndo, canRedo } = storeToRefs(useSnapshotStore())
|
const { canUndo, canRedo } = storeToRefs(useSnapshotStore())
|
||||||
|
@ -283,10 +276,8 @@ const insertMaterial = (item: MaterialParams) =>{
|
||||||
createImageElement(data)
|
createImageElement(data)
|
||||||
}
|
}
|
||||||
materiaVisible.value = false
|
materiaVisible.value = false
|
||||||
}
|
|
||||||
|
|
||||||
// 文生图
|
}
|
||||||
const imgVisible = ref(false)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -162,10 +162,6 @@ const setDialogForExport = (type: DialogForExportTypes) => {
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
:deep(svg) {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
|
|
||||||
<div class="page-number">幻灯片 {{slideIndex + 1}} / {{slides.length}}</div>
|
<div class="page-number">幻灯片 {{slideIndex + 1}} / {{slides.length}}</div>
|
||||||
|
|
||||||
|
<!-- 引入活动的列表页面 -->
|
||||||
|
<Active ref="activeRef" v-show="false"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -86,6 +88,7 @@ import ThumbnailSlide from '../../../views/components/ThumbnailSlide/index.vue'
|
||||||
import LayoutPool from './LayoutPool.vue'
|
import LayoutPool from './LayoutPool.vue'
|
||||||
import Popover from '../../../components/Popover.vue'
|
import Popover from '../../../components/Popover.vue'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
|
import Active from '../Toolbar/ElementStylePanel/Active/index.vue'
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
|
@ -124,6 +127,7 @@ const {
|
||||||
updateSectionTitle,
|
updateSectionTitle,
|
||||||
} = useSectionHandler()
|
} = useSectionHandler()
|
||||||
|
|
||||||
|
const activeRef = ref()
|
||||||
|
|
||||||
// 页面被切换时
|
// 页面被切换时
|
||||||
const thumbnailsRef = ref<InstanceType<typeof Draggable>>()
|
const thumbnailsRef = ref<InstanceType<typeof Draggable>>()
|
||||||
|
@ -147,6 +151,8 @@ watch(() => slideIndex.value, () => {
|
||||||
|
|
||||||
// 切换页面
|
// 切换页面
|
||||||
const changeSlideIndex = (index: number) => {
|
const changeSlideIndex = (index: number) => {
|
||||||
|
console.log(workItem.value[index],'hasSection');
|
||||||
|
activeRef.value.clickPPTList(workItem.value[index])
|
||||||
|
|
||||||
mainStore.setActiveElementIdList([])
|
mainStore.setActiveElementIdList([])
|
||||||
|
|
||||||
|
@ -396,17 +402,12 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
:deep(svg) {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.thumbnail-list {
|
.thumbnail-list {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-bottom: 1px solid $borderColor;
|
|
||||||
}
|
}
|
||||||
.thumbnail-item {
|
.thumbnail-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -485,6 +486,7 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
|
||||||
.page-number {
|
.page-number {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
border-top: 1px solid $borderColor;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
|
@ -32,12 +32,12 @@
|
||||||
<!-- 作业列表 -->
|
<!-- 作业列表 -->
|
||||||
<div class="c-apt-r">
|
<div class="c-apt-r">
|
||||||
<!-- 显示-作业内容 -->
|
<!-- 显示-作业内容 -->
|
||||||
<template v-for="(item, index) in workList" :key="index">
|
<template v-for="(item, index) in workList">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="item-title">
|
<div class="item-title">
|
||||||
<el-tag :type="getTagType(item.worktype) || 'primary'">{{item.worktype}}</el-tag>
|
<el-tag :type="getTagType(item.worktype) || 'primary'">{{item.worktype}}</el-tag>
|
||||||
<el-tooltip :content="item.evaltitle" placement="top">
|
<el-tooltip :content="item.title||item.uniquekey" placement="top">
|
||||||
<div class="tt">{{item.evaltitle}}</div>
|
<div class="tt">{{item.title||item.uniquekey}}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button class="btn-del" type="danger" link @click="handleRemoveDemoActivityClassWork(item)">删除</el-button>
|
<el-button class="btn-del" type="danger" link @click="handleRemoveDemoActivityClassWork(item)">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,10 +45,8 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<!-- // 推送作业 -->
|
<!-- // 推送作业 -->
|
||||||
<el-dialog v-model="dialogVisible" append-to-body :show-close="false" width="80%" height="500">
|
<el-dialog v-model="dialogVisible" append-to-body :show-close="false" width="80%">
|
||||||
<el-scrollbar height="500">
|
<NewClassTsakAssign :currentCourse='currentCourse'/>
|
||||||
<NewClassTsakAssign :currentCourse='currentCourse' @getData="getData" />
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 活动引用 -->
|
<!-- 活动引用 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
@ -57,9 +55,9 @@
|
||||||
append-to-body
|
append-to-body
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
width="40%"
|
width="40%"
|
||||||
>
|
@selection-change="handleSelectionChange">
|
||||||
<el-table :data="taskList" style="width: 100%" height="500" @selection-change="handleSelectionChange">
|
<el-table :data="taskList" style="width: 100%" height="500">
|
||||||
<el-table-column type="selection" width="55" :selectable="selectable"/>
|
<el-table-column type="selection" :selectable="selectable" width="55" />
|
||||||
<el-table-column prop="evaltitle" label="活动名称" width="150" />
|
<el-table-column prop="evaltitle" label="活动名称" width="150" />
|
||||||
<el-table-column prop="worktype" label="活动类型" width="120" sortable>
|
<el-table-column prop="worktype" label="活动类型" width="120" sortable>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -70,246 +68,160 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="activeVisible = false">取 消</el-button>
|
<el-button @click="activeVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="savePPtData">确 定</el-button>
|
<el-button type="primary" @click="save">确 定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { ref, reactive, onMounted, nextTick, watch } from 'vue'
|
import { ref, reactive, onMounted, onBeforeMount, defineExpose } from 'vue'
|
||||||
import Divider from '../../../../../components/Divider.vue'
|
import Divider from '../../../../../components/Divider.vue'
|
||||||
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
|
import {listEntpcoursefile} from '@/api/education/entpcoursefile'
|
||||||
import { homeworklist } from '@/api/teaching/classwork'
|
import {homeworklist} from '@/api/teaching/classwork'
|
||||||
import { processList } from "@/hooks/useProcessList";
|
import { processList } from "@/hooks/useProcessList";
|
||||||
import { listEntpcoursework } from "@/api/classTask/index";
|
import { listEntpcoursework } from "@/api/classTask/index";
|
||||||
import { ElMessageBox,ElMessage } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
import NewClassTsakAssign from '@/views/classTask/newClassTaskAssign/index.vue'
|
import NewClassTsakAssign from '@/views/classTask/newClassTaskAssign/index.vue'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { PPTApi } from '../../../../../api/index'
|
const currentCourse = reactive({
|
||||||
import { storeToRefs } from 'pinia'
|
textbookId:0,
|
||||||
import {useSlidesStore} from '../../../../../store'
|
levelFirstId:0,
|
||||||
const slidesStore = useSlidesStore()
|
levelSecondId:0,
|
||||||
const { slides, slideIndex, currentSlide, workItem } = storeToRefs(slidesStore)
|
coursetitle:'',
|
||||||
|
node:{},
|
||||||
interface CourseNode {
|
id:1,
|
||||||
rootid: number;
|
worktype:'',
|
||||||
parentNode: { id: number };
|
|
||||||
id: number;
|
|
||||||
itemtitle: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CurrentCourse {
|
|
||||||
textbookId: number;
|
|
||||||
levelFirstId: number;
|
|
||||||
levelSecondId: number;
|
|
||||||
coursetitle: string;
|
|
||||||
node: CourseNode;
|
|
||||||
id: number;
|
|
||||||
worktype: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Params {
|
|
||||||
parentid: number;
|
|
||||||
pageSize: number;
|
|
||||||
orderby: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WorkType {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WorkItem {
|
|
||||||
status: string;
|
|
||||||
activityContent?: string;
|
|
||||||
worktype: string;
|
|
||||||
quizlist?: { id: number }[];
|
|
||||||
workcodes: string;
|
|
||||||
base64?: string;
|
|
||||||
prevData?: any;
|
|
||||||
id: number;
|
|
||||||
evaltitle?: string; // 添加 evaltitle 属性
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentCourse = reactive<CurrentCourse>({
|
|
||||||
textbookId: 0,
|
|
||||||
levelFirstId: 0,
|
|
||||||
levelSecondId: 0,
|
|
||||||
coursetitle: '',
|
|
||||||
node: {} as CourseNode,
|
|
||||||
id: 1,
|
|
||||||
worktype: '',
|
|
||||||
})
|
})
|
||||||
|
const dataList = ref([])
|
||||||
const dataList = ref<WorkItem[]>([])
|
const dialogVisible = ref(false)
|
||||||
const dialogVisible = ref<boolean>(false)
|
const tasklist_loading = ref(false)
|
||||||
const tasklist_loading = ref<boolean>(false)
|
|
||||||
|
|
||||||
// 活动列表
|
// 活动列表
|
||||||
const taskList = ref<WorkItem[]>([])
|
const taskList = ref([])
|
||||||
|
|
||||||
// 活动引用的弹窗
|
// 活动引用的弹窗
|
||||||
const activeVisible = ref<boolean>(false)
|
const activeVisible = ref(false)
|
||||||
|
const params = reactive({
|
||||||
const params = reactive<Params>({
|
parentid:14766,
|
||||||
parentid: 14766,
|
pageSize:500,
|
||||||
pageSize: 500,
|
orderby:'fileidx'
|
||||||
orderby: 'fileidx'
|
|
||||||
})
|
})
|
||||||
|
const type = ref([
|
||||||
const type = ref<WorkType[]>([
|
|
||||||
{
|
{
|
||||||
label: '习题训练',
|
label:'习题训练',
|
||||||
value: 'danger'
|
value:'danger'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '课堂展示',
|
label:'课堂展示',
|
||||||
value: 'success'
|
value:'success'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '常规作业',
|
label:'常规作业',
|
||||||
value: 'primary'
|
value:'primary'
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const objItem = ref<any>({})
|
|
||||||
// 作业列表
|
// 作业列表
|
||||||
const workList = ref<WorkItem[]>([])
|
const workList = ref([])
|
||||||
|
const selectable = (row,index) => {
|
||||||
// 获取所选择的作业列表
|
console.log(row,index,'row,index');
|
||||||
const selectedWorkList = ref<WorkItem[]>([])
|
return true
|
||||||
|
|
||||||
|
|
||||||
const paramData = ref<{ id: number, activityContent: string }>({} as { id: number, activityContent: string })
|
|
||||||
|
|
||||||
const selectable = (row: WorkItem, index: number): boolean => {
|
|
||||||
return row.status === '10';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const formatClassWorkFile = async (postData: WorkItem[]): Promise<void> => {
|
|
||||||
for (let i = 0; i < postData.length; i++) {
|
|
||||||
let item = postData[i];
|
|
||||||
switch (item.worktype) {
|
|
||||||
case '框架梳理': {
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '习题训练': {
|
|
||||||
console.log(item,'item');
|
|
||||||
// let workIds = item.quizlist!.map(items => items.id).join(',');
|
|
||||||
// let ress = await listEntpcoursework({ ids: workIds });
|
|
||||||
// const arr = ress.rows.map((item:{id:number}) => {
|
|
||||||
// return item.id
|
|
||||||
// })
|
|
||||||
|
|
||||||
// processList(ress.rows);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '课堂展示': {
|
|
||||||
// item.base64 = JSON.parse(item.workcodes).base64;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '常规作业': {
|
|
||||||
// item.prevData = JSON.parse(item.workcodes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const arr = paramData.value.activityContent.split(',')
|
|
||||||
arr.push(item.id.toString())
|
|
||||||
await PPTApi.updateSlide(paramData.value)
|
|
||||||
addWorkList(item)
|
|
||||||
}
|
|
||||||
await nextTick();
|
|
||||||
}
|
}
|
||||||
// 添加的活动回显到页面上面去
|
|
||||||
const addWorkList = (item: WorkItem) => {
|
const clickPPTList = (item) => {
|
||||||
workList.value.push(item)
|
console.log(item,'点击了')
|
||||||
|
workList.value = []
|
||||||
|
let datacontent = item.datacontent;
|
||||||
|
let pptJson = "";
|
||||||
|
if(typeof datacontent === 'string') pptJson = JSON.parse(datacontent)
|
||||||
|
if(pptJson&&pptJson[0]&&pptJson[0].classworkList) {
|
||||||
|
homeworklist({ids:pptJson[0].classworkList, pageSize: 100}).then( async res => {
|
||||||
|
await formatClassWorkFile(res.rows)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const formatClassWorkFile = async (postData) => {
|
||||||
|
return new Promise(async (resolve, reject)=>{
|
||||||
|
for (let i = 0; i < postData.length; i++) {
|
||||||
|
let item = postData[i];
|
||||||
|
switch (item.worktype) {
|
||||||
|
case '框架梳理': {
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '习题训练': {
|
||||||
|
item.entpcourseworklistarray = item.entpcourseworklist?JSON.parse('['+item.entpcourseworklist+']'):[];
|
||||||
|
let workIds = item.entpcourseworklistarray.map(items=>items.id).join(',')
|
||||||
|
let ress = await listEntpcoursework({ids:workIds})
|
||||||
|
processList(ress.rows)
|
||||||
|
item.workShowList = ress.rows
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '课堂展示': {
|
||||||
|
item.base64 = JSON.parse(item.workcodes).base64
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '常规作业': {
|
||||||
|
item.prevData = JSON.parse(item.workcodes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
workList.value.push(item)
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 删除作业
|
// 删除作业
|
||||||
const handleRemoveDemoActivityClassWork = (item: WorkItem) => {
|
const handleRemoveDemoActivityClassWork = (item) => {
|
||||||
ElMessageBox.confirm('是否确认删除?')
|
ElMessageBox.confirm('是否确认删除?')
|
||||||
.then(() => {
|
.then(function () {
|
||||||
workList.value.splice(workList.value.indexOf(item), 1);
|
workList.value.splice(workList.value.indexOf(item), 1);
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取tag的样式
|
// 获取tag的样式
|
||||||
const getTagType = (worktype: string): string => {
|
const getTagType = (worktype) => {
|
||||||
return type.value.find(item => item.label === worktype)!.value
|
return type.value.find(item => item.label == worktype).value
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取活动引用的列表数据
|
// 获取活动引用的列表数据
|
||||||
const initHomeWork = async () => {
|
const initHomeWork = async()=> {
|
||||||
tasklist_loading.value = true;
|
tasklist_loading.value = true;
|
||||||
const { res, chapterId } = await useGetHomework(sessionStore.get('subject.curNode'));
|
const { res, chapterId } = await useGetHomework(sessionStore.get('subject.curNode'));
|
||||||
taskList.value = res;
|
taskList.value = res;
|
||||||
tasklist_loading.value = false;
|
tasklist_loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选活动引用
|
// 多选活动引用
|
||||||
const handleSelectionChange = (val: WorkItem[]) => {
|
const handleSelectionChange = (val) => {
|
||||||
selectedWorkList.value = [...val]
|
console.log(val,'多选')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开添加作业活动
|
// 打开添加作业活动
|
||||||
const showDialog = (item: string) => {
|
const showDialog = (item) => {
|
||||||
currentCourse.worktype = item
|
currentCourse.worktype = item
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const openList = () => {
|
const openList = () => {
|
||||||
activeVisible.value = true
|
activeVisible.value = true
|
||||||
initHomeWork()
|
initHomeWork()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加活动引用列表作业
|
// 添加活动引用列表作业
|
||||||
const savePPtData = async () => {
|
const save = () => {
|
||||||
if (selectedWorkList.value.length === 0) {
|
console.log('添加了')
|
||||||
ElMessage.warning('请选择活动')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const arr = selectedWorkList.value.map(item => item.id)
|
|
||||||
// 应该是新加而不是覆盖
|
|
||||||
paramData.value.activityContent = arr.join(',')
|
|
||||||
await PPTApi.updateSlide(paramData.value)
|
|
||||||
activeVisible.value = false
|
activeVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const curNode = sessionStore.get('subject.curNode') as CourseNode
|
// console.log(sessionStore.get('subject.curBook'),'curBook');
|
||||||
|
// console.log(sessionStore.get('subject.subjectTree'),'subjectTree');
|
||||||
|
// console.log(sessionStore.get('subject.bookList'),'bookList');
|
||||||
|
console.log(sessionStore.get('subject.curNode'),'curNode');
|
||||||
|
const curNode = sessionStore.get('subject.curNode')
|
||||||
currentCourse.textbookId = curNode.rootid
|
currentCourse.textbookId = curNode.rootid
|
||||||
currentCourse.levelFirstId = curNode.parentNode.id
|
currentCourse.levelFirstId = curNode.parentNode.id
|
||||||
currentCourse.levelSecondId = curNode.id
|
currentCourse.levelSecondId = curNode.id
|
||||||
currentCourse.coursetitle = curNode.itemtitle
|
currentCourse.coursetitle = curNode.itemtitle,
|
||||||
currentCourse.node = curNode
|
currentCourse.node = curNode
|
||||||
listEntpcoursefile(params).then((res: { rows: WorkItem[] }) => {
|
listEntpcoursefile(params).then((res) => {
|
||||||
dataList.value = [...res.rows]
|
dataList.value = [...res.rows]
|
||||||
})
|
})
|
||||||
objItem.value = workItem.value[slideIndex.value]
|
|
||||||
getCurrentPPtData()
|
|
||||||
})
|
})
|
||||||
watch(() => slideIndex.value, () => {
|
defineExpose({
|
||||||
getCurrentPPtData()
|
clickPPTList
|
||||||
})
|
})
|
||||||
// 获取当前ppt页的数据
|
|
||||||
const getCurrentPPtData = async () => {
|
|
||||||
workList.value = []
|
|
||||||
objItem.value = workItem.value[slideIndex.value]
|
|
||||||
paramData.value.id = objItem.value.id
|
|
||||||
if (objItem.value?.activityContent) {
|
|
||||||
paramData.value.activityContent = objItem.value?.activityContent
|
|
||||||
const res = await homeworklist({ ids: objItem.value?.activityContent, pageSize: 100 })
|
|
||||||
await formatClassWorkFile(res.rows)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 接收习题训练的值
|
|
||||||
const getData = async (data: WorkItem) => {
|
|
||||||
console.log(data, 'data')
|
|
||||||
await formatClassWorkFile([data])
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.buttonDiv{
|
.buttonDiv{
|
||||||
|
|
|
@ -154,13 +154,15 @@ const topImgWrapperPositionStyle = computed(() => {
|
||||||
const topImgPositionStyle = computed(() => {
|
const topImgPositionStyle = computed(() => {
|
||||||
const bottomWidth = imgPosition.value.width
|
const bottomWidth = imgPosition.value.width
|
||||||
const bottomHeight = imgPosition.value.height
|
const bottomHeight = imgPosition.value.height
|
||||||
|
console.log("底层图片位置大小(遮罩区域图片)", imgPosition.value)
|
||||||
|
|
||||||
const { top, left, width, height } = topImgWrapperPosition.value
|
const { top, left, width, height } = topImgWrapperPosition.value
|
||||||
|
console.log("width", ((bottomWidth / width * 100) - (left * (100 / width))) + '%')
|
||||||
|
console.log("height", bottomHeight / height * 100 + '%')
|
||||||
return {
|
return {
|
||||||
left: -left * (100 / width) + '%',
|
left: -left * (100 / width) + '%',
|
||||||
top: -top * (100 / height) + '%',
|
top: -top * (100 / height) + '%',
|
||||||
width: bottomWidth / width * 100 + '%' ,
|
width: ((bottomWidth / width * 100) - (left * (100 / width))) + '%' ,
|
||||||
height: bottomHeight / height * 100 + '%',
|
height: bottomHeight / height * 100 + '%',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -538,7 +540,6 @@ const edgePoints = [
|
||||||
|
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
max-width: none !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,6 @@ const handleClip = (data: ImageClipedEmitData | null) => {
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
max-width: none !important; // 防止图片被压缩
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.color-mask {
|
.color-mask {
|
||||||
|
|
|
@ -144,14 +144,8 @@ import { convertTextToPicture, getQueue, getPromptId, getPicture, chattoprompt,
|
||||||
import CryptoJS from 'crypto-js'
|
import CryptoJS from 'crypto-js'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
|
||||||
hasPPt: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
ratio: "512",
|
ratio: "512",
|
||||||
|
@ -390,7 +384,7 @@ export default {
|
||||||
urls.push(url0)
|
urls.push(url0)
|
||||||
buttonState.push({
|
buttonState.push({
|
||||||
disabled: false,
|
disabled: false,
|
||||||
text: this.hasPPt ? '插入' : "插入本课素材资源库",
|
text: "插入本课素材资源库",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.skeletonNumber = 0
|
this.skeletonNumber = 0
|
||||||
|
@ -482,10 +476,6 @@ export default {
|
||||||
|
|
||||||
//保存图片到素材库
|
//保存图片到素材库
|
||||||
async saveImage(resultIndex, index, url, resultItem) {
|
async saveImage(resultIndex, index, url, resultItem) {
|
||||||
if(this.hasPPt){
|
|
||||||
this.$emit('insertImg', url)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.buttonStates[resultIndex][index].disabled = true;
|
this.buttonStates[resultIndex][index].disabled = true;
|
||||||
this.buttonStates[resultIndex][index].text = "正在保存...";
|
this.buttonStates[resultIndex][index].text = "正在保存...";
|
||||||
const numberIndex = url.indexOf('filename=');
|
const numberIndex = url.indexOf('filename=');
|
||||||
|
|
|
@ -35,7 +35,7 @@ const getFileTypeIcon = () => {
|
||||||
txt: 'icon-txt',
|
txt: 'icon-txt',
|
||||||
rar: 'icon-rar',
|
rar: 'icon-rar',
|
||||||
apt: 'icon-A',
|
apt: 'icon-A',
|
||||||
aippt: 'icon-A',
|
aptist: 'icon-A',
|
||||||
}
|
}
|
||||||
if (iconObj[name]) {
|
if (iconObj[name]) {
|
||||||
return '#' + iconObj[name]
|
return '#' + iconObj[name]
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="verson">V{{ version }}</div>
|
<div class="verson">V{{ version }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -87,12 +87,6 @@ const headerMenus = [
|
||||||
icon: 'icon-gongzuotai',
|
icon: 'icon-gongzuotai',
|
||||||
path: '/desktop'
|
path: '/desktop'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: '教学实践',
|
|
||||||
id: 4,
|
|
||||||
icon: 'icon-jiaoxueshijian',
|
|
||||||
path: '/prepare'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: '资源中心',
|
name: '资源中心',
|
||||||
id: 3,
|
id: 3,
|
||||||
|
@ -132,12 +126,12 @@ const computedregistertype = computed(() => {
|
||||||
if(type==3 && userStore.DeptInfo.register.auditStatus==0){
|
if(type==3 && userStore.DeptInfo.register.auditStatus==0){
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建学校 待审核
|
// 创建学校 待审核
|
||||||
if(type==4 && userStore.DeptInfo.register.auditStatus==0){
|
if(type==4 && userStore.DeptInfo.register.auditStatus==0){
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
const clickMenu = ({ id, disabled, path }) => {
|
const clickMenu = ({ id, disabled, path }) => {
|
||||||
if (disabled) return
|
if (disabled) return
|
||||||
|
@ -199,7 +193,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
.popoverStyle .head-aside{
|
.popoverStyle .head-aside{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -252,7 +246,7 @@ onMounted(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
.user-img{
|
.user-img{
|
||||||
width: 56px;
|
width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -318,4 +312,4 @@ onMounted(() => {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,164 +0,0 @@
|
||||||
/**
|
|
||||||
* websocket 工具类(im 自己实现)
|
|
||||||
* 单例模式: 保证一个类仅有一个实例,并提供一个访问它的全局访问点。
|
|
||||||
* 实现的方法为先判断实例存在与否,如果存在则直接返回,不存在就创建了再返回,这就确保了一个类只有一个实例对象。
|
|
||||||
*/
|
|
||||||
import useUserStore from '@/store/modules/user' // 用户信息
|
|
||||||
|
|
||||||
export class ChatWs {
|
|
||||||
instance = null; // 实例
|
|
||||||
id = null; // 群聊id || 单聊id-用户id(userId)
|
|
||||||
closed = false; // 关闭状态
|
|
||||||
onmessage = null; // 自定义处理
|
|
||||||
errCount = 5; // 重连次数 (ms) 暂时不使用
|
|
||||||
errTime = null; // 重连时间 (ms) 1秒内zhi间内不重连
|
|
||||||
// 类型定义
|
|
||||||
TYPES = {
|
|
||||||
group: 'group', // 群发
|
|
||||||
single: 'single', // 单发
|
|
||||||
beat: 'heart_beat', // 心跳
|
|
||||||
}
|
|
||||||
static base = 'wss://file.ysaix.com:7868'
|
|
||||||
constructor() {
|
|
||||||
if (!ChatWs.instance) {
|
|
||||||
const userStore = useUserStore() // 用户信息
|
|
||||||
const wsBase = import.meta.env.VITE_APP_WS_URL; // ws地址
|
|
||||||
const url = `${wsBase||ChatWs.base}/ws/websocket/${userStore.id}`;
|
|
||||||
this.init(url);
|
|
||||||
ChatWs.instance = this;
|
|
||||||
}
|
|
||||||
return ChatWs.instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
init(url) {
|
|
||||||
this.url = url;
|
|
||||||
this.ws = null;
|
|
||||||
const _this = this
|
|
||||||
this.heartCheck = {
|
|
||||||
timeout: 1000 * 10, // 60s
|
|
||||||
timeoutObj: null,
|
|
||||||
serverTimeoutObj: null,
|
|
||||||
reset() {
|
|
||||||
clearTimeout(this.timeoutObj);
|
|
||||||
clearTimeout(this.serverTimeoutObj);
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
start() {
|
|
||||||
const self = this;
|
|
||||||
this.timeoutObj = setTimeout(function () {
|
|
||||||
// 这里发送一个心跳,后端收到后,返回一个心跳消息,
|
|
||||||
// onmessage拿到返回的心跳就说明连接正常
|
|
||||||
console.log("websocket-发送心跳")
|
|
||||||
_this.sendMsgBeat();
|
|
||||||
self.serverTimeoutObj = setTimeout(function () {
|
|
||||||
console.log("websocket-心跳响应超时")
|
|
||||||
// 如果超过一定时间还没重置,说明后端主动断开了
|
|
||||||
_this.ws.close(); // 如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
|
|
||||||
}, self.timeout);
|
|
||||||
}, this.timeout);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
this.reconnect();
|
|
||||||
}
|
|
||||||
// 重连
|
|
||||||
reconnect() {
|
|
||||||
const self = this;
|
|
||||||
if (!!this.ws) { // 关闭之前的链接
|
|
||||||
this.ws.close()
|
|
||||||
this.ws = null
|
|
||||||
}
|
|
||||||
this.ws = new WebSocket(this.url);
|
|
||||||
this.ws.onopen = function () {
|
|
||||||
console.log("websocket-连接成功")
|
|
||||||
self.heartCheck.reset().start();
|
|
||||||
};
|
|
||||||
this.ws.onmessage = function (e) {
|
|
||||||
// console.log("websocket-收到消息", e)
|
|
||||||
// 拿到任何消息都说明当前连接是正常的
|
|
||||||
const isBeat = e.data == 'pong'
|
|
||||||
isBeat && self.heartCheck.reset().start();
|
|
||||||
const exts = ['sessionId', 'pong'] // 不处理的消息头
|
|
||||||
const isEmpty = !e.data
|
|
||||||
const isExts = exts.some(item => e.data.includes(item))
|
|
||||||
if (isEmpty && isExts) return;
|
|
||||||
// 自定义处理
|
|
||||||
self.onmessage && self.onmessage(e.data, e);
|
|
||||||
};
|
|
||||||
this.ws.onerror = function (e) {
|
|
||||||
console.log("websocket-连接异常", e)
|
|
||||||
self.connectSocket() // 重连
|
|
||||||
};
|
|
||||||
this.ws.onclose = function (e) {
|
|
||||||
console.log("websocket-连接断开", e)
|
|
||||||
self.connectSocket() // 重连
|
|
||||||
};
|
|
||||||
}
|
|
||||||
connectSocket() {
|
|
||||||
this.heartCheck.reset() // 重置心跳
|
|
||||||
if (self.closed) return; // 关闭状态不重连
|
|
||||||
// if(self.errCount <= 0) return; // 超过重连次数
|
|
||||||
// self.errCount--; // 重连次数减1
|
|
||||||
if (this.errTime) {
|
|
||||||
const nowTime = Date.now();
|
|
||||||
const bool = nowTime - this.errTime < 1000 // 1s内zhi间内不重连
|
|
||||||
if (bool) return; // 1s内不重连
|
|
||||||
}
|
|
||||||
this.errTime = Date.now();
|
|
||||||
// 延时5s 后重连
|
|
||||||
console.log('重连中...')
|
|
||||||
this.sleep(5000).then(_ => {this.reconnect()})
|
|
||||||
}
|
|
||||||
// 发送消息
|
|
||||||
send(msg) {
|
|
||||||
if (!msg) throw new Error("msg is not null")
|
|
||||||
if (!this.ws) throw new Error("ws is not null")
|
|
||||||
if (typeof msg === "object") msg = JSON.stringify(msg)
|
|
||||||
if (!msg.includes('"msg":')) throw new Error("msg 格式错误请重试")
|
|
||||||
this.ws.send(msg)
|
|
||||||
}
|
|
||||||
// 发送消息-带消息头(key)
|
|
||||||
sendMsg(head, content, option = {}) {
|
|
||||||
if (!head) throw new Error("head is not null")
|
|
||||||
if (!content) throw new Error("content is not null")
|
|
||||||
let msg = { head, content, ...option }
|
|
||||||
// 发送消息
|
|
||||||
this.send(this.getMsgObj(msg))
|
|
||||||
}
|
|
||||||
// 发送心跳
|
|
||||||
sendMsgBeat() {
|
|
||||||
// this.send(this.getMsgObj('ping', this.TYPES.beat))
|
|
||||||
this.ws.send('ping')
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 获取消息对象
|
|
||||||
* @param {*} msg 消息内容
|
|
||||||
* @param {*} chatType 群发 group| 单发 single| 心态 heart_beat
|
|
||||||
* @param {*} id 群聊id || 单聊id-用户id(userId)
|
|
||||||
*/
|
|
||||||
getMsgObj(msg, chatType = 'group', id) {
|
|
||||||
if (typeof msg === "object") msg = JSON.stringify(msg)
|
|
||||||
const res = {msg, chatType}
|
|
||||||
// if (!id) throw new Error(`${type=='group'?'群ID':'用户ID'} is not null`)
|
|
||||||
if (chatType == 'group') res.groupId = id || this.id || ''
|
|
||||||
else if (chatType == 'single') res.to = id || this.id || ''
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
// 监听
|
|
||||||
watch(callback) {
|
|
||||||
callback && (this.onmessage = callback);
|
|
||||||
}
|
|
||||||
// 关闭链接
|
|
||||||
close() {
|
|
||||||
this.closed = true;
|
|
||||||
this.ws.close();
|
|
||||||
}
|
|
||||||
// 延时 ms 毫秒
|
|
||||||
sleep(ms){
|
|
||||||
return new Promise(resolve => setTimeout(resolve, ms))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 连接socket
|
|
||||||
export const connect = () => new ChatWs()
|
|
||||||
// 默认实例
|
|
||||||
export default new ChatWs()
|
|
|
@ -208,10 +208,6 @@ export const createWindow = async (type, data) => {
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
}
|
}
|
||||||
// pptlist的时候可以选择最大化
|
|
||||||
if (data.url == '/pptist'){
|
|
||||||
defOption.maximizable = true;
|
|
||||||
}
|
|
||||||
data.isConsole = true // 是否开启控制台
|
data.isConsole = true // 是否开启控制台
|
||||||
data.option = {...defOption, ...option}
|
data.option = {...defOption, ...option}
|
||||||
const win = await toolWindow(type, data)
|
const win = await toolWindow(type, data)
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch, reactive, getCurrentInstance, nextTick, defineEmits } from 'vue'
|
import { onMounted, ref, watch, reactive, getCurrentInstance, nextTick } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { Plus, Delete } from '@element-plus/icons-vue'
|
import { Plus, Delete } from '@element-plus/icons-vue'
|
||||||
|
@ -156,7 +156,6 @@ const { proxy } = getCurrentInstance()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentCourse: Object,
|
currentCourse: Object,
|
||||||
})
|
})
|
||||||
const emits = defineEmits(['getData'])
|
|
||||||
const isShow = ref(false)
|
const isShow = ref(false)
|
||||||
|
|
||||||
const propsQueryCourseObj = route.query.courseObj;//作业布置的内容对象
|
const propsQueryCourseObj = route.query.courseObj;//作业布置的内容对象
|
||||||
|
@ -461,8 +460,10 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
await nextTick(); // 确保DOM更新完成
|
await nextTick(); // 确保DOM更新完成
|
||||||
proxy.$refs["classWorkFormRef"].validate(async valid => {
|
proxy.$refs["classWorkFormRef"].validate(async valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
//
|
||||||
// const { chapterId } = await useGetHomework(courseObj.node)
|
// const { chapterId } = await useGetHomework(courseObj.node)
|
||||||
// this.entpcourseid = chapterId
|
// this.entpcourseid = chapterId
|
||||||
|
|
||||||
const cform = {
|
const cform = {
|
||||||
id: 0,
|
id: 0,
|
||||||
workdate: classWorkForm.workdate, // //作业类型?web端这里貌似没有这个时间
|
workdate: classWorkForm.workdate, // //作业类型?web端这里貌似没有这个时间
|
||||||
|
@ -506,7 +507,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
|
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]);
|
||||||
try {
|
try {
|
||||||
addClassworkReturnId(cform).then((res) => {
|
addClassworkReturnId(cform).then(() => {
|
||||||
ElMessage({ type: 'success', message: '作业设计成功!'});
|
ElMessage({ type: 'success', message: '作业设计成功!'});
|
||||||
// 重置提交表单
|
// 重置提交表单
|
||||||
classWorkForm.worktype = "课堂展示";
|
classWorkForm.worktype = "课堂展示";
|
||||||
|
@ -518,8 +519,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
// 情况选择的资源缓存
|
// 情况选择的资源缓存
|
||||||
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
||||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||||
classWorkForm.id = res
|
|
||||||
emits('getData',classWorkForm)
|
|
||||||
boardLoading.value = false
|
boardLoading.value = false
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -531,7 +531,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||||
try {
|
try {
|
||||||
addClassworkReturnId(cform).then((res) => {
|
addClassworkReturnId(cform).then(() => {
|
||||||
ElMessage({ type: 'success', message: '作业设计成功!'});
|
ElMessage({ type: 'success', message: '作业设计成功!'});
|
||||||
// 重置提交表单
|
// 重置提交表单
|
||||||
classWorkForm.worktype = "常规作业";
|
classWorkForm.worktype = "常规作业";
|
||||||
|
@ -543,8 +543,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
||||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||||
classWorkForm.fileHomeworkList = []; // 常规作业list
|
classWorkForm.fileHomeworkList = []; // 常规作业list
|
||||||
classWorkForm.id = res
|
|
||||||
emits('getData',classWorkForm)
|
|
||||||
fileLoading.value = false
|
fileLoading.value = false
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -575,7 +574,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
console.log(cform,'提交的数据');
|
console.log(cform,'提交的数据');
|
||||||
if(cform.entpcourseworklist == '') return ElMessage({ type: 'warning', message: '请先添加作业资源!'});
|
if(cform.entpcourseworklist == '') return ElMessage({ type: 'warning', message: '请先添加作业资源!'});
|
||||||
|
|
||||||
addClassworkReturnId(cform).then(res => {
|
addClassworkReturnId(cform).then(workres => {
|
||||||
ElMessage({ type: 'success', message: '作业设计成功!'});
|
ElMessage({ type: 'success', message: '作业设计成功!'});
|
||||||
// 重置提交表单
|
// 重置提交表单
|
||||||
classWorkForm.worktype = "习题训练";
|
classWorkForm.worktype = "习题训练";
|
||||||
|
@ -586,8 +585,6 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
// 情况选择的资源缓存
|
// 情况选择的资源缓存
|
||||||
classWorkForm.chooseWorkLists = [];
|
classWorkForm.chooseWorkLists = [];
|
||||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||||
classWorkForm.id = res
|
|
||||||
emits('getData',classWorkForm)
|
|
||||||
// refresh the list
|
// refresh the list
|
||||||
//这里分离了,所以不需要更新表单数据了
|
//这里分离了,所以不需要更新表单数据了
|
||||||
// this.getClassWorkAllList();
|
// this.getClassWorkAllList();
|
||||||
|
@ -607,7 +604,6 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
// // 首页进入的,跳转到作业布置页面
|
// // 首页进入的,跳转到作业布置页面
|
||||||
// router.push({ path: '/classTaskAssign' });
|
// router.push({ path: '/classTaskAssign' });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<!-- 习题筛选1 -->
|
<!-- 习题筛选1 -->
|
||||||
<el-row style="width: 100%; height: 50px;">
|
<el-row style="width: 100%; height: 50px;">
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<div class="page-table" >
|
<div class="page-table" >
|
||||||
<el-table
|
<el-table
|
||||||
:data="workResource.entpCourseWorkList"
|
:data="workResource.entpCourseWorkList"
|
||||||
style="width: 100%; height: calc(100% - 50px);"
|
style="width: 100%; height: calc(100% - 55px);"
|
||||||
v-loading="pageParams.loading"
|
v-loading="pageParams.loading"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="60" />
|
<el-table-column type="index" width="60" />
|
||||||
|
@ -89,13 +89,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页-->
|
<!-- 分页-->
|
||||||
<div style="height: 50px;">
|
<div style="height: 55px;">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-show="pageParams.total > 0"
|
v-show="pageParams.total > 0"
|
||||||
v-model:page="paginationParams.pageNum"
|
v-model:page="paginationParams.pageNum"
|
||||||
v-model:limit="paginationParams.pageSize"
|
v-model:limit="paginationParams.pageSize"
|
||||||
:total="pageParams.total"
|
:total="pageParams.total"
|
||||||
:style="{ position: 'relative', 'padding-top': '10px' }"
|
:style="{ position: 'relative', 'margin-top': '5px' }"
|
||||||
@change="getPaginationList" />
|
@change="getPaginationList" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,7 +188,6 @@ const workResource = reactive({
|
||||||
}); // 作业资源
|
}); // 作业资源
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('entpCourseWorkTypeList', entpCourseWorkTypeList);
|
|
||||||
debounceQueryData(); // 查询习题列表
|
debounceQueryData(); // 查询习题列表
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<el-button type="primary" @click="onchange('/model/newClassTaskAssign')">作业管理</el-button>
|
<el-button type="primary" @click="onchange('/model/newClassTaskAssign')">作业管理</el-button>
|
||||||
<el-button type="success" @click="onchange('/model/teaching')">教材研读</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="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="info" @click="onchange('/model/examination')">考试分析</el-button>
|
||||||
<el-button type="primary" v-menus="dt.menus">测试</el-button>
|
<el-button type="primary" v-menus="dt.menus">测试</el-button>
|
||||||
<el-button type="success" @click="onchange('/model/aiKolors')">文生图片</el-button>
|
<el-button type="success" @click="onchange('/model/aiKolors')">文生图片</el-button>
|
||||||
|
@ -61,6 +61,7 @@ import { sessionStore } from '@/utils/store' // 学科名字文生图
|
||||||
// 组件引入
|
// 组件引入
|
||||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
import { menusEvent } from '@/plugins/vue3-menus' // 右键菜单
|
import { menusEvent } from '@/plugins/vue3-menus' // 右键菜单
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const userStore = useUserStore() // 用户信息
|
const userStore = useUserStore() // 用户信息
|
||||||
|
|
||||||
|
@ -196,19 +197,6 @@ const getResourceList = async () => {
|
||||||
// 统一HTTP处理
|
// 统一HTTP处理
|
||||||
const HTTP_SERVER_API = (type, params = {}) => {
|
const HTTP_SERVER_API = (type, params = {}) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'addSmarttalk': { // 获取课程
|
|
||||||
const def = {
|
|
||||||
fileId: '', // 文件id - Entpcoursefile 对应id
|
|
||||||
fileFlag: 'aptist',
|
|
||||||
fileShowName: courseObj.coursetitle + '.aptist',
|
|
||||||
textbookId: courseObj.textbookId,
|
|
||||||
levelFirstId: courseObj.levelFirstId,
|
|
||||||
levelSecondId: courseObj.levelSecondId,
|
|
||||||
fileSource: '个人',
|
|
||||||
fileRoot: '备课'
|
|
||||||
}
|
|
||||||
return API_smarttalk.creatAPT({...def, ...params})
|
|
||||||
}
|
|
||||||
case 'addEntpcourse': { // 添加课程
|
case 'addEntpcourse': { // 添加课程
|
||||||
const node = courseObj.node || {}
|
const node = courseObj.node || {}
|
||||||
if (!node) return msgUtils.msgWarning('请选择章节?')
|
if (!node) return msgUtils.msgWarning('请选择章节?')
|
||||||
|
@ -242,7 +230,7 @@ const HTTP_SERVER_API = (type, params = {}) => {
|
||||||
ppttype: 'file',
|
ppttype: 'file',
|
||||||
title: enpt.coursetitle,
|
title: enpt.coursetitle,
|
||||||
fileurl: '',
|
fileurl: '',
|
||||||
filetype: 'aippt',
|
filetype: 'aptist',
|
||||||
datacontent: '',
|
datacontent: '',
|
||||||
filekey: '',
|
filekey: '',
|
||||||
filetag: '',
|
filetag: '',
|
||||||
|
@ -291,8 +279,6 @@ const handleAll = async(type, row) =>{
|
||||||
}
|
}
|
||||||
// 生成ppt课件-子级(slide)
|
// 生成ppt课件-子级(slide)
|
||||||
await HTTP_SERVER_API('addEntpcoursefile', params)
|
await HTTP_SERVER_API('addEntpcoursefile', params)
|
||||||
// 生成备课资源-Smarttalk
|
|
||||||
await HTTP_SERVER_API('addSmarttalk',{fileId: id})
|
|
||||||
// 刷新资源列表
|
// 刷新资源列表
|
||||||
await getResourceList()
|
await getResourceList()
|
||||||
} else {
|
} else {
|
||||||
|
@ -301,7 +287,7 @@ const handleAll = async(type, row) =>{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'open': { // 打开资源-pptist
|
case 'open': { // 打开资源-pptist
|
||||||
if (row.filetype != 'aippt') return msgUtils.msgWarning('暂不支持该类型文件操作!')
|
if (row.filetype != 'aptist') return msgUtils.msgWarning('暂不支持该类型文件操作!')
|
||||||
sessionStore.set('curr.resource', row) // 缓存当前资源信息
|
sessionStore.set('curr.resource', row) // 缓存当前资源信息
|
||||||
createWindow('open-win', {
|
createWindow('open-win', {
|
||||||
url: '/pptist', // 窗口关闭时,清除缓存
|
url: '/pptist', // 窗口关闭时,清除缓存
|
||||||
|
@ -326,7 +312,7 @@ const handleAll = async(type, row) =>{
|
||||||
// icons 处理 type 代表传递svg
|
// icons 处理 type 代表传递svg
|
||||||
const getIcon = (o, type) => {
|
const getIcon = (o, type) => {
|
||||||
let icon = typeof o == 'string' ? o : o?.filetype
|
let icon = typeof o == 'string' ? o : o?.filetype
|
||||||
if (['aippt'].includes(o?.filetype)) icon = 'pptx'
|
if (['aptist'].includes(o?.filetype)) icon = 'pptx'
|
||||||
if (!!type) { // 其他格式icon
|
if (!!type) { // 其他格式icon
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'svg': // 返回svg格式
|
case 'svg': // 返回svg格式
|
||||||
|
|
|
@ -158,7 +158,7 @@ const outlineCreatePPT = () => {
|
||||||
|
|
||||||
const checkProgress = () => {
|
const checkProgress = () => {
|
||||||
getProgressV2(res.sid).then(response => {
|
getProgressV2(res.sid).then(response => {
|
||||||
percentage.value = Math.round(response?.donePages*100/response?.totalPages);
|
percentage.value = Math.round(response?.donePages/response?.totalPages)*100;
|
||||||
if (response.pptStatus === "done") {
|
if (response.pptStatus === "done") {
|
||||||
emit('addSuccess',{...res,url:response.pptUrl})
|
emit('addSuccess',{...res,url:response.pptUrl})
|
||||||
ElMessage.success("生成成功");
|
ElMessage.success("生成成功");
|
||||||
|
@ -267,6 +267,7 @@ function webSocketSend(ws, data) {
|
||||||
|
|
||||||
function result1(resultData) {
|
function result1(resultData) {
|
||||||
let jsonData = JSON.parse(resultData);
|
let jsonData = JSON.parse(resultData);
|
||||||
|
console.log(jsonData)
|
||||||
outputText.value += jsonData.payload.choices.text[0].content;
|
outputText.value += jsonData.payload.choices.text[0].content;
|
||||||
const div = document.querySelector('.paragraphs');
|
const div = document.querySelector('.paragraphs');
|
||||||
if (div) {
|
if (div) {
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- im-chat 聊天组件 -->
|
<!-- im-chat 聊天组件 -->
|
||||||
<!-- <im-chat ref="imChatRef" v-if="visible" @change="chatChange" /> -->
|
<im-chat ref="imChatRef" v-if="visible" @change="chatChange" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -90,7 +90,7 @@ import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
||||||
import imChat from '@/views/tool/components/imChat.vue' // im-chat-子组件
|
import imChat from '@/views/tool/components/imChat.vue' // im-chat-子组件
|
||||||
import MsgEnum from '@/plugins/imChat/msgEnum' // 消息头-相关定义(nuem)
|
import MsgEnum from '@/plugins/imChat/msgEnum' // 消息头-相关定义(nuem)
|
||||||
import * as commUtil from '@/utils/comm' // 工具类-通用
|
import * as commUtil from '@/utils/comm' // 工具类-通用
|
||||||
import { toLinkWeb, createWindow, getStaticUrl, sessionStore } from '@/utils/tool' // 工具类-主进程相关
|
import { toLinkWeb, getStaticUrl } from '@/utils/tool' // 工具类-主进程相关
|
||||||
|
|
||||||
import * as Http_ClassManage from '@/api/classManage' // api接口
|
import * as Http_ClassManage from '@/api/classManage' // api接口
|
||||||
import * as Http_Classcourse from '@/api/teaching/classcourse' // api接口
|
import * as Http_Classcourse from '@/api/teaching/classcourse' // api接口
|
||||||
|
@ -103,7 +103,7 @@ let baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const visible = ref(false) // 是否打开窗口
|
const visible = ref(false) // 是否打开窗口
|
||||||
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
||||||
// const imChatRef = ref(null) // im-chat ref
|
const imChatRef = ref(null) // im-chat ref
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close'])
|
||||||
const classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
const classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
||||||
form: {}, itemOption: [], option: {}
|
form: {}, itemOption: [], option: {}
|
||||||
|
@ -177,7 +177,7 @@ const initData = () => {
|
||||||
teacherForm.itemOption = [
|
teacherForm.itemOption = [
|
||||||
// { label: '班级', prop: 'classid' },
|
// { label: '班级', prop: 'classid' },
|
||||||
// { label: '上课', prop: 'classcourseid' },
|
// { label: '上课', prop: 'classcourseid' },
|
||||||
// { label: '老师扫码', prop: 'qrUrl', show: false },
|
{ label: '老师扫码', prop: 'qrUrl', show: false },
|
||||||
{ label: '手机登录', prop: 'mobile', show: false },
|
{ label: '手机登录', prop: 'mobile', show: false },
|
||||||
{ label: '故障备用', prop: 'backup', show: false },
|
{ label: '故障备用', prop: 'backup', show: false },
|
||||||
]
|
]
|
||||||
|
@ -257,22 +257,18 @@ const createClasscourse = async () => {
|
||||||
entpcourseid, evalid, coursetitle,
|
entpcourseid, evalid, coursetitle,
|
||||||
plandate: curDate, opendate: curDate
|
plandate: curDate, opendate: curDate
|
||||||
}
|
}
|
||||||
// teacherForm.form.classcourseid = 100
|
|
||||||
teacherForm.form.classcourseid = await Http_Classcourse.addClasscourseReturnId(params)
|
teacherForm.form.classcourseid = await Http_Classcourse.addClasscourseReturnId(params)
|
||||||
dt.loading = false
|
dt.loading = false
|
||||||
// getClasscourseList('update') // 更新列表
|
// getClasscourseList('update') // 更新列表
|
||||||
let msgEl = ElMessage.success('创建课程-成功')
|
ElMessage.success('创建课程-成功')
|
||||||
// 新版-pptList 打开公屏
|
// 新版-pptList 打开公屏
|
||||||
if (myClassActive.value.filetype == 'aippt') {
|
if (myClassActive.value.filetype == 'aptist') {
|
||||||
|
const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
msgEl.close()
|
msgEl.close()
|
||||||
msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
|
const classcourse = {...params, id: teacherForm.form.classcourseid}
|
||||||
setTimeout(() => {
|
openPublicScreen(classcourse)
|
||||||
msgEl.close()
|
}, 1500);
|
||||||
const classcourse = {...params, id: teacherForm.form.classcourseid}
|
|
||||||
openPublicScreen(classcourse)
|
|
||||||
}, 2000);
|
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 删除课程
|
// 删除课程
|
||||||
|
@ -300,23 +296,14 @@ const removeClasscourse = async () => {
|
||||||
const classTeachingStart = async () => {
|
const classTeachingStart = async () => {
|
||||||
const { classcourseid:id } = teacherForm.form
|
const { classcourseid:id } = teacherForm.form
|
||||||
if (id) { // 开始上课
|
if (id) { // 开始上课
|
||||||
// 新版-pptList 打开公屏
|
const url = `/teaching/classteaching?classcourseid=${id}&actor=classTeachingOnPublicScreen`
|
||||||
if (myClassActive.value.filetype == 'aptist') {
|
toLinkWeb(url) // 跳转web-公屏
|
||||||
const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
|
visible.value = false // 关闭弹窗
|
||||||
setTimeout(() => {
|
handleClose() // 关闭im-chat
|
||||||
msgEl.close()
|
|
||||||
openPublicScreen({id})
|
|
||||||
}, 2000);
|
|
||||||
}else {
|
|
||||||
const url = `/teaching/classteaching?classcourseid=${id}&actor=classTeachingOnPublicScreen`
|
|
||||||
toLinkWeb(url) // 跳转web-公屏
|
|
||||||
visible.value = false // 关闭弹窗
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取二维码地址
|
// 获取二维码地址
|
||||||
const getQrUrl = async() => {
|
const getQrUrl = async() => {
|
||||||
// console.log('获取二维码地址')
|
|
||||||
const { classcourseid:id } = teacherForm.form
|
const { classcourseid:id } = teacherForm.form
|
||||||
const { userName, userId } = userStore.user
|
const { userName, userId } = userStore.user
|
||||||
if (!id||!userName) return
|
if (!id||!userName) return
|
||||||
|
@ -349,7 +336,6 @@ const getQrUrl = async() => {
|
||||||
|
|
||||||
// 打开公屏
|
// 打开公屏
|
||||||
const openPublicScreen = (classcourse) => {
|
const openPublicScreen = (classcourse) => {
|
||||||
console.log('打开公屏', classcourse)
|
|
||||||
const resource = toRaw(myClassActive.value)
|
const resource = toRaw(myClassActive.value)
|
||||||
sessionStore.set('curr.resource', resource) // 缓存当前资源信息
|
sessionStore.set('curr.resource', resource) // 缓存当前资源信息
|
||||||
sessionStore.set('curr.classcourse', classcourse) // 缓存当前当前上课
|
sessionStore.set('curr.classcourse', classcourse) // 缓存当前当前上课
|
||||||
|
@ -360,7 +346,6 @@ const openPublicScreen = (classcourse) => {
|
||||||
sessionStore.set('curr.classcourse', null) // 清除缓存
|
sessionStore.set('curr.classcourse', null) // 清除缓存
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
visible.value = false // 关闭弹窗
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时器监听
|
// 定时器监听
|
||||||
|
@ -401,14 +386,12 @@ watch(() => classForm.form.classid, (val)=> {
|
||||||
// 监听-课程id
|
// 监听-课程id
|
||||||
watch(() => teacherForm.form.classcourseid, (val) => {
|
watch(() => teacherForm.form.classcourseid, (val) => {
|
||||||
const bool = !!val
|
const bool = !!val
|
||||||
const isApt = myClassActive.filetype=='apt'
|
|
||||||
// 获取选中课程-生成二维码地址
|
// 获取选中课程-生成二维码地址
|
||||||
isApt && bool && getQrUrl()
|
bool && getQrUrl()
|
||||||
// 监听课程id,是否显示功能
|
// 监听课程id,是否显示功能
|
||||||
teacherForm.itemOption.forEach(o => {
|
teacherForm.itemOption.forEach(o => {
|
||||||
// 有课程id,触发
|
// 有课程id,触发
|
||||||
const arr = isApt ? ['qrUrl','backup'] : ['backup']
|
if (['qrUrl','backup'].includes(o.prop)) o.show = bool
|
||||||
if (arr.includes(o.prop)) o.show = bool
|
|
||||||
// 课程id为空,触发
|
// 课程id为空,触发
|
||||||
if (['mobile'].includes(o.prop)) o.show = !bool
|
if (['mobile'].includes(o.prop)) o.show = !bool
|
||||||
})
|
})
|
||||||
|
|
|
@ -341,7 +341,7 @@ export default {
|
||||||
cookieData: { ...configObj.data }
|
cookieData: { ...configObj.data }
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if(items.fileFlag === 'aippt') { // aippt 被点击 打开PPT-List 课件
|
} else if(items.fileFlag === 'aptist') { // aptist 被点击 打开PPT-List 课件
|
||||||
return this.$emit('change', 'click', items)
|
return this.$emit('change', 'click', items)
|
||||||
}
|
}
|
||||||
if (!items||!items.fileSuffix) return;
|
if (!items||!items.fileSuffix) return;
|
||||||
|
|
|
@ -2,20 +2,8 @@
|
||||||
<div v-loading="isLoading" class="page-resource flex">
|
<div v-loading="isLoading" class="page-resource flex">
|
||||||
<ChooseTextbook @node-click="nodeClick" />
|
<ChooseTextbook @node-click="nodeClick" />
|
||||||
<div class="page-center-wrap">
|
<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-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="prepare-center-header">
|
||||||
<div class="center-create-btn" style="background-color: rgb(64,158,255)" @click="createAptFile">
|
<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>
|
<div class="create-btn-title"><el-icon><Plus /></el-icon><label>创建APT</label></div>
|
||||||
|
@ -157,7 +145,7 @@
|
||||||
<!-- <button @click="test">test</button> -->
|
<!-- <button @click="test">test</button> -->
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {Check, Plus, Position} from '@element-plus/icons-vue'
|
import { Check,Plus } from '@element-plus/icons-vue'
|
||||||
import Reserv from '@/views/prepare/container/reserv.vue'
|
import Reserv from '@/views/prepare/container/reserv.vue'
|
||||||
import { ArrowDown } from '@element-plus/icons-vue'
|
import { ArrowDown } from '@element-plus/icons-vue'
|
||||||
import PptDialog from '@/views/prepare/container/ppt-dialog.vue'
|
import PptDialog from '@/views/prepare/container/ppt-dialog.vue'
|
||||||
|
@ -192,11 +180,8 @@ import ClassReserv from '@/views/classManage/classReserv.vue'
|
||||||
import TreeLog from '@/views/prepare/components/treeLog.vue'
|
import TreeLog from '@/views/prepare/components/treeLog.vue'
|
||||||
import classStart from './container/class-start.vue' // 预备上课
|
import classStart from './container/class-start.vue' // 预备上课
|
||||||
import MsgEnum from '@/plugins/imChat/msgEnum' // im 消息枚举
|
import MsgEnum from '@/plugins/imChat/msgEnum' // im 消息枚举
|
||||||
// import Chat from '@/utils/chat' // im 登录初始化
|
import Chat from '@/utils/chat' // im 登录初始化
|
||||||
// if (!Chat.imChat) Chat.init()
|
if (!Chat.imChat) Chat.init()
|
||||||
// import ChatWs from '@/plugins/socket'
|
|
||||||
// console.log('xxxx',ChatWs)
|
|
||||||
// ChatWs.watch((data,e) => console.log('ws', data, e))
|
|
||||||
|
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
@ -268,11 +253,11 @@ export default {
|
||||||
},
|
},
|
||||||
currentKJFileList() {
|
currentKJFileList() {
|
||||||
// return this.currentFileList.filter((item) => item.fileFlag === 'apt' || item.fileFlag === '课件')
|
// return this.currentFileList.filter((item) => item.fileFlag === 'apt' || item.fileFlag === '课件')
|
||||||
return this.currentFileList.filter((item) => ['apt','aippt','课件'].includes(item.fileFlag))
|
return this.currentFileList.filter((item) => ['apt','aptist','课件'].includes(item.fileFlag))
|
||||||
},
|
},
|
||||||
currentSCFileList() {
|
currentSCFileList() {
|
||||||
// return this.currentFileList.filter((item) => item.fileFlag !== 'apt' && item.fileFlag !== '课件')
|
// return this.currentFileList.filter((item) => item.fileFlag !== 'apt' && item.fileFlag !== '课件')
|
||||||
return this.currentFileList.filter((item) => !['apt','aippt','课件'].includes(item.fileFlag))
|
return this.currentFileList.filter((item) => !['apt','aptist','课件'].includes(item.fileFlag))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -336,7 +321,7 @@ export default {
|
||||||
if(item.fileFlag === 'apt') {
|
if(item.fileFlag === 'apt') {
|
||||||
this.$refs.calssRef.open(item.fileId, classObj)
|
this.$refs.calssRef.open(item.fileId, classObj)
|
||||||
}
|
}
|
||||||
if(item.fileFlag === 'aippt') {
|
if(item.fileFlag === 'aptist') {
|
||||||
this.$refs.calssRef.open(item.fileId, classObj)
|
this.$refs.calssRef.open(item.fileId, classObj)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -393,8 +378,8 @@ export default {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'click': { // 点击-打开课件-aippt
|
case 'click': { // 点击-打开课件-aptist
|
||||||
if (row.fileFlag === 'aippt' && !!row.fileId) {
|
if (row.fileFlag === 'aptist' && !!row.fileId) {
|
||||||
const res = await getEntpcoursefile(row.fileId)
|
const res = await getEntpcoursefile(row.fileId)
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
sessionStore.set('curr.resource', res.data) // 缓存当前资源信息
|
sessionStore.set('curr.resource', res.data) // 缓存当前资源信息
|
||||||
|
@ -476,93 +461,6 @@ export default {
|
||||||
},500)
|
},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() {
|
createAptFile() {
|
||||||
listEntpcourse({
|
listEntpcourse({
|
||||||
evalid: this.currentNode.id,
|
evalid: this.currentNode.id,
|
||||||
|
@ -755,7 +653,7 @@ export default {
|
||||||
for (let i = 0; i < this.currentFileList.length; i++) {
|
for (let i = 0; i < this.currentFileList.length; i++) {
|
||||||
let item = this.currentFileList[i]
|
let item = this.currentFileList[i]
|
||||||
if (item.fileFlag === 'apt') continue;
|
if (item.fileFlag === 'apt') continue;
|
||||||
if (item.fileFlag === 'aippt') continue;
|
if (item.fileFlag === 'aptist') continue;
|
||||||
await asyncLocalFile(item)
|
await asyncLocalFile(item)
|
||||||
}
|
}
|
||||||
this.asyncAllFileVisiable = false
|
this.asyncAllFileVisiable = false
|
||||||
|
@ -974,13 +872,6 @@ export default {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
position: relative;
|
|
||||||
.prepare-center-dropdown{
|
|
||||||
z-index: 9999;
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 4px;
|
|
||||||
}
|
|
||||||
.prepare-center-jxkj{
|
.prepare-center-jxkj{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -34,6 +34,7 @@ import {getDept } from '@/api/login'
|
||||||
import { listEvaluation } from '@/api/subject/index'
|
import { listEvaluation } from '@/api/subject/index'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
|
import { clearBookInfo } from '@/utils/ruoyi'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import {listClassmain} from '@/api/classManage/index'
|
import {listClassmain} from '@/api/classManage/index'
|
||||||
//班级列表
|
//班级列表
|
||||||
|
|
|
@ -131,7 +131,6 @@ const params = reactive(
|
||||||
|
|
||||||
const addAiPPT = async(res) => {
|
const addAiPPT = async(res) => {
|
||||||
let node = courseObj.node
|
let node = courseObj.node
|
||||||
pptDialog.value = false;
|
|
||||||
if (!node) return msgUtils.msgWarning('请选择章节?')
|
if (!node) return msgUtils.msgWarning('请选择章节?')
|
||||||
pgDialog.visible = true
|
pgDialog.visible = true
|
||||||
pgDialog.pg.percentage = 0
|
pgDialog.pg.percentage = 0
|
||||||
|
@ -239,8 +238,8 @@ const HTTP_SERVER_API = (type, params = {}) => {
|
||||||
const node = courseObj.node || {}
|
const node = courseObj.node || {}
|
||||||
const def = {
|
const def = {
|
||||||
fileId: '', // 文件id - Entpcoursefile 对应id
|
fileId: '', // 文件id - Entpcoursefile 对应id
|
||||||
fileFlag: 'aippt',
|
fileFlag: 'aptist',
|
||||||
fileShowName: node.itemtitle + '.aippt',
|
fileShowName: node.itemtitle + '.aptist',
|
||||||
textbookId: node.rootid,
|
textbookId: node.rootid,
|
||||||
levelFirstId: node.parentid||node.id,
|
levelFirstId: node.parentid||node.id,
|
||||||
levelSecondId: node.parentid && node.id,
|
levelSecondId: node.parentid && node.id,
|
||||||
|
@ -299,7 +298,7 @@ const getDefParams = (params) => {
|
||||||
ppttype: 'file',
|
ppttype: 'file',
|
||||||
title: enpt.coursetitle,
|
title: enpt.coursetitle,
|
||||||
fileurl: '',
|
fileurl: '',
|
||||||
filetype: 'aippt',
|
filetype: 'aptist',
|
||||||
datacontent: '',
|
datacontent: '',
|
||||||
filekey: '',
|
filekey: '',
|
||||||
filetag: '',
|
filetag: '',
|
||||||
|
|
Loading…
Reference in New Issue