|
...
|
...
|
@@ -33,7 +33,7 @@ export const columns: BasicColumn[] = [ |
|
|
|
align: 'center',
|
|
|
|
dataIndex: 'answerType',
|
|
|
|
customRender: ({ text }) => {
|
|
|
|
const statusMap ={
|
|
|
|
const statusMap = {
|
|
|
|
1: '问题库回答',
|
|
|
|
2: '模型回答',
|
|
|
|
3: '未命中',
|
|
...
|
...
|
@@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
{
|
|
|
|
label: '问题',
|
|
|
|
field: 'question',
|
|
|
|
component: 'Input',
|
|
|
|
component: 'Input', // 替换为文本域组件
|
|
|
|
},
|
|
|
|
// 新增知识库选择字段
|
|
|
|
{
|
|
...
|
...
|
@@ -86,7 +86,23 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
{
|
|
|
|
label: '回答方式',
|
|
|
|
field: 'answerType',
|
|
|
|
component: 'Input',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
label: '未命中',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '模型回答',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '问题库回答',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否存入',
|
|
...
|
...
|
@@ -95,11 +111,11 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
componentProps: {
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
label: '是',
|
|
|
|
label: '已存入',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '否',
|
|
|
|
label: '未存入',
|
|
|
|
value: 0,
|
|
|
|
},
|
|
|
|
],
|
|
...
|
...
|
@@ -109,16 +125,6 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
//表单数据
|
|
|
|
export const formSchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
label: '问题',
|
|
|
|
field: 'question',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '回答',
|
|
|
|
field: 'answer',
|
|
|
|
component: 'InputTextArea',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '模型名称',
|
|
|
|
field: 'name', // 注意:这里使用knowledgeId作为字段名
|
|
|
|
component: 'Input',
|
|
...
|
...
|
@@ -134,6 +140,23 @@ export const formSchema: FormSchema[] = [ |
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '问题',
|
|
|
|
field: 'question',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '回答',
|
|
|
|
field: 'answer',
|
|
|
|
component: 'InputTextArea',
|
|
|
|
componentProps: {
|
|
|
|
autoSize: {
|
|
|
|
minRows: 1, // 最小行数
|
|
|
|
maxRows: 10, // 最大行数
|
|
|
|
},
|
|
|
|
style: { width: '100%' }, // 宽度自适应
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// TODO 主键隐藏字段,目前写死为ID
|
|
|
|
{
|
|
|
|
label: '',
|
...
|
...
|
|