Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
43828ca1
提交
43828ca1
authored
9月 29, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 修改大赛评分的精度
上级
bfdc5af0
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
4 行删除
+6
-4
ScoreDialog.vue
src/modules/admin/contest/check/components/ScoreDialog.vue
+4
-2
ViewVideo.vue
src/modules/admin/contest/items/components/ViewVideo.vue
+2
-2
没有找到文件。
src/modules/admin/contest/check/components/ScoreDialog.vue
浏览文件 @
43828ca1
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
usePrecision
}
from
'@vueuse/math'
import
{
submitScore
}
from
'../api'
import
{
submitScore
}
from
'../api'
...
@@ -24,15 +25,16 @@ watchEffect(() => {
...
@@ -24,15 +25,16 @@ watchEffect(() => {
// 最终得分
// 最终得分
// 评分 / 分值 * 占比
// 评分 / 分值 * 占比
const
score
=
$computed
<
number
>
(()
=>
{
const
score
=
$computed
(()
=>
{
// 未打分的列表
// 未打分的列表
const
unScoreList
=
tableList
.
filter
((
item
:
any
)
=>
item
.
score
===
null
||
item
.
score
===
''
)
const
unScoreList
=
tableList
.
filter
((
item
:
any
)
=>
item
.
score
===
null
||
item
.
score
===
''
)
if
(
unScoreList
.
length
)
{
if
(
unScoreList
.
length
)
{
return
'--'
return
'--'
}
}
return
tableList
.
reduce
((
result
:
number
,
item
:
any
)
=>
{
const
output
=
tableList
.
reduce
((
result
:
number
,
item
:
any
)
=>
{
return
(
result
+=
(
item
.
score
/
item
.
old_score
)
*
item
.
ratio
||
0
)
return
(
result
+=
(
item
.
score
/
item
.
old_score
)
*
item
.
ratio
||
0
)
},
0
)
},
0
)
return
usePrecision
(
output
,
1
).
value
})
})
// 提交
// 提交
...
...
src/modules/admin/contest/items/components/ViewVideo.vue
浏览文件 @
43828ca1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
type
{
ContestVideoItem
}
from
'../types'
import
type
{
ContestVideoItem
}
from
'../types'
import
{
CirclePlus
}
from
'@element-plus/icons-vue'
import
{
CirclePlus
}
from
'@element-plus/icons-vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
use
ToFixed
}
from
'@vueuse/math'
import
{
use
Precision
}
from
'@vueuse/math'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
ViewVideoPreviewDialog
from
'./ViewVideoPreviewDialog.vue'
import
ViewVideoPreviewDialog
from
'./ViewVideoPreviewDialog.vue'
import
{
getContestVideoList
,
deleteContestVideo
}
from
'../api'
import
{
getContestVideoList
,
deleteContestVideo
}
from
'../api'
...
@@ -30,7 +30,7 @@ const listOptions = {
...
@@ -30,7 +30,7 @@ const listOptions = {
prop
:
'duration'
,
prop
:
'duration'
,
computed
({
row
}:
{
row
:
ContestVideoItem
})
{
computed
({
row
}:
{
row
:
ContestVideoItem
})
{
const
duration
=
parseInt
(
row
.
duration
)
const
duration
=
parseInt
(
row
.
duration
)
return
duration
?
use
ToFixed
(
duration
/
60
,
2
).
value
:
0
return
duration
?
use
Precision
(
duration
/
60
,
2
).
value
:
0
}
}
},
},
{
label
:
'创建人'
,
prop
:
'create_user.real_name'
},
{
label
:
'创建人'
,
prop
:
'create_user.real_name'
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论