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
c1e71610
Commit
c1e71610
authored
Nov 06, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
Beta See merge request
!39
parents
ea73ba1e
2017e1ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
3 deletions
+12
-3
useEventSource.ts
src/composables/useEventSource.ts
+4
-0
fetch-event-stream-source.ts
...s/multi-model-dialogue/utils/fetch-event-stream-source.ts
+4
-0
document-detail.vue
...ews/personal-space/personal-knowledge/document-detail.vue
+1
-1
knowledge-type.ts
...views/personal-space/personal-knowledge/knowledge-type.ts
+1
-0
data-process.vue
...e/upload-knowledge/upload-local-document/data-process.vue
+1
-1
upload-file.vue
...ge/upload-knowledge/upload-local-document/upload-file.vue
+1
-1
No files found.
src/composables/useEventSource.ts
View file @
c1e71610
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useSystemLanguageStore
}
from
'@/store/modules/system-language'
import
{
languageKeyTransform
}
from
'@/utils/language-key-transform'
const
EVENT_SOURCE_BASE_URL
=
`
${
BASE_URLS
[
window
.
ENV
||
'DEV'
]}
`
...
...
@@ -14,6 +16,7 @@ export function fetchCustomEventSource(config: {
onFinally
?:
()
=>
void
})
{
const
userStore
=
useUserStore
()
const
systemLanguageStore
=
useSystemLanguageStore
()
let
responseError
=
false
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
...
...
@@ -21,6 +24,7 @@ export function fetchCustomEventSource(config: {
headers
:
{
'Content-Type'
:
'application/json'
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'x-lang'
:
languageKeyTransform
(
systemLanguageStore
.
currentLanguageInfo
.
key
),
},
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
signal
:
config
.
controller
?.
signal
,
...
...
src/views/multi-model-dialogue/utils/fetch-event-stream-source.ts
View file @
c1e71610
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useSystemLanguageStore
}
from
'@/store/modules/system-language'
import
{
languageKeyTransform
}
from
'@/utils/language-key-transform'
const
EVENT_SOURCE_BASE_URL
=
`
${
BASE_URLS
[
window
.
ENV
||
'DEV'
]}
`
...
...
@@ -14,6 +16,7 @@ export function fetchEventStreamSource(config: {
onFinally
?:
()
=>
void
})
{
const
userStore
=
useUserStore
()
const
systemLanguageStore
=
useSystemLanguageStore
()
let
responseError
=
false
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
...
...
@@ -21,6 +24,7 @@ export function fetchEventStreamSource(config: {
headers
:
{
'Content-Type'
:
'application/json'
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'x-lang'
:
languageKeyTransform
(
systemLanguageStore
.
currentLanguageInfo
.
key
),
},
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
signal
:
config
.
controller
?.
signal
,
...
...
src/views/personal-space/personal-knowledge/document-detail.vue
View file @
c1e71610
...
...
@@ -54,7 +54,7 @@ const currentKnowledgeChunkInfo = ref<KnowledgeChunkItem>({ ...defaultKnowledgeC
const
documentIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
type
=
documentUrl
.
substring
(
documentUrl
.
lastIndexOf
(
'.'
)
+
1
)
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
pn
g`
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
sv
g`
})
const
emptyKnowledgeChunkListText
=
computed
(()
=>
{
...
...
src/views/personal-space/personal-knowledge/knowledge-type.ts
View file @
c1e71610
...
...
@@ -13,6 +13,7 @@ export interface KnowledgeItem {
trainStatus
:
TrainStatus
isOpen
:
'Y'
|
'N'
createdTime
:
Date
documentInfos
:
KnowledgeDocumentItem
[]
}
export
interface
SegmentationConfigInterface
{
...
...
src/views/personal-space/personal-knowledge/upload-knowledge/upload-local-document/data-process.vue
View file @
c1e71610
...
...
@@ -66,7 +66,7 @@ const trainFileFontColor = computed(() => (status: TrainStatus) => {
const
trainFileIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
type
=
documentUrl
.
substring
(
documentUrl
.
lastIndexOf
(
'.'
)
+
1
)
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
pn
g`
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
sv
g`
})
const
isTrainFileListFinish
=
computed
(()
=>
{
...
...
src/views/personal-space/personal-knowledge/upload-knowledge/upload-local-document/upload-file.vue
View file @
c1e71610
...
...
@@ -34,7 +34,7 @@ const emit = defineEmits<Emit>()
const
uploadFileList
=
ref
<
FileItem
[]
>
([])
const
uploadFileIcon
=
(
type
:
string
)
=>
{
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
pn
g`
return
`https://gsst-poe-sit.gz.bcebos.com/icon/
${
type
}
.
sv
g`
}
const
isDisabledNextBtn
=
computed
(()
=>
{
...
...
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