baigl #281

Merged
baigl merged 6 commits from baigl into main 2024-09-27 12:52:59 +08:00
1 changed files with 19 additions and 10 deletions
Showing only changes of commit 065e215a81 - Show all commits

View File

@ -28,20 +28,20 @@
</ul>
</el-scrollbar>
</div>
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, watch } from 'vue'
import useUserStore from '@/store/modules/user'
import { homeworklist } from '@/api/teaching/classwork'
import { getCurrentTime, getTomorrow } from '@/utils/date'
import ItemDialog from '@/views/classTask/container/item-dialog.vue'
import {sessionStore, createWindow} from '@/utils/tool'
import { useToolState } from '@/store/modules/tool'
const user = useUserStore().user
const toolState = useToolState();
const loading = ref(false)
const homeworkList = ref([])
const itemDialogRef = ref(null)
//
const getHomework = async () => {
@ -70,12 +70,11 @@ const getHomework = async () => {
//
const onClickItem = (item) => {
console.log('开启弹窗')
itemDialogRef.value.openDialog(item)
}
//
const closeDialog = () => {
console.log('关闭弹窗,查询一下作业数据,更新界面')
getHomework()
// itemDialogRef.value.openDialog(item)
//
sessionStore.set('teachClassWorkItem', item)
toolState.isTaskWin=true //
createWindow('open-taskwin',{url:'/teachClassTask'})
}
const tagType = (time) => {
@ -86,6 +85,16 @@ const tagType = (time) => {
onMounted(() => {
getHomework()
})
watch(
() => [toolState.isTaskWin],
() => {
console.log('=监听到批改窗口是否关闭了===', toolState.isTaskWin)
if(!toolState.isTaskWin){
getHomework()//
}
}
)
</script>
<style lang="scss" scoped>