恢复修改

This commit is contained in:
zdg 2024-09-20 13:53:42 +08:00
parent c5075af2fc
commit 4ab4d5dff2
3 changed files with 14 additions and 8 deletions

View File

@ -89,6 +89,8 @@ const userStore = useUserStore()
const visible = ref(false) //
const myClassActive = ref({}) // APT
const imChatRef = ref(null) // im-chat ref
const emit = defineEmits(['close'])
const classForm = reactive({ // ()
form: {}, itemOption: [], option: {}
})
@ -137,6 +139,7 @@ const handleClose = async () => {
reset() //
await chat?.logout()
chat = null
emit('close')
}
// -
const initData = () => {

View File

@ -52,8 +52,8 @@
</div>
</div>
<div class="prepare-body-main-item-btn">
<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 v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
</div>
<div class="prepare-body-main-item-tool">
<el-popover
@ -74,7 +74,7 @@
</el-button>
</div>
<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>
<span>删除</span>
</el-button>

View File

@ -20,7 +20,6 @@
:key="index"
:item="item"
:index="index"
:activeClassId="activeClass?.id"
@on-delete="deleteTalk"
@on-start-class="startClass"
>
@ -161,7 +160,7 @@
@add-success="initReserv"
></reserv>
<!-- 上课配置 -->
<class-start ref="calssRef"/>
<class-start ref="calssRef" @close="closeChange"/>
</template>
<script setup>
import { Check,Plus } from '@element-plus/icons-vue'
@ -305,10 +304,10 @@ export default {
methods: {
startClass(item) {
// 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 === '课件') {
// ()
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
this.openReserv()
}
if(item.fileFlag === 'apt') {
@ -319,6 +318,10 @@ export default {
sessionStore.set('activeClass', item)
this.activeClass = item
},
closeChange() { // -
this.activeClass = null
sessionStore.delete('activeClass')
},
initReserv(id) {
getClassInfo(id).then((res) => {
this.curClassReserv = res.data