Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
4f320b97
提交
4f320b97
authored
10月 18, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 优化实验成绩管理
上级
70618bc3
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
123 行增加
和
8 行删除
+123
-8
ScoreDialog.vue
src/modules/admin/lab/score/components/ScoreDialog.vue
+6
-4
ScoreLogDialog.vue
src/modules/admin/lab/score/components/ScoreLogDialog.vue
+86
-0
types.ts
src/modules/admin/lab/score/types.ts
+11
-0
Index.vue
src/modules/admin/lab/score/views/Index.vue
+20
-4
没有找到文件。
src/modules/admin/lab/score/components/ScoreDialog.vue
浏览文件 @
4f320b97
...
@@ -20,6 +20,10 @@ let detail = $ref<RecordItem>()
...
@@ -20,6 +20,10 @@ let detail = $ref<RecordItem>()
function
fetchInfo
()
{
function
fetchInfo
()
{
getExperimentRecord
({
experiment_id
:
props
.
data
.
experiment_id
,
student_id
:
props
.
data
.
student_id
}).
then
(
res
=>
{
getExperimentRecord
({
experiment_id
:
props
.
data
.
experiment_id
,
student_id
:
props
.
data
.
student_id
}).
then
(
res
=>
{
detail
=
res
.
data
detail
=
res
.
data
const
score
=
res
.
data
.
score_details
||
{}
form
.
file
=
score
.
file
?
parseFloat
(
score
.
file
)
:
0
form
.
operate
=
score
.
operate
?
parseFloat
(
score
.
operate
)
:
0
form
.
result
=
score
.
result
?
parseFloat
(
score
.
result
)
:
0
})
})
}
}
watchEffect
(()
=>
{
watchEffect
(()
=>
{
...
@@ -80,8 +84,7 @@ function handleSubmit() {
...
@@ -80,8 +84,7 @@ function handleSubmit() {
title=
"学生实验评分"
title=
"学生实验评分"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
width=
"700px"
width=
"700px"
@
update:modelValue=
"$emit('update:modelValue')"
@
update:modelValue=
"$emit('update:modelValue')"
>
>
<el-form
:rules=
"rules"
label-width=
"120px"
label-suffix=
":"
v-if=
"detail"
>
<el-form
:rules=
"rules"
label-width=
"120px"
label-suffix=
":"
v-if=
"detail"
>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -116,8 +119,7 @@ function handleSubmit() {
...
@@ -116,8 +119,7 @@ function handleSubmit() {
hide-required-asterisk
hide-required-asterisk
inline
inline
label-position=
"top"
label-position=
"top"
style=
"padding: 5px 0 20px"
style=
"padding: 5px 0 20px"
>
>
<el-form-item
label=
"实验操作"
prop=
"operate"
>
<el-form-item
label=
"实验操作"
prop=
"operate"
>
<el-input-number
:min=
"1"
:max=
"100"
:controls=
"false"
step-strictly
v-model=
"form.operate"
/>
<el-input-number
:min=
"1"
:max=
"100"
:controls=
"false"
step-strictly
v-model=
"form.operate"
/>
</el-form-item>
</el-form-item>
...
...
src/modules/admin/lab/score/components/ScoreLogDialog.vue
0 → 100644
浏览文件 @
4f320b97
<
script
setup
lang=
"ts"
>
import
type
{
RecordItem
}
from
'../types'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getExperimentRecord
}
from
'../api'
interface
Props
{
data
:
RecordItem
}
const
props
=
defineProps
<
Props
>
()
let
detail
=
$ref
<
RecordItem
>
()
function
fetchInfo
()
{
getExperimentRecord
({
experiment_id
:
props
.
data
.
experiment_id
,
student_id
:
props
.
data
.
student_id
}).
then
(
res
=>
{
detail
=
res
.
data
})
}
watchEffect
(()
=>
{
fetchInfo
()
})
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
const
listOptions
=
$computed
(()
=>
{
return
{
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'姓名'
,
prop
:
'student_name'
,
slots
:
'table-name'
},
{
label
:
'学号'
,
prop
:
'sno_number'
,
slots
:
'table-number'
},
{
label
:
'实验操作成绩'
,
prop
:
'operate'
},
{
label
:
'实验结果成绩'
,
prop
:
'result'
},
{
label
:
'实验报告成绩'
,
prop
:
'file'
},
{
label
:
'综合实验成绩'
,
prop
:
'score'
},
{
label
:
'评分时间'
,
prop
:
'check_time'
},
{
label
:
'评分人'
,
prop
:
'checker_id_name'
}
],
data
:
detail
?.
score_log
}
})
</
script
>
<
template
>
<el-dialog
title=
"查看历史成绩"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-name
>
{{
detail
.
student_name
}}
</
template
>
<
template
#
table-number
>
{{
detail
.
sno_number
}}
</
template
>
</AppList>
</el-dialog>
</template>
<
style
lang=
"scss"
scoped
>
.file-item
{
display
:
flex
;
align-items
:
center
;
color
:
var
(
--
main-color
);
.el-icon
{
margin-right
:
5px
;
}
}
.picture-list
{
width
:
100%
;
li
{
display
:
flex
;
justify-content
:
space-between
;
}
a
{
color
:
var
(
--
main-color
);
}
.t1
{
flex
:
1
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
.form-item-score
{
padding-top
:
10px
;
background-color
:
#f8f9fb
;
border-radius
:
16px
;
:deep
(
.el-form-item__label
)
{
text-align
:
center
;
}
.el-input-number
{
width
:
100px
;
}
}
</
style
>
src/modules/admin/lab/score/types.ts
浏览文件 @
4f320b97
...
@@ -18,6 +18,7 @@ export interface RecordItem {
...
@@ -18,6 +18,7 @@ export interface RecordItem {
status_name
:
string
status_name
:
string
student_id
:
string
student_id
:
string
student_name
:
string
student_name
:
string
score_log
:
ScoreLog
[]
}
}
export
interface
FileItem
{
export
interface
FileItem
{
...
@@ -25,3 +26,13 @@ export interface FileItem {
...
@@ -25,3 +26,13 @@ export interface FileItem {
url
:
string
url
:
string
upload_time
:
string
upload_time
:
string
}
}
export
interface
ScoreLog
{
operate
:
string
result
:
string
file
:
string
score
:
string
checker_id
:
string
check_time
:
string
checker_id_name
:
string
}
src/modules/admin/lab/score/views/Index.vue
浏览文件 @
4f320b97
...
@@ -7,6 +7,7 @@ import { useFilterList } from '../composables/useFilterList'
...
@@ -7,6 +7,7 @@ import { useFilterList } from '../composables/useFilterList'
const
ScoreDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ScoreDialog.vue'
))
const
ScoreDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ScoreDialog.vue'
))
const
ImportDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ImportDialog.vue'
))
const
ImportDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ImportDialog.vue'
))
const
ScoreLogDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/ScoreLogDialog.vue'
))
const
{
courses
,
experiments
,
specialties
,
classes
}
=
useFilterList
()
const
{
courses
,
experiments
,
specialties
,
classes
}
=
useFilterList
()
...
@@ -95,18 +96,24 @@ const listOptions = $computed(() => {
...
@@ -95,18 +96,24 @@ const listOptions = $computed(() => {
{
label
:
'提交状态'
,
prop
:
'status_name'
,
slots
:
'table-status'
},
{
label
:
'提交状态'
,
prop
:
'status_name'
,
slots
:
'table-status'
},
{
label
:
'实验成绩'
,
prop
:
'score'
,
slots
:
'table-score'
},
{
label
:
'实验成绩'
,
prop
:
'score'
,
slots
:
'table-score'
},
{
label
:
'更新时间'
,
prop
:
'commit_time'
},
{
label
:
'更新时间'
,
prop
:
'commit_time'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
10
0
}
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
21
0
}
]
]
}
}
})
})
const
importVisible
=
$ref
(
false
)
const
importVisible
=
$ref
(
false
)
let
dialogVisible
=
$ref
(
false
)
let
dialogVisible
=
$ref
(
false
)
let
scoreLogVisible
=
$ref
(
false
)
const
rowData
=
ref
<
RecordItem
>
()
const
rowData
=
ref
<
RecordItem
>
()
// 评分
// 评分
function
handleScore
(
row
:
RecordItem
)
{
function
handleScore
(
row
:
RecordItem
)
{
rowData
.
value
=
row
rowData
.
value
=
row
dialogVisible
=
true
dialogVisible
=
true
}
}
// 历史成绩
function
handleScoreLog
(
row
:
RecordItem
)
{
rowData
.
value
=
row
scoreLogVisible
=
true
}
function
onUpdateSuccess
()
{
function
onUpdateSuccess
()
{
appList
?.
refetch
()
appList
?.
refetch
()
}
}
...
@@ -140,11 +147,19 @@ function onUpdateSuccess() {
...
@@ -140,11 +147,19 @@ function onUpdateSuccess() {
<el-button
<el-button
text
text
type=
"primary"
type=
"primary"
v-if=
"row.status === 1"
v-if=
"row.status === 1
|| row.status === 2
"
@
click=
"handleScore(row)"
@
click=
"handleScore(row)"
v-permission=
"'v1-teacher-record-check'"
v-permission=
"'v1-teacher-record-check'"
>
打分
</el-button
>
打分
</el-button
>
>
<el-button
text
type=
"primary"
v-if=
"row.has_score_log"
@
click=
"handleScoreLog(row)"
v-permission=
"'v1-teacher-record-check'"
>
查看历史成绩
</el-button
>
</
template
>
</
template
>
</AppList>
</AppList>
</AppCard>
</AppCard>
...
@@ -153,8 +168,9 @@ function onUpdateSuccess() {
...
@@ -153,8 +168,9 @@ function onUpdateSuccess() {
v-model=
"dialogVisible"
v-model=
"dialogVisible"
:data=
"rowData"
:data=
"rowData"
@
update=
"onUpdateSuccess"
@
update=
"onUpdateSuccess"
v-if=
"dialogVisible && rowData"
v-if=
"dialogVisible && rowData"
></ScoreDialog>
></ScoreDialog>
<!-- 历史成绩 -->
<ScoreLogDialog
v-model=
"scoreLogVisible"
:data=
"rowData"
v-if=
"scoreLogVisible && rowData"
></ScoreLogDialog>
<!-- 批量导入 -->
<!-- 批量导入 -->
<ImportDialog
v-model=
"importVisible"
@
update=
"onUpdateSuccess"
v-if=
"importVisible"
></ImportDialog>
<ImportDialog
v-model=
"importVisible"
@
update=
"onUpdateSuccess"
v-if=
"importVisible"
></ImportDialog>
</template>
</template>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论