Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
123f756e
提交
123f756e
authored
4月 20, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
7195f4c3
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
188 行增加
和
31 行删除
+188
-31
Detail.vue
src/modules/admin/contest/check/views/Detail.vue
+12
-2
FormDialog.vue
src/modules/admin/contest/items/components/FormDialog.vue
+58
-15
types.ts
src/modules/admin/contest/items/types.ts
+6
-2
api.ts
src/modules/student/contest/api.ts
+5
-0
ContestItem.vue
src/modules/student/contest/components/ContestItem.vue
+19
-4
types.ts
src/modules/student/contest/types.ts
+1
-0
Score.vue
src/modules/student/contest/views/Score.vue
+77
-8
vite.config.ts
vite.config.ts
+10
-0
没有找到文件。
src/modules/admin/contest/check/views/Detail.vue
浏览文件 @
123f756e
...
...
@@ -34,6 +34,10 @@ let resizeKey = $ref(0)
function
handleResize
()
{
resizeKey
=
Date
.
now
()
}
const
goPage
=
function
(
url
:
string
)
{
window
.
open
(
url
)
}
</
script
>
<
template
>
...
...
@@ -62,6 +66,11 @@ function handleResize() {
</p>
</div>
<div>
<template
v-for=
"item in detail.competition_platform_configs"
>
<el-button
type=
"primary"
:key=
"item.id"
v-if=
"item.is_show === '1'"
@
click=
"goPage(item.url)"
>
{{
item
.
name
}}
</el-button>
</
template
>
<el-button
type=
"primary"
@
click=
"dialogVisible = true"
v-permission=
"'v1-expert-check-set-score'"
>
评分
</el-button
>
...
...
@@ -120,11 +129,12 @@ function handleResize() {
flex
:
1
;
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
span
{
color
:
var
(
--
main-color
);
}
p
+
p
{
margin-
lef
t
:
40px
;
p
{
margin-
righ
t
:
40px
;
}
}
</
style
>
src/modules/admin/contest/items/components/FormDialog.vue
浏览文件 @
123f756e
...
...
@@ -54,7 +54,17 @@ const form = reactive({
competition_uri
:
''
,
dateRange
:
undefined
,
date
:
undefined
,
datetimeRange
:
undefined
datetimeRange
:
undefined
,
train_platform_configs
:
[
{
name
:
'1+X理论考试'
,
is_show
:
'1'
,
type
:
'1'
,
url
:
''
,
platform_key
:
'x_exam'
},
{
name
:
'商业数据分析实验'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'career_data_analysis'
},
{
name
:
'数据营销实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
],
competition_platform_configs
:
[
{
name
:
'1+X理论考试'
,
is_show
:
'1'
,
type
:
'1'
,
url
:
''
,
platform_key
:
'x_exam'
},
{
name
:
'商业数据分析实验'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'career_data_analysis'
},
{
name
:
'数据营销实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
]
})
watchEffect
(()
=>
{
if
(
!
props
.
data
)
return
...
...
@@ -108,11 +118,13 @@ const rules = ref<FormRules>({
message
:
'请选择赛项周期内的日期,且必须早于正式比赛日期'
}
],
train_platform_uri
:
[{
required
:
true
,
message
:
'请输入训练平台地址'
}],
competition_uri
:
[{
required
:
true
,
message
:
'请输入正式比赛地址'
}],
//
train_platform_uri: [{ required: true, message: '请输入训练平台地址' }],
//
competition_uri: [{ required: true, message: '请输入正式比赛地址' }],
status
:
[{
required
:
true
,
message
:
'请选择有效状态'
}],
logo
:
[{
required
:
true
,
message
:
'请上传赛项LOGO'
}],
cover
:
[{
required
:
true
,
message
:
'请上传赛项封面'
}]
cover
:
[{
required
:
true
,
message
:
'请上传赛项封面'
}],
train_platform_configs
:
[{
required
:
true
,
message
:
'请完善信息'
}],
competition_platform_configs
:
[{
required
:
true
,
message
:
'请完善信息'
}]
})
const
isUpdate
=
$computed
(()
=>
{
return
!!
form
.
id
...
...
@@ -158,15 +170,18 @@ function handleSubmit() {
'status'
,
'logo'
,
'cover'
,
'train_platform_uri'
,
'competition_uri'
,
'teacher_ids'
// 'train_platform_uri',
// 'competition_uri',
'teacher_ids'
,
'train_platform_configs'
,
'competition_platform_configs'
])
isUpdate
?
handleUpdate
(
params
)
:
handleCreate
(
params
)
})
}
// 新增
function
handleCreate
(
params
:
ContestCreateParams
)
{
// console.log(params, 'aaa')
createContest
(
params
).
then
(()
=>
{
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
emit
(
'update'
)
...
...
@@ -197,7 +212,8 @@ function handleDateRangeChange(value: any) {
:close-on-click-modal=
"false"
align-center
width=
"600px"
@
update:modelValue=
"$emit('update:modelValue')"
>
@
update:modelValue=
"$emit('update:modelValue')"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<el-form-item
label=
"赛项名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
:disabled=
"isUpdate"
/>
...
...
@@ -218,7 +234,8 @@ function handleDateRangeChange(value: any) {
v-for=
"item in technicalSupportUnitList"
:key=
"item.id"
:label=
"item.label"
:value=
"item.id"
></el-option>
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"赛项类型"
prop=
"type"
>
...
...
@@ -237,7 +254,8 @@ function handleDateRangeChange(value: any) {
range-separator=
"至"
v-model=
"form.dateRange"
style=
"width: 100%"
@
change=
"handleDateRangeChange"
/>
@
change=
"handleDateRangeChange"
/>
</el-form-item>
<el-form-item
label=
"正式比赛日期"
prop=
"date"
>
<el-date-picker
type=
"date"
v-model=
"form.date"
style=
"width: 100%"
/>
...
...
@@ -249,16 +267,41 @@ function handleDateRangeChange(value: any) {
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
v-model=
"form.datetimeRange"
style=
"width: 100%"
/>
style=
"width: 100%"
/>
</el-form-item>
<el-form-item
label=
"报名截止日期"
prop=
"apply_expiration_date"
>
<el-date-picker
type=
"date"
v-model=
"form.apply_expiration_date"
style=
"width: 100%"
/>
</el-form-item>
<el-form-item
label=
"训练平台地址"
prop=
"train_platform_uri"
>
<el-input
v-model=
"form.train_platform_uri"
/>
<el-form-item
label=
"训练平台地址"
prop=
"train_platform_configs"
>
<el-checkbox
true-label=
"1"
false-label=
"0"
style=
"margin-bottom: 10px"
v-model=
"item.is_show"
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>
<el-input
v-model=
"item.url"
/>
</div>
</el-checkbox>
</el-form-item>
<el-form-item
label=
"正式比赛地址"
prop=
"competition_uri"
>
<el-input
v-model=
"form.competition_uri"
/>
<el-form-item
label=
"正式比赛地址"
prop=
"competition_platform_configs"
>
<el-checkbox
true-label=
"1"
false-label=
"0"
style=
"margin-bottom: 10px"
v-model=
"item.is_show"
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>
<el-input
v-model=
"item.url"
/>
</div>
</el-checkbox>
</el-form-item>
<el-form-item
label=
"有效状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
...
...
src/modules/admin/contest/items/types.ts
浏览文件 @
123f756e
...
...
@@ -30,6 +30,8 @@ export interface ContestItem {
organizers
:
SystemDictionary
[]
apply_count
:
number
expert_count
:
number
train_platform_configs
:
any
[]
competition_platform_configs
:
any
[]
}
export
interface
ContestCreateParams
{
...
...
@@ -46,9 +48,11 @@ export interface ContestCreateParams {
status
:
string
logo
:
string
cover
:
string
train_platform_uri
:
string
competition_uri
:
string
//
train_platform_uri: string
//
competition_uri: string
teacher_ids
:
string
[]
train_platform_configs
:
any
[]
competition_platform_configs
:
any
[]
}
export
type
ContestUpdateParams
=
ContestCreateParams
&
{
id
:
string
}
...
...
src/modules/student/contest/api.ts
浏览文件 @
123f756e
...
...
@@ -76,3 +76,8 @@ export function uploadExperimentPicture(data: { competition_id: string; pictures
export
function
updateTrainCount
(
data
:
{
competition_id
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/student/competition/train-count'
,
data
)
}
// 成绩查询
export
function
getScoreReport
(
params
:
{
competition_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/student/competition/score-report'
,
{
params
})
}
src/modules/student/contest/components/ContestItem.vue
浏览文件 @
123f756e
...
...
@@ -22,10 +22,11 @@ const typeText = $computed(() => {
const
canTrain
=
$computed
(()
=>
{
return
dayjs
().
isBefore
(
dayjs
(
parseInt
(
props
.
data
.
end_at
)
*
1000
))
})
function
handleTrain
()
{
function
handleTrain
(
url
:
string
)
{
window
.
open
(
url
)
// 训练计数
updateTrainCount
({
competition_id
:
props
.
data
.
id
})
router
.
push
({
path
:
`/student/contest/lab/
${
props
.
data
.
id
}
`
})
//
updateTrainCount({ competition_id: props.data.id })
//
router.push({ path: `/student/contest/lab/${props.data.id}` })
}
// 是否可以报名
const
canJoin
=
$computed
(()
=>
{
...
...
@@ -56,7 +57,21 @@ function formatDate(value: string) {
<li>
赛项周期:
{{
formatDate
(
data
.
start_range
)
}}
至
{{
formatDate
(
data
.
end_range
)
}}
</li>
<li>
正式比赛日期:
{{
formatDate
(
data
.
start_at
)
}}
</li>
</ul>
<el-button
round
type=
"primary"
@
click=
"handleTrain"
v-if=
"canTrain"
>
我要训练
</el-button>
<!--
{{
data
.
train_platform_configs
}}
-->
<!--
<el-button
v-if=
"data.train_platform_configs"
round
type=
"primary"
@
click=
"handleTrain"
v-if=
"canTrain"
>
我要训练
</el-button>
-->
<div
style=
"display: flex; flex-wrap: wrap"
>
<template
v-for=
"item in data.train_platform_configs"
>
<el-button
v-if=
"item.is_show === '1'"
style=
"margin-bottom: 10px"
:key=
"item"
round
type=
"primary"
@
click=
"handleTrain(item.url)"
>
{{
item
.
name
}}
</el-button
>
</
template
>
</div>
</template>
<
template
v-else
>
<ul
class=
"info-list"
>
...
...
src/modules/student/contest/types.ts
浏览文件 @
123f756e
...
...
@@ -21,6 +21,7 @@ export interface Contest {
train_platform_uri
:
string
type
:
string
mode
:
string
train_platform_configs
:
any
[]
}
export
type
ContestJoinParams
=
{
...
...
src/modules/student/contest/views/Score.vue
浏览文件 @
123f756e
<
script
setup
lang=
"ts"
></
script
>
<
script
setup
lang=
"ts"
>
import
{
getScoreReport
,
getMyContestList
}
from
'../api'
let
eventValue
=
$ref
(
''
)
let
eventOption
:
any
=
$ref
([])
onMounted
(()
=>
{
getMyContestList
().
then
((
res
:
any
)
=>
{
eventOption
=
res
.
data
.
list
eventValue
=
eventOption
[
0
].
id
scoreReport
()
})
})
let
scoreInfo
:
any
=
$ref
()
const
scoreReport
=
function
()
{
getScoreReport
({
competition_id
:
eventValue
}).
then
((
res
:
any
)
=>
{
scoreInfo
=
res
.
data
})
}
const
selectChange
=
function
()
{
scoreReport
()
}
</
script
>
<
template
>
<iframe
src=
"https://bi.ezijing.com/bi//?proc=1&action=viewer&hback=true&isInPreview=true&db=!7d2b!!8346!!6559!!80b2!e-SaaS!2f!!53c2!!8d5b!!9009!!624b!!6210!!7ee9!!660e!!7ec6!.db&platform=PC&browserType=chrome"
frameborder=
"0"
class=
"iframe"
></iframe>
<AppCard>
<h1>
2023年全国大学生商业数据分析与应用大赛成绩查询结果
</h1>
<div
style=
"display: flex; align-items: center; padding-top: 30px"
>
<span
style=
"margin-right: 10px"
>
赛项
</span>
<el-select
v-model=
"eventValue"
placeholder=
"请选择"
@
change=
"selectChange"
>
<el-option
v-for=
"item in eventOption"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</div>
<h3>
考生基础信息
</h3>
<el-table
:data=
"scoreInfo?.id ? [scoreInfo] : []"
stripe
:header-cell-style=
"
{ background: '#ededed' }">
<el-table-column
prop=
"student.name"
label=
"选手姓名"
/>
<el-table-column
prop=
"id"
label=
"参赛ID"
/>
<el-table-column
label=
"性别"
>
<template
#
default=
"props"
>
{{
props
.
row
?.
student
.
gender
===
'1'
?
'男'
:
'女'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"org.name"
label=
"学校"
/>
<el-table-column
prop=
"specialty.name"
label=
"所在专业"
/>
<el-table-column
prop=
"grade"
label=
"所在年级"
/>
<el-table-column
prop=
"class.name"
label=
"所在班级"
/>
</el-table>
<h3>
考生成绩
</h3>
<!-- columns: [
{ label: '评分规则', type: 'name' },
{ label: '评分方法', prop: 'type' },
{ label: '分值', prop: 'old_score' },
{ label: '占比(%)', prop: 'ratio' },
{ label: '实际得分', prop: 'score' }
] -->
<el-table
:data=
"scoreInfo?.score_detail"
stripe
:header-cell-style=
"{ background: '#ededed' }"
>
<el-table-column
prop=
"name"
label=
"评分规则"
/>
<el-table-column
label=
"评分方法"
>
<
template
#
default=
"props"
>
{{
props
.
row
?.
type
===
'1'
?
'专家评分'
:
props
.
row
.
type
===
'2'
?
'1+x考试'
:
'线下考试'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"old_score"
label=
"分值"
/>
<el-table-column
prop=
"ratio"
label=
"占比(%)"
/>
<el-table-column
prop=
"score"
label=
"实际得分"
/>
</el-table>
</AppCard>
</template>
<
style
scoped
>
.iframe
{
width
:
100%
;
height
:
100%
;
h1
{
font-weight
:
500
;
font-size
:
28px
;
color
:
rgb
(
171
,
42
,
65
);
line-height
:
40px
;
text-align
:
center
;
}
h3
{
padding-top
:
40px
;
line-height
:
30px
;
}
</
style
>
vite.config.ts
浏览文件 @
123f756e
...
...
@@ -26,6 +26,16 @@ export default defineConfig(({ mode }) => ({
cert
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'./https/ezijing.com.pem'
))
},
proxy
:
{
'/api/resource'
:
{
target
:
'http://com-resource-admin-test.ezijing.com'
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
resource/
,
''
)
},
'/api/lab'
:
{
target
:
'http://com-resource-api-test.ezijing.com'
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
lab/
,
''
)
},
'/api'
:
'https://saas-lab.ezijing.com'
}
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论