Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
462806c0
提交
462806c0
authored
9月 21, 2024
作者:
haodaking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
57445086
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
10 行删除
+22
-10
useAppConfig.ts
src/composables/useAppConfig.ts
+9
-3
FormDialog.vue
src/modules/admin/contest/items/components/FormDialog.vue
+4
-2
Index.vue
src/modules/student/contest/views/Index.vue
+4
-1
Lab.vue
src/modules/student/contest/views/Lab.vue
+5
-4
没有找到文件。
src/composables/useAppConfig.ts
浏览文件 @
462806c0
...
...
@@ -76,7 +76,10 @@ const appConfigList = [
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
import
.
meta
.
env
.
VITE_SWSJFXS_LOGIN_URL
loginURL
:
import
.
meta
.
env
.
VITE_SWSJFXS_LOGIN_URL
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
// 隐藏大赛工具栏
},
{
system
:
'amo'
,
...
...
@@ -93,12 +96,15 @@ const appConfigList = [
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
import
.
meta
.
env
.
VITE_SWSJFXS_LOGIN_URL
loginURL
:
import
.
meta
.
env
.
VITE_SWSJFXS_LOGIN_URL
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
// 隐藏大赛工具栏
}
]
export
function
useAppConfig
()
{
const
found
=
appConfigList
.
toReversed
().
find
(
item
=>
{
const
found
=
[...
appConfigList
].
reverse
().
find
(
item
=>
{
return
item
.
hosts
.
find
(
host
=>
location
.
host
.
includes
(
host
))
})
...
...
src/modules/admin/contest/items/components/FormDialog.vue
浏览文件 @
462806c0
...
...
@@ -315,7 +315,8 @@ const clientList = [
v-for=
"item in form.train_platform_configs"
:key=
"item.platform_key"
>
<div
style=
"display: flex; align-items: center"
>
<span
style=
"margin-right: 10px; width: 180px"
>
{{
item
.
name
}}
</span>
<!--
<span
style=
"margin-right: 10px; width: 180px"
>
{{
item
.
name
}}
</span>
-->
<el-input
v-model=
"item.name"
style=
"margin-right: 10px; width: 200px"
/>
<el-input
v-model=
"item.url"
/>
</div>
</el-checkbox>
...
...
@@ -329,7 +330,8 @@ const clientList = [
v-for=
"item in form.competition_platform_configs"
:key=
"item.platform_key"
>
<div
style=
"display: flex; align-items: center"
>
<span
style=
"margin-right: 10px; width: 180px"
>
{{
item
.
name
}}
</span>
<!--
<span
style=
"margin-right: 10px; width: 180px"
>
{{
item
.
name
}}
</span>
-->
<el-input
v-model=
"item.name"
style=
"margin-right: 10px; width: 200px"
/>
<el-input
v-model=
"item.url"
/>
</div>
</el-checkbox>
...
...
src/modules/student/contest/views/Index.vue
浏览文件 @
462806c0
...
...
@@ -2,6 +2,9 @@
import
type
{
Contest
}
from
'../types'
import
ContestItem
from
'../components/ContestItem.vue'
import
{
getMyContestList
,
getContestList
}
from
'../api'
import
{
useAppConfig
}
from
'@/composables/useAppConfig'
const
appConfig
=
useAppConfig
()
let
myContestList
=
$ref
<
Contest
[]
>
([])
function
fetchMyList
()
{
getMyContestList
().
then
(
res
=>
{
...
...
@@ -27,7 +30,7 @@ onMounted(() => {
</div>
<el-empty
description=
"暂无数据"
v-else
/>
</AppCard>
<AppCard
title=
"可参与赛项"
>
<AppCard
title=
"可参与赛项"
v-if=
"appConfig.hideAvailableEvents !== true"
>
<div
class=
"contest-list"
v-if=
"contestList.length"
>
<ContestItem
:data=
"item"
v-for=
"item in contestList"
:key=
"item.id"
></ContestItem>
</div>
...
...
src/modules/student/contest/views/Lab.vue
浏览文件 @
462806c0
...
...
@@ -7,6 +7,8 @@ import { upload } from '@/utils/upload'
import
{
getContest
,
getExperimentRecord
,
uploadExperimentPicture
}
from
'../api'
import
dayjs
from
'dayjs'
import
{
useCookies
}
from
'@vueuse/integrations/useCookies'
import
{
useAppConfig
}
from
'@/composables/useAppConfig'
const
appConfig
=
useAppConfig
()
const
Book
=
defineAsyncComponent
(()
=>
import
(
'../components/Book.vue'
))
const
Video
=
defineAsyncComponent
(()
=>
import
(
'../components/Video.vue'
))
...
...
@@ -117,7 +119,7 @@ const competitionUrl = computed(() => {
return
url
.
includes
(
'?'
)
?
`
${
url
}
&token=
${
cookies
.
get
(
'TGC'
)}
`
:
`
${
url
}
?token=
${
cookies
.
get
(
'TGC'
)}
`
})
let
isHeadShow
=
$ref
(
true
)
let
isHeadShow
=
$ref
(
!
appConfig
.
hideContestToolbar
)
const
handleShowHead
=
function
()
{
isHeadShow
=
!
isHeadShow
}
...
...
@@ -153,14 +155,14 @@ const reportDialogVisible = $ref(false)
<el-tab-pane
label=
"过程与结果"
lazy
>
<Result
:competition_id=
"id"
@
update=
"fetchInfo"
></Result>
</el-tab-pane>
<el-tab-pane
label=
"实操试卷"
lazy
>
<el-tab-pane
label=
"实操试卷"
lazy
v-if=
"appConfig.hidePracticalTestPaper !== true"
>
<Exam
:competition_id=
"id"
></Exam>
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
template
#
right
>
<AppCard
v-if=
"isHeadShow"
>
<AppCard
v-if=
"isHeadShow"
style=
"margin-bottom: 20px"
>
<el-row
justify=
"space-between"
>
<el-button
type=
"primary"
:icon=
"HomeFilled"
@
click=
"handleBackHome"
>
返回首页
</el-button>
<div>
...
...
@@ -235,7 +237,6 @@ const reportDialogVisible = $ref(false)
position
:
relative
;
flex
:
1
;
width
:
100%
;
margin-top
:
20px
;
background
:
#f8f9fa
;
}
.iframe
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论