提交 27e703f5 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复考试不回显的问题

上级 58f1ef51
......@@ -42,7 +42,7 @@ onMounted(() => {
<template>
<section class="drag-panel">
<div v-show="!isLeftShow" class="drag-panel-left" :class="{ 'is-hidden': !leftPanelVisible }">
<div v-if="!isLeftShow" class="drag-panel-left" :class="{ 'is-hidden': !leftPanelVisible }">
<div class="drag-cover" v-if="dragFlag"></div>
<slot name="left"></slot>
<div class="panel-resize" id="panel-resize"></div>
......
......@@ -7,8 +7,13 @@ const appConfig = useAppConfig()
interface Props {
experiment_id: string
examStatus?: number
showInfo?: boolean
showIframe?: boolean
}
const props = defineProps<Props>()
const props = withDefaults(defineProps<Props>(), {
showInfo: true,
showIframe: false,
})
const model = defineModel()
const emits = defineEmits(['empty'])
......@@ -50,15 +55,19 @@ watchEffect(() => {
<template>
<template v-if="currentExam">
<el-form label-suffix=":" label-position="top" v-if="appConfig.system !== 'x'">
<el-form label-suffix=":" label-position="top" v-if="showInfo">
<el-form-item label="考试名称">{{ currentExam.exam_info.name }}</el-form-item>
<el-form-item label="考试时间"
>{{ currentExam.exam_info.start_time }}{{ currentExam.exam_info.end_time }}</el-form-item
>
</el-form>
<div style="width: 100%; height: 100%">
<iframe style="width: 100%; height: 100%" allowfullscreen class="iframe" :src="examURL" frameborder="0"></iframe>
</div>
<iframe
style="width: 100%; height: 100%"
allowfullscreen
class="iframe"
:src="examURL"
frameborder="0"
v-if="showIframe"></iframe>
</template>
<el-empty description="暂无数据" v-else />
</template>
......@@ -353,6 +353,16 @@ function handleEmpty(name: string) {
description="您已经提交该实验,不能再进行操作,切换其他实验再做操作吧。"
style="flex: 1"
v-if="submitted" />
<template v-else>
<template v-if="experimentInfo?.exam_status === 1 && tabActive === 'exam'">
<Exam
v-model="examURL"
:showInfo="false"
:showIframe="true"
:experiment_id="form.experiment_id"
:examStatus="experimentInfo?.exam_status"
@empty="handleEmpty('exam')"></Exam>
</template>
<template v-else>
<iframe
allow="camera; microphone"
......@@ -363,11 +373,12 @@ function handleEmpty(name: string) {
class="iframe"
ref="iframeRef"></iframe>
<div
style="padding: 10px; background-color: #fff; max-width: 300px; min-width: 300px"
style="padding: 10px; background-color: #fff; width: 300px"
v-if="experimentInfo?.exam_status === 1 && tabActive === 'qa'">
<Question :experiment_id="form.experiment_id" :exam_status="experimentInfo?.exam_status"></Question>
</div>
</template>
</template>
</div>
</template>
</DragPanel>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论