Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
c4a55b28
提交
c4a55b28
authored
11月 16, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
cad2b28e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
106 行增加
和
2 行删除
+106
-2
ViewGradeRules.vue
...odules/admin/lab/experiment/components/ViewGradeRules.vue
+48
-0
ViewReportRules.vue
...dules/admin/lab/experiment/components/ViewReportRules.vue
+50
-0
View.vue
src/modules/admin/lab/experiment/views/View.vue
+8
-2
没有找到文件。
src/modules/admin/lab/experiment/components/ViewGradeRules.vue
0 → 100644
浏览文件 @
c4a55b28
<
script
setup
>
import
{
getExperimentGradeRule
}
from
'../api'
const
props
=
defineProps
({
experiment_id
:
String
})
const
detail
=
reactive
({
is_show
:
undefined
,
rule_list
:
[]
})
const
canViewText
=
$computed
(()
=>
{
const
map
=
{
1
:
'是'
,
0
:
'否'
}
return
map
[
detail
.
is_show
]
})
function
fetchInfo
()
{
getExperimentGradeRule
({
experiment_id
:
props
.
experiment_id
}).
then
(
res
=>
{
const
data
=
res
.
data
.
detail
let
ruleList
=
[]
try
{
ruleList
=
JSON
.
parse
(
data
.
rule_list
).
map
(
item
=>
{
return
{
...
item
,
percent
:
parseFloat
(
item
.
percent
)
}
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
Object
.
assign
(
detail
,
data
,
{
rule_list
:
ruleList
})
})
}
onMounted
(()
=>
{
fetchInfo
()
})
</
script
>
<
template
>
<el-dialog
title=
"实验成绩规则"
width=
"600px"
>
<el-form
:column=
"1"
label-width=
"170px"
label-position=
"right"
label-suffix=
":"
v-if=
"detail"
>
<el-form-item
label=
"是否允许查看成绩明细"
align=
"right"
>
{{
canViewText
}}
</el-form-item>
<el-form-item
label=
"实验成绩规则"
align=
"right"
>
<el-form
label-suffix=
":"
>
<el-form-item
:label=
"item.name"
v-for=
"(item, index) in detail.rule_list"
:key=
"index"
>
{{
item
.
percent
}}
%
</el-form-item>
</el-form>
</el-form-item>
</el-form>
<template
#
footer
>
<el-row
justify=
"center"
>
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
</el-row>
</
template
>
</el-dialog>
</template>
src/modules/admin/lab/experiment/components/ViewReportRules.vue
0 → 100644
浏览文件 @
c4a55b28
<
script
setup
>
import
{
getExperimentReportRule
}
from
'../api'
const
props
=
defineProps
({
experiment_id
:
String
})
const
detail
=
reactive
({
way
:
undefined
,
detail_list
:
[]
})
const
reportSubmitMethodText
=
$computed
(()
=>
{
const
map
=
{
1
:
'上传文件'
,
2
:
'在线填写'
}
return
map
[
detail
.
way
]
})
function
fetchInfo
()
{
getExperimentReportRule
({
experiment_id
:
props
.
experiment_id
}).
then
(
res
=>
{
const
{
data
}
=
res
let
detailList
=
[]
try
{
detailList
=
JSON
.
parse
(
data
.
info
.
detail_list
).
map
(
item
=>
{
return
{
...
item
,
percent
:
parseFloat
(
item
.
percent
)
}
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
Object
.
assign
(
detail
,
data
,
{
detail_list
:
detailList
})
})
}
onMounted
(()
=>
{
fetchInfo
()
})
</
script
>
<
template
>
<el-dialog
title=
"实验报告规则"
width=
"600px"
>
<el-form
:column=
"1"
label-width=
"170px"
label-position=
"right"
label-suffix=
":"
v-if=
"detail"
>
<el-form-item
label=
"实验报告提交方式"
align=
"right"
>
<el-row
justify=
"space-between"
style=
"width: 100%"
>
{{
reportSubmitMethodText
}}
<el-button
type=
"primary"
v-if=
"detail.way === 2"
>
<router-link
:to=
"`/admin/lab/experiment/report/$
{experiment_id}`" target="_blank"
>查看详细规则
</router-link
>
</el-button>
</el-row>
</el-form-item>
</el-form>
<template
#
footer
>
<el-row
justify=
"center"
>
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
</el-row>
</
template
>
</el-dialog>
</template>
src/modules/admin/lab/experiment/views/View.vue
浏览文件 @
c4a55b28
...
@@ -9,6 +9,8 @@ import { getExperiment, experimentAddClass } from '../api'
...
@@ -9,6 +9,8 @@ import { getExperiment, experimentAddClass } from '../api'
const
SelectClassDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/SelectClassDialog.vue'
))
const
SelectClassDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/SelectClassDialog.vue'
))
const
StudentGroupDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/StudentGroupDialog.vue'
))
const
StudentGroupDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/StudentGroupDialog.vue'
))
const
StudentListDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/StudentListDialog.vue'
))
const
StudentListDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/StudentListDialog.vue'
))
const
ViewGradeRules
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewGradeRules.vue'
))
const
ViewReportRules
=
defineAsyncComponent
(()
=>
import
(
'../components/ViewReportRules.vue'
))
interface
Props
{
interface
Props
{
id
:
string
id
:
string
...
@@ -75,14 +77,16 @@ function handleRemoveClass(row: ClassItem) {
...
@@ -75,14 +77,16 @@ function handleRemoveClass(row: ClassItem) {
})
})
})
})
}
}
const
gradeRulesVisible
=
$ref
(
false
)
const
reportRulesVisible
=
$ref
(
false
)
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
title=
"实验管理"
>
<AppCard
title=
"实验管理"
>
<el-descriptions
title=
"基本信息"
v-if=
"detail"
>
<el-descriptions
title=
"基本信息"
v-if=
"detail"
>
<template
#
extra
>
<template
#
extra
>
<el-button
type=
"primary"
>
查看成绩规则
</el-button>
<el-button
type=
"primary"
@
click=
"gradeRulesVisible = true"
>
查看成绩规则
</el-button>
<el-button
type=
"primary"
>
查看报告规则
</el-button>
<el-button
type=
"primary"
@
click=
"reportRulesVisible = true"
>
查看报告规则
</el-button>
</
template
>
</
template
>
<el-descriptions-item
:span=
"3"
label=
"实验名称:"
>
{{ detail.name }}
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"实验名称:"
>
{{ detail.name }}
</el-descriptions-item>
<el-descriptions-item
label=
"实验课程:"
>
{{ detail.course_name }}
</el-descriptions-item>
<el-descriptions-item
label=
"实验课程:"
>
{{ detail.course_name }}
</el-descriptions-item>
...
@@ -140,4 +144,6 @@ function handleRemoveClass(row: ClassItem) {
...
@@ -140,4 +144,6 @@ function handleRemoveClass(row: ClassItem) {
v-model=
"studentListVisible"
v-model=
"studentListVisible"
:data=
"rowData"
:data=
"rowData"
v-if=
"studentListVisible && rowData"
></StudentListDialog>
v-if=
"studentListVisible && rowData"
></StudentListDialog>
<ViewGradeRules
v-model=
"gradeRulesVisible"
:experiment_id=
"id"
v-if=
"gradeRulesVisible"
></ViewGradeRules>
<ViewReportRules
v-model=
"reportRulesVisible"
:experiment_id=
"id"
v-if=
"reportRulesVisible"
></ViewReportRules>
</template>
</template>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论