Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
70b2a0cb
提交
70b2a0cb
authored
11月 23, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: #3228,#3229,#3230
上级
cb3225f6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
10 行删除
+7
-10
ReportDesignAttachment.vue
...dmin/lab/experiment/components/ReportDesignAttachment.vue
+5
-2
Report.vue
src/modules/admin/lab/experiment/views/Report.vue
+2
-8
没有找到文件。
src/modules/admin/lab/experiment/components/ReportDesignAttachment.vue
浏览文件 @
70b2a0cb
...
@@ -35,6 +35,9 @@ function handleScoreChange(value: number) {
...
@@ -35,6 +35,9 @@ function handleScoreChange(value: number) {
form
.
has_score
=
Math
.
min
(
value
,
form
.
has_score
)
form
.
has_score
=
Math
.
min
(
value
,
form
.
has_score
)
form
.
no_score
=
Math
.
min
(
value
,
form
.
no_score
)
form
.
no_score
=
Math
.
min
(
value
,
form
.
no_score
)
}
}
function
handleHasScoreChange
(
value
:
number
)
{
form
.
no_score
=
Math
.
min
(
value
,
form
.
no_score
)
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -67,10 +70,10 @@ function handleScoreChange(value: number) {
...
@@ -67,10 +70,10 @@ function handleScoreChange(value: number) {
<el-input-number
:min=
"0"
:max=
"form.score"
v-model=
"form.min_score"
v-if=
"form.rule_mode === 1"
/>
<el-input-number
:min=
"0"
:max=
"form.score"
v-model=
"form.min_score"
v-if=
"form.rule_mode === 1"
/>
<template
v-else
>
<template
v-else
>
<el-form-item
label=
"有附件"
label-width=
"auto"
style=
"margin-right: 10px; margin-bottom: 10px"
>
<el-form-item
label=
"有附件"
label-width=
"auto"
style=
"margin-right: 10px; margin-bottom: 10px"
>
<el-input-number
:min=
"0"
:max=
"form.score"
v-model=
"form.has_score"
/>
<el-input-number
:min=
"0"
:max=
"form.score"
v-model=
"form.has_score"
@
change=
"handleHasScoreChange"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"无附件"
label-width=
"auto"
style=
"margin-bottom: 10px"
>
<el-form-item
label=
"无附件"
label-width=
"auto"
style=
"margin-bottom: 10px"
>
<el-input-number
:min=
"0"
:max=
"form.score"
v-model=
"form.no_score"
/>
<el-input-number
:min=
"0"
:max=
"form.
has_
score"
v-model=
"form.no_score"
/>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
</el-form-item>
</el-form-item>
...
...
src/modules/admin/lab/experiment/views/Report.vue
浏览文件 @
70b2a0cb
...
@@ -11,6 +11,7 @@ interface Props {
...
@@ -11,6 +11,7 @@ interface Props {
id
:
string
id
:
string
}
}
const
props
=
defineProps
<
Props
>
()
const
props
=
defineProps
<
Props
>
()
const
router
=
useRouter
()
let
detail
=
$ref
<
ExperimentItem
>
()
let
detail
=
$ref
<
ExperimentItem
>
()
const
teacherText
=
$computed
(()
=>
{
const
teacherText
=
$computed
(()
=>
{
...
@@ -53,9 +54,6 @@ onMounted(() => {
...
@@ -53,9 +54,6 @@ onMounted(() => {
fetchInfo
()
fetchInfo
()
})
})
const
score
=
$computed
(()
=>
{
return
detail
?.
score
?
parseFloat
(
detail
.
score
)
:
0
})
// 合计
// 合计
const
total
=
$computed
(()
=>
{
const
total
=
$computed
(()
=>
{
return
form
.
detail_list
.
reduce
((
result
:
number
,
item
:
any
)
=>
{
return
form
.
detail_list
.
reduce
((
result
:
number
,
item
:
any
)
=>
{
...
@@ -65,10 +63,6 @@ const total = $computed(() => {
...
@@ -65,10 +63,6 @@ const total = $computed(() => {
// 保存
// 保存
function
handleSubmit
()
{
function
handleSubmit
()
{
if
(
total
!==
score
)
{
ElMessage
.
error
(
'请确保组件总分等于实验总分!'
)
return
}
formRef
?.
validate
().
then
(()
=>
{
formRef
?.
validate
().
then
(()
=>
{
const
params
=
{
...
form
,
detail_list
:
JSON
.
stringify
(
form
.
detail_list
)
}
const
params
=
{
...
form
,
detail_list
:
JSON
.
stringify
(
form
.
detail_list
)
}
if
(
form
.
report_upload_way
===
1
)
{
if
(
form
.
report_upload_way
===
1
)
{
...
@@ -77,7 +71,7 @@ function handleSubmit() {
...
@@ -77,7 +71,7 @@ function handleSubmit() {
}).
then
(()
=>
{
}).
then
(()
=>
{
updateExperimentReportRule
(
params
).
then
(()
=>
{
updateExperimentReportRule
(
params
).
then
(()
=>
{
ElMessage
({
message
:
'保存成功'
,
type
:
'success'
})
ElMessage
({
message
:
'保存成功'
,
type
:
'success'
})
window
.
close
(
)
router
.
replace
(
'/admin/lab/experiment'
)
})
})
})
})
}
else
{
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论