baigl #281
|
@ -177,8 +177,12 @@ export const createWindow = async (type, data) => {
|
|||
}
|
||||
const option = data.option||{}
|
||||
const defOption = {
|
||||
width: 1280,// 1920,
|
||||
height: 720,// 1080,
|
||||
// width: 1280,// 1920,
|
||||
// height: 720,// 1080,
|
||||
width: 1450,
|
||||
minWidth: 1200,
|
||||
height: 800,
|
||||
minHeight: 700,
|
||||
frame: true, // 要创建无边框窗口
|
||||
// resizable: true, // 禁止窗口大小缩放
|
||||
alwaysOnTop: false, // 窗口是否总是显示在其他窗口之前
|
||||
|
|
|
@ -57,21 +57,20 @@
|
|||
></el-empty>
|
||||
</div>
|
||||
</div>
|
||||
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
|
||||
<!-- <item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog> -->
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, computed, watch, reactive } from 'vue'
|
||||
import { listByDeadDate, listClassworkdataByDeadDate, listClassworkdata } from '@/api/classTask'
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
||||
import { listByDeadDate, listClassworkdata } from '@/api/classTask'
|
||||
|
||||
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 { getCurrentTime, getTomorrow } from '@/utils/date'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useClassTaskStore from "@/store/modules/classTask";
|
||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||
import {sessionStore, createWindow} from '@/utils/tool'
|
||||
|
||||
|
||||
|
@ -79,7 +78,7 @@ const toolState = useToolState();
|
|||
|
||||
const classTaskStore = useClassTaskStore()
|
||||
const userStore = useUserStore().user
|
||||
const itemDialogRef = ref(null)
|
||||
// const itemDialogRef = ref(null)
|
||||
const tabOptions = ref(['进行中', '已结束'])
|
||||
const tabActive = ref('进行中')
|
||||
const dataList = ref([])
|
||||
|
@ -345,7 +344,7 @@ const pollingST = ref(null) //轮询定时器标识
|
|||
onMounted(() => {
|
||||
getData() // 加载数据
|
||||
// 轮询查询
|
||||
getStudentClassWorkDataPolling()
|
||||
closeDialog();
|
||||
})
|
||||
|
||||
// 轮询查询 学生作业进度
|
||||
|
@ -359,6 +358,7 @@ const getStudentClassWorkDataPolling = () => {
|
|||
}
|
||||
|
||||
const closeDialog = () => {
|
||||
clearInterval(pollingST.value) // 关闭轮询
|
||||
getStudentClassWorkDataPolling()
|
||||
}
|
||||
|
||||
|
@ -430,6 +430,11 @@ const getStudentVisible = async () => {
|
|||
// 更新批阅数
|
||||
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
|
||||
} else {
|
||||
// 学生未完成,但是老师批改了?
|
||||
if(curWork && curWork.workdataresultcount == 0){
|
||||
// 更新批改数
|
||||
classWorkList.value[t].teacherrationgcount = curWork.teacherrationgcount
|
||||
}
|
||||
classWorkList.value[t].finishpercent = 0
|
||||
}
|
||||
}
|
||||
|
@ -442,8 +447,9 @@ const getStudentVisible = async () => {
|
|||
watch(
|
||||
() => [dataList, toolState.isTaskWin],
|
||||
() => {
|
||||
console.log('=监听到批改窗口打开了===', toolState)
|
||||
console.log('=监听到批改窗口打开了===', toolState.isTaskWin)
|
||||
if(!toolState.isTaskWin){
|
||||
|
||||
closeDialog();// 开启轮询
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
| 截止时间:{{ item.deaddate }} | {{ tabactive }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-switch v-model="value1" active-text="云同步"> </el-switch> -->
|
||||
<div class="class-reserv-item-tool">
|
||||
<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: () => ''
|
||||
}
|
||||
})
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue