feat(ai): 添加 AI 写作、知识库、思维导图和工作流功能

- 新增 AI 写作功能,包括示例点击、重置和停止流等功能
- 实现 AI 知识库管理,支持创建、编辑和删除知识库
- 添加 AI 思维导图功能,支持预览和管理思维导图
- 实现 AI 工作流管理,支持创建、编辑和删除工作流
- 优化 API 调用,使用 Vben 组件库和 Vue 3 相关特性
This commit is contained in:
gjd
2025-06-10 18:03:16 +08:00
parent 54066859c5
commit a4e44379e8
29 changed files with 20774 additions and 76 deletions

View File

@@ -0,0 +1,80 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { DICT_TYPE, getDictOptions } from '#/utils';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'code',
label: '流程标识',
component: 'Input',
},
{
fieldName: 'name',
label: '流程名称',
component: 'Input',
},
{
fieldName: 'status',
label: '状态',
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
},
},
{
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: {
placeholder: ['开始时间', '结束时间'],
valueFormat: 'YYYY-MM-DD HH:mm:ss',
allowClear: true,
},
},
];
}
/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions['columns'] {
return [
{
field: 'id',
title: '编号',
},
{
field: 'code',
title: '流程标识',
},
{
field: 'name',
title: '流程名称',
},
{
field: 'createTime',
title: '创建时间',
formatter: 'formatDateTime',
},
{
field: 'remark',
title: '备注',
},
{
field: 'status',
title: '状态',
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },
},
},
{
title: '操作',
width: 130,
fixed: 'right',
slots: { default: 'actions' },
},
];
}