feat(ai-web): 知识库增加描述
This commit is contained in:
@@ -50,12 +50,20 @@ const Knowledge: React.FC = () => {
|
||||
type: 'input-text',
|
||||
name: 'name',
|
||||
label: '名称',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
type: 'textarea',
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
name: 'strategy',
|
||||
label: '类型',
|
||||
value: 'Cosine',
|
||||
required: true,
|
||||
options: [
|
||||
{
|
||||
label: '文本',
|
||||
@@ -77,6 +85,11 @@ const Knowledge: React.FC = () => {
|
||||
{
|
||||
name: 'name',
|
||||
label: '名称',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
},
|
||||
{
|
||||
label: '类型',
|
||||
@@ -99,8 +112,41 @@ const Knowledge: React.FC = () => {
|
||||
{
|
||||
type: 'operation',
|
||||
label: '操作',
|
||||
width: 150,
|
||||
width: 200,
|
||||
buttons: [
|
||||
{
|
||||
type: 'action',
|
||||
label: '更新',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '更新描述',
|
||||
body: {
|
||||
debug: commonInfo.debug,
|
||||
type: 'form',
|
||||
api: {
|
||||
method: 'post',
|
||||
url: `${commonInfo.baseAiUrl}/knowledge/update_description`,
|
||||
dataType: 'form',
|
||||
},
|
||||
mode: 'normal',
|
||||
body: [
|
||||
{
|
||||
type: 'hidden',
|
||||
name: "id",
|
||||
// value: '${id}',
|
||||
},
|
||||
{
|
||||
type: 'textarea',
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
required: true,
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '详情',
|
||||
|
||||
@@ -281,6 +281,7 @@ export function crudCommonOptions() {
|
||||
resizable: false,
|
||||
syncLocation: false,
|
||||
silentPolling: true,
|
||||
columnsTogglable: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user