Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
9ae415d8
提交
9ae415d8
authored
11月 17, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
29c633cd
全部展开
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
54 行增加
和
31 行删除
+54
-31
CompetitionLiveProd.vue
src/modules/live/score/components/CompetitionLiveProd.vue
+0
-0
prompt.ts
src/modules/live/score/prompt.ts
+15
-3
prompt2.ts
src/modules/live/score/prompt2.ts
+0
-0
Index.vue
src/modules/live/score/views/Index.vue
+9
-9
View.vue
src/modules/live/score/views/View.vue
+19
-13
Demo.vue
src/modules/live/test/components/Demo.vue
+1
-1
Index.vue
src/modules/live/test/views/Index.vue
+10
-5
没有找到文件。
src/modules/live/score/components/CompetitionLiveProd.vue
0 → 100644
浏览文件 @
9ae415d8
差异被折叠。
点击展开。
src/modules/live/score/prompt.ts
浏览文件 @
9ae415d8
...
@@ -499,16 +499,24 @@ ${JSON.stringify(data.speeches)}
...
@@ -499,16 +499,24 @@ ${JSON.stringify(data.speeches)}
}
}
export
const
generatePracticeRecordPrompt
=
(
data
:
any
)
=>
{
export
const
generatePracticeRecordPrompt
=
(
data
:
any
)
=>
{
const
firstLivePractice
=
data
.
practices
[
0
]
const
firstLivePracticeRecord
=
data
.
practice_records
.
find
(
(
item
:
any
)
=>
item
.
live_practice_id
===
firstLivePractice
?.
id
)
return
`请根据选手提交的内容进行评分(满分20分)
return
`请根据选手提交的内容进行评分(满分20分)
选手提交内容:
选手提交内容:
${
JSON
.
stringify
(
data
.
practice_records
[
0
]
)}
${
JSON
.
stringify
(
firstLivePracticeRecord
)}
`
`
}
}
export
const
generateImprovementPlanPrompt
=
(
data
:
any
)
=>
{
export
const
generateImprovementPlanPrompt
=
(
data
:
any
)
=>
{
const
firstLivePractice
=
data
.
practices
[
0
]
const
firstLivePracticeRecord
=
data
.
practice_records
.
find
(
(
item
:
any
)
=>
item
.
live_practice_id
===
firstLivePractice
?.
id
)
return
`请根据选手提交的改进方案进行评分(满分10分):
return
`请根据选手提交的改进方案进行评分(满分10分):
选手提交的改进方案:
选手提交的改进方案:
${
JSON
.
stringify
(
data
.
practice_records
[
0
]
?.
improvement_plan
)}
${
JSON
.
stringify
(
firstLivePracticeRecord
?.
improvement_plan
)}
评分标准:
评分标准:
-
必须提出至少
5
条改进措施
-
必须提出至少
5
条改进措施
...
@@ -518,10 +526,14 @@ export const generateImprovementPlanPrompt = (data: any) => {
...
@@ -518,10 +526,14 @@ export const generateImprovementPlanPrompt = (data: any) => {
}
}
export const generatePracticeRecord2Prompt = (data: any) => {
export const generatePracticeRecord2Prompt = (data: any) => {
const secondLivePractice = data.practices[1]
const secondLivePracticeRecord = data.practice_records.find(
(item: any) => item.live_practice_id === secondLivePractice?.id
)
return `
return `
请根据选手提交的二次直播演练内容进行评分(满分
15
分)
请根据选手提交的二次直播演练内容进行评分(满分
15
分)
选手提交内容:
选手提交内容:
$
{
JSON
.
stringify
(
data
.
practice_records
[
1
]
)}
$
{
JSON
.
stringify
(
secondLivePracticeRecord
)}
`
`
}
}
...
...
src/modules/live/score/prompt2.ts
0 → 100644
浏览文件 @
9ae415d8
差异被折叠。
点击展开。
src/modules/live/score/views/Index.vue
浏览文件 @
9ae415d8
...
@@ -8,7 +8,7 @@ const appList = ref(null)
...
@@ -8,7 +8,7 @@ const appList = ref(null)
const
handleRefresh
=
()
=>
{
const
handleRefresh
=
()
=>
{
appList
.
value
?.
refetch
()
appList
.
value
?.
refetch
()
}
}
const
listParams
=
reactive
({
name
:
''
,
status
:
''
})
const
listParams
=
reactive
({
name
:
''
,
check_
status
:
''
})
// 列表配置
// 列表配置
const
listOptions
=
computed
(()
=>
{
const
listOptions
=
computed
(()
=>
{
...
@@ -18,11 +18,12 @@ const listOptions = computed(() => {
...
@@ -18,11 +18,12 @@ const listOptions = computed(() => {
{
label
:
'姓名'
,
prop
:
'name'
,
type
:
'input'
},
{
label
:
'姓名'
,
prop
:
'name'
,
type
:
'input'
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
,
prop
:
'
check_
status'
,
type
:
'select'
,
type
:
'select'
,
options
:
[
options
:
[
{
label
:
'未批改'
,
value
:
'1'
},
{
label
:
'暂未评分'
,
value
:
'0'
},
{
label
:
'已批改'
,
value
:
'2'
},
{
label
:
'评分中'
,
value
:
'1'
},
{
label
:
'已评分'
,
value
:
'2'
},
],
],
},
},
],
],
...
@@ -33,10 +34,11 @@ const listOptions = computed(() => {
...
@@ -33,10 +34,11 @@ const listOptions = computed(() => {
{
label
:
'专业'
,
prop
:
'specialty_name'
},
{
label
:
'专业'
,
prop
:
'specialty_name'
},
{
label
:
'班级'
,
prop
:
'class_name'
},
{
label
:
'班级'
,
prop
:
'class_name'
},
{
label
:
'成绩'
,
prop
:
'score_display'
},
{
label
:
'成绩'
,
prop
:
'score_display'
},
{
label
:
'状态'
,
prop
:
'status_name'
},
{
label
:
'状态'
,
prop
:
'check_status_name'
},
{
label
:
'评分人'
,
prop
:
'checker_name'
},
{
label
:
'提交时间'
,
prop
:
'commit_time'
},
{
label
:
'提交时间'
,
prop
:
'commit_time'
},
{
label
:
'批改时间'
,
prop
:
'commit_time'
},
{
label
:
'批改时间'
,
prop
:
'commit_time'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
20
0
},
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
12
0
},
],
],
}
}
})
})
...
@@ -65,9 +67,7 @@ const handleExport = () => {
...
@@ -65,9 +67,7 @@ const handleExport = () => {
</
template
>
</
template
>
<
template
#
table-x=
"{ row }"
>
<
template
#
table-x=
"{ row }"
>
<el-button
text
type=
"primary"
>
<el-button
text
type=
"primary"
>
<router-link
:to=
"
{ path: '/live/score/view', query: { ...$route.query, id: row.id } }" target="_blank"
<router-link
:to=
"
{ path: '/live/score/view', query: { ...$route.query, id: row.id } }">评分
</router-link>
>评分
</router-link
>
</el-button>
</el-button>
</
template
>
</
template
>
</AppList>
</AppList>
...
...
src/modules/live/score/views/View.vue
浏览文件 @
9ae415d8
...
@@ -3,8 +3,10 @@ import { getScoreDetail, updateScore } from '../api'
...
@@ -3,8 +3,10 @@ import { getScoreDetail, updateScore } from '../api'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
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'
const
CompetitionLive
=
defineAsyncComponent
(()
=>
import
(
'../components/CompetitionLive.vue'
))
const
CompetitionLive
=
defineAsyncComponent
(()
=>
import
(
'../components/CompetitionLive.vue'
))
const
CompetitionLiveProd
=
defineAsyncComponent
(()
=>
import
(
'../components/CompetitionLiveProd.vue'
))
const
CompetitionOperations
=
defineAsyncComponent
(()
=>
import
(
'../components/CompetitionOperations.vue'
))
const
CompetitionOperations
=
defineAsyncComponent
(()
=>
import
(
'../components/CompetitionOperations.vue'
))
const
route
=
useRoute
()
const
route
=
useRoute
()
const
id
=
route
.
query
.
id
const
id
=
route
.
query
.
id
...
@@ -31,14 +33,15 @@ onMounted(() => {
...
@@ -31,14 +33,15 @@ onMounted(() => {
const
handleAIScore
=
async
()
=>
{
const
handleAIScore
=
async
()
=>
{
console
.
log
(
'AI一键评分'
)
console
.
log
(
'AI一键评分'
)
const
result
=
await
generateText
({
const
prompt
=
prompt
:
generatePrompt
(
detail
.
value
.
live_data
),
detail
.
value
.
competition_rule
?.
competition
==
1
response_format
:
{
type
:
'json_object'
},
?
generatePrompt
(
detail
.
value
.
live_data
)
})
:
generatePrompt2
(
detail
.
value
.
live_data
)
const
result
=
await
generateText
({
prompt
,
response_format
:
{
type
:
'json_object'
}
})
try
{
try
{
const
parsed
=
JSON
.
parse
(
result
.
content
)
const
parsed
=
JSON
.
parse
(
result
.
content
)
Object
.
assign
(
scoreDetails
,
parsed
)
Object
.
assign
(
scoreDetails
,
parsed
)
commitScore
(
0
).
then
(()
=>
{
commitScore
().
then
(()
=>
{
ElMessage
.
success
(
'保存成功'
)
ElMessage
.
success
(
'保存成功'
)
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -49,15 +52,15 @@ const handleAIScore = async () => {
...
@@ -49,15 +52,15 @@ const handleAIScore = async () => {
}
}
const
handleSave
=
()
=>
{
const
handleSave
=
()
=>
{
commitScore
(
0
).
then
(()
=>
{
commitScore
().
then
(()
=>
{
ElMessage
.
success
(
'保存成功'
)
ElMessage
.
success
(
'保存成功'
)
})
})
}
}
const
commitScore
=
(
status
=
0
)
=>
{
const
commitScore
=
(
status
=
1
)
=>
{
return
updateScore
({
return
updateScore
({
id
:
route
.
query
.
id
,
id
:
route
.
query
.
id
,
score
_status
:
status
,
check
_status
:
status
,
total_score
:
totalScore
.
value
,
total_score
:
totalScore
.
value
,
score_details
:
JSON
.
stringify
(
scoreDetails
),
score_details
:
JSON
.
stringify
(
scoreDetails
),
})
})
...
@@ -69,7 +72,7 @@ const handlePublishScore = () => {
...
@@ -69,7 +72,7 @@ const handlePublishScore = () => {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
}).
then
(
async
()
=>
{
}).
then
(
async
()
=>
{
await
commitScore
(
1
)
await
commitScore
(
2
)
await
fetchDetail
()
await
fetchDetail
()
ElMessage
.
success
(
'发布成绩成功'
)
ElMessage
.
success
(
'发布成绩成功'
)
})
})
...
@@ -82,18 +85,18 @@ const handlePublishScore = () => {
...
@@ -82,18 +85,18 @@ const handlePublishScore = () => {
<el-form-item
label=
"姓名"
>
{{
detail
.
student_name
}}
</el-form-item>
<el-form-item
label=
"姓名"
>
{{
detail
.
student_name
}}
</el-form-item>
<el-form-item
label=
"专业"
>
{{
detail
.
specialty_name
}}
</el-form-item>
<el-form-item
label=
"专业"
>
{{
detail
.
specialty_name
}}
</el-form-item>
<el-form-item
label=
"班级"
>
{{
detail
.
class_name
}}
</el-form-item>
<el-form-item
label=
"班级"
>
{{
detail
.
class_name
}}
</el-form-item>
<el-form-item
label=
"状态"
>
{{
detail
.
status_name
}}
</el-form-item>
<el-form-item
label=
"状态"
>
{{
detail
.
check_
status_name
}}
</el-form-item>
<el-form-item
label=
"提交时间"
>
{{
detail
.
commit_time
}}
</el-form-item>
<el-form-item
label=
"提交时间"
>
{{
detail
.
commit_time
}}
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
type=
"primary"
:disabled=
"detail.status == '2'"
: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.status == '2'"
@
click=
"handlePublishScore"
>
发布成绩
</el-button>
<el-button
type=
"primary"
:disabled=
"detail.
check_
status == '2'"
@
click=
"handlePublishScore"
>
发布成绩
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"score-box"
>
<div
class=
"score-box"
>
...
@@ -101,11 +104,14 @@ const handlePublishScore = () => {
...
@@ -101,11 +104,14 @@ const handlePublishScore = () => {
</div>
</div>
</div>
</div>
<el-divider
/>
<el-divider
/>
<template
v-if=
"detail.competition_rule?.competition == 1"
>
<CompetitionLive
<CompetitionLive
:detail=
"detail"
:detail=
"detail"
@
save=
"handleSave"
@
save=
"handleSave"
v-model:scoreDetails=
"scoreDetails"
v-model:scoreDetails=
"scoreDetails"
v-if=
"detail.competition_rule?.competition == 1"
/>
v-if=
"detail.competition_rule?.questions == 1"
/>
<CompetitionLiveProd
:detail=
"detail"
@
save=
"handleSave"
v-model:scoreDetails=
"scoreDetails"
v-else
/>
</
template
>
<CompetitionOperations
:detail=
"detail"
@
save=
"handleSave"
v-model:scoreDetails=
"scoreDetails"
v-else
/>
<CompetitionOperations
:detail=
"detail"
@
save=
"handleSave"
v-model:scoreDetails=
"scoreDetails"
v-else
/>
</AppCard>
</AppCard>
</template>
</template>
...
...
src/modules/live/test/components/Demo.vue
浏览文件 @
9ae415d8
...
@@ -112,7 +112,7 @@ const onStatsChange = (stats) => {
...
@@ -112,7 +112,7 @@ const onStatsChange = (stats) => {
</
template
>
</
template
>
</div>
</div>
<div
class=
"live-col"
style=
"flex: 1"
v-if=
"isView"
>
<div
class=
"live-col"
style=
"flex: 1"
v-if=
"isView"
>
<el-timeline
style=
"max-
width
: 600px"
>
<el-timeline
style=
"max-
height
: 600px"
>
<el-timeline-item
<el-timeline-item
placement=
"top"
placement=
"top"
v-for=
"(item, index) in timelines"
v-for=
"(item, index) in timelines"
...
...
src/modules/live/test/views/Index.vue
浏览文件 @
9ae415d8
...
@@ -11,6 +11,7 @@ const liveUploadWay = useMapStore().getMapValuesByKey('live_upload_way')
...
@@ -11,6 +11,7 @@ const liveUploadWay = useMapStore().getMapValuesByKey('live_upload_way')
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
FormDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/FormDialog.vue'
))
const
RecordDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/RecordDialog.vue'
))
const
RecordDialog
=
defineAsyncComponent
(()
=>
import
(
'../components/RecordDialog.vue'
))
const
router
=
useRouter
()
const
appList
=
ref
(
null
)
const
appList
=
ref
(
null
)
// 刷新
// 刷新
const
handleRefresh
=
()
=>
{
const
handleRefresh
=
()
=>
{
...
@@ -70,6 +71,14 @@ const handleRemove = async (row) => {
...
@@ -70,6 +71,14 @@ const handleRemove = async (row) => {
ElMessage
.
success
(
'删除成功'
)
ElMessage
.
success
(
'删除成功'
)
handleRefresh
()
handleRefresh
()
}
}
const
handleStart
=
async
(
row
)
=>
{
await
ElMessageBox
.
confirm
(
'本次考试共提供两次直播机会——首次直播演练和第二次直播演练。您确定要现在开始直播吗?'
,
'提示'
)
router
.
push
({
path
:
'test/demo'
,
query
:
{
id
:
row
.
id
}
})
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -82,11 +91,7 @@ const handleRemove = async (row) => {
...
@@ -82,11 +91,7 @@ const handleRemove = async (row) => {
<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"
>
<el-button
text
type=
"primary"
@
click=
"handleStart(row)"
v-if=
"row.practice_count == 0"
>
开始直播
</el-button>
<router-link
:to=
"
{ path: 'test/demo', query: { id: row.id } }" v-if="row.practice_count == 0"
>开始直播
</router-link
>
</el-button>
<el-button
text
type=
"primary"
@
click=
"handelView(row)"
>
查看
</el-button>
<el-button
text
type=
"primary"
@
click=
"handelView(row)"
>
查看
</el-button>
<el-button
text
type=
"primary"
@
click=
"handleRemove(row)"
>
删除
</el-button>
<el-button
text
type=
"primary"
@
click=
"handleRemove(row)"
>
删除
</el-button>
</
template
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论