Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
9684b9a6
提交
9684b9a6
authored
4月 27, 2023
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
c06164c3
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
68 行增加
和
18 行删除
+68
-18
api.ts
src/modules/admin/contest/contestants/api.ts
+1
-1
Index.vue
src/modules/admin/contest/contestants/views/Index.vue
+27
-5
Book.vue
src/modules/student/contest/components/Book.vue
+16
-0
ContestItem.vue
src/modules/student/contest/components/ContestItem.vue
+1
-1
Lab.vue
src/modules/student/contest/views/Lab.vue
+13
-1
vite.config.ts
vite.config.ts
+10
-10
没有找到文件。
src/modules/admin/contest/contestants/api.ts
浏览文件 @
9684b9a6
...
...
@@ -2,7 +2,7 @@ import httpRequest from '@/utils/axios'
import
type
{
ContestantCreateParams
,
ContestantUpdateParams
}
from
'./types'
// 获取参赛选手列表
export
function
getContestantList
(
params
?:
{
student_name
?:
string
;
page
?:
number
;
'per-page'
?:
number
})
{
export
function
getContestantList
(
params
?:
{
student_name
?:
string
;
order_params
?:
string
;
page
?:
number
;
'per-page'
?:
number
})
{
return
httpRequest
.
get
(
'/api/resource/v1/backend/competition-competitor/list'
,
{
params
})
}
...
...
src/modules/admin/contest/contestants/views/Index.vue
浏览文件 @
9684b9a6
...
...
@@ -15,11 +15,15 @@ const appList = $ref<InstanceType<typeof AppList> | null>(null)
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
const
{
contests
}
=
useGetContestList
()
// 列表配置
let
orderParamsValue
=
$ref
(
''
)
const
listOptions
=
$computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getContestantList
,
params
:
{
competition_id
:
''
,
student_name
:
''
}
params
:
{
competition_id
:
''
,
student_name
:
''
},
beforeRequest
(
params
:
any
)
{
return
{
...
params
,
order_params
:
orderParamsValue
}
}
},
filters
:
[
{
...
...
@@ -50,7 +54,12 @@ const listOptions = $computed(() => {
{
label
:
'所在专业'
,
prop
:
'student.specialty.name'
},
{
label
:
'所在年级'
,
prop
:
'grade'
},
{
label
:
'所在班级'
,
prop
:
'student.class.name'
},
{
label
:
'训练次数'
,
prop
:
'train_count'
},
{
label
:
'训练次数'
,
prop
:
'train_count'
,
sortable
:
'custom'
,
width
:
110
},
{
label
:
'更新时间'
,
prop
:
'updated_time'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
200
}
]
...
...
@@ -83,11 +92,22 @@ function handleUpdate(row: Contestant) {
function
onUpdateSuccess
()
{
appList
?.
refetch
()
}
const
sortChange
=
function
(
column
:
any
)
{
if
(
column
.
order
===
'ascending'
)
{
orderParamsValue
=
JSON
.
stringify
([{
param
:
'train_count'
,
way
:
'DESC'
}])
}
else
if
(
column
.
order
===
'descending'
)
{
orderParamsValue
=
JSON
.
stringify
([{
param
:
'train_count'
,
way
:
'ASC'
}])
}
else
{
orderParamsValue
=
''
}
console
.
log
(
orderParamsValue
,
'orderParamsValue'
)
appList
?.
refetch
()
}
</
script
>
<
template
>
<AppCard
title=
"参赛选手管理"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
@
sort-change=
"sortChange"
>
<template
#
header-buttons
>
<!--
<el-button
type=
"primary"
round
:icon=
"CirclePlus"
@
click=
"handleAdd"
>
新增参赛选手
</el-button>
-->
<el-button
...
...
@@ -115,13 +135,15 @@ function onUpdateSuccess() {
v-model=
"dialogVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"dialogVisible && rowData"
></FormDialog>
v-if=
"dialogVisible && rowData"
></FormDialog>
<!-- 查看 -->
<ViewDialog
v-model=
"viewVisible"
:data=
"rowData"
@
update=
"onUpdateSuccess"
v-if=
"viewVisible && rowData"
></ViewDialog>
v-if=
"viewVisible && rowData"
></ViewDialog>
<!-- 批量导入 -->
<ImportDialog
v-model=
"importVisible"
@
update=
"onUpdateSuccess"
v-if=
"importVisible"
></ImportDialog>
</template>
src/modules/student/contest/components/Book.vue
浏览文件 @
9684b9a6
...
...
@@ -4,8 +4,12 @@ import { CloseBold } from '@element-plus/icons-vue'
import
Preview
from
'@/components/Preview.vue'
import
{
getExperimentBooks
}
from
'../api'
import
{
useLog
}
from
'@/composables/useLog'
const
log
=
useLog
()
interface
Props
{
competition_id
:
string
experiment_id
?:
any
}
const
props
=
defineProps
<
Props
>
()
...
...
@@ -38,6 +42,18 @@ function handleView(row: ExperimentBookType) {
currentRaw
=
row
currentRawUrl
=
row
.
url
?
(
JSON
.
parse
(
row
.
url
)?.
url
as
string
)
:
''
show
=
true
// 日志上送
// console.log(props, props.student_id, '111')
log
.
upload
({
event
:
'file_event'
,
action
:
'competition_book_stu_watch_action'
,
data
:
{
competition_id
:
props
.
competition_id
,
experiment_id
:
props
.
experiment_id
,
book_id
:
row
.
id
,
student_id
:
route
.
query
?.
student_id
}
})
}
// 关闭
function
handleClose
()
{
...
...
src/modules/student/contest/components/ContestItem.vue
浏览文件 @
9684b9a6
...
...
@@ -25,7 +25,7 @@ const canTrain = $computed(() => {
function
handleTrain
(
id
:
string
,
type
:
string
)
{
// 训练计数
updateTrainCount
({
competition_id
:
id
})
window
.
open
(
`/student/contest/lab/
${
id
}
?type=
${
type
}
`
)
window
.
open
(
`/student/contest/lab/
${
id
}
?type=
${
type
}
&student_id=
${
props
.
data
?.
student_id
}
`)
// router.push({ path: `
/
student
/
contest
/
lab
/
$
{
id
}
`, query: { type: type } })
}
// 是否可以报名
...
...
src/modules/student/contest/views/Lab.vue
浏览文件 @
9684b9a6
...
...
@@ -121,6 +121,18 @@ let isHeadShow = $ref(true)
const
handleShowHead
=
function
()
{
isHeadShow
=
!
isHeadShow
}
const
getExperimentId
=
computed
(()
=>
{
const
item
=
competition
?.
train_platform_configs
.
find
((
item
:
any
)
=>
item
.
platform_key
===
route
.
query
.
type
)
let
value
=
'0'
if
(
item
?.
url
)
{
value
=
item
?.
url
.
indexOf
(
'experiment_id'
)
!==
-
1
?
item
?.
url
.
substring
(
item
?.
url
.
indexOf
(
'experiment_id='
)
+
14
,
item
?.
url
.
length
+
1
)
:
'0'
}
return
value
})
</
script
>
<
template
>
...
...
@@ -131,7 +143,7 @@ const handleShowHead = function () {
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"实训指导"
lazy
>
<!--
<Book
:competition_id=
"id"
:key=
"resizeKey"
></Book>
-->
<Book
:competition_id=
"id"
></Book>
<Book
:competition_id=
"id"
:experiment_id=
"getExperimentId"
></Book>
</el-tab-pane>
<el-tab-pane
label=
"操作视频"
lazy
v-if=
"false"
>
<Video
:competition_id=
"id"
></Video>
...
...
vite.config.ts
浏览文件 @
9684b9a6
...
...
@@ -26,16 +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/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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论