Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
dba3278d
提交
dba3278d
authored
11月 14, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
b8d0c4a6
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
60 行增加
和
56 行删除
+60
-56
CountUp.vue
src/components/CountUp.vue
+1
-0
ContestantDialog.vue
...dules/admin/contest/items/components/ContestantDialog.vue
+3
-3
ScoringExpertsAddDialog.vue
...dmin/contest/items/components/ScoringExpertsAddDialog.vue
+1
-1
ScoringExpertsDialog.vue
...s/admin/contest/items/components/ScoringExpertsDialog.vue
+1
-1
ScoringRulesBookDialog.vue
...admin/contest/items/components/ScoringRulesBookDialog.vue
+1
-1
ScoringRulesDialog.vue
...les/admin/contest/items/components/ScoringRulesDialog.vue
+1
-1
ViewBookFormDialog.vue
...les/admin/contest/items/components/ViewBookFormDialog.vue
+1
-1
ViewVideoFormDialog.vue
...es/admin/contest/items/components/ViewVideoFormDialog.vue
+1
-1
GradeRulesDialog.vue
...ules/admin/lab/experiment/components/GradeRulesDialog.vue
+4
-4
ReportPreview.vue
...modules/admin/lab/experiment/components/ReportPreview.vue
+1
-1
SelectClassDialog.vue
...les/admin/lab/experiment/components/SelectClassDialog.vue
+1
-1
SelectStudentDialog.vue
...s/admin/lab/experiment/components/SelectStudentDialog.vue
+1
-1
StudentGroupDialog.vue
...es/admin/lab/experiment/components/StudentGroupDialog.vue
+3
-4
StudentGroupFormDialog.vue
...dmin/lab/experiment/components/StudentGroupFormDialog.vue
+3
-4
ScoreLogDialog.vue
src/modules/admin/lab/score/components/ScoreLogDialog.vue
+2
-2
ContestItem.vue
src/modules/student/contest/components/ContestItem.vue
+0
-4
Result.vue
src/modules/student/contest/components/Result.vue
+1
-1
Book.vue
src/modules/student/lab/components/Book.vue
+3
-9
Info.vue
src/modules/student/lab/components/Info.vue
+15
-0
ReportDialog.vue
src/modules/student/lab/components/ReportDialog.vue
+3
-5
Result.vue
src/modules/student/lab/components/Result.vue
+5
-7
ResultScoreDialog.vue
src/modules/student/lab/components/ResultScoreDialog.vue
+2
-2
Index.vue
src/modules/student/lab/views/Index.vue
+4
-0
dictionary.ts
src/utils/dictionary.ts
+2
-2
没有找到文件。
src/components/CountUp.vue
浏览文件 @
dba3278d
...
...
@@ -12,6 +12,7 @@ const myRef = $ref<HTMLElement>()
let
countUp
:
CountUp
|
null
=
null
onMounted
(()
=>
{
if
(
!
myRef
)
return
countUp
=
new
CountUp
(
myRef
,
props
.
endVal
,
props
.
options
)
if
(
!
countUp
.
error
)
{
countUp
.
start
()
...
...
src/modules/admin/contest/items/components/ContestantDialog.vue
浏览文件 @
dba3278d
...
...
@@ -4,7 +4,7 @@ import AppList from '@/components/base/AppList.vue'
import
{
getContestantList
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
))
const
detail
=
$ref
(
inject
<
ContestItem
>
(
'detail'
))
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 性别
...
...
@@ -13,7 +13,7 @@ const genderList = useMapStore().getMapValuesByKey('system_gender')
const
listOptions
=
{
remote
:
{
httpRequest
:
getContestantList
,
params
:
{
competition_id
:
detail
.
id
,
student_name
:
''
}
params
:
{
competition_id
:
detail
?
.
id
,
student_name
:
''
}
},
filters
:
[{
type
:
'input'
,
prop
:
'student_name'
,
label
:
'选手姓名'
,
placeholder
:
'请输入选手姓名'
}],
columns
:
[
...
...
@@ -38,7 +38,7 @@ const listOptions = {
}
const
exportUrl
=
$computed
(()
=>
{
return
`/api/resource/v1/backend/competition-competitor/export?competition_id=
${
detail
.
id
}
`
return
`/api/resource/v1/backend/competition-competitor/export?competition_id=
${
detail
?
.
id
}
`
})
</
script
>
...
...
src/modules/admin/contest/items/components/ScoringExpertsAddDialog.vue
浏览文件 @
dba3278d
...
...
@@ -11,7 +11,7 @@ const emit = defineEmits<{
// 角色列表
const
roleList
=
useMapStore
().
getMapValuesByKey
(
'expert_role'
)
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
let
list
=
$ref
<
any
>
([])
function
fetchList
()
{
...
...
src/modules/admin/contest/items/components/ScoringExpertsDialog.vue
浏览文件 @
dba3278d
...
...
@@ -18,7 +18,7 @@ const emit = defineEmits<{
const
ScoringExpertsAddDialog
=
defineAsyncComponent
(()
=>
import
(
'./ScoringExpertsAddDialog.vue'
))
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 性别
...
...
src/modules/admin/contest/items/components/ScoringRulesBookDialog.vue
浏览文件 @
dba3278d
...
...
@@ -17,7 +17,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
// 数据状态
const
status
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
...
...
src/modules/admin/contest/items/components/ScoringRulesDialog.vue
浏览文件 @
dba3278d
...
...
@@ -17,7 +17,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
// 评分方法
const
scoreMethods
=
useMapStore
().
getMapValuesByKey
(
'scoring_manner'
)
...
...
src/modules/admin/contest/items/components/ViewBookFormDialog.vue
浏览文件 @
dba3278d
...
...
@@ -17,7 +17,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
// 数据状态
const
status
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
...
...
src/modules/admin/contest/items/components/ViewVideoFormDialog.vue
浏览文件 @
dba3278d
...
...
@@ -17,7 +17,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ContestItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ContestItem
)
// 数据状态
const
status
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
...
...
src/modules/admin/lab/experiment/components/GradeRulesDialog.vue
浏览文件 @
dba3278d
...
...
@@ -8,15 +8,15 @@ interface Props {
data
:
ExperimentItem
}
const
props
=
defineProps
<
Props
>
()
defineProps
<
Props
>
()
const
emit
=
defineEmits
<
{
defineEmits
<
{
(
e
:
'update'
):
void
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
formRef
=
$ref
<
FormInstance
>
()
const
form
=
reactive
({
const
form
=
reactive
<
any
>
({
is_show
:
1
,
rule_list
:
[
{
...
...
@@ -48,7 +48,7 @@ function handleSubmit() {
// 当前评分方法
function
currentRuleNames
(
value
:
number
)
{
const
typeList
=
form
.
rule_list
.
map
(
item
=>
item
.
type
)
const
typeList
=
form
.
rule_list
.
map
(
(
item
:
any
)
=>
item
.
type
)
return
gradeRuleList
.
filter
(
item
=>
{
return
item
.
value
===
value
||
item
.
value
===
5
||
!
typeList
.
includes
(
item
.
value
)
})
...
...
src/modules/admin/lab/experiment/components/ReportPreview.vue
浏览文件 @
dba3278d
...
...
@@ -7,7 +7,7 @@ const props = defineProps<Props>()
const
teacherText
=
$computed
(()
=>
{
if
(
!
props
.
data
)
return
''
return
props
.
data
.
teacher
.
map
(
item
=>
item
.
name
).
join
(
'、'
)
return
props
.
data
.
teacher
.
map
(
(
item
:
any
)
=>
item
.
name
).
join
(
'、'
)
})
</
script
>
...
...
src/modules/admin/lab/experiment/components/SelectClassDialog.vue
浏览文件 @
dba3278d
...
...
@@ -8,7 +8,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ExperimentItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ExperimentItem
)
// 列表配置
const
listOptions
=
{
...
...
src/modules/admin/lab/experiment/components/SelectStudentDialog.vue
浏览文件 @
dba3278d
...
...
@@ -8,7 +8,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
GroupItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
GroupItem
)
// 列表配置
const
listOptions
=
{
...
...
src/modules/admin/lab/experiment/components/StudentGroupDialog.vue
浏览文件 @
dba3278d
...
...
@@ -10,7 +10,7 @@ interface Props {
}
const
props
=
defineProps
<
Props
>
()
const
detail
=
$ref
<
ExperimentItem
>
(
inject
(
'detail'
))
const
detail
=
$ref
(
inject
<
ExperimentItem
>
(
'detail'
))
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
...
...
@@ -38,7 +38,7 @@ function handleRefetch() {
</
script
>
<
template
>
<el-dialog
title=
"学生分组"
>
<el-descriptions
:column=
"2"
>
<el-descriptions
:column=
"2"
v-if=
"detail"
>
<el-descriptions-item
label=
"实验名称:"
>
{{
detail
.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"所属机构:"
>
{{
detail
.
organ_id_name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"班级名称:"
>
{{
data
.
name
}}
</el-descriptions-item>
...
...
@@ -71,7 +71,6 @@ function handleRefetch() {
v-model=
"dialogVisible"
:data=
"data"
@
update=
"handleRefetch"
v-if=
"dialogVisible"
></StudentGroupFormDialog>
v-if=
"dialogVisible"
></StudentGroupFormDialog>
</el-dialog>
</template>
src/modules/admin/lab/experiment/components/StudentGroupFormDialog.vue
浏览文件 @
dba3278d
...
...
@@ -14,7 +14,7 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
const
detail
=
$ref
<
ExperimentItem
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ExperimentItem
)
const
formRef
=
$ref
<
FormInstance
>
()
const
form
=
reactive
({
name
:
''
})
...
...
@@ -28,7 +28,7 @@ function handleSubmit() {
}
// 创建
const
handleCreate
=
()
=>
{
const
params
=
{
...
form
,
experiment_id
:
detail
.
id
,
class_id
:
props
.
data
.
id
}
const
params
=
{
...
form
,
experiment_id
:
detail
?
.
id
,
class_id
:
props
.
data
.
id
}
experimentAddClassGroup
(
params
).
then
(()
=>
{
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
emit
(
'update'
)
...
...
@@ -42,8 +42,7 @@ const handleCreate = () => {
title=
"新增实验分组"
:close-on-click-modal=
"false"
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=
"实验名称"
>
{{
detail
.
name
}}
</el-form-item>
<el-form-item
label=
"实验小组名称"
prop=
"name"
>
...
...
src/modules/admin/lab/score/components/ScoreLogDialog.vue
浏览文件 @
dba3278d
...
...
@@ -41,8 +41,8 @@ const listOptions = $computed(() => {
<
template
>
<el-dialog
title=
"查看历史成绩"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-name
>
{{
detail
.
student_name
}}
</
template
>
<
template
#
table-number
>
{{
detail
.
sno_number
}}
</
template
>
<template
#
table-name
>
{{
detail
?
.
student_name
}}
</
template
>
<
template
#
table-number
>
{{
detail
?
.
sno_number
}}
</
template
>
</AppList>
</el-dialog>
</template>
...
...
src/modules/student/contest/components/ContestItem.vue
浏览文件 @
dba3278d
<
script
setup
lang=
"ts"
>
import
type
{
Contest
}
from
'../types'
import
dayjs
from
'dayjs'
import
{
contestMode
}
from
'@/utils/dictionary'
import
{
updateTrainCount
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
...
...
@@ -13,9 +12,6 @@ const router = useRouter()
const
isMy
=
$computed
(()
=>
{
return
!!
props
.
data
.
login_id
})
const
modeText
=
$computed
(()
=>
{
return
contestMode
[
props
.
data
.
mode
]
})
const
types
=
useMapStore
().
getMapValuesByKey
(
'competition_type'
)
// 赛项类型
...
...
src/modules/student/contest/components/Result.vue
浏览文件 @
dba3278d
...
...
@@ -13,7 +13,7 @@ const emit = defineEmits<{
(
e
:
'update'
):
void
}
>
()
const
detail
=
$ref
<
ExperimentRecord
>
(
inject
(
'detail'
)
)
const
detail
=
$ref
(
inject
(
'detail'
)
as
ExperimentRecord
)
const
isEmpty
=
$computed
(()
=>
{
return
!
props
.
competition_id
||
!
detail
...
...
src/modules/student/lab/components/Book.vue
浏览文件 @
dba3278d
...
...
@@ -24,7 +24,7 @@ function fetchInfo() {
data
:
{
experiment_id
:
props
.
experiment_id
,
course_id
:
props
.
course_id
,
book_id
:
detail
.
id
book_id
:
detail
?
.
id
}
})
})
...
...
@@ -32,15 +32,9 @@ function fetchInfo() {
watchEffect
(()
=>
{
fetchInfo
()
})
const
isEmpty
=
$computed
(()
=>
{
return
!
props
.
experiment_id
||
!
detail
?.
id
})
</
script
>
<
template
>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<template
v-else
>
<Preview
:url=
"detail.url"
></Preview>
</
template
>
<Preview
:url=
"detail.url"
v-if=
"props.experiment_id && detail?.id"
></Preview>
<el-empty
description=
"暂无数据"
v-else
/>
</
template
>
src/modules/student/lab/components/Info.vue
0 → 100644
浏览文件 @
dba3278d
<
script
setup
lang=
"ts"
>
import
type
{
ExperimentRecord
}
from
'../types'
interface
Props
{
experiment_id
?:
string
}
defineProps
<
Props
>
()
const
detail
=
$ref
(
inject
<
ExperimentRecord
>
(
'detail'
))
</
script
>
<
template
>
<template
v-if=
"detail && experiment_id"
>
</
template
>
<el-empty
description=
"暂无数据"
v-else
/>
</template>
src/modules/student/lab/components/ReportDialog.vue
浏览文件 @
dba3278d
...
...
@@ -11,7 +11,7 @@ interface Props {
const
props
=
defineProps
<
Props
>
()
const
detail
=
$ref
<
ExperimentRecord
>
(
inject
(
'detail'
))
const
detail
=
$ref
(
inject
<
ExperimentRecord
>
(
'detail'
))
const
emit
=
defineEmits
<
{
(
e
:
'update'
):
void
...
...
@@ -49,15 +49,13 @@ const update = () => {
title=
"上传实验报告"
:close-on-click-modal=
"false"
width=
"600px"
@
update:modelValue=
"$emit('update:modelValue')"
>
@
update:modelValue=
"$emit('update:modelValue')"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
>
<el-form-item
label=
"实验报告文件"
prop=
"files"
>
<AppUpload
v-model=
"form.files"
:limit=
"1"
accept=
".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,.pdf,application/pdf,.ppt,.pptx,application/vnd.ms-powerpoint"
>
accept=
".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,.pdf,application/pdf,.ppt,.pptx,application/vnd.ms-powerpoint"
>
<template
#
tip
>
实验报告文件只能上传一个,支持格式包含:doc docx pdf ppt pptx,大小不超过50M
</
template
>
</AppUpload>
</el-form-item>
...
...
src/modules/student/lab/components/Result.vue
浏览文件 @
dba3278d
...
...
@@ -14,12 +14,10 @@ const emit = defineEmits<{
(
e
:
'update'
):
void
}
>
()
const
detail
=
$ref
<
ExperimentRecord
>
(
inject
(
'detail'
))
const
detail
=
$ref
(
inject
<
ExperimentRecord
>
(
'detail'
))
const
dialogVisible
=
$ref
(
false
)
const
isEmpty
=
$computed
(()
=>
{
return
!
props
.
experiment_id
||
!
detail
})
const
canRemove
=
$computed
(()
=>
{
return
!
(
detail
?.
status
!==
0
)
})
...
...
@@ -34,7 +32,7 @@ function handlePreview(index: number) {
function
handleRemove
(
index
:
number
)
{
ElMessageBox
.
confirm
(
'删除之后无法恢复,确认删除该截图吗?'
,
'提示'
).
then
(()
=>
{
if
(
!
props
.
experiment_id
)
return
const
pictures
=
detail
.
pictures
.
filter
((
item
,
i
)
=>
i
!==
index
)
const
pictures
=
detail
?
.
pictures
.
filter
((
item
,
i
)
=>
i
!==
index
)
uploadExperimentPicture
({
experiment_id
:
props
.
experiment_id
,
pictures
:
JSON
.
stringify
(
pictures
)
}).
then
(()
=>
{
emit
(
'update'
)
})
...
...
@@ -43,8 +41,7 @@ function handleRemove(index: number) {
</
script
>
<
template
>
<el-empty
description=
"暂无数据"
v-if=
"isEmpty"
/>
<template
v-else
>
<template
v-if=
"detail && experiment_id"
>
<div
class=
"result-score"
>
<h2>
我的成绩
</h2>
<template
v-if=
"detail.status === 2"
>
...
...
@@ -71,6 +68,7 @@ function handleRemove(index: number) {
<ImageViewer
v-model=
"imageViewerVisible"
:index=
"imageViewerIndex"
:items=
"detail.pictures"
></ImageViewer>
<ResultScoreDialog
v-model=
"dialogVisible"
></ResultScoreDialog>
</template>
<el-empty
description=
"暂无数据"
v-else
/>
</template>
<
style
lang=
"scss"
scoped
>
...
...
src/modules/student/lab/components/ResultScoreDialog.vue
浏览文件 @
dba3278d
...
...
@@ -2,11 +2,11 @@
import
type
{
ExperimentRecord
}
from
'../types'
import
{
Document
}
from
'@element-plus/icons-vue'
const
detail
=
$ref
<
ExperimentRecord
>
(
inject
(
'detail'
))
const
detail
=
$ref
(
inject
<
ExperimentRecord
>
(
'detail'
))
const
score
=
$computed
<
number
>
(()
=>
{
const
result
=
((
detail
.
score_details
.
operate
||
0
)
+
(
detail
.
score_details
.
result
||
0
)
+
(
detail
.
score_details
.
file
||
0
))
/
3
((
detail
?.
score_details
.
operate
||
0
)
+
(
detail
?.
score_details
.
result
||
0
)
+
(
detail
?
.
score_details
.
file
||
0
))
/
3
return
parseFloat
(
result
.
toFixed
(
2
))
})
</
script
>
...
...
src/modules/student/lab/views/Index.vue
浏览文件 @
dba3278d
...
...
@@ -8,6 +8,7 @@ import { upload } from '@/utils/upload'
import
{
getExperimentRecord
,
uploadExperimentPicture
,
submitExperimentRecord
}
from
'../api'
import
dayjs
from
'dayjs'
const
Info
=
defineAsyncComponent
(()
=>
import
(
'../components/Info.vue'
))
const
Book
=
defineAsyncComponent
(()
=>
import
(
'../components/Book.vue'
))
const
Video
=
defineAsyncComponent
(()
=>
import
(
'../components/Video.vue'
))
const
Discuss
=
defineAsyncComponent
(()
=>
import
(
'../components/Discuss.vue'
))
...
...
@@ -164,6 +165,9 @@ function handleResize() {
</el-form-item>
</el-form>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"实验信息"
lazy
>
<Info
:experiment_id=
"form.experiment_id"
></Info>
</el-tab-pane>
<el-tab-pane
label=
"实训指导"
lazy
>
<Book
:course_id=
"form.course_id"
:experiment_id=
"form.experiment_id"
:key=
"resizeKey"
></Book>
</el-tab-pane>
...
...
src/utils/dictionary.ts
浏览文件 @
dba3278d
...
...
@@ -4,8 +4,8 @@ export const json2Array = function (data: any, isValueToNumber = true) {
}
// 参赛模式
export
const
contestMode
:
Record
<
number
,
any
>
=
{
1
:
'个人赛'
export
const
contestMode
:
Record
<
string
,
any
>
=
{
'1'
:
'个人赛'
}
// 参赛模式列表
export
const
contestModeList
=
json2Array
(
contestMode
,
false
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论