Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
3ed509bd
Commit
3ed509bd
authored
Jan 22, 2025
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页模型未开启上传文件或图片,不展示其按钮
parent
8b7fedb8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
footer-operation.vue
src/views/home/components/footer-operation.vue
+13
-1
home.vue
src/views/home/home.vue
+2
-0
types.d.ts
src/views/home/types.d.ts
+2
-0
No files found.
src/views/home/components/footer-operation.vue
View file @
3ed509bd
...
@@ -12,6 +12,7 @@ import { ChannelType } from '@/enums/channel'
...
@@ -12,6 +12,7 @@ import { ChannelType } from '@/enums/channel'
import
{
UploadStatus
}
from
'@/enums/upload-status'
import
{
UploadStatus
}
from
'@/enums/upload-status'
import
{
useUploadImage
}
from
'@/composables/useUploadImage'
import
{
useUploadImage
}
from
'@/composables/useUploadImage'
import
{
useSystemLanguageStore
}
from
'@/store/modules/system-language'
import
{
useSystemLanguageStore
}
from
'@/store/modules/system-language'
import
{
PluginType
}
from
'@/enums/plugin'
interface
Props
{
interface
Props
{
currentSessionId
:
string
currentSessionId
:
string
...
@@ -73,6 +74,8 @@ const isHasUploadImage = computed(() => {
...
@@ -73,6 +74,8 @@ const isHasUploadImage = computed(() => {
const
isEnglishLanguage
=
computed
(()
=>
systemLanguageStore
.
currentLanguageInfo
.
key
===
'en'
)
const
isEnglishLanguage
=
computed
(()
=>
systemLanguageStore
.
currentLanguageInfo
.
key
===
'en'
)
const
isEnableUploadImage
=
computed
(()
=>
currentAgentApplication
.
value
.
unitIds
.
includes
(
PluginType
.
IMAGE_OCR
))
;(
function
()
{
;(
function
()
{
getAgentApplicationSelectList
()
getAgentApplicationSelectList
()
})()
})()
...
@@ -446,6 +449,7 @@ defineExpose({
...
@@ -446,6 +449,7 @@ defineExpose({
<n-popover
trigger=
"hover"
>
<n-popover
trigger=
"hover"
>
<
template
#
trigger
>
<
template
#
trigger
>
<n-button
<n-button
v-show=
"currentAgentApplication.isDocumentParsing === 'Y'"
class=
"application-select-btn !mr-[14px] !h-[34px] !rounded-[10px] !p-0"
class=
"application-select-btn !mr-[14px] !h-[34px] !rounded-[10px] !p-0"
@
click=
"handleFileUploadPopup"
@
click=
"handleFileUploadPopup"
>
>
...
@@ -464,7 +468,14 @@ defineExpose({
...
@@ -464,7 +468,14 @@ defineExpose({
class=
"mr-[5px] h-[18px] w-[18px] bg-[url('https://gsst-poe-sit.gz.bcebos.com/icon/doc.svg')] bg-contain bg-no-repeat"
class=
"mr-[5px] h-[18px] w-[18px] bg-[url('https://gsst-poe-sit.gz.bcebos.com/icon/doc.svg')] bg-contain bg-no-repeat"
></div>
></div>
<div
class=
"text-[14px]"
:class=
"isEnglishLanguage ? 'w-[110px]' : 'w-[210px]'"
>
<div
class=
"text-[14px]"
:class=
"{
'w-[110px]': isEnglishLanguage && isEnableUploadImage,
'w-[210px]': !isEnglishLanguage && isEnableUploadImage,
'w-[260px]': !isEnableUploadImage,
}"
>
<n-ellipsis
:tooltip=
"{ width: 400 }"
>
<n-ellipsis
:tooltip=
"{ width: 400 }"
>
{{ currentInputFileInfo.fileName }}
{{ currentInputFileInfo.fileName }}
</n-ellipsis>
</n-ellipsis>
...
@@ -507,6 +518,7 @@ defineExpose({
...
@@ -507,6 +518,7 @@ defineExpose({
<n-popover
style=
"width: 210px"
trigger=
"hover"
>
<n-popover
style=
"width: 210px"
trigger=
"hover"
>
<
template
#
trigger
>
<
template
#
trigger
>
<n-button
<n-button
v-show=
"isEnableUploadImage"
class=
"upload-image-btn !mr-[14px] !h-[34px] !rounded-[10px] !p-0"
class=
"upload-image-btn !mr-[14px] !h-[34px] !rounded-[10px] !p-0"
@
click=
"handleSelectImage(handleClick)"
@
click=
"handleSelectImage(handleClick)"
>
>
...
...
src/views/home/home.vue
View file @
3ed509bd
...
@@ -31,6 +31,8 @@ const currentAgentApplication = ref<AgentApplicationRecordItem>({
...
@@ -31,6 +31,8 @@ const currentAgentApplication = ref<AgentApplicationRecordItem>({
creator
:
''
,
creator
:
''
,
publishedTime
:
''
,
publishedTime
:
''
,
points
:
0
,
points
:
0
,
isDocumentParsing
:
'N'
,
unitIds
:
[],
})
})
const
currentSessionId
=
ref
(
''
)
const
currentSessionId
=
ref
(
''
)
...
...
src/views/home/types.d.ts
View file @
3ed509bd
...
@@ -6,6 +6,8 @@ export interface AgentApplicationRecordItem {
...
@@ -6,6 +6,8 @@ export interface AgentApplicationRecordItem {
creator
:
string
creator
:
string
publishedTime
:
string
publishedTime
:
string
points
:
number
points
:
number
isDocumentParsing
:
'Y'
|
'N'
unitIds
:
string
[]
}
}
export
interface
MessageItemInterface
{
export
interface
MessageItemInterface
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment