Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d47fc120
authored
Dec 01, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 素材列表及分组接口联调
1 parent
f3a5f760
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
152 additions
and
41 deletions
apps/frontend/venus-agentic/venus-agentic-assisant/src/api/knowledge.ts
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/Assistant/index.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/AgenticReplay.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/AgenticTrain.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/index.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageKonw/addUpdate.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageKonw/index.vue
apps/frontend/venus-agentic/venus-agentic-base/.env.development
apps/frontend/venus-agentic/venus-agentic-base/env.d.ts
apps/frontend/venus-agentic/venus-agentic-base/public/vite.svg
apps/frontend/venus-agentic/venus-agentic-base/src/config/center.ts
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/BasicLayout.vue
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/SidebarMenuItem.vue
apps/frontend/venus-agentic/venus-agentic-assisant/src/api/knowledge.ts
0 → 100644
View file @
d47fc12
import
{
gscPost
}
from
'@/utils/gscRequest'
;
/**
* 素材分组列表
*/
export
async
function
findCategoryList
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeCategory/findCategoryList'
,
data
);
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材分组新增
*/
export
async
function
addCategory
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeCategory/addCategory'
,
data
,
{
returnAll
:
true
});
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材分组修改
*/
export
async
function
updateCategory
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeCategory/updateCategory'
,
data
,
{
returnAll
:
true
});
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 分组列表包含的素材列表
*/
export
async
function
findCategoryWithMaterialList
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeCategory/findCategoryWithMaterialList'
,
data
,
{
returnAll
:
true
});
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材列表
*/
export
async
function
findPageKnowledgeMaterial
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeMaterial/findPageKnowledgeMaterial'
,
data
,
{
returnAll
:
true
});
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材编辑
*/
export
async
function
updateKnowledgeMaterial
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeMaterial/updateKnowledgeMaterial'
,
data
);
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材上传
*/
export
async
function
saveKnowledgeMaterial
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeMaterial/saveKnowledgeMaterial'
,
data
);
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
/**
* 素材删除
*/
export
async
function
deleteKnowledgeMaterial
(
data
:
any
)
{
try
{
const
response
=
await
gscPost
(
'/knowledgeMaterial/deleteKnowledgeMaterial'
,
data
,
{
returnAll
:
true
});
return
response
;
}
catch
(
error
)
{
throw
error
;
}
}
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/Assistant/index.vue
View file @
d47fc12
...
...
@@ -41,17 +41,11 @@ const getList = async () => {
};
const
res
=
await
assistantList
(
requestData
);
console
.
log
(
'getList'
,
res
);
// 根据实际接口返回结构解析数据
let
records
=
[];
let
total
=
0
;
let
current
=
1
;
if
(
res
&&
res
.
data
)
{
records
=
res
.
data
.
records
||
res
.
data
.
list
||
[];
total
=
res
.
data
.
total
||
0
;
current
=
res
.
data
.
current
||
res
.
data
.
currentPage
||
1
;
}
else
if
(
res
&&
Array
.
isArray
(
res
.
records
))
{
if
(
res
&&
Array
.
isArray
(
res
.
records
))
{
// 兼容直接返回分页数据的情况
records
=
res
.
records
||
[];
total
=
res
.
total
||
0
;
...
...
@@ -67,7 +61,6 @@ const getList = async () => {
pagination
.
total
=
total
;
pagination
.
currentPage
=
current
;
}
catch
(
error
)
{
console
.
error
(
'获取列表失败:'
,
error
);
ElMessage
.
error
(
'获取列表失败,请稍后重试'
);
tableData
.
value
=
[];
pagination
.
total
=
0
;
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/AgenticReplay.vue
View file @
d47fc12
...
...
@@ -62,6 +62,7 @@
</div>
<div
class=
"flex items-center justify-center edit-btn w-[68px] h-[28px] rounded-[4px] bg-[#1956FE] cursor-pointer hover:bg-[#0d47d9] transition-colors"
v-if=
"!isEditing"
@
click=
"toggleEdit"
>
<img
class=
"w-[14px] h-[14px]"
src=
"/images/icon-edit.png"
alt=
""
srcset=
""
>
...
...
@@ -82,7 +83,7 @@
<p
class=
"text-[12px] text-[#969AA3] font-normal mt-[4px]"
>
提示词将指导AI如何进行对话分析,可根据需求调整分析重点和输出格式
</p>
<div
class=
"btn-group flex items-center gap-[12px] mt-[32px]"
v-if=
"isEditing"
>
<el-button
type=
"primary"
>
保存
</el-button>
<el-button>
取消
</el-button>
<el-button
@
click=
"toggleEdit"
>
取消
</el-button>
</div>
</div>
</section>
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/AgenticTrain.vue
View file @
d47fc12
...
...
@@ -7,7 +7,7 @@
<!-- 标题头 -->
<div
class=
"flex items-center h-[42px] mb-4 border-b border-gray-100"
>
<!--
<div
class=
"w-1 h-4 bg-blue-600 rounded-sm mr-2"
></div>
-->
<img
src=
"
../../../..
/images/icon-title.png"
alt=
"title"
class=
"w-[4px] h-[18px] rounded-sm"
>
<img
src=
"/images/icon-title.png"
alt=
"title"
class=
"w-[4px] h-[18px] rounded-sm"
>
<p
class=
"text-[14px] font-medium text-[#2F3133] ml-[12px]"
>
智能体概况
</p>
</div>
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/index.vue
View file @
d47fc12
...
...
@@ -81,10 +81,10 @@ const sidebarItems = [
<div
class=
"mr-4"
>
<img
v-if=
"index === 0"
src=
"
../../../public
/images/icon-agentic-quality.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 1"
src=
"
../../../public
/images/icon-agentic-practice.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 2"
src=
"
../../../public
/images/icon-agentic-replay.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 3"
src=
"
../../../public
/images/icon-agentic-train.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 0"
src=
"/images/icon-agentic-quality.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 1"
src=
"/images/icon-agentic-practice.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 2"
src=
"/images/icon-agentic-replay.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
<img
v-if=
"index === 3"
src=
"/images/icon-agentic-train.png"
class=
"flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors"
/>
</div>
<!-- 文本 -->
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageKonw/addUpdate.vue
View file @
d47fc12
...
...
@@ -71,9 +71,12 @@
<span
class=
"text-gray-600 font-medium"
>
所属分组
</span>
</
template
>
<el-select
v-model=
"formData.group"
placeholder=
"请选择"
class=
"custom-form-select"
size=
"large"
>
<el-option
label=
"未分组"
value=
"ungrouped"
/>
<el-option
label=
"营销素材"
value=
"marketing"
/>
<el-option
label=
"产品图片"
value=
"product"
/>
<el-option
v-for=
"category in categories"
:key=
"category.id"
:label=
"category.name"
:value=
"category.id"
/>
</el-select>
</el-form-item>
...
...
@@ -179,9 +182,10 @@
</template>
<
script
setup
>
import
{
ref
,
reactive
,
watch
}
from
'vue'
;
import
{
ref
,
reactive
,
watch
,
onMounted
}
from
'vue'
;
import
{
Close
,
UploadFilled
,
Folder
}
from
'@element-plus/icons-vue'
;
import
{
ElMessage
}
from
'element-plus'
;
import
{
findCategoryList
}
from
'@/api/knowledge'
;
// 定义 props
const
props
=
defineProps
({
...
...
@@ -206,10 +210,30 @@ const uploadRef = ref(null);
const
formData
=
reactive
({
files
:
[],
name
:
''
,
group
:
'
未分组
'
,
group
:
''
,
departments
:
[]
});
// --- Categories Data ---
const
categories
=
ref
([]);
// 获取分类列表
const
getCategoryList
=
async
()
=>
{
try
{
const
res
=
await
findCategoryList
({});
if
(
res
?.
length
)
{
categories
.
value
=
res
.
map
((
item
)
=>
({
id
:
item
.
id
,
name
:
item
.
name
,
count
:
item
.
materialCount
||
0
,
}));
}
}
catch
(
error
)
{
console
.
error
(
'获取分类列表失败:'
,
error
);
ElMessage
.
error
(
'获取分类列表失败'
);
}
};
// 文件变化处理
const
handleFileChange
=
(
file
,
fileList
)
=>
{
formData
.
files
=
fileList
;
...
...
@@ -223,14 +247,10 @@ const handleFileRemove = (file, fileList) => {
// 监听 material 变化,填充表单数据
watch
(()
=>
props
.
material
,
(
newMaterial
)
=>
{
if
(
newMaterial
)
{
// 填充素材名称
formData
.
name
=
newMaterial
.
title
||
''
;
formData
.
name
=
newMaterial
.
title
||
newMaterial
.
name
||
''
;
// 如果有文件URL,创建文件对象用于显示
if
(
newMaterial
.
fileUrl
)
{
// 从URL提取文件名
const
fileName
=
newMaterial
.
title
||
newMaterial
.
fileUrl
.
split
(
'/'
).
pop
()
||
'文件'
;
// 创建文件对象(用于显示,实际可能需要从服务器获取文件)
formData
.
files
=
[{
name
:
fileName
,
url
:
newMaterial
.
fileUrl
,
...
...
@@ -240,16 +260,12 @@ watch(() => props.material, (newMaterial) => {
formData
.
files
=
[];
}
// 如果有分组信息,可以在这里设置
// formData.group = newMaterial.group || '未分组';
// 如果有部门信息,可以在这里设置
// formData.departments = newMaterial.departments || [];
formData
.
group
=
newMaterial
.
categoryId
||
newMaterial
.
group
||
''
;
formData
.
departments
=
newMaterial
.
departments
||
[];
}
else
{
// 清空表单(新增模式)
formData
.
name
=
''
;
formData
.
files
=
[];
formData
.
group
=
'
未分组
'
;
formData
.
group
=
''
;
formData
.
departments
=
[];
}
},
{
immediate
:
true
});
...
...
@@ -402,6 +418,11 @@ const closeModal = () => {
const
handleClose
=
()
=>
{
closeModal
();
};
// 组件挂载时获取分类列表
onMounted
(()
=>
{
getCategoryList
();
});
</
script
>
<
style
scoped
>
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageKonw/index.vue
View file @
d47fc12
This diff is collapsed.
Click to expand it.
apps/frontend/venus-agentic/venus-agentic-base/.env.development
View file @
d47fc12
...
...
@@ -12,7 +12,7 @@ VITE_SUBAPP_REACT_ENTRY=http://localhost:8082
VITE_BASE_URL=/
VITE_USE_MOCK=
tru
e
VITE_USE_MOCK=
fals
e
VITE_DEBUG=true
...
...
apps/frontend/venus-agentic/venus-agentic-base/env.d.ts
View file @
d47fc12
//
/ <reference types="vite/client" />
/// <reference types="vite/client" />
declare
module
'*.vue'
{
import
type
{
DefineComponent
}
from
'vue'
;
...
...
apps/frontend/venus-agentic/venus-agentic-base/public/vite.svg
View file @
d47fc12
No preview for this file type
apps/frontend/venus-agentic/venus-agentic-base/src/config/center.ts
View file @
d47fc12
...
...
@@ -9,8 +9,6 @@ let baseConfig: any = {};
let
routerConfig
:
any
=
{};
// GSC API 请求实例(模块级单例,不挂载到 window)
let
gscApiInstance
:
null
|
Request
=
null
;
// 错误信息存储:用于将 error 事件中的错误信息传递到实际请求处
const
errorStore
=
new
Map
<
string
,
{
error
:
any
;
requestConfig
:
any
;
timestamp
:
number
}
>
();
// 配置加载完成的 Promise
let
configReadyPromise
:
null
|
Promise
<
void
>
=
null
;
...
...
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/BasicLayout.vue
View file @
d47fc12
...
...
@@ -8,10 +8,10 @@ import { defaultTopMenus, getMenuParentPaths } from '@/config/menus';
import
{
microApps
}
from
'@/qiankun/apps'
;
import
{
communicationManager
}
from
'@/qiankun/communication'
;
import
{
useMenuStore
}
from
'@/stores'
;
import
{
Download
}
from
'@element-plus/icons-vue'
;
//
import { Download } from '@element-plus/icons-vue';
import
Breadcrumb
from
'./components/Breadcrumb.vue'
;
import
NotificationCenter
from
'./components/NotificationCenter.vue'
;
//
import NotificationCenter from './components/NotificationCenter.vue';
import
SidebarMenuItem
from
'./components/SidebarMenuItem.vue'
;
import
UserInfo
from
'./components/UserInfo.vue'
;
...
...
@@ -347,7 +347,7 @@ watch(
.collapse-button
{
position
:
fixed
;
top
:
30%
;
z-index
:
1
0001
;
z-index
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
...
...
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/SidebarMenuItem.vue
View file @
d47fc12
<
script
setup
lang=
"ts"
>
import
type
{
MenuItem
}
from
'@/types/menu'
;
import
{
computed
,
ref
,
onMounted
,
nextTick
}
from
'vue'
;
import
{
computed
,
ref
,
nextTick
}
from
'vue'
;
import
{
ArrowDown
,
ArrowRight
}
from
'@element-plus/icons-vue'
;
...
...
@@ -140,7 +140,7 @@ const handleChildClick = (child: MenuItem) => {
<img
v-if=
"menu?.level == 1"
class=
"menu-icon"
src=
"/
public/
images/icon-menu-agentic.png"
src=
"/images/icon-menu-agentic.png"
alt=
""
srcset=
""
/>
...
...
@@ -156,7 +156,7 @@ const handleChildClick = (child: MenuItem) => {
<img
v-if=
"menu?.level == 1"
class=
"menu-icon"
src=
"/
public/
images/icon-menu-agentic.png"
src=
"/images/icon-menu-agentic.png"
alt=
""
srcset=
""
/>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment