ZdyRag.data.ts 1.4 KB
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

// 列表数据
export const columns: BasicColumn[] = [
  {
    title: 'ID',
    align: 'center',
    dataIndex: 'id',
    width: 200,
  },
  {
    title: '文本内容',
    align: 'center',
    dataIndex: 'text',
    width: 300,
  },
  {
    title: '文件名称',
    align: 'center',
    dataIndex: 'docName',
    width: 150,
  },
  {
    title: '知识ID',
    align: 'center',
    dataIndex: 'knowledgeId',
    width: 150,
  },
  {
    title: '文档ID',
    align: 'center',
    dataIndex: 'docId',
    width: 150,
  },
  {
    title: '索引',
    align: 'center',
    dataIndex: 'index',
    width: 80,
  },
  {
    title: '相似度',
    align: 'center',
    dataIndex: 'similarity',
    width: 100,
  },
];

// 查询数据
export const searchFormSchema: FormSchema[] = [];

// 表单数据
export const formSchema: FormSchema[] = [
  {
    label: 'text',
    field: 'text',
    component: 'Input',
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: { title: 'text', order: 0, view: 'text', type: 'string' },
};

/**
 * 流程表单调用这个方法获取formSchema
 * @param param
 */
export function getBpmFormSchema(_formData): FormSchema[] {
  return formSchema;
}