Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
a215af9e
提交
a215af9e
authored
11月 11, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: AI一键评分
上级
70de0f02
全部展开
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
36 行增加
和
32 行删除
+36
-32
prompt.ts
src/modules/live/score/prompt.ts
+0
-0
Index.vue
src/modules/live/score/views/Index.vue
+1
-0
View.vue
src/modules/live/score/views/View.vue
+35
-32
没有找到文件。
src/modules/live/score/prompt.ts
0 → 100644
浏览文件 @
a215af9e
差异被折叠。
点击展开。
src/modules/live/score/views/Index.vue
浏览文件 @
a215af9e
...
@@ -28,6 +28,7 @@ const listOptions = computed(() => {
...
@@ -28,6 +28,7 @@ const listOptions = computed(() => {
],
],
columns
:
[
columns
:
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'序号'
,
type
:
'index'
,
width
:
60
},
{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'姓名'
,
prop
:
'student_name'
},
{
label
:
'姓名'
,
prop
:
'student_name'
},
{
label
:
'专业'
,
prop
:
'specialty_name'
},
{
label
:
'专业'
,
prop
:
'specialty_name'
},
{
label
:
'班级'
,
prop
:
'class_name'
},
{
label
:
'班级'
,
prop
:
'class_name'
},
...
...
src/modules/live/score/views/View.vue
浏览文件 @
a215af9e
...
@@ -13,11 +13,15 @@ import {
...
@@ -13,11 +13,15 @@ import {
import
ScoreCard
from
'../components/ScoreCard.vue'
import
ScoreCard
from
'../components/ScoreCard.vue'
import
ScoreCardLive
from
'../components/ScoreCardLive.vue'
import
ScoreCardLive
from
'../components/ScoreCardLive.vue'
import
Preview
from
'@/components/Preview.vue'
import
Preview
from
'@/components/Preview.vue'
import
{
ElMessageBox
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
useChat
}
from
'@ezijing/ai-vue'
import
{
generatePrompt
}
from
'../prompt'
const
route
=
useRoute
()
const
route
=
useRoute
()
const
id
=
route
.
query
.
id
const
id
=
route
.
query
.
id
const
{
isLoading
,
generateText
}
=
useChat
({
provider
:
'volcano'
})
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
detail
=
ref
(
null
)
const
detail
=
ref
(
null
)
...
@@ -100,6 +104,10 @@ const productList = computed(() => {
...
@@ -100,6 +104,10 @@ const productList = computed(() => {
return
detail
.
value
.
live_data
?.
commodities
?.
map
((
item
)
=>
{
return
detail
.
value
.
live_data
?.
commodities
?.
map
((
item
)
=>
{
try
{
try
{
item
.
info
=
JSON
.
parse
(
item
.
info
)
item
.
info
=
JSON
.
parse
(
item
.
info
)
item
.
info
.
delivery_mode_name
=
getNameByValue
(
item
.
info
.
delivery_mode
,
deliveryMode
)
item
.
info
.
delivery_time_name
=
getNameByValue
(
item
.
info
.
delivery_time
,
deliveryTime
)
item
.
info
.
shipping_template_name
=
getNameByValue
(
item
.
info
.
shipping_template
,
shippingTemplate
)
item
.
info
.
after_sales_policy_name
=
getNameByValue
(
item
.
info
.
after_sales_policy
,
afterSalesPolicy
)
item
.
live_commodity_attrs
=
JSON
.
parse
(
item
.
live_commodity_attrs
)
item
.
live_commodity_attrs
=
JSON
.
parse
(
item
.
live_commodity_attrs
)
item
.
picture_34_addreses
=
JSON
.
parse
(
item
.
picture_34_addreses
)
item
.
picture_34_addreses
=
JSON
.
parse
(
item
.
picture_34_addreses
)
item
.
picture_addreses
=
JSON
.
parse
(
item
.
picture_addreses
)
item
.
picture_addreses
=
JSON
.
parse
(
item
.
picture_addreses
)
...
@@ -120,34 +128,10 @@ const productTableOptions = {
...
@@ -120,34 +128,10 @@ const productTableOptions = {
{
label
:
'商品标题'
,
prop
:
'title'
},
{
label
:
'商品标题'
,
prop
:
'title'
},
{
label
:
'所属商品品类'
,
prop
:
'live_commodity_type_full_name'
},
{
label
:
'所属商品品类'
,
prop
:
'live_commodity_type_full_name'
},
{
label
:
'参考价(¥)'
,
prop
:
'info.reference_price'
},
{
label
:
'参考价(¥)'
,
prop
:
'info.reference_price'
},
{
{
label
:
'发货模式'
,
prop
:
'info.delivery_mode_name'
},
label
:
'发货模式'
,
{
label
:
'发货时效'
,
prop
:
'info.delivery_time_name'
},
prop
:
'delivery_mode'
,
{
label
:
'运费模板'
,
prop
:
'info.shipping_template_name'
},
computed
({
row
})
{
{
label
:
'售后政策'
,
prop
:
'info.after_sales_policy_name'
},
return
getNameByValue
(
row
.
info
.
delivery_mode
,
deliveryMode
)
},
},
{
label
:
'发货时效'
,
prop
:
'delivery_time'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
info
.
delivery_time
,
deliveryTime
)
},
},
{
label
:
'运费模板'
,
prop
:
'shipping_template'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
info
.
shipping_template
,
shippingTemplate
)
},
},
{
label
:
'售后政策'
,
prop
:
'after_sales_policy'
,
computed
({
row
})
{
return
getNameByValue
(
row
.
info
.
after_sales_policy
,
afterSalesPolicy
)
},
},
],
],
}
}
// 商品规格
// 商品规格
...
@@ -197,8 +181,24 @@ const talkTableOptions = {
...
@@ -197,8 +181,24 @@ const talkTableOptions = {
}
}
const
activeTab
=
ref
(
1
)
const
activeTab
=
ref
(
1
)
const
handleAIScore
=
()
=>
{
const
handleAIScore
=
async
()
=>
{
console
.
log
(
'AI一键评分'
)
console
.
log
(
'AI一键评分'
)
const
result
=
await
generateText
({
prompt
:
generatePrompt
(
detail
.
value
.
live_data
),
response_format
:
{
type
:
'json_object'
},
})
try
{
const
parsed
=
JSON
.
parse
(
result
.
content
)
Object
.
assign
(
scoreDetails
,
parsed
)
commitScore
(
0
).
then
(()
=>
{
ElMessage
.
success
(
'保存成功'
)
})
}
catch
(
error
)
{
console
.
log
(
error
)
ElMessage
.
error
(
'评分失败'
)
return
}
console
.
log
(
result
.
content
)
}
}
const
handleSave
=
(
key
,
params
)
=>
{
const
handleSave
=
(
key
,
params
)
=>
{
...
@@ -207,6 +207,7 @@ const handleSave = (key, params) => {
...
@@ -207,6 +207,7 @@ const handleSave = (key, params) => {
ElMessage
.
success
(
'保存成功'
)
ElMessage
.
success
(
'保存成功'
)
})
})
}
}
const
handleNext
=
()
=>
{
const
handleNext
=
()
=>
{
activeTab
.
value
++
activeTab
.
value
++
}
}
...
@@ -242,7 +243,9 @@ const handlePublishScore = () => {
...
@@ -242,7 +243,9 @@ const handlePublishScore = () => {
<el-form-item
label=
"状态"
>
{{
detail
.
status_name
}}
</el-form-item>
<el-form-item
label=
"状态"
>
{{
detail
.
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
type=
"primary"
:disabled=
"detail.status == '2'"
@
click=
"handleAIScore"
>
AI一键评分
</el-button>
<el-button
type=
"primary"
:disabled=
"detail.status == '2'"
:loading=
"isLoading"
@
click=
"handleAIScore"
>
AI一键评分
</el-button
>
<el-button
type=
"primary"
:disabled=
"detail.status == '2'"
@
click=
"handlePublishScore"
>
发布成绩
</el-button>
<el-button
type=
"primary"
:disabled=
"detail.status == '2'"
@
click=
"handlePublishScore"
>
发布成绩
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -411,7 +414,7 @@ const handlePublishScore = () => {
...
@@ -411,7 +414,7 @@ const handlePublishScore = () => {
@
save=
"handleSave('report', $event)"
@
save=
"handleSave('report', $event)"
@
next=
"handleNext"
>
@
next=
"handleNext"
>
<
template
v-if=
"detail.live_data.reports.length > 0"
>
<
template
v-if=
"detail.live_data.reports.length > 0"
>
<div
v-for=
"item in detail.live_data.reports"
:key=
"item.report_url"
>
<div
v-for=
"item in detail.live_data.reports"
:key=
"item.report_url"
style=
"height: 600px"
>
<Preview
:url=
"item.report_url"
/>
<Preview
:url=
"item.report_url"
/>
</div>
</div>
</
template
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论