Compare commits
No commits in common. "df474db4a55772d3beb5217de2fcca2b22c333c6" and "8ad041e963c5fc426e9a143958028f9fb840bcc8" have entirely different histories.
df474db4a5
...
8ad041e963
|
@ -6,7 +6,6 @@
|
||||||
import { toRaw } from 'vue'
|
import { toRaw } from 'vue'
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
||||||
import * as API_smarttalk from '@/api/file' // 相关api
|
|
||||||
import * as useStore from '../store' // pptist-状态管理
|
import * as useStore from '../store' // pptist-状态管理
|
||||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||||
import useUserStore from '@/store/modules/user' // 外部-用户信息
|
import useUserStore from '@/store/modules/user' // 外部-用户信息
|
||||||
|
@ -167,14 +166,6 @@ export class PPTApi {
|
||||||
} else msgUtils.msgError(res.msg || '删除失败');resolve(false)
|
} else msgUtils.msgError(res.msg || '删除失败');resolve(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新-备课资源 标题
|
|
||||||
static updateSmarttalk(data: object): Promise<Boolean> {
|
|
||||||
return API_smarttalk.updateSmarttalk(data).then(res => {
|
|
||||||
if (res.code === 200) return true
|
|
||||||
else msgUtils.msgError(res.msg || '更新失败');return false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PPTApi
|
export default PPTApi
|
|
@ -7,8 +7,7 @@ import { PPTApi } from './index'
|
||||||
import * as store from '../store'
|
import * as store from '../store'
|
||||||
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
import { sessionStore } from '@/utils/store' // electron-store 状态管理
|
||||||
const slidesStore = store.useSlidesStore()
|
const slidesStore = store.useSlidesStore()
|
||||||
const resource = sessionStore.get('curr.resource') // apt 资源
|
const resource = sessionStore.get('curr.resource')
|
||||||
const smarttalk = sessionStore.get('curr.smarttalk') // 备课资源
|
|
||||||
/**
|
/**
|
||||||
* @description 监听器
|
* @description 监听器
|
||||||
*/
|
*/
|
||||||
|
@ -29,11 +28,4 @@ const updatePPT = async (data) => {
|
||||||
data.id = resource.id
|
data.id = resource.id
|
||||||
await PPTApi.updateSlide(data) // 更新ppt内容
|
await PPTApi.updateSlide(data) // 更新ppt内容
|
||||||
sessionStore.set('curr.resource.title', data.title)
|
sessionStore.set('curr.resource.title', data.title)
|
||||||
// 更新smarttalk内容
|
|
||||||
if (!!smarttalk && !!data.title) {
|
|
||||||
const {id, fileFlag} = smarttalk
|
|
||||||
const params = { id, fileShowName: `${data.title}.${fileFlag}` }
|
|
||||||
await PPTApi.updateSmarttalk(params) // 更新ppt内容
|
|
||||||
sessionStore.set('curr.smarttalk.fileShowName', params.fileShowName)
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -34,8 +34,7 @@ const getFileTypeIcon = () => {
|
||||||
gif: 'icon-gif',
|
gif: 'icon-gif',
|
||||||
txt: 'icon-txt',
|
txt: 'icon-txt',
|
||||||
rar: 'icon-rar',
|
rar: 'icon-rar',
|
||||||
apt: 'icon-A',
|
apt: 'icon-A'
|
||||||
aptist: 'icon-A',
|
|
||||||
}
|
}
|
||||||
if (iconObj[name]) {
|
if (iconObj[name]) {
|
||||||
return '#' + iconObj[name]
|
return '#' + iconObj[name]
|
||||||
|
|
|
@ -53,7 +53,6 @@ import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-
|
||||||
import useUserStore from '@/store/modules/user' // 用户信息
|
import useUserStore from '@/store/modules/user' // 用户信息
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
import msgUtils from '@/plugins/modal' // 消息工具
|
||||||
import { createWindow } from '@/utils/tool' // 相关工具
|
import { createWindow } from '@/utils/tool' // 相关工具
|
||||||
import * as API_smarttalk from '@/api/file' // 文件相关api
|
|
||||||
import * as API_entpcourse from '@/api/education/entpcourse' // 相关api
|
import * as API_entpcourse from '@/api/education/entpcourse' // 相关api
|
||||||
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
||||||
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
||||||
|
|
|
@ -59,16 +59,14 @@
|
||||||
<!-- 手机登录 -->
|
<!-- 手机登录 -->
|
||||||
<template #item_mobile>
|
<template #item_mobile>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="myClassActive.filetype=='apt'">开始新的课堂,需要点击先创建课堂,才能显示手机二维码</div>
|
<div>开始新的课堂,需要点击先创建课堂,才能显示手机二维码</div>
|
||||||
<div v-else>开始新的课堂,需要点击先创建课堂</div>
|
|
||||||
<el-button type="warning" :loading="dt.loading" @click="createClasscourse">创建课堂</el-button>
|
<el-button type="warning" :loading="dt.loading" @click="createClasscourse">创建课堂</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- 故障备用 -->
|
<!-- 故障备用 -->
|
||||||
<template #item_backup>
|
<template #item_backup>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="myClassActive.filetype=='apt'">如果手机扫码后进入课堂,但本页面没自动跳转,请点击下面按钮</div>
|
<div>如果手机扫码后进入课堂,但本页面没自动跳转,请点击下面按钮</div>
|
||||||
<div v-else>本页面没自动跳转,请点击下面按钮</div>
|
|
||||||
<el-button type="primary" plain @click="classTeachingStart">开始上课</el-button>
|
<el-button type="primary" plain @click="classTeachingStart">开始上课</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -83,7 +81,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
// 功能说明:课程开始
|
// 功能说明:课程开始
|
||||||
import { onMounted, reactive, ref, watchEffect, watch, nextTick, toRaw } from 'vue' // vue
|
import { onMounted, reactive, ref, watchEffect, watch, nextTick } from 'vue' // vue
|
||||||
import { Refresh } from '@element-plus/icons-vue'
|
import { Refresh } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus' // ui框架: 消息提示
|
import { ElMessage, ElMessageBox } from 'element-plus' // ui框架: 消息提示
|
||||||
import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
||||||
|
@ -151,9 +149,9 @@ const open = async (id, classObj) => {
|
||||||
teacherForm.form.classcourseid = classObj.id
|
teacherForm.form.classcourseid = classObj.id
|
||||||
}
|
}
|
||||||
// 初始化im-chat
|
// 初始化im-chat
|
||||||
// nextTick(async() => {
|
nextTick(async() => {
|
||||||
// chat = await imChatRef.value?.initImChat()
|
chat = await imChatRef.value?.initImChat()
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
|
@ -261,15 +259,7 @@ const createClasscourse = async () => {
|
||||||
dt.loading = false
|
dt.loading = false
|
||||||
// getClasscourseList('update') // 更新列表
|
// getClasscourseList('update') // 更新列表
|
||||||
ElMessage.success('创建课程-成功')
|
ElMessage.success('创建课程-成功')
|
||||||
// 新版-pptList 打开公屏
|
|
||||||
if (myClassActive.value.filetype == 'aptist') {
|
|
||||||
const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
|
|
||||||
setTimeout(() => {
|
|
||||||
msgEl.close()
|
|
||||||
const classcourse = {...params, id: teacherForm.form.classcourseid}
|
|
||||||
openPublicScreen(classcourse)
|
|
||||||
}, 1500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 删除课程
|
// 删除课程
|
||||||
const removeClasscourse = async () => {
|
const removeClasscourse = async () => {
|
||||||
|
@ -333,21 +323,6 @@ const getQrUrl = async() => {
|
||||||
}
|
}
|
||||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开公屏
|
|
||||||
const openPublicScreen = (classcourse) => {
|
|
||||||
const resource = toRaw(myClassActive.value)
|
|
||||||
sessionStore.set('curr.resource', resource) // 缓存当前资源信息
|
|
||||||
sessionStore.set('curr.classcourse', classcourse) // 缓存当前当前上课
|
|
||||||
createWindow('open-win', {
|
|
||||||
url: '/pptist', // 窗口关闭时,清除缓存
|
|
||||||
close: () => {
|
|
||||||
sessionStore.set('curr.resource', null) // 清除缓存
|
|
||||||
sessionStore.set('curr.classcourse', null) // 清除缓存
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 定时器监听
|
// 定时器监听
|
||||||
|
|
||||||
// ================== 监听 =======================
|
// ================== 监听 =======================
|
||||||
|
|
|
@ -332,10 +332,6 @@ export default {
|
||||||
const { id, rootid } = sessionStore.get('subject.curNode')
|
const { id, rootid } = sessionStore.get('subject.curNode')
|
||||||
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + id + "&bookId=" + rootid;
|
const path="/teaching/aptindex?id="+items.fileId + "&unitId=" + id + "&bookId=" + rootid;
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
configObj.fullPath = 'https://localhost:7860/'
|
|
||||||
configObj.data.url = 'https://localhost:7860/'
|
|
||||||
configObj.data.domain = 'localhost'
|
|
||||||
console.log(configObj)
|
|
||||||
let fullPath = configObj.fullPath + path
|
let fullPath = configObj.fullPath + path
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
// 通知主进程
|
// 通知主进程
|
||||||
|
@ -345,8 +341,6 @@ export default {
|
||||||
cookieData: { ...configObj.data }
|
cookieData: { ...configObj.data }
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else if(items.fileFlag === 'aptist') { // aptist 被点击 打开PPT-List 课件
|
|
||||||
return this.$emit('change', 'click', items)
|
|
||||||
}
|
}
|
||||||
if (!items||!items.fileSuffix) return;
|
if (!items||!items.fileSuffix) return;
|
||||||
getPrepareById(items.id).then((item) => {
|
getPrepareById(items.id).then((item) => {
|
||||||
|
|
|
@ -175,9 +175,8 @@ import { updateClasscourse } from '@/api/teaching/classcourse'
|
||||||
import { getClassInfo, getSelfReserv, endClass } from '@/api/classManage'
|
import { getClassInfo, getSelfReserv, endClass } from '@/api/classManage'
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { editListItem } from '@/hooks/useClassTask'
|
import { editListItem } from '@/hooks/useClassTask'
|
||||||
import { addEntpcoursefileReturnId, getEntpcoursefile } from '@/api/education/entpcoursefile'
|
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
|
||||||
import ClassReserv from '@/views/classManage/classReserv.vue'
|
import ClassReserv from '@/views/classManage/classReserv.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 登录初始化
|
||||||
|
@ -240,9 +239,7 @@ export default {
|
||||||
activeClass: null,
|
activeClass: null,
|
||||||
pptDialog: false,
|
pptDialog: false,
|
||||||
// 打开章节的弹窗
|
// 打开章节的弹窗
|
||||||
treelogRef:null,
|
treelogRef:null
|
||||||
// 获取当前章节对应的课程信息 Entpcourse
|
|
||||||
entp: null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -252,12 +249,10 @@ 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','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','aptist','课件'].includes(item.fileFlag))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -310,8 +305,8 @@ export default {
|
||||||
// 开始上课
|
// 开始上课
|
||||||
startClass(item, classObj) {
|
startClass(item, classObj) {
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
// const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
||||||
// if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
||||||
// 当前上课-store
|
// 当前上课-store
|
||||||
sessionStore.set('activeClass', item)
|
sessionStore.set('activeClass', item)
|
||||||
this.activeClass = item
|
this.activeClass = item
|
||||||
|
@ -321,9 +316,6 @@ 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 === 'aptist') {
|
|
||||||
this.$refs.calssRef.open(item.fileId, classObj)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 继续上课-apt
|
// 继续上课-apt
|
||||||
async changeClass(type, row, other) {
|
async changeClass(type, row, other) {
|
||||||
|
@ -378,28 +370,6 @@ export default {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'click': { // 点击-打开课件-aptist
|
|
||||||
if (row.fileFlag === 'aptist' && !!row.fileId) {
|
|
||||||
const res = await getEntpcoursefile(row.fileId)
|
|
||||||
if (res && res.code === 200) {
|
|
||||||
sessionStore.set('curr.resource', res.data) // 缓存当前资源信息
|
|
||||||
sessionStore.set('curr.smarttalk', row) // 缓存当前文件smarttalk
|
|
||||||
createWindow('open-win', {
|
|
||||||
url: '/pptist', // 窗口关闭时,清除缓存
|
|
||||||
close: () => {
|
|
||||||
sessionStore.set('curr.resource', null) // 清除缓存
|
|
||||||
sessionStore.set('curr.smarttalk', null) // 清除缓存
|
|
||||||
this.asyncAllFile() // 刷新资源列表
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElMessage.warning(res.msg||'文件获取异常!')
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ElMessage.warning('该功能暂未开放!')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -653,7 +623,6 @@ 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 === 'aptist') continue;
|
|
||||||
await asyncLocalFile(item)
|
await asyncLocalFile(item)
|
||||||
}
|
}
|
||||||
this.asyncAllFileVisiable = false
|
this.asyncAllFileVisiable = false
|
||||||
|
@ -682,11 +651,6 @@ export default {
|
||||||
toolStore.curSubjectNode.querySearch = this.uploadData
|
toolStore.curSubjectNode.querySearch = this.uploadData
|
||||||
this.initHomeWork()
|
this.initHomeWork()
|
||||||
await this.asyncAllFile()
|
await this.asyncAllFile()
|
||||||
// 获取当前章节对应的课程信息
|
|
||||||
const params = { evalid: this.currentNode.id, edituserid: this.userStore.userId, pageSize: 1 }
|
|
||||||
const res = await listEntpcourse(params)
|
|
||||||
this.entp = res?.rows?.[0] || null
|
|
||||||
sessionStore.set('curr.entp', this.entp) // 缓存当前课程信息
|
|
||||||
},
|
},
|
||||||
// 获取作业
|
// 获取作业
|
||||||
async initHomeWork() {
|
async initHomeWork() {
|
||||||
|
|
Loading…
Reference in New Issue