工作台-作业批改界面更改

This commit is contained in:
白了个白 2024-09-27 11:20:48 +08:00
parent c78c166044
commit 065e215a81
1 changed files with 19 additions and 10 deletions

View File

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