Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
361a97ec
提交
361a97ec
authored
5月 20, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
b1acbeb4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
33 行增加
和
5 行删除
+33
-5
AIChat.vue
src/modules/material/all/components/AIChat.vue
+33
-5
没有找到文件。
src/modules/material/all/components/AIChat.vue
浏览文件 @
361a97ec
...
...
@@ -5,7 +5,13 @@ import { useMapStore } from '@/stores/map'
import
{
useUserStore
}
from
'@/stores/user'
import
{
useConnection
}
from
'../composables/useConnection'
import
{
useIndustry
}
from
'../composables/useIndustry'
import
{
getNameByValue
,
materialMethodList
,
materialUsageList
,
materialUsersList
,
materialPictureStyleList
}
from
'@/utils/dictionary'
import
{
getNameByValue
,
materialMethodList
,
materialUsageList
,
materialUsersList
,
materialPictureStyleList
}
from
'@/utils/dictionary'
import
IconComputer
from
'./IconComputer.vue'
import
IconUser
from
'./IconUser.vue'
import
IconAI
from
'./IconAI.vue'
...
...
@@ -92,11 +98,17 @@ async function handleSendType(type, content) {
content
=
`
${
content
}
`
break
case
3
:
content
=
`我是
${
userName
}
,请帮我
润色
以下内容:
${
content
.
replace
(
'请帮我创作一个'
,
''
)}
`
content
=
`我是
${
userName
}
,请帮我
改写
以下内容:
${
content
.
replace
(
'请帮我创作一个'
,
''
)}
`
break
case
4
:
content
=
`我是
${
userName
}
,请帮我扩写以下内容:
${
content
.
replace
(
'请帮我创作一个'
,
''
)}
`
break
case
7
:
content
=
`我是
${
userName
}
,请帮我缩写以下内容:
${
content
.
replace
(
'请帮我创作一个'
,
''
)}
`
break
case
8
:
content
=
`我是
${
userName
}
,请帮我总结以下内容:
${
content
.
replace
(
'请帮我创作一个'
,
''
)}
`
break
}
post
({
type
,
content
})
...
...
@@ -151,18 +163,28 @@ async function handleSave(message) {
<!-- 文本 -->
<template
v-if=
"form.type == 1 && item.role !== 'user'"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleCopy(item.content)"
>
复制
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(5, item.input || item.content)"
v-if=
"item.role == 'bot'"
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(5, item.input || item.content)"
v-if=
"item.role == 'bot'"
>
刷新(
{{
usages
.
ai_refresh_count
}}
/
{{
usages
.
ai_refresh_max_count
}}
)
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(2, item.content)"
>
AI创作(
{{
usages
.
ai_creation_count
}}
/
{{
usages
.
ai_creation_max_count
}}
)
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(3, item.content)"
>
AI
润色
(
{{
usages
.
ai_polish_count
}}
/
{{
usages
.
ai_polish_max_count
}}
)
</el-button
>
AI
改写
(
{{
usages
.
ai_polish_count
}}
/
{{
usages
.
ai_polish_max_count
}}
)
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(4, item.content)"
>
AI扩写(
{{
usages
.
ai_expand_count
}}
/
{{
usages
.
ai_expand_max_count
}}
)
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(7, item.content)"
>
AI缩写(
{{
usages
.
ai_abbr_count
}}
/
{{
usages
.
ai_abbr_max_count
}}
)
</el-button
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSendType(8, item.content)"
>
AI总结(
{{
usages
.
ai_summary_count
}}
/
{{
usages
.
ai_summary_max_count
}}
)
</el-button
>
</
template
>
<!-- 图片 -->
<
template
v-if=
"form.type == 2"
>
...
...
@@ -190,7 +212,13 @@ async function handleSave(message) {
</div>
</div>
<div
class=
"chat-footer"
>
<el-input
type=
"textarea"
:autosize=
"{ minRows: 1, maxRows: 12 }"
placeholder=
"发消息"
v-model=
"content"
@
keydown
.
enter=
"handleSend"
></el-input>
<el-input
type=
"textarea"
:autosize=
"{ minRows: 1, maxRows: 12 }"
placeholder=
"发消息"
v-model=
"content"
@
keydown
.
enter=
"handleSend"
></el-input>
<el-button
text
type=
"primary"
@
click=
"handleSend"
>
发送
</el-button>
</div>
</template>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论