提交 462806c0 authored 作者: haodaking's avatar haodaking

chore: update

上级 57445086
......@@ -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))
})
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论