工作台-作业批改界面更改
This commit is contained in:
parent
c78c166044
commit
065e215a81
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue