作业批改--学生未提交,老师批阅后批阅数未更新的bug修复

This commit is contained in:
白了个白 2024-09-27 12:49:10 +08:00
parent 2b074df0b5
commit 2e1fe84bcd
3 changed files with 20 additions and 29 deletions

View File

@ -177,8 +177,12 @@ export const createWindow = async (type, data) => {
} }
const option = data.option||{} const option = data.option||{}
const defOption = { const defOption = {
width: 1280,// 1920, // width: 1280,// 1920,
height: 720,// 1080, // height: 720,// 1080,
width: 1450,
minWidth: 1200,
height: 800,
minHeight: 700,
frame: true, // 要创建无边框窗口 frame: true, // 要创建无边框窗口
// resizable: true, // 禁止窗口大小缩放 // resizable: true, // 禁止窗口大小缩放
alwaysOnTop: false, // 窗口是否总是显示在其他窗口之前 alwaysOnTop: false, // 窗口是否总是显示在其他窗口之前

View File

@ -57,21 +57,20 @@
></el-empty> ></el-empty>
</div> </div>
</div> </div>
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog> <!-- <item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog> -->
</el-container> </el-container>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, onUnmounted, computed, watch, reactive } from 'vue' import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
import { listByDeadDate, listClassworkdataByDeadDate, listClassworkdata } from '@/api/classTask' import { listByDeadDate, listClassworkdata } from '@/api/classTask'
import TaskItem from '@/views/classTask/container/task-item.vue' import TaskItem from '@/views/classTask/container/task-item.vue'
import ItemDialog from '@/views/classTask/container/item-dialog.vue' // import ItemDialog from '@/views/classTask/container/item-dialog.vue'
import { useToolState } from '@/store/modules/tool' import { useToolState } from '@/store/modules/tool'
import { getCurrentTime, getTomorrow } from '@/utils/date' import { getCurrentTime, getTomorrow } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useClassTaskStore from "@/store/modules/classTask"; import useClassTaskStore from "@/store/modules/classTask";
import { useGetHomework } from '@/hooks/useGetHomework'
import {sessionStore, createWindow} from '@/utils/tool' import {sessionStore, createWindow} from '@/utils/tool'
@ -79,7 +78,7 @@ const toolState = useToolState();
const classTaskStore = useClassTaskStore() const classTaskStore = useClassTaskStore()
const userStore = useUserStore().user const userStore = useUserStore().user
const itemDialogRef = ref(null) // const itemDialogRef = ref(null)
const tabOptions = ref(['进行中', '已结束']) const tabOptions = ref(['进行中', '已结束'])
const tabActive = ref('进行中') const tabActive = ref('进行中')
const dataList = ref([]) const dataList = ref([])
@ -345,7 +344,7 @@ const pollingST = ref(null) //轮询定时器标识
onMounted(() => { onMounted(() => {
getData() // getData() //
// //
getStudentClassWorkDataPolling() closeDialog();
}) })
// //
@ -359,6 +358,7 @@ const getStudentClassWorkDataPolling = () => {
} }
const closeDialog = () => { const closeDialog = () => {
clearInterval(pollingST.value) //
getStudentClassWorkDataPolling() getStudentClassWorkDataPolling()
} }
@ -430,6 +430,11 @@ const getStudentVisible = async () => {
// //
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
} else { } else {
//
if(curWork && curWork.workdataresultcount == 0){
//
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
}
classWorkList.value[t].finishpercent = 0 classWorkList.value[t].finishpercent = 0
} }
} }
@ -442,8 +447,9 @@ const getStudentVisible = async () => {
watch( watch(
() => [dataList, toolState.isTaskWin], () => [dataList, toolState.isTaskWin],
() => { () => {
console.log('=监听到批改窗口打开了===', toolState) console.log('=监听到批改窗口打开了===', toolState.isTaskWin)
if(!toolState.isTaskWin){ if(!toolState.isTaskWin){
closeDialog();// closeDialog();//
} }
} }

View File

@ -14,7 +14,6 @@
&nbsp;|&nbsp; 截止时间{{ item.deaddate }} &nbsp;|&nbsp;{{ tabactive }} &nbsp;|&nbsp; 截止时间{{ item.deaddate }} &nbsp;|&nbsp;{{ tabactive }}
</div> </div>
</div> </div>
<!-- <el-switch v-model="value1" active-text="云同步"> </el-switch> -->
<div class="class-reserv-item-tool"> <div class="class-reserv-item-tool">
<span> <span>
<span v-if="item.workdataresultcount!=0" style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultcount }}</span> <span v-if="item.workdataresultcount!=0" style="color:#000fff; font-weight: 900; font-size: 15px">{{ item.workdataresultcount }}</span>
@ -68,24 +67,6 @@ const props = defineProps({
default: () => '' default: () => ''
} }
}) })
import { ref, reactive } from 'vue'
const value1 = ref(true);
const basePath = import.meta.env.VITE_APP_BUILD_BASE_PATH
const toolStore = useToolState() // -tool
const openEdit = () => {
emit('openEdit', props.item)
}
const deleteReserv = () => {
deleteSmartReserv([props.item.id]).then((res) => {
if (res.data === true) {
ElMessage({
message: '删除成功',
type: 'success'
})
emit('deleteReserv', props.item)
}
})
}
</script> </script>