Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
d2da6f61
提交
d2da6f61
authored
11月 21, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
4d082ef4
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
28 行增加
和
50 行删除
+28
-50
AppList.vue
src/components/base/AppList.vue
+9
-12
CompetitionLive.vue
src/modules/score/components/CompetitionLive.vue
+0
-8
CompetitionLiveProd.vue
src/modules/score/components/CompetitionLiveProd.vue
+0
-8
CompetitionOperations.vue
src/modules/score/components/CompetitionOperations.vue
+3
-3
Index.vue
src/modules/score/views/Index.vue
+4
-5
View.vue
src/modules/score/views/View.vue
+12
-14
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
d2da6f61
...
@@ -16,13 +16,15 @@ interface Props {
...
@@ -16,13 +16,15 @@ interface Props {
data
?:
any
[]
data
?:
any
[]
hasPagination
?:
boolean
hasPagination
?:
boolean
limit
?:
number
limit
?:
number
hasLoading
?:
boolean
}
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
hasPagination
:
true
,
hasPagination
:
true
,
hasLoading
:
true
,
limit
:
10
,
limit
:
10
,
filters
:
()
=>
[],
filters
:
()
=>
[],
columns
:
()
=>
[],
columns
:
()
=>
[],
data
:
()
=>
[]
data
:
()
=>
[]
,
})
})
const
filterFormRef
=
ref
()
const
filterFormRef
=
ref
()
...
@@ -137,8 +139,7 @@ defineExpose({ refetch, tableRef })
...
@@ -137,8 +139,7 @@ defineExpose({ refetch, tableRef })
v-bind=
"item"
v-bind=
"item"
clearable
clearable
@
change=
"search"
@
change=
"search"
v-if=
"item.type === 'input'"
v-if=
"item.type === 'input'"
/>
/>
<!-- select -->
<!-- select -->
<el-select
<el-select
v-model=
"params[item.prop]"
v-model=
"params[item.prop]"
...
@@ -146,14 +147,12 @@ defineExpose({ refetch, tableRef })
...
@@ -146,14 +147,12 @@ defineExpose({ refetch, tableRef })
filterable
filterable
clearable
clearable
@
change=
"search"
@
change=
"search"
v-if=
"item.type === 'select'"
v-if=
"item.type === 'select'"
>
>
<el-option
<el-option
v-for=
"(option, index) in item.options"
v-for=
"(option, index) in item.options"
:label=
"option[item.labelKey] || option.label || option"
:label=
"option[item.labelKey] || option.label || option"
:value=
"option[item.valueKey] || option.value || option"
:value=
"option[item.valueKey] || option.value || option"
:key=
"index"
:key=
"index"
/>
/>
</el-select>
</el-select>
</
template
>
</
template
>
</el-form-item>
</el-form-item>
...
@@ -174,10 +173,9 @@ defineExpose({ refetch, tableRef })
...
@@ -174,10 +173,9 @@ defineExpose({ refetch, tableRef })
<el-table
<el-table
:header-cell-style=
"{ background: '#ededed' }"
:header-cell-style=
"{ background: '#ededed' }"
:data=
"dataList"
:data=
"dataList"
v-loading=
"loading"
v-loading=
"loading
&& hasLoading
"
v-bind=
"$attrs"
v-bind=
"$attrs"
ref=
"tableRef"
ref=
"tableRef"
>
>
<el-table-column
align=
"center"
v-bind=
"item || {}"
v-for=
"item in columns"
:key=
"item.prop"
>
<el-table-column
align=
"center"
v-bind=
"item || {}"
v-for=
"item in columns"
:key=
"item.prop"
>
<
template
#
default=
"scope"
v-if=
"item.slots || item.computed"
>
<
template
#
default=
"scope"
v-if=
"item.slots || item.computed"
>
<slot
:name=
"item.slots"
v-bind=
"scope"
v-if=
"item.slots"
></slot>
<slot
:name=
"item.slots"
v-bind=
"scope"
v-if=
"item.slots"
></slot>
...
@@ -203,8 +201,7 @@ defineExpose({ refetch, tableRef })
...
@@ -203,8 +201,7 @@ defineExpose({ refetch, tableRef })
@
size-change=
"pageSizeChange"
@
size-change=
"pageSizeChange"
@
current-change=
"fetchList()"
@
current-change=
"fetchList()"
:hide-on-single-page=
"true"
:hide-on-single-page=
"true"
v-if=
"hasPagination"
v-if=
"hasPagination"
>
>
</el-pagination>
</el-pagination>
</div>
</div>
</div>
</div>
...
...
src/modules/score/components/CompetitionLive.vue
浏览文件 @
d2da6f61
...
@@ -211,7 +211,6 @@ const handleNext = () => {
...
@@ -211,7 +211,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品品类管理"
:name=
"1"
>
<el-tab-pane
label=
"商品品类管理"
:name=
"1"
>
<ScoreCard
<ScoreCard
:maxScore=
"5"
:maxScore=
"5"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity_type.score"
v-model:score=
"scoreDetails.commodity_type.score"
v-model:comment=
"scoreDetails.commodity_type.comment"
v-model:comment=
"scoreDetails.commodity_type.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -226,7 +225,6 @@ const handleNext = () => {
...
@@ -226,7 +225,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品属性管理"
:name=
"2"
lazy
>
<el-tab-pane
label=
"商品属性管理"
:name=
"2"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"5"
:maxScore=
"5"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity_attr.score"
v-model:score=
"scoreDetails.commodity_attr.score"
v-model:comment=
"scoreDetails.commodity_attr.comment"
v-model:comment=
"scoreDetails.commodity_attr.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -237,7 +235,6 @@ const handleNext = () => {
...
@@ -237,7 +235,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品管理"
:name=
"3"
lazy
>
<el-tab-pane
label=
"商品管理"
:name=
"3"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity.score"
v-model:score=
"scoreDetails.commodity.score"
v-model:comment=
"scoreDetails.commodity.comment"
v-model:comment=
"scoreDetails.commodity.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -294,7 +291,6 @@ const handleNext = () => {
...
@@ -294,7 +291,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播话术管理"
:name=
"4"
lazy
>
<el-tab-pane
label=
"直播话术管理"
:name=
"4"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.speech.score"
v-model:score=
"scoreDetails.speech.score"
v-model:comment=
"scoreDetails.speech.comment"
v-model:comment=
"scoreDetails.speech.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -321,7 +317,6 @@ const handleNext = () => {
...
@@ -321,7 +317,6 @@ const handleNext = () => {
<el-tab-pane
label=
"首次直播演练"
:name=
"5"
lazy
>
<el-tab-pane
label=
"首次直播演练"
:name=
"5"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"20"
:maxScore=
"20"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.practice_record1.score"
v-model:score=
"scoreDetails.practice_record1.score"
v-model:comment=
"scoreDetails.practice_record1.comment"
v-model:comment=
"scoreDetails.practice_record1.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -336,7 +331,6 @@ const handleNext = () => {
...
@@ -336,7 +331,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播复盘分析"
:name=
"6"
lazy
>
<el-tab-pane
label=
"直播复盘分析"
:name=
"6"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"10"
:maxScore=
"10"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.improvement_plan.score"
v-model:score=
"scoreDetails.improvement_plan.score"
v-model:comment=
"scoreDetails.improvement_plan.comment"
v-model:comment=
"scoreDetails.improvement_plan.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -352,7 +346,6 @@ const handleNext = () => {
...
@@ -352,7 +346,6 @@ const handleNext = () => {
<el-tab-pane
label=
"二次直播演练"
:name=
"7"
lazy
>
<el-tab-pane
label=
"二次直播演练"
:name=
"7"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.practice_record2.score"
v-model:score=
"scoreDetails.practice_record2.score"
v-model:comment=
"scoreDetails.practice_record2.comment"
v-model:comment=
"scoreDetails.practice_record2.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -367,7 +360,6 @@ const handleNext = () => {
...
@@ -367,7 +360,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播总结汇报"
:name=
"8"
lazy
>
<el-tab-pane
label=
"直播总结汇报"
:name=
"8"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
:hasNextButton=
"false"
:hasNextButton=
"false"
v-model:score=
"scoreDetails.report.score"
v-model:score=
"scoreDetails.report.score"
v-model:comment=
"scoreDetails.report.comment"
v-model:comment=
"scoreDetails.report.comment"
...
...
src/modules/score/components/CompetitionLiveProd.vue
浏览文件 @
d2da6f61
...
@@ -212,7 +212,6 @@ const handleNext = () => {
...
@@ -212,7 +212,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品品类管理"
:name=
"1"
>
<el-tab-pane
label=
"商品品类管理"
:name=
"1"
>
<ScoreCard
<ScoreCard
:maxScore=
"3"
:maxScore=
"3"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity_type.score"
v-model:score=
"scoreDetails.commodity_type.score"
v-model:comment=
"scoreDetails.commodity_type.comment"
v-model:comment=
"scoreDetails.commodity_type.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -227,7 +226,6 @@ const handleNext = () => {
...
@@ -227,7 +226,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品属性管理"
:name=
"2"
lazy
>
<el-tab-pane
label=
"商品属性管理"
:name=
"2"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"2"
:maxScore=
"2"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity_attr.score"
v-model:score=
"scoreDetails.commodity_attr.score"
v-model:comment=
"scoreDetails.commodity_attr.comment"
v-model:comment=
"scoreDetails.commodity_attr.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -238,7 +236,6 @@ const handleNext = () => {
...
@@ -238,7 +236,6 @@ const handleNext = () => {
<el-tab-pane
label=
"商品管理"
:name=
"3"
lazy
>
<el-tab-pane
label=
"商品管理"
:name=
"3"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"10"
:maxScore=
"10"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.commodity.score"
v-model:score=
"scoreDetails.commodity.score"
v-model:comment=
"scoreDetails.commodity.comment"
v-model:comment=
"scoreDetails.commodity.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -295,7 +292,6 @@ const handleNext = () => {
...
@@ -295,7 +292,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播话术管理"
:name=
"4"
lazy
>
<el-tab-pane
label=
"直播话术管理"
:name=
"4"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.speech.score"
v-model:score=
"scoreDetails.speech.score"
v-model:comment=
"scoreDetails.speech.comment"
v-model:comment=
"scoreDetails.speech.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -322,7 +318,6 @@ const handleNext = () => {
...
@@ -322,7 +318,6 @@ const handleNext = () => {
<el-tab-pane
label=
"首次直播演练"
:name=
"5"
lazy
>
<el-tab-pane
label=
"首次直播演练"
:name=
"5"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"15"
:maxScore=
"15"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.practice_record1.score"
v-model:score=
"scoreDetails.practice_record1.score"
v-model:comment=
"scoreDetails.practice_record1.comment"
v-model:comment=
"scoreDetails.practice_record1.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -337,7 +332,6 @@ const handleNext = () => {
...
@@ -337,7 +332,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播复盘分析"
:name=
"6"
lazy
>
<el-tab-pane
label=
"直播复盘分析"
:name=
"6"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"10"
:maxScore=
"10"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.improvement_plan.score"
v-model:score=
"scoreDetails.improvement_plan.score"
v-model:comment=
"scoreDetails.improvement_plan.comment"
v-model:comment=
"scoreDetails.improvement_plan.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -353,7 +347,6 @@ const handleNext = () => {
...
@@ -353,7 +347,6 @@ const handleNext = () => {
<el-tab-pane
label=
"二次直播演练"
:name=
"7"
lazy
>
<el-tab-pane
label=
"二次直播演练"
:name=
"7"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"30"
:maxScore=
"30"
:hasSaveButton=
"detail.check_status != '2'"
v-model:score=
"scoreDetails.practice_record2.score"
v-model:score=
"scoreDetails.practice_record2.score"
v-model:comment=
"scoreDetails.practice_record2.comment"
v-model:comment=
"scoreDetails.practice_record2.comment"
@
save=
"$emit('save')"
@
save=
"$emit('save')"
...
@@ -368,7 +361,6 @@ const handleNext = () => {
...
@@ -368,7 +361,6 @@ const handleNext = () => {
<el-tab-pane
label=
"直播总结汇报"
:name=
"8"
lazy
>
<el-tab-pane
label=
"直播总结汇报"
:name=
"8"
lazy
>
<ScoreCard
<ScoreCard
:maxScore=
"10"
:maxScore=
"10"
:hasSaveButton=
"detail.check_status != '2'"
:hasNextButton=
"false"
:hasNextButton=
"false"
v-model:score=
"scoreDetails.report.score"
v-model:score=
"scoreDetails.report.score"
v-model:comment=
"scoreDetails.report.comment"
v-model:comment=
"scoreDetails.report.comment"
...
...
src/modules/score/components/CompetitionOperations.vue
浏览文件 @
d2da6f61
...
@@ -61,7 +61,7 @@ const handleNext = () => {
...
@@ -61,7 +61,7 @@ const handleNext = () => {
<
template
>
<
template
>
<el-tabs
stretch
v-model=
"activeTab"
class=
"score-tabs"
>
<el-tabs
stretch
v-model=
"activeTab"
class=
"score-tabs"
>
<el-tab-pane
label=
"创意策划方案"
:name=
"1"
>
<el-tab-pane
label=
"创意策划方案"
:name=
"1"
>
<ModuleCard
:maxScore=
"20"
:hasSaveButton=
"detail.check_status != '2'"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ModuleCard
:maxScore=
"20"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ScoreCardSub
<ScoreCardSub
title=
"全媒体运营的主题(方向)描述(3分)"
title=
"全媒体运营的主题(方向)描述(3分)"
:maxScore=
"3"
:maxScore=
"3"
...
@@ -93,7 +93,7 @@ const handleNext = () => {
...
@@ -93,7 +93,7 @@ const handleNext = () => {
</ModuleCard>
</ModuleCard>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"视听运营"
:name=
"2"
>
<el-tab-pane
label=
"视听运营"
:name=
"2"
>
<ModuleCard
:maxScore=
"55"
:hasSaveButton=
"detail.check_status != '2'"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ModuleCard
:maxScore=
"55"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ScoreCardSub
<ScoreCardSub
title=
"综合稿件标题(5分)"
title=
"综合稿件标题(5分)"
:maxScore=
"5"
:maxScore=
"5"
...
@@ -140,7 +140,7 @@ const handleNext = () => {
...
@@ -140,7 +140,7 @@ const handleNext = () => {
</ModuleCard>
</ModuleCard>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"流量运营"
:name=
"3"
>
<el-tab-pane
label=
"流量运营"
:name=
"3"
>
<ModuleCard
:maxScore=
"20"
:hasSaveButton=
"detail.check_status != '2'"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ModuleCard
:maxScore=
"20"
@
next=
"handleNext"
@
save=
"$emit('save')"
>
<ScoreCardSub
<ScoreCardSub
title=
"作品(或产品)发布的运营计划,上述全媒体综合文稿拟分发的媒体平台,并逐一说明理由(10分)"
title=
"作品(或产品)发布的运营计划,上述全媒体综合文稿拟分发的媒体平台,并逐一说明理由(10分)"
:maxScore=
"10"
:maxScore=
"10"
...
...
src/modules/score/views/Index.vue
浏览文件 @
d2da6f61
...
@@ -33,7 +33,6 @@ const listOptions = computed(() => {
...
@@ -33,7 +33,6 @@ const listOptions = computed(() => {
{
label
:
'暂未评分'
,
value
:
'0'
},
{
label
:
'暂未评分'
,
value
:
'0'
},
{
label
:
'评分中'
,
value
:
'1'
},
{
label
:
'评分中'
,
value
:
'1'
},
{
label
:
'已评分'
,
value
:
'2'
},
{
label
:
'已评分'
,
value
:
'2'
},
{
label
:
'AI评分完成'
,
value
:
'3'
},
],
],
},
},
],
],
...
@@ -115,7 +114,7 @@ const handleAIScore = async () => {
...
@@ -115,7 +114,7 @@ const handleAIScore = async () => {
updateScore
({
updateScore
({
id
:
item
.
id
,
id
:
item
.
id
,
check_status
:
3
,
check_status
:
2
,
total_score
:
totalAverageScore
,
total_score
:
totalAverageScore
,
score_details
:
JSON
.
stringify
(
scores
),
score_details
:
JSON
.
stringify
(
scores
),
}).
then
(()
=>
{
}).
then
(()
=>
{
...
@@ -136,12 +135,12 @@ const handlePublishScore = () => {
...
@@ -136,12 +135,12 @@ const handlePublishScore = () => {
useIntervalFn
(()
=>
{
useIntervalFn
(()
=>
{
handleRefresh
()
handleRefresh
()
},
5
000
)
},
2
000
)
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
title=
"成绩管理"
>
<AppCard
title=
"成绩管理"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
:hasLoading=
"false"
ref=
"appList"
>
<template
#
header-buttons
>
<template
#
header-buttons
>
<el-row
justify=
"space-between"
>
<el-row
justify=
"space-between"
>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出成绩
</el-button>
<el-button
type=
"primary"
@
click=
"handleExport"
>
导出成绩
</el-button>
...
@@ -156,7 +155,7 @@ useIntervalFn(() => {
...
@@ -156,7 +155,7 @@ useIntervalFn(() => {
<LiveProductCategory
v-model=
"listParams.live_commodity_type_id"
@
change=
"handleRefresh"
></LiveProductCategory>
<LiveProductCategory
v-model=
"listParams.live_commodity_type_id"
@
change=
"handleRefresh"
></LiveProductCategory>
</
template
>
</
template
>
<
template
#
table-x=
"{ row }"
>
<
template
#
table-x=
"{ row }"
>
<el-button
text
type=
"primary"
v-if=
"row.check_status != '
2
'"
>
<el-button
text
type=
"primary"
v-if=
"row.check_status != '
1
'"
>
<router-link
:to=
"
{ path: '/live/score/view', query: { ...$route.query, id: row.id } }">评分
</router-link>
<router-link
:to=
"
{ path: '/live/score/view', query: { ...$route.query, id: row.id } }">评分
</router-link>
</el-button>
</el-button>
</
template
>
</
template
>
...
...
src/modules/score/views/View.vue
浏览文件 @
d2da6f61
<
script
setup
>
<
script
setup
>
import
{
getScoreDetail
,
updateScore
}
from
'../api'
import
{
getScoreDetail
,
updateScore
}
from
'../api'
import
{
ElMessage
Box
,
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
useChat
}
from
'@ezijing/ai-vue'
import
{
useChat
}
from
'@ezijing/ai-vue'
import
{
generatePrompt
}
from
'../prompt'
import
{
generatePrompt
}
from
'../prompt'
import
{
generatePrompt
as
generatePrompt2
}
from
'../prompt2'
import
{
generatePrompt
as
generatePrompt2
}
from
'../prompt2'
...
@@ -92,23 +92,24 @@ const commitScore = (status = 1, isAI = false) => {
...
@@ -92,23 +92,24 @@ const commitScore = (status = 1, isAI = false) => {
const
totalAverageScore
=
validScores
.
reduce
((
acc
,
curr
)
=>
acc
+
(
curr
.
total_score
||
0
),
0
)
/
validScores
.
length
const
totalAverageScore
=
validScores
.
reduce
((
acc
,
curr
)
=>
acc
+
(
curr
.
total_score
||
0
),
0
)
/
validScores
.
length
return
updateScore
({
return
updateScore
({
id
:
route
.
query
.
id
,
id
,
check_status
:
status
,
check_status
:
status
,
total_score
:
totalAverageScore
,
total_score
:
totalAverageScore
,
score_details
:
JSON
.
stringify
(
scores
),
score_details
:
JSON
.
stringify
(
scores
),
})
})
}
}
const
handlePublishScore
=
()
=>
{
const
handlePublishScore
=
async
()
=>
{
ElMessageBox
.
confirm
(
'确定要发布成绩吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(
async
()
=>
{
await
commitScore
(
2
)
await
commitScore
(
2
)
await
fetchDetail
()
ElMessage
.
success
(
'发布成绩成功'
)
ElMessage
.
success
(
'发布成绩成功'
)
})
}
}
onMounted
(()
=>
{
updateScore
({
id
,
check_status
:
1
})
})
onBeforeUnmount
(()
=>
{
updateScore
({
id
,
check_status
:
2
})
})
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
title=
"成绩管理"
v-if=
"detail"
>
<AppCard
title=
"成绩管理"
v-if=
"detail"
>
...
@@ -122,15 +123,12 @@ const handlePublishScore = () => {
...
@@ -122,15 +123,12 @@ const handlePublishScore = () => {
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
type=
"primary"
:disabled=
"detail.check_status == '2'"
:loading=
"isLoading"
:loading=
"isLoading"
@
click=
"handleAIScore"
@
click=
"handleAIScore"
v-if=
"detail.competition_rule?.competition == 1"
v-if=
"detail.competition_rule?.competition == 1"
>
AI一键评分
</el-button
>
AI一键评分
</el-button
>
>
<el-button
type=
"primary"
:disabled=
"detail.check_status == '2'"
@
click=
"handlePublishScore"
v-if=
"false"
<el-button
type=
"primary"
@
click=
"handlePublishScore"
v-if=
"false"
>
发布成绩
</el-button>
>
发布成绩
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"score-box"
>
<div
class=
"score-box"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论