|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div v-if="!hidePanel" :class="['panel', { active: visible }]" id="panel" ref="container" :style="style"> |
|
|
|
<div v-if="!hidePanel" :class="['panel', { active: visible }]" id="panel" ref="container" :style="style" v-loading="loading"> |
|
|
|
<el-container class="scrollbar" id="container" v-show="visible"> |
|
|
|
<el-container class="scrollbar" id="container" v-show="visible"> |
|
|
|
<el-header class="panel-header" id="panelHeader"> |
|
|
|
<el-header class="panel-header" id="panelHeader"> |
|
|
|
<div class="project"> |
|
|
|
<div class="project"> |
|
|
@ -130,7 +130,7 @@ |
|
|
|
<el-icon class="cursor-pointer" color="#f1772b" :size="24"> |
|
|
|
<el-icon class="cursor-pointer" color="#f1772b" :size="24"> |
|
|
|
<Rank id="toggle" /> |
|
|
|
<Rank id="toggle" /> |
|
|
|
</el-icon> |
|
|
|
</el-icon> |
|
|
|
<div class="toggle-panel w-[40px] h-[175px] bg-[length:100%_100%] bg-no-repeat cursor-pointer" :class="{ active: visible }" ref="handle" @click="visible = !visible"></div> |
|
|
|
<div class="toggle-panel w-[40px] h-[175px] bg-[length:100%_100%] bg-no-repeat cursor-pointer" :class="{ active: visible }" ref="handle" @click="pannelToggle"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="isSubmit && !isReport" class="z-[199] fixed top-[64px] right-0 bottom-0 left-0 bg-[rgba(0,0,0,.3)]"></div> |
|
|
|
<div v-if="isSubmit && !isReport" class="z-[199] fixed top-[64px] right-0 bottom-0 left-0 bg-[rgba(0,0,0,.3)]"></div> |
|
|
@ -150,7 +150,7 @@ import Cookies from 'js-cookie'; |
|
|
|
import { mavonEditor } from 'mavon-editor'; |
|
|
|
import { mavonEditor } from 'mavon-editor'; |
|
|
|
import 'mavon-editor/dist/css/index.css'; |
|
|
|
import 'mavon-editor/dist/css/index.css'; |
|
|
|
import '@vueup/vue-quill/dist/vue-quill.snow.css'; |
|
|
|
import '@vueup/vue-quill/dist/vue-quill.snow.css'; |
|
|
|
import { useDraggable } from '@vueuse/core'; |
|
|
|
import { useDraggable, useWindowSize, Position } from '@vueuse/core'; |
|
|
|
import { logout } from '@/store/useCurrentUser'; |
|
|
|
import { logout } from '@/store/useCurrentUser'; |
|
|
|
import { getNow } from '@/utils/common'; |
|
|
|
import { getNow } from '@/utils/common'; |
|
|
|
|
|
|
|
|
|
|
@ -180,20 +180,23 @@ const judgmentId = ref<string | number>(''); |
|
|
|
const curReq = ref<Record<string, any>[]>([]); |
|
|
|
const curReq = ref<Record<string, any>[]>([]); |
|
|
|
const taskList = ref<Record<string, any>[]>([]); |
|
|
|
const taskList = ref<Record<string, any>[]>([]); |
|
|
|
const pannelTab = ref<string>('first'); |
|
|
|
const pannelTab = ref<string>('first'); |
|
|
|
|
|
|
|
const loading = ref<boolean>(false); |
|
|
|
const submiting = ref<boolean>(false); |
|
|
|
const submiting = ref<boolean>(false); |
|
|
|
const reportId = ref<string | number>(''); |
|
|
|
const reportId = ref<string | number>(''); |
|
|
|
const countVal = ref<any>(''); |
|
|
|
const countVal = ref<any>(''); |
|
|
|
const getLevel = ref(); |
|
|
|
const getLevel = ref(); |
|
|
|
const container = ref<HTMLElement | null>(null); |
|
|
|
const container = ref<HTMLElement | null>(null); |
|
|
|
const handle = ref<HTMLElement | null>(null); |
|
|
|
const handle = ref<HTMLElement | null>(null); |
|
|
|
|
|
|
|
const { width, height } = useWindowSize(); |
|
|
|
// 实验面板拖拽 |
|
|
|
// 实验面板拖拽 |
|
|
|
const { x, y, style } = useDraggable(container, { |
|
|
|
const { x, y, style } = useDraggable(container, { |
|
|
|
initialValue: { x: 0, y: 200 }, |
|
|
|
initialValue: { x: 0, y: 200 }, |
|
|
|
stopPropagation: true, |
|
|
|
stopPropagation: true, |
|
|
|
handle: handle.value, |
|
|
|
handle: handle.value, |
|
|
|
onStart(position, e) { |
|
|
|
onStart: (p: Position, e: PointerEvent): boolean => { |
|
|
|
const { id } = e.target; |
|
|
|
const { id } = e.target; |
|
|
|
if (id !== 'panelHeader' && id !== 'toggle') return false; |
|
|
|
if (id !== 'panelHeader' && id !== 'toggle') return false; |
|
|
|
|
|
|
|
return true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -507,6 +510,11 @@ let reloadConfirm = async () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
let pannelToggle = () => { |
|
|
|
|
|
|
|
visible.value = !visible.value; |
|
|
|
|
|
|
|
x.value = 0; |
|
|
|
|
|
|
|
y.value = 200; |
|
|
|
|
|
|
|
}; |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
let submit = async () => { |
|
|
|
let submit = async () => { |
|
|
|
if (!submiting.value) { |
|
|
|
if (!submiting.value) { |
|
|
@ -597,6 +605,8 @@ let confirmSubmit = () => { |
|
|
|
|
|
|
|
|
|
|
|
// 获取项目详情 |
|
|
|
// 获取项目详情 |
|
|
|
let getProDetail = async () => { |
|
|
|
let getProDetail = async () => { |
|
|
|
|
|
|
|
loading.value = true; |
|
|
|
|
|
|
|
try { |
|
|
|
const res = await getProjectDetail({ |
|
|
|
const res = await getProjectDetail({ |
|
|
|
projectId: param.projectId, |
|
|
|
projectId: param.projectId, |
|
|
|
stuAssessent: 1, |
|
|
|
stuAssessent: 1, |
|
|
@ -629,6 +639,9 @@ let getProDetail = async () => { |
|
|
|
countVal.value = (isPrac ? now - entryTime.value : new Date(param.stopTime).getTime() - now) / 1000; // 如果是考核,取考核的结束时间减去当前时间去做倒计时,练习则直接取当前时间减去上次进来的时间做计时 |
|
|
|
countVal.value = (isPrac ? now - entryTime.value : new Date(param.stopTime).getTime() - now) / 1000; // 如果是考核,取考核的结束时间减去当前时间去做倒计时,练习则直接取当前时间减去上次进来的时间做计时 |
|
|
|
startCount(); |
|
|
|
startCount(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
loading.value = false; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 获取项目列表 |
|
|
|
// 获取项目列表 |
|
|
@ -722,6 +735,7 @@ onMounted(init); |
|
|
|
onUnmounted(() => { |
|
|
|
onUnmounted(() => { |
|
|
|
counter = null; |
|
|
|
counter = null; |
|
|
|
submit = null; |
|
|
|
submit = null; |
|
|
|
|
|
|
|
pannelToggle = null; |
|
|
|
setHeartbeatDetection = null; |
|
|
|
setHeartbeatDetection = null; |
|
|
|
getProDetail = null; |
|
|
|
getProDetail = null; |
|
|
|
getCache = null; |
|
|
|
getCache = null; |
|
|
|