Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
6f0af871
提交
6f0af871
authored
4月 26, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
8c4e7894
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
7 行删除
+39
-7
Book.vue
src/modules/student/contest/components/Book.vue
+5
-5
Lab.vue
src/modules/student/contest/views/Lab.vue
+34
-2
没有找到文件。
src/modules/student/contest/components/Book.vue
浏览文件 @
6f0af871
...
@@ -17,7 +17,7 @@ function fetchInfo() {
...
@@ -17,7 +17,7 @@ function fetchInfo() {
list
=
res
.
data
.
items
list
=
res
.
data
.
items
})
})
}
}
watchEffect
(()
=>
{
onMounted
(()
=>
{
fetchInfo
()
fetchInfo
()
})
})
...
@@ -37,7 +37,6 @@ let show = $ref(false)
...
@@ -37,7 +37,6 @@ let show = $ref(false)
function
handleView
(
row
:
ExperimentBookType
)
{
function
handleView
(
row
:
ExperimentBookType
)
{
currentRaw
=
row
currentRaw
=
row
currentRawUrl
=
row
.
url
?
(
JSON
.
parse
(
row
.
url
)?.
url
as
string
)
:
''
currentRawUrl
=
row
.
url
?
(
JSON
.
parse
(
row
.
url
)?.
url
as
string
)
:
''
console
.
log
(
row
,
'row'
)
show
=
true
show
=
true
}
}
// 关闭
// 关闭
...
@@ -51,14 +50,15 @@ function handleClose() {
...
@@ -51,14 +50,15 @@ function handleClose() {
<template
v-else
>
<template
v-else
>
<Preview
:url=
"file.url"
></Preview>
<Preview
:url=
"file.url"
></Preview>
</
template
>
-->
</
template
>
-->
<
div
v-if=
"list.length"
>
<
template
v-if=
"list.length"
>
<ul
class=
"book-list"
>
<ul
class=
"book-list"
v-if=
"list.length != 1"
>
<li
v-for=
"item in list"
:key=
"item.id"
@
click=
"handleView(item)"
>
<li
v-for=
"item in list"
:key=
"item.id"
@
click=
"handleView(item)"
>
<el-icon><Document
/></el-icon>
<el-icon><Document
/></el-icon>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
name
}}
</p>
</li>
</li>
</ul>
</ul>
</div>
<Preview
:url=
"list[0] ? JSON.parse(list[0].url)?.url : ''"
v-else
></Preview>
</
template
>
<el-empty
description=
"暂无数据"
v-else
/>
<el-empty
description=
"暂无数据"
v-else
/>
<!-- 预览 -->
<!-- 预览 -->
<div
class=
"book-preview"
v-if=
"show && currentRaw"
>
<div
class=
"book-preview"
v-if=
"show && currentRaw"
>
...
...
src/modules/student/contest/views/Lab.vue
浏览文件 @
6f0af871
...
@@ -116,6 +116,11 @@ const competitionUrl = computed(() => {
...
@@ -116,6 +116,11 @@ const competitionUrl = computed(() => {
const
url
=
item
?.
url
||
''
const
url
=
item
?.
url
||
''
return
url
.
includes
(
'?'
)
?
`
${
url
}
&token=
${
cookies
.
get
(
'TGC'
)}
`
:
`
${
url
}
?token=
${
cookies
.
get
(
'TGC'
)}
`
return
url
.
includes
(
'?'
)
?
`
${
url
}
&token=
${
cookies
.
get
(
'TGC'
)}
`
:
`
${
url
}
?token=
${
cookies
.
get
(
'TGC'
)}
`
})
})
let
isHeadShow
=
$ref
(
true
)
const
handleShowHead
=
function
()
{
isHeadShow
=
!
isHeadShow
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -125,7 +130,8 @@ const competitionUrl = computed(() => {
...
@@ -125,7 +130,8 @@ const competitionUrl = computed(() => {
<h1>
{{
competition
?.
name
}}
</h1>
<h1>
{{
competition
?.
name
}}
</h1>
<el-tabs
type=
"border-card"
>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"实训指导"
lazy
>
<el-tab-pane
label=
"实训指导"
lazy
>
<Book
:competition_id=
"id"
:key=
"resizeKey"
></Book>
<!--
<Book
:competition_id=
"id"
:key=
"resizeKey"
></Book>
-->
<Book
:competition_id=
"id"
></Book>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"操作视频"
lazy
>
<el-tab-pane
label=
"操作视频"
lazy
>
<Video
:competition_id=
"id"
></Video>
<Video
:competition_id=
"id"
></Video>
...
@@ -140,7 +146,7 @@ const competitionUrl = computed(() => {
...
@@ -140,7 +146,7 @@ const competitionUrl = computed(() => {
</div>
</div>
</
template
>
</
template
>
<
template
#
right
>
<
template
#
right
>
<AppCard>
<AppCard
v-if=
"isHeadShow"
>
<el-row
justify=
"space-between"
>
<el-row
justify=
"space-between"
>
<el-button
type=
"primary"
:icon=
"HomeFilled"
@
click=
"handleBackHome"
>
返回首页
</el-button>
<el-button
type=
"primary"
:icon=
"HomeFilled"
@
click=
"handleBackHome"
>
返回首页
</el-button>
<div>
<div>
...
@@ -149,6 +155,24 @@ const competitionUrl = computed(() => {
...
@@ -149,6 +155,24 @@ const competitionUrl = computed(() => {
</el-row>
</el-row>
</AppCard>
</AppCard>
<div
class=
"lab-box"
>
<div
class=
"lab-box"
>
<div
class=
"close-btn"
@
click=
"handleShowHead"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 86"
aria-hidden=
"true"
width=
"16"
height=
"66"
>
<g
fill=
"none"
fill-rule=
"evenodd"
>
<path
class=
"path-wapper"
d=
"M0 0l14.12 8.825A4 4 0 0116 12.217v61.566a4 4 0 01-1.88 3.392L0 86V0z"
fill=
"#f8f9fa"
></path>
<path
class=
"path-arrow"
style=
"transform: rotate(180deg); transform-origin: center"
d=
"M10.758 48.766a.778.778 0 000-1.127L6.996 43l3.762-4.639a.778.778 0 000-1.127.85.85 0 00-1.172 0l-4.344 5.202a.78.78 0 000 1.128l4.344 5.202a.85.85 0 001.172 0z"
fill=
"#8D9EA7"
fill-rule=
"nonzero"
></path>
</g>
</svg>
</div>
<iframe
:src=
"competitionUrl"
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
></iframe>
<iframe
:src=
"competitionUrl"
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
></iframe>
</div>
</div>
</
template
>
</
template
>
...
@@ -156,6 +180,14 @@ const competitionUrl = computed(() => {
...
@@ -156,6 +180,14 @@ const competitionUrl = computed(() => {
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.close-btn
{
cursor
:
pointer
;
position
:
absolute
;
top
:
-40px
;
right
:
45px
;
transform
:
rotate
(
270deg
);
transform-origin
:
center
;
}
.lab-left
{
.lab-left
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论