Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
844d951a
提交
844d951a
authored
4月 21, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
2bbb9c98
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
14 行删除
+19
-14
ContestItem.vue
src/modules/student/contest/components/ContestItem.vue
+5
-6
Lab.vue
src/modules/student/contest/views/Lab.vue
+10
-6
Score.vue
src/modules/student/contest/views/Score.vue
+4
-2
没有找到文件。
src/modules/student/contest/components/ContestItem.vue
浏览文件 @
844d951a
...
@@ -22,11 +22,10 @@ const typeText = $computed(() => {
...
@@ -22,11 +22,10 @@ const typeText = $computed(() => {
const
canTrain
=
$computed
(()
=>
{
const
canTrain
=
$computed
(()
=>
{
return
dayjs
().
isBefore
(
dayjs
(
parseInt
(
props
.
data
.
end_at
)
*
1000
))
return
dayjs
().
isBefore
(
dayjs
(
parseInt
(
props
.
data
.
end_at
)
*
1000
))
})
})
function
handleTrain
(
url
:
string
)
{
function
handleTrain
(
id
:
string
,
type
:
string
)
{
window
.
open
(
url
)
// 训练计数
// 训练计数
// updateTrainCount({ competition_id: props.data.
id })
updateTrainCount
({
competition_id
:
id
})
// router.push({ path: `/student/contest/lab/${props.data.id}`
})
router
.
push
({
path
:
`/student/contest/lab/
${
id
}
`
,
query
:
{
type
:
type
}
})
}
}
// 是否可以报名
// 是否可以报名
const
canJoin
=
$computed
(()
=>
{
const
canJoin
=
$computed
(()
=>
{
...
@@ -62,12 +61,12 @@ function formatDate(value: string) {
...
@@ -62,12 +61,12 @@ function formatDate(value: string) {
<div
style=
"display: flex; flex-wrap: wrap"
>
<div
style=
"display: flex; flex-wrap: wrap"
>
<template
v-for=
"item in data.train_platform_configs"
>
<template
v-for=
"item in data.train_platform_configs"
>
<el-button
<el-button
v-if=
"item.is_show === '1'"
v-if=
"item.is_show === '1'
&& canTrain
"
style=
"margin-bottom: 10px"
style=
"margin-bottom: 10px"
:key=
"item"
:key=
"item"
round
round
type=
"primary"
type=
"primary"
@
click=
"handleTrain(item.
url
)"
@
click=
"handleTrain(item.
competition_id, item.platform_key
)"
>
{{
item
.
name
}}
</el-button
>
{{
item
.
name
}}
</el-button
>
>
</
template
>
</
template
>
...
...
src/modules/student/contest/views/Lab.vue
浏览文件 @
844d951a
...
@@ -12,6 +12,8 @@ const Video = defineAsyncComponent(() => import('../components/Video.vue'))
...
@@ -12,6 +12,8 @@ const Video = defineAsyncComponent(() => import('../components/Video.vue'))
const
Discuss
=
defineAsyncComponent
(()
=>
import
(
'../components/Discuss.vue'
))
const
Discuss
=
defineAsyncComponent
(()
=>
import
(
'../components/Discuss.vue'
))
const
Result
=
defineAsyncComponent
(()
=>
import
(
'../components/Result.vue'
))
const
Result
=
defineAsyncComponent
(()
=>
import
(
'../components/Result.vue'
))
const
route
=
useRoute
()
interface
Props
{
interface
Props
{
id
:
string
id
:
string
}
}
...
@@ -106,6 +108,12 @@ let resizeKey = $ref(0)
...
@@ -106,6 +108,12 @@ let resizeKey = $ref(0)
function
handleResize
()
{
function
handleResize
()
{
resizeKey
=
Date
.
now
()
resizeKey
=
Date
.
now
()
}
}
const
competitionUrl
=
computed
(()
=>
{
const
item
=
competition
?.
train_platform_configs
.
find
((
item
:
any
)
=>
item
.
platform_key
===
route
.
query
?.
type
)
console
.
log
(
item
,
'ite,'
,
competition
?.
train_platform_configs
)
return
item
?.
url
})
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -139,12 +147,8 @@ function handleResize() {
...
@@ -139,12 +147,8 @@ function handleResize() {
</el-row>
</el-row>
</AppCard>
</AppCard>
<div
class=
"lab-box"
>
<div
class=
"lab-box"
>
<iframe
{{
competitionUrl
}}
:src=
"competition?.train_platform_uri"
<iframe
:src=
"competitionUrl"
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
></iframe>
:key=
"iframeKey"
frameborder=
"0"
class=
"iframe"
ref=
"iframeRef"
></iframe>
</div>
</div>
</
template
>
</
template
>
</DragPanel>
</DragPanel>
...
...
src/modules/student/contest/views/Score.vue
浏览文件 @
844d951a
...
@@ -7,8 +7,10 @@ let eventOption: any = $ref([])
...
@@ -7,8 +7,10 @@ let eventOption: any = $ref([])
onMounted
(()
=>
{
onMounted
(()
=>
{
getMyContestList
().
then
((
res
:
any
)
=>
{
getMyContestList
().
then
((
res
:
any
)
=>
{
eventOption
=
res
.
data
.
list
eventOption
=
res
.
data
.
list
eventValue
=
eventOption
[
0
].
id
eventValue
=
eventOption
[
0
]?.
id
scoreReport
()
if
(
eventValue
)
{
scoreReport
()
}
})
})
})
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论