作业批改--学生未提交,老师批阅后批阅数未更新的bug修复
This commit is contained in:
parent
2b074df0b5
commit
2e1fe84bcd
|
@ -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, // 窗口是否总是显示在其他窗口之前
|
||||||
|
|
|
@ -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();// 开启轮询
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
| 截止时间:{{ item.deaddate }} | {{ tabactive }}
|
| 截止时间:{{ item.deaddate }} | {{ 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>
|
||||||
|
|
Loading…
Reference in New Issue