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
b5e63e44
Commit
b5e63e44
authored
Nov 07, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.gsstcloud.com/poc/poc-fe
into shirlyn
parents
b22e6438
7ab11762
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
28 additions
and
44 deletions
+28
-44
.env.development
.env.development
+1
-1
.env.production
.env.production
+1
-1
index.html
index.html
+1
-1
logo.png
src/assets/images/logo.png
+0
-0
page-logo.png
src/assets/images/page-logo.png
+0
-0
useEventSource.ts
src/composables/useEventSource.ts
+4
-0
en.yaml
src/locales/langs/en.yaml
+1
-1
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+2
-2
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+1
-1
system-language.ts
src/store/modules/system-language.ts
+4
-29
login.vue
src/views/login/login.vue
+1
-1
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
+2
-2
upload-file.vue
...ge/upload-knowledge/upload-local-document/upload-file.vue
+2
-2
footer-input.vue
src/views/share/components/footer-input.vue
+1
-1
mobile-page-header.vue
src/views/share/components/mobile-page-header.vue
+1
-1
No files found.
.env.development
View file @
b5e63e44
VITE_APP_ENV = 'DEV'
VITE_APP_ENV = 'DEV'
VITE_APP_NAME = '
Super
Link'
VITE_APP_NAME = '
Model
Link'
VITE_APP_THEME_COLOR = '#000DFF'
VITE_APP_THEME_COLOR = '#000DFF'
VITE_PORT = 8848
VITE_PORT = 8848
...
...
.env.production
View file @
b5e63e44
VITE_APP_ENV = 'PROD'
VITE_APP_ENV = 'PROD'
VITE_APP_NAME = '
Super
Link'
VITE_APP_NAME = '
Model
Link'
VITE_APP_THEME_COLOR = '#000DFF'
VITE_APP_THEME_COLOR = '#000DFF'
VITE_PUBLIC_PATH = /fe
VITE_PUBLIC_PATH = /fe
...
...
index.html
View file @
b5e63e44
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/c/font_4711453_egfmzk2ywd.css"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/c/font_4711453_egfmzk2ywd.css"
/>
<title>
Super
Link
</title>
<title>
Model
Link
</title>
</head>
</head>
<body>
<body>
...
...
src/assets/images/logo.png
View replaced file @
b22e6438
View file @
b5e63e44
5.98 KB
|
W:
|
H:
4.61 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/images/page-logo.png
View replaced file @
b22e6438
View file @
b5e63e44
3.1 KB
|
W:
|
H:
5.34 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/composables/useEventSource.ts
View file @
b5e63e44
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
useUserStore
}
from
'@/store/modules/user'
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'
]}
`
const
EVENT_SOURCE_BASE_URL
=
`
${
BASE_URLS
[
window
.
ENV
||
'DEV'
]}
`
...
@@ -14,6 +16,7 @@ export function fetchCustomEventSource(config: {
...
@@ -14,6 +16,7 @@ export function fetchCustomEventSource(config: {
onFinally
?:
()
=>
void
onFinally
?:
()
=>
void
})
{
})
{
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
systemLanguageStore
=
useSystemLanguageStore
()
let
responseError
=
false
let
responseError
=
false
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
...
@@ -21,6 +24,7 @@ export function fetchCustomEventSource(config: {
...
@@ -21,6 +24,7 @@ export function fetchCustomEventSource(config: {
headers
:
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'x-lang'
:
languageKeyTransform
(
systemLanguageStore
.
currentLanguageInfo
.
key
),
},
},
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
signal
:
config
.
controller
?.
signal
,
signal
:
config
.
controller
?.
signal
,
...
...
src/locales/langs/en.yaml
View file @
b5e63e44
...
@@ -119,7 +119,7 @@ login_module:
...
@@ -119,7 +119,7 @@ login_module:
other_login_methods
:
'
Other
login
methods'
other_login_methods
:
'
Other
login
methods'
home_module
:
home_module
:
agent_welcome_message
:
'
Hi,
welcome
to
Super
Link'
agent_welcome_message
:
'
Hi,
welcome
to
Model
Link'
agent_description
:
'
Here,
you
can
experience
models
and
dedicated
agents
for
multiple
platforms'
agent_description
:
'
Here,
you
can
experience
models
and
dedicated
agents
for
multiple
platforms'
currently_in_the_latest_session
:
'
This
is
the
latest
session'
currently_in_the_latest_session
:
'
This
is
the
latest
session'
switching_over
:
'
Switching'
switching_over
:
'
Switching'
...
...
src/locales/langs/zh-cn.yaml
View file @
b5e63e44
...
@@ -102,7 +102,7 @@ common_module:
...
@@ -102,7 +102,7 @@ common_module:
goto
:
'
跳转至'
goto
:
'
跳转至'
login_module
:
login_module
:
app_welcome_words
:
'
欢迎使用萃想POC
'
app_welcome_words
:
'
Hi,
欢迎使用Model
Link
'
please_enter_your_account_number
:
'
请输入账号'
please_enter_your_account_number
:
'
请输入账号'
please_enter_your_password
:
'
请输入密码'
please_enter_your_password
:
'
请输入密码'
please_enter_your_cell_phone_number
:
'
请输入手机号'
please_enter_your_cell_phone_number
:
'
请输入手机号'
...
@@ -118,7 +118,7 @@ login_module:
...
@@ -118,7 +118,7 @@ login_module:
other_login_methods
:
'
其他登录方式'
other_login_methods
:
'
其他登录方式'
home_module
:
home_module
:
agent_welcome_message
:
'
Hi,
欢迎使用
Super
Link'
agent_welcome_message
:
'
Hi,
欢迎使用
Model
Link'
agent_description
:
'
在这里,你可以体验多个平台的模型和专属的智能体'
agent_description
:
'
在这里,你可以体验多个平台的模型和专属的智能体'
currently_in_the_latest_session
:
'
当前已是最新会话'
currently_in_the_latest_session
:
'
当前已是最新会话'
switching_over
:
'
切换中'
switching_over
:
'
切换中'
...
...
src/locales/langs/zh-hk.yaml
View file @
b5e63e44
...
@@ -120,7 +120,7 @@ login_module:
...
@@ -120,7 +120,7 @@ login_module:
interrupt_the_conversation_and_apply_the_history_prompt
:
'
當前回復尚未完成,是否確定打斷對話應用其它記錄?'
interrupt_the_conversation_and_apply_the_history_prompt
:
'
當前回復尚未完成,是否確定打斷對話應用其它記錄?'
home_module
:
home_module
:
agent_welcome_message
:
'
Hi,
歡迎使用
Super
Link'
agent_welcome_message
:
'
Hi,
歡迎使用
Model
Link'
agent_description
:
'
在這裏,你可以體驗多個平臺的模型和專屬的智'
agent_description
:
'
在這裏,你可以體驗多個平臺的模型和專屬的智'
currently_in_the_latest_session
:
'
當前已是最新會話'
currently_in_the_latest_session
:
'
當前已是最新會話'
switching_over
:
'
切換中'
switching_over
:
'
切換中'
...
...
src/store/modules/system-language.ts
View file @
b5e63e44
...
@@ -23,10 +23,10 @@ const defaultLanguageOptions = [
...
@@ -23,10 +23,10 @@ const defaultLanguageOptions = [
label
:
'中文繁體'
,
label
:
'中文繁體'
,
key
:
'zh-HK'
,
key
:
'zh-HK'
,
},
},
{
//
{
label
:
'English'
,
//
label: 'English',
key
:
'en'
,
//
key: 'en',
},
//
},
]
]
const
localeKey
=
ss
.
get
(
'i18nextLng'
)
||
defaultLocale
const
localeKey
=
ss
.
get
(
'i18nextLng'
)
||
defaultLocale
...
@@ -53,28 +53,3 @@ export const useSystemLanguageStore = defineStore('system-language-store', {
...
@@ -53,28 +53,3 @@ export const useSystemLanguageStore = defineStore('system-language-store', {
},
},
},
},
})
})
// export const useSystemLanguageStore = defineStore('system-language-store', () => {
// const currentLanguageInfo = ref({
// key: localeKey,
// label: defaultLanguageOptions.find((optionItem) => optionItem.key === localeKey)!.label,
// })
// const languageOptions = readonly(defaultLanguageOptions)
// function updateCurrentLanguageInfo(key: I18n.LangType) {
// if (currentLanguageInfo.value.key === key) return ''
// ss.set('i18nextLng', key)
// const { locale } = useI18n()
// locale.value = key
// currentLanguageInfo.value = defaultLanguageOptions.find((optionItem) => optionItem.key === key) as {
// key: string
// label: string
// }
// }
// return { currentLanguageInfo, languageOptions, updateCurrentLanguageInfo }
// })
src/views/login/login.vue
View file @
b5e63e44
...
@@ -304,7 +304,7 @@ function handleEmailCodeGain() {
...
@@ -304,7 +304,7 @@ function handleEmailCodeGain() {
<
template
>
<
template
>
<div
class=
"bg-px-login_bg-png relative h-screen min-h-[750px] w-full min-w-[600px] bg-cover bg-center bg-no-repeat"
>
<div
class=
"bg-px-login_bg-png relative h-screen min-h-[750px] w-full min-w-[600px] bg-cover bg-center bg-no-repeat"
>
<div
<div
class=
"bg-px-logo-png z-100 absolute left-[60px] top-[25px] h-[29px] w-[119px] bg-contain bg-center bg-no-repeat"
class=
"bg-px-logo-png z-100 absolute left-[60px] top-[25px] h-[29px] w-[119px]
!
bg-contain bg-center bg-no-repeat"
></div>
></div>
<div
class=
"z-100 absolute right-[60px] top-[25px] w-[140px]"
>
<div
class=
"z-100 absolute right-[60px] top-[25px] w-[140px]"
>
...
...
src/views/multi-model-dialogue/utils/fetch-event-stream-source.ts
View file @
b5e63e44
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
fetchEventSource
}
from
'@microsoft/fetch-event-source'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
BASE_URLS
}
from
'@/config/base-url'
import
{
useUserStore
}
from
'@/store/modules/user'
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'
]}
`
const
EVENT_SOURCE_BASE_URL
=
`
${
BASE_URLS
[
window
.
ENV
||
'DEV'
]}
`
...
@@ -14,6 +16,7 @@ export function fetchEventStreamSource(config: {
...
@@ -14,6 +16,7 @@ export function fetchEventStreamSource(config: {
onFinally
?:
()
=>
void
onFinally
?:
()
=>
void
})
{
})
{
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
systemLanguageStore
=
useSystemLanguageStore
()
let
responseError
=
false
let
responseError
=
false
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
fetchEventSource
(
`
${
EVENT_SOURCE_BASE_URL
}${
config
.
path
}
`
,
{
...
@@ -21,6 +24,7 @@ export function fetchEventStreamSource(config: {
...
@@ -21,6 +24,7 @@ export function fetchEventStreamSource(config: {
headers
:
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'X-Request-Token'
:
userStore
.
token
||
''
,
'x-lang'
:
languageKeyTransform
(
systemLanguageStore
.
currentLanguageInfo
.
key
),
},
},
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
body
:
JSON
.
stringify
(
config
.
payload
||
{}),
signal
:
config
.
controller
?.
signal
,
signal
:
config
.
controller
?.
signal
,
...
...
src/views/personal-space/personal-knowledge/document-detail.vue
View file @
b5e63e44
...
@@ -54,7 +54,7 @@ const currentKnowledgeChunkInfo = ref<KnowledgeChunkItem>({ ...defaultKnowledgeC
...
@@ -54,7 +54,7 @@ const currentKnowledgeChunkInfo = ref<KnowledgeChunkItem>({ ...defaultKnowledgeC
const
documentIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
documentIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
type
=
documentUrl
.
substring
(
documentUrl
.
lastIndexOf
(
'.'
)
+
1
)
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
(()
=>
{
const
emptyKnowledgeChunkListText
=
computed
(()
=>
{
...
...
src/views/personal-space/personal-knowledge/knowledge-type.ts
View file @
b5e63e44
...
@@ -13,6 +13,7 @@ export interface KnowledgeItem {
...
@@ -13,6 +13,7 @@ export interface KnowledgeItem {
trainStatus
:
TrainStatus
trainStatus
:
TrainStatus
isOpen
:
'Y'
|
'N'
isOpen
:
'Y'
|
'N'
createdTime
:
Date
createdTime
:
Date
documentInfos
:
KnowledgeDocumentItem
[]
}
}
export
interface
SegmentationConfigInterface
{
export
interface
SegmentationConfigInterface
{
...
...
src/views/personal-space/personal-knowledge/upload-knowledge/upload-local-document/data-process.vue
View file @
b5e63e44
...
@@ -66,7 +66,7 @@ const trainFileFontColor = computed(() => (status: TrainStatus) => {
...
@@ -66,7 +66,7 @@ const trainFileFontColor = computed(() => (status: TrainStatus) => {
const
trainFileIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
trainFileIcon
=
computed
(()
=>
(
documentUrl
:
string
)
=>
{
const
type
=
documentUrl
.
substring
(
documentUrl
.
lastIndexOf
(
'.'
)
+
1
)
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
(()
=>
{
const
isTrainFileListFinish
=
computed
(()
=>
{
...
@@ -132,7 +132,7 @@ function handleConfirm() {
...
@@ -132,7 +132,7 @@ function handleConfirm() {
<div
<div
v-show=
"![TrainStatus.COMPLETE, TrainStatus.FAIL].includes(trainFileItem.trainStatus)"
v-show=
"![TrainStatus.COMPLETE, TrainStatus.FAIL].includes(trainFileItem.trainStatus)"
class=
"animate-training absolute left-0 top-[-1px] h-[90px] w-full bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
class=
"animate-training absolute left-0 top-[-1px] h-[90px] w-full
rounded-[10px]
bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
/>
/>
</li>
</li>
</ul>
</ul>
...
...
src/views/personal-space/personal-knowledge/upload-knowledge/upload-local-document/upload-file.vue
View file @
b5e63e44
...
@@ -34,7 +34,7 @@ const emit = defineEmits<Emit>()
...
@@ -34,7 +34,7 @@ const emit = defineEmits<Emit>()
const
uploadFileList
=
ref
<
FileItem
[]
>
([])
const
uploadFileList
=
ref
<
FileItem
[]
>
([])
const
uploadFileIcon
=
(
type
:
string
)
=>
{
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
(()
=>
{
const
isDisabledNextBtn
=
computed
(()
=>
{
...
@@ -258,7 +258,7 @@ function handleNextStep() {
...
@@ -258,7 +258,7 @@ function handleNextStep() {
<div
<div
v-show=
"[FileItemStatus.UPLOADING].includes(uploadFileItem.status)"
v-show=
"[FileItemStatus.UPLOADING].includes(uploadFileItem.status)"
class=
"animate-training absolute left-0 top-[-1px] h-[92px] w-full bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
class=
"animate-training absolute left-0 top-[-1px] h-[92px] w-full
rounded-[10px]
bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
/>
/>
</li>
</li>
</ul>
</ul>
...
...
src/views/share/components/footer-input.vue
View file @
b5e63e44
...
@@ -233,7 +233,7 @@ defineExpose({
...
@@ -233,7 +233,7 @@ defineExpose({
@
click=
"handleMessageSend"
@
click=
"handleMessageSend"
/>
/>
<div
v-show=
"!isLogin"
class=
"absolute left-3 top-[5px] flex h-[3
4
px] items-center text-[#84868c]"
>
<div
v-show=
"!isLogin"
class=
"absolute left-3 top-[5px] flex h-[3
0
px] items-center text-[#84868c]"
>
{{ t('share_agent_module.please') }}
{{ t('share_agent_module.please') }}
<span
class=
"text-theme-color cursor-pointer px-1 hover:opacity-80"
@
click=
"handleToLogin"
>
<span
class=
"text-theme-color cursor-pointer px-1 hover:opacity-80"
@
click=
"handleToLogin"
>
{{ t('common_module.login') }}
{{ t('common_module.login') }}
...
...
src/views/share/components/mobile-page-header.vue
View file @
b5e63e44
...
@@ -33,7 +33,7 @@ function handleToLogin() {
...
@@ -33,7 +33,7 @@ function handleToLogin() {
<
template
>
<
template
>
<header
class=
"flex h-[48px] w-full items-center justify-between border-b border-[#e8e9eb] bg-white px-4"
>
<header
class=
"flex h-[48px] w-full items-center justify-between border-b border-[#e8e9eb] bg-white px-4"
>
<div
class=
"bg-px-logo-png h-[24px] w-[100px] bg-center bg-no-repeat"
/>
<div
class=
"bg-px-logo-png
bg-contain!
h-[24px] w-[100px] bg-center bg-no-repeat"
/>
<div>
<div>
<NButton
<NButton
v-show=
"isLogin"
v-show=
"isLogin"
...
...
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