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
5262f496
Commit
5262f496
authored
Nov 05, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 应用广场
parent
1a3479b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
439 additions
and
74 deletions
+439
-74
application-square.ts
src/apis/application-square.ts
+13
-0
application-square-carousel.png
src/assets/images/application-square-carousel.png
+0
-0
applications-square-icon.png
src/assets/images/applications-square-icon.png
+0
-0
search.png
src/assets/images/search.png
+0
-0
sidebar.vue
src/layout/components/sidebar/sidebar.vue
+13
-1
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+7
-2
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+8
-2
applications-square.ts
src/router/modules/applications-square.ts
+28
-0
personal-app-config.ts
src/store/types/personal-app-config.ts
+7
-0
applications-square.vue
src/views/applications-square/applications-square.vue
+332
-0
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+1
-1
sale-applications-configuration-modal.vue
...ce/personal-app/sale-applications-configuration-modal.vue
+21
-66
locales.d.ts
types/locales.d.ts
+9
-2
No files found.
src/apis/application-square.ts
0 → 100644
View file @
5262f496
import
{
request
}
from
'@/utils/request'
export
function
fetchGetAgentApplicationList
<
T
>
(
payload
:
object
)
{
return
request
.
post
<
T
>
(
'/bizAgentApplicationMallRest/getList.json'
,
payload
)
}
export
function
fetchCollectOrCancelAgentApplication
<
T
>
(
id
:
number
|
undefined
)
{
return
request
.
post
<
T
>
(
`/bizAgentApplicationMallRest/collectOrCancelAgentInMall.json?id=
${
id
}
`
)
}
export
function
fetchGetMallCategoryList
<
T
>
()
{
return
request
.
post
<
T
>
(
'/bizAgentApplicationMallRest/getMallCategoryList.json'
)
}
src/assets/images/application-square-carousel.png
0 → 100644
View file @
5262f496
This diff is collapsed.
Click to expand it.
src/assets/images/applications-square-icon.png
0 → 100644
View file @
5262f496
670 Bytes
src/assets/images/search.png
0 → 100644
View file @
5262f496
503 Bytes
src/layout/components/sidebar/sidebar.vue
View file @
5262f496
...
...
@@ -2,7 +2,7 @@
import
{
h
,
readonly
,
ref
,
shallowReadonly
,
watchEffect
}
from
'vue'
import
{
useRoute
,
useRouter
}
from
'vue-router'
import
{
useI18n
}
from
'vue-i18n'
import
{
Plus
}
from
'@icon-park/vue-next'
import
{
Plus
,
Commodity
}
from
'@icon-park/vue-next'
import
type
{
MenuOption
}
from
'naive-ui'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
{
useUserStore
}
from
'@/store/modules/user'
...
...
@@ -29,6 +29,18 @@ const menuOptions = shallowReadonly<MenuOption[]>([
key
:
'PersonalSpace'
,
icon
:
()
=>
h
(
'i'
,
{
class
:
'iconfont icon-personal'
}),
},
{
type
:
'group'
,
label
:
()
=>
h
(
'div'
,
{},
t
(
'router_title_module.explore'
)),
key
:
'Dialogue'
,
children
:
[
{
label
:
()
=>
h
(
'div'
,
{},
t
(
'router_title_module.application_square'
)),
key
:
'ApplicationsSquare'
,
icon
:
()
=>
h
(
Commodity
,
{
theme
:
'outline'
,
size
:
'18'
,
fill
:
'#333'
}),
},
],
},
])
const
avatarOptions
=
readonly
([
...
...
src/locales/langs/zh-cn.yaml
View file @
5262f496
...
...
@@ -67,7 +67,6 @@ common_module:
removal_failed
:
'
下架失败'
collect_successfully
:
'
收藏成功'
collect_unsubscribed
:
'
已取消收藏'
cancel
:
'
取消'
preservation
:
'
保存'
open
:
'
开'
close
:
'
关'
...
...
@@ -148,6 +147,8 @@ router_title_module:
knowledge_document_list
:
'
知识库文档列表'
knowledge_document_detail
:
'
知识库文档详情'
multi_model_dialogue
:
'
多模型调试'
explore
:
'
探索'
application_square
:
'
应用广场'
personal_space_module
:
title
:
'
个人空间'
...
...
@@ -165,7 +166,6 @@ personal_space_module:
channel_popover_text
:
'
查看发布详情'
agent_copy
:
'
的副本'
empty_agent_list
:
'
暂无应用'
search_empty_agent_list
:
'
没有搜索到相关内容'
delete_agent_dialog_title
:
'
确定要删除选中的应用吗?'
delete_agent_dialog_content
:
'
删除后,如需再次使用,请重新创建'
remove_applications_dialog_title
:
'
确定要下架应用吗?'
...
...
@@ -400,3 +400,8 @@ multi_model_dialogue_module:
please_select_model_first
:
'
请先选择模型'
replace_configuration_tip
:
'
是否将该模型的配置覆盖到原来的配置项上'
open_new_conversation
:
'
已开启新会话'
applications_square_module
:
create_application_btn_text
:
'
创建应用'
all_application_btn_text
:
'
所有应用'
immediate_use_btn_text
:
'
立即使用'
src/locales/langs/zh-hk.yaml
View file @
5262f496
...
...
@@ -67,7 +67,6 @@ common_module:
removal_failed
:
'
下架失敗'
collect_successfully
:
'
收藏成功'
collect_unsubscribed
:
'
已取消收藏'
cancel
:
'
取消'
preservation
:
'
保存'
open
:
'
開'
close
:
'
關'
...
...
@@ -148,6 +147,8 @@ router_title_module:
knowledge_document_list
:
'
知識庫文檔列表'
knowledge_document_detail
:
'
知識庫文檔詳情'
multi_model_dialogue
:
'
多模型調試'
explore
:
'
探索'
applications-square
:
'
應用廣場'
personal_space_module
:
title
:
'
個人空間'
...
...
@@ -165,7 +166,6 @@ personal_space_module:
channel_popover_text
:
'
查看發佈詳情'
agent_copy
:
'
的副本'
empty_agent_list
:
'
暫無應用'
search_empty_agent_list
:
'
沒有蒐索到相關內容'
delete_agent_dialog_title
:
'
確定要刪除選中的應用嗎?'
delete_agent_dialog_content
:
'
刪除後,如需再次使用,請重新創建'
remove_applications_dialog_title
:
'
確定要下架應用嗎?'
...
...
@@ -400,3 +400,9 @@ multi_model_dialogue_module:
please_select_model_first
:
'
請先選擇模型'
replace_configuration_tip
:
'
是否將該模型的配置覆蓋到原來的配置項上'
open_new_conversation
:
'
已開啓新會話'
applications_square_module
:
title
:
'
應用廣場'
create_application_btn_text
:
'
創建應用'
all_application_btn_text
:
'
所有應用'
immediate_use_btn_text
:
'
立即使用'
src/router/modules/applications-square.ts
0 → 100644
View file @
5262f496
import
{
type
RouteRecordRaw
}
from
'vue-router'
export
default
[
{
path
:
'/explore'
,
name
:
'Explore'
,
meta
:
{
rank
:
1001
,
title
:
'router_title_module.explore'
,
icon
:
'mingcute:user-2-line'
,
belong
:
'applications-square'
,
},
component
:
()
=>
import
(
'@/layout/index.vue'
),
redirect
:
'/personalSpaceLayout'
,
children
:
[
{
path
:
'/applications-square'
,
name
:
'ApplicationsSquare'
,
meta
:
{
rank
:
1001
,
title
:
'router_title_module.applications-square'
,
belong
:
'ApplicationsSquare'
,
},
component
:
()
=>
import
(
'@/views/applications-square/applications-square.vue'
),
},
],
},
]
as
RouteRecordRaw
[]
src/store/types/personal-app-config.ts
View file @
5262f496
...
...
@@ -4,6 +4,7 @@ export interface VariableStructureItem {
}
export
interface
PersonalAppConfigState
{
agentType
?:
string
baseInfo
:
{
agentId
:
string
//应用ID
agentTitle
:
string
//应用标题
...
...
@@ -11,7 +12,10 @@ export interface PersonalAppConfigState {
agentDesc
:
string
//应用描述
agentSystem
:
string
//角色指令
agentPublishStatus
:
'draft'
|
'publish'
//发布状态 draft-草稿 publish-发布
memberId
:
number
}
clickNumber
?:
number
collectNumber
?:
number
commConfig
:
{
preamble
:
string
//开场白
featuredQuestions
:
string
[]
//推荐问
...
...
@@ -30,8 +34,11 @@ export interface PersonalAppConfigState {
communicationTurn
:
number
//参考对话轮次 0-100
temperature
:
number
//多样性 0-1.00
}
popularity
?:
number
modifiedTime
:
Date
id
?:
number
isCollect
:
string
isSale
:
string
isCopy
?:
string
agentPublishId
:
number
}
src/views/applications-square/applications-square.vue
0 → 100644
View file @
5262f496
This diff is collapsed.
Click to expand it.
src/views/personal-space/personal-app/personal-app.vue
View file @
5262f496
...
...
@@ -105,7 +105,7 @@ function getApplicationList(isLoadMore = false) {
agentAppList
.
value
=
isLoadMore
?
[...
agentAppList
.
value
,
...
res
.
data
]
:
res
.
data
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
emptyTableText
.
value
=
agentSearchInputValue
.
value
?
t
(
'
personal_space_module.agent_module.agent_list_module.search_empty_agent_list
'
)
?
t
(
'
common_module.search_empty_data
'
)
:
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
)
emptyTableImage
.
value
=
agentSearchInputValue
.
value
&&
agentAppList
.
value
.
length
===
0
?
searchEmptyImage
:
applicationEmptyImage
...
...
src/views/personal-space/personal-app/sale-applications-configuration-modal.vue
View file @
5262f496
<
script
setup
lang=
"ts"
>
import
{
fetchSalePublishApplication
}
from
'@/apis/agent-application'
import
{
fetchGetMallCategoryList
}
from
'@/apis/application-square'
import
{
PersonalAppConfigState
}
from
'@/store/types/personal-app-config'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
ref
,
watch
}
from
'vue'
...
...
@@ -23,64 +24,11 @@ const saleApplicationsId = ref(props.data.agentPublishId)
const
isClassifyError
=
ref
(
false
)
const
applicationsClassify
=
[
{
value
:
'mediaEntertainment'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.media_entertainment'
,
),
},
{
value
:
'educationTraining'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.education_training'
,
),
},
{
value
:
'businessServices'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.business_services'
,
),
},
{
value
:
'medicalHealth'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.medical_health'
,
),
},
{
value
:
'efficiencyTools'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.efficiency_tools'
,
),
},
{
value
:
'officePersonnel'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.office_personnel'
,
),
},
{
value
:
'marketingCommerce'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.marketing_commerce'
,
),
},
{
value
:
'finance'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.finance'
),
},
{
value
:
'law'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.law'
),
},
{
value
:
'cultureTourism'
,
label
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_sale_module.application_classify.culture_tourism'
,
),
},
]
const
applicationsClassify
=
ref
<
string
[]
>
([])
;(
function
()
{
handleGetMallCategoryList
()
})()
watch
(
()
=>
checkedClassifyValue
.
value
,
...
...
@@ -127,6 +75,13 @@ function handleApplicationReleaseBtn() {
function
handleIsCopySwitchUpdateValue
(
value
:
string
)
{
isCopy
.
value
=
value
}
function
handleGetMallCategoryList
()
{
fetchGetMallCategoryList
().
then
((
res
)
=>
{
if
(
res
.
code
!==
0
)
return
applicationsClassify
.
value
=
res
.
data
as
string
[]
})
}
</
script
>
<
template
>
...
...
@@ -163,22 +118,22 @@ function handleIsCopySwitchUpdateValue(value: string) {
</div>
<div
class=
"text-[#f33e3e]"
>
*
</div>
</div>
<div
class=
"flex flex-wrap
justify-between
"
>
<div
class=
"flex flex-wrap"
>
<button
v-for=
"classify in applicationsClassify"
:key=
"classify
.value
"
:class=
"['classify-radio-button',
{ active: checkedClassifyValue === classify
.value
}]"
class="relative mb-[8px] mr-[
4
px] h-[26px] cursor-pointer rounded-[6px] border-[1px] border-[#edeef7] bg-[#edeef7] px-[8px] text-[12px]"
@click="checkedClassifyValue = classify
.value
"
:key=
"classify"
:class=
"['classify-radio-button',
{ active: checkedClassifyValue === classify }]"
class="relative mb-[8px] mr-[
8
px] h-[26px] cursor-pointer rounded-[6px] border-[1px] border-[#edeef7] bg-[#edeef7] px-[8px] text-[12px]"
@click="checkedClassifyValue = classify"
>
<div
v-show=
"checkedClassifyValue === classify
.value
"
v-show=
"checkedClassifyValue === classify"
class=
"bg-theme-color absolute left-0 top-[-1px] h-[14px] w-[14px] rounded-[3px]"
style=
"clip-path: polygon(0 0, 100% 0, 0 100%)"
>
<CheckSmall
theme=
"outline"
size=
"10"
fill=
"#fff"
/>
</div>
{{
classify
.
label
}}
{{
classify
}}
</button>
</div>
<div
class=
"mb-[10px] h-[16px] text-red-500"
>
...
...
@@ -219,7 +174,7 @@ function handleIsCopySwitchUpdateValue(value: string) {
class=
"hover:text-theme-color hover:border-theme-color !mr-[12px] box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] px-[10px] outline-none transition-all duration-300 hover:border-[theme-color]"
@
click=
"handleApplicationsSaleSettingModalClose"
>
{{ t('common_module.cancel') }}
{{ t('common_module.cancel
_btn_text
') }}
</button>
<button
class=
"bg-theme-color !box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] bg-[te] px-[10px] text-[#ffffff] transition-all duration-300 hover:bg-[#528EFF]"
...
...
types/locales.d.ts
View file @
5262f496
...
...
@@ -68,7 +68,6 @@ declare namespace I18n {
removal_failed
:
string
collect_successfully
:
string
collect_unsubscribed
:
string
cancel
:
string
preservation
:
string
open
:
string
close
:
string
...
...
@@ -157,6 +156,8 @@ declare namespace I18n {
knowledge_document_list
:
string
knowledge_document_detail
:
string
multi_model_dialogue
:
string
explore
:
string
applications_square
:
string
}
personal_space_module
:
{
...
...
@@ -177,7 +178,6 @@ declare namespace I18n {
channel_popover_text
:
string
agent_copy
:
string
empty_agent_list
:
string
search_empty_agent_list
:
string
delete_agent_dialog_title
:
string
delete_agent_dialog_content
:
string
}
...
...
@@ -415,5 +415,12 @@ declare namespace I18n {
replace_configuration_tip
:
string
open_new_conversation
:
string
}
applications_square_module
:
{
title
:
string
create_application_btn_text
:
string
all_application_btn_text
:
string
immediate_use_btn_text
:
string
}
}
}
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