From cb66b65c5fa4e70632625e8393dd00831507d2c0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 06 八月 2026 17:09:53 +0800
Subject: [PATCH] 银川 1.添加全局预览附件功能
---
src/views/ai/knowledge/document/data.ts | 86 +------------------------------------------
1 files changed, 2 insertions(+), 84 deletions(-)
diff --git a/src/views/ai/knowledge/document/data.ts b/src/views/ai/knowledge/document/data.ts
index 37fb141..5556582 100644
--- a/src/views/ai/knowledge/document/data.ts
+++ b/src/views/ai/knowledge/document/data.ts
@@ -2,90 +2,8 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { AiKnowledgeDocumentApi } from '#/api/ai/knowledge/document';
-import { AiModelTypeEnum, CommonStatusEnum, DICT_TYPE } from '../../../../packages/constants/src';
-import { getDictOptions } from '../../../../packages/effects/hooks/src';
-
-import { z } from '#/adapter/form';
-import { getModelSimpleList } from '#/api/ai/model/model';
-
-/** 鏂板/淇敼鐨勮〃鍗� */
-export function useFormSchema(): VbenFormSchema[] {
- return [
- {
- component: 'Input',
- fieldName: 'id',
- dependencies: {
- triggerFields: [''],
- show: () => false,
- },
- },
- {
- component: 'Input',
- fieldName: 'name',
- label: '鐭ヨ瘑搴撳悕绉�',
- rules: 'required',
- },
- {
- fieldName: 'description',
- label: '鐭ヨ瘑搴撴弿杩�',
- component: 'Textarea',
- componentProps: {
- rows: 3,
- placeholder: '璇疯緭鍏ョ煡璇嗗簱鎻忚堪',
- },
- },
- {
- component: 'ApiSelect',
- fieldName: 'embeddingModelId',
- label: '鍚戦噺妯″瀷',
- componentProps: {
- api: () => getModelSimpleList(AiModelTypeEnum.EMBEDDING),
- labelField: 'name',
- valueField: 'id',
- allowClear: true,
- placeholder: '璇烽�夋嫨鍚戦噺妯″瀷',
- },
- rules: 'required',
- },
- {
- fieldName: 'topK',
- label: '妫�绱� topK',
- component: 'InputNumber',
- componentProps: {
- class: '!w-full',
- placeholder: '璇疯緭鍏ユ绱� topK',
- min: 0,
- max: 10,
- },
- rules: 'required',
- },
- {
- fieldName: 'similarityThreshold',
- label: '妫�绱㈢浉浼煎害闃堝��',
- component: 'InputNumber',
- componentProps: {
- class: '!w-full',
- placeholder: '璇疯緭鍏ユ绱㈢浉浼煎害闃堝��',
- min: 0,
- max: 1,
- step: 0.01,
- precision: 2,
- },
- rules: 'required',
- },
- {
- fieldName: 'status',
- label: '鏄惁鍚敤',
- component: 'RadioGroup',
- componentProps: {
- options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
- buttonStyle: 'solid',
- optionType: 'button',
- },
- rules: z.number().default(CommonStatusEnum.ENABLE),
- },
- ];
-}
+import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
export function useGridFormSchema(): VbenFormSchema[] {
--
Gitblit v1.9.3