Compare commits

..

No commits in common. "df474db4a55772d3beb5217de2fcca2b22c333c6" and "8ad041e963c5fc426e9a143958028f9fb840bcc8" have entirely different histories.

7 changed files with 15 additions and 101 deletions

View File

@ -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

View File

@ -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)
}
} }

View File

@ -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]

View File

@ -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

View File

@ -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) //
}
})
}
// //
// ================== ======================= // ================== =======================

View File

@ -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) => {

View File

@ -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() {