zdg #233
|
@ -89,6 +89,8 @@ 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 classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
const classForm = reactive({ // 班级(左侧):表单数据 表单配置
|
||||||
form: {}, itemOption: [], option: {}
|
form: {}, itemOption: [], option: {}
|
||||||
})
|
})
|
||||||
|
@ -137,6 +139,7 @@ const handleClose = async () => {
|
||||||
reset() // 重置数据
|
reset() // 重置数据
|
||||||
await chat?.logout()
|
await chat?.logout()
|
||||||
chat = null
|
chat = null
|
||||||
|
emit('close')
|
||||||
}
|
}
|
||||||
// 初始化-数据
|
// 初始化-数据
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-body-main-item-btn">
|
<div class="prepare-body-main-item-btn">
|
||||||
<el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button>
|
<!-- <el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
|
||||||
<el-button v-else type="primary" @click="clickStartClass(item)">上课</el-button>
|
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-body-main-item-tool">
|
<div class="prepare-body-main-item-tool">
|
||||||
<el-popover
|
<el-popover
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-popover-item">
|
<div class="item-popover-item">
|
||||||
<el-button text @click="deleteTalk(item)" :disabled="activeClassId==item.id">
|
<el-button text @click="deleteTalk(item)">
|
||||||
<i class="iconfont icon-shanchu"></i>
|
<i class="iconfont icon-shanchu"></i>
|
||||||
<span>删除</span>
|
<span>删除</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
:activeClassId="activeClass?.id"
|
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-start-class="startClass"
|
@on-start-class="startClass"
|
||||||
>
|
>
|
||||||
|
@ -161,7 +160,7 @@
|
||||||
@add-success="initReserv"
|
@add-success="initReserv"
|
||||||
></reserv>
|
></reserv>
|
||||||
<!-- 上课配置 -->
|
<!-- 上课配置 -->
|
||||||
<class-start ref="calssRef"/>
|
<class-start ref="calssRef" @close="closeChange"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Check,Plus } from '@element-plus/icons-vue'
|
import { Check,Plus } from '@element-plus/icons-vue'
|
||||||
|
@ -305,10 +304,10 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
startClass(item) {
|
startClass(item) {
|
||||||
// console.log(item, sessionStore)
|
// console.log(item, sessionStore)
|
||||||
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
|
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
||||||
|
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
||||||
if(item.fileFlag === '课件') {
|
if(item.fileFlag === '课件') {
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
|
||||||
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
|
||||||
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
|
||||||
this.openReserv()
|
this.openReserv()
|
||||||
}
|
}
|
||||||
if(item.fileFlag === 'apt') {
|
if(item.fileFlag === 'apt') {
|
||||||
|
@ -319,6 +318,10 @@ export default {
|
||||||
sessionStore.set('activeClass', item)
|
sessionStore.set('activeClass', item)
|
||||||
this.activeClass = item
|
this.activeClass = item
|
||||||
},
|
},
|
||||||
|
closeChange() { // 上课弹窗被关闭-触发
|
||||||
|
this.activeClass = null
|
||||||
|
sessionStore.delete('activeClass')
|
||||||
|
},
|
||||||
initReserv(id) {
|
initReserv(id) {
|
||||||
getClassInfo(id).then((res) => {
|
getClassInfo(id).then((res) => {
|
||||||
this.curClassReserv = res.data
|
this.curClassReserv = res.data
|
||||||
|
|
Loading…
Reference in New Issue